Codota Logo
ApplicationNamesInfo
Code IndexAdd Codota to your IDE (free)

How to use
ApplicationNamesInfo
in
com.intellij.openapi.application

Best Java code snippets using com.intellij.openapi.application.ApplicationNamesInfo (Showing top 16 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
origin: groboclown/p4ic4idea

@NonNls
public static String applicationName() {
  return ApplicationNamesInfo.getInstance().getFullProductName();
}
origin: Microsoft/azure-devops-intellij

@Before
public void localSetup() {
  when(mockApplicationNamesInfo.getProductName()).thenReturn(IDEA_NAME);
  PowerMockito.mockStatic(Platform.class, WindowsStartup.class, MacStartup.class, ApplicationNamesInfo.class, AuthHelper.class);
  when(ApplicationNamesInfo.getInstance()).thenReturn(mockApplicationNamesInfo);
  VSTS_DIR.mkdir();
}
origin: halirutan/Mathematica-IntelliJ-Plugin

params.put("Java vm vendor", SystemInfo.JAVA_VENDOR);
params.put("App Name", namesInfo.getProductName());
params.put("App Full Name", namesInfo.getFullProductName());
params.put("App Version name", appInfo.getVersionName());
params.put("Is EAP", Boolean.toString(appInfo.isEAP()));
origin: Microsoft/azure-devops-intellij

@Before
public void setUp() {
  MockitoAnnotations.initMocks(this);
  PowerMockito.mockStatic(ApplicationNamesInfo.class);
  when(ApplicationNamesInfo.getInstance()).thenReturn(mockApplicationNamesInfo);
}
origin: GoogleCloudPlatform/google-cloud-intellij

@VisibleForTesting
static Map<String, String> buildKeyValuesMap(
  @NotNull ErrorBean error,
  @NotNull ApplicationNamesInfo intelliJAppNameInfo,
  @NotNull ApplicationInfoEx intelliJAppExtendedInfo,
  @NotNull Application application) {
 Map<String, String> params =
   ImmutableMap.<String, String>builder()
     // required parameters
     .put(ERROR_MESSAGE_KEY, nullToNone(error.getMessage()))
     .put(ERROR_STACKTRACE_KEY, nullToNone(error.getStackTrace()))
     // end or required parameters
     .put(ERROR_DESCRIPTION_KEY, nullToNone(error.getDescription()))
     .put(LAST_ACTION_KEY, nullToNone(error.getLastAction()))
     .put(OS_NAME_KEY, SystemProperties.getOsName())
     .put(JAVA_VERSION_KEY, SystemProperties.getJavaVersion())
     .put(JAVA_VM_VENDOR_KEY, SystemProperties.getJavaVmVendor())
     .put(APP_NAME_KEY, intelliJAppNameInfo.getFullProductName())
     .put(APP_CODE_KEY, intelliJAppExtendedInfo.getPackageCode())
     .put(APP_NAME_VERSION_KEY, intelliJAppExtendedInfo.getVersionName())
     .put(APP_EAP_KEY, Boolean.toString(intelliJAppExtendedInfo.isEAP()))
     .put(APP_INTERNAL_KEY, Boolean.toString(application.isInternal()))
     .put(APP_VERSION_MAJOR_KEY, intelliJAppExtendedInfo.getMajorVersion())
     .put(APP_VERSION_MINOR_KEY, intelliJAppExtendedInfo.getMinorVersion())
     .put(
       PLUGIN_VERSION,
       ServiceManager.getService(PluginInfoService.class).getPluginVersion())
     .build();
 return params;
}
origin: Microsoft/azure-devops-intellij

  @Test
  public void testIsRider_False() {
    when(mockApplicationNamesInfo.getProductName()).thenReturn("IDEA");
    assertFalse(IdeaHelper.isRider());
  }
}
origin: intellij-dlanguage/intellij-dlanguage

params.put("Java vm vendor", SystemInfo.JAVA_VENDOR);
params.put("App Name", applicationNamesInfo.getProductName());
params.put("App Full Name", applicationNamesInfo.getFullProductName());
params.put("Is EAP", Boolean.toString(appInfo.isEAP()));
params.put("App Build", appInfo.getBuild().asString());
origin: intellij-dlanguage/intellij-dlanguage

  ApplicationManager.getApplication(),
  (ApplicationInfoEx) ApplicationInfo.getInstance(),
  ApplicationNamesInfo.getInstance(),
  super.getPluginDescriptor()
);
origin: GoogleCloudPlatform/google-cloud-intellij

@Before
public void setUp() {
 error = new ErrorBean(new Throwable(TEST_MESSAGE), LAST_ACTION);
 when(mockAppNameInfo.getFullProductName()).thenReturn(FULL_PRODUCT_NAME);
 when(mockAppInfoEx.getPackageCode()).thenReturn(PACKAGE_CODE);
 when(mockAppInfoEx.getVersionName()).thenReturn(VERSION_NAME);
 when(mockAppInfoEx.getMajorVersion()).thenReturn(MAJOR_VERSION);
 when(mockAppInfoEx.getMinorVersion()).thenReturn(MINOR_VERSION);
 when(pluginInfoService.getPluginVersion()).thenReturn(PLUGIN_VERSION);
}
origin: Microsoft/azure-devops-intellij

@Test
public void testIsRider_True() {
  when(mockApplicationNamesInfo.getProductName()).thenReturn(IdeaHelper.RIDER_PRODUCT_NAME);
  assertTrue(IdeaHelper.isRider());
}
origin: Microsoft/azure-devops-intellij

@Test
public void testProjectOpenedEvent_RiderNotVsts() {
  when(applicationNamesInfo.getProductName()).thenReturn(IdeaHelper.RIDER_PRODUCT_NAME);
  PowerMockito.mockStatic(ApplicationNamesInfo.class);
  when(ApplicationNamesInfo.getInstance()).thenReturn(applicationNamesInfo);
  when(VcsHelper.isVstsRepo(project)).thenReturn(false);
  when(statusBar.getWidget(anyString())).thenReturn(new BuildWidget());
  StatusBarManager.setupStatusBar();
  Map<String, Object> map = EventContextHelper.createContext(EventContextHelper.SENDER_PROJECT_OPENED);
  EventContextHelper.setProject(map, project);
  ServerEventManager.getInstance().triggerAllEvents(map);
  verify(statusBar, VerificationModeFactory.times(0)).addWidget(any(BuildWidget.class), Matchers.eq(project));
  verify(statusBar, VerificationModeFactory.times(1)).removeWidget(any(String.class));
}
origin: GoogleCloudPlatform/google-cloud-intellij

public DisablePluginWarningDialog(
  @NotNull PluginId pluginId, @NotNull Component parentComponent) {
 super(parentComponent, false);
 this.pluginId = pluginId;
 IdeaPluginDescriptor plugin = PluginManager.getPlugin(pluginId);
 isRestartCapable = ApplicationManager.getApplication().isRestartCapable();
 promptLabel.setText(
   GoogleCloudCoreMessageBundle.message(
     "error.dialog.disable.plugin.prompt", plugin.getName()));
 restartLabel.setText(
   GoogleCloudCoreMessageBundle.message(
     isRestartCapable
       ? "error.dialog.disable.plugin.restart"
       : "error.dialog.disable.plugin.norestart",
     ApplicationNamesInfo.getInstance().getFullProductName()));
 setTitle(GoogleCloudCoreMessageBundle.message("error.dialog.disable.plugin.title"));
 init();
}
origin: GoogleCloudPlatform/google-cloud-intellij

error.setMessage(event.getMessage());
ApplicationNamesInfo intelliJAppNameInfo = ApplicationNamesInfo.getInstance();
ApplicationInfoEx intelliJAppExtendedInfo = ApplicationInfoEx.getInstanceEx();
origin: Microsoft/azure-devops-intellij

when(GitBranchUtil.getDisplayableBranchText(any(GitRepository.class))).thenReturn("branch");
when(applicationNamesInfo.getProductName()).thenReturn("IDEA");
PowerMockito.mockStatic(ApplicationNamesInfo.class);
when(ApplicationNamesInfo.getInstance()).thenReturn(applicationNamesInfo);
origin: halirutan/Mathematica-IntelliJ-Plugin

ApplicationManager.getApplication(),
(ApplicationInfoEx) ApplicationInfo.getInstance(),
ApplicationNamesInfo.getInstance());
origin: Microsoft/azure-devops-intellij

@Test
public void testProjectOpenedEvent_RiderVsts() {
  when(applicationNamesInfo.getProductName()).thenReturn(IdeaHelper.RIDER_PRODUCT_NAME);
  PowerMockito.mockStatic(ApplicationNamesInfo.class);
  when(ApplicationNamesInfo.getInstance()).thenReturn(applicationNamesInfo);
  when(VcsHelper.isVstsRepo(project)).thenReturn(true);
  StatusBarManager.setupStatusBar();
  Map<String, Object> map = EventContextHelper.createContext(EventContextHelper.SENDER_PROJECT_OPENED);
  EventContextHelper.setProject(map, project);
  ServerEventManager.getInstance().triggerAllEvents(map);
  verify(statusBar, VerificationModeFactory.times(1)).addWidget(any(BuildWidget.class), Matchers.eq(project));
  buildStatusLookupOperation.onLookupStarted();
  buildStatusLookupOperation.onLookupResults(new BuildStatusLookupOperation.BuildStatusResults(
      new ServerContextBuilder().uri("https://test.visualstudio.com/").type(ServerContext.Type.VSO).build(),
      new ArrayList<BuildStatusLookupOperation.BuildStatusRecord>()));
  verify(statusBar, VerificationModeFactory.times(1)).updateWidget(anyString());
}
com.intellij.openapi.applicationApplicationNamesInfo

Most used methods

  • getFullProductName
  • getInstance
  • getProductName

Popular in Java

  • Making http requests using okhttp
  • compareTo (BigDecimal)
  • setScale (BigDecimal)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • BigInteger (java.math)
    Immutable arbitrary-precision integers. All operations behave as if BigIntegers were represented in
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Hashtable (java.util)
    Hashtable is a synchronized implementation of Map. All optional operations are supported.Neither key
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now