Class XtextStyledTextCellEditorEx
- java.lang.Object
-
- org.eclipse.jface.viewers.CellEditor
-
- org.yakindu.base.utils.jface.viewers.StyledTextCellEditor
-
- org.yakindu.base.xtext.utils.jface.viewers.XtextStyledTextCellEditor
-
- org.yakindu.base.xtext.utils.gmf.viewers.XtextStyledTextCellEditorEx
-
public class XtextStyledTextCellEditorEx extends XtextStyledTextCellEditor
This is a copy of TextCellEditorEx, only the super class has been changed toXtextStyledTextCellEditor
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.jface.viewers.CellEditor
CellEditor.LayoutData
-
-
Field Summary
-
Fields inherited from class org.yakindu.base.utils.jface.viewers.StyledTextCellEditor
text
-
Fields inherited from class org.eclipse.jface.viewers.CellEditor
COPY, CUT, DELETE, FIND, PASTE, REDO, SELECT_ALL, UNDO
-
-
Constructor Summary
Constructors Constructor Description XtextStyledTextCellEditorEx(int style, com.google.inject.Injector injector)
XtextStyledTextCellEditorEx(int style, com.google.inject.Injector injector, IXtextFakeContextResourcesProvider contextResourcesProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deactivate()
protected void
doSetValue(Object value)
TheTextCellEditor
implementation of thisCellEditor
framework method accepts a text string (typeString
).boolean
hasValueChanged()
boolean
isDeactivationLocked()
Returns true if deactivation has been lockedvoid
setDeactivationLock(boolean deactivationLock)
Sets deactivation lock so that the cell editor does not perform deactivatevoid
setValueAndProcessEditOccured(Object value)
This will be used when an edit has occurred by a ModifyEvent has been been send.-
Methods inherited from class org.yakindu.base.xtext.utils.jface.viewers.XtextStyledTextCellEditor
createCompletionProposalAdapter, createControl, createMenuManager, createXtextAdapter, dependsOnExternalFocusListener, dispose, focusLost, getCompletionProposalAdapter, getContextFakeResourceProvider, getInjector, getXtextAdapter, initContextMenu, isFindEnabled, isIgnoreNextFocusLost, isRedoEnabled, isUndoEnabled, keyReleaseOccured, performRedo, performUndo, setIgnoreNextFocusLost, setVisibleRegion
-
Methods inherited from class org.yakindu.base.utils.jface.viewers.StyledTextCellEditor
createStyledText, doGetValue, doSetFocus, editOccured, getLayoutData, getVerifyKeyListener, handleDefaultSelection, isCopyEnabled, isCutEnabled, isDeleteEnabled, isPasteEnabled, isSaveAllEnabled, isSelectAllEnabled, performCopy, performCut, performDelete, performPaste, performSelectAll
-
Methods inherited from class org.eclipse.jface.viewers.CellEditor
activate, activate, addListener, addPropertyChangeListener, create, deactivate, fireApplyEditorValue, fireCancelEditor, fireEditorValueChanged, fireEnablementChanged, getControl, getDoubleClickTimeout, getErrorMessage, getStyle, getValidator, getValue, isActivated, isCorrect, isDirty, isValueValid, markDirty, performFind, removeListener, removePropertyChangeListener, setErrorMessage, setFocus, setStyle, setValidator, setValue, setValueValid, valueChanged
-
-
-
-
Constructor Detail
-
XtextStyledTextCellEditorEx
public XtextStyledTextCellEditorEx(int style, com.google.inject.Injector injector, IXtextFakeContextResourcesProvider contextResourcesProvider)
-
XtextStyledTextCellEditorEx
public XtextStyledTextCellEditorEx(int style, com.google.inject.Injector injector)
-
-
Method Detail
-
setValueAndProcessEditOccured
public void setValueAndProcessEditOccured(Object value)
This will be used when an edit has occurred by a ModifyEvent has been been send. Will call #setValue(Object) but will also call editOccured(null) to make sure that the dirty flag is set probably and that any listeners are informed about the changed.- Parameters:
value
- Value to set the cell editor to. Note: This happens address defect RATLC00522324. For our topgraphical edit parts we delegate the direct edit request to a primary edit part and set focus on that. The issue is that if the user has typed in an initial character when setting focus to the edit part, which typically is a TextCompartmentEditPart then setting that initial value does not fire the necessary change events that need to occur in order for that value to be recognized. If you don't use this method then the result is that if you just type in the initial character and that is it then the text compartment loses focus then the value will not be saved. This is because setting the value of the cell doesn't think its value has changed since the first character is not recognized as a change.
-
doSetValue
protected void doSetValue(Object value)
Description copied from class:StyledTextCellEditor
TheTextCellEditor
implementation of thisCellEditor
framework method accepts a text string (typeString
).- Overrides:
doSetValue
in classXtextStyledTextCellEditor
- Parameters:
value
- a text string (typeString
)
-
hasValueChanged
public boolean hasValueChanged()
- Returns:
- boolean value specifying whether or not the value has been changed
-
deactivate
public void deactivate()
- Overrides:
deactivate
in classCellEditor
-
isDeactivationLocked
public boolean isDeactivationLocked()
Returns true if deactivation has been locked- Returns:
-
setDeactivationLock
public void setDeactivationLock(boolean deactivationLock)
Sets deactivation lock so that the cell editor does not perform deactivate- Parameters:
deactivationLock
-
-
-