Community
Participate
Working Groups
In JAX-WS Tools in WTP Web Services we're using a number of Java 5 Annotation Processors for validating annotations. There are quick fixes for some of the problems and these work fine when clicking on the light bulb in the editor marker bar or by selecting the entry in the Problems view and selecting quick fix. There's one area where it doesn't work and that's when hovering over the annotation that's marked in error in the Java Editor. From debugging and looking at org.eclipse.jdt.internal.ui.text.java.hover.ProblemHover (Line 217 on HEAD) (ProblemInfo.getJavaAnnotationFixes()) the call to hasProblem() returns false because the first argument (org.eclipse.jdt.ui.text.java.IInvocationContext.getASTRoot().getProblems()) returns a zero length array. This results in the zero length ICompletionProposal array NO_PROPOSALS being returned and therefore no quick fixes get displayed. If the hasProblem() check returned true the correct quick fix is picked up and displayed on the hover. Is this a problem with APT Problems getting picked up / reported in the call to IInvocationContext.getASTRoot().getProblems() or is it possibly related to Bug #62081
Is it possible you are running into Bug 273088?
Sorry should have noted that this only occurs with "Enable processing in editor" is turned on. Re Bug 273088 When enable processing in editor is disabled the quick fix does appear on the hover, as well as on the editor marker and in the problems view. Using a marker resolution generator (org.eclipse.ui.ide.markerResolution) to get this to work.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.