Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
6,200 | boolean () { return myVisible; } | isVisible |
6,201 | void (boolean isVisible) { myVisible = isVisible; } | setVisible |
6,202 | void (Element element) { myTargetName = element.getAttributeValue(FILTER_TARGET_NAME); myVisible = Boolean.parseBoolean(element.getAttributeValue(FILTER_IS_VISIBLE)); } | readExternal |
6,203 | void (@NotNull Element element) { final String targetName = getTargetName(); if (targetName == null) { return; } element.setAttribute(FILTER_TARGET_NAME, targetName); element.setAttribute(FILTER_IS_VISIBLE, Boolean.valueOf(isVisible()).toString()); } | writeExternal |
6,204 | String () { return myDescription; } | getDescription |
6,205 | void (AntBuildTarget target) { if (target == null) return; myDescription = target.getNotEmptyDescription(); } | updateDescription |
6,206 | TargetFilter (AntBuildTarget target) { TargetFilter filter = new TargetFilter(target.getName(), target.isDefault()); filter.myDescription = target.getNotEmptyDescription(); filter.myVisible = (filter.myDescription != null); return filter; } | fromTarget |
6,207 | Object (AbstractProperty property) { return property.get(containerOf(property)); } | getValueOf |
6,208 | void (AbstractProperty property, Object value) { property.set(containerOf(property), value); } | setValueOf |
6,209 | boolean (AbstractProperty property) { return Arrays.stream(myContainers).anyMatch(container -> container.hasProperty(property)); } | hasProperty |
6,210 | JComponent () { myTree = initTree(); myTree.addKeyListener(new KeyAdapter() { @Override public void keyPressed(KeyEvent e) { if (KeyEvent.VK_ENTER == e.getKeyCode()) { doOKAction(); } } }); new DoubleClickListener() { @Override protected boolean onDoubleClick(@NotNull MouseEvent e) { if (mySelectedTarget != null) { doOKAction(); return true; } return false; } }.installOn(myTree); return JBUI.Panels.simplePanel(ScrollPaneFactory.createScrollPane(myTree)); } | createCenterPanel |
6,211 | void (KeyEvent e) { if (KeyEvent.VK_ENTER == e.getKeyCode()) { doOKAction(); } } | keyPressed |
6,212 | boolean (@NotNull MouseEvent e) { if (mySelectedTarget != null) { doOKAction(); return true; } return false; } | onDoubleClick |
6,213 | Tree () { @NonNls final DefaultMutableTreeNode root = new DefaultMutableTreeNode("Root"); final Tree tree = new Tree(root); tree.getSelectionModel().addTreeSelectionListener(new TreeSelectionListener() { @Override public void valueChanged(TreeSelectionEvent e) { final TreePath selectionPath = tree.getSelectionPath(); if (selectionPath != null) { final DefaultMutableTreeNode node = (DefaultMutableTreeNode)selectionPath.getLastPathComponent(); final Object userObject = node.getUserObject(); if (userObject instanceof AntTargetNodeDescriptor antBuildTarget) { mySelectedTarget = antBuildTarget.getAntTarget(); } else { mySelectedTarget = null; } } } }); tree.setCellRenderer(new MyTreeCellRenderer()); tree.setRootVisible(false); tree.setShowsRootHandles(true); TreeUtil.installActions(tree); TreeSpeedSearch.installOn(tree, false, path -> { final Object userObject = ((DefaultMutableTreeNode)path.getLastPathComponent()).getUserObject(); if (userObject instanceof AntTargetNodeDescriptor) { final AntBuildTarget target = ((AntTargetNodeDescriptor)userObject).getAntTarget(); return target.getDisplayName(); } return null; }); DefaultMutableTreeNode selectedNode = null; final AntConfiguration antConfiguration = AntConfigurationImpl.getInstance(myProject); for (AntBuildFile buildFile : antConfiguration.getBuildFileList()) { final DefaultMutableTreeNode buildFileNode = new DefaultMutableTreeNode(buildFile); DefaultMutableTreeNode selection = processFileTargets(antConfiguration.getMetaTargets(buildFile), buildFile, buildFileNode); if (selection != null){ selectedNode = selection; } selection = processFileTargets(antConfiguration.getModel(buildFile).getTargets(), buildFile, buildFileNode); if (selection != null){ selectedNode = selection; } root.add(buildFileNode); } TreeUtil.expandAll(tree); TreeUtil.selectInTree(selectedNode, true, tree); return tree; } | initTree |
6,214 | void (TreeSelectionEvent e) { final TreePath selectionPath = tree.getSelectionPath(); if (selectionPath != null) { final DefaultMutableTreeNode node = (DefaultMutableTreeNode)selectionPath.getLastPathComponent(); final Object userObject = node.getUserObject(); if (userObject instanceof AntTargetNodeDescriptor antBuildTarget) { mySelectedTarget = antBuildTarget.getAntTarget(); } else { mySelectedTarget = null; } } } | valueChanged |
6,215 | JComponent () { return myTree; } | getPreferredFocusedComponent |
6,216 | DefaultMutableTreeNode (final AntBuildTarget[] targets, final AntBuildFile buildFile, final DefaultMutableTreeNode buildFileNode) { DefaultMutableTreeNode result = null; for (AntBuildTarget target : targets) { if (target.getName() == null) continue; final AntTargetNodeDescriptor descriptor = new AntTargetNodeDescriptor(target, buildFile); final DefaultMutableTreeNode node = new DefaultMutableTreeNode(descriptor); if (isSelected(descriptor)){ result = node; } buildFileNode.add(node); } return result; } | processFileTargets |
6,217 | boolean (final AntTargetNodeDescriptor descriptor) { return mySelectedTarget != null && Comparing.strEqual(mySelectedTarget.getName(), descriptor.getAntTarget().getName()) && mySelectedTarget.getModel().getBuildFile() == descriptor.getBuildFile(); } | isSelected |
6,218 | AntBuildTarget () { return mySelectedTarget; } | getSelectedTarget |
6,219 | AntBuildTarget () { return myAntTarget; } | getAntTarget |
6,220 | AntBuildFile () { return myBuildFile; } | getBuildFile |
6,221 | void (@NotNull JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { if (value instanceof DefaultMutableTreeNode treeNode) { final Object userObject = treeNode.getUserObject(); if (userObject instanceof AntBuildFile) { append(((AntBuildFile)userObject).getPresentableName(), SimpleTextAttributes.REGULAR_ATTRIBUTES); } else if (userObject instanceof AntTargetNodeDescriptor descriptor) { final AntBuildTarget antTarget = descriptor.getAntTarget(); final String antTargetName = antTarget.getName(); append(antTargetName, SimpleTextAttributes.REGULAR_ATTRIBUTES); boolean isMeta = antTarget instanceof MetaTarget; setIcon(isMeta ? AntIcons.MetaTarget : AllIcons.Nodes.Target); } } } | customizeCellRenderer |
6,222 | ExecuteAfterCompilationEvent () { return ourInstance; } | getInstance |
6,223 | ExecuteBeforeCompilationEvent () { return ourInstance; } | getInstance |
6,224 | void (@NotNull Project project, @NotNull ToolWindow toolWindow) { registerAntExplorer(project, toolWindow); } | createToolWindowContent |
6,225 | void (@NotNull Project project, @NotNull ToolWindow toolWindow) { AntExplorer explorer = new AntExplorer(project); ContentManager contentManager = toolWindow.getContentManager(); Content content = contentManager.getFactory().createContent(explorer, null, false); contentManager.addContent(content); toolWindow.setHelpId(HelpID.ANT); content.setDisposer(explorer); } | registerAntExplorer |
6,226 | boolean (@NotNull Project project) { return AntConfiguration.getInstance(project).hasBuildFiles(); } | isApplicable |
6,227 | AntClasspathEntry (Element dataElement) { String pathUrl = dataElement.getAttributeValue(SinglePathEntry.PATH); if (pathUrl != null) { return new SinglePathEntry(PathUtil.toPresentableUrl(pathUrl)); } String dirUrl = dataElement.getAttributeValue(AllJarsUnderDirEntry.DIR); if (dirUrl != null) { return new AllJarsUnderDirEntry(PathUtil.toPresentableUrl(dirUrl)); } throw new IllegalStateException(); } | readValue |
6,228 | void (Element dataElement, AntClasspathEntry entry) { entry.writeExternal(dataElement); } | writeValue |
6,229 | List<AntClasspathEntry> () { final VirtualFile[] files = FileChooser.chooseFiles(myDescriptor, myParentComponent, null, null); return files.length == 0 ? null : ContainerUtil.map(files, myMapper); } | create |
6,230 | ClassLoader () { if (myLoader == null) { myLoader = buildClasspath(); } return myLoader; } | getClassloader |
6,231 | void () { myLoader = null; } | updateClasspath |
6,232 | void (@Nls String presentableName) { myPresentableName = presentableName; } | setPresentableName |
6,233 | String (Element element, Project project) { element.setAttribute(PRESENTABLE_NAME, myPresentableName); return myCompositeName; } | writeExternal |
6,234 | boolean (Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } final ExecuteCompositeTargetEvent event = (ExecuteCompositeTargetEvent)o; if (!myCompositeName.equals(event.myCompositeName)) { return false; } return true; } | equals |
6,235 | int () { return myCompositeName.hashCode(); } | hashCode |
6,236 | AntReference () { return new AntReference.BindedReference(this); } | getReference |
6,237 | AntInstallation (Element dataElement) { AntInstallation antInstallation = new AntInstallation(); antInstallation.readExternal(dataElement); return antInstallation; } | readValue |
6,238 | void (Element dataElement, AntInstallation antInstallation) { antInstallation.myProperties.writeExternal(dataElement); } | writeValue |
6,239 | void (Element dataElement) { myProperties.readExternal(dataElement); File antJar = new File(HOME_DIR.get(myProperties), PATH_TO_ANT_JAR); updateVersion(antJar); } | readExternal |
6,240 | void (final @NlsSafe String name) { NAME.set(myProperties, name); } | setName |
6,241 | ClassLoader () { return myClassLoaderHolder.getClassloader(); } | getClassLoader |
6,242 | void () { myClassLoaderHolder.updateClasspath(); } | updateClasspath |
6,243 | void (AntClasspathEntry entry) { CLASS_PATH.getModifiableList(getProperties()).add(entry); } | addClasspathEntry |
6,244 | void (ExternalizablePropertyContainer container) { container.registerProperty(NAME, Externalizer.STRING); container.registerProperty(HOME_DIR, Externalizer.STRING); container.registerProperty(CLASS_PATH, "classpathItem", AntClasspathEntry.EXTERNALIZER); container.registerProperty(VERSION, Externalizer.STRING); } | registerProperties |
6,245 | Navigatable () { final VirtualFile vFile = myTarget.getContainingFile(); return vFile != null ? PsiNavigationSupport.getInstance() .createNavigatable(myTarget.getProject(), vFile, myOffset) : null; } | getOpenFileDescriptor |
6,246 | String () { final AntDomProject antDomProject = getAntProject(); if (antDomProject != null) { return antDomProject.getDefaultTarget().getRawText(); } return ""; } | getDefaultTargetName |
6,247 | AntBuildTarget[] () { return myTargets.getValue().toArray(AntBuildTargetBase.EMPTY_ARRAY); } | getTargets |
6,248 | AntBuildTarget[] () { final List<AntBuildTargetBase> filtered = new ArrayList<>(); for (final AntBuildTargetBase buildTarget : myTargets.getValue()) { if (myFile.isTargetVisible(buildTarget)) { filtered.add(buildTarget); } } return (filtered.isEmpty()) ? AntBuildTargetBase.EMPTY_ARRAY : filtered.toArray(AntBuildTargetBase.EMPTY_ARRAY); } | getFilteredTargets |
6,249 | AntBuildFileBase () { return (AntBuildFileBase)myFile; } | getBuildFile |
6,250 | AntBuildTargetBase (final String name) { for (AntBuildTargetBase target : myTargets.getValue()) { if (Comparing.strEqual(target.getName(), name)) { return target; } } return null; } | findTarget |
6,251 | BuildTask (final String targetName, final String taskName) { final AntBuildTargetBase buildTarget = findTarget(targetName); return (buildTarget == null) ? null : buildTarget.findTask(taskName); } | findTask |
6,252 | AntDomProject () { return AntSupport.getAntDomProject(getBuildFile().getAntFile()); } | getAntProject |
6,253 | boolean (final String id) { return StreamEx.of(myTargets.getValue()).map(AntBuildTargetBase::getActionId).has(id); } | hasTargetWithActionId |
6,254 | void (List<? super AntBuildTargetBase> list, AntBuildModelBase model, AntDomProject project, VirtualFile sourceFile) { if (myProcessed.contains(sourceFile)) { return; } myProcessed.add(sourceFile); if (!myIsImported) { final TargetResolver.Result result = project.getDefaultTarget().getValue(); if (result != null) { final Pair<AntDomTarget,String> targetWithName = result.getResolvedTarget(project.getDefaultTarget().getRawText()); myDefaultTarget = Pair.getFirst(targetWithName); } } for (final AntDomTarget target : project.getDeclaredTargets()) { list.add(new AntBuildTargetImpl(target, model, sourceFile, myIsImported, target.equals(myDefaultTarget))); } myIsImported = true; final Iterable<AntDomIncludingDirective> allIncludes = ContainerUtil.concat(project.getDeclaredImports(), project.getDeclaredIncludes()); for (AntDomIncludingDirective incl : allIncludes) { final PsiFileSystemItem includedFile = incl.getFile().getValue(); if (includedFile instanceof PsiFile) { final PsiFile included = includedFile.getContainingFile().getOriginalFile(); dependencies.add(included); final AntDomProject includedProject = AntSupport.getAntDomProject((PsiFile)includedFile); if (includedProject != null) { fillTargets(list, model, includedProject, included.getVirtualFile()); } } else { if (includedFile == null) { // if not resolved yet, it's possible that the file will be created later, // thus we need to recalculate the cached value dependencies.add(PsiModificationTracker.MODIFICATION_COUNT); } } } } | fillTargets |
6,255 | Element () { final Element e = new Element("state"); writeExternal(e); return e; } | getState |
6,256 | void (@NotNull Element state) { try { readExternal(state); } catch (InvalidDataException e) { LOG.error(e); } } | loadState |
6,257 | AntWorkspaceConfiguration (Project project) { return project.getService(AntWorkspaceConfiguration.class); } | getInstance |
6,258 | Element (Element parentNode, String url) { for (Element element : parentNode.getChildren(BUILD_FILE)) { if (Objects.equals(element.getAttributeValue(URL), url)) { return element; } } return null; } | findChildByUrl |
6,259 | boolean (@NotNull CompileContext context) { return AntConfigurationBase.getInstance(context.getProject()).executeTargetBeforeCompile(context, createDataContext(context)); } | execute |
6,260 | boolean (AntInstallation antInstallation) { return antInstallation != myBundledAnt; } | value |
6,261 | AntInstallation () { AntInstallation bundledAnt = new AntInstallation() { @Override public AntReference getReference() { return AntReference.BUNDLED_ANT; } }; AntInstallation.NAME.set(bundledAnt.getProperties(), getBundledAntName()); final File antHome = PathManager.findFileInLibDirectory(ANT_FILE); AntInstallation.HOME_DIR.set(bundledAnt.getProperties(), antHome.getAbsolutePath()); ArrayList<AntClasspathEntry> classpath = AntInstallation.CLASS_PATH.getModifiableList(bundledAnt.getProperties()); File antLibDir = new File(antHome, LIB_DIR); classpath.add(new AllJarsUnderDirEntry(antLibDir)); bundledAnt.updateVersion(new File(antLibDir, ANT_JAR_FILE_NAME)); return bundledAnt; } | createBundledAnt |
6,262 | AntReference () { return AntReference.BUNDLED_ANT; } | getReference |
6,263 | Element () { Element element = new Element("state"); myProperties.writeExternal(element); return element; } | getState |
6,264 | void (@NotNull Element state) { myProperties.readExternal(state); } | loadState |
6,265 | GlobalAntConfiguration () { return ApplicationManager.getApplication().getService(GlobalAntConfiguration.class); } | getInstance |
6,266 | AntInstallation () { return myBundledAnt; } | getBundledAnt |
6,267 | void (final AntInstallation ant) { if (getConfiguredAnts().containsKey(ant.getReference())) { LOG.error("Duplicate name: " + ant.getName()); } ANTS.getModifiableList(getProperties()).add(ant); } | addConfiguration |
6,268 | void (final AntInstallation ant) { ANTS.getModifiableList(getProperties()).remove(ant); } | removeConfiguration |
6,269 | Sdk (final String jdkName) { return ProjectJdkTable.getInstance().findJdk(jdkName); } | findJdk |
6,270 | MacroManager () { return MacroManager.getInstance(); } | getMacroManager |
6,271 | AntBuildTarget (@Nullable Project project, String fileUrl, String targetName) { if (fileUrl == null || targetName == null || project == null) { return null; } final VirtualFile vFile = VirtualFileManager.getInstance().findFileByUrl(fileUrl); if (vFile == null) { return null; } final AntConfigurationImpl antConfiguration = (AntConfigurationImpl)AntConfiguration.getInstance(project); for (AntBuildFile buildFile : antConfiguration.getBuildFileList()) { if (vFile.equals(buildFile.getVirtualFile())) { final AntBuildTarget target = buildFile.getModel().findTarget(targetName); if (target != null) { return target; } for (AntBuildTarget metaTarget : antConfiguration.getMetaTargets(buildFile)) { if (targetName.equals(metaTarget.getName())) { return metaTarget; } } return null; } } return null; } | findTarget |
6,272 | String () { return "$antInstallation"; } | getName |
6,273 | AntInstallation (final AbstractPropertyContainer container) { return GlobalAntConfiguration.INSTANCE.get(container).getBundledAnt(); } | getDefault |
6,274 | AntInstallation (final AntInstallation value) { return value; } | copy |
6,275 | AntInstallation (final AbstractPropertyContainer container) { if (container.hasProperty(ANT_REFERENCE)) { return RUN_WITH_ANT.get(container); } return GlobalAntConfiguration.INSTANCE.get(container).getBundledAnt(); } | get |
6,276 | String () { return "$allClasspath"; } | getName |
6,277 | List<File> (AbstractProperty.AbstractPropertyContainer container) { return get(container); } | getDefault |
6,278 | List<File> (AbstractProperty.AbstractPropertyContainer container) { List<File> classpath = new ArrayList<>(); collectClasspath(classpath, ADDITIONAL_CLASSPATH, container); AntInstallation antInstallation = ANT_INSTALLATION.get(container); if (antInstallation != null) { collectClasspath(classpath, AntInstallation.CLASS_PATH, antInstallation.getProperties()); } return classpath; } | get |
6,279 | void (List<File> files, ListProperty<AntClasspathEntry> property, AbstractProperty.AbstractPropertyContainer container) { if (!container.hasProperty(property)) return; Iterator<AntClasspathEntry> entries = property.getIterator(container); while (entries.hasNext()) { AntClasspathEntry entry = entries.next(); entry.addFilesTo(files); } } | collectClasspath |
6,280 | void (AbstractProperty.AbstractPropertyContainer container, List<File> files) { throw new UnsupportedOperationException(getName()); } | set |
6,281 | List<File> (List<File> files) { return files; } | copy |
6,282 | String () { return "$runWithAnt"; } | getName |
6,283 | AntInstallation (AbstractProperty.AbstractPropertyContainer container) { return get(container); } | getDefault |
6,284 | AntInstallation (AbstractProperty.AbstractPropertyContainer container) { return AntReference.findAnt(ANT_REFERENCE, container); } | get |
6,285 | AntInstallation (AntInstallation antInstallation) { return antInstallation; } | copy |
6,286 | List<File> () { List<File> classpath = new ArrayList<>(); final String homeDir = SystemProperties.getUserHome(); new AllJarsUnderDirEntry(new File(homeDir, ANT_LIB)).addFilesTo(classpath); return classpath; } | getUserHomeLibraries |
6,287 | AntBuildModelBase () { return (AntBuildModelBase)myAntConfiguration.getModel(this); } | getModel |
6,288 | AntBuildModelBase () { return myAntConfiguration.getModelIfRegistered(this); } | getModelIfRegistered |
6,289 | boolean () { return RUN_IN_BACKGROUND.value(myAllOptions); } | isRunInBackground |
6,290 | boolean () { return TREE_VIEW_ANSI_COLOR.value(myWorkspaceOptions); } | isColoredOutputMessages |
6,291 | boolean () { return TREE_VIEW_COLLAPSE_TARGETS.value(myWorkspaceOptions); } | isCollapseFinishedTargets |
6,292 | XmlFile () { final PsiFile psiFile = myVFile.isValid()? PsiManager.getInstance(getProject()).findFile(myVFile) : null; return (psiFile instanceof XmlFile xmlFile) && AntDomFileDescription.isAntFile(xmlFile)? xmlFile : null; } | getAntFile |
6,293 | Project () { return myProject; } | getProject |
6,294 | VirtualFile () { return myVFile; } | getVirtualFile |
6,295 | boolean () { return myShouldExpand; } | shouldExpand |
6,296 | void (boolean expand) { myShouldExpand = expand; } | setShouldExpand |
6,297 | boolean (final AntBuildTarget target) { final TargetFilter filter = findFilter(target.getName()); if (filter == null) { return target.isDefault() || target.getNotEmptyDescription() != null; } return filter.isVisible(); } | isTargetVisible |
6,298 | boolean () { final VirtualFile file = getVirtualFile(); if (file == null || !(new File(file.getPath()).exists())) { return false; } return true; } | exists |
6,299 | void () { // do not change position final AntBuildTarget[] targets = getModel().getTargets(); final Map<String, AntBuildTarget> targetByName = new LinkedHashMap<>(targets.length); for (AntBuildTarget target : targets) { String targetName = target.getName(); if(targetName != null) { targetByName.put(targetName, target); } } synchronized (myOptionsLock) { myCachedExternalProperties = null; final ArrayList<TargetFilter> filters = TARGET_FILTERS.getModifiableList(myAllOptions); for (Iterator<TargetFilter> iterator = filters.iterator(); iterator.hasNext(); ) { final TargetFilter filter = iterator.next(); final String name = filter.getTargetName(); if (name == null) { iterator.remove(); } else { AntBuildTarget target = targetByName.get(name); if (target != null) { filter.updateDescription(target); targetByName.remove(name); } else { iterator.remove(); } } } // handle the rest of targets with non-null names for (AntBuildTarget target : targetByName.values()) { filters.add(TargetFilter.fromTarget(target)); } } } | updateProperties |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.