Community
Participate
Working Groups
I have a project required that all of my markers should have their own additional proposal information to tell what the quickfix will do. e.g a marker requires a method to be "static", so the additional proposal information should look like ... public <b>static</b> void method() { ... But currencly Eclipse cannot allow user to create our own additional proposal information for our markers. Instead it will display the marker description in the quickfix dialog when you click on the lightblub icon. Code is in org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor: if (marker.isSubtypeOf(IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER)) { int problemId= marker.getAttribute(IJavaModelMarker.ID, -1); return problemId != -1 && hasCorrections(problemId); } else { IMarkerHelpRegistry registry = PlatformUI.getWorkbench().getMarkerHelpRegistry(); return registry != null && registry.hasResolutions(marker); } only JAVA_MODEL_PROBLEM_MARKER can have its additional proposal information, other markers will use the default additional proposal information which is displaying the marker description org.eclipse.jdt.internal.ui.text.correction.MarkerResolutionProposal : public String getAdditionalProposalInfo() { try { String problemDesc= (String) fMarker.getAttribute(IMarker.MESSAGE); return CorrectionMessages.getFormattedString ("MarkerResolutionProposal.additionaldesc", problemDesc); //$NON-NLS-1$ } catch (CoreException e) { JavaPlugin.log(e); } return null; } current IMarkerResolution only have a getLabel() method definition. I think it should also have a method to get the additional proposal information and a method to get the image out. Or another way to allow user to use their own additional proposal information in their markers.
I am not sure how getAdditionalProposalInfo() is used, so I can't see why the current IMarkerResolution API is insufficient. Moving to JDT Text for comment.
Quickfix uses a structure similar to content assist. When the list with proposals is shown, the framework asks the selected proposal for additional information to be displayed in a tooltip-like window next to the proposal popup. JDT generated Quick fix proposals deliver, e.g., the resulting code structure as additional info The only existing way to contribute custom Quick fix proposals is via marker resolutions. Marker resolutions do not provide a description about themselves that could be displayed. Moving back to Platform UI.
This seems like a good addition, however we are feature-frozen for 2.1. Will consider for 2.2.
*** This bug has been marked as a duplicate of 32262 ***