Skip to content

Commit d816596

Browse files
committed
Revert "Move long running operations to the activation of the
PluginsTab" This change reverts main change from commit 98a5865 changes because it caused a severe regression. See eclipse-pde#1233 Fixes eclipse-pde#1250
1 parent 0261aa9 commit d816596

File tree

2 files changed

+11
-19
lines changed

2 files changed

+11
-19
lines changed
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
Comparator Errors in 4.32 I-Build I20240304-0140
2-
Update to IPDELauncherConstants
2+
Update to IPDELauncherConstants
3+
https://github.com/eclipse-pde/eclipse.pde/issues/1250

ui/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/PluginsTab.java

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ public class PluginsTab extends AbstractLauncherTab {
5959
private Combo fDefaultAutoStart;
6060
private Spinner fDefaultStartLevel;
6161
private final Listener fListener;
62-
private boolean fActivated;
6362

6463
private static final int DEFAULT_SELECTION = 0;
6564
private static final int PLUGIN_SELECTION = 1;
@@ -157,16 +156,6 @@ public void createControl(Composite parent) {
157156

158157
@Override
159158
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-
170159
try {
171160
int index = DEFAULT_SELECTION;
172161
if (configuration.getAttribute(IPDELauncherConstants.USE_CUSTOM_FEATURES, false)) {
@@ -182,9 +171,6 @@ public void activated(ILaunchConfigurationWorkingCopy configuration) {
182171
fDefaultAutoStart.setText(Boolean.toString(auto));
183172
int level = configuration.getAttribute(IPDELauncherConstants.DEFAULT_START_LEVEL, 4);
184173
fDefaultStartLevel.setSelection(level);
185-
186-
// If everything ran smoothly, this tab is activated
187-
fActivated = true;
188174
} catch (CoreException e) {
189175
PDEPlugin.log(e);
190176
}
@@ -202,9 +188,7 @@ public void performApply(ILaunchConfigurationWorkingCopy configuration) {
202188
int index = fSelectionCombo.getSelectionIndex();
203189
configuration.setAttribute(IPDELauncherConstants.USE_DEFAULT, index == DEFAULT_SELECTION);
204190
configuration.setAttribute(IPDELauncherConstants.USE_CUSTOM_FEATURES, index == FEATURE_SELECTION);
205-
if (fActivated) {
206-
fBlock.performApply(configuration);
207-
}
191+
fBlock.performApply(configuration);
208192
// clear default values for auto-start and start-level if default
209193
String autoText = fDefaultAutoStart.getText();
210194
if (Boolean.toString(false).equals(autoText)) {
@@ -233,9 +217,16 @@ public Image getImage() {
233217
return fImage;
234218
}
235219

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+
*/
236226
@Override
237227
public void validateTab() {
238-
setErrorMessage(null);
228+
String errorMessage = null;
229+
setErrorMessage(errorMessage);
239230
}
240231

241232
@Override

0 commit comments

Comments
 (0)