use of com.android.tools.idea.wizard.dynamic.ScopedStateStore in project android by JetBrains.
the class NewModuleWizardDynamic method initState.
/**
* Populate our state store with some common configuration items, such as the SDK location and the Gradle configuration.
*/
private void initState() {
ScopedStateStore state = getState();
Project project = getProject();
NewProjectWizardDynamic.initState(state, determineGradlePluginVersion(project));
if (project != null) {
state.put(WizardConstants.PROJECT_LOCATION_KEY, project.getBasePath());
}
// Todo: check if we need an IAPK in the project
state.put(ALSO_CREATE_IAPK_KEY, false);
}
use of com.android.tools.idea.wizard.dynamic.ScopedStateStore in project android by JetBrains.
the class ConfigureAndroidModuleStepDynamicTest method setUp.
@Override
public void setUp() throws Exception {
super.setUp();
ApplicationManager.getApplication().runWriteAction(() -> {
final ModuleManager manager = ModuleManager.getInstance(getProject());
File moduleRoot = new File(getProject().getBasePath(), "app");
manager.newModule(moduleRoot.getPath(), ModuleTypeId.JAVA_MODULE);
moduleRoot = new File(getProject().getBasePath(), "Lib");
manager.newModule(moduleRoot.getPath(), ModuleTypeId.JAVA_MODULE);
moduleRoot = new File(getProject().getBasePath(), "lib2");
manager.newModule(moduleRoot.getPath(), ModuleTypeId.JAVA_MODULE);
});
ScopedStateStore wizardState = new ScopedStateStore(ScopedStateStore.Scope.WIZARD, null, null);
ScopedStateStore pathState = new ScopedStateStore(ScopedStateStore.Scope.PATH, wizardState, null);
myStep = new ConfigureAndroidModuleStepDynamic(getTestRootDisposable(), FormFactor.MOBILE);
myStep.myState = new ScopedStateStore(ScopedStateStore.Scope.STEP, pathState, myStep);
}
Aggregations