01: package com.xoetrope.editor.eclipse;
02:
03: import org.eclipse.core.resources.IStorage;
04: import org.eclipse.core.runtime.CoreException;
05: import org.eclipse.core.runtime.PlatformObject;
06: import org.eclipse.jface.resource.ImageDescriptor;
07: import org.eclipse.ui.IPersistableElement;
08: import org.eclipse.ui.IStorageEditorInput;
09:
10: public class XStringInput extends PlatformObject implements
11: IStorageEditorInput {
12: private IStorage storage;
13:
14: public XStringInput(IStorage st) {
15: storage = st;
16: }
17:
18: public IStorage getStorage() throws CoreException {
19: return storage;
20: }
21:
22: public boolean exists() {
23: return true;
24: }
25:
26: public ImageDescriptor getImageDescriptor() {
27: return null;
28: }
29:
30: public String getName() {
31: return storage.getName();
32: }
33:
34: public IPersistableElement getPersistable() {
35: return null;
36: }
37:
38: public String getToolTipText() {
39: return "";
40: }
41:
42: }
|