mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
eclipse wizard test
This commit is contained in:
@@ -154,6 +154,11 @@ public abstract class AbstractProjectWizard extends AbstractWizard<ModuleWizardS
|
||||
|
||||
@Override
|
||||
protected final void doOKAction() {
|
||||
if (!doFinishAction()) return;
|
||||
super.doOKAction();
|
||||
}
|
||||
|
||||
public boolean doFinishAction() {
|
||||
int idx = getCurrentStep();
|
||||
try {
|
||||
do {
|
||||
@@ -162,7 +167,7 @@ public abstract class AbstractProjectWizard extends AbstractWizard<ModuleWizardS
|
||||
step.updateStep();
|
||||
}
|
||||
if (!commitStepData(step)) {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
step.onStepLeaving();
|
||||
try {
|
||||
@@ -170,18 +175,19 @@ public abstract class AbstractProjectWizard extends AbstractWizard<ModuleWizardS
|
||||
}
|
||||
catch (CommitStepException e) {
|
||||
handleCommitException(e);
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
if (!isLastStep(idx)) {
|
||||
idx = getNextStep(idx);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
for (ModuleWizardStep wizardStep : mySteps) {
|
||||
try {
|
||||
wizardStep.onWizardFinished();
|
||||
}
|
||||
catch (CommitStepException e) {
|
||||
handleCommitException(e);
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -192,7 +198,7 @@ public abstract class AbstractProjectWizard extends AbstractWizard<ModuleWizardS
|
||||
myCurrentStep = idx;
|
||||
updateStep();
|
||||
}
|
||||
super.doOKAction();
|
||||
return true;
|
||||
}
|
||||
|
||||
private void handleCommitException(CommitStepException e) {
|
||||
|
||||
@@ -58,7 +58,6 @@ import java.util.List;
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public abstract class ProjectWizardTestCase<T extends AbstractProjectWizard> extends PlatformTestCase {
|
||||
|
||||
protected static final String DEFAULT_SDK = "default";
|
||||
protected final List<Sdk> mySdks = new ArrayList<Sdk>();
|
||||
protected T myWizard;
|
||||
@@ -133,6 +132,7 @@ public abstract class ProjectWizardTestCase<T extends AbstractProjectWizard> ext
|
||||
throw new RuntimeException(currentStep + " is not validated");
|
||||
}
|
||||
}
|
||||
myWizard.doFinishAction();
|
||||
}
|
||||
|
||||
protected void createWizard(Project project) throws IOException {
|
||||
|
||||
Reference in New Issue
Block a user