private CPListElement[] doOpenInternalJarFileDialog(CPListElement existing, Object parent) { IPath path = existing.getPath(); IPath selectedPaths[] = BuildPathDialogAccess.chooseJAREntries(this.getShell(), path, new IPath[0]); if (selectedPaths != null) { List<CPListElement> elements = new ArrayList<>(); for (int i= 0; i < selectedPaths.length; i++) { CPListElement cpElement = new CPListElement(parent, fDummyProject, IClasspathEntry.CPE_LIBRARY, selectedPaths[i], null); cpElement.setAttribute(CPListElement.SOURCEATTACHMENT, BuildPathSupport.guessSourceAttachment(cpElement)); cpElement.setAttribute(CPListElement.JAVADOC, BuildPathSupport.guessJavadocLocation(cpElement)); elements.add(cpElement); } return elements.toArray(new CPListElement[0]); } return null; }
private CPListElement[] doOpenInternalJarFileDialog(CPListElement existing, Object parent) { IPath path = existing.getPath(); IPath selectedPaths[] = BuildPathDialogAccess.chooseJAREntries(this.getShell(), path, new IPath[0]); if (selectedPaths != null) { List<CPListElement> elements = new ArrayList<>(); for (int i= 0; i < selectedPaths.length; i++) { CPListElement cpElement = new CPListElement(parent, fDummyProject, IClasspathEntry.CPE_LIBRARY, selectedPaths[i], null); cpElement.setAttribute(CPListElement.SOURCEATTACHMENT, BuildPathSupport.guessSourceAttachment(cpElement)); cpElement.setAttribute(CPListElement.JAVADOC, BuildPathSupport.guessJavadocLocation(cpElement)); elements.add(cpElement); } return elements.toArray(new CPListElement[0]); } return null; }
elementsToAdd.add(curr); curr.setAttribute(CPListElement.SOURCEATTACHMENT, BuildPathSupport.guessSourceAttachment(curr)); curr.setAttribute(CPListElement.JAVADOC, JavaUI .getLibraryJavadocLocation(curr.getPath()));
if (!cplist.contains(curr) && !elementsToAdd.contains(curr)) { elementsToAdd.add(curr); curr.setAttribute(CPListElement.SOURCEATTACHMENT, BuildPathSupport.guessSourceAttachment(curr)); curr.setAttribute(CPListElement.JAVADOC, JavaUI.getLibraryJavadocLocation(curr.getPath()));
private void doAdd(List<Object> list) { if (canAdd(list)) { CPUserLibraryElement parentLibrary = getSingleSelectedLibrary(list); IPath selection= getWorkbenchWindowSelection(); IPath selectedPaths[] = BuildPathDialogAccess.chooseJAREntries(this.getShell(), selection, new IPath[0]); if (selectedPaths != null) { List<CPListElement> elements = new ArrayList<>(); for (int i= 0; i < selectedPaths.length; i++) { CPListElement cpElement = new CPListElement(parentLibrary, fDummyProject, IClasspathEntry.CPE_LIBRARY, selectedPaths[i], null); cpElement.setAttribute(CPListElement.SOURCEATTACHMENT, BuildPathSupport.guessSourceAttachment(cpElement)); cpElement.setAttribute(CPListElement.JAVADOC, BuildPathSupport.guessJavadocLocation(cpElement)); elements.add(cpElement); parentLibrary.add(cpElement); } fLibraryList.refresh(parentLibrary); fLibraryList.selectElements(new StructuredSelection(elements)); fLibraryList.expandElement(parentLibrary, 2); } } }
if (!cplist.contains(curr) && !elementsToAdd.contains(curr)) { elementsToAdd.add(curr); curr.setAttribute(CPListElement.SOURCEATTACHMENT, BuildPathSupport.guessSourceAttachment(curr)); curr.setAttribute(CPListElement.JAVADOC, BuildPathSupport.guessJavadocLocation(curr));
private void doAdd(List<Object> list) { if (canAdd(list)) { CPUserLibraryElement parentLibrary = getSingleSelectedLibrary(list); IPath selection= getWorkbenchWindowSelection(); IPath selectedPaths[] = BuildPathDialogAccess.chooseJAREntries(this.getShell(), selection, new IPath[0]); if (selectedPaths != null) { List<CPListElement> elements = new ArrayList<>(); for (int i= 0; i < selectedPaths.length; i++) { CPListElement cpElement = new CPListElement(parentLibrary, fDummyProject, IClasspathEntry.CPE_LIBRARY, selectedPaths[i], null); cpElement.setAttribute(CPListElement.SOURCEATTACHMENT, BuildPathSupport.guessSourceAttachment(cpElement)); cpElement.setAttribute(CPListElement.JAVADOC, BuildPathSupport.guessJavadocLocation(cpElement)); elements.add(cpElement); parentLibrary.add(cpElement); } fLibraryList.refresh(parentLibrary); fLibraryList.selectElements(new StructuredSelection(elements)); fLibraryList.expandElement(parentLibrary, 2); } } }
if (!cplist.contains(curr) && !elementsToAdd.contains(curr)) { elementsToAdd.add(curr); curr.setAttribute(CPListElement.SOURCEATTACHMENT, BuildPathSupport.guessSourceAttachment(curr)); curr.setAttribute(CPListElement.JAVADOC, JavaUI.getLibraryJavadocLocation(curr.getPath()));
if (!cplist.contains(curr) && !elementsToAdd.contains(curr)) { elementsToAdd.add(curr); curr.setAttribute(CPListElement.SOURCEATTACHMENT, BuildPathSupport.guessSourceAttachment(curr)); curr.setAttribute(CPListElement.JAVADOC, JavaUI.getLibraryJavadocLocation(curr.getPath()));
if (!cplist.contains(curr) && !elementsToAdd.contains(curr)) { elementsToAdd.add(curr); curr.setAttribute(CPListElement.SOURCEATTACHMENT, BuildPathSupport.guessSourceAttachment(curr)); curr.setAttribute(CPListElement.JAVADOC, BuildPathSupport.guessJavadocLocation(curr));
curr.setAttribute(CPListElement.SOURCEATTACHMENT, BuildPathSupport.guessSourceAttachment(curr)); curr.setAttribute(CPListElement.JAVADOC, BuildPathSupport.guessJavadocLocation(curr));
curr.setAttribute(CPListElement.SOURCEATTACHMENT, BuildPathSupport.guessSourceAttachment(curr)); curr.setAttribute(CPListElement.JAVADOC, BuildPathSupport.guessJavadocLocation(curr)); elems[i]= curr;
curr.setAttribute(CPListElement.SOURCEATTACHMENT, BuildPathSupport.guessSourceAttachment(curr)); curr.setAttribute(CPListElement.JAVADOC, BuildPathSupport.guessJavadocLocation(curr)); elems[i]= curr;
IPath path= filterPath.append(fileNames[i]).makeAbsolute(); CPListElement curr= new CPListElement(parent, null, IClasspathEntry.CPE_LIBRARY, path, null); curr.setAttribute(CPListElement.SOURCEATTACHMENT, BuildPathSupport.guessSourceAttachment(curr)); curr.setAttribute(CPListElement.JAVADOC, BuildPathSupport.guessJavadocLocation(curr)); elems[i]= curr;