public class EmbeddedXtextEditor
extends java.lang.Object
| Constructor and Description |
|---|
EmbeddedXtextEditor(org.eclipse.swt.widgets.Composite control,
com.google.inject.Injector injector)
Creates a new EmbeddedXtextEditor.
|
EmbeddedXtextEditor(org.eclipse.swt.widgets.Composite control,
com.google.inject.Injector injector,
int style)
Creates a new EmbeddedXtextEditor.
|
| Modifier and Type | Method and Description |
|---|---|
protected org.eclipse.jface.text.source.IVerticalRulerColumn |
createAnnotationRulerColumn(org.eclipse.jface.text.source.CompositeRuler ruler)
Creates the annotation ruler column.
|
protected EmbeddedXtextResource |
createResource() |
org.eclipse.swt.widgets.Composite |
getControl() |
org.eclipse.xtext.ui.editor.model.IXtextDocument |
getDocument() |
org.eclipse.xtext.resource.XtextResource |
getResource() |
org.eclipse.emf.ecore.resource.ResourceSet |
getResourceSet() |
org.eclipse.xtext.ui.editor.XtextSourceViewer |
getViewer() |
protected void |
setText(org.eclipse.xtext.ui.editor.model.XtextDocument document,
java.lang.String text)
Should be called only once, during initialization.
|
void |
update(java.lang.String text)
Updates the text of this editor with the given String
|
protected void |
updateAction(org.eclipse.jface.action.IAction action) |
public EmbeddedXtextEditor(org.eclipse.swt.widgets.Composite control,
com.google.inject.Injector injector,
int style)
control - the parent composite that will contain the editorinjector - the Guice injector to get Xtext configuration elementsjob - the synchronization job that will be scheduled/rescheduled at each
modification of the editor text. It may be use to reconcile the content of
the editor with something else.style - the SWT style of the SourceViewer of this editor.fileExtension - the file extension (without the DOT) of the textual DSL to editpublic EmbeddedXtextEditor(org.eclipse.swt.widgets.Composite control,
com.google.inject.Injector injector)
control - the parent composite that will contain the editorinjector - the Guice injector to get Xtext configuration elementsjob - the synchronization job that will be scheduled/rescheduled at each
modification of the editor text. It may be use to reconcile the content of
the editor with something else.fileExtension - the file extension (without the DOT) of the textual DSL to editfileExtension - public org.eclipse.swt.widgets.Composite getControl()
public org.eclipse.xtext.ui.editor.XtextSourceViewer getViewer()
public org.eclipse.xtext.resource.XtextResource getResource()
public org.eclipse.xtext.ui.editor.model.IXtextDocument getDocument()
protected void setText(org.eclipse.xtext.ui.editor.model.XtextDocument document,
java.lang.String text)
#updateText(String, String, String);document - prefix - text - suffix - protected org.eclipse.jface.text.source.IVerticalRulerColumn createAnnotationRulerColumn(org.eclipse.jface.text.source.CompositeRuler ruler)
ruler - the composite ruler that the column will be addedpublic void update(java.lang.String text)
text - protected void updateAction(org.eclipse.jface.action.IAction action)
protected EmbeddedXtextResource createResource()
public org.eclipse.emf.ecore.resource.ResourceSet getResourceSet()