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%2FDecorator.java;h=ab54899c0517bd742acc5788bdfc271f37792db9;hb=b45e9e5c1696a2e729dcecac0f58d16c15391770;hp=e6e90608e83590eeebe4349135cb0717c85d5e0f;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/modelBrowser/model/Decorator.java b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/modelBrowser/model/Decorator.java index e6e90608e..ab54899c0 100644 --- a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/modelBrowser/model/Decorator.java +++ b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/modelBrowser/model/Decorator.java @@ -1,91 +1,91 @@ -/******************************************************************************* - * 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.Collection; - -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.jface.viewers.ISelection; -import org.simantics.browsing.ui.content.Labeler.Modifier; -import org.simantics.db.ReadGraph; -import org.simantics.db.Session; -import org.simantics.db.WriteGraph; -import org.simantics.db.exception.DatabaseException; - -@Deprecated -public class Decorator implements INode { - - INode base; - - public Decorator(INode base) { - this.base = base; - } - - @Override - public Collection getChildren(ReadGraph g) throws DatabaseException { - return base.getChildren(g); - } - - @Override - public ImageDescriptor getImage(ReadGraph g) throws DatabaseException { - return base.getImage(g); - } - - @Override - public String getLabel(ReadGraph g) throws DatabaseException { - return base.getLabel(g); - } - - @Override - public int getCategory(ReadGraph graph) throws DatabaseException { - return base.getCategory(graph); - } - - @Override - public boolean hasChildren(ReadGraph g) throws DatabaseException { - return base.hasChildren(g); - } - - @Override - public Object getAdapter(Class adapter) { - return base.getAdapter(adapter); - } - - @Override - public boolean equals(Object obj) { - if(this == obj) - return true; - if(obj == null) - return false; - return getClass().equals(obj.getClass()) && base.equals(((Decorator)obj).base); - } - - @Override - public int hashCode() { - return getClass().hashCode() + 31 * base.hashCode(); - } - - @Override - public void handleDrop(Session session, ISelection selection) { - base.handleDrop(session, selection); - } - - @Override - public void handleDelete(WriteGraph graph) throws DatabaseException { - base.handleDelete(graph); - } - - @Override - public Modifier getModifier(Session session, String columnId) { - return base.getModifier(session, 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.Collection; + +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.jface.viewers.ISelection; +import org.simantics.browsing.ui.content.Labeler.Modifier; +import org.simantics.db.ReadGraph; +import org.simantics.db.Session; +import org.simantics.db.WriteGraph; +import org.simantics.db.exception.DatabaseException; + +@Deprecated +public class Decorator implements INode { + + INode base; + + public Decorator(INode base) { + this.base = base; + } + + @Override + public Collection getChildren(ReadGraph g) throws DatabaseException { + return base.getChildren(g); + } + + @Override + public ImageDescriptor getImage(ReadGraph g) throws DatabaseException { + return base.getImage(g); + } + + @Override + public String getLabel(ReadGraph g) throws DatabaseException { + return base.getLabel(g); + } + + @Override + public int getCategory(ReadGraph graph) throws DatabaseException { + return base.getCategory(graph); + } + + @Override + public boolean hasChildren(ReadGraph g) throws DatabaseException { + return base.hasChildren(g); + } + + @Override + public Object getAdapter(Class adapter) { + return base.getAdapter(adapter); + } + + @Override + public boolean equals(Object obj) { + if(this == obj) + return true; + if(obj == null) + return false; + return getClass().equals(obj.getClass()) && base.equals(((Decorator)obj).base); + } + + @Override + public int hashCode() { + return getClass().hashCode() + 31 * base.hashCode(); + } + + @Override + public void handleDrop(Session session, ISelection selection) { + base.handleDrop(session, selection); + } + + @Override + public void handleDelete(WriteGraph graph) throws DatabaseException { + base.handleDelete(graph); + } + + @Override + public Modifier getModifier(Session session, String columnId) { + return base.getModifier(session, null); + } +}