summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Pielmann2012-11-20 03:21:35 (EST)
committer Sven Rottstock2012-11-20 03:21:35 (EST)
commit7c579a6a64ad89ce16980fddc3fd6d3bca218998 (patch)
treec819aecf21611f20681fee3b635d2b50c79b4544
parent7a33d7dcda7ef517ec4ba1ecbc8816ef5edd128e (diff)
downloadorg.eclipse.stardust.ide-7c579a6a64ad89ce16980fddc3fd6d3bca218998.zip
org.eclipse.stardust.ide-7c579a6a64ad89ce16980fddc3fd6d3bca218998.tar.gz
org.eclipse.stardust.ide-7c579a6a64ad89ce16980fddc3fd6d3bca218998.tar.bz2
Enhancements for Attributes.
git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ide@60944 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--model/org.eclipse.stardust.model.xpdl.builder/src/main/java/org/eclipse/stardust/model/xpdl/builder/utils/ModelBuilderFacade.java35
1 files changed, 26 insertions, 9 deletions
diff --git a/model/org.eclipse.stardust.model.xpdl.builder/src/main/java/org/eclipse/stardust/model/xpdl/builder/utils/ModelBuilderFacade.java b/model/org.eclipse.stardust.model.xpdl.builder/src/main/java/org/eclipse/stardust/model/xpdl/builder/utils/ModelBuilderFacade.java
index 56f1655..d000ac3 100644
--- a/model/org.eclipse.stardust.model.xpdl.builder/src/main/java/org/eclipse/stardust/model/xpdl/builder/utils/ModelBuilderFacade.java
+++ b/model/org.eclipse.stardust.model.xpdl.builder/src/main/java/org/eclipse/stardust/model/xpdl/builder/utils/ModelBuilderFacade.java
@@ -795,20 +795,24 @@ public class ModelBuilderFacade
*/
public DataType importData(ModelType model, String dataFullID)
{
- DataType data;
-
- if (dataFullID.endsWith(DmsConstants.DATA_ID_ATTACHMENTS))
+ DataType data = null;
+ String dataModelId = getModelId(dataFullID);
+ ModelType dataModel = getModelManagementStrategy().getModels().get(dataModelId);
+ try
{
- createProcessAttachementData(model);
+ data = findData(dataModel, stripFullId(dataFullID));
}
+ catch (ObjectNotFoundException ex)
+ {
- String dataModelId = getModelId(dataFullID);
-
- ModelType dataModel = getModelManagementStrategy().getModels().get(dataModelId);
+ }
- data = findData(dataModel, stripFullId(dataFullID));
+ if (data == null && dataFullID.endsWith(DmsConstants.DATA_ID_ATTACHMENTS))
+ {
+ createProcessAttachementData(model);
+ }
- if ( !dataModelId.equals(model.getId()))
+ if (!dataModelId.equals(model.getId()))
{
String fileConnectionId = WebModelerConnectionManager.createFileConnection(
model, dataModel);
@@ -2727,6 +2731,19 @@ public class ModelBuilderFacade
}
}
+ public boolean getBooleanAttribute(Object element, String name)
+ {
+ if (element instanceof Extensible)
+ {
+ return ExtendedAttributeUtil.getBooleanValue((Extensible) element, name);
+ }
+ if (element instanceof IExtensibleElement)
+ {
+ return AttributeUtil.getBooleanValue((IExtensibleElement) element, name);
+ }
+ return false;
+ }
+
@SuppressWarnings("rawtypes")
public List getAttributes(Object element)
{