Package com.iizigo.quickfix.fixer
Class GotoProperty
- java.lang.Object
- org.eclipse.ui.views.markers.WorkbenchMarkerResolution
- com.iizigo.quickfix.QuickFixAdapter
- com.iizigo.quickfix.fixer.GotoProperty
- All Implemented Interfaces:
IQuickFix
,IQuickFixer
,org.eclipse.ui.IMarkerResolution
,org.eclipse.ui.IMarkerResolution2
- Direct Known Subclasses:
OpenProperty
public abstract class GotoProperty extends QuickFixAdapter implements IQuickFix
An abstract Quick-fix helper class to "go to a property" in the corresponding Editor to e.g. edit a setting. The label and optionally the description must be provided in the subclass, as it cannot vary, i.e. the fix cannot- Author:
- Christopher Mindus
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
editorName
The Editor name, null if property is not found, or no editor applies.protected boolean
isFolder
Flag for property is a folder.protected boolean
isRoot
Flag for property is the root.protected java.lang.String
location
The location of the property, null if property is not found.protected GProp<?>
property
The property found, null if not found.
Constructor Summary
Constructors Modifier Constructor Description GotoProperty()
Constructs the quick-fixer with default constructor for Eclipse.protected
GotoProperty(GProp<?> property)
Creates a quick-fixer to go to the specified property.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.Object>
getAttributes()
Gets the attributes for the marker.void
run(org.eclipse.core.resources.IMarker marker)
Runs this resolution.void
setMarker(org.eclipse.core.resources.IMarker marker)
Call to set the marker in a new instance of the quick-fixer.Methods inherited from class com.iizigo.quickfix.QuickFixAdapter
canBeGrouped, findOtherMarkers, getDescription, getImage, getLabel, getMarker, isMarkerRequired
Field Detail
property
protected GProp<?> property
The property found, null if not found.
location
protected java.lang.String location
The location of the property, null if property is not found.
editorName
protected java.lang.String editorName
The Editor name, null if property is not found, or no editor applies.
isRoot
protected boolean isRoot
Flag for property is the root.
isFolder
protected boolean isFolder
Flag for property is a folder.
Constructor Detail
GotoProperty
public GotoProperty()
Constructs the quick-fixer with default constructor for Eclipse.
GotoProperty
protected GotoProperty(GProp<?> property)
Creates a quick-fixer to go to the specified property.- Parameters:
property
- The property to go to.
Method Detail
getAttributes
public java.util.Map<java.lang.String,java.lang.Object> getAttributes()
Gets the attributes for the marker.- Specified by:
getAttributes
in interfaceIQuickFix
run
public void run(org.eclipse.core.resources.IMarker marker)
Runs this resolution.- Specified by:
run
in interfaceorg.eclipse.ui.IMarkerResolution
- Specified by:
run
in interfaceIQuickFixer
- Specified by:
run
in classQuickFixAdapter
- Parameters:
marker
- the marker to resolve.
setMarker
public void setMarker(org.eclipse.core.resources.IMarker marker)
Call to set the marker in a new instance of the quick-fixer.- Specified by:
setMarker
in interfaceIQuickFixer
- Overrides:
setMarker
in classQuickFixAdapter
- Parameters:
marker
- The marker.