1 package org.simantics.tests.modelled.ui.adapters;
5 import org.eclipse.jface.resource.ImageDescriptor;
6 import org.simantics.browsing.ui.model.images.ImageRule;
7 import org.simantics.browsing.ui.model.tests.Test;
8 import org.simantics.browsing.ui.model.visuals.VisualsRule;
9 import org.simantics.databoard.Bindings;
10 import org.simantics.db.ReadGraph;
11 import org.simantics.db.Resource;
12 import org.simantics.db.exception.DatabaseException;
13 import org.simantics.tests.modelled.ontology.TestsResource;
15 public enum IsTestIgnored implements Test, VisualsRule, ImageRule {
19 public static IsTestIgnored get() {
24 public boolean isCompatible(Class<?> contentType) {
25 return Resource.class.equals(contentType);
29 public boolean test(ReadGraph graph, Object content) throws DatabaseException {
30 if (content instanceof Resource) {
31 Resource resource = (Resource) content;
32 TestsResource TESTS = TestsResource.getInstance(graph);
33 return graph.getPossibleRelatedValue2(resource, TESTS.ignore, Bindings.BOOLEAN);
39 public Map<String, ImageDescriptor> getImage(ReadGraph graph, Object content) throws DatabaseException {
40 // TODO Auto-generated method stub