diff --git a/build.gradle b/build.gradle index c3f81f470..b0f1cf8c7 100644 --- a/build.gradle +++ b/build.gradle @@ -141,7 +141,7 @@ dependencies { // Other dependencies we're unable to resolve via standard repositories if (buildAccess == 'internal') { - preCompile group: 'gov.nasa.jpl.cae.magicdraw', name: 'cae-magicdraw-core', version: '3.6.2', ext: 'zip' + preCompile group: 'gov.nasa.jpl.cae.magicdraw', name: 'cae-magicdraw-core', version: '3.6.3', ext: 'zip' } else { preCompile group: 'com.nomagic', name: 'magicdraw', version: '185sp3', classifier: 'MagicDraw_185_sp3_no_install', ext: 'zip' diff --git a/gradle.properties b/gradle.properties index 17d43a05e..789d694b2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -version=3.6.2 +version=3.6.3 group=org.openmbee.magicdraw.mdk descriptorFile=MDR_Plugin_Model_Development_Kit_91110_descriptor.xml magicdDrawGroupName=gov.nasa.jpl.cae.magicdraw.mdk diff --git a/src/main/java/gov/nasa/jpl/mbee/mdk/util/Utils.java b/src/main/java/gov/nasa/jpl/mbee/mdk/util/Utils.java index 6302e7319..441d19cdf 100644 --- a/src/main/java/gov/nasa/jpl/mbee/mdk/util/Utils.java +++ b/src/main/java/gov/nasa/jpl/mbee/mdk/util/Utils.java @@ -111,7 +111,12 @@ public static List removeDuplicates(Collection elements) { * @return */ public static Collection getElementsOnDiagram(Diagram diagram) { - return Project.getProject(diagram).getDiagram(diagram).getUsedModelElements(true); + DiagramPresentationElement diagramPresentationElement = Project.getProject(diagram).getDiagram(diagram); + if (diagramPresentationElement == null) { + return Collections.emptyList(); + } + diagramPresentationElement.ensureLoaded(); + return diagramPresentationElement.getUsedModelElements(true); } /**