use of com.android.tools.idea.structure.dialog.ProjectStructureConfigurable.ProjectStructureChangeListener in project android by JetBrains.
the class AndroidShowStructureSettingsAction method showAndroidProjectStructure.
private static void showAndroidProjectStructure(@NotNull Project project) {
if (GradleExperimentalSettings.getInstance().USE_NEW_PROJECT_STRUCTURE_DIALOG) {
ProjectStructureConfigurable projectStructure = ProjectStructureConfigurable.getInstance(project);
AtomicBoolean needsSync = new AtomicBoolean();
ProjectStructureChangeListener changeListener = () -> needsSync.set(true);
projectStructure.add(changeListener);
projectStructure.showDialog();
projectStructure.remove(changeListener);
if (needsSync.get()) {
GradleSyncInvoker.getInstance().requestProjectSyncAndSourceGeneration(project, null);
}
return;
}
AndroidProjectStructureConfigurable.getInstance(project).showDialog();
}
Aggregations