Cidr: isAppCode replaced with isCidr in common places

This commit is contained in:
Anton Makeev
2013-08-21 17:26:52 +02:00
parent e903928c74
commit cb56ac2833
8 changed files with 12 additions and 8 deletions
@@ -77,7 +77,7 @@ public class ViewOfflineResultsAction extends AnAction implements DumbAware {
final Presentation presentation = event.getPresentation();
final Project project = event.getData(PlatformDataKeys.PROJECT);
presentation.setEnabled(project != null);
presentation.setVisible(ActionPlaces.MAIN_MENU.equals(event.getPlace()) && !PlatformUtils.isAppCode());
presentation.setVisible(ActionPlaces.MAIN_MENU.equals(event.getPlace()) && !PlatformUtils.isCidr());
}
@Override
@@ -605,7 +605,7 @@ public class FavoritesTreeViewPanel extends JPanel implements DataProvider, Dock
if (helper.supportsFlattenPackages()) {
group.addAction(new FavoritesAbbreviatePackageNamesAction(myProject, myBuilder));
}
if (!PlatformUtils.isAppCode()) {
if (!PlatformUtils.isCidr()) {
group.add(new FavoritesShowMembersAction(myProject, myBuilder));
}
@@ -697,7 +697,7 @@ public class ProjectViewImpl extends ProjectView implements PersistentStateCompo
}).setAsSecondary(true);
}
if (!PlatformUtils.isAppCode()) {
if (!PlatformUtils.isCidr()) {
myActionGroup.addAction(new PaneOptionAction(myShowMembers, IdeBundle.message("action.show.members"),
IdeBundle.message("action.show.hide.members"),
AllIcons.ObjectBrowser.ShowMembers, ourShowMembersDefaults))
@@ -62,7 +62,7 @@ public class PsiDirectoryNode extends BasePsiNode<PsiDirectory> implements Navig
}
protected boolean shouldShowModuleName() {
return !PlatformUtils.isAppCode();
return !PlatformUtils.isCidr();
}
@Override
@@ -237,7 +237,7 @@ public class ScopeChooserCombo extends ComboboxWithBrowseButton implements Dispo
result.add(GlobalSearchScope.allScope(project));
}
if (!PlatformUtils.isAppCode()) { // TODO: fix these scopes in AppCode
if (!PlatformUtils.isCidr()) { // TODO: fix these scopes in AppCode
result.add(GlobalSearchScopes.projectProductionScope(project));
result.add(GlobalSearchScopes.projectTestScope(project));
}
@@ -250,7 +250,7 @@ public class ScopeChooserCombo extends ComboboxWithBrowseButton implements Dispo
dataContextElement = LangDataKeys.PSI_ELEMENT.getData(dataContext);
}
if (dataContextElement != null) {
if (!PlatformUtils.isAppCode()) { // TODO: have an API to disable module scopes.
if (!PlatformUtils.isCidr()) { // TODO: have an API to disable module scopes.
Module module = ModuleUtilCore.findModuleForPsiElement(dataContextElement);
if (module == null) {
module = LangDataKeys.MODULE.getData(dataContext);
@@ -56,6 +56,10 @@ public class PlatformUtils extends PlatformUtilsCore {
return RUBY_PREFIX.equals(getPlatformPrefix());
}
public static boolean isCidr() {
return isAppCode() || isCppIde();
}
public static boolean isAppCode() {
return APPCODE_PREFIX.equals(getPlatformPrefix());
}
@@ -41,6 +41,6 @@ public class MacHelpUtil {
}
static boolean isApplicable() {
return SystemInfo.isMac && Registry.is("ide.mac.show.native.help", false) && !PlatformUtils.isAppCode() && !PlatformUtils.isCommunity();
return SystemInfo.isMac && Registry.is("ide.mac.show.native.help", false) && !PlatformUtils.isCidr() && !PlatformUtils.isCommunity();
}
}
@@ -64,7 +64,7 @@ public class DebuggerConfigurableProvider extends ConfigurableProvider {
//Perhaps we always should have a root node 'Debugger' with separate nodes for language-specific settings under it.
//However for AppCode there is only one language which is clearly associated with the product
//This code should removed when we extract the common debugger settings to the root node.
if (PlatformUtils.isAppCode() && rootConfigurable == null && configurables.size() == 1) {
if (PlatformUtils.isCidr() && rootConfigurable == null && configurables.size() == 1) {
rootConfigurable = configurables.get(0);
configurables = Collections.emptyList();
}