blob: bdf1c163313cd331739382c73e93c0e2059b98dd (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
|
/*******************************************************************************
* Copyright (c) 2001, 2007 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
* yyyymmdd bug Email and other contact information
* -------- -------- -----------------------------------------------------------
* 20070522 184006 pmoogk@ca.ibm.com - Peter Moogk
*******************************************************************************/
package org.eclipse.wst.command.internal.env.preferences;
import java.util.HashSet;
/**
* This class is used to define preference ids. It corresponds to information
* specified by a actionDialogPreferenceType extension point.
* Each actionDialogPreferenceType entry will result in an entry in the
* action dialogs preference page if the showcheckbox field is true.
*
* Here is an example of this extension point.
*
* <pre>
* <extension
* point="org.eclipse.wst.command.env.actionDialogPreferenceType">
* <actionDialogPreferenceType
* showcheckbox="true"
* name="%CHECKBOX_SHOW_GENERATE_JAVA_PROXY_DIALOG"
* category="org.eclipse.jst.wss.popup.category"
* tooltip="%TOOLTIP_PPAD_CHECKBOX_WSDL2PROXY"
* infopop="org.eclipse.jst.ws.consumption.ui.PPAD0004"
* objectids="org.eclipse.jst.ws.consumption.ui.wizard.client.clientwizard.file"
* alwayshide="false"
* id="org.eclipse.jst.ws.consumption.ui.wizard.client.clientwizard">
* </actionDialogPreferenceType>
* </pre>
*
* This actionDialogPreferenceType extension point is associated with an ObjectContribution
* extension point. For example:
*
* <objectContribution
* objectClass="org.eclipse.core.resources.IFile"
* nameFilter="*.wsdl"
* id="org.eclipse.jst.ws.consumption.ui.wizard.client.clientwizard.file">
* <!-- WSDL To Java Bean Proxy -->
* <action
* label="%ACTION_GENERATE_JAVA_PROXY"
* class="org.eclipse.wst.command.env.ui.widgets.popup.DynamicPopupWizard"
* menubarPath="org.eclipse.jst.ws.atk.ui.webservice.category.popupMenu/popupActions"
* id="org.eclipse.jst.ws.consumption.ui.wizard.client.clientwizard">
* </action>
* </objectContribution>
*
* The ObjectContribution entry is linked with the actionDialogPreferenceType entry
* via the id attribute of the ObjectContirbution and the id attribute of actionDialogPreferenceType.
* Note: the id in the action entry is always associated with the dynamic wizard that
* should be popuped up. In the example above the ObjectionContribution id and the
* action ids are the same, but this need not be the case.
*/
public class ActionDialogPreferenceType
{
private String id_;
private String name_;
private String infopop_;
private String tooltip_;
private boolean showCheckbox_;
private boolean alwaysHide_;
private String category_;
private HashSet objectIds_ = new HashSet();
public HashSet getObjectIds()
{
return objectIds_;
}
public void addObjectId( String id )
{
objectIds_.add( id );
}
/**
* Sets the id for this popup action. This id link the actionDialogPreference
* with an ObjectContribution.
* @param id the id.
*/
public void setId(String id)
{
id_ = id;
}
/**
* Gets the id for this popup action.
* @return the id.
*/
public String getId()
{
return id_;
}
/**
* Sets the name for this popup action. This name is displayed on the
* dialog preferences page and must be translated.
* @param name the name of the popup check box.
*/
public void setName(String name)
{
name_ = name;
}
/**
* Gets the display value for this popup check box.
* Note: this value may be null if the getShowCheckBox method returns false.
* @return the name.
*/
public String getName()
{
return name_;
}
/**
* Sets the info pop value for this popup check box.
* @param infopop
*/
public void setInfopop(String infopop)
{
infopop_ = infopop;
}
/**
* Gets the info pop value for this popup check box.
* Note: this value may be null if the getShowCheckBox method returns false.
*
* @return the infopop value.
*/
public String getInfopop()
{
return infopop_;
}
/**
* Sets the tooltip value for this popup check box.
* @param tooltip
*/
public void setTooltip(String tooltip)
{
tooltip_ = tooltip;
}
/**
* Gets the tooltip value for this popup check box.
* Note: this value may be null if the getShowCheckBox method returns false.
*
* @return the tooltip value.
*/
public String getTooltip()
{
return tooltip_;
}
/**
* Sets the show check box value for this popup. If the value is true then
* this popup will appear on an action dialogs preference page. Also if this
* value is true and the always hide value is false then a check box will be displayed
* on the first page of this popup which asks the user if they want the popup
* to be displayed the next time are to just execute the popup action.
* @param value the show check box value.
*/
public void setShowCheckbox( boolean value )
{
showCheckbox_ = value;
}
/**
* Gets the show check box value.
* @return the show check box value.
*/
public boolean getShowCheckbox()
{
return showCheckbox_;
}
/**
* Sets the always hide value. This value specifies that the popup should always
* be executed without bringing up the popup wizard.
* @param value the always hide value.
*/
public void setAlwaysHide( boolean value )
{
alwaysHide_ = value;
}
/**
*
* @return returns the always hide value.
*/
public boolean getAlwaysHide()
{
return alwaysHide_;
}
/**
* Sets the category id for popup action. All popup actions with the same
* category id will be grouped together on the same popup action preference page.
* @param value the category.
*/
public void setCategory( String value )
{
category_ = value;
}
/**
*
* @return the category id.
*/
public String getCategory()
{
return category_;
}
}
|