|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.cmu.sei.osate.ui.UiUtil
public final class UiUtil
Field Summary | |
---|---|
static int |
NO_DIAGRAM_FILE
|
static int |
SILENT_FAILURE
|
static int |
SUCCESS
|
static int |
SYNTAX_ERROR
|
Constructor Summary | |
---|---|
UiUtil()
|
Method Summary | |
---|---|
static void |
executeCommand(AObject obj,
org.eclipse.emf.common.command.Command command)
Execute the given command using the editing domain for the given model object. |
static org.eclipse.emf.edit.provider.ComposedAdapterFactory |
getAdapterFactory()
Returns an adapter factory that can be used to create content providers, label providers, editing domains, etc. |
static org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider |
getAObjectContentProvider()
Returns a content provider similar to the one used by the aadl object editor. |
static org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider |
getAObjectLabelProvider()
Returns a label provider similar to the one used by the aadl object editor. |
static int |
gotoAaxldiModel(org.eclipse.ui.IWorkbenchPage page,
AObject target)
goto aaxldi model in editor associated with diagram files. |
static int |
gotoAaxldiModel(org.eclipse.ui.IWorkbenchPage page,
AObject root,
int linenumber)
goto aaxldi model in editor associated with diagram files. |
static void |
gotoAaxlModel(org.eclipse.ui.IWorkbenchPage page,
AObject target)
goto aaxl model through the editor associated with aaxl files. |
static void |
gotoAaxlModel(org.eclipse.ui.IWorkbenchPage page,
AObject root,
int linenumber)
goto aaxl model through the editor associated with aaxl files. assumes that the text file has been saved and compiled. |
static void |
gotoSourceText(org.eclipse.ui.IWorkbenchPage page,
AObject obj)
go to the source text location corresponding to the location of the specified AObject The method will ensure that the source text is up to date with the model file |
static void |
openEditorAndExecute(AObject obj,
org.eclipse.emf.common.command.Command command)
Open an object editor for the given model object and executes the given command in the associated editing domain. |
static org.eclipse.emf.edit.domain.EditingDomain |
openEditorFor(AObject obj)
Open an object editor for the given model object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int SUCCESS
public static final int SILENT_FAILURE
public static final int NO_DIAGRAM_FILE
public static final int SYNTAX_ERROR
Constructor Detail |
---|
public UiUtil()
Method Detail |
---|
public static void gotoAaxlModel(org.eclipse.ui.IWorkbenchPage page, AObject root, int linenumber)
page
- Workbench pageroot
- Root AObject of model to go tolinenumber
- line number in text whose locationin the object should be the
targetpublic static void gotoAaxlModel(org.eclipse.ui.IWorkbenchPage page, AObject target)
page
- Workbench pagetarget
- AObject that is the target objectpublic static int gotoAaxldiModel(org.eclipse.ui.IWorkbenchPage page, AObject root, int linenumber)
page
- Workbench pageroot
- Root AObject of model to go tolinenumber
- line number in text whose locationin the object should be the targetpublic static int gotoAaxldiModel(org.eclipse.ui.IWorkbenchPage page, AObject target)
page
- Workbench pagetarget
- AObject that is the target objectpublic static void gotoSourceText(org.eclipse.ui.IWorkbenchPage page, AObject obj)
public static final org.eclipse.emf.edit.domain.EditingDomain openEditorFor(AObject obj)
obj
- The object to open the editor for. The editor is opened on the
resource that contains the object.
null
if the editor was not able to be opened.public static final void executeCommand(AObject obj, org.eclipse.emf.common.command.Command command)
editingDomain.getCommandStack().execute(command)
directly
because it makes sure that the appropriate resource is locked in the
eclipse workspace. The command is not executed if the Eclipse IResource
for the given object cannot be found, or if the editing domain is not
found. In either of these cases a error message is written to the Eclipse
log.
obj
- The AADL model object from which the editing domain is
derived.command
- The editor command to execute.public static final void openEditorAndExecute(AObject obj, org.eclipse.emf.common.command.Command command)
obj
- The object to open the editor for. The editor is opened on the
resource that contains the object.command
- The editor command to execute.public static final org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider getAObjectLabelProvider()
org.eclipse.jface.viewers.Viewer
to display the same text labels and icons as the object editor.
public static final org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider getAObjectContentProvider()
org.eclipse.jface.viewers.TreeViewer
to display the same contents as the object editor.
public static final org.eclipse.emf.edit.provider.ComposedAdapterFactory getAdapterFactory()
ResourceItemProviderAdapterFactory
, a ComponentItemProviderAdapterFactory
,
a FeatureItemProviderAdapterFactory
, a CoreItemProviderAdapterFactory
,
an InstanceItemProviderAdapterFactory
, a PropertyItemProviderAdapterFactory
,
a FlowItemProviderAdapterFactory
, a ConnectionItemProviderAdapterFactory
,
and a ReflectiveItemProviderAdapterFactory
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |