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
This is a copy of TextCellEditorEx, only the super class has been changed to
XtextStyledTextCellEditor-
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
textFields inherited from class org.eclipse.jface.viewers.CellEditor
COPY, CUT, DELETE, FIND, PASTE, REDO, SELECT_ALL, UNDO -
Constructor Summary
ConstructorsConstructorDescriptionXtextStyledTextCellEditorEx(int style, com.google.inject.Injector injector) XtextStyledTextCellEditorEx(int style, com.google.inject.Injector injector, IXtextFakeContextResourcesProvider contextResourcesProvider) -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected voiddoSetValue(Object value) TheTextCellEditorimplementation of thisCellEditorframework method accepts a text string (typeString).booleanbooleanReturns true if deactivation has been lockedvoidsetDeactivationLock(boolean deactivationLock) Sets deactivation lock so that the cell editor does not perform deactivatevoidThis 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, setVisibleRegionMethods 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, performSelectAllMethods 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 Details
-
XtextStyledTextCellEditorEx
public XtextStyledTextCellEditorEx(int style, com.google.inject.Injector injector, IXtextFakeContextResourcesProvider contextResourcesProvider) -
XtextStyledTextCellEditorEx
public XtextStyledTextCellEditorEx(int style, com.google.inject.Injector injector)
-
-
Method Details
-
setValueAndProcessEditOccured
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
Description copied from class:StyledTextCellEditorTheTextCellEditorimplementation of thisCellEditorframework method accepts a text string (typeString).- Overrides:
doSetValuein 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:
deactivatein 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-
-