本文整理汇总了Java中com.intellij.util.PlatformUtils.isIdea方法的典型用法代码示例。如果您正苦于以下问题:Java PlatformUtils.isIdea方法的具体用法?Java PlatformUtils.isIdea怎么用?Java PlatformUtils.isIdea使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.util.PlatformUtils
的用法示例。
在下文中一共展示了PlatformUtils.isIdea方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getProductNameWithArticle
import com.intellij.util.PlatformUtils; //导入方法依赖的package包/类
static String getProductNameWithArticle() {
final ApplicationNamesInfo namesInfo = ApplicationNamesInfo.getInstance();
// example: "to create an IntelliJ IDEA project" (full product name is ok);
// "to create a JetBrains Astella project" (better use not full product name: "to create an Astella project")
final String productName = PlatformUtils.isIdea() ? namesInfo.getFullProductName() : namesInfo.getProductName();
final String article = StringUtil.isVowel(Character.toLowerCase(productName.charAt(0))) ? "an " : "a ";
return article + productName;
}
示例2: getBuild
import com.intellij.util.PlatformUtils; //导入方法依赖的package包/类
@Override
public BuildNumber getBuild() {
String prefix = null;
if (PlatformUtils.isCommunity()) {
prefix = "IC";
}
else if (PlatformUtils.isIdea()) {
prefix = "IU";
}
return BuildNumber.fromString(myBuildNumber, prefix);
}
示例3: isPrimaryModule
import com.intellij.util.PlatformUtils; //导入方法依赖的package包/类
private static boolean isPrimaryModule(Module[] modules) {
if (!ProjectAttachProcessor.canAttachToProject()) {
return !PlatformUtils.isIdea();
}
for (Module module : modules) {
final File moduleFile = new File(module.getModuleFilePath());
final 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: getPriority
import com.intellij.util.PlatformUtils; //导入方法依赖的package包/类
@Override
public DisplayPriority getPriority() {
return PlatformUtils.isIdea() ? DisplayPriority.KEY_LANGUAGE_SETTINGS : DisplayPriority.LANGUAGE_SETTINGS;
}
示例5: getDisplayPriority
import com.intellij.util.PlatformUtils; //导入方法依赖的package包/类
@Override
public DisplayPriority getDisplayPriority() {
if (PlatformUtils.isIdea()) return DisplayPriority.KEY_LANGUAGE_SETTINGS;
return DisplayPriority.LANGUAGE_SETTINGS;
}
示例6: hasModules
import com.intellij.util.PlatformUtils; //导入方法依赖的package包/类
private static boolean hasModules() {
return PlatformUtils.isIdea() ||
PlatformUtils.isCommunity() ||
PlatformUtils.isFlexIde();
}