public static CPListElement createFromExisting(IClasspathEntry curr, IJavaProject project) { return createFromExisting(null, curr, project); }
private ArrayList getExistingEntries(IClasspathEntry[] inpathEntries) { ArrayList newInPath = new ArrayList(); for (int i = 0; i < inpathEntries.length; i++) { IClasspathEntry curr = inpathEntries[i]; newInPath.add(CPListElement.createFromExisting(curr, fCurrJProject)); } return newInPath; }
private ArrayList getExistingEntries(IClasspathEntry[] classpathEntries) { ArrayList newClassPath= new ArrayList(); for (int i= 0; i < classpathEntries.length; i++) { IClasspathEntry curr= classpathEntries[i]; newClassPath.add(CPListElement.createFromExisting(curr, fCurrJProject)); } return newClassPath; }
private ArrayList getExistingEntries(IClasspathEntry[] aspectpathEntries) { ArrayList newAspectPath = new ArrayList(); for (int i = 0; i < aspectpathEntries.length; i++) { IClasspathEntry curr = aspectpathEntries[i]; newAspectPath.add(CPListElement.createFromExisting(curr, fCurrJProject)); } return newAspectPath; }
public static CPListElement[] createFromExisting(IJavaProject project) throws JavaModelException { IClasspathEntry[] rawClasspath= project.getRawClasspath(); CPListElement[] result= new CPListElement[rawClasspath.length]; for (int i= 0; i < rawClasspath.length; i++) { result[i]= CPListElement.createFromExisting(rawClasspath[i], project); } return result; }
public static CPListElement[] createFromExisting(IJavaProject project) throws JavaModelException { IClasspathEntry[] rawClasspath= project.getRawClasspath(); CPListElement[] result= new CPListElement[rawClasspath.length]; for (int i= 0; i < rawClasspath.length; i++) { result[i]= CPListElement.createFromExisting(rawClasspath[i], project); } return result; }
public static CPListElement[] createFromExisting(IJavaProject project) throws JavaModelException { IClasspathEntry[] rawClasspath= project.getRawClasspath(); CPListElement[] result= new CPListElement[rawClasspath.length]; for (int i= 0; i < rawClasspath.length; i++) { result[i]= CPListElement.createFromExisting(rawClasspath[i], project); } return result; }
private static IClasspathEntry getUpdatedEntry(IClasspathEntry currEntry, IClasspathEntry updatedEntry, String[] updatedAttributes, IJavaProject jproject) { if (updatedAttributes == null) { return updatedEntry; // used updated entry 'as is' } CPListElement currElem= CPListElement.createFromExisting(currEntry, jproject); CPListElement newElem= CPListElement.createFromExisting(updatedEntry, jproject); for (int i= 0; i < updatedAttributes.length; i++) { String attrib= updatedAttributes[i]; currElem.setAttribute(attrib, newElem.getAttribute(attrib)); } return currElem.getClasspathEntry(); }
private static IClasspathEntry getUpdatedEntry(IClasspathEntry currEntry, IClasspathEntry updatedEntry, String[] updatedAttributes, IJavaProject jproject) { if (updatedAttributes == null) { return updatedEntry; // used updated entry 'as is' } CPListElement currElem= CPListElement.createFromExisting(currEntry, jproject); CPListElement newElem= CPListElement.createFromExisting(updatedEntry, jproject); for (int i= 0; i < updatedAttributes.length; i++) { String attrib= updatedAttributes[i]; currElem.setAttribute(attrib, newElem.getAttribute(attrib)); } return currElem.getClasspathEntry(); }
private static IClasspathEntry getUpdatedEntry(IClasspathEntry currEntry, IClasspathEntry updatedEntry, String[] updatedAttributes, IJavaProject jproject) { if (updatedAttributes == null) { return updatedEntry; // used updated entry 'as is' } CPListElement currElem= CPListElement.createFromExisting(currEntry, jproject); CPListElement newElem= CPListElement.createFromExisting(updatedEntry, jproject); for (int i= 0; i < updatedAttributes.length; i++) { String attrib= updatedAttributes[i]; currElem.setAttribute(attrib, newElem.getAttribute(attrib)); } return currElem.getClasspathEntry(); }
public IClasspathEntry getNewEntry() { CPListElement elem= CPListElement.createFromExisting(fEntry, fProject); elem.setAttribute(CPListElement.SOURCEATTACHMENT, getSourceAttachmentPath()); return elem.getClasspathEntry(); }
private EditFilterWizard createWizard() throws CoreException { IJavaProject javaProject= null; Object firstElement= getSelectedElements().get(0); if (firstElement instanceof IJavaProject) { javaProject= (IJavaProject)firstElement; } else { javaProject= ((IPackageFragmentRoot)firstElement).getJavaProject(); } CPListElement[] existingEntries= CPListElement.createFromExisting(javaProject); CPListElement elementToEdit= findElement((IJavaElement)firstElement, existingEntries); return new EditFilterWizard(existingEntries, elementToEdit, getOutputLocation(javaProject)); }
private EditFilterWizard createWizard() throws CoreException { IJavaProject javaProject= null; Object firstElement= getSelectedElements().get(0); if (firstElement instanceof IJavaProject) { javaProject= (IJavaProject)firstElement; } else { javaProject= ((IPackageFragmentRoot)firstElement).getJavaProject(); } CPListElement[] existingEntries= CPListElement.createFromExisting(javaProject); CPListElement elementToEdit= findElement((IJavaElement)firstElement, existingEntries); return new EditFilterWizard(existingEntries, elementToEdit, getOutputLocation(javaProject)); }
private EditFilterWizard createWizard() throws CoreException { IJavaProject javaProject= null; Object firstElement= getSelectedElements().get(0); if (firstElement instanceof IJavaProject) { javaProject= (IJavaProject)firstElement; } else { javaProject= ((IPackageFragmentRoot)firstElement).getJavaProject(); } CPListElement[] existingEntries= CPListElement.createFromExisting(javaProject); CPListElement elementToEdit= findElement((IJavaElement)firstElement, existingEntries); return new EditFilterWizard(existingEntries, elementToEdit, getOutputLocation(javaProject)); }
public void setURL(URL url, IProgressMonitor monitor) throws CoreException { if (isProjectRef()) { JavaUI.setProjectJavadocLocation(fProject, url); } else { CPListElement element= CPListElement.createFromExisting(fClasspathEntry, fProject); String location= url != null ? url.toExternalForm() : null; element.setAttribute(CPListElement.JAVADOC, location); String[] changedAttributes= { CPListElement.JAVADOC }; BuildPathSupport.modifyClasspathEntry(null, element.getClasspathEntry(), changedAttributes, fProject, fContainerPath, monitor); fClasspathEntry= element.getClasspathEntry(); } }
public void setURL(URL url, IProgressMonitor monitor) throws CoreException { if (isProjectRef()) { JavaUI.setProjectJavadocLocation(fProject, url); } else { CPListElement element= CPListElement.createFromExisting(fClasspathEntry, fProject); String location= url != null ? url.toExternalForm() : null; element.setAttribute(CPListElement.JAVADOC, location); String[] changedAttributes= { CPListElement.JAVADOC }; BuildPathSupport.modifyClasspathEntry(null, element.getClasspathEntry(), changedAttributes, fProject, fContainerPath, fClasspathEntry.getReferencingEntry() != null, monitor); fClasspathEntry= element.getClasspathEntry(); } }
public IClasspathEntry getNewEntry() { CPListElement elem= CPListElement.createFromExisting(fEntry, fProject); IPath sourceAttachmentPath= getSourceAttachmentPath(); String encoding= getEncoding(); elem.setAttribute(CPListElement.SOURCEATTACHMENT, sourceAttachmentPath); elem.setAttribute(CPListElement.SOURCE_ATTACHMENT_ENCODING, encoding); return elem.getClasspathEntry(); }
public void setURL(URL url, IProgressMonitor monitor) throws CoreException { if (isProjectRef()) { JavaUI.setProjectJavadocLocation(fProject, url); } else { CPListElement element= CPListElement.createFromExisting(fClasspathEntry, fProject); String location= url != null ? url.toExternalForm() : null; element.setAttribute(CPListElement.JAVADOC, location); String[] changedAttributes= { CPListElement.JAVADOC }; BuildPathSupport.modifyClasspathEntry(null, element.getClasspathEntry(), changedAttributes, fProject, fContainerPath, fClasspathEntry.getReferencingEntry() != null, monitor); fClasspathEntry= element.getClasspathEntry(); } }
public IClasspathEntry getNewEntry() { CPListElement elem= CPListElement.createFromExisting(fEntry, fProject); IPath sourceAttachmentPath= getSourceAttachmentPath(); String encoding= getEncoding(); elem.setAttribute(CPListElement.SOURCEATTACHMENT, sourceAttachmentPath); elem.setAttribute(CPListElement.SOURCE_ATTACHMENT_ENCODING, encoding); return elem.getClasspathEntry(); }
public void addElement(IClasspathEntry entry) { int pageIndex= getPageIndex(entry.getEntryKind()); if (fTabFolder == null) { fPageIndex= pageIndex; } else { fTabFolder.setSelection(pageIndex); Object page= fTabFolder.getItem(pageIndex).getData(); if (page instanceof LibrariesWorkbookPage) { CPListElement element= CPListElement.createFromExisting(entry, fCurrJProject); ((LibrariesWorkbookPage) page).addElement(element); } } }