X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.browsing.ui.graph.impl%2Fsrc%2Forg%2Fsimantics%2Fbrowsing%2Fui%2Fgraph%2Fimpl%2FLazyTypeAcceptViewpoint.java;h=b03ac89cb1b3a2bef420168fe954011e74b9fe36;hb=71bdfa937786c8b8bc9f984c819ae9f9df09359b;hp=82e7f0c8faf60449e81f6cb41b1311e5a2edf456;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.browsing.ui.graph.impl/src/org/simantics/browsing/ui/graph/impl/LazyTypeAcceptViewpoint.java b/bundles/org.simantics.browsing.ui.graph.impl/src/org/simantics/browsing/ui/graph/impl/LazyTypeAcceptViewpoint.java index 82e7f0c8f..b03ac89cb 100644 --- a/bundles/org.simantics.browsing.ui.graph.impl/src/org/simantics/browsing/ui/graph/impl/LazyTypeAcceptViewpoint.java +++ b/bundles/org.simantics.browsing.ui.graph.impl/src/org/simantics/browsing/ui/graph/impl/LazyTypeAcceptViewpoint.java @@ -1,96 +1,96 @@ -/******************************************************************************* - * 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; - -import java.util.ArrayList; -import java.util.Collection; - -import org.simantics.browsing.ui.NodeContext; -import org.simantics.browsing.ui.PrimitiveQueryUpdater; -import org.simantics.browsing.ui.BuiltinKeys.ViewpointKey; -import org.simantics.browsing.ui.common.NodeContextBuilder; -import org.simantics.db.ReadGraph; -import org.simantics.db.Resource; -import org.simantics.db.exception.DatabaseException; -import org.simantics.layer0.Layer0; - -/** - * A very simple viewpoint that by default browses Consists Of relations and - * accepts as objects any children that are of any of the specified accepted - * types. - * - *
- * The accepted types must be returned through {@link #getAcceptedTypes()} - *
- * - *- * The children production can be customized by overriding - * {@link #getPotentialChildren(ReadGraph, Resource)}. Whatever is produced by this - * method will be filtered through the list of accepted resource types. - *
- * - *- * IMPORTANT: it is vital to actually implement this class and override the - * {@link #getAcceptedTypes(ReadGraph)} method in the process. Otherwise the - * equality comparisons of the resource queries used within LazyViewpoint will - * not work properly! - *
- * - * @author Tuukka Lehtonen - */ -public abstract class LazyTypeAcceptViewpoint extends LazyViewpoint { - - public LazyTypeAcceptViewpoint(PrimitiveQueryUpdater updater, NodeContext context, ViewpointKey key) { - super(updater, context, key); - } - - protected abstract Resource[] getAcceptedTypes(ReadGraph g); - - protected Collection+ * The accepted types must be returned through {@link #getAcceptedTypes()} + *
+ * + *+ * The children production can be customized by overriding + * {@link #getPotentialChildren(ReadGraph, Resource)}. Whatever is produced by this + * method will be filtered through the list of accepted resource types. + *
+ * + *+ * IMPORTANT: it is vital to actually implement this class and override the + * {@link #getAcceptedTypes(ReadGraph)} method in the process. Otherwise the + * equality comparisons of the resource queries used within LazyViewpoint will + * not work properly! + *
+ * + * @author Tuukka Lehtonen + */ +public abstract class LazyTypeAcceptViewpoint extends LazyViewpoint { + + public LazyTypeAcceptViewpoint(PrimitiveQueryUpdater updater, NodeContext context, ViewpointKey key) { + super(updater, context, key); + } + + protected abstract Resource[] getAcceptedTypes(ReadGraph g); + + protected Collection