public class XtextStyledTextCellEditor extends StyledTextCellEditor
CellEditor and can be
used e.g. in jFace StructuredViewers or in GMF EditParts via
DirectEditManager.
The current implementation supports, code completion, syntax highlighting and
validationXtextStyledTextProviderCellEditor.LayoutDatatextCOPY, CUT, DELETE, FIND, PASTE, REDO, SELECT_ALL, UNDO| Constructor and Description |
|---|
XtextStyledTextCellEditor(int style,
com.google.inject.Injector injector) |
XtextStyledTextCellEditor(int style,
com.google.inject.Injector injector,
IXtextFakeContextResourcesProvider contextFakeResourceProvider) |
| Modifier and Type | Method and Description |
|---|---|
protected CompletionProposalAdapter |
createCompletionProposalAdapter(StyledText styledText,
IContentAssistant contentAssistant) |
protected Control |
createControl(Composite parent)
Creates an
SourceViewer and returns the StyledText widget
of the viewer as the cell editors control. |
protected MenuManager |
createMenuManager() |
protected StyledTextXtextAdapter |
createXtextAdapter() |
protected boolean |
dependsOnExternalFocusListener()
This implementation of
CellEditor.dependsOnExternalFocusListener() returns false if the
current instance's class is TextCellEditor, and true otherwise. |
void |
dispose() |
protected void |
doSetValue(java.lang.Object value)
The
TextCellEditor implementation of this
CellEditor framework method accepts a text string (type
String). |
protected void |
focusLost() |
protected CompletionProposalAdapter |
getCompletionProposalAdapter() |
protected IXtextFakeContextResourcesProvider |
getContextFakeResourceProvider() |
protected com.google.inject.Injector |
getInjector() |
StyledTextXtextAdapter |
getXtextAdapter() |
protected void |
initContextMenu(Control control) |
boolean |
isFindEnabled() |
protected boolean |
isIgnoreNextFocusLost() |
boolean |
isRedoEnabled() |
boolean |
isUndoEnabled() |
protected void |
keyReleaseOccured(KeyEvent keyEvent)
Processes a key release event that occurred in this cell editor.
|
void |
performRedo() |
void |
performUndo() |
protected void |
setIgnoreNextFocusLost(boolean ignoreNextFocusLost) |
void |
setVisibleRegion(int start,
int length) |
createStyledText, doGetValue, doSetFocus, editOccured, getLayoutData, getVerifyKeyListener, handleDefaultSelection, isCopyEnabled, isCutEnabled, isDeleteEnabled, isPasteEnabled, isSaveAllEnabled, isSelectAllEnabled, performCopy, performCut, performDelete, performPaste, performSelectAllactivate, activate, addListener, addPropertyChangeListener, create, deactivate, 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, valueChangedpublic XtextStyledTextCellEditor(int style,
com.google.inject.Injector injector,
IXtextFakeContextResourcesProvider contextFakeResourceProvider)
public XtextStyledTextCellEditor(int style,
com.google.inject.Injector injector)
protected Control createControl(Composite parent)
SourceViewer and returns the StyledText widget
of the viewer as the cell editors control. Some code is copied from
XtextEditor.createControl in class StyledTextCellEditorprotected void initContextMenu(Control control)
protected MenuManager createMenuManager()
protected void keyReleaseOccured(KeyEvent keyEvent)
StyledTextCellEditor
The TextCellEditor implementation of this framework method
ignores when the RETURN key is pressed since this is handled in
handleDefaultSelection. An exception is made for Ctrl+Enter
for multi-line texts, since a default selection event is not sent in this
case.
keyReleaseOccured in class StyledTextCellEditorkeyEvent - the key eventprotected void doSetValue(java.lang.Object value)
StyledTextCellEditorTextCellEditor implementation of this
CellEditor framework method accepts a text string (type
String).doSetValue in class StyledTextCellEditorvalue - a text string (type String)public boolean isUndoEnabled()
isUndoEnabled in class CellEditorpublic void performUndo()
performUndo in class CellEditorpublic boolean isRedoEnabled()
isRedoEnabled in class CellEditorpublic void performRedo()
performRedo in class CellEditorpublic boolean isFindEnabled()
isFindEnabled in class CellEditorprotected void focusLost()
focusLost in class CellEditorpublic void dispose()
dispose in class CellEditorprotected boolean dependsOnExternalFocusListener()
StyledTextCellEditorCellEditor.dependsOnExternalFocusListener() returns false if the
current instance's class is TextCellEditor, and true otherwise.
Subclasses that hook their own focus listener should override this method
and return false. See also bug 58777.dependsOnExternalFocusListener in class StyledTextCellEditorpublic void setVisibleRegion(int start,
int length)
public StyledTextXtextAdapter getXtextAdapter()
protected CompletionProposalAdapter getCompletionProposalAdapter()
protected IXtextFakeContextResourcesProvider getContextFakeResourceProvider()
protected CompletionProposalAdapter createCompletionProposalAdapter(StyledText styledText, IContentAssistant contentAssistant)
protected StyledTextXtextAdapter createXtextAdapter()
protected boolean isIgnoreNextFocusLost()
protected void setIgnoreNextFocusLost(boolean ignoreNextFocusLost)
protected com.google.inject.Injector getInjector()