本文整理汇总了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();
}
}
示例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;
}
示例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;
}
示例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();
}
}
示例6: PersistProfileComponent
import com.intellij.util.PlatformUtils; //导入方法依赖的package包/类
public PersistProfileComponent() {
if (!PlatformUtils.isIntelliJ()) {
noStateLoaded();
}
}
示例7: getPriority
import com.intellij.util.PlatformUtils; //导入方法依赖的package包/类
@Override
public DisplayPriority getPriority() {
return PlatformUtils.isIntelliJ() ? DisplayPriority.KEY_LANGUAGE_SETTINGS : DisplayPriority.LANGUAGE_SETTINGS;
}
示例8: getDisplayPriority
import com.intellij.util.PlatformUtils; //导入方法依赖的package包/类
@Override
public DisplayPriority getDisplayPriority() {
if (PlatformUtils.isIntelliJ()) return DisplayPriority.KEY_LANGUAGE_SETTINGS;
return DisplayPriority.LANGUAGE_SETTINGS;
}
示例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());
}
示例10: hasModules
import com.intellij.util.PlatformUtils; //导入方法依赖的package包/类
private static boolean hasModules() {
return PlatformUtils.isIntelliJ();
}
示例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);
}