Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
277,600
NotificationCategory (NotificationType notificationType) { return switch (notificationType) { case INFORMATION -> INFO; case WARNING -> WARNING; case ERROR -> ERROR; default -> SIMPLE; }; }
convert
277,601
NotificationCategory (int type) { return switch (type) { case MessageCategory.ERROR -> ERROR; case MessageCategory.WARNING -> WARNING; case MessageCategory.INFORMATION, MessageCategory.STATISTICS, MessageCategory.NOTE -> INFO; case MessageCategory.SIMPLE -> SIMPLE; default -> SIMPLE; }; }
convert
277,602
void (@NotNull String url, @Nullable String text) { disabledLinks.put(url, text); }
addDisabledLink
277,603
TreeCellEditor () { return myRightTreeCellEditor; }
getRightSelfEditor
277,604
boolean () { return true; }
startEditingOnMouseMove
277,605
void (@NotNull HyperlinkEvent event) { disableLink(event, null); }
disableLink
277,606
void (@NotNull final HyperlinkEvent event, @Nullable final String linkText) { if (event.getSource() instanceof MyJEditorPane) { UIUtil.invokeLaterIfNeeded(() -> { final MyJEditorPane editorPane = (MyJEditorPane)event.getSource(); editorPane.myElement.addDisabledLink(event.getDescription(), linkText); editorPane.myEleme...
disableLink
277,607
void (@NotNull JEditorPane editorPane, @Nullable JTree tree, Object value, boolean selected, boolean hasFocus) { super.updateStyle(editorPane, tree, value, selected, hasFocus); final HTMLDocument htmlDocument = (HTMLDocument)editorPane.getDocument(); final Style linkStyle = htmlDocument.getStyleSheet().getStyle(LINK_ST...
updateStyle
277,608
void (Component comp, int x, int y) { if (myTree == null) return; final TreePath path = myTree.getLeadSelectionPath(); if (path == null) { return; } DefaultActionGroup group = new DefaultActionGroup(); group.add(ActionManager.getInstance().getAction(IdeActions.ACTION_EDIT_SOURCE)); group.add(ActionManager.getInstance()...
invokePopup
277,609
Component (JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row) { myTree = tree; updateStyle(editorComponent, tree, value, selected, false); return editorComponent; }
getTreeCellEditorComponent
277,610
Object () { return null; }
getCellEditorValue
277,611
void (HyperlinkEvent e) { if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { final NotificationListener notificationListener = myNotification.getListener(); if (notificationListener != null) { notificationListener.hyperlinkUpdate(myNotification, e); } } }
hyperlinkUpdate
277,612
void (SimpleColoredComponent renderer, JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { renderer.setIcon(getIcon(kind)); renderer.setFont(tree.getFont()); renderer.append(NewErrorTreeRenderer.calcPrefix(NotificationMessageElement.this)); }
customizeCellRenderer
277,613
Icon (@NotNull ErrorTreeElementKind kind) { return switch (kind) { case INFO -> AllIcons.General.Information; case ERROR -> AllIcons.General.Error; case WARNING -> AllIcons.General.Warning; case NOTE -> AllIcons.General.Tip; case GENERIC -> ICON_16; }; }
getIcon
277,614
CustomizeColoredTreeCellRenderer () { return myRightTreeCellRenderer; }
getRightSelfRenderer
277,615
CustomizeColoredTreeCellRenderer () { return myLeftTreeCellRenderer; }
getLeftSelfRenderer
277,616
JEditorPane (@NotNull JEditorPane myEditorPane) { String message = StringUtil.join(this.getText(), "<br>"); myEditorPane.setEditable(false); myEditorPane.setOpaque(false); myEditorPane.setEditorKit(HTMLEditorKitBuilder.simple()); myEditorPane.setHighlighter(null); final StyleSheet styleSheet = ((HTMLDocument)myEditorPa...
installJep
277,617
void (@NotNull JEditorPane editorPane, @Nullable JTree tree, Object value, boolean selected, boolean hasFocus) { final HTMLDocument htmlDocument = (HTMLDocument)editorPane.getDocument(); final Style style = htmlDocument.getStyleSheet().getStyle(MSG_STYLE); if (value instanceof LoadingNode) { StyleConstants.setForegroun...
updateStyle
277,618
Component (JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { updateStyle(myEditorPane, tree, value, selected, hasFocus); return myEditorPane; }
getTreeCellRendererComponent
277,619
AccessibleContext () { if (accessibleContext == null) { return new AccessibleMyEditorPane(); } return accessibleContext; }
getAccessibleContext
277,620
AccessibleRole () { return AccessibleRole.LABEL; }
getAccessibleRole
277,621
String () { try { Document document = MyEditorPane.this.getDocument(); String result = document.getText(0, document.getLength()); @NlsSafe String resultWithPunctuation = AccessibleContextUtil.replaceLineSeparatorsWithPunctuation(result); return resultWithPunctuation; } catch (BadLocationException e) { return super.getA...
getAccessibleName
277,622
String () { return "MessageCounter{" + "map=" + map + '}'; }
toString
277,623
ExternalSystemNotificationManager (@NotNull Project project) { return project.getService(ExternalSystemNotificationManager.class); }
getInstance
277,624
boolean (@NotNull Throwable error, @NotNull ProjectSystemId externalSystemId) { if (RemoteUtil.unwrap(error) instanceof BuildIssueException) return false; return ExternalSystemNotificationExtension.EP_NAME.getExtensionList().stream() .anyMatch(extension -> externalSystemId.equals(extension.getTargetExternalSystemId()) ...
isInternalError
277,625
boolean (@NotNull Key<String> notificationKey) { Notification notification = myUniqueNotifications.get(notificationKey); return notification != null && !notification.isExpired(); }
isNotificationActive
277,626
void (final @NotNull ProjectSystemId externalSystemId, final @NotNull NotificationData notificationData) { showNotification(externalSystemId, notificationData, null); }
showNotification
277,627
void (final @NotNull ProjectSystemId externalSystemId, final @NotNull NotificationData notificationData, @Nullable Key<String> notificationKey) { Disposer.register(this, notificationData); if (ApplicationManager.getApplication().isHeadlessEnvironment()) { if (notificationData.getNotificationCategory() == NotificationCa...
showNotification
277,628
void () { if (isDisposedOrNotOpen()) return; assert myProject != null; Project project = myProject; final Application app = ApplicationManager.getApplication(); Runnable action = () -> { if (!initializedExternalSystem.contains(externalSystemId)) { app.runWriteAction(() -> { if (isDisposedOrNotOpen()) return; ExternalSy...
run
277,629
void (final @Nullable String groupName, final @NotNull NotificationSource notificationSource, final @NotNull ProjectSystemId externalSystemId) { myMessageCounter.remove(groupName, notificationSource, externalSystemId); if (ApplicationManager.getApplication().isUnitTestMode()) return; final Pair<NotificationSource, Proj...
clearNotifications
277,630
void () { if (isDisposedOrNotOpen()) return; assert myProject != null; Project project = myProject; for (Iterator<Notification> iterator = myNotifications.iterator(); iterator.hasNext(); ) { Notification notification = iterator.next(); if (groupName == null || groupName.equals(notification.getGroupId())) { notification...
run
277,631
void (final @NotNull Notification notification, final @NotNull ProjectSystemId externalSystemId, final @NotNull NotificationData notificationData) { final VirtualFile virtualFile = notificationData.getFilePath() != null ? ExternalSystemUtil.findLocalFileByPath(notificationData.getFilePath()) : null; final String groupN...
addMessage
277,632
void (final @NotNull Notification notification) { if (!isDisposedOrNotOpen()) { notification.notify(myProject); } }
applyNotification
277,633
NewErrorTreeViewPanel (final @NotNull ProjectSystemId externalSystemId, final @NotNull NotificationSource notificationSource, boolean activateView) { ThreadingAssertions.assertEventDispatchThread(); final NewErrorTreeViewPanel errorTreeView; final String contentDisplayName = getContentDisplayName(notificationSource, ex...
prepareMessagesView
277,634
void () { myProject = null; myNotifications.clear(); myUniqueNotifications.clear(); initializedExternalSystem.clear(); }
dispose
277,635
boolean () { return myProject == null || myProject.isDisposed() || !myProject.isOpen(); }
isDisposedOrNotOpen
277,636
ExternalSystemProgressNotificationManager () { return ApplicationManager.getApplication().getService(ExternalSystemProgressNotificationManager.class); }
getInstance
277,637
void (@NotNull Notification notification, @NotNull HyperlinkEvent event) { ProjectSettingsService.getInstance(myProject).openProjectSettings(); }
hyperlinkActivated
277,638
void (@NotNull Notification notification, @NotNull HyperlinkEvent event) { ExternalSystemManager<?, ?, ?, ?, ?> manager; if (myLinkedProjectPath == null || !((manager = ExternalSystemApiUtil.getManager(mySystemId)) instanceof ExternalSystemConfigurableAware)) { ShowSettingsUtil.getInstance().showSettingsDialog(myProjec...
hyperlinkActivated
277,639
void (@NotNull ExternalSystemExecutionSettings settings) { }
setSettings
277,640
void (@NotNull ExternalSystemTaskNotificationListener notificationListener) { }
setNotificationListener
277,641
boolean (@NotNull ExternalSystemTaskId id) { return false; }
isTaskInProgress
277,642
boolean (@NotNull ExternalSystemTaskId id) { return false; }
cancelTask
277,643
void (@NotNull ExternalSystemExecutionSettings settings) { }
setSettings
277,644
void (@NotNull ExternalSystemTaskNotificationListener notificationListener) { }
setNotificationListener
277,645
boolean (@NotNull ExternalSystemTaskId id) { return false; }
isTaskInProgress
277,646
void (@NotNull ExternalSystemTaskId id, @NotNull String projectPath) { }
onStart
277,647
void (@NotNull ExternalSystemTaskId id) { }
onEnvironmentPrepared
277,648
void (@NotNull ExternalSystemTaskNotificationEvent event) { }
onStatusChange
277,649
void (@NotNull ExternalSystemTaskId id, @NotNull String text, boolean stdOut) { }
onTaskOutput
277,650
void (@NotNull ExternalSystemTaskId id) { }
onEnd
277,651
void (@NotNull ExternalSystemTaskId id) { }
onSuccess
277,652
void (@NotNull ExternalSystemTaskId id, @NotNull Exception e) { }
onFailure
277,653
void (@NotNull ExternalSystemTaskId id) { }
beforeCancel
277,654
void (ExternalSystemTaskId id) { }
onCancel
277,655
void (@NotNull S settings) { mySettings.set(settings); }
setSettings
277,656
void (@NotNull ExternalSystemTaskNotificationListener listener) { myListener.set(listener); }
setNotificationListener
277,657
ExternalSystemTaskNotificationListener () { return myListener.get(); }
getNotificationListener
277,658
boolean (@NotNull ExternalSystemTaskId id) { Set<ExternalSystemTaskId> tasks = myTasksInProgress.get(id.getType()); return tasks != null && tasks.contains(id); }
isTaskInProgress
277,659
RemoteExternalSystemFacade<S> () { return myDelegate; }
getDelegate
277,660
T () { return myDelegate; }
getDelegate
277,661
BuildIssue () { return myBuildIssue; }
getBuildIssue
277,662
String[] (@NotNull BuildIssue issue) { return issue.getQuickFixes().stream().map(fix -> fix.getId()).toArray(String[]::new); }
getQuickfixIds
277,663
Icon (@NotNull String path, int cacheKey, int flags) { return IconManager.getInstance().loadRasterizedIcon(path, ExternalSystemIcons.class.getClassLoader(), cacheKey, flags); }
load
277,664
void (final String... moduleNames) { JavaCompileTestUtil.compileModules(myProject, useProjectTaskManager, moduleNames); }
compileModules
277,665
void (String... artifactNames) { JavaCompileTestUtil.buildArtifacts(myProject, useProjectTaskManager, artifactNames); }
buildArtifacts
277,666
Artifact (Project project, String artifactName) { return ReadAction.compute(() -> ArtifactsTestUtil.findArtifact(project, artifactName)); }
findArtifact
277,667
void (final String artifactName, final String expected) { Artifact artifact = findArtifact(myProject, artifactName); assertThat(toSystemIndependentName(artifact.getOutputPath())).isEqualTo(expected); }
assertArtifactOutputPath
277,668
void (String artifactName, TestFileSystemItem fs) { final Artifact artifact = findArtifact(myProject, artifactName); final String outputFile = artifact.getOutputFilePath(); assert outputFile != null; final File file = new File(outputFile); assert file.exists(); fs.assertFileEqual(file); }
assertArtifactOutput
277,669
void (String moduleName, String... outputs) { Module module = getModule(moduleName); String[] outputPaths = ContainerUtil.map2Array(CompilerPaths.getOutputPaths(new Module[]{module}), String.class, s -> getAbsolutePath(s)); assertUnorderedElementsAreEqual(outputPaths, outputs); String[] outputPathsFromEnumerator = Cont...
assertModuleOutputs
277,670
void (String moduleName, String output, String testOutput) { CompilerModuleExtension e = getCompilerExtension(moduleName); assertFalse(e.isCompilerOutputPathInherited()); assertEquals(output, getAbsolutePath(e.getCompilerOutputUrl())); assertEquals(testOutput, getAbsolutePath(e.getCompilerOutputUrlForTests())); }
assertModuleOutput
277,671
void (String moduleName) { CompilerModuleExtension e = getCompilerExtension(moduleName); assertTrue(e.isCompilerOutputPathInherited()); }
assertModuleInheritedOutput
277,672
CompilerModuleExtension (String module) { return CompilerModuleExtension.getInstance(getModule(module)); }
getCompilerExtension
277,673
void (String... expectedNames) { final List<String> actualNames = ContainerUtil.map( ReadAction.compute(() -> ArtifactManager.getInstance(myProject).getAllArtifactsIncludingInvalid()), artifact -> artifact.getName()); assertUnorderedElementsAreEqual(actualNames, expectedNames); }
assertArtifacts
277,674
ExternalSystemSettingsControl<TestExternalProjectSettings> (@NotNull TestExternalProjectSettings settings) { return new TestExternalProjectSettingsControl(settings); }
createProjectSettingsControl
277,675
ExternalSystemSettingsControl<TestExternalSystemSettings> (@NotNull TestExternalSystemSettings settings) { return new TestExternalSystemSettingsControl(); }
createSystemSettingsControl
277,676
TestExternalProjectSettings () { throw new UnsupportedOperationException(); }
newProjectSettings
277,677
String () { return "ES Settings"; }
getId
277,678
void (@NotNull PaintAwarePanel canvas, int indentLevel) { }
fillUi
277,679
void () { }
reset
277,680
boolean () { return false; }
isModified
277,681
void (@NotNull TestExternalSystemSettings settings) { }
apply
277,682
void () { }
disposeUIResources
277,683
void (boolean show) { }
showUi
277,684
void (@NotNull PaintAwarePanel content, int indentLevel) { }
fillExtraControls
277,685
boolean () { return false; }
isExtraSettingModified
277,686
void (boolean isDefaultModuleCreation) { }
resetExtraSettings
277,687
void (@NotNull TestExternalProjectSettings settings) { }
applyExtraSettings
277,688
boolean (@NotNull TestExternalProjectSettings settings) { return false; }
validate
277,689
boolean () { return false; }
runInDispatchThread
277,690
void () { Module module = ModuleManager.getInstance(myProject).findModuleByName(TEST_MODULE_NAME); ExternalProjectsManagerImpl.getInstance(myProject).init(); addTaskTrigger("beforeBuildTask1", BEFORE_COMPILE, module); addTaskTrigger("beforeBuildTask2", BEFORE_COMPILE, module); addTaskTrigger("afterBuildTask1", AFTER_CO...
testBeforeAfterBuildTasks
277,691
void (String taskName, ExternalSystemTaskActivator.Phase phase, Module module) { String projectPath = ExternalSystemApiUtil.getExternalProjectPath(module); ExternalSystemTaskActivator taskActivator = ExternalProjectsManagerImpl.getInstance(myProject).getTaskActivator(); taskActivator.addTask(new ExternalSystemTaskActiv...
addTaskTrigger
277,692
void (@NotNull Module module) { Promise<ProjectTaskManager.Result> promise = ProjectTaskManager.getInstance(module.getProject()).build(module); edt(() -> PlatformTestUtil.waitForPromise(promise)); }
build
277,693
void (@NotNull Module module) { Promise<ProjectTaskManager.Result> promise = ProjectTaskManager.getInstance(module.getProject()).rebuild(module); edt(() -> PlatformTestUtil.waitForPromise(promise)); }
rebuild
277,694
String () { return "Test_external_system_id"; }
getConfigurationFactoryId
277,695
boolean (@NotNull ExternalSystemTaskId taskId, @NotNull ExternalSystemTaskNotificationListener listener) { return false; }
cancelTask
277,696
void () { final List<String> callTrace = new ArrayList<>(); maskProjectDataServices(new TestDataService(callTrace)); new ProjectDataManagerImpl().importData( new DataNode<>(ProjectKeys.PROJECT, new ProjectData(ProjectSystemId.IDE, "externalName", "externalPath", "linkedPath"), null), myProject); assertContainsElements(...
testDataServiceIsCalledIfNoNodes
277,697
void () { final List<String> callTrace = new ArrayList<>(); maskProjectDataServices(new RunAfterTestDataService(callTrace), new TestDataService(callTrace)); new ProjectDataManagerImpl().importData( new DataNode<>(ProjectKeys.PROJECT, new ProjectData(ProjectSystemId.IDE, "externalName", "externalPath", "linkedPath"), nu...
testDataServiceKeyOrdering
277,698
void () { int n = 100; final List<String> callTrace = new ArrayList<>(); TestDataService[] dataServiceArray = new TestDataService[n]; for (int i = 0; i < n; i++) { dataServiceArray[i] = new TestDataService(callTrace); } maskProjectDataServices(dataServiceArray); final CountDownLatch latch = new CountDownLatch(1); final...
testConcurrentDataServiceAccess
277,699
void () { ProjectDataManagerImpl dataManager = ProjectDataManagerImpl.getInstance(); ConcurrentDetectingDataService detectingService = new ConcurrentDetectingDataService(); maskProjectDataServices(detectingService); int degreeOfConcurrency = 2; CountDownLatch testStart = new CountDownLatch(1); AtomicInteger unfinishedI...
testConcurrentDataImport