org.eclipse.xtext.ui.editor.quickfix
Class MarkerResolutionGenerator

java.lang.Object
  extended by org.eclipse.xtext.ui.editor.quickfix.AbstractIssueResolutionProviderAdapter
      extended by org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator
All Implemented Interfaces:
org.eclipse.ui.IMarkerResolutionGenerator, org.eclipse.ui.IMarkerResolutionGenerator2

public class MarkerResolutionGenerator
extends AbstractIssueResolutionProviderAdapter
implements org.eclipse.ui.IMarkerResolutionGenerator2

Author:
Heiko Behrens - Initial contribution and API

Nested Class Summary
 class MarkerResolutionGenerator.ResolutionAdapter
           
 
Field Summary
 
Fields inherited from class org.eclipse.xtext.ui.editor.quickfix.AbstractIssueResolutionProviderAdapter
DEFAULT_IMAGE
 
Constructor Summary
MarkerResolutionGenerator()
           
 
Method Summary
 XtextEditor findEditor(org.eclipse.core.resources.IResource resource)
           
protected  org.eclipse.ui.IMarkerResolution[] getAdaptedResolutions(java.util.List<IssueResolution> resolutions)
           
 XtextEditor getEditor(org.eclipse.core.resources.IResource resource)
           
 java.lang.String getEditorId()
           
 IssueUtil getIssueUtil()
           
 org.eclipse.ui.IMarkerResolution[] getResolutions(org.eclipse.core.resources.IMarker marker)
          Returns resolutions for the given marker (may be empty).
 IXtextDocument getXtextDocument(org.eclipse.core.resources.IResource resource)
           
 boolean hasResolutions(org.eclipse.core.resources.IMarker marker)
          Returns whether there are any resolutions for the given marker.
 boolean isMarkerStillValid(org.eclipse.core.resources.IMarker marker, org.eclipse.jface.text.source.IAnnotationModel annotationModel)
           
 void setEditorId(java.lang.String editorId)
           
 void setIssueUtil(IssueUtil issueUtil)
           
 
Methods inherited from class org.eclipse.xtext.ui.editor.quickfix.AbstractIssueResolutionProviderAdapter
getImage, getResolutionProvider, getResolutions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MarkerResolutionGenerator

public MarkerResolutionGenerator()
Method Detail

getIssueUtil

public IssueUtil getIssueUtil()

setIssueUtil

public void setIssueUtil(IssueUtil issueUtil)

setEditorId

public void setEditorId(java.lang.String editorId)

getEditorId

public java.lang.String getEditorId()

hasResolutions

public boolean hasResolutions(org.eclipse.core.resources.IMarker marker)
Description copied from interface: org.eclipse.ui.IMarkerResolutionGenerator2
Returns whether there are any resolutions for the given marker.

Specified by:
hasResolutions in interface org.eclipse.ui.IMarkerResolutionGenerator2
Parameters:
marker - the marker
Returns:
true if there are resolutions for the given marker, false if not

getResolutions

public org.eclipse.ui.IMarkerResolution[] getResolutions(org.eclipse.core.resources.IMarker marker)
Description copied from interface: org.eclipse.ui.IMarkerResolutionGenerator
Returns resolutions for the given marker (may be empty).

Specified by:
getResolutions in interface org.eclipse.ui.IMarkerResolutionGenerator
Parameters:
marker - the marker
Returns:
resolutions for the given marker

isMarkerStillValid

public boolean isMarkerStillValid(org.eclipse.core.resources.IMarker marker,
                                  org.eclipse.jface.text.source.IAnnotationModel annotationModel)

getXtextDocument

public IXtextDocument getXtextDocument(org.eclipse.core.resources.IResource resource)

getEditor

public XtextEditor getEditor(org.eclipse.core.resources.IResource resource)

findEditor

public XtextEditor findEditor(org.eclipse.core.resources.IResource resource)

getAdaptedResolutions

protected org.eclipse.ui.IMarkerResolution[] getAdaptedResolutions(java.util.List<IssueResolution> resolutions)