]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.browsing.ui.graph.impl/src/org/simantics/browsing/ui/graph/impl/contributor/viewpoint/ContextInputCallbackViewpointContributorImpl.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.browsing.ui.graph.impl / src / org / simantics / browsing / ui / graph / impl / contributor / viewpoint / ContextInputCallbackViewpointContributorImpl.java
index bd26d2003ba60cee8d3a5f350dcdbeb4e4e94ddd..e188d67aa83a3103c2e94643c143de5b1e7452ad 100644 (file)
@@ -1,94 +1,94 @@
-/*******************************************************************************\r
- * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
- * in Industry THTH ry.\r
- * All rights reserved. This program and the accompanying materials\r
- * are made available under the terms of the Eclipse Public License v1.0\r
- * which accompanies this distribution, and is available at\r
- * http://www.eclipse.org/legal/epl-v10.html\r
- *\r
- * Contributors:\r
- *     VTT Technical Research Centre of Finland - initial API and implementation\r
- *******************************************************************************/\r
-package org.simantics.browsing.ui.graph.impl.contributor.viewpoint;\r
-\r
-import java.util.Collection;\r
-import java.util.function.Consumer;\r
-\r
-import org.simantics.browsing.ui.BuiltinKeys.ViewpointContributionKey;\r
-import org.simantics.browsing.ui.NodeContext;\r
-import org.simantics.browsing.ui.PrimitiveQueryUpdater;\r
-import org.simantics.browsing.ui.Tester;\r
-import org.simantics.browsing.ui.content.Contributor;\r
-import org.simantics.browsing.ui.content.ViewpointContribution;\r
-import org.simantics.browsing.ui.content.ViewpointContributionFactory;\r
-import org.simantics.browsing.ui.graph.impl.contribution.CallbackViewpointContributionImpl;\r
-import org.simantics.db.ReadGraph;\r
-import org.simantics.db.exception.DatabaseException;\r
-\r
-abstract public class ContextInputCallbackViewpointContributorImpl implements Contributor<ViewpointContributionFactory> {\r
-\r
-    abstract public void getContribution(ReadGraph graph, NodeContext context, Consumer<Collection<?>> callback) throws DatabaseException;\r
-\r
-    abstract public String getViewpointId();\r
-\r
-    final private Class<?> clazz;\r
-\r
-    @Override\r
-    public Tester getNodeContextTester() {\r
-        return null;\r
-    }\r
-\r
-    public ContextInputCallbackViewpointContributorImpl() {\r
-        clazz = Object.class;\r
-    }\r
-\r
-    public ContextInputCallbackViewpointContributorImpl(Class<?> clazz) {\r
-        this.clazz = clazz;\r
-    }\r
-\r
-    @Override\r
-    public ViewpointContributionFactory getFactory() {\r
-\r
-        return new ViewpointContributionFactory() {\r
-\r
-            @Override\r
-            public String getViewpointId() {\r
-                return ContextInputCallbackViewpointContributorImpl.this.getViewpointId();\r
-            }\r
-\r
-            @Override\r
-            public ViewpointContribution create(final PrimitiveQueryUpdater updater, NodeContext context, final ViewpointContributionKey key) {\r
-\r
-                return new CallbackViewpointContributionImpl(updater, context, key) {\r
-\r
-                    @Override\r
-                    public void children(ReadGraph graph, NodeContext context, Consumer<Collection<?>> callback) throws DatabaseException {\r
-\r
-                        ContextInputCallbackViewpointContributorImpl.this.getContribution(graph, context, callback);\r
-\r
-                    }\r
-\r
-                    @Override\r
-                    public Tester getNodeContextTester() {\r
-                        return ContextInputCallbackViewpointContributorImpl.this.getNodeContextTester();\r
-                    }\r
-\r
-                    @Override\r
-                    public Class<?> getInputClass() {\r
-                        return ContextInputCallbackViewpointContributorImpl.this.getInputClass();\r
-                    }\r
-\r
-                };\r
-\r
-            }\r
-\r
-        };\r
-\r
-    }\r
-\r
-    @Override\r
-    public Class<?> getInputClass() {\r
-        return clazz;\r
-    }\r
-\r
-}\r
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Association for Decentralized Information Management
+ * in Industry THTH ry.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     VTT Technical Research Centre of Finland - initial API and implementation
+ *******************************************************************************/
+package org.simantics.browsing.ui.graph.impl.contributor.viewpoint;
+
+import java.util.Collection;
+import java.util.function.Consumer;
+
+import org.simantics.browsing.ui.BuiltinKeys.ViewpointContributionKey;
+import org.simantics.browsing.ui.NodeContext;
+import org.simantics.browsing.ui.PrimitiveQueryUpdater;
+import org.simantics.browsing.ui.Tester;
+import org.simantics.browsing.ui.content.Contributor;
+import org.simantics.browsing.ui.content.ViewpointContribution;
+import org.simantics.browsing.ui.content.ViewpointContributionFactory;
+import org.simantics.browsing.ui.graph.impl.contribution.CallbackViewpointContributionImpl;
+import org.simantics.db.ReadGraph;
+import org.simantics.db.exception.DatabaseException;
+
+abstract public class ContextInputCallbackViewpointContributorImpl implements Contributor<ViewpointContributionFactory> {
+
+    abstract public void getContribution(ReadGraph graph, NodeContext context, Consumer<Collection<?>> callback) throws DatabaseException;
+
+    abstract public String getViewpointId();
+
+    final private Class<?> clazz;
+
+    @Override
+    public Tester getNodeContextTester() {
+        return null;
+    }
+
+    public ContextInputCallbackViewpointContributorImpl() {
+        clazz = Object.class;
+    }
+
+    public ContextInputCallbackViewpointContributorImpl(Class<?> clazz) {
+        this.clazz = clazz;
+    }
+
+    @Override
+    public ViewpointContributionFactory getFactory() {
+
+        return new ViewpointContributionFactory() {
+
+            @Override
+            public String getViewpointId() {
+                return ContextInputCallbackViewpointContributorImpl.this.getViewpointId();
+            }
+
+            @Override
+            public ViewpointContribution create(final PrimitiveQueryUpdater updater, NodeContext context, final ViewpointContributionKey key) {
+
+                return new CallbackViewpointContributionImpl(updater, context, key) {
+
+                    @Override
+                    public void children(ReadGraph graph, NodeContext context, Consumer<Collection<?>> callback) throws DatabaseException {
+
+                        ContextInputCallbackViewpointContributorImpl.this.getContribution(graph, context, callback);
+
+                    }
+
+                    @Override
+                    public Tester getNodeContextTester() {
+                        return ContextInputCallbackViewpointContributorImpl.this.getNodeContextTester();
+                    }
+
+                    @Override
+                    public Class<?> getInputClass() {
+                        return ContextInputCallbackViewpointContributorImpl.this.getInputClass();
+                    }
+
+                };
+
+            }
+
+        };
+
+    }
+
+    @Override
+    public Class<?> getInputClass() {
+        return clazz;
+    }
+
+}