use of com.android.tools.idea.gradle.structure.configurables.android.dependencies.module.AndroidModuleDependenciesConfigurable in project android by JetBrains.
the class DependenciesPerspectiveConfigurable method getConfigurable.
@Override
@Nullable
protected NamedConfigurable<? extends PsModule> getConfigurable(@NotNull PsModule module) {
AbstractDependenciesConfigurable<? extends PsModule> configurable;
if (module instanceof PsAllModulesFakeModule) {
configurable = myExtraTopConfigurables.get(module);
if (configurable == null) {
configurable = new ProjectDependenciesConfigurable(module, getContext(), getExtraTopModules());
configurable.setHistory(myHistory);
myExtraTopConfigurables.put(module, configurable);
}
} else {
String gradlePath = module.getGradlePath();
configurable = myConfigurablesByGradlePath.get(gradlePath);
if (configurable == null) {
if (module instanceof PsAndroidModule) {
PsAndroidModule androidModule = (PsAndroidModule) module;
configurable = new AndroidModuleDependenciesConfigurable(androidModule, getContext(), getExtraTopModules());
configurable.setHistory(myHistory);
myConfigurablesByGradlePath.put(gradlePath, configurable);
} else if (module instanceof PsJavaModule) {
PsJavaModule javaModule = (PsJavaModule) module;
configurable = new JavaModuleDependenciesConfigurable(javaModule, getContext(), getExtraTopModules());
}
}
}
return configurable;
}
Aggregations