From: jsimomaa Date: Thu, 12 Jan 2017 13:59:41 +0000 (+0200) Subject: Enhancements to TabContributions X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=1a24584a3590d0eb2ef464ecea71fb9ace6cf3f8;p=simantics%2Fplatform.git Enhancements to TabContributions Change-Id: I4df883661c0836a2b19288e7c9fd9456f16988fa --- diff --git a/bundles/org.simantics.annotation.ontology/graph/AnnotationView.pgraph b/bundles/org.simantics.annotation.ontology/graph/AnnotationView.pgraph index 8b6a15520..39740b52c 100644 --- a/bundles/org.simantics.annotation.ontology/graph/AnnotationView.pgraph +++ b/bundles/org.simantics.annotation.ontology/graph/AnnotationView.pgraph @@ -40,15 +40,15 @@ ANNO.Functions.descriptionText : L0.Function L0.HasValueType "String" ANNO.SelectionTabContribution : SEL.TypedVariableTabContribution - SEL.TypedVariableTabContribution.HasType L0.Entity + SEL.TypedTabContribution.HasType L0.Entity SEL.VariableTabContribution.HasView ANNO.SelectionTab - SEL.VariableTabContribution.HasPriority -10 + SEL.TabContribution.HasPriority -10 L0.HasLabel "Annotations" ANNO.SelectionTabContribution2 : SEL.TypedVariableTabContribution - SEL.TypedVariableTabContribution.HasType ANNO.Annotation + SEL.TypedTabContribution.HasType ANNO.Annotation SEL.VariableTabContribution.HasView ANNO.SelectionTab2 - SEL.VariableTabContribution.HasPriority -9 + SEL.TabContribution.HasPriority -9 L0.HasLabel "Annotation Properties" ANNO.SelectionTab.BC : SEL_UI.StandardProperties.BrowseContextStandardChildren diff --git a/bundles/org.simantics.document.ui.ontology/graph/DocumentProperty.pgraph b/bundles/org.simantics.document.ui.ontology/graph/DocumentProperty.pgraph index c6263c034..8b9b8fbda 100644 --- a/bundles/org.simantics.document.ui.ontology/graph/DocumentProperty.pgraph +++ b/bundles/org.simantics.document.ui.ontology/graph/DocumentProperty.pgraph @@ -12,7 +12,7 @@ UI = UI.DocumentTabContributionType isInstanceOf r L0.IndexRoot" UI.WikitextContribution : SEL.VariableTabContribution - SEL.VariableTabContribution.HasTest UI.Functions.isWikitext : L0.Function + SEL.TabContribution.HasTest UI.Functions.isWikitext : L0.Function SEL.VariableTabContribution.HasView UI.WikitextContribution.View - SEL.VariableTabContribution.HasPriority 1 + SEL.TabContribution.HasPriority 1 L0.HasLabel "Wiki" UI.WikitextContribution.View : VIEWS.Composite diff --git a/bundles/org.simantics.modeling.template2d.ontology/graph/DrawingTemplateVP.pgraph b/bundles/org.simantics.modeling.template2d.ontology/graph/DrawingTemplateVP.pgraph index 66d2b336c..d01861d59 100644 --- a/bundles/org.simantics.modeling.template2d.ontology/graph/DrawingTemplateVP.pgraph +++ b/bundles/org.simantics.modeling.template2d.ontology/graph/DrawingTemplateVP.pgraph @@ -33,9 +33,9 @@ TEMPLATE2D.FlagTableUI.ColumnUI.HeaderUI : L0.Ontology SEL.Functions : L0.Library +SEL.TabContribution.Multi -- SEL.TabContribution.HasTest --> L0.Value -- SEL.TabContribution.HasPriority ==> "Integer" -- SEL.TypedTabContribution.HasType --> L0.Type -- SEL.AbstractVariableTabContribution.testFunction ==> "Variable -> Boolean" -- SEL.AbstractVariableTabContribution.HasPriority ==> "Integer" -- SEL.AbstractVariableTabContribution.HasTest --> L0.Value -- SEL.AbstractResourceTabContribution.HasTest --> L0.Value -- SEL.AbstractResourceTabContribution.HasPriority ==> "Integer" -- SEL.AbstractTypedVariableTabContribution.HasType --> L0.Type -- SEL.AbstractTypedResourceTabContribution.HasType --> L0.Type -- SEL.SCLTabContribution.instantiate ==> "() -> TabContribution" -- SEL.VariableTabContribution.HasTest -- SEL.VariableTabContribution.transformation ==> "Variable -> Variable" -- SEL.VariableTabContribution.HasView -- SEL.VariableTabContribution.HasPriority -- SEL.TypedVariableTabContribution.HasType { - final protected Resource configuration; +abstract public class AbstractResourceTabContribution extends AbstractTabContribution { public AbstractResourceTabContribution(ReadGraph graph, Resource configuration) throws DatabaseException { - this.configuration = configuration; - } - - public abstract void getContributors(ReadGraph graph, Resource resource, Integer priority, String label, Collection result) throws DatabaseException; - - @Override - public boolean accept(ReadGraph graph, Object input) throws DatabaseException { - - if (!(input instanceof Resource)) - return false; - Resource resource = (Resource) input; - - SelectionViewResources SEL = SelectionViewResources.getInstance(graph); - for(Resource r : graph.getObjects(configuration, SEL.AbstractResourceTabContribution_HasTest)) { - Boolean pass = Functions.exec(graph, r, graph, resource); - if(!pass) return false; - } - - return true; - + super(graph, configuration); } - @Override - final public void contribute(ReadGraph graph, final Resource resource, Collection result) throws DatabaseException { - - Layer0 L0 = Layer0.getInstance(graph); - SelectionViewResources SEL = SelectionViewResources.getInstance(graph); - - Integer priority = graph.getPossibleRelatedValue(configuration, SEL.AbstractResourceTabContribution_HasPriority, Bindings.INTEGER); - String label = graph.getPossibleRelatedValue(configuration, L0.HasLabel); - - getContributors(graph, resource, priority, label, result); - - } - + @Override + public boolean accept(ReadGraph graph, Object input) throws DatabaseException { + if (!(input instanceof Resource)) + return false; + return super.accept(graph, input); + } } diff --git a/bundles/org.simantics.selectionview/src/org/simantics/selectionview/AbstractTabContribution.java b/bundles/org.simantics.selectionview/src/org/simantics/selectionview/AbstractTabContribution.java new file mode 100644 index 000000000..735669855 --- /dev/null +++ b/bundles/org.simantics.selectionview/src/org/simantics/selectionview/AbstractTabContribution.java @@ -0,0 +1,68 @@ +package org.simantics.selectionview; + +import java.lang.reflect.Array; +import java.util.Collection; +import java.util.Objects; + +import org.simantics.databoard.Bindings; +import org.simantics.db.ReadGraph; +import org.simantics.db.Resource; +import org.simantics.db.common.utils.Functions; +import org.simantics.db.exception.DatabaseException; +import org.simantics.layer0.Layer0; + +public abstract class AbstractTabContribution implements TabContribution { + + protected final Resource configuration; + protected final String uri; + + public AbstractTabContribution(ReadGraph graph, Resource configuration) throws DatabaseException { + this.configuration = Objects.requireNonNull(configuration); + this.uri = graph.getURI(configuration); + } + + @Override + public boolean accept(ReadGraph graph, Object input) throws DatabaseException { + SelectionViewResources SEL = SelectionViewResources.getInstance(graph); + // Lets see if multi or single support + Boolean multi = graph.getRelatedValue2(configuration, SEL.TabContribution_Multi, Bindings.BOOLEAN); + if (input instanceof Collection) { + Collection inputs = (Collection) input; + if (inputs.isEmpty()) + return false; + if (inputs.size() > 1 && !multi) + return false; + } else if (input.getClass().isArray()) { + int arrayLength = Array.getLength(input); + if (arrayLength == 0) + return false; + if (arrayLength > 1 && !multi) + return false; + } + // HasTest seems to be deprecated but lets support it just for fun + for(Resource r : graph.getObjects(configuration, SEL.TabContribution_HasTest)) { + Boolean pass = Functions.exec(graph, r, graph, input); + if(!pass) + return false; + } + return true; + } + + public abstract void getContributors(ReadGraph graph, T input, Integer priority, String label, Collection result) throws DatabaseException; + + @Override + public final void contribute(ReadGraph graph, T input, Collection result) throws DatabaseException { + Layer0 L0 = Layer0.getInstance(graph); + SelectionViewResources SEL = SelectionViewResources.getInstance(graph); + + Integer priority = graph.getPossibleRelatedValue(configuration, SEL.TabContribution_HasPriority, Bindings.INTEGER); + String label = graph.getPossibleRelatedValue(configuration, L0.HasLabel); + + getContributors(graph, input, priority, label, result); + } + + @Override + public String toString() { + return getClass().getSimpleName() + "[" + uri + "]"; + } +} diff --git a/bundles/org.simantics.selectionview/src/org/simantics/selectionview/AbstractTypedResourceTabContribution.java b/bundles/org.simantics.selectionview/src/org/simantics/selectionview/AbstractTypedResourceTabContribution.java index 06c0e1e37..f1148084e 100644 --- a/bundles/org.simantics.selectionview/src/org/simantics/selectionview/AbstractTypedResourceTabContribution.java +++ b/bundles/org.simantics.selectionview/src/org/simantics/selectionview/AbstractTypedResourceTabContribution.java @@ -1,32 +1,24 @@ package org.simantics.selectionview; +import java.util.Collection; +import java.util.Collections; + import org.simantics.db.ReadGraph; import org.simantics.db.Resource; import org.simantics.db.exception.DatabaseException; -abstract public class AbstractTypedResourceTabContribution extends AbstractResourceTabContribution { +abstract public class AbstractTypedResourceTabContribution extends AbstractTypedTabContribution { public AbstractTypedResourceTabContribution(ReadGraph graph, Resource configuration) throws DatabaseException { super(graph, configuration); } - - @Override - public boolean accept(ReadGraph graph, Object input) throws DatabaseException { - - if (!(input instanceof Resource)) - return false; - Resource resource = (Resource) input; - - SelectionViewResources SEL = SelectionViewResources.getInstance(graph); - - Resource type = graph.getPossibleObject(configuration, SEL.AbstractTypedResourceTabContribution_HasType); - if(type == null) throw new DatabaseException("No type for " + graph.getPossibleURI(configuration)); - - if(!graph.isInstanceOf(resource, type)) return false; - - return super.accept(graph, resource); - - } - + @Override + public boolean accept(ReadGraph graph, Object input, Collection types) throws DatabaseException { + if (!(input instanceof Resource)) + return false; + Resource resource = (Resource) input; + Collection ts = graph.getTypes(resource); + return !Collections.disjoint(types, ts); + } } diff --git a/bundles/org.simantics.selectionview/src/org/simantics/selectionview/AbstractTypedTabContribution.java b/bundles/org.simantics.selectionview/src/org/simantics/selectionview/AbstractTypedTabContribution.java new file mode 100644 index 000000000..1c8a86eee --- /dev/null +++ b/bundles/org.simantics.selectionview/src/org/simantics/selectionview/AbstractTypedTabContribution.java @@ -0,0 +1,34 @@ +package org.simantics.selectionview; + +import java.util.Collection; +import java.util.Objects; + +import org.simantics.db.ReadGraph; +import org.simantics.db.Resource; +import org.simantics.db.exception.DatabaseException; + +public abstract class AbstractTypedTabContribution extends AbstractTabContribution { + + protected final Collection types; + + public AbstractTypedTabContribution(ReadGraph graph, Resource configuration) throws DatabaseException { + super(graph, configuration); + this.types = Objects.requireNonNull(graph.getObjects(configuration, SelectionViewResources.getInstance(graph).TypedTabContribution_HasType)); + if(types.isEmpty()) + throw new DatabaseException("No type for " + graph.getPossibleURI(configuration)); + } + + @Override + public boolean accept(ReadGraph graph, Object input) throws DatabaseException { + if (!super.accept(graph, input)) + return false; + return accept(graph, input, types); + } + + public abstract boolean accept(ReadGraph graph, Object input, Collection type) throws DatabaseException; + + @Override + public String toString() { + return super.toString() + " type=" + types; + } +} diff --git a/bundles/org.simantics.selectionview/src/org/simantics/selectionview/AbstractTypedVariableTabContribution.java b/bundles/org.simantics.selectionview/src/org/simantics/selectionview/AbstractTypedVariableTabContribution.java index 741cbd396..13f88b9fb 100644 --- a/bundles/org.simantics.selectionview/src/org/simantics/selectionview/AbstractTypedVariableTabContribution.java +++ b/bundles/org.simantics.selectionview/src/org/simantics/selectionview/AbstractTypedVariableTabContribution.java @@ -1,31 +1,31 @@ package org.simantics.selectionview; +import java.util.Collection; +import java.util.Collections; + import org.simantics.db.ReadGraph; import org.simantics.db.Resource; import org.simantics.db.exception.DatabaseException; import org.simantics.db.layer0.variable.Variable; -abstract public class AbstractTypedVariableTabContribution extends AbstractVariableTabContribution { +abstract public class AbstractTypedVariableTabContribution extends AbstractTypedTabContribution { public AbstractTypedVariableTabContribution(ReadGraph graph, Resource configuration) throws DatabaseException { super(graph, configuration); } - @Override - public boolean accept(ReadGraph graph, Variable variable, Object selection) throws DatabaseException { - - SelectionViewResources SEL = SelectionViewResources.getInstance(graph); + @Override + public boolean accept(ReadGraph graph, Object input, Collection types) throws DatabaseException { + + if (!(input instanceof Variable)) + return false; + Variable variable = (Variable) input; - Resource type = graph.getPossibleObject(configuration, SEL.AbstractTypedVariableTabContribution_HasType); - if(type == null) throw new DatabaseException("No type for " + graph.getPossibleURI(configuration)); + Resource resource = variable.getPossibleRepresents(graph); + if (resource == null) + return false; - Resource resource = variable.getPossibleRepresents(graph); - if(resource == null) return false; - - if(!graph.isInstanceOf(resource, type)) return false; - - return super.accept(graph, variable, selection); - - } - + Collection ts = graph.getTypes(resource); + return !Collections.disjoint(types, ts); + } } diff --git a/bundles/org.simantics.selectionview/src/org/simantics/selectionview/AbstractVariableTabContribution.java b/bundles/org.simantics.selectionview/src/org/simantics/selectionview/AbstractVariableTabContribution.java index 8063eb3c1..2d4fcf223 100644 --- a/bundles/org.simantics.selectionview/src/org/simantics/selectionview/AbstractVariableTabContribution.java +++ b/bundles/org.simantics.selectionview/src/org/simantics/selectionview/AbstractVariableTabContribution.java @@ -1,45 +1,31 @@ package org.simantics.selectionview; -import java.util.Collection; - import org.simantics.Simantics; -import org.simantics.databoard.Bindings; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; -import org.simantics.db.common.utils.Functions; import org.simantics.db.exception.DatabaseException; import org.simantics.db.layer0.variable.Variable; import org.simantics.db.layer0.variable.Variables; -import org.simantics.layer0.Layer0; import org.simantics.scl.runtime.function.Function; import org.simantics.ui.selection.WorkbenchSelectionUtils; -abstract public class AbstractVariableTabContribution implements TabContribution { - - final private String uri; - final protected Resource configuration; +abstract public class AbstractVariableTabContribution extends AbstractTabContribution { public AbstractVariableTabContribution(ReadGraph graph, Resource configuration) throws DatabaseException { - this.configuration = configuration; - this.uri = graph.getURI(configuration); - } - - public abstract void getContributors(ReadGraph graph, Variable variable, Integer priority, String label, Collection result) throws DatabaseException; - - @Override - public boolean accept(ReadGraph graph, Object input) throws DatabaseException { - return true; + super(graph, configuration); } - public boolean accept(ReadGraph graph, Variable variable, Object selection) throws DatabaseException { + @Override + public boolean accept(ReadGraph graph, Object input) throws DatabaseException { + if (!super.accept(graph, input)) + return false; + Variable variable = getPossibleVariable(graph, input); + if (variable == null) + return false; - if(selection instanceof SelectionInput) { + if(input instanceof SelectionInput) { SelectionViewResources SEL = SelectionViewResources.getInstance(graph); - for(Resource r : graph.getObjects(configuration, SEL.AbstractVariableTabContribution_HasTest)) { - Boolean pass = Functions.exec(graph, r, graph, (SelectionInput)selection); - if(!pass) return false; - } Variable configurationVariable = Variables.getVariable(graph, configuration); Function f = configurationVariable.getPossiblePropertyValue(graph, SEL.AbstractVariableTabContribution_testFunction); @@ -49,13 +35,9 @@ abstract public class AbstractVariableTabContribution implements TabContribution } } else { - return false; - } - return true; - } final private Variable getPossibleVariable(ReadGraph graph, Object selection) throws DatabaseException { @@ -67,28 +49,4 @@ abstract public class AbstractVariableTabContribution implements TabContribution } return null; } - - @Override - final public void contribute(ReadGraph graph, final Object selection, Collection result) throws DatabaseException { - - Variable variable = getPossibleVariable(graph, selection); - if(variable == null) return; - - Layer0 L0 = Layer0.getInstance(graph); - SelectionViewResources SEL = SelectionViewResources.getInstance(graph); - - Integer priority = graph.getPossibleRelatedValue(configuration, SEL.AbstractVariableTabContribution_HasPriority, Bindings.INTEGER); - String label = graph.getPossibleRelatedValue(configuration, L0.HasLabel); - - if(!accept(graph, variable, selection)) return; - - getContributors(graph, variable, priority, label, result); - - } - - @Override - public String toString() { - return "AbstractVariableTabContribution[" + uri + "]"; - } - } diff --git a/bundles/org.simantics.selectionview/src/org/simantics/selectionview/MultiTypedTabContribution.java b/bundles/org.simantics.selectionview/src/org/simantics/selectionview/MultiTypedTabContribution.java new file mode 100644 index 000000000..9ffd74a60 --- /dev/null +++ b/bundles/org.simantics.selectionview/src/org/simantics/selectionview/MultiTypedTabContribution.java @@ -0,0 +1,135 @@ +package org.simantics.selectionview; + +import java.util.Collection; +import java.util.Collections; +import java.util.HashSet; +import java.util.Set; + +import org.eclipse.swt.SWT; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Event; +import org.eclipse.swt.widgets.Listener; +import org.eclipse.ui.IWorkbenchSite; +import org.simantics.db.ReadGraph; +import org.simantics.db.Resource; +import org.simantics.db.common.utils.Logger; +import org.simantics.db.exception.DatabaseException; +import org.simantics.db.layer0.variable.Variable; +import org.simantics.db.layer0.variable.Variables; +import org.simantics.ui.selection.AnyResource; +import org.simantics.ui.selection.WorkbenchSelectionElement; +import org.simantics.views.swt.SWTViewLoaderProcess; +import org.simantics.views.swt.client.base.SWTRoot; + +public class MultiTypedTabContribution extends AbstractTypedTabContribution { + + public MultiTypedTabContribution(ReadGraph graph, Resource configuration) throws DatabaseException { + super(graph, configuration); + } + + static class Contribution extends ModelledTabContributor { + + private String viewURI; + + public Contribution(String viewURI) { + this.viewURI = viewURI; + } + + @Override + public void createControls(Composite body, IWorkbenchSite site) { + + try { + + final SWTViewLoaderProcess loader = new SWTViewLoaderProcess(null, site); + final SWTRoot root = loader.load(viewURI, runtime); + root.createControls(body); + body.addListener(SWT.Dispose, new Listener() { + + @Override + public void handleEvent(Event event) { + if(!loader.isDisposed()) + loader.dispose(); + } + + }); + + } catch (DatabaseException e) { + + e.printStackTrace(); + Logger.defaultLogError(e); + + } + + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + else if (obj == null) + return false; + else if (!(obj instanceof Contribution)) + return false; + Contribution c = (Contribution)obj; + return viewURI.equals(c.viewURI); + } + + @Override + public int hashCode() { + return viewURI.hashCode(); + } + + } + + @Override + public boolean accept(ReadGraph graph, Object input) throws DatabaseException { + return true; + } + + @Override + public boolean accept(ReadGraph graph, Object input, Collection type) throws DatabaseException { + return true; + } + + @Override + public void getContributors(ReadGraph graph, Object input, Integer priority, String label, Collection result) throws DatabaseException { + Collection objects; + if (input instanceof Collection) { + objects = (Collection) input; + } else { + objects = Collections.singletonList(input); + } + + SelectionViewResources SEL = SelectionViewResources.getInstance(graph); + Resource view = graph.getPossibleObject(configuration, SEL.VariableTabContribution_HasView); + if(view == null) { + throw new DatabaseException("No view for " + graph.getPossibleURI(configuration)); + } + + Set actualResult = new HashSet<>(objects.size()); + for (Object obj : objects) { + Resource resource = getPossibleResource(graph, obj); + if (resource == null) + continue; + + Collection ts = graph.getTypes(resource); + + if (!Collections.disjoint(types, ts)) { + Variable variable = Variables.getVariable(graph, resource); + actualResult.add(variable); + } + } + if (!actualResult.isEmpty()) { + final String viewURI = graph.getPossibleURI(view); + result.add(new ComparableTabContributor(new Contribution(viewURI), priority, actualResult, label)); + } + } + + private Resource getPossibleResource(ReadGraph graph, Object obj) { + if (obj instanceof Resource) + return (Resource) obj; + if (obj instanceof WorkbenchSelectionElement) + return ((WorkbenchSelectionElement) obj).getContent(new AnyResource(graph)); + return null; + } +} diff --git a/bundles/org.simantics.selectionview/src/org/simantics/selectionview/TypedVariableTabContribution.java b/bundles/org.simantics.selectionview/src/org/simantics/selectionview/TypedVariableTabContribution.java index 68d6cdae4..10d4b465d 100644 --- a/bundles/org.simantics.selectionview/src/org/simantics/selectionview/TypedVariableTabContribution.java +++ b/bundles/org.simantics.selectionview/src/org/simantics/selectionview/TypedVariableTabContribution.java @@ -108,13 +108,13 @@ public class TypedVariableTabContribution implements TabContribution { Layer0 L0 = Layer0.getInstance(graph); SelectionViewResources SEL = SelectionViewResources.getInstance(graph); - Collection types = graph.getObjects(configuration, SEL.TypedVariableTabContribution_HasType); + Collection types = graph.getObjects(configuration, SEL.TypedTabContribution_HasType); if(types.isEmpty()) throw new DatabaseException("No type for " + graph.getPossibleURI(configuration)); Resource view = graph.getPossibleObject(configuration, SEL.VariableTabContribution_HasView); if(view == null) { throw new DatabaseException("No view for " + graph.getPossibleURI(configuration)); } - Integer priority = graph.getPossibleRelatedValue(configuration, SEL.VariableTabContribution_HasPriority, Bindings.INTEGER); + Integer priority = graph.getPossibleRelatedValue(configuration, SEL.TabContribution_HasPriority, Bindings.INTEGER); String label = graph.getPossibleRelatedValue(configuration, L0.HasLabel); final String viewURI = graph.getPossibleURI(view); @@ -126,7 +126,7 @@ public class TypedVariableTabContribution implements TabContribution { if (!Collections.disjoint(types, ts)) { - for(Resource r : graph.getObjects(configuration, SEL.VariableTabContribution_HasTest)) { + for(Resource r : graph.getObjects(configuration, SEL.TabContribution_HasTest)) { Boolean pass = Functions.exec(graph, r, graph, variable); if(!pass) return; } diff --git a/bundles/org.simantics.selectionview/src/org/simantics/selectionview/VariableTabContribution.java b/bundles/org.simantics.selectionview/src/org/simantics/selectionview/VariableTabContribution.java index a3e59985c..2287aab00 100644 --- a/bundles/org.simantics.selectionview/src/org/simantics/selectionview/VariableTabContribution.java +++ b/bundles/org.simantics.selectionview/src/org/simantics/selectionview/VariableTabContribution.java @@ -43,10 +43,10 @@ public class VariableTabContribution implements TabContribution { Resource view = graph.getPossibleObject(configuration, SEL.VariableTabContribution_HasView); if(view == null) throw new DatabaseException("No view for " + graph.getPossibleURI(configuration)); - Integer priority = graph.getPossibleRelatedValue(configuration, SEL.VariableTabContribution_HasPriority, Bindings.INTEGER); + Integer priority = graph.getPossibleRelatedValue(configuration, SEL.TabContribution_HasPriority, Bindings.INTEGER); String label = graph.getPossibleRelatedValue(configuration, L0.HasLabel); - for(Resource r : graph.getObjects(configuration, SEL.VariableTabContribution_HasTest)) { + for(Resource r : graph.getObjects(configuration, SEL.TabContribution_HasTest)) { Boolean pass = Functions.exec(graph, r, graph, variable); if(!pass) return; }