Class RenameResource
java.lang.Object
org.eclipse.ui.views.markers.WorkbenchMarkerResolution
com.iizigo.quickfix.QuickFixAdapter
com.iizigo.quickfix.fixer.RenameResource
- All Implemented Interfaces:
IQuickFixer, IMarkerResolution, IMarkerResolution2
Fixes a problem with the resource name by renaming the resource. This is typically used when a file is located in a project folder and has a name that is not valid, e.g. wrong file extension, or a name that is invalid.
The rename is the platform's own: the LTK "Rename Resource" wizard on the marker's resource, so the rename is undone from Edit > Undo as any other resource rename, and the Module model revalidates the new name from the resource delta.
- Author:
- Christopher Mindus
Field Summary
FieldsConstructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionbooleanOne wizard renames one resource: this fix is not offered for several markers at once.Returns optional additional information about the resolution.getLabel()Returns a short label indicating what the resolution will do.voidRuns this resolution: opens the LTK rename wizard for the marker's resource.Methods inherited from class QuickFixAdapter
findOtherMarkers, getImage, getMarker, isMarkerRequired, setMarkerMethods inherited from class WorkbenchMarkerResolution
run
Field Details
ID
WIZARD_TITLE
Constructor Details
RenameResource
public RenameResource()
Method Details
run
Runs this resolution: opens the LTK rename wizard for the marker's resource.- Specified by:
runin interfaceIMarkerResolution- Specified by:
runin interfaceIQuickFixer- Specified by:
runin classQuickFixAdapter- Parameters:
marker- the marker to resolve.
canBeGrouped
public boolean canBeGrouped()One wizard renames one resource: this fix is not offered for several markers at once.- Overrides:
canBeGroupedin classQuickFixAdapter- Returns:
- false.
getLabel
Returns a short label indicating what the resolution will do.- Specified by:
getLabelin interfaceIMarkerResolution- Specified by:
getLabelin interfaceIQuickFixer- Specified by:
getLabelin classQuickFixAdapter- Returns:
- a short label for this resolution
getDescription
Returns optional additional information about the resolution. The additional information will be presented to assist the user in deciding if the selected proposal is the desired choice.- Specified by:
getDescriptionin interfaceIMarkerResolution2- Overrides:
getDescriptionin classQuickFixAdapter- Returns:
- the additional information or
null