org.eclipse.etrice.ui.behavior.support
Class SupportUtil
java.lang.Object
org.eclipse.etrice.ui.behavior.support.SupportUtil
public class SupportUtil
- extends java.lang.Object
- Author:
- Henrik Rentz-Reichert - Initial contribution and API
|
Method Summary |
static ContainerShape |
addStateGraph(StateGraphContext ctx,
Diagram diagram,
IFeatureProvider fp)
|
static boolean |
canConnect(Anchor asrc,
Anchor atgt,
ContainerShape cs,
IFeatureProvider fp)
|
static boolean |
canConnect(Anchor asrc,
Anchor atgt,
Transition trans,
ContainerShape cs,
IFeatureProvider fp)
|
static void |
deleteSubStructureRecursive(State s,
ActorClass ac,
Diagram diagram,
IFeatureProvider fp)
|
static ActorClass |
getActorClass(Diagram diag)
|
static java.util.List<ChoicePoint> |
getChoicePoints(ContainerShape shape,
IFeatureProvider fp)
|
static Diagram |
getDiagram(GraphicsAlgorithm ga)
|
static Diagram |
getDiagram(PictogramElement pe)
|
static EObject |
getOwnObject(EObject obj,
ResourceSet rs)
|
static StateGraph |
getRefinedStateSubGraph(State s,
ActorClass ac)
|
static StateGraph |
getStateGraph(ContainerShape cs,
IFeatureProvider fp)
|
static ContainerShape |
getStateGraphContainer(ContainerShape shape)
This method exploits the fact that the immediate children of the diagram are
associated with the state graphs. |
static java.util.List<State> |
getStates(ContainerShape shape,
IFeatureProvider fp)
|
static State |
getTargettingState(State state,
Diagram diagram)
|
static java.util.List<Transition> |
getTransitions(Diagram diagram,
IFeatureProvider fp)
|
static TransitionTerminal |
getTransitionTerminal(Anchor anchor,
IFeatureProvider fp)
|
static java.util.List<TrPoint> |
getTrPoints(StateGraph sg,
ContainerShape shape,
IFeatureProvider fp)
|
static StateGraph |
insertRefinedState(StateGraph sg,
ActorClass ac,
ContainerShape targetContainer,
IFeatureProvider fp)
|
static boolean |
isInherited(Diagram diag,
EObject obj)
|
static boolean |
isInherited(StateGraphItem item,
ContainerShape cs)
|
static boolean |
isInitialPoint(Anchor anchor,
IFeatureProvider fp)
|
static void |
undoInsertRefinedState(StateGraph sg,
ActorClass ac,
ContainerShape targetContainer,
IFeatureProvider fp)
|
static void |
updateStateGraph(StateGraph sg,
StateGraphContext ctx,
ContainerShape sgShape,
IFeatureProvider fp)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SupportUtil
public SupportUtil()
getOwnObject
public static EObject getOwnObject(EObject obj,
ResourceSet rs)
isInherited
public static boolean isInherited(StateGraphItem item,
ContainerShape cs)
isInherited
public static boolean isInherited(Diagram diag,
EObject obj)
getDiagram
public static Diagram getDiagram(GraphicsAlgorithm ga)
getDiagram
public static Diagram getDiagram(PictogramElement pe)
- Parameters:
pictogramElement -
- Returns:
getActorClass
public static ActorClass getActorClass(Diagram diag)
insertRefinedState
public static StateGraph insertRefinedState(StateGraph sg,
ActorClass ac,
ContainerShape targetContainer,
IFeatureProvider fp)
- Parameters:
sg - ac - targetContainer - fp -
- Returns:
undoInsertRefinedState
public static void undoInsertRefinedState(StateGraph sg,
ActorClass ac,
ContainerShape targetContainer,
IFeatureProvider fp)
- Parameters:
sg - ac - targetContainer -
getRefinedStateSubGraph
public static StateGraph getRefinedStateSubGraph(State s,
ActorClass ac)
- Parameters:
s - ac -
- Returns:
getTargettingState
public static State getTargettingState(State state,
Diagram diagram)
- Parameters:
state - diagram -
- Returns:
getStateGraphContainer
public static ContainerShape getStateGraphContainer(ContainerShape shape)
- This method exploits the fact that the immediate children of the diagram are
associated with the state graphs.
- Parameters:
shape -
- Returns:
- the container shape that is associated with the state graph of the diagram
getStateGraph
public static StateGraph getStateGraph(ContainerShape cs,
IFeatureProvider fp)
getTransitionTerminal
public static TransitionTerminal getTransitionTerminal(Anchor anchor,
IFeatureProvider fp)
isInitialPoint
public static boolean isInitialPoint(Anchor anchor,
IFeatureProvider fp)
canConnect
public static boolean canConnect(Anchor asrc,
Anchor atgt,
ContainerShape cs,
IFeatureProvider fp)
canConnect
public static boolean canConnect(Anchor asrc,
Anchor atgt,
Transition trans,
ContainerShape cs,
IFeatureProvider fp)
deleteSubStructureRecursive
public static void deleteSubStructureRecursive(State s,
ActorClass ac,
Diagram diagram,
IFeatureProvider fp)
- Parameters:
s - the state whose sub structure should be deletedac - the ActorClassdiagram - the current diagramfp - the feature provider
getStates
public static java.util.List<State> getStates(ContainerShape shape,
IFeatureProvider fp)
getChoicePoints
public static java.util.List<ChoicePoint> getChoicePoints(ContainerShape shape,
IFeatureProvider fp)
getTrPoints
public static java.util.List<TrPoint> getTrPoints(StateGraph sg,
ContainerShape shape,
IFeatureProvider fp)
getTransitions
public static java.util.List<Transition> getTransitions(Diagram diagram,
IFeatureProvider fp)
- Parameters:
diagram - fp -
- Returns:
addStateGraph
public static ContainerShape addStateGraph(StateGraphContext ctx,
Diagram diagram,
IFeatureProvider fp)
updateStateGraph
public static void updateStateGraph(StateGraph sg,
StateGraphContext ctx,
ContainerShape sgShape,
IFeatureProvider fp)