]> git.argeo.org Git - lgpl/argeo-commons.git/blob - MapEditorInput.java
584138a0d71200bd1824b79378c2e3fedca77a27
[lgpl/argeo-commons.git] / MapEditorInput.java
1 package org.argeo.gis.ui.editors;
2
3 import javax.jcr.Node;
4
5 import org.eclipse.jface.resource.ImageDescriptor;
6 import org.eclipse.ui.IEditorInput;
7 import org.eclipse.ui.IPersistableElement;
8
9 public class MapEditorInput implements IEditorInput {
10 private final Node context;
11
12 public MapEditorInput(Node mapContext) {
13 this.context = mapContext;
14 }
15
16 public Node getContext() {
17 return context;
18 }
19
20 public String getName() {
21 return context.toString();
22 }
23
24 public String getToolTipText() {
25 return context.toString();
26 }
27
28 @SuppressWarnings("rawtypes")
29 public Object getAdapter(Class adapter) {
30 if (Node.class.isAssignableFrom(adapter))
31 return context;
32 return null;
33 }
34
35 public boolean exists() {
36 return false;
37 }
38
39 public ImageDescriptor getImageDescriptor() {
40 return null;
41 }
42
43 public IPersistableElement getPersistable() {
44 return null;
45 }
46
47 }