@Override public void cancel() { CPListElement entryToEdit= getEntryToEdit(); entryToEdit.setAttribute(CPListElement.INCLUSION, fOrginalInclusion); entryToEdit.setAttribute(CPListElement.EXCLUSION, fOriginalExclusion); } }
/** * {@inheritDoc} */ public void cancel() { CPListElement entryToEdit= getEntryToEdit(); entryToEdit.setAttribute(CPListElement.INCLUSION, fOrginalInclusion); entryToEdit.setAttribute(CPListElement.EXCLUSION, fOriginalExclusion); } }
@Override public void cancel() { CPListElement entryToEdit= getEntryToEdit(); entryToEdit.setAttribute(CPListElement.INCLUSION, fOrginalInclusion); entryToEdit.setAttribute(CPListElement.EXCLUSION, fOriginalExclusion); } }
public void restore() { for (Iterator iter= fExistingEntries.iterator(); iter.hasNext();) { CPListElement element= (CPListElement)iter.next(); if (fOrginalExlusionFilters.containsKey(element)) { element.setAttribute(CPListElement.EXCLUSION, fOrginalExlusionFiltersCopy.get(element)); } if (fOrginalInclusionFilters.containsKey(element)) { element.setAttribute(CPListElement.INCLUSION, fOrginalInclusionFiltersCopy.get(element)); } } fNewElement.setPath(fOrginalPath); }
@Override public boolean performFinish() { CPListElement entryToEdit= getEntryToEdit(); entryToEdit.setAttribute(CPListElement.INCLUSION, fFilterPage.getInclusionPattern()); entryToEdit.setAttribute(CPListElement.EXCLUSION, fFilterPage.getExclusionPattern()); return super.performFinish(); }
public boolean performFinish() { CPListElement entryToEdit= getEntryToEdit(); entryToEdit.setAttribute(CPListElement.INCLUSION, fFilterPage.getInclusionPattern()); entryToEdit.setAttribute(CPListElement.EXCLUSION, fFilterPage.getExclusionPattern()); return super.performFinish(); }
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(); }
@Override public boolean performFinish() { CPListElement entryToEdit= getEntryToEdit(); entryToEdit.setAttribute(CPListElement.INCLUSION, fFilterPage.getInclusionPattern()); entryToEdit.setAttribute(CPListElement.EXCLUSION, fFilterPage.getExclusionPattern()); return super.performFinish(); }
/** * Reset the output folder for the given entry to the default output folder * * @param entry the <code>CPListElement</code> to be edited * @param project the Java project * @return an attribute representing the modified output folder * @throws JavaModelException */ public static CPListElementAttribute resetOutputFolder(CPListElement entry, IJavaProject project) throws JavaModelException { entry.setAttribute(CPListElement.OUTPUT, null); CPListElementAttribute outputFolder= new CPListElementAttribute(entry, CPListElement.OUTPUT, entry.getAttribute(CPListElement.OUTPUT), true); return outputFolder; }
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(); }
private static boolean addToExclusions(IPath entryPath, CPListElement curr) { IPath[] exclusionFilters= (IPath[]) curr.getAttribute(CPListElement.EXCLUSION); if (!JavaModelUtil.isExcludedPath(entryPath, exclusionFilters)) { IPath pathToExclude= entryPath.removeFirstSegments(curr.getPath().segmentCount()).addTrailingSeparator(); IPath[] newExclusionFilters= new IPath[exclusionFilters.length + 1]; System.arraycopy(exclusionFilters, 0, newExclusionFilters, 0, exclusionFilters.length); newExclusionFilters[exclusionFilters.length]= pathToExclude; curr.setAttribute(CPListElement.EXCLUSION, newExclusionFilters); return true; } return false; }
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 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(); } }
private static boolean addToExclusions(IPath entryPath, CPListElement curr) { IPath[] exclusionFilters= (IPath[]) curr.getAttribute(CPListElement.EXCLUSION); if (!JavaModelUtil.isExcludedPath(entryPath, exclusionFilters)) { IPath pathToExclude= entryPath.removeFirstSegments(curr.getPath().segmentCount()).addTrailingSeparator(); IPath[] newExclusionFilters= new IPath[exclusionFilters.length + 1]; System.arraycopy(exclusionFilters, 0, newExclusionFilters, 0, exclusionFilters.length); newExclusionFilters[exclusionFilters.length]= pathToExclude; curr.setAttribute(CPListElement.EXCLUSION, newExclusionFilters); return true; } return false; }
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 boolean addToExclusions(IPath entryPath, CPListElement curr) { IPath[] exclusionFilters= (IPath[]) curr.getAttribute(CPListElement.EXCLUSION); if (!JavaModelUtil.isExcludedPath(entryPath, exclusionFilters)) { IPath pathToExclude= entryPath.removeFirstSegments(curr.getPath().segmentCount()).addTrailingSeparator(); IPath[] newExclusionFilters= new IPath[exclusionFilters.length + 1]; System.arraycopy(exclusionFilters, 0, newExclusionFilters, 0, exclusionFilters.length); newExclusionFilters[exclusionFilters.length]= pathToExclude; curr.setAttribute(CPListElement.EXCLUSION, newExclusionFilters); return true; } return false; }
@Override public boolean performFinish() { getEntryToEdit().setAttribute(CPListElement.INCLUSION, fFilterPage.getInclusionPattern()); getEntryToEdit().setAttribute(CPListElement.EXCLUSION, fFilterPage.getExclusionPattern()); setOutputLocation(fAddFolderPage.getOutputLocation()); boolean res= super.performFinish(); if (res) { selectAndReveal(fAddFolderPage.getCorrespondingResource()); } return res; }
/** * {@inheritDoc} */ public boolean performFinish() { getEntryToEdit().setAttribute(CPListElement.INCLUSION, fFilterPage.getInclusionPattern()); getEntryToEdit().setAttribute(CPListElement.EXCLUSION, fFilterPage.getExclusionPattern()); setOutputLocation(fAddFolderPage.getOutputLocation()); boolean res= super.performFinish(); if (res) { selectAndReveal(fAddFolderPage.getCorrespondingResource()); } return res; }
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 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(); } }