X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.browsing.ui%2Fsrc%2Forg%2Fsimantics%2Fbrowsing%2Fui%2Fcontent%2FViewpointContribution.java;fp=bundles%2Forg.simantics.browsing.ui%2Fsrc%2Forg%2Fsimantics%2Fbrowsing%2Fui%2Fcontent%2FViewpointContribution.java;h=a6bf4354c7f3e8428d7970346812ad52a2e5ac54;hp=a7c9fd1ebf022479b29b52d77d874f7ba29db9a5;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hpb=24e2b34260f219f0d1644ca7a138894980e25b14 diff --git a/bundles/org.simantics.browsing.ui/src/org/simantics/browsing/ui/content/ViewpointContribution.java b/bundles/org.simantics.browsing.ui/src/org/simantics/browsing/ui/content/ViewpointContribution.java index a7c9fd1eb..a6bf4354c 100644 --- a/bundles/org.simantics.browsing.ui/src/org/simantics/browsing/ui/content/ViewpointContribution.java +++ b/bundles/org.simantics.browsing.ui/src/org/simantics/browsing/ui/content/ViewpointContribution.java @@ -1,77 +1,77 @@ -/******************************************************************************* - * 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. - * - *

- * 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. - *

- * - * @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. - * - *

- * It is purposefully a different instance than {@link #NO_CONTRIBUTION}. - */ - Collection PENDING_CONTRIBUTION = Arrays.asList(); - - /** - * Return this from {@link #getContribution()} to indicate that no viewpoint - * contributions are available. - */ - Collection NO_CONTRIBUTION = Collections.emptyList(); - - /** - * @return a collection of contributions, must not be null - */ - Collection getContribution(); - - /** - * @return null if there is no tester - */ - Tester getNodeContextTester(); - - Class getInputClass(); - -} +/******************************************************************************* + * 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. + * + *

+ * 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. + *

+ * + * @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. + * + *

+ * It is purposefully a different instance than {@link #NO_CONTRIBUTION}. + */ + Collection PENDING_CONTRIBUTION = Arrays.asList(); + + /** + * Return this from {@link #getContribution()} to indicate that no viewpoint + * contributions are available. + */ + Collection NO_CONTRIBUTION = Collections.emptyList(); + + /** + * @return a collection of contributions, must not be null + */ + Collection getContribution(); + + /** + * @return null if there is no tester + */ + Tester getNodeContextTester(); + + Class getInputClass(); + +}