Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2018-12-13 08:24:27 -0500
committerPatrick Tessier2019-01-18 10:06:58 -0500
commit222641937a31eada10ed60678c5dbb93790f6ee1 (patch)
tree0f3279bc541efbd5e1c6b9ecb38548f34720d93f
parentafe5af6fda1a9fea6f6e5d106a2b0a2bcfc09e62 (diff)
downloadorg.eclipse.papyrus-streams/3.0-maintenance.tar.gz
org.eclipse.papyrus-streams/3.0-maintenance.tar.xz
org.eclipse.papyrus-streams/3.0-maintenance.zip
Bug 542759: Fix architecture provider to take active viewpoints intostreams/3.0-maintenance
account Change-Id: I11212c02f844a27428b68882c1408330f2a75a7e Signed-off-by: Camille Letavernier <cletavernier@eclipsesource.com>
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/service/palette/ArchitectureExtendedProviderDescriptor.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/service/palette/ArchitectureExtendedProviderDescriptor.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/service/palette/ArchitectureExtendedProviderDescriptor.java
index 0b25c7b8d46..8c1f53ba066 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/service/palette/ArchitectureExtendedProviderDescriptor.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/service/palette/ArchitectureExtendedProviderDescriptor.java
@@ -20,6 +20,7 @@ import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.List;
+import java.util.function.Predicate;
import java.util.stream.Collectors;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
@@ -169,7 +170,8 @@ public class ArchitectureExtendedProviderDescriptor extends ExtendedProviderDesc
modelSet = ServiceUtils.getInstance().getModelSet(part.getAdapter(ServicesRegistry.class));
List<?> collect = new ArchitectureDescriptionUtils(modelSet).getArchitectureViewpoints().stream()// gets Viewpoints
.flatMap(p -> p.getRepresentationKinds().stream())// get representation kinds from viewpoint
- .filter(PapyrusDiagram.class::isInstance).map(PapyrusDiagram.class::cast)// filter on diagram type
+ .filter(Predicate.isEqual(getDiagram())) // check that the diagram handled by this descriptor is in an active viewpoint
+ .map(PapyrusDiagram.class::cast)// filter on diagram type
.filter(p -> getDiagram().getQualifiedName().equals(p.getQualifiedName()))
.flatMap(p -> p.getPalettes().stream()).distinct()// Get paletteConf
.collect(Collectors.toList());// as list

Back to the top