mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-78278 Hide library projects in 'run cofigurations' dialog
This commit is contained in:
@@ -91,7 +91,7 @@ public class ConfigurationModuleSelector {
|
||||
myModules.setSelectedItem(configuration.getConfigurationModule().getModule());
|
||||
}
|
||||
|
||||
public static boolean isModuleAccepted(final Module module) {
|
||||
public boolean isModuleAccepted(final Module module) {
|
||||
return ModuleTypeManager.getInstance().isClasspathProvider(ModuleType.get(module));
|
||||
}
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ import com.intellij.openapi.util.Disposer;
|
||||
import com.intellij.ui.PanelWithAnchor;
|
||||
import com.intellij.ui.RawCommandLineEditor;
|
||||
import com.intellij.ui.components.JBLabel;
|
||||
import org.jetbrains.android.facet.AndroidFacet;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@@ -73,7 +74,16 @@ public class AndroidRunConfigurationEditor<T extends AndroidRunConfigurationBase
|
||||
myCommandLineField = myCommandLineComponent.getComponent();
|
||||
myCommandLineField.setDialogCaption(myCommandLineComponent.getRawText());
|
||||
myCommandLineComponent.getLabel().setLabelFor(myCommandLineField.getTextField());
|
||||
myModuleSelector = new ConfigurationModuleSelector(project, myModulesComboBox);
|
||||
myModuleSelector = new ConfigurationModuleSelector(project, myModulesComboBox) {
|
||||
@Override
|
||||
public boolean isModuleAccepted(Module module) {
|
||||
if (module == null || !super.isModuleAccepted(module)) {
|
||||
return false;
|
||||
}
|
||||
final AndroidFacet facet = AndroidFacet.getInstance(module);
|
||||
return facet != null && !facet.getConfiguration().LIBRARY_PROJECT;
|
||||
}
|
||||
};
|
||||
|
||||
myAvdComboComponent.setComponent(new AvdComboBox(true, false) {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user