Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
276,900
void () { delegate.print(myBuffer); delegate.flush(); myBuffer.setLength(0); }
doFlush
276,901
ExternalSystemTaskNotificationListener () { return myNotificationListener.get(); }
getNotificationListener
276,902
RemoteExternalSystemTaskManager<S> () { try { return getService(RemoteExternalSystemTaskManager.class, myTaskManager); } catch (Exception e) { throw new IllegalStateException(String.format("Can't create '%s' service", ExternalSystemTaskManager.class.getName()), e); } }
getTaskManager
276,903
void (@NotNull String id, @NotNull ProjectSystemId externalSystemId) { }
release
276,904
boolean (@NotNull RemoteExternalSystemFacade facade) { RemoteExternalSystemFacade toCheck = facade; if (facade instanceof ExternalSystemFacadeWrapper) { toCheck = ((ExternalSystemFacadeWrapper)facade).getDelegate(); } return toCheck instanceof InProcessExternalSystemFacadeImpl; }
isAlive
276,905
void () { }
clear
276,906
RemoteExternalSystemTaskManager<ExternalSystemExecutionSettings> () { return RemoteExternalSystemTaskManager.NULL_OBJECT; }
getTaskManager
276,907
void (@NotNull ExternalSystemExecutionSettings settings) { }
applySettings
276,908
void (@NotNull RemoteExternalSystemProgressNotificationManager progressManager) { }
applyProgressManager
276,909
RawExternalSystemProjectResolver<ExternalSystemExecutionSettings> () { return RawExternalSystemProjectResolver.Companion.getNULL_OBJECT(); }
getRawProjectResolver
276,910
boolean (@NotNull ExternalSystemTaskId id) { return false; }
isTaskInProgress
276,911
boolean (@NotNull ExternalSystemTaskId id) { return false; }
cancelTask
276,912
void (TreeExpansionEvent event) { if (!mySuppressCollapseTracking) { myExpandedStateHolder.put(getPath(event.getPath()), true); } }
treeWillExpand
276,913
void (TreeExpansionEvent event) { if (!mySuppressCollapseTracking) { myExpandedStateHolder.put(getPath(event.getPath()), false); } }
treeWillCollapse
276,914
void (TreeModelEvent e) { scheduleCollapseStateAppliance(e.getTreePath()); }
treeStructureChanged
276,915
void (TreeModelEvent e) { scheduleCollapseStateAppliance(e.getTreePath()); }
treeNodesInserted
276,916
void (ActionEvent e) { ExternalTaskExecutionInfo task = get(); if (task == null) { return; } ExternalSystemUtil.runTask(task.getSettings(), task.getExecutorId(), project, externalSystemId, null, ProgressExecutionMode.NO_PROGRESS_ASYNC); }
actionPerformed
276,917
void (@NotNull TreePath path) { myPathsToProcessCollapseState.add(path); myCollapseStateAlarm.cancelAllRequests(); myCollapseStateAlarm.addRequest(() -> { // We assume that the paths collection is modified only from the EDT, so, ConcurrentModificationException doesn't have // a chance. // Another thing is that we sort ...
scheduleCollapseStateAppliance
276,918
void (@NotNull TreePath path) { final String key = getPath(path); final Boolean expanded = myExpandedStateHolder.get(key); if (expanded == null) { return; } boolean s = mySuppressCollapseTracking; mySuppressCollapseTracking = true; try { if (expanded) { expandPath(path); } else { collapsePath(path); } } finally { mySup...
applyCollapseState
276,919
String (@NotNull TreePath path) { StringBuilder buffer = new StringBuilder(); for (TreePath current = path; current != null; current = current.getParentPath()) { buffer.append(current.getLastPathComponent().toString()).append('/'); } buffer.setLength(buffer.length() - 1); return buffer.toString(); }
getPath
276,920
ExternalTaskExecutionInfo () { TreePath[] selectionPaths = getSelectionPaths(); if (selectionPaths == null || selectionPaths.length == 0) { return null; } Map<String, ExternalTaskExecutionInfo> map = new HashMap<>(); for (TreePath selectionPath : selectionPaths) { Object component = selectionPath.getLastPathComponent()...
get
276,921
boolean (@NotNull Project project) { return !getSettings(project).getLinkedProjectsSettings().isEmpty(); }
shouldBeAvailable
276,922
void (@NotNull Project project, @NotNull ToolWindow toolWindow) { toolWindow.setTitle(externalSystemId.getReadableName()); ContentManager contentManager = toolWindow.getContentManager(); contentManager.addContent(new ContentImpl(createInitializingLabel(), "", false)); ExternalProjectsManager.getInstance(project).runWhe...
createToolWindowContent
276,923
JLabel () { JLabel label = new JLabel(ExternalSystemBundle.message("initializing.0.projects.data", externalSystemId.getReadableName()), SwingConstants.CENTER); label.setOpaque(true); return label; }
createInitializingLabel
276,924
void (@NotNull String projectPath) { final AbstractExternalSystemSettings externalSystemSettings = ExternalSystemApiUtil.getSettings(myProject, myProjectSystemId); //noinspection unchecked Collection<ExternalProjectSettings> projectsSettings = externalSystemSettings.getLinkedProjectsSettings(); List<ProjectItem> projec...
setUpDialog
276,925
JComponent () { ToolbarDecorator decorator = ToolbarDecorator.createDecorator(myTree). setAddAction(button -> { ProjectItem projectItem = (ProjectItem)projectCombobox.getSelectedItem(); if(projectItem == null) return; final ExternalProjectInfo projectData = ProjectDataManager.getInstance() .getExternalProjectData(myPro...
createCenterPanel
276,926
boolean (int increment) { final DefaultMutableTreeNode[] selectedNodes = myTree.getSelectedNodes(DefaultMutableTreeNode.class, null); if (selectedNodes.length == 0) return false; boolean enabled = true; for (DefaultMutableTreeNode node : selectedNodes) { final DefaultMutableTreeNode sibling = increment == -1 ? node.get...
isMoveActionEnabled
276,927
void (int increment) { List<TaskActivationEntry> tasks = findSelectedTasks(); if (!tasks.isEmpty()) { myTaskActivator.moveTasks(tasks, increment); } else { List<String> projectsPaths = findSelectedProjects(); if (projectsPaths.isEmpty()) return; ProjectItem item = (ProjectItem)projectCombobox.getSelectedItem(); myTaskA...
moveAction
276,928
void (@NotNull final SimpleTree tree, final int direction) { final TreePath[] selectionPaths = tree.getSelectionPaths(); if (selectionPaths == null) return; ContainerUtil.sort(selectionPaths, new Comparator<>() { @Override public int compare(TreePath o1, TreePath o2) { return -direction * compare(tree.getRowForPath(o1)...
moveSelectedRows
276,929
int (TreePath o1, TreePath o2) { return -direction * compare(tree.getRowForPath(o1), tree.getRowForPath(o2)); }
compare
276,930
int (int x, int y) { return Integer.compare(x, y); }
compare
276,931
List<TaskActivationEntry> () { List<TaskActivationEntry> tasks = new SmartList<>(); for (DefaultMutableTreeNode node : myTree.getSelectedNodes(DefaultMutableTreeNode.class, null)) { tasks.addAll(findTasksUnder(ContainerUtil.ar((MyNode)node.getUserObject()))); } return tasks; }
findSelectedTasks
276,932
List<TaskActivationEntry> (SimpleNode @NotNull [] nodes) { List<TaskActivationEntry> tasks = new SmartList<>(); for (SimpleNode node : nodes) { if (node instanceof TaskNode taskNode) { final String taskName = taskNode.getName(); final PhaseNode phaseNode = (PhaseNode)taskNode.getParent(); tasks.add(new TaskActivationEn...
findTasksUnder
276,933
List<String> () { List<String> tasks = new ArrayList<>(); for (DefaultMutableTreeNode node : myTree.getSelectedNodes(DefaultMutableTreeNode.class, null)) { if (node.getUserObject() instanceof ProjectNode projectNode) { tasks.add(projectNode.myProjectPath); } } return tasks; }
findSelectedProjects
276,934
MyNode[] (final ExternalProjectSettings projectSettings, final ExternalProjectsStateProvider stateProvider, final RootNode parent) { List<String> paths = new ArrayList<>(stateProvider.getProjectsTasksActivationMap(myProjectSystemId).keySet()); paths.retainAll(projectSettings.getModules()); return ContainerUtil.mapNotNu...
buildProjectsNodes
276,935
MyNode[] (final String projectPath, final TaskActivationState tasksActivation, final MyNode parent) { return ContainerUtil.mapNotNull(Phase.values(), phase -> tasksActivation.getTasks(phase).isEmpty() ? null : new PhaseNode(projectPath, phase, tasksActivation, parent), new MyNode[]{}); }
buildProjectPhasesNodes
276,936
String () { return projectName + " (" + truncate(myProjectSettings.getExternalProjectPath()) + ")"; }
toString
276,937
String (@NotNull String s) { return s.length() < MAX_LENGTH ? s : s.substring(0, MAX_LENGTH / 2) + "..." + s.substring(s.length() - MAX_LENGTH / 2 - 3); }
truncate
276,938
boolean (Object o) { if (this == o) return true; if (!(o instanceof ProjectItem item)) return false; if (!myProjectSettings.equals(item.myProjectSettings)) return false; return true; }
equals
276,939
int () { return myProjectSettings.hashCode(); }
hashCode
276,940
void (@Nullable CachingSimpleNode nodeToUpdate) { Set<CachingSimpleNode> toUpdate = new ReferenceOpenHashSet<>(); if (nodeToUpdate == null) { for (DefaultMutableTreeNode node : myTree.getSelectedNodes(DefaultMutableTreeNode.class, null)) { final Object userObject = node.getUserObject(); if (userObject instanceof Simple...
updateTree
276,941
void (@NotNull CachingSimpleNode node) { node.cleanUpCache(); myTreeModel.invalidateAsync(node, true); if (node.getChildren().length == 0) { if (node.getParent() instanceof CachingSimpleNode) { cleanUpEmptyNodes((CachingSimpleNode)node.getParent()); } } }
cleanUpEmptyNodes
276,942
String () { return myModuleData.getId(); }
toString
276,943
PopupStep (final ProjectPopupItem projectPopupItem, final boolean finalChoice) { return new BaseListPopupStep<>(ExternalSystemBundle.message("popup.title.choose.activation.phase"), Phase.values()) { @Override public PopupStep onChosen(final Phase selectedPhase, boolean finalChoice) { final Map<String, TaskActivationSta...
onChosen
276,944
PopupStep (final Phase selectedPhase, boolean finalChoice) { final Map<String, TaskActivationState> activationMap = ExternalProjectsManagerImpl.getInstance(myProject).getStateProvider().getProjectsTasksActivationMap(myProjectSystemId); final String projectPath = projectPopupItem.myModuleData.getLinkedExternalProjectPat...
onChosen
276,945
PopupStep (final String taskName, boolean finalChoice) { return doFinalStep(() -> { myTaskActivator.addTask(new TaskActivationEntry(myProjectSystemId, selectedPhase, projectPath, taskName)); updateTree(myRootNode); }); }
onChosen
276,946
boolean (Phase phase) { return true; }
hasSubstep
276,947
boolean (ProjectPopupItem selectedValue) { return true; }
hasSubstep
276,948
boolean () { return true; }
isAutoExpandNode
276,949
MyNode[] () { ProjectItem item = (ProjectItem)projectCombobox.getSelectedItem(); if(item == null) return new MyNode[]{}; if (item.myProjectSettings.getModules().isEmpty() || item.myProjectSettings.getModules().size() == 1) { final TaskActivationState tasksActivation = myStateProvider.getTasksActivation(myProjectSystemI...
buildChildren
276,950
void (@NotNull PresentationData presentation) { super.update(presentation); presentation.setIcon(AllIcons.Nodes.ConfigFolder); }
update
276,951
String () { return myProjectName; }
getName
276,952
MyNode[] () { final TaskActivationState tasksActivation = myStateProvider.getTasksActivation(myProjectSystemId, myProjectPath); return buildProjectPhasesNodes(myProjectPath, tasksActivation, this); }
buildChildren
276,953
void (@NotNull PresentationData presentation) { super.update(presentation); presentation.setIcon(AllIcons.Nodes.ConfigFolder); }
update
276,954
boolean () { return true; }
isAutoExpandNode
276,955
MyNode[] () { return ContainerUtil.map2Array(myTaskActivationState.getTasks(myPhase), MyNode.class, taskName -> new TaskNode(taskName, this)); }
buildChildren
276,956
String () { return myPhase.toString(); }
getName
276,957
void (@NotNull PresentationData presentation) { super.update(presentation); presentation.setIcon(uiAware.getTaskIcon()); }
update
276,958
MyNode[] () { return new MyNode[0]; }
buildChildren
276,959
String () { return myTaskName; }
getName
276,960
boolean () { return true; }
isAlwaysLeaf
276,961
ExternalSystemNodeDescriptor<T> () { return (ExternalSystemNodeDescriptor<T>)getUserObject(); }
getDescriptor
276,962
void (@NotNull String name) { myName = name; }
setName
276,963
void (@NotNull PresentationData presentation) { presentation.setPresentableText(myName); presentation.setIcon(getIcon()); presentation.setTooltip(myDescription); }
update
276,964
T () { return myElement; }
getElement
276,965
String (@NotNull ExternalTaskExecutionInfo taskInfo) { return taskInfo.getSettings().getTaskNames().get(0); }
getTaskName
276,966
ExternalSystemNode<ExternalProjectPojo> (@NotNull ExternalProjectPojo project) { ExternalSystemNode<?> root = getRoot(); // Remove outdated projects. for (int i = root.getChildCount() - 1; i >= 0; i--) { ExternalSystemNode<?> child = root.getChildAt(i); ExternalSystemNodeDescriptor<?> descriptor = child.getDescriptor()...
ensureProjectNodeExists
276,967
void (@NotNull Object payload) { Deque<ExternalSystemNode<?>> toProcess = new ArrayDeque<>(); toProcess.addFirst(getRoot()); while (!toProcess.isEmpty()) { ExternalSystemNode<?> node = toProcess.removeLast(); if (payload.equals(node.getDescriptor().getElement())) { removeNodeFromParent(node); } else { for (int i = 0; i...
pruneNodes
276,968
void (@NotNull ExternalProjectPojo topLevelProject, @NotNull Collection<? extends ExternalProjectPojo> subProjects) { ExternalSystemNode<ExternalProjectPojo> topLevelProjectNode = ensureProjectNodeExists(topLevelProject); Map<String/*config path*/, ExternalProjectPojo> toAdd = new HashMap<>(); for (ExternalProjectPojo ...
ensureSubProjectsStructure
276,969
void (@NotNull String externalProjectConfigPath, @NotNull Collection<? extends ExternalTaskPojo> tasks) { if (tasks.isEmpty()) { return; } ExternalSystemNode<ExternalProjectPojo> moduleNode = findProjectNode(externalProjectConfigPath); if (moduleNode == null) { // LOG.warn(String.format( // "Can't proceed tasks for mod...
ensureTasks
276,970
ExternalTaskExecutionInfo (@NotNull ExternalTaskPojo task) { ExternalSystemTaskExecutionSettings settings = new ExternalSystemTaskExecutionSettings(); settings.setExternalProjectPath(task.getLinkedExternalProjectPath()); settings.setTaskNames(Collections.singletonList(task.getName())); settings.setTaskDescriptions(Coll...
buildTaskInfo
276,971
ExternalSystemNode<ExternalProjectPojo> (@NotNull String configPath) { for (int i = getRoot().getChildCount() - 1; i >= 0; i--) { ExternalSystemNode<?> child = getRoot().getChildAt(i); Object childElement = child.getDescriptor().getElement(); if (childElement instanceof ExternalProjectPojo && ((ExternalProjectPojo)chil...
findProjectNode
276,972
void (MutableTreeNode child, MutableTreeNode parent) { int index = findIndexFor(child, parent); super.insertNodeInto(child, parent, index); }
insertNodeInto
276,973
void (MutableTreeNode child, MutableTreeNode parent, int i) { insertNodeInto(child, parent); }
insertNodeInto
276,974
int (MutableTreeNode child, MutableTreeNode parent) { int childCount = parent.getChildCount(); if (childCount == 0) { return 0; } if (childCount == 1) { return NODE_COMPARATOR.compare(child, parent.getChildAt(0)) <= 0 ? 0 : 1; } return findIndexFor(child, parent, 0, childCount - 1); }
findIndexFor
276,975
int (MutableTreeNode child, MutableTreeNode parent, int i1, int i2) { if (i1 == i2) { return NODE_COMPARATOR.compare(child, parent.getChildAt(i1)) <= 0 ? i1 : i1 + 1; } int half = (i1 + i2) / 2; if (NODE_COMPARATOR.compare(child, parent.getChildAt(half)) <= 0) { return findIndexFor(child, parent, i1, half); } return fi...
findIndexFor
276,976
void () { myAlarm.cancelAllRequests(); }
dispose
276,977
boolean (@NotNull ExternalSystemTaskType type, @NotNull Project project) { String projectId = ExternalSystemTaskId.getProjectId(project); for (ExternalSystemTaskId id : myTasksInProgress.keySet()) { if (type.equals(id.getType()) && projectId.equals(id.getIdeProjectId())) { return true; } } return false; }
hasTaskOfTypeInProgress
276,978
List<ExternalSystemTask> (@NotNull ProjectSystemId projectSystemId, ExternalSystemTaskState @NotNull ... taskStates) { List<ExternalSystemTask> result = new SmartList<>(); for (ExternalSystemTask task : myTasksDetails.values()) { if (task instanceof AbstractExternalSystemTask externalSystemTask) { if (externalSystemTas...
findTasksOfState
276,979
void (@NotNull ExternalSystemTask task) { myTasksDetails.put(task.getId(), task); }
add
276,980
void (@NotNull ExternalSystemTaskId id) { myTasksDetails.remove(id); }
release
276,981
void (@NotNull ExternalSystemTaskId id, String workingDir) { myTasksInProgress.put(id, System.currentTimeMillis() + TOO_LONG_EXECUTION_MS); if (myAlarm.isEmpty()) { myAlarm.addRequest(() -> update(), TOO_LONG_EXECUTION_MS); } }
onStart
276,982
void (@NotNull ExternalSystemTaskId id) { myTasksInProgress.put(id, System.currentTimeMillis() + TOO_LONG_EXECUTION_MS); }
onStart
276,983
void (@NotNull ExternalSystemTaskNotificationEvent event) { myTasksInProgress.put(event.getId(), System.currentTimeMillis() + TOO_LONG_EXECUTION_MS); }
onStatusChange
276,984
void (@NotNull ExternalSystemTaskId id, @NotNull String text, boolean stdOut) { myTasksInProgress.put(id, System.currentTimeMillis() + TOO_LONG_EXECUTION_MS); }
onTaskOutput
276,985
void (@NotNull ExternalSystemTaskId id) { myTasksInProgress.remove(id); if (myTasksInProgress.isEmpty()) { myAlarm.cancelAllRequests(); } }
onEnd
276,986
void (@NotNull ExternalSystemTaskId id) { }
onSuccess
276,987
void (@NotNull ExternalSystemTaskId id, @NotNull Exception e) { }
onFailure
276,988
void (@NotNull ExternalSystemTaskId id) { }
beforeCancel
276,989
void (@NotNull ExternalSystemTaskId id) { }
onCancel
276,990
void () { long delay = TOO_LONG_EXECUTION_MS; Map<ExternalSystemTaskId, Long> newState = new HashMap<>(); Map<ExternalSystemTaskId, Long> currentState = new HashMap<>(myTasksInProgress); if (currentState.isEmpty()) { return; } for (Map.Entry<ExternalSystemTaskId, Long> entry : currentState.entrySet()) { long diff = Sys...
update
276,991
ExternalSystemProcessingManager () { Application application = ApplicationManager.getApplication(); return application.getService(ExternalSystemProcessingManager.class); }
getInstance
276,992
List<String> () { return myTasksToExecute; }
getTasksToExecute
276,993
String () { return myVmOptions; }
getVmOptions
276,994
String () { return myArguments; }
getArguments
276,995
void (@NotNull String arguments) { myArguments = myArguments == null ? arguments : myArguments + ' ' + arguments; }
appendArguments
276,996
List<String> (@Nullable String cmdArgsLine) { return cmdArgsLine != null ? ParametersListUtil.parse(cmdArgsLine, false, true) : new ArrayList<>(); }
parseCmdParameters
276,997
DataNode<ProjectData> (ExternalSystemTaskId id, RemoteExternalSystemProjectResolver resolver, ExternalSystemExecutionSettings settings) { String title = ExternalSystemBundle.message("progress.refresh.text", myProjectName, getExternalSystemId().getReadableName()); Ref<DataNode<ProjectData>> projectRef = new Ref<>(); Uni...
pauseIndexingAndResolveProjectNode
276,998
String (@NotNull String text) { return ExternalSystemBundle.message("progress.update.text", getExternalSystemId().getReadableName(), text); }
wrapProgressText
276,999
boolean () { return myIsPreviewMode; }
isPreviewMode