net.refractions.udig.issues
Class FeatureIssue

java.lang.Object
  extended by net.refractions.udig.issues.AbstractIssue
      extended by net.refractions.udig.issues.FeatureIssue
All Implemented Interfaces:
IIssue

public class FeatureIssue
extends AbstractIssue

Represents a problem or issue with a feature. The map containing the feature and the FeatureEditor will both be show. The map will be zoomed to show the feature.

Since:
1.0.0
Author:
jones

Field Summary
static java.lang.String EXT_ID
           
 
Constructor Summary
FeatureIssue()
           
FeatureIssue(Priority priority, java.lang.String description, ILayer containingLayer, Feature feature, java.lang.String groupId)
           
 
Method Summary
 void fixIssue(IViewPart part, IEditorPart editor)
          This is called when the user wishes to fix the issue.
 java.lang.String getEditorID()
          returns null
 IEditorInput getEditorInput()
          Returns null;
 java.lang.String getExtensionID()
          Returns the id of the extension definition for this type of Issue.
 java.lang.String getProblemObject()
          Returns A one or two word name for the object that has the issue.
 java.lang.String getViewPartId()
          Returns the id of the ViewPart that the issue requires in order to be resolved.
 void init(IMemento memento, IMemento viewMemento, java.lang.String issueId, java.lang.String groupId, ReferencedEnvelope bounds)
          Called by framework to initialize the Issue.
 void save(IMemento memento)
          Populates the memento with data specialized for the issues type.
 void setId(java.lang.String id)
          Sets the id of the issue.
static void setTesting(boolean b)
          ONLY USE THIS FOR TESTING!!!!!!!
 
Methods inherited from class net.refractions.udig.issues.AbstractIssue
addIssueListener, getBounds, getDescription, getGroupId, getId, getPerspectiveID, getPriority, getProperty, getPropertyNames, getResolution, getViewMemento, notifyListeners, notifyPropertyListeners, removeIssueListener, setBounds, setDescription, setGroupId, setPriority, setProperty, setResolution, setViewMemento, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EXT_ID

public static final java.lang.String EXT_ID
See Also:
Constant Field Values
Constructor Detail

FeatureIssue

public FeatureIssue()

FeatureIssue

public FeatureIssue(Priority priority,
                    java.lang.String description,
                    ILayer containingLayer,
                    Feature feature,
                    java.lang.String groupId)
Method Detail

setId

public void setId(java.lang.String id)
Description copied from interface: IIssue
Sets the id of the issue. This should only be called by the Issues list never by client code.

Specified by:
setId in interface IIssue
Overrides:
setId in class AbstractIssue

getEditorID

public java.lang.String getEditorID()
Description copied from class: AbstractIssue
returns null

Specified by:
getEditorID in interface IIssue
Overrides:
getEditorID in class AbstractIssue
Returns:
The id of the editor that will be opened to edit the Editor Input.

getEditorInput

public IEditorInput getEditorInput()
Description copied from class: AbstractIssue
Returns null;

Specified by:
getEditorInput in interface IIssue
Overrides:
getEditorInput in class AbstractIssue

getViewPartId

public java.lang.String getViewPartId()
Description copied from interface: IIssue
Returns the id of the ViewPart that the issue requires in order to be resolved. This is called by the issues view. If a non-null value is returned, the IssuesView will show the ViewPart identified by the id. Otherwise nothing is done.

Specified by:
getViewPartId in interface IIssue
Overrides:
getViewPartId in class AbstractIssue
Returns:
The id of the ViewPart the issue concerns.

getProblemObject

public java.lang.String getProblemObject()
Description copied from interface: IIssue
Returns A one or two word name for the object that has the issue. This should be translateable and understandable by a human.


fixIssue

public void fixIssue(IViewPart part,
                     IEditorPart editor)
Description copied from interface: IIssue
This is called when the user wishes to fix the issue. It will be called after the WorkbenchPath has been shown and set with the memento if it is a view.

This method can do other initializations and return or it can run the user through a workflow and only return when the problem is fixed or the user cancels the operation.

This method does NOT have to fix the issue

This method IS run in the display thread.

Parameters:
part - The workbenchpart identified by IIssue.getViewPartId() or null.
editor - The editor that was identified by IIssue.getEditorID() or null.
See Also:
FeatureIssue

getExtensionID

public java.lang.String getExtensionID()
Description copied from interface: IIssue
Returns the id of the extension definition for this type of Issue. This is required so the framework can load the correct issue class during issue loading. If the class is can not be loaded then a Placeholder issue will be created instead which will notify the user that a plugin is required to manage the issue.

The extension id is formed by the namespace of the plugin combined with the name of the extension element.

For example: The FeatureIssue's extension id would be: net.refractions.udig.issues.featureIssue because the issue implementation is in the Issues plugin (which the id net.refractions.udig.issues) and the extension name is featureIssue. The two are combined to form the id of the extension


init

public void init(IMemento memento,
                 IMemento viewMemento,
                 java.lang.String issueId,
                 java.lang.String groupId,
                 ReferencedEnvelope bounds)
Description copied from interface: IIssue
Called by framework to initialize the Issue.

Parameters:
memento - The saved state of a Issue. May be null.
viewMemento - the memento for initializing the view, may be null
issueId - the id the issue is assigned. IIssue.getId() must return the same id.
groupId - the group id of the issue.
bounds - the bounds of the issue.

save

public void save(IMemento memento)
Description copied from interface: IIssue
Populates the memento with data specialized for the issues type. Most data (see below) is saved by the framework. Only data, such as properties, or other data required for executing IIssue.fixIssue(IViewPart, IEditorPart) needs to be saved in the memento.

State that is saved by the framework and is not required to be saved in this memento include:

Parameters:
memento - the memento to populate with state data.

setTesting

public static void setTesting(boolean b)
ONLY USE THIS FOR TESTING!!!!!!!