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 = new ArrayList<>(files.size()); for (File file : files) { paths.add(file.toPath()); } return new AntResourcesClassLoader(paths, null, true, false); }
|
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.length == 1? modules[0] : null) .add(LangDataKeys.MODULE_CONTEXT_ARRAY, modules) .add(COMPILER_CONTEXT_MAKE_KEY, context.isMake()) .build(); }
|
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<AntBuildFileBase> antFiles = null; for (AntBuildFileBase file : myBuildFiles) { if (toDelete.contains(file.getVirtualFile())) { if (antFiles == null) { antFiles = new HashSet<>(); } antFiles.add(file); } } return antFiles == null? NO_OP : new FileDeletionChangeApplier(toDelete, antFiles); }
|
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()); buildFile.writeProperties(element); saveEvents(element, buildFile); state.addContent(element); } final List<VirtualFile> files; synchronized (myAntFileToContextFileMap) { files = new ArrayList<>(myAntFileToContextFileMap.keySet()); } // sort in order to minimize changes files.sort(Comparator.comparing(VirtualFile::getUrl)); for (VirtualFile file : files) { final Element element = new Element(CONTEXT_MAPPING); element.setAttribute(URL, file.getUrl()); final VirtualFile contextFile = myAntFileToContextFileMap.get(file); if (contextFile != null) { element.setAttribute(CONTEXT, contextFile.getUrl()); } state.addContent(element); } }); return state; }
|
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(Pair.create(element, url)); } } myBuildFilesConfiguration.set(files); final VirtualFileManager vfManager = VirtualFileManager.getInstance(); // contexts myAntFileToContextFileMap.clear(); for (Element element : state.getChildren(CONTEXT_MAPPING)) { String url = element.getAttributeValue(URL); String contextUrl = element.getAttributeValue(CONTEXT); assert url != null; VirtualFile file = vfManager.findFileByUrl(url); assert contextUrl != null; VirtualFile contextFile = vfManager.findFileByUrl(contextUrl); if (file != null && contextFile != null) { myAntFileToContextFileMap.put(file, contextFile); } } getProperties().readExternal(state); } finally { queueInitialization(); } }
|
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 || project.isDisposed()) { myInitialized = true; // ensure all clients waiting on isInitialized() are released return; } List<Pair<Element, String>> configFiles = myBuildFilesConfiguration.getAndSet(null); if (configFiles != null) { applyConfigFiles(indicator, configFiles); } } }); }); }
|
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 (configFiles != null) { applyConfigFiles(indicator, configFiles); } }
|
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 : getBuildFileList()) { final VirtualFile vFile = buildFile.getVirtualFile(); if (vFile != null && vFile.equals(file)) { result.set(buildFile); return Boolean.FALSE; } } result.set(addBuildFileImpl(file, null)); updateRegisteredActions(); return Boolean.TRUE; } catch (AntNoFileException e) { ex.set(e); } return Boolean.FALSE; }, Boolean.FALSE); if (added) { ApplicationManager.getApplication().invokeLater(() -> myEventDispatcher.getMulticaster().buildFileAdded(result.get()), ModalityState.any()); } } catch (ProcessCanceledException ignored) { } finally { indicator.popState(); } }
|
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())).toArray(AntBuildTarget[]::new); }
|
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(event); } } } return list; }
|
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 = pair.second; final AntBuildTarget antBuildTarget = buildFile.getModel().findTarget(targetName); if (antBuildTarget != null) { return antBuildTarget; } for (ExecutionEvent ev : getEventsByClass()) { final String name = ExecuteCompositeTargetEvent.TYPE_ID.equals(ev.getTypeId())? ((ExecuteCompositeTargetEvent)ev).getMetaTargetName() : ev.getPresentableName(); if (Comparing.strEqual(targetName, name)) { return new MetaTarget(buildFile, ev.getPresentableName(), ((ExecuteCompositeTargetEvent)ev).getTargetNames()); } } return null; }
|
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 (!buildFile.equals(pair.first)) { continue; } Element eventElement = new Element(EXECUTE_ON_ELEMENT); eventElement.setAttribute(EVENT_ELEMENT, event.getTypeId()); eventElement.setAttribute(TARGET_ELEMENT, pair.second); final String id = event.writeExternal(eventElement, getProject()); if (savedEvents.contains(id)) continue; savedEvents.add(id); if (events == null) { events = new ArrayList<>(); } events.add(eventElement); } } if (events != null) { events.sort(EventElementComparator.INSTANCE); for (Element eventElement : events) { element.addContent(eventElement); } } }
|
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) { model = prev; myModelToBuildFileMap.put(buildFile, prev); } } } return model; }
|
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.getDefaultTargetActionId(); if (defaultTargetActionId != null) { final TargetAction action = new TargetAction( buildFile, TargetAction.getDefaultTargetName(), Collections.singletonList(TargetAction.getDefaultTargetName()), null ); actionList.add(new Pair<>(defaultTargetActionId, action)); } collectTargetActions(model.getFilteredTargets(), actionList, buildFile); collectTargetActions(getMetaTargets(buildFile), actionList, buildFile); } //noinspection SynchronizeOnThis synchronized (this) { // unregister Ant actions ActionManagerEx actionManager = ActionManagerEx.getInstanceEx(); for (String oldId : actionManager.getActionIdList(AntConfiguration.getActionIdPrefix(project))) { actionManager.unregisterAction(oldId); } if (!actionList.isEmpty()) { final Set<String> registeredIds = new HashSet<>(); for (Pair<String, AnAction> pair : actionList) { if (!registeredIds.contains(pair.first)) { registeredIds.add(pair.first); actionManager.registerAction(pair.first, pair.second); } } } } }
|
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, target.getName(), target.getTargetNames(), target.getNotEmptyDescription() ); actionList.add(new Pair<>(actionId, action)); } } }
|
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) != null; if (removed) { myEventDispatcher.getMulticaster().buildFileRemoved(buildFile); } return removed; }
|
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("progress.text.loading.ant.config")); ensureInitialized(); } final AntBuildTarget target = getTargetForEvent(event); if (target == null) { // no task assigned return true; } if (ExecuteAfterCompilationEvent.TYPE_ID.equals(event.getTypeId()) && compileContext.getMessageCount(CompilerMessageCategory.ERROR) > 0) { compileContext.addMessage( CompilerMessageCategory.INFORMATION, AntBundle.message("message.skip.ant.target.after.compilation.errors", target.getDisplayName()), null, -1, -1 ); return true; } progress.setText(AntBundle.message("progress.text.running.ant.tasks")); return executeTargetSynchronously(dataContext, target); } finally { progress.popState(); } }
|
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 project = dataContext.getData(CommonDataKeys.PROJECT); if (project == null || project.isDisposed()) { targetDone.up(); } else { target.run(dataContext, additionalProperties, new AntBuildListener() { @Override public void buildFinished(int state, int errorCount) { result.set((state == AntBuildListener.FINISHED_SUCCESSFULLY) && (errorCount == 0)); targetDone.up(); } }); } } catch (Throwable e) { targetDone.up(); LOG.error(e); } }); targetDone.waitFor(); return result.get(); }
|
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 instanceof ExecuteCompositeTargetEvent) { list.add(event); } } } return list; }
|
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)) { return null; } return AntDomFileDescription.isAntFile(xmlFile)? xmlFile : null; }
|
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(contextFile, processed); } return null; } }.findContext(file, new HashSet<>()); }
|
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.remove(); } } } }
|
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 = AntBuildFileImpl.RUN_WITH_ANT.get(myOptions); final ClassLoader parentLoader = (antInstallation != null) ? antInstallation.getClassLoader() : null; if (parentLoader != null && files.size() == 0) { // no additional classpath, so it's ok to use ant installation's loader return parentLoader; } return new AntResourcesClassLoader(paths, parentLoader, false, false); }
|
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)) { myBinding.beEnabled(); } else { myBinding.beDisabled(); } myBinding.loadValues(getProperties(myCurrent)); } }
|
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(); } myGlobalWorkingProperties.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()); adjustName(inst); return inst; } catch (AntInstallation.ConfigurationException e) { Messages.showErrorDialog(myParent, e.getMessage(), AntBundle.message("ant.setup.dialog.title")); return null; } }
|
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())) { adjustedName = justCreated.getName() + " (" + (++nameIndex) + ")"; idx = 0; // search from beginning } } if (!adjustedName.equals(justCreated.getName())) { justCreated.setName(adjustedName); } }
|
adjustName
|
6,398
|
JComponent () { return myForm.getComponent(); }
|
createCenterPanel
|
6,399
|
String () { return "antSetDialogDimensionKey"; }
|
getDimensionServiceKey
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.