org.eclipse.xtext.xbase.ui.editor
Class StacktraceBasedEditorDecider

java.lang.Object
  extended by org.eclipse.xtext.xbase.ui.editor.StacktraceBasedEditorDecider

public class StacktraceBasedEditorDecider
extends java.lang.Object

Inspects the caller stack to decide whether it is ok to use an Xbase editor to edit a java file or whether the user really expects the Java editor, e.g. by selecting a generated Java file explicitly in the package explorer.

Since:
2.3
Author:
Sebastian Zarnekow - Initial contribution and API
This class is not intended to be subclassed by clients.
This class is not intended to be subclassed by clients.
This class is not intended to be instantiated by clients.
This class is not intended to be instantiated by clients.

Nested Class Summary
static class StacktraceBasedEditorDecider.Decision
           
 
Constructor Summary
StacktraceBasedEditorDecider()
           
 
Method Summary
 StacktraceBasedEditorDecider.Decision decideAccordingToCaller()
           
 boolean isCalledFromFindReferences()
           
 boolean isEditorUtilityIsOpenInEditor()
           
protected  boolean isEditorUtilityIsOpenInEditor(java.lang.StackTraceElement element)
           
protected  boolean isFileSearch(java.lang.StackTraceElement element)
           
protected  boolean isFindReferences(java.lang.StackTraceElement element)
           
protected  boolean isLineBasedOpenEditorAction()
           
protected  boolean isNavigationHistory(java.lang.StackTraceElement element)
           
 boolean isOpenEditorAction()
           
protected  boolean isOpenEditorAction(java.lang.StackTraceElement element)
           
protected  boolean isOpenResource(java.lang.StackTraceElement element)
           
protected  boolean isPackageExplorerOrNavigator(java.lang.StackTraceElement element)
           
protected  boolean isSourceLookup(java.lang.StackTraceElement element)
          Happens when one select a stack element in the debugger.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StacktraceBasedEditorDecider

public StacktraceBasedEditorDecider()
Method Detail

decideAccordingToCaller

public StacktraceBasedEditorDecider.Decision decideAccordingToCaller()
This method is not intended to be referenced by clients.
This method is not intended to be referenced by clients.
This method is not intended to be extended (re-implement with a call to the overridden parent) or re-implemented (with no call to the overridden parent) by clients.
This method is not intended to be re-implemented or extended by clients.

isNavigationHistory

protected boolean isNavigationHistory(java.lang.StackTraceElement element)

isLineBasedOpenEditorAction

protected boolean isLineBasedOpenEditorAction()

isSourceLookup

protected boolean isSourceLookup(java.lang.StackTraceElement element)
Happens when one select a stack element in the debugger. Since wie use JSR-45 we don't want to modify JDT's behavior.

This method is not intended to be extended (re-implement with a call to the overridden parent) or re-implemented (with no call to the overridden parent) by clients.
This method is not intended to be re-implemented or extended by clients.

isCalledFromFindReferences

public boolean isCalledFromFindReferences()
This method is not intended to be referenced by clients.
This method is not intended to be referenced by clients.
This method is not intended to be extended (re-implement with a call to the overridden parent) or re-implemented (with no call to the overridden parent) by clients.
This method is not intended to be re-implemented or extended by clients.

isEditorUtilityIsOpenInEditor

public boolean isEditorUtilityIsOpenInEditor()

isEditorUtilityIsOpenInEditor

protected boolean isEditorUtilityIsOpenInEditor(java.lang.StackTraceElement element)
This method is not intended to be referenced by clients.
This method is not intended to be referenced by clients.
This method is not intended to be extended (re-implement with a call to the overridden parent) or re-implemented (with no call to the overridden parent) by clients.
This method is not intended to be re-implemented or extended by clients.

isOpenEditorAction

public boolean isOpenEditorAction()

isOpenEditorAction

protected boolean isOpenEditorAction(java.lang.StackTraceElement element)
This method is not intended to be referenced by clients.
This method is not intended to be referenced by clients.
This method is not intended to be extended (re-implement with a call to the overridden parent) or re-implemented (with no call to the overridden parent) by clients.
This method is not intended to be re-implemented or extended by clients.

isFindReferences

protected boolean isFindReferences(java.lang.StackTraceElement element)
This method is not intended to be referenced by clients.
This method is not intended to be referenced by clients.
This method is not intended to be extended (re-implement with a call to the overridden parent) or re-implemented (with no call to the overridden parent) by clients.
This method is not intended to be re-implemented or extended by clients.

isPackageExplorerOrNavigator

protected boolean isPackageExplorerOrNavigator(java.lang.StackTraceElement element)
This method is not intended to be referenced by clients.
This method is not intended to be referenced by clients.
This method is not intended to be extended (re-implement with a call to the overridden parent) or re-implemented (with no call to the overridden parent) by clients.
This method is not intended to be re-implemented or extended by clients.

isOpenResource

protected boolean isOpenResource(java.lang.StackTraceElement element)
This method is not intended to be referenced by clients.
This method is not intended to be referenced by clients.
This method is not intended to be extended (re-implement with a call to the overridden parent) or re-implemented (with no call to the overridden parent) by clients.
This method is not intended to be re-implemented or extended by clients.

isFileSearch

protected boolean isFileSearch(java.lang.StackTraceElement element)
This method is not intended to be referenced by clients.
This method is not intended to be referenced by clients.
This method is not intended to be extended (re-implement with a call to the overridden parent) or re-implemented (with no call to the overridden parent) by clients.
This method is not intended to be re-implemented or extended by clients.