KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > team > ui > SaveablePartAdapter


1 /*******************************************************************************
2  * Copyright (c) 2000, 2007 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.team.ui;
12
13 import org.eclipse.compare.CompareEditorInput;
14 import org.eclipse.compare.CompareUI;
15 import org.eclipse.ui.*;
16
17 /**
18  * This adapter provides default implementations for methods on {@link ISaveableWorkbenchPart} and
19  * {@link IWorkbenchPart}.
20  * <p>
21  * Classes that want to implement a saveable part can simply implement the methods that
22  * they need while accepting the provided defaults for most of the methods.
23  * </p>
24  * @see SaveablePartDialog
25  * @since 3.0
26  * @deprecated Clients should use a subclass of {@link CompareEditorInput}
27  * and {@link CompareUI#openCompareDialog(org.eclipse.compare.CompareEditorInput)}
28  */

29 public abstract class SaveablePartAdapter implements ISaveableWorkbenchPart {
30
31     /* (non-Javadoc)
32      * @see org.eclipse.ui.ISaveablePart#doSaveAs()
33      */

34     public void doSaveAs() {
35     }
36
37     /* (non-Javadoc)
38      * @see org.eclipse.ui.ISaveablePart#isSaveAsAllowed()
39      */

40     public boolean isSaveAsAllowed() {
41         return false;
42     }
43
44     /* (non-Javadoc)
45      * @see org.eclipse.ui.ISaveablePart#isSaveOnCloseNeeded()
46      */

47     public boolean isSaveOnCloseNeeded() {
48         return false;
49     }
50
51     /* (non-Javadoc)
52      * @see org.eclipse.ui.IWorkbenchPart#addPropertyListener(org.eclipse.ui.IPropertyListener)
53      */

54     public void addPropertyListener(IPropertyListener listener) {
55     }
56
57     /* (non-Javadoc)
58      * @see org.eclipse.ui.IWorkbenchPart#dispose()
59      */

60     public void dispose() {
61     }
62
63     /* (non-Javadoc)
64      * @see org.eclipse.ui.IWorkbenchPart#getSite()
65      */

66     public IWorkbenchPartSite getSite() {
67         return null;
68     }
69
70     /* (non-Javadoc)
71      * @see org.eclipse.ui.IWorkbenchPart#getTitleToolTip()
72      */

73     public String JavaDoc getTitleToolTip() {
74         return null;
75     }
76
77     /* (non-Javadoc)
78      * @see org.eclipse.ui.IWorkbenchPart#removePropertyListener(org.eclipse.ui.IPropertyListener)
79      */

80     public void removePropertyListener(IPropertyListener listener) {
81     }
82
83     /* (non-Javadoc)
84      * @see org.eclipse.ui.IWorkbenchPart#setFocus()
85      */

86     public void setFocus() {
87     }
88
89     /* (non-Javadoc)
90      * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
91      */

92     public Object JavaDoc getAdapter(Class JavaDoc adapter) {
93         return null;
94     }
95 }
96
Popular Tags