private void tabChanged(Widget widget) { if (widget instanceof TabItem) { TabItem tabItem= (TabItem) widget; BuildPathBasePage newPage= (BuildPathBasePage) tabItem.getData(); if (fCurrPage != null) { List<?> selection= fCurrPage.getSelection(); if (!selection.isEmpty()) { newPage.setSelection(selection, false); } } fCurrPage= newPage; fPageIndex= tabItem.getParent().getSelectionIndex(); } }
public static void fixNestingConflicts(CPListElement[] newEntries, CPListElement[] existing, Set modifiedSourceEntries) { for (int i= 0; i < newEntries.length; i++) { addExclusionPatterns(newEntries[i], existing, modifiedSourceEntries); } }
private void addExlusionPatterns(List<CPListElement> newEntries, Set<CPListElement> modifiedEntries) { BuildPathBasePage.fixNestingConflicts(newEntries.toArray(new CPListElement[newEntries.size()]), fExistingElements, modifiedEntries); if (!modifiedEntries.isEmpty()) { String title= NewWizardMessages.SourceContainerWorkbookPage_exclusion_added_title; String message= NewWizardMessages.SourceContainerWorkbookPage_exclusion_added_message; MessageDialog.openInformation(getShell(), title, message); } }
protected void filterAndSetSelection(List<?> list) { ArrayList<Object> res= new ArrayList<>(list.size()); for (int i= list.size()-1; i >= 0; i--) { Object curr= list.get(i); if (curr instanceof CPListElement) { CPListElement elem= (CPListElement) curr; if (elem.getParentContainer() == null && isEntryKind(elem.getEntryKind())) { res.add(curr); } } } setSelection(res, false); }
item.setControl(fSourceContainerPage.getControl(folder)); fSourceContainerPage.init(fCurrJProject); fLibrariesPage.init(fCurrJProject); fProjectsPage.init(fCurrJProject);
public void setElementToReveal(IClasspathEntry entry, String attributeKey) { int pageIndex= getPageIndex(entry.getEntryKind()); if (fTabFolder == null) { fPageIndex= pageIndex; } else { fTabFolder.setSelection(pageIndex); CPListElement element= findElement(entry); if (element != null) { Object elementToSelect= element; if (attributeKey != null) { Object attrib= element.findAttributeElement(attributeKey); if (attrib != null) { elementToSelect= attrib; } } BuildPathBasePage page= (BuildPathBasePage) fTabFolder.getItem(pageIndex).getData(); List<Object> selection= new ArrayList<>(1); selection.add(elementToSelect); page.setSelection(selection, true); } } }
public void setFocus() { fSourceContainerPage.setFocus(); } }
private static void addExclusionPatterns(CPListElement newEntry, CPListElement[] existing, Set<CPListElement> modifiedEntries) { IPath entryPath= newEntry.getPath(); for (int i= 0; i < existing.length; i++) { CPListElement curr= existing[i]; if (curr.getEntryKind() == IClasspathEntry.CPE_SOURCE) { IPath currPath= curr.getPath(); if (!currPath.equals(entryPath)) { if (currPath.isPrefixOf(entryPath)) { if (addToExclusions(entryPath, curr)) { modifiedEntries.add(curr); } } else if (entryPath.isPrefixOf(currPath) && newEntry.getEntryKind() == IClasspathEntry.CPE_SOURCE) { if (addToExclusions(currPath, newEntry)) { modifiedEntries.add(curr); } } } } } }
fSourceContainerPage.init(fCurrJProject); fProjectsPage.init(fCurrJProject); fLibrariesPage.init(fCurrJProject);
protected void filterAndSetSelection(List<?> list) { ArrayList<Object> res= new ArrayList<>(list.size()); for (int i= list.size()-1; i >= 0; i--) { Object curr= list.get(i); if (curr instanceof CPListElement) { CPListElement elem= (CPListElement) curr; if (elem.getParentContainer() == null && isEntryKind(elem.getEntryKind())) { res.add(curr); } } } setSelection(res, false); }
item.setControl(fSourceContainerPage.getControl(folder)); fSourceContainerPage.init(fCurrJProject); fLibrariesPage.init(fCurrJProject); fProjectsPage.init(fCurrJProject);
public void setElementToReveal(IClasspathEntry entry, String attributeKey) { int pageIndex= getPageIndex(entry.getEntryKind()); if (fTabFolder == null) { fPageIndex= pageIndex; } else { fTabFolder.setSelection(pageIndex); CPListElement element= findElement(entry); if (element != null) { Object elementToSelect= element; if (attributeKey != null) { Object attrib= element.findAttributeElement(attributeKey); if (attrib != null) { elementToSelect= attrib; } } BuildPathBasePage page= (BuildPathBasePage) fTabFolder.getItem(pageIndex).getData(); List<Object> selection= new ArrayList<>(1); selection.add(elementToSelect); page.setSelection(selection, true); } } }
public void setFocus() { fSourceContainerPage.setFocus(); } }
private static void addExclusionPatterns(CPListElement newEntry, CPListElement[] existing, Set<CPListElement> modifiedEntries) { IPath entryPath= newEntry.getPath(); for (int i= 0; i < existing.length; i++) { CPListElement curr= existing[i]; if (curr.getEntryKind() == IClasspathEntry.CPE_SOURCE) { IPath currPath= curr.getPath(); if (!currPath.equals(entryPath)) { if (currPath.isPrefixOf(entryPath)) { if (addToExclusions(entryPath, curr)) { modifiedEntries.add(curr); } } else if (entryPath.isPrefixOf(currPath) && newEntry.getEntryKind() == IClasspathEntry.CPE_SOURCE) { if (addToExclusions(currPath, newEntry)) { modifiedEntries.add(curr); } } } } } }
fSourceContainerPage.init(fCurrJProject); fProjectsPage.init(fCurrJProject); fLibrariesPage.init(fCurrJProject);
private void tabChanged(Widget widget) { if (widget instanceof TabItem) { TabItem tabItem= (TabItem) widget; BuildPathBasePage newPage= (BuildPathBasePage) tabItem.getData(); if (fCurrPage != null) { List<?> selection= fCurrPage.getSelection(); if (!selection.isEmpty()) { newPage.setSelection(selection, false); } } fCurrPage= newPage; fPageIndex= tabItem.getParent().getSelectionIndex(); } }
protected void filterAndSetSelection(List list) { ArrayList res= new ArrayList(list.size()); for (int i= list.size()-1; i >= 0; i--) { Object curr= list.get(i); if (curr instanceof CPListElement) { CPListElement elem= (CPListElement) curr; if (elem.getParentContainer() == null && isEntryKind(elem.getEntryKind())) { res.add(curr); } } } setSelection(res, false); }
item.setControl(fSourceContainerPage.getControl(folder)); fSourceContainerPage.init(fCurrJProject); fLibrariesPage.init(fCurrJProject); fProjectsPage.init(fCurrJProject);
private void addExlusionPatterns(List<CPListElement> newEntries, Set<CPListElement> modifiedEntries) { BuildPathBasePage.fixNestingConflicts(newEntries.toArray(new CPListElement[newEntries.size()]), fExistingElements, modifiedEntries); if (!modifiedEntries.isEmpty()) { String title= NewWizardMessages.SourceContainerWorkbookPage_exclusion_added_title; String message= NewWizardMessages.SourceContainerWorkbookPage_exclusion_added_message; MessageDialog.openInformation(getShell(), title, message); } }
public void setElementToReveal(IClasspathEntry entry, String attributeKey) { int pageIndex= getPageIndex(entry.getEntryKind()); if (fTabFolder == null) { fPageIndex= pageIndex; } else { fTabFolder.setSelection(pageIndex); CPListElement element= findElement(entry); if (element != null) { Object elementToSelect= element; if (attributeKey != null) { Object attrib= element.findAttributeElement(attributeKey); if (attrib != null) { elementToSelect= attrib; } } BuildPathBasePage page= (BuildPathBasePage) fTabFolder.getItem(pageIndex).getData(); List selection= new ArrayList(1); selection.add(elementToSelect); page.setSelection(selection, true); } } }