org.eclipse.xtext.ui.refactoring.ui
Class RenameLinkedMode.FocusEditingSupport

java.lang.Object
  extended by org.eclipse.xtext.ui.refactoring.ui.RenameLinkedMode.FocusEditingSupport
All Implemented Interfaces:
org.eclipse.jface.text.IEditingSupport
Enclosing class:
RenameLinkedMode

protected class RenameLinkedMode.FocusEditingSupport
extends java.lang.Object
implements org.eclipse.jface.text.IEditingSupport


Constructor Summary
protected RenameLinkedMode.FocusEditingSupport()
           
 
Method Summary
 boolean isOriginator(org.eclipse.jface.text.DocumentEvent event, org.eclipse.jface.text.IRegion subjectRegion)
          Returns true if the receiver is the originator of a DocumentEvent and if that event is related to subjectRegion.
 boolean ownsFocusShell()
          Returns true if the receiver is showing a shell which has focus, false if it does not have focus or the helper has no shell.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RenameLinkedMode.FocusEditingSupport

protected RenameLinkedMode.FocusEditingSupport()
Method Detail

ownsFocusShell

public boolean ownsFocusShell()
Description copied from interface: org.eclipse.jface.text.IEditingSupport
Returns true if the receiver is showing a shell which has focus, false if it does not have focus or the helper has no shell.

Specified by:
ownsFocusShell in interface org.eclipse.jface.text.IEditingSupport
Returns:
true if the support's shell has focus, false otherwise

isOriginator

public boolean isOriginator(org.eclipse.jface.text.DocumentEvent event,
                            org.eclipse.jface.text.IRegion subjectRegion)
Description copied from interface: org.eclipse.jface.text.IEditingSupport
Returns true if the receiver is the originator of a DocumentEvent and if that event is related to subjectRegion.

The relationship between event and subjectRegion is not always obvious. Often, the main editing area being monitored by the caller will be at subjectRegion, when the receiver modifies the underlying document at a different location without wanting to interrupt the normal typing flow of the user.

An example would be an editor that automatically increments the section number of the next section when the user typed in a new section title. In this example, the subject region is the current typing location, while the increment results in a document change further down in the text.

Specified by:
isOriginator in interface org.eclipse.jface.text.IEditingSupport
Parameters:
event - the DocumentEvent in question
subjectRegion - the region that the caller is interested in
Returns:
true if event was triggered by the receiver and relates to subjectRegion