mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
filtering templates by frameworks
This commit is contained in:
@@ -91,10 +91,6 @@ public abstract class ProjectWizardTestCase<T extends AbstractProjectWizard> ext
|
||||
throw new IllegalArgumentException(group + "/" + name + " template not found");
|
||||
}
|
||||
|
||||
if (adjuster != null) {
|
||||
adjuster.consume(step);
|
||||
}
|
||||
|
||||
runWizard(new Consumer<Step>() {
|
||||
@Override
|
||||
public void consume(Step step) {
|
||||
@@ -108,6 +104,23 @@ public abstract class ProjectWizardTestCase<T extends AbstractProjectWizard> ext
|
||||
});
|
||||
}
|
||||
|
||||
protected void runWizard(Consumer<Step> adjuster) {
|
||||
while(true) {
|
||||
ModuleWizardStep currentStep = myWizard.getCurrentStepObject();
|
||||
if (adjuster != null) {
|
||||
adjuster.consume(currentStep);
|
||||
}
|
||||
if (myWizard.isLast()) {
|
||||
break;
|
||||
}
|
||||
myWizard.doNextAction();
|
||||
if (currentStep == myWizard.getCurrentStepObject()) {
|
||||
throw new RuntimeException(currentStep + " is not validated");
|
||||
}
|
||||
}
|
||||
myWizard.doOk();
|
||||
}
|
||||
|
||||
protected void createWizard(Project project) throws IOException {
|
||||
File directory = FileUtil.createTempDirectory(getName(), "new", false);
|
||||
myFilesToDelete.add(directory);
|
||||
@@ -126,23 +139,6 @@ public abstract class ProjectWizardTestCase<T extends AbstractProjectWizard> ext
|
||||
return (T)new AddModuleWizard(project, DefaultModulesProvider.createForProject(project), directory.getPath());
|
||||
}
|
||||
|
||||
protected void runWizard(Consumer<Step> adjuster) {
|
||||
while(true) {
|
||||
ModuleWizardStep currentStep = myWizard.getCurrentStepObject();
|
||||
if (adjuster != null) {
|
||||
adjuster.consume(currentStep);
|
||||
}
|
||||
if (myWizard.isLast()) {
|
||||
break;
|
||||
}
|
||||
myWizard.doNextAction();
|
||||
if (currentStep == myWizard.getCurrentStepObject()) {
|
||||
throw new RuntimeException(currentStep + " is not validated");
|
||||
}
|
||||
}
|
||||
myWizard.doOk();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
|
||||
Reference in New Issue
Block a user