de.cau.cs.kieler.synccharts.synchronizer.kitsView
Class EmbeddedXtextEditor

java.lang.Object
  extended by de.cau.cs.kieler.synccharts.synchronizer.kitsView.EmbeddedXtextEditor

public class EmbeddedXtextEditor
extends Object

Rating red

Constructor Summary
EmbeddedXtextEditor(Composite control, com.google.inject.Injector injector)
          Creates a new EmbeddedXtextEditor.
EmbeddedXtextEditor(Composite control, com.google.inject.Injector injector, int style)
          Creates a new EmbeddedXtextEditor.
 
Method Summary
 void bringOnTop()
           
protected  IVerticalRulerColumn createAnnotationRulerColumn(CompositeRuler ruler)
          Creates the annotation ruler column.
 org.eclipse.xtext.resource.XtextResource createResource()
           
 void dispose()
           
 Composite getControl()
           
 org.eclipse.xtext.ui.editor.model.IXtextDocument getDocument()
           
 org.eclipse.xtext.resource.XtextResource getResource()
           
 org.eclipse.xtext.ui.editor.XtextSourceViewer getViewer()
           
protected  void setText(org.eclipse.xtext.ui.editor.model.XtextDocument document, String editablePart)
          Should be called only once, during initialization.
 void update(EObject eObject, String asString)
          Updates the text of this editor with the given String or the serialized form of the EObject if the semantic model of the String does not contain any error and is different from the given EObject.
 void update(String model)
          Updates the text of this editor with the given String
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmbeddedXtextEditor

public EmbeddedXtextEditor(Composite control,
                           com.google.inject.Injector injector,
                           int style)
Creates a new EmbeddedXtextEditor.

Parameters:
control - the parent composite that will contain the editor
injector - the Guice injector to get Xtext configuration elements
job - 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 edit

EmbeddedXtextEditor

public EmbeddedXtextEditor(Composite control,
                           com.google.inject.Injector injector)
Creates a new EmbeddedXtextEditor. Equivalent to EmbeddedXtextEditor(control, injector, job, fileExtension, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);

Parameters:
control - the parent composite that will contain the editor
injector - the Guice injector to get Xtext configuration elements
job - 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 edit
fileExtension -
Method Detail

getControl

public Composite getControl()

getViewer

public org.eclipse.xtext.ui.editor.XtextSourceViewer getViewer()

getResource

public org.eclipse.xtext.resource.XtextResource getResource()

getDocument

public org.eclipse.xtext.ui.editor.model.IXtextDocument getDocument()

setText

protected void setText(org.eclipse.xtext.ui.editor.model.XtextDocument document,
                       String editablePart)
Should be called only once, during initialization. Then, you should call #updateText(String, String, String);

Parameters:
document -
prefix -
editablePart -
suffix -

createAnnotationRulerColumn

protected IVerticalRulerColumn createAnnotationRulerColumn(CompositeRuler ruler)
Creates the annotation ruler column. Subclasses may re-implement or extend.

Parameters:
ruler - the composite ruler that the column will be added
Returns:
an annotation ruler column
Since:
3.2

update

public void update(String model)
Updates the text of this editor with the given String

Parameters:
model -

update

public void update(EObject eObject,
                   String asString)
Updates the text of this editor with the given String or the serialized form of the EObject if the semantic model of the String does not contain any error and is different from the given EObject.

Parameters:
eObject -
asString -

createResource

public org.eclipse.xtext.resource.XtextResource createResource()

dispose

public void dispose()

bringOnTop

public void bringOnTop()