UML Modeling Layer

com.ibm.xtools.uml.msl.internal.redefinition
Class RedefStateUtil

java.lang.Object
  extended by com.ibm.xtools.uml.msl.internal.redefinition.RedefInternalUtil
      extended by com.ibm.xtools.uml.msl.internal.redefinition.RedefUtil
          extended by com.ibm.xtools.uml.msl.internal.redefinition.RedefStateUtil

public class RedefStateUtil
extends RedefUtil


Nested Class Summary
 
Nested classes/interfaces inherited from class com.ibm.xtools.uml.msl.internal.redefinition.RedefUtil
RedefUtil.ElementWithRedefinitionContext, RedefUtil.IRedefintionContextAccessor
 
Nested classes/interfaces inherited from class com.ibm.xtools.uml.msl.internal.redefinition.RedefInternalUtil
RedefInternalUtil.ContainmentTester
 
Field Summary
 
Fields inherited from class com.ibm.xtools.uml.msl.internal.redefinition.RedefUtil
CONTEXT_HINT, EDIT_REQUEST_PARAM_SUPRESS_UI, redefUtilInstance, REFACTORING_ROOT_FRAGMENT_REMOVAL
 
Fields inherited from class com.ibm.xtools.uml.msl.internal.redefinition.RedefInternalUtil
defaultContainmentTester, EMPTY_BEHAVIOR_BODY, uml2
 
Constructor Summary
RedefStateUtil()
           
 
Method Summary
static List getAllConnectionPoints(State state, EObject contextHint)
          Utility method to get the set of Inherited + Local - Redefined Connection Points
static List getAllPublicConnectionPoints(State state, EObject contextHint)
          Utility method to get the set of Inherited + Local - Redefined _PUBLIC_ Connection Points
static List getAllRegions(State state, EObject contextHint)
          Utility method to get the set of Inherited + Local - Redefined regions
static Behavior getDoActivity(State state, EObject contextHint)
          Utility method to get the Do Activity
static String getDoActivityCode(State state, EObject contextHint, String language)
          Utility method to get a local or inherited "do activity" code for the given state and given language
static Behavior getEntry(State state, EObject contextHint)
          Utility method to get the Entry Activity
static String getEntryCode(State state, EObject contextHint, String language)
          Utility method to get a local or inherited entry code for the given state and given language
static Behavior getExit(State state, EObject contextHint)
          Utility method to get the Exit Activity
static String getExitCode(State state, EObject contextHint, String language)
          Utility method to get a local or inherited exit code for the given state and given language
protected static List getInheritedRegions(State context, Set visited)
          Utility method for returning the set of "inherited" regions for a given state
static List getLocalConnectionPoints(State state)
          Use it instead of calling state.getConnectionPoints() directly
static Behavior getLocalDoActivity(State state)
          Use it instead of calling state.getDoActivity() directly
static Behavior getLocalEntry(State state)
          Use it instead of calling state.getEntry() directly
static Behavior getLocalExit(State state)
          use it instead of calling state.getExit() directly
static List getLocalRegions(State state)
          Use it instead of calling state.getRegions() directly
static boolean isComposite(State state, EObject contextHint)
           
static boolean isDoActivityInherited(State state, EObject contextHint, String language)
          Utility method - is the "do activity" code inherited for the given state and given language
static boolean isDoActivityRedefined(State state, EObject contextHint, String language)
          Utility method - is the "do activity" code redefined for the given state and given language in the given context
static boolean isEntryInherited(State state, EObject contextHint, String language)
          Utility method - is the entry code inherited for the given state and given language
static boolean isEntryRedefined(State state, EObject contextHint, String language)
          Utility method - is the entry code redefined for the given state and given language in the given context
static boolean isExitInherited(State state, EObject contextHint, String language)
          Utility method - is the exit code inherited for the given state and given language
static boolean isExitRedefined(State state, EObject contextHint, String language)
          Utility method - is the exit code redefined for the given state and given language in the given context
static boolean isOrthogonal(State state, EObject contextHint)
           
static boolean isSimple(State state, EObject contextHint)
           
static boolean localIsComposite(State state)
          Use it instead of calling state.isComposite() directly
static boolean localIsOrthogonal(State state)
          Use it instead of calling state.isOrthogonal() directly
static boolean localIsSimple(State state)
          Use it instead of calling state.isSimple() directly
static void removeDoActivityCode(State state, EObject contextHint, String language)
          Utility method to remove state "do activity" code.
static void removeEntryCode(State state, EObject contextHint, String language)
          Utility method to remove state entry code.
static void removeExitCode(State state, EObject contextHint, String language)
          Utility method to remove state exit code.
 
Methods inherited from class com.ibm.xtools.uml.msl.internal.redefinition.RedefUtil
canRedefine, canRedefine, canReinherit, canReinheritViewTarget, changeRedefinitionRoot, copyAllRedefinableContent, copyLocalRedefinableContent, copySharedContent, getAdapterForEditPart, getAffectedFilesFromContextHint, getAllStructuralFeatureContent, getContainingStateMachine, getContextHint, getContextHintMap, getContextualFragment, getContextualFragment, getInheritanceTree, getInheritedContent, getInstance, getLocalContext, getLocalContextFromHint, getLocalContextFromHint, getLocalContextIfExists, getLocalFragment, getRedefinableFeatures, getRedefinedElement, getRedefinedElementOrSuperClass, getRedefinitions, getRedefinitionStructuralFeature, getRedefinitionTree, getReferencesTargets, getReferenceTarget, getReferenceTarget, getRootFragment, getSharedFeatures, getStereotypeValue, getSubclasses, getValue, isEventBrokerRedefinitionAware, isExcluded, isExcluded, isFragmentRemovalRefactoring, isInheritable, isInherited, isLocal, isRedefinitionContextValid, isRedefinitionStructuredFeature, isStereotypePropertyRedefinable, isStereotypeValueInherited, isUISuppressed, isUMLRedefinitionStructuralFeature, isValueLocal, markFragmentRemovalRefactoring, normalizeContextHint, redefine, redefine, reinherit, removeFragment, separate, setRedefinition, setSupressUIParam, unexclude
 
Methods inherited from class com.ibm.xtools.uml.msl.internal.redefinition.RedefInternalUtil
filterBySF, findBody, findBody, findOwner, findOwner, findSubclasses, findSubclasses, getContainedElement, getContextChain, getExclusionSupport, getRedefSupport, retargetReferences, retargetReferencesDownTheContextChain
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RedefStateUtil

public RedefStateUtil()
Method Detail

getLocalConnectionPoints

public static List getLocalConnectionPoints(State state)
Use it instead of calling state.getConnectionPoints() directly

Parameters:
state -
Returns:

getAllConnectionPoints

public static List getAllConnectionPoints(State state,
                                          EObject contextHint)
Utility method to get the set of Inherited + Local - Redefined Connection Points

Parameters:
context - the State
Returns:
list with connection points (never null)

getAllPublicConnectionPoints

public static List getAllPublicConnectionPoints(State state,
                                                EObject contextHint)
Utility method to get the set of Inherited + Local - Redefined _PUBLIC_ Connection Points

Parameters:
context - the State
Returns:
list with connection points (never null)

getInheritedRegions

protected static List getInheritedRegions(State context,
                                          Set visited)
Utility method for returning the set of "inherited" regions for a given state

Parameters:
context - the state
Returns:
List of inherited regions or null

getLocalRegions

public static List getLocalRegions(State state)
Use it instead of calling state.getRegions() directly

Parameters:
state -
Returns:

getAllRegions

public static List getAllRegions(State state,
                                 EObject contextHint)
Utility method to get the set of Inherited + Local - Redefined regions

Parameters:
context - the state
Returns:
list with regions (never null)

localIsSimple

public static boolean localIsSimple(State state)
Use it instead of calling state.isSimple() directly

Parameters:
state -
Returns:

isSimple

public static boolean isSimple(State state,
                               EObject contextHint)

localIsComposite

public static boolean localIsComposite(State state)
Use it instead of calling state.isComposite() directly

Parameters:
state -
Returns:

isComposite

public static boolean isComposite(State state,
                                  EObject contextHint)

localIsOrthogonal

public static boolean localIsOrthogonal(State state)
Use it instead of calling state.isOrthogonal() directly

Parameters:
state -
Returns:

isOrthogonal

public static boolean isOrthogonal(State state,
                                   EObject contextHint)

getLocalEntry

public static Behavior getLocalEntry(State state)
Use it instead of calling state.getEntry() directly

Parameters:
state -
Returns:

getEntry

public static Behavior getEntry(State state,
                                EObject contextHint)
Utility method to get the Entry Activity

Parameters:
context - the state
Returns:
Activity

getLocalDoActivity

public static Behavior getLocalDoActivity(State state)
Use it instead of calling state.getDoActivity() directly

Parameters:
state -
Returns:

getDoActivity

public static Behavior getDoActivity(State state,
                                     EObject contextHint)
Utility method to get the Do Activity

Parameters:
context - the state
Returns:
Activity

getLocalExit

public static Behavior getLocalExit(State state)
use it instead of calling state.getExit() directly

Parameters:
state -
Returns:

getExit

public static Behavior getExit(State state,
                               EObject contextHint)
Utility method to get the Exit Activity

Parameters:
context - the state
Returns:
Activity

isEntryInherited

public static boolean isEntryInherited(State state,
                                       EObject contextHint,
                                       String language)
Utility method - is the entry code inherited for the given state and given language

Parameters:
state -
language -
Returns:
true if the code is inherited, false if the code is local or never defined

isEntryRedefined

public static boolean isEntryRedefined(State state,
                                       EObject contextHint,
                                       String language)
Utility method - is the entry code redefined for the given state and given language in the given context

Parameters:
state -
contextHint -
language -
Returns:
true if the entry code is redefined in this context

isExitInherited

public static boolean isExitInherited(State state,
                                      EObject contextHint,
                                      String language)
Utility method - is the exit code inherited for the given state and given language

Parameters:
state -
language -
Returns:
true if the code is inherited, false if the code is local or never defined

isExitRedefined

public static boolean isExitRedefined(State state,
                                      EObject contextHint,
                                      String language)
Utility method - is the exit code redefined for the given state and given language in the given context

Parameters:
state -
contextHint -
language -
Returns:
true if the exit code is redefined in this context

isDoActivityInherited

public static boolean isDoActivityInherited(State state,
                                            EObject contextHint,
                                            String language)
Utility method - is the "do activity" code inherited for the given state and given language

Parameters:
state -
language -
Returns:
true if the code is inherited, false if the code is local or never defined

isDoActivityRedefined

public static boolean isDoActivityRedefined(State state,
                                            EObject contextHint,
                                            String language)
Utility method - is the "do activity" code redefined for the given state and given language in the given context

Parameters:
state -
contextHint -
language - the language to use, or null to use the currently active language
Returns:
true if the do activity code is redefined in this context

getEntryCode

public static String getEntryCode(State state,
                                  EObject contextHint,
                                  String language)
Utility method to get a local or inherited entry code for the given state and given language

Parameters:
state -
language - the language to use, or null to use the currently active language
Returns:
the code string or null

getExitCode

public static String getExitCode(State state,
                                 EObject contextHint,
                                 String language)
Utility method to get a local or inherited exit code for the given state and given language

Parameters:
state -
language - the language to use, or null to use the currently active language
Returns:
the code string or null

getDoActivityCode

public static String getDoActivityCode(State state,
                                       EObject contextHint,
                                       String language)
Utility method to get a local or inherited "do activity" code for the given state and given language

Parameters:
state -
language -
Returns:
the code string or null

removeEntryCode

public static void removeEntryCode(State state,
                                   EObject contextHint,
                                   String language)
Utility method to remove state entry code. The code will be removed from the collection or overriden with an empty code as appropriate.

Parameters:
t -
contextHint -
language -

removeExitCode

public static void removeExitCode(State state,
                                  EObject contextHint,
                                  String language)
Utility method to remove state exit code. The code will be removed from the collection or overriden with an empty code as appropriate.

Parameters:
t -
contextHint -
language -

removeDoActivityCode

public static void removeDoActivityCode(State state,
                                        EObject contextHint,
                                        String language)
Utility method to remove state "do activity" code. The code will be removed from the collection or overriden with an empty code as appropriate.

Parameters:
t -
contextHint -
language -

UML Modeling Layer

© Copyright IBM Corp. 2009. All rights reserved.