]> git.argeo.org Git - lgpl/argeo-commons.git/blob - eclipse/runtime/org.argeo.eclipse.ui.jcr/src/main/java/org/argeo/eclipse/ui/jcr/editors/JcrQueryEditorInput.java
Add a logger
[lgpl/argeo-commons.git] / eclipse / runtime / org.argeo.eclipse.ui.jcr / src / main / java / org / argeo / eclipse / ui / jcr / editors / JcrQueryEditorInput.java
1 package org.argeo.eclipse.ui.jcr.editors;
2
3 import javax.jcr.query.Query;
4
5 import org.eclipse.jface.resource.ImageDescriptor;
6 import org.eclipse.ui.IEditorInput;
7 import org.eclipse.ui.IPersistableElement;
8
9 public class JcrQueryEditorInput implements IEditorInput {
10 private final String query;
11 private final String queryType;
12
13 public JcrQueryEditorInput(String query, String queryType) {
14 this.query = query;
15 if (queryType == null)
16 this.queryType = Query.JCR_SQL2;
17 else
18 this.queryType = queryType;
19 }
20
21 public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
22 return null;
23 }
24
25 public boolean exists() {
26 return true;
27 }
28
29 public ImageDescriptor getImageDescriptor() {
30 return null;
31 }
32
33 public String getName() {
34 return query;
35 }
36
37 public IPersistableElement getPersistable() {
38 return null;
39 }
40
41 public String getToolTipText() {
42 return query;
43 }
44
45 public String getQuery() {
46 return query;
47 }
48
49 public String getQueryType() {
50 return queryType;
51 }
52
53 }