import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.ui.IWorkbenchPartSite;
import org.simantics.Simantics;
-import org.simantics.browsing.ui.swt.AdaptableHintContext;
+import org.simantics.browsing.ui.common.AdaptableHintContext;
import org.simantics.db.ReadGraph;
import org.simantics.db.Resource;
import org.simantics.db.common.request.ResourceRead;
import org.simantics.db.layer0.request.PossibleModel;
import org.simantics.db.layer0.variable.Variable;
import org.simantics.db.layer0.variable.Variables;
-import org.simantics.diagram.Logger;
import org.simantics.diagram.flag.FlagUtil;
import org.simantics.diagram.stubs.DiagramResource;
import org.simantics.diagram.ui.DiagramModelHints;
import org.simantics.utils.DataContainer;
import org.simantics.utils.threads.IThreadWorkQueue;
import org.simantics.utils.ui.ErrorLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* @author Antti Villberg
protected static class SelectionElement extends AdaptableHintContext {
+ private static final Logger LOGGER = LoggerFactory.getLogger(SelectionElement.class);
+
final public Resource runtime;
final public Resource element;
}
});
} catch (DatabaseException e) {
- Logger.defaultLogError(e);
+ LOGGER.error("WorkbenchSelectionElement.getContent failed for type AnyVariable", e);
}
}
else if(contentType instanceof ParentVariable) {
return (T) type.processor.sync(new ResourceRead2<Variable>(runtime, element) {
@Override
public Variable perform(ReadGraph graph) throws DatabaseException {
-
DiagramResource DIA = DiagramResource.getInstance(graph);
- ModelingResources MOD = ModelingResources.getInstance(graph);
- Layer0 L0 = Layer0.getInstance(graph);
String uri = graph.getPossibleRelatedValue(resource, DIA.RuntimeDiagram_HasVariable);
if (uri == null)
}
});
} catch (DatabaseException e) {
- Logger.defaultLogError(e);
+ LOGGER.error("WorkbenchSelectionElement.getContent failed for type ParentVariable", e);
}
}
if (resource != null) {
objects.add( constructSelectionElement(runtime, resource) );
} else {
- System.out.println(" unrecognized selection: " + o.getClass() + ": " + o);
+ System.out.println(" unrecognized selection: " + o.getClass() + ": " + o); //$NON-NLS-1$ //$NON-NLS-2$
}
}
if (objects.isEmpty() && runtime != null && dr != null) {