From: Reino Ruusu Date: Fri, 22 Nov 2019 10:40:17 +0000 (+0200) Subject: Allow property tab contribution from all INodes. X-Git-Tag: v1.43.0~114 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F01%2F3601%2F1;p=simantics%2F3d.git Allow property tab contribution from all INodes. gitlab #56 Change-Id: If6e7bc5138f22378c700c4fb9b4104990a622023 --- diff --git a/org.simantics.g3d/src/org/simantics/g3d/property/AnnotatedPropertyTabContributorFactory.java b/org.simantics.g3d/src/org/simantics/g3d/property/AnnotatedPropertyTabContributorFactory.java index 65b267cb..73526d1c 100644 --- a/org.simantics.g3d/src/org/simantics/g3d/property/AnnotatedPropertyTabContributorFactory.java +++ b/org.simantics.g3d/src/org/simantics/g3d/property/AnnotatedPropertyTabContributorFactory.java @@ -76,7 +76,6 @@ import org.simantics.g3d.property.annotations.GetPropertyValue; import org.simantics.g3d.property.annotations.PropertyTabBlacklist; import org.simantics.g3d.property.annotations.SetComboPropertyValue; import org.simantics.g3d.property.annotations.SetPropertyValue; -import org.simantics.g3d.scenegraph.IG3DNode; import org.simantics.g3d.scenegraph.NodeMap; import org.simantics.g3d.scenegraph.NodeMapProvider; import org.simantics.g3d.scenegraph.base.INode; @@ -682,7 +681,7 @@ public class AnnotatedPropertyTabContributorFactory implements PropertyTabContri if (nodeMap != null) break; } - n = (IG3DNode)n.getParent(); + n = (INode)n.getParent(); } boolean readOnly = (node instanceof IStructuralNode && ((IStructuralNode)node).isPartOfInstantiatedModel() && !((IStructuralNode)node).isInstantiatedModelRoot()); diff --git a/org.simantics.plant3d/src/org/simantics/plant3d/property/P3DSelectionProcessor.java b/org.simantics.plant3d/src/org/simantics/plant3d/property/P3DSelectionProcessor.java index e48f3320..b78fac4e 100644 --- a/org.simantics.plant3d/src/org/simantics/plant3d/property/P3DSelectionProcessor.java +++ b/org.simantics.plant3d/src/org/simantics/plant3d/property/P3DSelectionProcessor.java @@ -19,7 +19,7 @@ import org.simantics.db.management.ISessionContext; import org.simantics.db.request.Read; import org.simantics.g3d.property.PropertyTabContributor; import org.simantics.g3d.property.PropertyTabUtil; -import org.simantics.g3d.scenegraph.IG3DNode; +import org.simantics.g3d.scenegraph.base.INode; import org.simantics.g3d.tools.AdaptationUtils; import org.simantics.g3d.vtk.property.VTKPropertyTabContributor; import org.simantics.objmap.structural.StructuralResource; @@ -43,7 +43,7 @@ public class P3DSelectionProcessor implements SelectionProcessor resourceCollection = AdaptationUtils.adaptToCollection(selection, Resource.class); Collection structuralResourceCollection = AdaptationUtils.adaptToCollection(selection, StructuralResource.class); Collection propCollection = AdaptationUtils.adaptToCollection(selection, vtkProp.class); - Collection nodeCollection = AdaptationUtils.adaptToCollection(selection, IG3DNode.class); + Collection nodeCollection = AdaptationUtils.adaptToCollection(selection, INode.class); boolean readOnly = false; if (resourceCollection.size() == 0 && structuralResourceCollection.size() > 0) { for (StructuralResource sr : structuralResourceCollection) { @@ -55,7 +55,7 @@ public class P3DSelectionProcessor implements SelectionProcessor contributors = PropertyTabUtil.getContributors(node); int i = 100; for (PropertyTabContributor c : contributors) {