mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
allow to double-click on project type step (IDEADEV-40685)
This commit is contained in:
@@ -72,6 +72,10 @@ public class AddModuleWizard extends AbstractWizard<ModuleWizardStep> {
|
||||
public void buttonsUpdateRequested() {
|
||||
updateButtons();
|
||||
}
|
||||
|
||||
public void nextStepRequested() {
|
||||
doNextAction();
|
||||
}
|
||||
});
|
||||
|
||||
myRootStep = new ProjectCreateModeStep(defaultPath, myWizardContext){
|
||||
|
||||
+2
-2
@@ -124,8 +124,8 @@ public class ProjectNameWithTypeStep extends ProjectNameStep {
|
||||
myTypesList.setSelectedIndex(0);
|
||||
myTypesList.addMouseListener(new MouseAdapter() {
|
||||
public void mouseClicked(MouseEvent e) {
|
||||
if (e.getClickCount() == 2) {
|
||||
//todo
|
||||
if (e.getClickCount() == 2 && e.getButton() == MouseEvent.BUTTON1) {
|
||||
myWizardContext.requestNextStep();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -48,8 +48,9 @@ public class WizardContext {
|
||||
myProjectStorageFormat = format;
|
||||
}
|
||||
|
||||
public static interface Listener {
|
||||
public interface Listener {
|
||||
void buttonsUpdateRequested();
|
||||
void nextStepRequested();
|
||||
}
|
||||
|
||||
public WizardContext(Project project) {
|
||||
@@ -110,6 +111,13 @@ public class WizardContext {
|
||||
}
|
||||
}
|
||||
|
||||
public void requestNextStep() {
|
||||
final Listener[] listeners = myListeners.toArray(new Listener[myListeners.size()]);
|
||||
for (Listener listener : listeners) {
|
||||
listener.nextStepRequested();
|
||||
}
|
||||
}
|
||||
|
||||
public void addContextListener(Listener listener) {
|
||||
myListeners.add(listener);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user