-/*******************************************************************************\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.content;\r
-\r
-import java.util.Arrays;\r
-import java.util.Collection;\r
-import java.util.Collections;\r
-\r
-import org.simantics.browsing.ui.GraphExplorer;\r
-import org.simantics.browsing.ui.NodeContext;\r
-import org.simantics.browsing.ui.PrimitiveQueryUpdater;\r
-import org.simantics.browsing.ui.Tester;\r
-\r
-/**\r
- * TODO: FIX THIS JAVADOC IT IS OUT-OF-DATE\r
- * \r
- * A Viewpoint is used for describing the child node generation of a single UI\r
- * (e.g. tree) node. Viewpoints are created on a per UI node basis, including\r
- * the invisible root input of provided to\r
- * {@link GraphExplorer#setRoot(Object)}. Viewpoints are created by\r
- * {@link ViewpointFactory}s.\r
- * \r
- * <p>\r
- * A Viewpoint is responsible for informing of any changes happening in the set\r
- * of children provided by it. Updates are performed using the\r
- * {@link PrimitiveQueryUpdater} received by the {@link ViewpointFactory} that\r
- * created the Viewpoint. To signal that the set of children has (possibly)\r
- * changed, invoke\r
- * {@link PrimitiveQueryUpdater#scheduleReplace(NodeContext, org.simantics.browsing.ui.NodeContext.PrimitiveQueryKey, Object)}\r
- * and eventually the query system will re-request the viewpoint for the new\r
- * children.\r
- * </p>\r
- * \r
- * @author Antti Villberg\r
- * \r
- * @see ViewpointStub\r
- */\r
-public interface ViewpointContribution {\r
-\r
- /**\r
- * Implementers can use this collection as a return value of\r
- * {@link #getContribution()} when the contribution implementation is\r
- * asynchronous and the real result will be updated later.\r
- * \r
- * <p>\r
- * It is purposefully a different instance than {@link #NO_CONTRIBUTION}.\r
- */\r
- Collection<NodeContext> PENDING_CONTRIBUTION = Arrays.asList();\r
-\r
- /**\r
- * Return this from {@link #getContribution()} to indicate that no viewpoint\r
- * contributions are available.\r
- */\r
- Collection<NodeContext> NO_CONTRIBUTION = Collections.emptyList();\r
-\r
- /**\r
- * @return a collection of contributions, must not be <code>null</code>\r
- */\r
- Collection<NodeContext> getContribution();\r
-\r
- /**\r
- * @return <code>null</code> if there is no tester\r
- */\r
- Tester getNodeContextTester();\r
-\r
- Class<?> getInputClass();\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.content;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+
+import org.simantics.browsing.ui.GraphExplorer;
+import org.simantics.browsing.ui.NodeContext;
+import org.simantics.browsing.ui.PrimitiveQueryUpdater;
+import org.simantics.browsing.ui.Tester;
+
+/**
+ * TODO: FIX THIS JAVADOC IT IS OUT-OF-DATE
+ *
+ * A Viewpoint is used for describing the child node generation of a single UI
+ * (e.g. tree) node. Viewpoints are created on a per UI node basis, including
+ * the invisible root input of provided to
+ * {@link GraphExplorer#setRoot(Object)}. Viewpoints are created by
+ * {@link ViewpointFactory}s.
+ *
+ * <p>
+ * A Viewpoint is responsible for informing of any changes happening in the set
+ * of children provided by it. Updates are performed using the
+ * {@link PrimitiveQueryUpdater} received by the {@link ViewpointFactory} that
+ * created the Viewpoint. To signal that the set of children has (possibly)
+ * changed, invoke
+ * {@link PrimitiveQueryUpdater#scheduleReplace(NodeContext, org.simantics.browsing.ui.NodeContext.PrimitiveQueryKey, Object)}
+ * and eventually the query system will re-request the viewpoint for the new
+ * children.
+ * </p>
+ *
+ * @author Antti Villberg
+ *
+ * @see ViewpointStub
+ */
+public interface ViewpointContribution {
+
+ /**
+ * Implementers can use this collection as a return value of
+ * {@link #getContribution()} when the contribution implementation is
+ * asynchronous and the real result will be updated later.
+ *
+ * <p>
+ * It is purposefully a different instance than {@link #NO_CONTRIBUTION}.
+ */
+ Collection<NodeContext> PENDING_CONTRIBUTION = Arrays.asList();
+
+ /**
+ * Return this from {@link #getContribution()} to indicate that no viewpoint
+ * contributions are available.
+ */
+ Collection<NodeContext> NO_CONTRIBUTION = Collections.emptyList();
+
+ /**
+ * @return a collection of contributions, must not be <code>null</code>
+ */
+ Collection<NodeContext> getContribution();
+
+ /**
+ * @return <code>null</code> if there is no tester
+ */
+ Tester getNodeContextTester();
+
+ Class<?> getInputClass();
+
+}