|
SAM | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.topcased.modeler.sam.util.InstancesUtil
public class InstancesUtil
Library of helper functions to deal with instances creation/checking in a "generic" way.
Constructor Summary | |
---|---|
InstancesUtil()
|
Method Summary | |
---|---|
static MultiPort |
createEmptyCopyMultiPort(MultiPort existingPort)
Creates a new multiport and sets its name to that of the existing port. |
static Port |
createEmptyCopyPort(Port existingPort)
Creates a new empty Port and set its name to that of the existing port. |
static ModelContent |
createModelContentCopy(ModelContent model)
An empty copy of the ModelContent given in parameter. |
static IConfiguration |
getconfiguration(GraphNode node)
|
static EObject |
getEmfElement(GraphElement graphElement)
Convenience method returning the corresponding emf element. |
static java.util.List<MultiPort> |
getListMultiPorts(ModelContent content)
|
static java.util.List<Port> |
getListPorts(ModelContent content)
|
static URI |
getSamdiUriFromSamUri(URI samUri)
Used to get the uri to a '.samdi' file corresponding to the '.sam' file given in parameter. |
static boolean |
isAnImport(EObject elementToImport)
Checks that the element to import is a ModelContent and that it is at the top level of the hierarchy. |
static boolean |
isAReference(EObject object)
Checks wether the argument has its IsInstanceOf reference set. |
static boolean |
isSamUri(URI uri)
Convenience method testing wether a given uri (as returned by ResourceDialog.getURIs() , ie either a 'platform' or a 'file'
uri) points to a local sam file. |
static void |
setIsInstanceOf(EObject referencer,
EObject referenced)
Sets the name and instanceOf properties of the referencer aproprietly. |
static void |
updateAllContents(ModelContent referencer,
ModelContent referenced)
Updates all the ports and multiports of the referencer according to what's found in the referenced. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public InstancesUtil()
Method Detail |
---|
public static boolean isAReference(EObject object)
object
-
public static boolean isAnImport(EObject elementToImport)
elementToImport
-
public static Port createEmptyCopyPort(Port existingPort)
existingPort
-
public static MultiPort createEmptyCopyMultiPort(MultiPort existingPort)
existingPort
-
public static EObject getEmfElement(GraphElement graphElement)
graphElement
-
public static java.util.List<Port> getListPorts(ModelContent content)
public static java.util.List<MultiPort> getListMultiPorts(ModelContent content)
public static void updateAllContents(ModelContent referencer, ModelContent referenced)
referencer
- referenced
- public static ModelContent createModelContentCopy(ModelContent model)
model
-
public static IConfiguration getconfiguration(GraphNode node)
node
-
public static URI getSamdiUriFromSamUri(URI samUri)
samUri
-
public static void setIsInstanceOf(EObject referencer, EObject referenced)
referencer
- referenced
- public static boolean isSamUri(URI uri)
ResourceDialog.getURIs()
, ie either a 'platform' or a 'file'
uri) points to a local sam file.
uri
-
|
SAM | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.