mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-188241 Hide AS icons for not Android projects
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
package com.intellij.execution;
|
||||
|
||||
import com.intellij.openapi.extensions.ExtensionPointName;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.registry.Registry;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
@@ -92,6 +93,13 @@ public abstract class Executor {
|
||||
return getStartActionText() + (StringUtil.isEmpty(configurationName) ? "" : " '" + shortenNameIfNeed(configurationName) + "'");
|
||||
}
|
||||
|
||||
/**
|
||||
* Return false to suppress action visibility for given project.
|
||||
*/
|
||||
public boolean isApplicable(@NotNull Project project) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Too long names don't fit into UI controls and have to be trimmed
|
||||
*/
|
||||
|
||||
@@ -249,7 +249,7 @@ public class ExecutorRegistryImpl extends ExecutorRegistry implements Disposable
|
||||
presentation.setEnabledAndVisible(enabled);
|
||||
}
|
||||
else {
|
||||
presentation.setVisible(true);
|
||||
presentation.setVisible(myExecutor.isApplicable(project));
|
||||
presentation.setEnabled(enabled);
|
||||
}
|
||||
presentation.setText(text);
|
||||
|
||||
Reference in New Issue
Block a user