X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.modeling.ui%2Fsrc%2Forg%2Fsimantics%2Fmodeling%2Fui%2FmodelBrowser%2Fmodel%2FCharts.java;h=ab498b861bd57c29117e2f6f92807ac19855deed;hb=c26409b1caf2f1e560d37c5befd11b442399c3fe;hp=084ac9e3c87da1362dd2b6bd3bd54ffc58b0b822;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/modelBrowser/model/Charts.java b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/modelBrowser/model/Charts.java index 084ac9e3c..ab498b861 100644 --- a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/modelBrowser/model/Charts.java +++ b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/modelBrowser/model/Charts.java @@ -1,67 +1,67 @@ -/******************************************************************************* - * 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.modeling.ui.modelBrowser.model; - -import java.util.ArrayList; -import java.util.Collection; - -import org.eclipse.jface.resource.ImageDescriptor; -import org.simantics.charts.ontology.ChartResource; -import org.simantics.db.ReadGraph; -import org.simantics.db.Resource; -import org.simantics.db.exception.DatabaseException; -import org.simantics.layer0.Layer0; -import org.simantics.modeling.ui.Activator; - -@Deprecated -public class Charts extends Node { - - public Charts(Resource resource) { - super(resource); - } - - public Resource getResource() { - return resource; - } - - @Override - public String getLabel(ReadGraph g) - { - return "Charts"; - } - - @Override - public Collection getChildren(ReadGraph g) throws DatabaseException { - Layer0 b = Layer0.getInstance(g); - ChartResource wr = ChartResource.getInstance(g); - Collection ret = new ArrayList(); - for (Resource r : g.getObjects(resource, b.ConsistsOf)) { - if (g.isInstanceOf(r, wr.Chart)) { - ret.add(g.adapt(r, INode.class)); - } - } - return ret; - } - - @Override - public ImageDescriptor getImage(ReadGraph g) { - return Activator.CHARTGROUP_ICON; - } - - @SuppressWarnings("rawtypes") - @Override - public Object getAdapter(Class adapter) { - // deny adaptability, prevent showing of properties this way. - return null; - } - +/******************************************************************************* + * 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.modeling.ui.modelBrowser.model; + +import java.util.ArrayList; +import java.util.Collection; + +import org.eclipse.jface.resource.ImageDescriptor; +import org.simantics.charts.ontology.ChartResource; +import org.simantics.db.ReadGraph; +import org.simantics.db.Resource; +import org.simantics.db.exception.DatabaseException; +import org.simantics.layer0.Layer0; +import org.simantics.modeling.ui.Activator; + +@Deprecated +public class Charts extends Node { + + public Charts(Resource resource) { + super(resource); + } + + public Resource getResource() { + return resource; + } + + @Override + public String getLabel(ReadGraph g) + { + return "Charts"; + } + + @Override + public Collection getChildren(ReadGraph g) throws DatabaseException { + Layer0 b = Layer0.getInstance(g); + ChartResource wr = ChartResource.getInstance(g); + Collection ret = new ArrayList(); + for (Resource r : g.getObjects(resource, b.ConsistsOf)) { + if (g.isInstanceOf(r, wr.Chart)) { + ret.add(g.adapt(r, INode.class)); + } + } + return ret; + } + + @Override + public ImageDescriptor getImage(ReadGraph g) { + return Activator.CHARTGROUP_ICON; + } + + @SuppressWarnings("rawtypes") + @Override + public Object getAdapter(Class adapter) { + // deny adaptability, prevent showing of properties this way. + return null; + } + } \ No newline at end of file