aboutsummaryrefslogtreecommitdiffstats
path: root/org.aspectj.ajdt.core
diff options
context:
space:
mode:
authormkersten <mkersten>2003-07-25 15:13:55 +0000
committermkersten <mkersten>2003-07-25 15:13:55 +0000
commit819bf9673845f57d744df90c6944ad86a6acba46 (patch)
tree5707d3f2300b3c4f11b175e17dabb5ebe17065f4 /org.aspectj.ajdt.core
parentff93d3438218b803b0b6af80e27aec884f54f3bf (diff)
downloadaspectj-819bf9673845f57d744df90c6944ad86a6acba46.tar.gz
aspectj-819bf9673845f57d744df90c6944ad86a6acba46.zip
Refactored singleton reference to be accessed via getDefault() in order to be consistent with the rest of AJDE.
Diffstat (limited to 'org.aspectj.ajdt.core')
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java6
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/EmacsStructureModelManager.java4
-rw-r--r--org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/internal/core/builder/AjBuildManagerTest.java2
3 files changed, 6 insertions, 6 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 973be83e1..436fda9d0 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
@@ -127,7 +127,7 @@ public class AjBuildManager {
if (batch) {
// System.err.println("XXXX batch: " + buildConfig.getFiles());
if (buildConfig.isEmacsSymMode() || buildConfig.isGenerateModelMode()) {
- bcelWorld.setModel(StructureModelManager.INSTANCE.getStructureModel());
+ bcelWorld.setModel(StructureModelManager.getDefault().getStructureModel());
// in incremental build, only get updated model?
}
performCompilation(buildConfig.getFiles());
@@ -166,7 +166,7 @@ public class AjBuildManager {
// but always returns true
// XXX weaved not in Mik's incremental
if (buildConfig.isGenerateModelMode()) {
- StructureModelManager.INSTANCE.fireModelUpdated();
+ StructureModelManager.getDefault().fireModelUpdated();
}
return !handler.hasErrors();
} finally {
@@ -176,7 +176,7 @@ public class AjBuildManager {
private void setupModel() {
String rootLabel = "<root>";
- StructureModel model = StructureModelManager.INSTANCE.getStructureModel();
+ StructureModel model = StructureModelManager.getDefault().getStructureModel();
ProgramElementNode.Kind kind = ProgramElementNode.Kind.FILE_JAVA;
if (buildConfig.getConfigFile() != null) {
rootLabel = buildConfig.getConfigFile().getName();
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 1b6283086..8f662e160 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
@@ -42,11 +42,11 @@ public class EmacsStructureModelManager {
}
public void externalizeModel() {
- if (!StructureModelManager.INSTANCE.getStructureModel().isValid()) return;
+ if (!StructureModelManager.getDefault().getStructureModel().isValid()) return;
try {
//Set fileSet = StructureModelManager.INSTANCE.getStructureModel().getFileMap().entrySet();
- Set fileSet = StructureModelManager.INSTANCE.getStructureModel().getFileMapEntrySet();
+ Set fileSet = StructureModelManager.getDefault().getStructureModel().getFileMapEntrySet();
for (Iterator it = fileSet.iterator(); it.hasNext(); ) {
ProgramElementNode peNode = (ProgramElementNode)((Map.Entry)it.next()).getValue();
dumpStructureToFile(peNode);
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 9f65892a5..4a2fa7567 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
@@ -73,7 +73,7 @@ public class AjBuildManagerTest extends TestCase {
}, messageWriter);
String err = parser.getOtherMessages(true);
assertTrue(err, null == err);
- manager.setStructureModel(StructureModelManager.INSTANCE.getStructureModel());
+ manager.setStructureModel(StructureModelManager.getDefault().getStructureModel());
MessageHandler handler = new MessageHandler();
manager.batchBuild(buildConfig, handler);
assertCompileMessagesValid(handler);