@@ -59,7 +59,6 @@ public class PluginsTab extends AbstractLauncherTab {
59
59
private Combo fDefaultAutoStart ;
60
60
private Spinner fDefaultStartLevel ;
61
61
private final Listener fListener ;
62
- private boolean fActivated ;
63
62
64
63
private static final int DEFAULT_SELECTION = 0 ;
65
64
private static final int PLUGIN_SELECTION = 1 ;
@@ -157,16 +156,6 @@ public void createControl(Composite parent) {
157
156
158
157
@ Override
159
158
public void initializeFrom (ILaunchConfiguration configuration ) {
160
- // Long-running initialization happens on first activation of this tab
161
- }
162
-
163
- @ Override
164
- public void activated (ILaunchConfigurationWorkingCopy configuration ) {
165
- if (fActivated ) {
166
- // Since this method can be expensive, only activate this tab once.
167
- return ;
168
- }
169
-
170
159
try {
171
160
int index = DEFAULT_SELECTION ;
172
161
if (configuration .getAttribute (IPDELauncherConstants .USE_CUSTOM_FEATURES , false )) {
@@ -182,9 +171,6 @@ public void activated(ILaunchConfigurationWorkingCopy configuration) {
182
171
fDefaultAutoStart .setText (Boolean .toString (auto ));
183
172
int level = configuration .getAttribute (IPDELauncherConstants .DEFAULT_START_LEVEL , 4 );
184
173
fDefaultStartLevel .setSelection (level );
185
-
186
- // If everything ran smoothly, this tab is activated
187
- fActivated = true ;
188
174
} catch (CoreException e ) {
189
175
PDEPlugin .log (e );
190
176
}
@@ -202,9 +188,7 @@ public void performApply(ILaunchConfigurationWorkingCopy configuration) {
202
188
int index = fSelectionCombo .getSelectionIndex ();
203
189
configuration .setAttribute (IPDELauncherConstants .USE_DEFAULT , index == DEFAULT_SELECTION );
204
190
configuration .setAttribute (IPDELauncherConstants .USE_CUSTOM_FEATURES , index == FEATURE_SELECTION );
205
- if (fActivated ) {
206
- fBlock .performApply (configuration );
207
- }
191
+ fBlock .performApply (configuration );
208
192
// clear default values for auto-start and start-level if default
209
193
String autoText = fDefaultAutoStart .getText ();
210
194
if (Boolean .toString (false ).equals (autoText )) {
@@ -233,9 +217,16 @@ public Image getImage() {
233
217
return fImage ;
234
218
}
235
219
220
+ /**
221
+ * Validates the tab. If the feature option is chosen, and the workspace is not correctly set up,
222
+ * the error message is set.
223
+ *
224
+ * @see org.eclipse.pde.ui.launcher.AbstractLauncherTab#validateTab()
225
+ */
236
226
@ Override
237
227
public void validateTab () {
238
- setErrorMessage (null );
228
+ String errorMessage = null ;
229
+ setErrorMessage (errorMessage );
239
230
}
240
231
241
232
@ Override
0 commit comments