diff options
author | mkersten <mkersten> | 2003-08-12 10:29:59 +0000 |
---|---|---|
committer | mkersten <mkersten> | 2003-08-12 10:29:59 +0000 |
commit | 11d7649fc3219af5a71d3bf0b9fe004c075c2b4f (patch) | |
tree | 11280a5298e3169aba7086e69b0512dc4c99f7ff /org.aspectj.ajdt.core | |
parent | 1e0113299d9eea6272c7b83b40d95b808076a028 (diff) | |
download | aspectj-11d7649fc3219af5a71d3bf0b9fe004c075c2b4f.tar.gz aspectj-11d7649fc3219af5a71d3bf0b9fe004c075c2b4f.zip |
Minor improvements to structure model generation, clean up of test suite output, and port of AJDT to new ASM APIs.
Diffstat (limited to 'org.aspectj.ajdt.core')
3 files changed, 20 insertions, 21 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java index 4fea43a00..37f50061c 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java @@ -118,7 +118,7 @@ public class AjBuildManager { if (batch) { // System.err.println("XXXX batch: " + buildConfig.getFiles()); if (buildConfig.isEmacsSymMode() || buildConfig.isGenerateModelMode()) { - bcelWorld.setModel(StructureModelManager.getDefault().getModel()); + bcelWorld.setModel(AsmManager.getDefault().getModel()); // in incremental build, only get updated model? } performCompilation(buildConfig.getFiles()); @@ -157,7 +157,7 @@ public class AjBuildManager { // but always returns true // XXX weaved not in Mik's incremental if (buildConfig.isGenerateModelMode()) { - StructureModelManager.getDefault().fireModelUpdated(); + AsmManager.getDefault().fireModelUpdated(); } return !handler.hasErrors(); } finally { @@ -167,7 +167,7 @@ public class AjBuildManager { private void setupModel() { String rootLabel = "<root>"; - StructureModel model = StructureModelManager.getDefault().getModel(); + StructureModel model = AsmManager.getDefault().getModel(); IProgramElement.Kind kind = IProgramElement.Kind.FILE_JAVA; if (buildConfig.getConfigFile() != null) { rootLabel = buildConfig.getConfigFile().getName(); @@ -178,7 +178,6 @@ public class AjBuildManager { } model.setRoot(new ProgramElement(rootLabel, kind, new ArrayList())); - HashMap modelFileMap = new HashMap(); model.setFileMap(new HashMap()); setStructureModel(model); } diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/EmacsStructureModelManager.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/EmacsStructureModelManager.java index 651231bc1..93e1bd5fe 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/EmacsStructureModelManager.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/EmacsStructureModelManager.java @@ -32,11 +32,11 @@ public class EmacsStructureModelManager { } public void externalizeModel() { - if (!StructureModelManager.getDefault().getModel().isValid()) return; + if (!AsmManager.getDefault().getModel().isValid()) return; try { //Set fileSet = StructureModelManager.INSTANCE.getStructureModel().getFileMap().entrySet(); - Set fileSet = StructureModelManager.getDefault().getModel().getFileMapEntrySet(); + Set fileSet = AsmManager.getDefault().getModel().getFileMapEntrySet(); for (Iterator it = fileSet.iterator(); it.hasNext(); ) { IProgramElement peNode = (IProgramElement)((Map.Entry)it.next()).getValue(); dumpStructureToFile(peNode); @@ -142,7 +142,7 @@ public class EmacsStructureModelManager { } else { print("nil"); } - if (node.getSignature() != null) { + if (node.getName() != null) { print("\"" + node.getDeclaringType() + "\" "); //5 } else { print("nil"); @@ -154,18 +154,18 @@ public class EmacsStructureModelManager { print("nil"); } else { print("("); - if (node instanceof IProgramElement) { - java.util.List relations = ((IProgramElement)node).getRelations(); - if (relations != null) { - for (Iterator it = relations.iterator(); it.hasNext(); ) { - IRelationship relNode = (IRelationship)it.next(); - if (relNode.getKind() == IRelationship.Kind.ADVICE || - relNode.getKind() == IRelationship.Kind.DECLARE) { - printDecls(relNode); // 6 - } - } - } - } +// if (node instanceof IProgramElement) { +// java.util.List relations = ((IProgramElement)node).getRelations(); +// if (relations != null) { +// for (Iterator it = relations.iterator(); it.hasNext(); ) { +// IRelationship relNode = (IRelationship)it.next(); +// if (relNode.getKind() == IRelationship.Kind.ADVICE || +// relNode.getKind() == IRelationship.Kind.DECLARE) { +// printDecls(relNode); // 6 +// } +// } +// } +// } print(") "); print("("); print(") "); diff --git a/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/internal/core/builder/AjBuildManagerTest.java b/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/internal/core/builder/AjBuildManagerTest.java index c1d6840da..76e3671e0 100644 --- a/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/internal/core/builder/AjBuildManagerTest.java +++ b/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/internal/core/builder/AjBuildManagerTest.java @@ -20,7 +20,7 @@ import java.io.PrintWriter; import junit.framework.TestCase; import org.aspectj.ajdt.ajc.BuildArgParser; -import org.aspectj.asm.StructureModelManager; +import org.aspectj.asm.AsmManager; import org.aspectj.bridge.IMessage; import org.aspectj.bridge.MessageHandler; import org.aspectj.bridge.MessageWriter; @@ -73,7 +73,7 @@ public class AjBuildManagerTest extends TestCase { }, messageWriter); String err = parser.getOtherMessages(true); assertTrue(err, null == err); - manager.setStructureModel(StructureModelManager.getDefault().getModel()); + manager.setStructureModel(AsmManager.getDefault().getModel()); MessageHandler handler = new MessageHandler(); manager.batchBuild(buildConfig, handler); assertCompileMessagesValid(handler); |