Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/AbstractPathOptionBlock.java7
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPElementGroup.java19
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathContainerEntryPage.java1
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPage.java8
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathLibraryEntryPage.java1
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathOutputEntryPage.java1
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathSourceEntryPage.java1
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/NewIncludesSymbolsTabBlock.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/dialogfields/TreeListDialogField.java1
9 files changed, 25 insertions, 16 deletions
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/AbstractPathOptionBlock.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/AbstractPathOptionBlock.java
index b57e71e6ba0..09d58a1dee1 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/AbstractPathOptionBlock.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/AbstractPathOptionBlock.java
@@ -170,11 +170,12 @@ abstract public class AbstractPathOptionBlock extends TabFolderOptionBlock imple
private String getEncodedSettings() {
StringBuffer buf = new StringBuffer();
-
- int nElements = getCPaths().size();
+
+ List elements = getCPaths();
+ int nElements = elements.size();
buf.append('[').append(nElements).append(']');
for (int i = 0; i < nElements; i++) {
- CPElement elem = (CPElement) getCPaths().get(i);
+ CPElement elem = (CPElement) elements.get(i);
elem.appendEncodedSettings(buf);
}
return buf.toString();
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPElementGroup.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPElementGroup.java
index 2643d6d8361..bb5409f3f51 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPElementGroup.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPElementGroup.java
@@ -11,8 +11,8 @@ package org.eclipse.cdt.internal.ui.dialogs.cpaths;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
-import java.util.HashMap;
import java.util.Iterator;
+import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@@ -30,7 +30,7 @@ public class CPElementGroup {
public CPElementGroup(IResource resource) {
this.kind = -1;
this.resource = resource;
- this.childrenListMap = new HashMap(2);
+ this.childrenListMap = new LinkedHashMap(2);
}
public CPElementGroup(CPElement parent, int kind) {
@@ -150,15 +150,14 @@ public class CPElementGroup {
public CPElement[] getChildren() {
if (childrenList != null) {
return (CPElement[])childrenList.toArray(new CPElement[childrenList.size()]);
- } else {
- Collection lists = childrenListMap.values();
- Iterator iter = lists.iterator();
- List children = new ArrayList();
- while (iter.hasNext()) {
- children.addAll((List)iter.next());
- }
- return (CPElement[])children.toArray(new CPElement[children.size()]);
}
+ Collection lists = childrenListMap.values();
+ Iterator iter = lists.iterator();
+ List children = new ArrayList();
+ while (iter.hasNext()) {
+ children.addAll((List)iter.next());
+ }
+ return (CPElement[])children.toArray(new CPElement[children.size()]);
}
/**
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathContainerEntryPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathContainerEntryPage.java
index f162ffcdd9f..2a1372bf156 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathContainerEntryPage.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathContainerEntryPage.java
@@ -69,6 +69,7 @@ public class CPathContainerEntryPage extends CPathBasePage {
fContainersList.enableButton(IDX_REMOVE, false);
fContainersList.enableButton(IDX_EDIT, false);
fContainersList.enableButton(IDX_EXPORT, false);
+ fContainersList.setTreeExpansionLevel(2);
fContainersList.setViewerSorter(new CPElementSorter());
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPage.java
index 91f904a4539..f98f3c375af 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPage.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPage.java
@@ -181,7 +181,7 @@ public class CPathIncludeSymbolEntryPage extends CPathBasePage {
fIncludeSymPathsList.enableButton(IDX_EXPORT, false);
fIncludeSymPathsList.enableButton(IDX_UP, false);
fIncludeSymPathsList.enableButton(IDX_DOWN, false);
-
+ fIncludeSymPathsList.setTreeExpansionLevel(2);
fShowInheritedPaths = new SelectionButtonDialogField(SWT.CHECK);
fShowInheritedPaths.setSelection(true);
fShowInheritedPaths.setLabelText(CPathEntryMessages.getString("IncludeSymbolsEntryPage.show_inherited.check")); //$NON-NLS-1$
@@ -269,12 +269,18 @@ public class CPathIncludeSymbolEntryPage extends CPathBasePage {
List resourceGroups = new ArrayList(5);
fProjectGroup = new CPElementGroup(fCurrCProject.getResource());
resourceGroups.add(fProjectGroup);
+ // add containers first so that they appear at top of list
for (int i = 0; i < cPaths.size(); i++) {
CPElement element = (CPElement)cPaths.get(i);
switch (element.getEntryKind()) {
case IPathEntry.CDT_CONTAINER :
fProjectGroup.addChild(element);
break;
+ }
+ }
+ for (int i = 0; i < cPaths.size(); i++) {
+ CPElement element = (CPElement)cPaths.get(i);
+ switch (element.getEntryKind()) {
case IPathEntry.CDT_INCLUDE :
case IPathEntry.CDT_MACRO :
CPElementGroup resGroup = new CPElementGroup(element.getResource());
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathLibraryEntryPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathLibraryEntryPage.java
index 1f932f4e9d4..ab4ee8944de 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathLibraryEntryPage.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathLibraryEntryPage.java
@@ -103,6 +103,7 @@ public class CPathLibraryEntryPage extends CPathBasePage {
fLibrariesList.enableButton(IDX_EDIT, false);
fLibrariesList.enableButton(IDX_REMOVE, false);
fLibrariesList.enableButton(IDX_EXPORT, false);
+ fLibrariesList.setTreeExpansionLevel(2);
}
public Image getImage() {
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathOutputEntryPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathOutputEntryPage.java
index 5e6e3ab4d74..77fa182b4b8 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathOutputEntryPage.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathOutputEntryPage.java
@@ -92,6 +92,7 @@ public class CPathOutputEntryPage extends CPathBasePage {
fOutputList.setViewerSorter(new CPElementSorter());
fOutputList.enableButton(IDX_EDIT, false);
fOutputList.enableButton(IDX_REMOVE, false);
+ fOutputList.setTreeExpansionLevel(2);
}
public Image getImage() {
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathSourceEntryPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathSourceEntryPage.java
index 087ae95bc8e..0f9c67ef80b 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathSourceEntryPage.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathSourceEntryPage.java
@@ -93,6 +93,7 @@ public class CPathSourceEntryPage extends CPathBasePage {
fFoldersList.setViewerSorter(new CPElementSorter());
fFoldersList.enableButton(IDX_EDIT, false);
fFoldersList.enableButton(IDX_REMOVE, false);
+ fFoldersList.setTreeExpansionLevel(2);
}
public Image getImage() {
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/NewIncludesSymbolsTabBlock.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/NewIncludesSymbolsTabBlock.java
index 7417f0e3389..71d1860195c 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/NewIncludesSymbolsTabBlock.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/NewIncludesSymbolsTabBlock.java
@@ -31,6 +31,7 @@ public class NewIncludesSymbolsTabBlock extends AbstractPathOptionBlock implemen
public NewIncludesSymbolsTabBlock(IStatusChangeListener context, int pageToShow) {
super(context, pageToShow);
+ fIncludeSymbols = new CPathIncludeSymbolEntryPage(this);
}
protected void addTab(ICOptionPage tab) {
@@ -46,7 +47,6 @@ public class NewIncludesSymbolsTabBlock extends AbstractPathOptionBlock implemen
fComposite = new Composite(parent, SWT.NONE);
fComposite.setLayout(new GridLayout(1, false));
- fIncludeSymbols = new CPathIncludeSymbolEntryPage(this);
addPage(fIncludeSymbols);
setCurrentPage(fIncludeSymbols);
initializingTabs = false;
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/dialogfields/TreeListDialogField.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/dialogfields/TreeListDialogField.java
index 3d514428bfd..f42b06074dd 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/dialogfields/TreeListDialogField.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/dialogfields/TreeListDialogField.java
@@ -270,7 +270,6 @@ public class TreeListDialogField extends DialogField {
handleKeyPressed(e);
}
});
- fTree.setAutoExpandLevel(99);
fTree.setContentProvider(fTreeViewerAdapter);
fTree.setLabelProvider(fLabelProvider);
fTree.addSelectionChangedListener(fTreeViewerAdapter);

Back to the top