Java Code Examples for com.intellij.util.PlatformUtils#isIdeaUltimate()

The following examples show how to use com.intellij.util.PlatformUtils#isIdeaUltimate() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FileGitHubIssueAction.java    From intellij with Apache License 2.0 5 votes vote down vote up
private static String getProductId() {
  String platformPrefix = PlatformUtils.getPlatformPrefix();

  // IDEA Community Edition is "Idea", whereas IDEA Ultimate Edition is "idea". Let's make them
  // more useful.
  if (PlatformUtils.isIdeaCommunity()) {
    platformPrefix = "IdeaCommunity";
  } else if (PlatformUtils.isIdeaUltimate()) {
    platformPrefix = "IdeaUltimate";
  }
  return platformPrefix;
}
 
Example 2
Source File: BlazeFlags.java    From intellij with Apache License 2.0 5 votes vote down vote up
@VisibleForTesting
public static String getToolTagFlag() {
  String platformPrefix = PlatformUtils.getPlatformPrefix();

  // IDEA Community Edition is "Idea", whereas IDEA Ultimate Edition is "idea".
  // That's dumb. Let's make them more useful.
  if (PlatformUtils.isIdeaCommunity()) {
    platformPrefix = "IDEA:community";
  } else if (PlatformUtils.isIdeaUltimate()) {
    platformPrefix = "IDEA:ultimate";
  }
  return TOOL_TAG + platformPrefix;
}
 
Example 3
Source File: IntelliJBazelPrefetchFileSourceTest.java    From intellij with Apache License 2.0 5 votes vote down vote up
@Test
public void testPrefetchedExtensions() {
  if (PlatformUtils.isIdeaUltimate()) {
    assertThat(PrefetchFileSource.getAllPrefetchFileExtensions())
        .containsExactly("java", "proto", "dart", "js", "html", "css", "gss", "ts", "tsx");
  } else {
    assertThat(PrefetchFileSource.getAllPrefetchFileExtensions())
        .containsExactly("java", "proto", "dart");
  }
}
 
Example 4
Source File: BlazeJavascriptSyncPlugin.java    From intellij with Apache License 2.0 4 votes vote down vote up
private static boolean isLanguageSupportedInIde() {
  return PlatformUtils.isIdeaUltimate()
      || PlatformUtils.isWebStorm()
      || PlatformUtils.isCLion()
      || PlatformUtils.isGoIde();
}
 
Example 5
Source File: BlazeJavascriptSyncPlugin.java    From intellij with Apache License 2.0 4 votes vote down vote up
private static boolean isWorkspaceTypeSupported() {
  // still supported in IntelliJ UE for legacy reasons
  return PlatformUtils.isWebStorm() || PlatformUtils.isIdeaUltimate();
}
 
Example 6
Source File: BlazeTypescriptSyncPlugin.java    From intellij with Apache License 2.0 4 votes vote down vote up
private static boolean isLanguageSupportedInIde() {
  return PlatformUtils.isIdeaUltimate()
      || PlatformUtils.isWebStorm()
      || PlatformUtils.isCLion()
      || PlatformUtils.isGoIde();
}
 
Example 7
Source File: AlwaysPresentGoSyncPlugin.java    From intellij with Apache License 2.0 4 votes vote down vote up
/** Go plugin is only supported in IJ UE and GoLand. */
private static boolean isGoPluginSupported() {
  return PlatformUtils.isGoIde()
      || PlatformUtils.isIdeaUltimate()
      || ApplicationManager.getApplication().isUnitTestMode();
}