mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-01 14:15:23 +02:00
2004-08-27 Alain Magloire
Fix for 72135 * src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathBasePage.java * src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathSourceEntryPage.java * src/org/eclipse/cdt/internal/ui/wizards/TreeListDialgField.java
This commit is contained in:
parent
cc31ff6aa4
commit
8348117fc0
4 changed files with 20 additions and 31 deletions
|
@ -1,3 +1,10 @@
|
|||
2004-08-27 Alain Magloire
|
||||
|
||||
Fix for 72135
|
||||
* src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathBasePage.java
|
||||
* src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathSourceEntryPage.java
|
||||
* src/org/eclipse/cdt/internal/ui/wizards/TreeListDialgField.java
|
||||
|
||||
2004-08-26 Alain Magloire
|
||||
Be on the same length as the Java Editor and Ant Editor
|
||||
for the Preference page. Misc warning removes, when
|
||||
|
|
|
@ -28,10 +28,13 @@ public abstract class CPathBasePage extends AbstractCOptionPage {
|
|||
super(title, image);
|
||||
}
|
||||
|
||||
protected void fixNestingConflicts(List newEntries, List existing, Set modifiedSourceEntries) {
|
||||
protected void fixNestingConflicts(List newEntries, List existingList, Set modifiedSourceEntries) {
|
||||
ArrayList existing = new ArrayList(existingList);
|
||||
for (int i = 0; i < newEntries.size(); i++) {
|
||||
CPElement curr = (CPElement) newEntries.get(i);
|
||||
addExclusionPatterns(curr, existing, modifiedSourceEntries);
|
||||
// add the entry to the existing list so it can be analyse also.
|
||||
existing.add(curr);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -208,37 +208,16 @@ public class CPathSourceEntryPage extends CPathBasePage {
|
|||
}
|
||||
}
|
||||
|
||||
private boolean hasFolders(IContainer container) {
|
||||
try {
|
||||
IResource[] members = container.members();
|
||||
for (int i = 0; i < members.length; i++) {
|
||||
if (members[i] instanceof IContainer) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} catch (CoreException e) {
|
||||
// ignore
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected void sourcePageCustomButtonPressed(DialogField field, int index) {
|
||||
if (field == fFoldersList) {
|
||||
if (index == IDX_ADD) {
|
||||
List elementsToAdd = new ArrayList(10);
|
||||
IProject project = fCurrCProject.getProject();
|
||||
if (project.exists()) {
|
||||
if (hasFolders(project)) {
|
||||
CPElement[] srcentries = openSourceContainerDialog(null);
|
||||
if (srcentries != null) {
|
||||
for (int i = 0; i < srcentries.length; i++) {
|
||||
elementsToAdd.add(srcentries[i]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
CPElement entry = openNewSourceContainerDialog(null, true);
|
||||
if (entry != null) {
|
||||
elementsToAdd.add(entry);
|
||||
CPElement[] srcentries = openSourceContainerDialog(null);
|
||||
if (srcentries != null) {
|
||||
for (int i = 0; i < srcentries.length; i++) {
|
||||
elementsToAdd.add(srcentries[i]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -372,7 +351,7 @@ public class CPathSourceEntryPage extends CPathBasePage {
|
|||
return false;
|
||||
}
|
||||
|
||||
private void sourcePageDialogFieldChanged(DialogField field) {
|
||||
void sourcePageDialogFieldChanged(DialogField field) {
|
||||
if (fCurrCProject == null) {
|
||||
// not initialized
|
||||
return;
|
||||
|
|
|
@ -67,13 +67,13 @@ public class TreeListDialogField extends DialogField {
|
|||
|
||||
private Label fLastSeparator;
|
||||
|
||||
private Tree fTreeControl;
|
||||
Tree fTreeControl;
|
||||
private Composite fButtonsControl;
|
||||
private ISelection fSelectionWhenEnabled;
|
||||
|
||||
private ITreeListAdapter fTreeAdapter;
|
||||
ITreeListAdapter fTreeAdapter;
|
||||
|
||||
private Object fParentElement;
|
||||
Object fParentElement;
|
||||
private int fTreeExpandLevel;
|
||||
|
||||
/**
|
||||
|
@ -389,7 +389,7 @@ public class TreeListDialogField extends DialogField {
|
|||
return fButtonsControl;
|
||||
}
|
||||
|
||||
private void doButtonSelected(SelectionEvent e) {
|
||||
void doButtonSelected(SelectionEvent e) {
|
||||
if (fButtonControls != null) {
|
||||
for (int i = 0; i < fButtonControls.length; i++) {
|
||||
if (e.widget == fButtonControls[i]) {
|
||||
|
|
Loading…
Add table
Reference in a new issue