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.
11 package eu
.etaxonomy
.taxeditor
.bulkeditor
.command
;
13 import org
.apache
.log4j
.Logger
;
14 import org
.eclipse
.core
.expressions
.PropertyTester
;
15 import org
.eclipse
.ui
.IEditorInput
;
17 import eu
.etaxonomy
.taxeditor
.bulkeditor
.BulkEditor
;
18 import eu
.etaxonomy
.taxeditor
.bulkeditor
.input
.BulkEditorInput
;
25 public class BulkEditorPropertyTester
extends PropertyTester
{
26 private static final Logger logger
= Logger
27 .getLogger(BulkEditorPropertyTester
.class);
30 * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
32 public boolean test(Object receiver
, String property
, Object
[] args
,
33 Object expectedValue
) {
34 BulkEditor bulkEditor
= (BulkEditor
) receiver
;
35 if ("isMergingEnabled".equals(property
)) {
36 IEditorInput input
= bulkEditor
.getEditorInput();
37 if (input
instanceof BulkEditorInput
) {
38 return ((BulkEditorInput
) input
).isMergingEnabled();
41 // if (("isPublishFlagEditingEnabled").equals(property)) {
42 // IEditorInput input = bulkEditor.getEditorInput();
43 // if (input instanceof NameEditorInput) {
44 // return ((NameEditorInput) input).isPublishFlagEnabled();