X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.ui%2Fsrc%2Forg%2Fsimantics%2Fui%2Fworkbench%2Fe4%2FE4ResourceEditorInput.java;fp=bundles%2Forg.simantics.ui%2Fsrc%2Forg%2Fsimantics%2Fui%2Fworkbench%2Fe4%2FE4ResourceEditorInput.java;h=e7573a3939c5fa4be3eff32fab50b50377d77392;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hp=fb270912398b66512a9359fe2e189161663be8a8;hpb=24e2b34260f219f0d1644ca7a138894980e25b14;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.ui/src/org/simantics/ui/workbench/e4/E4ResourceEditorInput.java b/bundles/org.simantics.ui/src/org/simantics/ui/workbench/e4/E4ResourceEditorInput.java index fb2709123..e7573a393 100644 --- a/bundles/org.simantics.ui/src/org/simantics/ui/workbench/e4/E4ResourceEditorInput.java +++ b/bundles/org.simantics.ui/src/org/simantics/ui/workbench/e4/E4ResourceEditorInput.java @@ -1,88 +1,88 @@ -package org.simantics.ui.workbench.e4; - -import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.ui.IPersistableElement; -import org.simantics.db.ReadGraph; -import org.simantics.db.Resource; -import org.simantics.db.common.ResourceArray; -import org.simantics.db.exception.DatabaseException; -import org.simantics.ui.workbench.IResourceEditorInput; - -/** - * @author Tuukka Lehtonen - * @since 1.22 - */ -public class E4ResourceEditorInput implements IResourceEditorInput { - - protected final Resource resource; - protected final ResourceArray resourceArray; - - public E4ResourceEditorInput(ResourceArray ra) { - this.resourceArray = ra; - this.resource = null; - } - - public E4ResourceEditorInput(Resource resource) { - this.resource = resource; - this.resourceArray = new ResourceArray(resource); - } - - @Override - public boolean exists() { - return true; - } - - @Override - public ImageDescriptor getImageDescriptor() { - return null; - } - - @Override - public String getName() { - return ""; - } - - @Override - public IPersistableElement getPersistable() { - return null; - } - - @Override - public String getToolTipText() { - return null; - } - - @Override - public T getAdapter(Class adapter) { - return null; - } - - @Override - public void init(IAdaptable adapter) throws DatabaseException { - } - - @Override - public void dispose() { - } - - @Override - public Resource getResource() { - return resource; - } - - @Override - public ResourceArray getResourceArray() { - return resourceArray; - } - - @Override - public boolean exists(ReadGraph graph) throws DatabaseException { - return graph.hasStatement(resource); - } - - @Override - public void update(ReadGraph g) throws DatabaseException { - } - -} +package org.simantics.ui.workbench.e4; + +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.ui.IPersistableElement; +import org.simantics.db.ReadGraph; +import org.simantics.db.Resource; +import org.simantics.db.common.ResourceArray; +import org.simantics.db.exception.DatabaseException; +import org.simantics.ui.workbench.IResourceEditorInput; + +/** + * @author Tuukka Lehtonen + * @since 1.22 + */ +public class E4ResourceEditorInput implements IResourceEditorInput { + + protected final Resource resource; + protected final ResourceArray resourceArray; + + public E4ResourceEditorInput(ResourceArray ra) { + this.resourceArray = ra; + this.resource = null; + } + + public E4ResourceEditorInput(Resource resource) { + this.resource = resource; + this.resourceArray = new ResourceArray(resource); + } + + @Override + public boolean exists() { + return true; + } + + @Override + public ImageDescriptor getImageDescriptor() { + return null; + } + + @Override + public String getName() { + return ""; + } + + @Override + public IPersistableElement getPersistable() { + return null; + } + + @Override + public String getToolTipText() { + return null; + } + + @Override + public T getAdapter(Class adapter) { + return null; + } + + @Override + public void init(IAdaptable adapter) throws DatabaseException { + } + + @Override + public void dispose() { + } + + @Override + public Resource getResource() { + return resource; + } + + @Override + public ResourceArray getResourceArray() { + return resourceArray; + } + + @Override + public boolean exists(ReadGraph graph) throws DatabaseException { + return graph.hasStatement(resource); + } + + @Override + public void update(ReadGraph g) throws DatabaseException { + } + +}