KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > compare > internal > MergeViewerAction


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.compare.internal;
12
13 import org.eclipse.ui.texteditor.IUpdate;
14 import org.eclipse.jface.action.Action;
15
16
17 public abstract class MergeViewerAction extends Action implements IUpdate {
18     
19     private boolean fMutable;
20     private boolean fSelection;
21     private boolean fContent;
22     
23     public MergeViewerAction(boolean mutable, boolean selection, boolean content) {
24         fMutable= mutable;
25         fSelection= selection;
26         fContent= content;
27     }
28
29     public boolean isSelectionDependent() {
30         return fSelection;
31     }
32     
33     public boolean isContentDependent() {
34         return fContent;
35     }
36     
37     public boolean isEditableDependent() {
38         return fMutable;
39     }
40     
41     public void update() {
42         // empty default implementation
43
}
44 }
45
Popular Tags