Rational Developer for Power Systems Software
V7.6

com.ibm.etools.systems.application.visual.editor.utils
Class SystemGraphicalEditorUtils

java.lang.Object
  extended by com.ibm.etools.systems.application.visual.editor.utils.SystemGraphicalEditorUtils

public class SystemGraphicalEditorUtils
extends Object

Utilities used by SystemGraphicalEditor.


Field Summary
static String copyright
           
 
Method Summary
static boolean checkForLargeModel(Shell shell, List<EditPart> operationSet)
           
static boolean checkPreReq()
          Detect whether the pre-req is met.
 AppModelEditorInput createAppModelInput(ApplicationModel appModel)
          Create AppModelEditorInput from given ApplicationModel instance.
 AppModelEditorInput createAppModelInput(ApplicationModel appModel, String title, String tooltip)
          Create AppModelEditorInput from given ApplicationModel instance, title and tooltip .
 void createDiagram(ApplicationModel appModel, Resource diagramResource)
          Add diagram to existing resource.
static MainEntryPoint findMainEntryPoint(SourceContainer container)
          Helper method for finding the main entry point of a source container
static SystemGraphicalEditor getEditor(EditPart editPart)
          Get editor from given editPart.
static IExtension[] getExtensions(String pluginID, String extensionPointID)
          Returns the list of extensions that extend the specified extension point of this plugin.
 Color getInComingHighLightColor()
          Get default incoming highlight color.
static SystemGraphicalEditorUtils getInstance()
          Get instance.
 Color getOutgoingHighLightColor()
          Get default outgoing highlight color.
static EObject getSemantic(EObject object)
          Get semantic model object from view.
static List getSourceArtifacts(List relationShips, Artifact artifact)
          Get artifacts that given artifact is the source of the relationship between them.
static List getSourceModelConnections(List relationShips, Artifact artifact)
          Get connections starting from given artifact.
static List getTargetArtifacts(List relationShips, Artifact artifact)
          Get artifacts that given artifact is the target artifact of the relationship between them.
static List getTargetModelConnections(List relationShips, Artifact artifact)
          Get connection targeting to given artifact.
 String getTemporaryDiagramFilePath()
          Return the temporary diagram file path in plugin metadata area.
 String getTemporaryDiagramModelFilePath()
          Return the temporary diagram model file path in plugin metadata area.
static void installSeparator(Composite parent, int verticalSpacing)
          Place separator on a composite
static void installSeparator(Composite parent, int verticalSpacing, int columns)
          Place separator on a composite
 void setInComingHighLightColor(Color inColor)
          Set default incoming highlight color.
 void setOutgoingHighLightColor(Color outColor)
          Set default outgoing highlight color.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values
Method Detail

getInstance

public static SystemGraphicalEditorUtils getInstance()
Get instance.


getInComingHighLightColor

public Color getInComingHighLightColor()
Get default incoming highlight color.


setInComingHighLightColor

public void setInComingHighLightColor(Color inColor)
Set default incoming highlight color.


getOutgoingHighLightColor

public Color getOutgoingHighLightColor()
Get default outgoing highlight color.


setOutgoingHighLightColor

public void setOutgoingHighLightColor(Color outColor)
Set default outgoing highlight color.


getTemporaryDiagramFilePath

public String getTemporaryDiagramFilePath()
Return the temporary diagram file path in plugin metadata area.


getTemporaryDiagramModelFilePath

public String getTemporaryDiagramModelFilePath()
Return the temporary diagram model file path in plugin metadata area.


getExtensions

public static IExtension[] getExtensions(String pluginID,
                                         String extensionPointID)
Returns the list of extensions that extend the specified extension point of this plugin.

Returns:
An array of matching extensions

getEditor

public static SystemGraphicalEditor getEditor(EditPart editPart)
Get editor from given editPart.

Parameters:
editPart -
Returns:
editPart associated SystemGraphicalEditor instance .

getSourceModelConnections

public static List getSourceModelConnections(List relationShips,
                                             Artifact artifact)
Get connections starting from given artifact.

Parameters:
relationShips -
artifact -
Returns:

getTargetModelConnections

public static List getTargetModelConnections(List relationShips,
                                             Artifact artifact)
Get connection targeting to given artifact.

Parameters:
relationShips -
artifact -
Returns:

findMainEntryPoint

public static MainEntryPoint findMainEntryPoint(SourceContainer container)
Helper method for finding the main entry point of a source container


getSourceArtifacts

public static List getSourceArtifacts(List relationShips,
                                      Artifact artifact)
Get artifacts that given artifact is the source of the relationship between them.


getTargetArtifacts

public static List getTargetArtifacts(List relationShips,
                                      Artifact artifact)
Get artifacts that given artifact is the target artifact of the relationship between them.


installSeparator

public static void installSeparator(Composite parent,
                                    int verticalSpacing)
Place separator on a composite

Parameters:
parent -
verticalSpacing -

installSeparator

public static void installSeparator(Composite parent,
                                    int verticalSpacing,
                                    int columns)
Place separator on a composite

Parameters:
parent -
verticalSpacing -

getSemantic

public static EObject getSemantic(EObject object)
Get semantic model object from view.


createAppModelInput

public AppModelEditorInput createAppModelInput(ApplicationModel appModel)
Create AppModelEditorInput from given ApplicationModel instance.

Parameters:
appModel -

createAppModelInput

public AppModelEditorInput createAppModelInput(ApplicationModel appModel,
                                               String title,
                                               String tooltip)
Create AppModelEditorInput from given ApplicationModel instance, title and tooltip .

Parameters:
appModel: - ApplicationModel
title: - title to be displayed in editor
tooltip: - title tooltip

createDiagram

public void createDiagram(ApplicationModel appModel,
                          Resource diagramResource)
Add diagram to existing resource.

Parameters:
appModel: - ApplicationModel
diagramResource: - resource to contain the diagram

checkPreReq

public static boolean checkPreReq()
Detect whether the pre-req is met.


checkForLargeModel

public static boolean checkForLargeModel(Shell shell,
                                         List<EditPart> operationSet)

Rational Developer for Power Systems Software
V7.6

Copyright 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.