Skip to content

Commit a1781a0

Browse files
committed
[514688] Validate EngineConfigurationPage after engine download/removal
Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=514688 Signed-off-by: Rastislav Wagner <[email protected]>
1 parent 84fb111 commit a1781a0

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

plugins/org.eclipse.thym.ui/src/org/eclipse/thym/ui/internal/engine/AvailableCordovaEnginesSection.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ public class AvailableCordovaEnginesSection implements ISelectionProvider{
8787
private static final int TREE_HEIGHT = 250;
8888
private static final int TREE_WIDTH = 500;
8989

90-
private ListenerList selectionListeners;
91-
private ListenerList engineChangeListeners;
90+
private ListenerList<ISelectionChangedListener> selectionListeners;
91+
private ListenerList<EngineListChangeListener> engineChangeListeners;
9292
private CheckboxTreeViewer engineList;
9393
private ISelection prevSelection = new StructuredSelection();
9494
private CordovaEngineProvider provider;
@@ -264,8 +264,8 @@ public int compare(HybridMobileEngine o1, HybridMobileEngine o2) {
264264
}
265265

266266
public AvailableCordovaEnginesSection() {
267-
this.selectionListeners = new ListenerList();
268-
this.engineChangeListeners = new ListenerList();
267+
this.selectionListeners = new ListenerList<ISelectionChangedListener>();
268+
this.engineChangeListeners = new ListenerList<EngineListChangeListener>();
269269
this.formToolkit = null;
270270
}
271271

plugins/org.eclipse.thym.ui/src/org/eclipse/thym/ui/wizard/project/EngineConfigurationPage.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import org.eclipse.thym.core.engine.HybridMobileEngine;
2727
import org.eclipse.thym.core.engine.HybridMobileEngineManager;
2828
import org.eclipse.thym.ui.internal.engine.AvailableCordovaEnginesSection;
29+
import org.eclipse.thym.ui.internal.engine.AvailableCordovaEnginesSection.EngineListChangeListener;
2930

3031
public class EngineConfigurationPage extends WizardPage {
3132

@@ -58,6 +59,14 @@ public void selectionChanged(SelectionChangedEvent event) {
5859

5960
}
6061
});
62+
engineSection.addEngineListChangeListener(new EngineListChangeListener() {
63+
64+
@Override
65+
public void listChanged() {
66+
setPageComplete(validatePage());
67+
68+
}
69+
});
6170

6271
setControl(control);
6372
setDefaultEngine();

0 commit comments

Comments
 (0)