diff options
-rw-r--r-- | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/EmacsStructureModelManager.java | 6 |
1 files changed, 6 insertions, 0 deletions
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 4c19219aa..1b6283086 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 @@ -65,6 +65,12 @@ public class EmacsStructureModelManager { // } private void dumpStructureToFile(ProgramElementNode node) throws IOException { + String s = node.getKind(); + if (! (s.equals(ProgramElementNode.Kind.FILE_ASPECTJ.toString()) + || s.equals(ProgramElementNode.Kind.FILE_JAVA.toString()))) { + throw new IllegalArgumentException("externalize file, not " + node); + } + // source files have source locations String sourceName = node.getSourceLocation().getSourceFile().getAbsolutePath(); String fileName = sourceName.substring(0, sourceName.lastIndexOf(".")) + EXTERN_FILE_SUFFIX; BufferedWriter writer = null; |