Package com.iizigo.quickfix
Class QuickFixer
java.lang.Object
com.iizigo.quickfix.QuickFixer
- All Implemented Interfaces:
- IMarkerResolutionGenerator,- IMarkerResolutionGenerator2
Class that handles all quick fixes.
- Author:
- Christopher Mindus
- Field SummaryFieldsModifier and TypeFieldDescription- static final IMarker[]Empty array of markers.- static final IMarkerResolution[]Empty array of marker resolutions.- static final StringThe quick fixer ID.
- Constructor SummaryConstructors
- Method SummaryModifier and TypeMethodDescription- static IMarker[]- findOtherMarkers- (IQuickFixer fixer, IMarker[] markers) Iterate through the list of supplied markers.- static String- getMarkerAttribute- (String... fixerIDs) Gets a list of quick-fixes for the marker attribute.- getMarkerAttributes- (IQuickFix[] fixers) Gets the attributes required for quick-fixes when they consist of a instances of- IQuickFix.- getMarkerAttributes- (IQuickFix[] fixers, String[] fixerIDs) Gets the attributes required for quick-fixes when they consist of a combination of "static quick-fixes" using String IDs and instances of- IQuickFix.- getMarkerAttributes- (String[] fixerIDs) Gets the attributes required for quick-fixes when they consist of a combination of "static quick-fixes" using String IDs and instances of- IQuickFix.- getResolutions- (IMarker marker) Returns resolutions for the given marker (may be empty).- boolean- hasResolutions- (IMarker marker) Returns whether there are any resolutions for the given marker.- static void- register- (String fixID, IQuickFixer quickFixer) Registers a quick fix with an ID.
- Field Details- IDThe quick fixer ID.
- EMPTY_MARKERSEmpty array of markers.
- EMPTY_RESOLUTIONSEmpty array of marker resolutions.
 
- Constructor Details- QuickFixerpublic QuickFixer()
 
- Method Details- registerRegisters a quick fix with an ID.- Parameters:
- fixID- The fix ID, unique.
- quickFixer- The doer for quick-fixing.
- Throws:
- IllegalArgumentException- If the fixID is registered.
 
- getMarkerAttributeGets a list of quick-fixes for the marker attribute.- Parameters:
- fixerIDs- The quick-fixer IDs.
- Returns:
- The IDs to use as attribute with the QuickFixer.ID attribute name for the marker, or nullfor no quick-fixes.
 
- getMarkerAttributesGets the attributes required for quick-fixes when they consist of a combination of "static quick-fixes" using String IDs and instances of- IQuickFix.- Parameters:
- fixerIDs- An array of static quick-fixer IDs.
- Returns:
- The map used for the problem or marker.
 
- getMarkerAttributesGets the attributes required for quick-fixes when they consist of a instances of- IQuickFix.- Parameters:
- fixers- An array of quick-fixes instances.
- Returns:
- The map used for the problem or marker.
 
- getMarkerAttributesGets the attributes required for quick-fixes when they consist of a combination of "static quick-fixes" using String IDs and instances of- IQuickFix.- Parameters:
- fixers- An array of quick-fixes instances.
- fixerIDs- An array of static quick-fixer IDs.
- Returns:
- The map used for the problem or marker.
 
- findOtherMarkersIterate through the list of supplied markers. Return any that can also have the receiver applied to them.- Parameters:
- markers- The array of markers.
- Returns:
- IMarker[]
 
- getResolutionsReturns resolutions for the given marker (may be empty). This method is called from Eclipse.- Specified by:
- getResolutionsin interface- IMarkerResolutionGenerator
- Parameters:
- marker- The marker.
- Returns:
- Resolutions for the given marker.
 
- hasResolutionsReturns whether there are any resolutions for the given marker.- Specified by:
- hasResolutionsin interface- IMarkerResolutionGenerator2
- Parameters:
- marker- The marker.
- Returns:
- trueif there are resolutions for the given marker,- falseif not.