KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > part > services > NullContributionManager


1 /*******************************************************************************
2  * Copyright (c) 2004, 2005 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.ui.internal.part.services;
12
13 import org.eclipse.jface.action.IAction;
14 import org.eclipse.jface.action.IContributionItem;
15 import org.eclipse.jface.action.IContributionManager;
16 import org.eclipse.jface.action.IContributionManagerOverrides;
17
18 /**
19  * @since 3.1
20  */

21 public class NullContributionManager implements IContributionManager {
22
23     private IContributionManagerOverrides overrides = new NullContributionManagerOverrides();
24     
25     /* (non-Javadoc)
26      * @see org.eclipse.jface.action.IContributionManager#add(org.eclipse.jface.action.IAction)
27      */

28     public void add(IAction action) {
29
30     }
31
32     /* (non-Javadoc)
33      * @see org.eclipse.jface.action.IContributionManager#add(org.eclipse.jface.action.IContributionItem)
34      */

35     public void add(IContributionItem item) {
36
37     }
38
39     /* (non-Javadoc)
40      * @see org.eclipse.jface.action.IContributionManager#appendToGroup(java.lang.String, org.eclipse.jface.action.IAction)
41      */

42     public void appendToGroup(String JavaDoc groupName, IAction action) {
43
44     }
45
46     /* (non-Javadoc)
47      * @see org.eclipse.jface.action.IContributionManager#appendToGroup(java.lang.String, org.eclipse.jface.action.IContributionItem)
48      */

49     public void appendToGroup(String JavaDoc groupName, IContributionItem item) {
50
51     }
52
53     /* (non-Javadoc)
54      * @see org.eclipse.jface.action.IContributionManager#find(java.lang.String)
55      */

56     public IContributionItem find(String JavaDoc id) {
57         return null;
58     }
59
60     /* (non-Javadoc)
61      * @see org.eclipse.jface.action.IContributionManager#getItems()
62      */

63     public IContributionItem[] getItems() {
64         return new IContributionItem[0];
65     }
66
67     /* (non-Javadoc)
68      * @see org.eclipse.jface.action.IContributionManager#getOverrides()
69      */

70     public IContributionManagerOverrides getOverrides() {
71         return overrides;
72     }
73
74     /* (non-Javadoc)
75      * @see org.eclipse.jface.action.IContributionManager#insertAfter(java.lang.String, org.eclipse.jface.action.IAction)
76      */

77     public void insertAfter(String JavaDoc id, IAction action) {
78     }
79
80     /* (non-Javadoc)
81      * @see org.eclipse.jface.action.IContributionManager#insertAfter(java.lang.String, org.eclipse.jface.action.IContributionItem)
82      */

83     public void insertAfter(String JavaDoc id, IContributionItem item) {
84
85     }
86
87     /* (non-Javadoc)
88      * @see org.eclipse.jface.action.IContributionManager#insertBefore(java.lang.String, org.eclipse.jface.action.IAction)
89      */

90     public void insertBefore(String JavaDoc id, IAction action) {
91
92     }
93
94     /* (non-Javadoc)
95      * @see org.eclipse.jface.action.IContributionManager#insertBefore(java.lang.String, org.eclipse.jface.action.IContributionItem)
96      */

97     public void insertBefore(String JavaDoc id, IContributionItem item) {
98
99     }
100
101     /* (non-Javadoc)
102      * @see org.eclipse.jface.action.IContributionManager#isDirty()
103      */

104     public boolean isDirty() {
105         return false;
106     }
107
108     /* (non-Javadoc)
109      * @see org.eclipse.jface.action.IContributionManager#isEmpty()
110      */

111     public boolean isEmpty() {
112         return true;
113     }
114
115     /* (non-Javadoc)
116      * @see org.eclipse.jface.action.IContributionManager#markDirty()
117      */

118     public void markDirty() {
119
120     }
121
122     /* (non-Javadoc)
123      * @see org.eclipse.jface.action.IContributionManager#prependToGroup(java.lang.String, org.eclipse.jface.action.IAction)
124      */

125     public void prependToGroup(String JavaDoc groupName, IAction action) {
126
127     }
128
129     /* (non-Javadoc)
130      * @see org.eclipse.jface.action.IContributionManager#prependToGroup(java.lang.String, org.eclipse.jface.action.IContributionItem)
131      */

132     public void prependToGroup(String JavaDoc groupName, IContributionItem item) {
133
134     }
135
136     /* (non-Javadoc)
137      * @see org.eclipse.jface.action.IContributionManager#remove(java.lang.String)
138      */

139     public IContributionItem remove(String JavaDoc id) {
140         return null;
141     }
142
143     /* (non-Javadoc)
144      * @see org.eclipse.jface.action.IContributionManager#remove(org.eclipse.jface.action.IContributionItem)
145      */

146     public IContributionItem remove(IContributionItem item) {
147         return null;
148     }
149
150     /* (non-Javadoc)
151      * @see org.eclipse.jface.action.IContributionManager#removeAll()
152      */

153     public void removeAll() {
154
155     }
156
157     /* (non-Javadoc)
158      * @see org.eclipse.jface.action.IContributionManager#update(boolean)
159      */

160     public void update(boolean force) {
161
162     }
163
164 }
165
Popular Tags