3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
10 package eu
.etaxonomy
.taxeditor
.bulkeditor
.input
;
12 import java
.beans
.PropertyChangeSupport
;
14 import org
.eclipse
.jface
.resource
.ImageDescriptor
;
15 import org
.eclipse
.ui
.IEditorInput
;
16 import org
.eclipse
.ui
.IPersistableElement
;
18 import eu
.etaxonomy
.cdm
.model
.common
.MarkerType
;
19 import eu
.etaxonomy
.taxeditor
.bulkeditor
.IBulkEditorQuery
;
27 abstract public class BulkEditorInput
extends PropertyChangeSupport
implements IEditorInput
{
32 public BulkEditorInput(Object sourceBean
) {
36 public static final String QUERY_CHANGED
= "query_changed";
38 static public BulkEditorInput
NewInstance(String inputType
) {
40 if (ReferenceEditorInput
.getID().equals(inputType
)) {
41 return new ReferenceEditorInput();
44 if (NameEditorInput
.getID().equals(inputType
)) {
45 return new NameEditorInput();
48 if (AgentEditorInput
.getID().equals(inputType
)) {
49 return new AgentEditorInput();
55 private IBulkEditorQuery query
;
58 * @see org.eclipse.ui.IEditorInput#exists()
60 public boolean exists() {
61 // TODO Auto-generated method stub
66 * @see org.eclipse.ui.IEditorInput#getImageDescriptor()
68 public ImageDescriptor
getImageDescriptor() {
69 // TODO Auto-generated method stub
74 * @see org.eclipse.ui.IEditorInput#getPersistable()
76 public IPersistableElement
getPersistable() {
81 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
83 @SuppressWarnings("unchecked")
84 public Object
getAdapter(Class adapter
) {
89 * @param bulkEditorQuery
91 public void setQuery(IBulkEditorQuery bulkEditorQuery
) {
93 this.query
= bulkEditorQuery
;
96 firePropertyChange(QUERY_CHANGED
, null, null);
100 public IBulkEditorQuery
getQuery() {
104 public boolean isMergingEnabled() {
112 public boolean isMarkerTypeEditingEnabled(MarkerType markerType
) {