Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorAlain Magloire2004-09-10 23:58:23 -0400
committerAlain Magloire2004-09-10 23:58:23 -0400
commitc7b33d247f369441d282a78202ca52fb1656b34b (patch)
tree70c055301f3e151a3ad474b0f3789d399d69ed40 /build
parentfd19cbc0555b5498d332468ad96dc12e2cde6b6a (diff)
downloadorg.eclipse.cdt-c7b33d247f369441d282a78202ca52fb1656b34b.tar.gz
org.eclipse.cdt-c7b33d247f369441d282a78202ca52fb1656b34b.tar.xz
org.eclipse.cdt-c7b33d247f369441d282a78202ca52fb1656b34b.zip
save the preference when shutting down
Diffstat (limited to 'build')
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeCorePlugin.java1
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefile.java7
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Include.java15
3 files changed, 11 insertions, 12 deletions
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeCorePlugin.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeCorePlugin.java
index cda1cb7fe23..57ae6a6354c 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeCorePlugin.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeCorePlugin.java
@@ -183,6 +183,7 @@ public class MakeCorePlugin extends Plugin {
fDiscoveryPathManager.shutdown();
fDiscoveryPathManager = null;
}
+ savePluginPreferences();
} finally {
super.stop(context);
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefile.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefile.java
index 84ed943df77..d6d789a574b 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefile.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefile.java
@@ -25,6 +25,7 @@ import java.util.StringTokenizer;
import org.eclipse.cdt.make.core.MakeCorePlugin;
import org.eclipse.cdt.make.core.makefile.IDirective;
+import org.eclipse.cdt.make.core.makefile.IMakefile;
import org.eclipse.cdt.make.core.makefile.gnu.IGNUMakefile;
import org.eclipse.cdt.make.internal.core.makefile.AbstractMakefile;
import org.eclipse.cdt.make.internal.core.makefile.BadDirective;
@@ -775,7 +776,11 @@ public class GNUMakefile extends AbstractMakefile implements IGNUMakefile {
for (int i = 0; i < dirs.length; ++i) {
if (dirs[i] instanceof Include) {
Include include = (Include)dirs[i];
- list.addAll(Arrays.asList(include.getDirectives()));
+ IDirective[] includedMakefiles = include.getDirectives();
+ for (int j = 0; j < includedMakefiles.length; ++j) {
+ IMakefile includedMakefile = (IMakefile)includedMakefiles[j];
+ list.addAll(Arrays.asList(includedMakefile.getDirectives()));
+ }
}
}
return (IDirective[]) list.toArray(new IDirective[list.size()]);
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Include.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Include.java
index d3a8466fae4..d92f7ea72cc 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Include.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/Include.java
@@ -41,17 +41,13 @@ public class Include extends Parent implements IInclude {
}
public IDirective[] getDirectives() {
- GNUMakefile gnu = new GNUMakefile();
clearDirectives();
for (int i = 0; i < filenames.length; i++) {
// Try the current directory.
+ GNUMakefile gnu = new GNUMakefile();
try {
gnu.parse(filenames[i]);
- Directive[] subdirs = gnu.getStatements();
- addDirectives(subdirs);
- for (int k = 0; k < subdirs.length; ++k) {
- subdirs[k].setFilename(filenames[i]);
- }
+ addDirective(gnu);
continue;
} catch (IOException e) {
}
@@ -59,12 +55,9 @@ public class Include extends Parent implements IInclude {
for (int j = 0; j < dirs.length; j++) {
try {
String filename = dirs[j] + GNUMakefile.FILE_SEPARATOR + filenames[i];
+ gnu = new GNUMakefile();
gnu.parse(filename);
- Directive[] subdirs = gnu.getStatements();
- addDirectives(subdirs);
- for (int k = 0; k < subdirs.length; ++k) {
- subdirs[k].setFilename(filename);
- }
+ addDirective(gnu);
break;
} catch (IOException e) {
}

Back to the top