Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
6,300
void () { basicUpdateConfig(); DaemonCodeAnalyzer.getInstance(getProject()).restart(); }
updateConfig
6,301
void (final boolean value) { TREE_VIEW_ANSI_COLOR.primSet(myAllOptions, value); }
setTreeViewAnsiColor
6,302
void (final boolean value) { TREE_VIEW.primSet(myAllOptions, value); }
setTreeView
6,303
void (final boolean value) { VERBOSE.primSet(myAllOptions, value); }
setVerboseMode
6,304
boolean () { return CLOSE_ON_NO_ERRORS.value(myAllOptions); }
isViewClosedWhenNoErrors
6,305
void () { final XmlFile antFile = getAntFile(); if (antFile != null) { bindAnt(); myClassloaderHolder.updateClasspath(); } }
basicUpdateConfig
6,306
void () { ANT_REFERENCE.set(getAllOptions(), ANT_REFERENCE.get(getAllOptions()).bind(GlobalAntConfiguration.getInstance())); }
bindAnt
6,307
TargetFilter (final String targetName) { final List<TargetFilter> filters; synchronized (myOptionsLock) { filters = TARGET_FILTERS.get(myAllOptions); } for (TargetFilter targetFilter : filters) { if (Objects.equals(targetName, targetFilter.getTargetName())) { return targetFilter; } } return null; }
findFilter
6,308
ClassLoader () { return myClassloaderHolder.getClassloader(); }
getClassLoader
6,309
void (final Element element) { String value = element.getAttributeValue(PATH); myFile = new File(PathUtil.toPresentableUrl(value)); }
readExternal
6,310
void (final Element element) { String url = VirtualFileManager.constructUrl(LocalFileSystem.PROTOCOL, myFile.getAbsolutePath().replace(File.separatorChar, '/')); element.setAttribute(PATH, url); }
writeExternal
6,311
void (final List<? super File> files) { files.add(myFile); }
addFilesTo
6,312
CellAppearanceEx () { return FileAppearanceService.getInstance().forIoFile(myFile); }
getAppearance
6,313
SinglePathEntry (VirtualFile file) { return new SinglePathEntry(file.getPresentableUrl()); }
fromVirtualFile
6,314
ClassLoader () { List<File> files = new ArrayList<>(); // ant installation jars List<AntClasspathEntry> cp = AntInstallation.CLASS_PATH.get(myOptions); for (final AntClasspathEntry entry : cp) { entry.addFilesTo(files); } // jars from user home files.addAll(AntBuildFileImpl.getUserHomeLibraries()); List<Path> paths = n...
buildClasspath
6,315
DataContext (CompileContext context) { Project project = context.getProject(); CompileScope scope = context.getCompileScope(); Module[] modules = ReadAction.compute(() -> scope.getAffectedModules()); return SimpleDataContext.builder() .add(CommonDataKeys.PROJECT, project) .add(PlatformCoreDataKeys.MODULE, modules.lengt...
createDataContext
6,316
String () { return "$defaultJDKName"; }
getName
6,317
String (final AbstractPropertyContainer container) { return get(container); }
getDefault
6,318
String (@NotNull AbstractPropertyContainer container) { if (!container.hasProperty(this)) { return null; } AntConfiguration antConfiguration = INSTANCE.get(container); return ProjectRootManager.getInstance(antConfiguration.getProject()).getProjectSdkName(); }
get
6,319
String (final String jdkName) { return jdkName; }
copy
6,320
void () { restartDaemon(); }
configurationLoaded
6,321
void (final AntBuildFile buildFile) { restartDaemon(); }
buildFileChanged
6,322
void (final AntBuildFile buildFile) { restartDaemon(); }
buildFileAdded
6,323
void (final AntBuildFile buildFile) { restartDaemon(); }
buildFileRemoved
6,324
void () { ModalityUiUtil.invokeLaterIfNeeded(ModalityState.any(), () -> { if (project.isDisposed()) return; DaemonCodeAnalyzer.getInstance(project).restart(); }); }
restartDaemon
6,325
ChangeApplier (@NotNull List<? extends @NotNull VFileEvent> events) { Set<VirtualFile> toDelete = null; for (VFileEvent event : events) { if (event instanceof VFileDeleteEvent) { if (toDelete == null) { toDelete = new HashSet<>(); } toDelete.add(event.getFile()); } } if (toDelete == null) { return NO_OP; } Set<AntBuild...
prepareChange
6,326
void () { }
dispose
6,327
Element () { final Element state = new Element("state"); getProperties().writeExternal(state); ReadAction.run(() -> { for (final AntBuildFileBase buildFile : myBuildFiles) { final Element element = new Element(BUILD_FILE); //noinspection ConstantConditions element.setAttribute(URL, buildFile.getVirtualFile().getUrl());...
getState
6,328
void (@NotNull Element state) { try { List<Pair<Element, String>> files = new ArrayList<>(); for (Iterator<Element> iterator = state.getChildren(BUILD_FILE).iterator(); iterator.hasNext(); ) { Element element = iterator.next(); iterator.remove(); String url = element.getAttributeValue(URL); if (url != null) { files.add...
loadState
6,329
void () { myInitialized = true; }
noStateLoaded
6,330
void () { StartupManager.getInstance(getProject()).runAfterOpened(() -> { queueLater(new Task.Backgroundable(getProject(), AntBundle.message("progress.text.loading.ant.config"), false) { @Override public void run(@NotNull final ProgressIndicator indicator) { Project project = getProject(); if (project == null || projec...
queueInitialization
6,331
void (@NotNull final ProgressIndicator indicator) { Project project = getProject(); if (project == null || project.isDisposed()) { myInitialized = true; // ensure all clients waiting on isInitialized() are released return; } List<Pair<Element, String>> configFiles = myBuildFilesConfiguration.getAndSet(null); if (config...
run
6,332
void () { if (!isInitialized()) { ProgressIndicatorUtils.awaitWithCheckCanceled(() -> { if (!isInitialized()) { TimeoutUtil.sleep(10); return isInitialized(); } return true; }); } }
ensureInitialized
6,333
boolean () { return myInitialized; }
isInitialized
6,334
boolean () { if (!myBuildFiles.isEmpty() || !myInitialized) { return true; } List<Pair<Element, String>> files = myBuildFilesConfiguration.get(); return files != null && !files.isEmpty(); }
hasBuildFiles
6,335
AntBuildFile[] () { return myBuildFiles.toArray(new AntBuildFileBase[0]); }
getBuildFiles
6,336
List<AntBuildFileBase> () { return myBuildFiles; }
getBuildFileList
6,337
NotificationInfo () { return new NotificationInfo("Ant", AntBundle.message("system.notification.title.ant.task.finished"), ""); }
getNotificationInfo
6,338
void (@NotNull final ProgressIndicator indicator) { indicator.setIndeterminate(true); indicator.pushState(); try { indicator.setText(AntBundle.message("progress.text.register.ant.build.file", file.getPresentableUrl())); incModificationCount(); boolean added = runNonBlocking(() -> { try { for (AntBuildFile buildFile : g...
run
6,339
void (@NotNull AntBuildFile file) { removeBuildFiles(Collections.singleton((AntBuildFileBase)file)); }
removeBuildFile
6,340
boolean (Collection<AntBuildFileBase> files) { boolean removed = false; for (AntBuildFileBase file : files) { incModificationCount(); removed |= removeBuildFileImpl(file); } updateRegisteredActions(); return removed; }
removeBuildFiles
6,341
void (final AntConfigurationListener listener) { myEventDispatcher.addListener(listener); }
addAntConfigurationListener
6,342
void (final AntConfigurationListener listener) { myEventDispatcher.removeListener(listener); }
removeAntConfigurationListener
6,343
boolean () { return getAntWorkspaceConfiguration().FILTER_TARGETS; }
isFilterTargets
6,344
void (final boolean value) { getAntWorkspaceConfiguration().FILTER_TARGETS = value; }
setFilterTargets
6,345
AntBuildTarget[] (final AntBuildFile buildFile) { final List<ExecutionEvent> events = getEventsByClass(); if (events.isEmpty()) { return AntBuildTargetBase.EMPTY_ARRAY; } return events.stream().map(event -> (MetaTarget)getTargetForEvent(event)) .filter(target -> target != null && buildFile.equals(target.getBuildFile())...
getMetaTargets
6,346
List<ExecutionEvent> (final AntBuildTarget target) { final List<ExecutionEvent> list = new ArrayList<>(); synchronized (myEventToTargetMap) { for (final ExecutionEvent event : myEventToTargetMap.keySet()) { final AntBuildTarget targetForEvent = getTargetForEvent(event); if (target.equals(targetForEvent)) { list.add(eve...
getEventsForTarget
6,347
AntBuildTarget (final ExecutionEvent event) { final Pair<AntBuildFile, String> pair = myEventToTargetMap.get(event); if (pair == null) { return null; } final AntBuildFileBase buildFile = (AntBuildFileBase)pair.first; if (!myBuildFiles.contains(buildFile)) { // file was removed return null; } final String targetName = p...
getTargetForEvent
6,348
void (final AntBuildFile buildFile, final String targetName, final ExecutionEvent event) { myEventToTargetMap.put(event, Pair.create(buildFile, targetName)); }
setTargetForEvent
6,349
void (final ExecutionEvent event) { myEventToTargetMap.remove(event); }
clearTargetForEvent
6,350
void (final AntBuildFile buildFile) { incModificationCount(); myEventDispatcher.getMulticaster().buildFileChanged(buildFile); updateRegisteredActions(); }
updateBuildFile
6,351
boolean () { return getAntWorkspaceConfiguration().IS_AUTOSCROLL_TO_SOURCE; }
isAutoScrollToSource
6,352
void (final boolean value) { getAntWorkspaceConfiguration().IS_AUTOSCROLL_TO_SOURCE = value; }
setAutoScrollToSource
6,353
AntInstallation () { return DEFAULT_ANT.get(getProperties()).find(GlobalAntConfiguration.getInstance()); }
getProjectDefaultAnt
6,354
AntBuildModelBase (@NotNull AntBuildFileBase buildFile) { return myBuildFiles.contains(buildFile) ? getModel(buildFile) : null; }
getModelIfRegistered
6,355
void (final Element element, final AntBuildFile buildFile) { List<Element> events = null; final Set<String> savedEvents = new HashSet<>(); synchronized (myEventToTargetMap) { for (final ExecutionEvent event : myEventToTargetMap.keySet()) { final Pair<AntBuildFile, String> pair = myEventToTargetMap.get(event); if (!buil...
saveEvents
6,356
AntBuildModelBase (@NotNull AntBuildFile buildFile) { AntBuildModelBase model = myModelToBuildFileMap.get(buildFile); if (model == null) { synchronized (myModelToBuildFileMap) { model = new AntBuildModelImpl(buildFile); final AntBuildModelBase prev = myModelToBuildFileMap.put(buildFile, model); if (prev != null) { mode...
getModel
6,357
AntBuildFile (final String id) { for (AntBuildFile buildFile : myBuildFiles) { AntBuildModelBase model = (AntBuildModelBase)buildFile.getModel(); if (id.equals(model.getDefaultTargetActionId())) { return buildFile; } if (model.hasTargetWithActionId(id)) return buildFile; } return null; }
findBuildFileByActionId
6,358
void () { final Project project = getProject(); if (project.isDisposed()) { return; } final List<Pair<String, AnAction>> actionList = new ArrayList<>(); for (final AntBuildFileBase buildFile : myBuildFiles) { final AntBuildModelBase model = buildFile.getModel(); String defaultTargetActionId = model.getDefaultTargetActi...
updateRegisteredActions
6,359
AntWorkspaceConfiguration () { return AntWorkspaceConfiguration.getInstance(getProject()); }
getAntWorkspaceConfiguration
6,360
void (final AntBuildTarget[] targets, final List<? super Pair<String, AnAction>> actionList, final AntBuildFile buildFile) { for (final AntBuildTarget target : targets) { final String actionId = ((AntBuildTargetBase)target).getActionId(); if (actionId != null) { final TargetAction action = new TargetAction( buildFile, ...
collectTargetActions
6,361
boolean (@NotNull AntBuildFile buildFile) { XmlFile antFile = buildFile.getAntFile(); if (antFile != null) { AntSupport.markFileAsAntFile(antFile.getOriginalFile().getVirtualFile(), antFile.getProject(), false); } boolean removed = myBuildFiles.remove(buildFile); removed |= myModelToBuildFileMap.remove(buildFile) != nu...
removeBuildFileImpl
6,362
boolean (final CompileContext compileContext, final DataContext dataContext) { return runTargetSynchronously(compileContext, dataContext, ExecuteBeforeCompilationEvent.getInstance()); }
executeTargetBeforeCompile
6,363
boolean (final CompileContext compileContext, final DataContext dataContext) { return runTargetSynchronously(compileContext, dataContext, ExecuteAfterCompilationEvent.getInstance()); }
executeTargetAfterCompile
6,364
boolean (CompileContext compileContext, final DataContext dataContext, ExecutionEvent event) { ApplicationManager.getApplication().assertIsNonDispatchThread(); final ProgressIndicator progress = compileContext.getProgressIndicator(); progress.pushState(); try { if (!isInitialized()) { progress.setText(AntBundle.message...
runTargetSynchronously
6,365
boolean (final DataContext dataContext, final AntBuildTarget target) { return executeTargetSynchronously(dataContext, target, Collections.emptyList()); }
executeTargetSynchronously
6,366
boolean (final DataContext dataContext, final AntBuildTarget target, final List<BuildFileProperty> additionalProperties) { final Semaphore targetDone = new Semaphore(); targetDone.down(); final Ref<Boolean> result = Ref.create(Boolean.FALSE); ApplicationManager.getApplication().invokeLater(() -> { try { final Project p...
executeTargetSynchronously
6,367
void (int state, int errorCount) { result.set((state == AntBuildListener.FINISHED_SUCCESSFULLY) && (errorCount == 0)); targetDone.up(); }
buildFinished
6,368
List<ExecutionEvent> () { final Thread initThread = myInitThread; if (initThread == null || initThread != Thread.currentThread()) { ensureInitialized(); } final List<ExecutionEvent> list = new ArrayList<>(); synchronized (myEventToTargetMap) { for (final ExecutionEvent event : myEventToTargetMap.keySet()) { if (event i...
getEventsByClass
6,369
void (final Task task) { final Application app = ApplicationManager.getApplication(); if (task.isHeadless()) { // for headless tasks we need to ensure async execution. // Otherwise, calls to AntConfiguration.getInstance() from the task will cause SOE app.invokeLater(task::queue); } else { task.queue(); } }
queueLater
6,370
void (@NotNull XmlFile file, @Nullable XmlFile context) { if (context != null) { myAntFileToContextFileMap.put(file.getVirtualFile(), context.getVirtualFile()); } else { myAntFileToContextFileMap.remove(file.getVirtualFile()); } }
setContextFile
6,371
XmlFile (@Nullable final XmlFile file) { if (file == null) { return null; } final VirtualFile context = myAntFileToContextFileMap.get(file.getVirtualFile()); if (context == null) { return null; } final PsiFile psiFile = PsiManager.getInstance(getProject()).findFile(context); if (!(psiFile instanceof XmlFile xmlFile)) {...
getContextFile
6,372
AntBuildFileBase (@NotNull PsiFile file) { final VirtualFile vFile = file.getVirtualFile(); if (vFile != null) { for (AntBuildFileBase bFile : myBuildFiles) { if (vFile.equals(bFile.getVirtualFile())) { return bFile; } } } return null; }
getAntBuildFile
6,373
XmlFile (final XmlFile file) { return new Object() { @Nullable XmlFile findContext(final XmlFile file, Set<? super PsiElement> processed) { if (file != null) { processed.add(file); final XmlFile contextFile = getContextFile(file); return (contextFile == null || processed.contains(contextFile))? file : findContext(conte...
getEffectiveContextFile
6,374
int (final Element o1, final Element o2) { for (String attribName : COMPARABLE_ATTRIB_NAMES) { final int valuesEqual = Comparing.compare(o1.getAttributeValue(attribName), o2.getAttributeValue(attribName)); if (valuesEqual != 0) { return valuesEqual; } } return 0; }
compare
6,375
void () { synchronized (myAntFileToContextFileMap) { for (Iterator<Map.Entry<VirtualFile,VirtualFile>> it = myAntFileToContextFileMap.entrySet().iterator(); it.hasNext();) { final Map.Entry<VirtualFile, VirtualFile> entry = it.next(); if (myDeleted.contains(entry.getKey()) || myDeleted.contains(entry.getValue())) { it....
beforeVfsChange
6,376
void () { ApplicationManager.getApplication().executeOnPooledThread(() -> runNonBlocking(() -> removeBuildFiles(myAntFiles))); }
afterVfsChange
6,377
void (@NotNull Runnable task) { runNonBlocking(() -> { task.run(); return null; }, null); }
runNonBlocking
6,378
ClassLoader () { List<File> files = new ArrayList<>(); List<Path> paths = new ArrayList<>(); for (AntClasspathEntry entry : AntBuildFileImpl.ADDITIONAL_CLASSPATH.get(myOptions)) { entry.addFilesTo(files); for (File file : files) { paths.add(file.toPath()); } files.clear(); } final AntInstallation antInstallation = AntB...
buildClasspath
6,379
void (final ActionDescription description) { myActions.add(description); }
addActionDescription
6,380
DefaultActionGroup () { final DefaultActionGroup actionGroup = new DefaultActionGroup(); for (final ActionDescription actionDescription : myActions) { actionGroup.add(actionDescription.createAction(getList())); } return actionGroup; }
createActionGroup
6,381
ActionToolbar (final boolean horizontal) { return ActionManager.getInstance().createActionToolbar("AntReorderableListToolbar", createActionGroup(), horizontal); }
createActionToolbar
6,382
AntInstallation (JComponent parent) { final DialogWrapper dialog = new MyDialog(parent); if (!dialog.showAndGet()) { return null; } apply(); return myForm.getSelectedAnt(); }
showDialog
6,383
void (AntInstallation antInstallation) { myForm.selectAnt(antInstallation); }
setSelection
6,384
JComponent () { return myForm.getComponent(); }
getComponent
6,385
void (PropertyChangeEvent evt) { myBinding.apply(getProperties(myCurrent)); myAnts.updateItem(myCurrent); }
propertyChange
6,386
void (ListSelectionEvent e) { if (myCurrent != null) myBinding.apply(getProperties(myCurrent)); myCurrent = myAnts.getSelectedItem(); if (myCurrent == null) { myBinding.loadValues(AbstractProperty.AbstractPropertyContainer.EMPTY); myBinding.beDisabled(); } else { if (antInstallation.IS_USER_ANT.value(myCurrent)) { myBi...
valueChanged
6,387
JList<AntInstallation> () { return myAnts.getList(); }
getAntsList
6,388
JComponent () { return mySplitter; }
getComponent
6,389
AntInstallation () { return myAnts.getSelectedItem(); }
getSelectedAnt
6,390
void (Collection<AntInstallation> antInstallations) { myAnts.setItems(antInstallations); }
setAnts
6,391
void () { if (myCurrent != null) myBinding.apply(getProperties(myCurrent)); ArrayList<AbstractProperty> properties = new ArrayList<>(); myBinding.addAllPropertiesTo(properties); for (AntInstallation ant : myWorkingProperties.keySet()) { EditPropertyContainer container = myWorkingProperties.get(ant); container.apply(); ...
applyModifications
6,392
void (AntInstallation antInstallation) { myAnts.setSelection(antInstallation); }
selectAnt
6,393
ArrayList<AntInstallation> () { return myAnts.getAdded(); }
getAddedAnts
6,394
ArrayList<AntInstallation> () { return myAnts.getRemoved(); }
getRemovedAnts
6,395
EditPropertyContainer (AntInstallation ant) { EditPropertyContainer properties = myWorkingProperties.get(ant); if (properties != null) return properties; properties = new EditPropertyContainer(myGlobalWorkingProperties, ant.getProperties()); myWorkingProperties.put(ant, properties); return properties; }
getProperties
6,396
AntInstallation () { FileChooserDescriptor descriptor = FileChooserDescriptorFactory.createSingleFolderDescriptor(); VirtualFile file = FileChooser.chooseFile(descriptor, myParent, null, null); if (file == null) return null; try { final AntInstallation inst = AntInstallation.fromHome(file.getPresentableUrl()); adjustNa...
create
6,397
void (final AntInstallation justCreated) { int nameIndex = 0; String adjustedName = justCreated.getName(); final ListModel<AntInstallation> model = myParent.getList().getModel(); int idx = 0; while (idx < model.getSize()) { final AntInstallation inst = model.getElementAt(idx++); if (adjustedName.equals(inst.getName()))...
adjustName
6,398
JComponent () { return myForm.getComponent(); }
createCenterPanel
6,399
String () { return "antSetDialogDimensionKey"; }
getDimensionServiceKey