public class EditorUtils extends java.lang.Object implements EditorEmbedderFactory.IEditorCreator, ModelEditorConfigurer.IModelEditorConfigurer
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
EXTENSION |
| Constructor and Description |
|---|
EditorUtils()
Creates an instance (public constructor required by OSGI-DS).
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
activate(org.osgi.service.component.ComponentContext context)
Private method to activate plugin.
|
ModelEditorConfigurer.IHeader |
createHeader(org.eclipse.swt.widgets.Composite parent,
Configuration config,
java.io.File base,
ModelInfo<?> info)
Creates the actual header.
|
protected void |
deactivate(org.osgi.service.component.ComponentContext context)
Private method to to de-activate plugin.
|
IEmbeddedEditor |
embedEditor(java.net.URI resourceURI,
org.eclipse.swt.widgets.Composite composite)
Embeds an editor handling the given
resourceURI. |
static IEmbeddedEditor |
embedVtlEditor(java.net.URI file,
org.eclipse.swt.widgets.Composite parent)
Embeds an VTL editor for the given resource into the given
parent. |
java.lang.String |
getEditorTitle(boolean editable)
Returns the editor title.
|
java.lang.String |
getExtension()
Returns the file extension to configure fore.
|
AbstractModelChangeListener |
getModelChangeListener()
Returns the model change listener, e.g., to rebuild the related model on save.
|
int |
getOrdinal()
Returns an ordinal for sorting model configurers for displying them.
|
java.lang.String |
getPageTitle(boolean editable)
Returns the page title.
|
boolean |
hasHeader()
Returns whether the described editor shall have a header.
|
public EditorUtils()
public static IEmbeddedEditor embedVtlEditor(java.net.URI file, org.eclipse.swt.widgets.Composite parent)
parent.file - the file representing the resourceparent - the parent UI componentthe - editor viewerprotected void activate(org.osgi.service.component.ComponentContext context)
context - Context.protected void deactivate(org.osgi.service.component.ComponentContext context)
context - Context.public IEmbeddedEditor embedEditor(java.net.URI resourceURI, org.eclipse.swt.widgets.Composite composite)
EditorEmbedderFactory.IEditorCreatorresourceURI.embedEditor in interface EditorEmbedderFactory.IEditorCreatorresourceURI - the URI to be handledcomposite - the parent composite to embed the editor intopublic java.lang.String getEditorTitle(boolean editable)
ModelEditorConfigurer.IModelEditorConfigurergetEditorTitle in interface ModelEditorConfigurer.IModelEditorConfigurereditable - whether the editor is editablepublic java.lang.String getPageTitle(boolean editable)
ModelEditorConfigurer.IModelEditorConfigurergetPageTitle in interface ModelEditorConfigurer.IModelEditorConfigurereditable - whether the editor is editablepublic java.lang.String getExtension()
ModelEditorConfigurer.IModelEditorConfigurergetExtension in interface ModelEditorConfigurer.IModelEditorConfigurerpublic int getOrdinal()
ModelEditorConfigurer.IModelEditorConfigurergetOrdinal in interface ModelEditorConfigurer.IModelEditorConfigurerpublic boolean hasHeader()
ModelEditorConfigurer.IModelEditorConfigurerhasHeader in interface ModelEditorConfigurer.IModelEditorConfigurertrue if it shall have a header, false elsepublic ModelEditorConfigurer.IHeader createHeader(org.eclipse.swt.widgets.Composite parent, Configuration config, java.io.File base, ModelInfo<?> info)
ModelEditorConfigurer.IModelEditorConfigurercreateHeader in interface ModelEditorConfigurer.IModelEditorConfigurerparent - the parent compositeconfig - the recent product line configurationbase - the basic directory of the project we are working ininfo - the actual model being displayedpublic AbstractModelChangeListener getModelChangeListener()
ModelEditorConfigurer.IModelEditorConfigurergetModelChangeListener in interface ModelEditorConfigurer.IModelEditorConfigurerCopyright © 2009 - 2018 SSE. All Rights Reserved.