当前位置: 首页>>代码示例>>Java>>正文


Java PlatformUtils.isAppCode方法代码示例

本文整理汇总了Java中com.intellij.util.PlatformUtils.isAppCode方法的典型用法代码示例。如果您正苦于以下问题:Java PlatformUtils.isAppCode方法的具体用法?Java PlatformUtils.isAppCode怎么用?Java PlatformUtils.isAppCode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.util.PlatformUtils的用法示例。


在下文中一共展示了PlatformUtils.isAppCode方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: decorate

import com.intellij.util.PlatformUtils; //导入方法依赖的package包/类
@Nullable
public static IdeFrameDecorator decorate(@NotNull IdeFrameImpl frame) {
  if (SystemInfo.isMac) {
    return new MacMainFrameDecorator(frame, PlatformUtils.isAppCode());
  }
  else if (SystemInfo.isWindows) {
    return new WinMainFrameDecorator(frame);
  }
  else if (SystemInfo.isXWindow) {
    if (X11UiUtil.isFullScreenSupported()) {
      return new EWMHFrameDecorator(frame);
    }
  }

  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:IdeFrameDecorator.java

示例2: tweakPlatformDefaults

import com.intellij.util.PlatformUtils; //导入方法依赖的package包/类
private void tweakPlatformDefaults() {
  // TODO[anton] consider making all IDEs use the same settings
  if (PlatformUtils.isAppCode()) {
    SCROLL_TAB_LAYOUT_IN_EDITOR = true;
    ACTIVATE_RIGHT_EDITOR_ON_CLOSE = true;
    SHOW_ICONS_IN_MENUS = false;
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:UISettings.java

示例3: tweakPlatformDefaults

import com.intellij.util.PlatformUtils; //导入方法依赖的package包/类
private void tweakPlatformDefaults() {
  // TODO: Make it pluggable
  if (PlatformUtils.isAppCode()) {
    SHOW_MAIN_TOOLBAR = false;
    SHOW_ICONS_IN_MENUS = false;
    SHOW_MEMORY_INDICATOR = false;
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:9,代码来源:UISettings.java

示例4: setupToolWindow

import com.intellij.util.PlatformUtils; //导入方法依赖的package包/类
public void setupToolWindow(ToolWindowEx window) {
  final CollapseAllAction collapseAction = new CollapseAllAction(myTree);
  collapseAction.getTemplatePresentation().setIcon(AllIcons.General.CollapseAll);
  collapseAction.getTemplatePresentation().setHoveredIcon(AllIcons.General.CollapseAllHover);
  window.setTitleActions(collapseAction);

  final DefaultActionGroup group = new DefaultActionGroup();
  final ProjectViewDirectoryHelper helper = ProjectViewDirectoryHelper.getInstance(myProject);

  if (helper.supportsFlattenPackages()) {
    group.add(new FavoritesFlattenPackagesAction(myProject, myBuilder));
  }
  if (helper.supportsHideEmptyMiddlePackages()) {
    group.add(new FavoritesCompactEmptyMiddlePackagesAction(myProject, myBuilder));
  }
  if (helper.supportsFlattenPackages()) {
    group.addAction(new FavoritesAbbreviatePackageNamesAction(myProject, myBuilder));
  }
  if (!PlatformUtils.isAppCode()) {
    group.add(new FavoritesShowMembersAction(myProject, myBuilder));
  }

  final FavoritesAutoscrollFromSourceHandler handler = new FavoritesAutoscrollFromSourceHandler(myProject, myBuilder);
  handler.install();
  group.add(handler.createToggleAction());

  group.add(new FavoritesAutoScrollToSourceAction(myProject, myAutoScrollToSourceHandler, myBuilder));
  window.setAdditionalGearActions(group);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:30,代码来源:FavoritesTreeViewPanel.java

示例5: isApplicable

import com.intellij.util.PlatformUtils; //导入方法依赖的package包/类
static boolean isApplicable() {
  return SystemInfo.isMac && Registry.is("ide.mac.show.native.help", false) && !PlatformUtils.isAppCode() && !PlatformUtils.isCommunity();
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:4,代码来源:MacHelpUtil.java

示例6: createConfigurable

import com.intellij.util.PlatformUtils; //导入方法依赖的package包/类
@Override
public Configurable createConfigurable() {
  final List<DebuggerSettingsPanelProvider> providers = new ArrayList<DebuggerSettingsPanelProvider>();
  final DebuggerSupport[] supports = DebuggerSupport.getDebuggerSupports();
  for (DebuggerSupport support : supports) {
    providers.add(support.getSettingsPanelProvider());
  }

  List<Configurable> configurables = new ArrayList<Configurable>();
  Collections.sort(providers, new Comparator<DebuggerSettingsPanelProvider>() {
    public int compare(final DebuggerSettingsPanelProvider o1, final DebuggerSettingsPanelProvider o2) {
      return o2.getPriority() - o1.getPriority();
    }
  });

  Configurable rootConfigurable = null;
  for (DebuggerSettingsPanelProvider provider : providers) {
    configurables.addAll(provider.getConfigurables());
    final Configurable aRootConfigurable = provider.getRootConfigurable();
    if (aRootConfigurable != null) {
      if (rootConfigurable != null) {
        configurables.add(aRootConfigurable);
      }
      else {
        rootConfigurable = aRootConfigurable;
      }
    }
  }
  if (configurables.isEmpty() && rootConfigurable == null) {
    return null;
  }

  //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) {
    rootConfigurable = configurables.get(0);
    configurables = Collections.emptyList();
  }

  return new DebuggerConfigurable(rootConfigurable, configurables);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:43,代码来源:DebuggerConfigurableProvider.java

示例7: shouldShowModuleName

import com.intellij.util.PlatformUtils; //导入方法依赖的package包/类
protected boolean shouldShowModuleName() {
  return !PlatformUtils.isAppCode();
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:4,代码来源:PsiDirectoryNode.java


注:本文中的com.intellij.util.PlatformUtils.isAppCode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。