Skip to content

Commit 2cc5447

Browse files
committed
ST6RI-178 Fixed non-stanrad library download in Jupyter
- in the current implementation it is necessary to store proxy elements for the standard library - these proxy elements also count as root elements - the download logic skips these elements when processing root - when a LibraryPackage is uploaded form Jupyter it will also count as a root, so the download logic skips them To solve this issue this commit enables non-standard library elements as root elements during the download process
1 parent 38a0ebb commit 2cc5447

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

org.omg.sysml/src/org/omg/sysml/util/repository/EMFModelRefresher.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public EMFModelDelta create() {
7777

7878
//traverse containment
7979
for (var projectRoot: model.getModelRoots().values()) {
80-
if (!Boolean.TRUE.equals(projectRoot.get("isLibraryElement"))) {
80+
if (isNonStandardLibrary(projectRoot) || !Boolean.TRUE.equals(projectRoot.get("isLibraryElement"))) {
8181
EObject rootNamespace = transform(projectRoot);
8282
rootNamespaces.put(rootNamespace, projectRoot);
8383
}
@@ -97,6 +97,10 @@ public EMFModelDelta create() {
9797
return new EMFModelDelta(rootNamespaces);
9898
}
9999

100+
private boolean isNonStandardLibrary(Element element) {
101+
return element.get("@type").equals("LibraryPackage") && !Boolean.TRUE.equals(element.get("isStandard"));
102+
}
103+
100104
private EObject transform(Element dto) {
101105
Object uuid = dto.get("@id");
102106

0 commit comments

Comments
 (0)