aboutsummaryrefslogtreecommitdiffstats
path: root/ajde
diff options
context:
space:
mode:
authorwisberg <wisberg>2003-04-28 23:22:33 +0000
committerwisberg <wisberg>2003-04-28 23:22:33 +0000
commitc5175f34dc5c7828d67dec3b790632cccefbe8a6 (patch)
tree0657f40192e52f05eab27d107f5f56ba6eaea9ab /ajde
parent9b30f9f9d9e55ff51dc6c05ee88e00c1d84c8abf (diff)
downloadaspectj-c5175f34dc5c7828d67dec3b790632cccefbe8a6.tar.gz
aspectj-c5175f34dc5c7828d67dec3b790632cccefbe8a6.zip
Checking in Mik's changes sent by email today for model and incremental support in AJDE.
ajde has the same test failing as it did before this checkin, perhaps caused by a regression per bug 37020
Diffstat (limited to 'ajde')
-rw-r--r--ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java27
-rw-r--r--ajde/src/org/aspectj/ajde/ui/internal/TreeStructureViewBuilder.java2
2 files changed, 22 insertions, 7 deletions
diff --git a/ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java b/ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java
index e6e5669e2..7100abed5 100644
--- a/ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java
+++ b/ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java
@@ -47,6 +47,7 @@ public class CompilerAdapter {
private boolean initialized = false;
private boolean structureDirty = true;
private boolean firstBuild = true;
+ private boolean incrementalEnabled = true; // XXX make false by default
public CompilerAdapter() {
super();
@@ -67,7 +68,7 @@ public class CompilerAdapter {
public boolean compile(String configFile, BuildProgressMonitor progressMonitor) {
init();
- try {
+ try {
AjBuildConfig buildConfig = genBuildConfig(configFile);
buildConfig.setGenerateModelMode(true);
@@ -84,12 +85,12 @@ public class CompilerAdapter {
return false;
}
- if (firstBuild) {
- firstBuild = false;
- return buildManager.batchBuild(buildConfig, messageHandler);
- } else {
- return buildManager.batchBuild(buildConfig, messageHandler); // XXX incremental not implemented
+ if (incrementalEnabled && !firstBuild){
+ return buildManager.incrementalBuild(buildConfig, messageHandler); // XXX incremental not implemented
// return buildManager.incrementalBuild(buildConfig);
+ } else {
+ firstBuild = false;
+ return buildManager.batchBuild(buildConfig, messageHandler);
}
} catch (OperationCanceledException ce) {
Ajde.getDefault().getIdeUIAdapter().displayStatusInformation("build cancelled by user");
@@ -424,4 +425,18 @@ public class CompilerAdapter {
}
}
+ /**
+ * @return
+ */
+ public boolean isIncrementalEnabled() {
+ return incrementalEnabled;
+ }
+
+ /**
+ * @param b
+ */
+ public void setIncrementalEnabled(boolean b) {
+ incrementalEnabled = b;
+ }
+
}
diff --git a/ajde/src/org/aspectj/ajde/ui/internal/TreeStructureViewBuilder.java b/ajde/src/org/aspectj/ajde/ui/internal/TreeStructureViewBuilder.java
index 5d4308951..32daa8a34 100644
--- a/ajde/src/org/aspectj/ajde/ui/internal/TreeStructureViewBuilder.java
+++ b/ajde/src/org/aspectj/ajde/ui/internal/TreeStructureViewBuilder.java
@@ -154,7 +154,7 @@ public class TreeStructureViewBuilder {
if (granularity == StructureViewProperties.Granularity.DECLARED_ELEMENTS) {
return true;
} else if (granularity == StructureViewProperties.Granularity.MEMBER &&
- (kind == ProgramElementNode.Kind.CODE)) {
+ (kind != ProgramElementNode.Kind.CODE)) {
return true;
} else if (granularity == StructureViewProperties.Granularity.TYPE
&& (kind == ProgramElementNode.Kind.PROJECT