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 org.eclipse.xtext.resource.XtextResource |
createResource() |
void |
dispose() |
org.eclipse.swt.widgets.Composite |
getControl() |
org.eclipse.xtext.ui.editor.model.IXtextDocument |
getDocument() |
EnvironmentFactory |
getEnvironmentFactory() |
OCL |
getOCL() |
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 elementsstyle
- the SWT style of the SourceViewer
of this editor.public 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 elementspublic 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)
update(String)
;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 org.eclipse.xtext.resource.XtextResource createResource()
public void dispose()
public org.eclipse.emf.ecore.resource.ResourceSet getResourceSet()
@NonNull public EnvironmentFactory getEnvironmentFactory()