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


Java PlatformUtils.isIntelliJ方法代码示例

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


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

示例1: runStartupWizard

import com.intellij.util.PlatformUtils; //导入方法依赖的package包/类
static void runStartupWizard() {
  ApplicationInfoEx appInfo = ApplicationInfoImpl.getShadowInstance();

  String stepsProvider = appInfo.getCustomizeIDEWizardStepsProvider();
  if (stepsProvider != null) {
    CustomizeIDEWizardDialog.showCustomSteps(stepsProvider);
    PluginManagerCore.invalidatePlugins();
    return;
  }

  if (PlatformUtils.isIntelliJ()) {
    new CustomizeIDEWizardDialog().show();
    PluginManagerCore.invalidatePlugins();
    return;
  }

  List<ApplicationInfoEx.PluginChooserPage> pages = appInfo.getPluginChooserPages();
  if (!pages.isEmpty()) {
    StartupWizard startupWizard = new StartupWizard(pages);
    startupWizard.setCancelText("Skip");
    startupWizard.show();
    PluginManagerCore.invalidatePlugins();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:25,代码来源:StartupUtil.java

示例2: build

import com.intellij.util.PlatformUtils; //导入方法依赖的package包/类
public JPanel build(Map<SettingKey, Boolean> settingsMap) {

        if (!PlatformUtils.isIntelliJ()) {
            return getFallbackGUI();
        }

        this.autoQueryCheckBox.setSelected(settingsMap.get(SettingKey.AUTO_QUERY));
        this.runtimeErrorCheckBox.setSelected(settingsMap.get(SettingKey.RUNTIME_ERROR));
        this.compileErrorCheckbox.setSelected(settingsMap.get(SettingKey.COMPILE_ERROR));
        this.difficultyCheckBox.setSelected(settingsMap.get(SettingKey.DIFFICULTY));
        this.loggingCheckBox.setSelected(settingsMap.get(SettingKey.LOGGING));

        if(!settingsMap.get(SettingKey.AUTO_QUERY)) {
            this.runtimeErrorCheckBox.setEnabled(false);
            this.compileErrorCheckbox.setEnabled(false);
            this.difficultyCheckBox.setEnabled(false);
        }

        autoQueryCheckBox.addChangeListener(e -> {
            if (((JCheckBox)e.getSource()).isSelected()) {
                this.runtimeErrorCheckBox.setEnabled(true);
                this.compileErrorCheckbox.setEnabled(true);
                this.difficultyCheckBox.setEnabled(true);
            } else {
                this.runtimeErrorCheckBox.setEnabled(false);
                this.compileErrorCheckbox.setEnabled(false);
                this.difficultyCheckBox.setEnabled(false);
            }
        });

        return content;
    }
 
开发者ID:vcu-swim-lab,项目名称:stack-intheflow,代码行数:33,代码来源:SettingsGUI.java

示例3: isPrimaryModule

import com.intellij.util.PlatformUtils; //导入方法依赖的package包/类
private static boolean isPrimaryModule(Module[] modules) {
  if (!ProjectAttachProcessor.canAttachToProject()) {
    return !PlatformUtils.isIntelliJ();
  }
  for (Module module : modules) {
    final File moduleFile = new File(module.getModuleFilePath());
    @SuppressWarnings("ConstantConditions")
    File projectFile = new File(module.getProject().getProjectFilePath());
    if (moduleFile.getParent().equals(projectFile.getParent()) &&
        moduleFile.getParentFile().getName().equals(Project.DIRECTORY_STORE_FOLDER)) {
      return true;
    }
  }
  return false;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:ModuleDeleteProvider.java

示例4: canCreateConfigurable

import com.intellij.util.PlatformUtils; //导入方法依赖的package包/类
/** @return true if running platform is IntelliJ and false otherwise. */
@Override
public boolean canCreateConfigurable() {
  // For now we can hide Google entirely if usage tracking isn't available as there are no
  // other Google related account settings in the IJ UI.
  // Create a sub-menu item for the cloud SDK and hide the usage tracker if not avaible
  return PlatformUtils.isIntelliJ()
      && UsageTrackerManager.getInstance().isUsageTrackingAvailable();
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-intellij,代码行数:10,代码来源:UsageTrackerConfigurableProvider.java

示例5: PersistSettingsComponent

import com.intellij.util.PlatformUtils; //导入方法依赖的package包/类
public PersistSettingsComponent() {
    if (!PlatformUtils.isIntelliJ()) {
        noStateLoaded();
    }
}
 
开发者ID:vcu-swim-lab,项目名称:stack-intheflow,代码行数:6,代码来源:PersistSettingsComponent.java

示例6: PersistProfileComponent

import com.intellij.util.PlatformUtils; //导入方法依赖的package包/类
public PersistProfileComponent() {
    if (!PlatformUtils.isIntelliJ()) {
        noStateLoaded();
    }
}
 
开发者ID:vcu-swim-lab,项目名称:stack-intheflow,代码行数:6,代码来源:PersistProfileComponent.java

示例7: getPriority

import com.intellij.util.PlatformUtils; //导入方法依赖的package包/类
@Override
public DisplayPriority getPriority() {
  return PlatformUtils.isIntelliJ() ? DisplayPriority.KEY_LANGUAGE_SETTINGS : DisplayPriority.LANGUAGE_SETTINGS;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:JavaCodeStyleSettingsProvider.java

示例8: getDisplayPriority

import com.intellij.util.PlatformUtils; //导入方法依赖的package包/类
@Override
public DisplayPriority getDisplayPriority() {
  if (PlatformUtils.isIntelliJ()) return DisplayPriority.KEY_LANGUAGE_SETTINGS;
  return DisplayPriority.LANGUAGE_SETTINGS;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:JavaLanguageCodeStyleSettingsProvider.java

示例9: isAvailable

import com.intellij.util.PlatformUtils; //导入方法依赖的package包/类
public static boolean isAvailable() {
  return Registry.is("ide.new.welcome.screen")
          && (PlatformUtils.isIntelliJ() || PlatformUtils.isCidr() || PlatformUtils.isWebStorm() ||
              PlatformUtils.isPyCharm() || PlatformUtils.isRubyMine() || PlatformUtils.isPhpStorm());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:FlatWelcomeFrameProvider.java

示例10: hasModules

import com.intellij.util.PlatformUtils; //导入方法依赖的package包/类
private static boolean hasModules() {
  return PlatformUtils.isIntelliJ();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:ShowModulesAction.java

示例11: isUsageTrackingAvailable

import com.intellij.util.PlatformUtils; //导入方法依赖的package包/类
/**
 * Indicates whether usage tracking is configured for this plugin's release and platform. This is
 * independent of whether the user is opted in to usage tracking.
 *
 * <p>{@code isUsageTrackingAvailable()} and {@link #hasUserOptedIn()} both need to return {@code
 * true} for tracking to be enabled. Call {@link #isTrackingEnabled()} to determine whether to do
 * user tracking.
 */
public boolean isUsageTrackingAvailable() {
  return PlatformUtils.isIntelliJ() && (getAnalyticsProperty() != null);
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-intellij,代码行数:12,代码来源:UsageTrackerManager.java


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