diff --git a/build.gradle b/build.gradle index 295cd9adc..f4ccda973 100644 --- a/build.gradle +++ b/build.gradle @@ -142,7 +142,7 @@ dependencies { // Other dependencies we're unable to resolve via standard repositories if (buildAccess == 'internal') { - preCompile group: 'gov.nasa.jpl.cae.nomagic', name: 'cae-cameo-systems-modeler-core', version: '4.1.4', classifier: 'linux', ext: 'zip' + preCompile group: 'gov.nasa.jpl.cae.nomagic', name: 'cae-cameo-systems-modeler-core', version: '4.1.5', classifier: 'linux', ext: 'zip' } else { preCompile group: 'com.nomagic', name: 'demomagicdraw', version: '190sp2', classifier: 'MagicDraw_Demo_190_sp2_no_install', ext: 'zip' diff --git a/gradle.properties b/gradle.properties index 24dce54ac..a374d6f4d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -version=4.1.4 +version=4.1.5 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/emf/EMFExporter.java b/src/main/java/gov/nasa/jpl/mbee/mdk/emf/EMFExporter.java index 573ae3a13..17ab179af 100644 --- a/src/main/java/gov/nasa/jpl/mbee/mdk/emf/EMFExporter.java +++ b/src/main/java/gov/nasa/jpl/mbee/mdk/emf/EMFExporter.java @@ -209,15 +209,16 @@ private enum Processor { objectNode.put(MDKConstants.TYPE_KEY, "Mount"); objectNode.put(MDKConstants.MOUNTED_ELEMENT_ID_KEY, Converters.getIProjectToIdConverter().apply(attachedProject) + MDKConstants.PRIMARY_MODEL_ID_SUFFIX); objectNode.put(MDKConstants.MOUNTED_ELEMENT_PROJECT_ID_KEY, Converters.getIProjectToIdConverter().apply(attachedProject)); - String branchName; - EsiUtils.EsiBranchInfo esiBranchInfo = null; - if (isRemote && (esiBranchInfo = EsiUtils.getCurrentBranch(attachedProject)) == null) { + EsiUtils.EsiBranchInfo branchInfo = EsiUtils.getCurrentBranch(attachedProject); + if (isRemote && branchInfo == null) { return null; } - if (!isRemote || (branchName = esiBranchInfo.getName()) == null || branchName.equals("trunk")) { + String branchName; + if (!isRemote || (branchName = branchInfo.getName()) == null || "trunk".equals(branchName)) { branchName = "master"; } - objectNode.put(MDKConstants.MOUNTED_REF_ID_KEY, branchName); + String branchId = "master".equals(branchName) ? "master" : branchInfo.getID().toString(); + objectNode.put(MDKConstants.MOUNTED_REF_ID_KEY, branchId); objectNode.put(MDKConstants.TWC_VERSION_KEY, isRemote ? ProjectUtilities.versionToInt(ProjectUtilities.getVersion(attachedProject).getName()) : -1); return objectNode; },