diff options
author | mkersten <mkersten> | 2003-08-14 09:07:44 +0000 |
---|---|---|
committer | mkersten <mkersten> | 2003-08-14 09:07:44 +0000 |
commit | b5d8b449c79cbedc82e03381cc459ae8c8ae9718 (patch) | |
tree | 839c55908b7814d7fab40208b1c2afaa5fb84483 /org.aspectj.ajdt.core/src | |
parent | bffcd4c30591bce89ba938325159374e1ea1ea96 (diff) | |
download | aspectj-b5d8b449c79cbedc82e03381cc459ae8c8ae9718.tar.gz aspectj-b5d8b449c79cbedc82e03381cc459ae8c8ae9718.zip |
Updated org.aspectj.asm relationship model to string-handle-based API in order to support adding and removing relationships at any point in the compilation cycle, and to support external tools building relationships (e.g. JDT's incremental containment hierarchy builder). Also made inter-type declaration relationships show up in the model.
Diffstat (limited to 'org.aspectj.ajdt.core/src')
-rw-r--r-- | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java | 5 | ||||
-rw-r--r-- | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AsmInterTypeRelationshipProvider.java | 67 | ||||
-rw-r--r-- | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | 11 | ||||
-rw-r--r-- | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmElementFormatter.java (renamed from org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmNodeFormatter.java) | 135 | ||||
-rw-r--r-- | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmHierarchyBuilder.java | 19 | ||||
-rw-r--r-- | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/EmacsStructureModelManager.java | 4 |
6 files changed, 171 insertions, 70 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java index 8bbf228a8..171aeb722 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java @@ -16,6 +16,9 @@ package org.aspectj.ajdt.internal.compiler.lookup; import java.util.*; import org.aspectj.ajdt.internal.compiler.ast.AspectDeclaration; +import org.aspectj.asm.*; +import org.aspectj.asm.IProgramElement; +import org.aspectj.asm.internal.Relationship; import org.aspectj.bridge.IMessage; import org.aspectj.weaver.*; import org.aspectj.weaver.patterns.*; @@ -211,6 +214,8 @@ public class AjLookupEnvironment extends LookupEnvironment { needOldStyleWarning = false; } onType.addInterTypeMunger(munger); + + AsmInterTypeRelationshipProvider.addRelationship(onType, munger); } } diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AsmInterTypeRelationshipProvider.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AsmInterTypeRelationshipProvider.java new file mode 100644 index 000000000..329e5b57e --- /dev/null +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AsmInterTypeRelationshipProvider.java @@ -0,0 +1,67 @@ +/* ******************************************************************* + * Copyright (c) 2003 Contributors. + * All rights reserved. + * This program and the accompanying materials are made available + * under the terms of the Common Public License v1.0 + * which accompanies this distribution and is available at + * http://www.eclipse.org/legal/cpl-v10.html + * + * Contributors: + * Mik Kersten initial implementation + * ******************************************************************/ + +package org.aspectj.ajdt.internal.compiler.lookup; + +import java.util.*; + +import org.aspectj.asm.*; +import org.aspectj.asm.internal.Relationship; +import org.aspectj.weaver.*; + +/** + * @author Mik Kersten + */ +public class AsmInterTypeRelationshipProvider { + + public static final String INTER_TYPE_DECLARES = "declares on"; + public static final String INTER_TYPE_DECLARED_BY = "aspect declarations"; + + public static void addRelationship( + ResolvedTypeX onType, + EclipseTypeMunger munger) { + + IProgramElement.Kind kind = IProgramElement.Kind.ERROR; + if (munger.getMunger().getKind() == ResolvedTypeMunger.Field) { + kind = IProgramElement.Kind.INTER_TYPE_FIELD; + } else if (munger.getMunger().getKind() == ResolvedTypeMunger.Constructor) { + kind = IProgramElement.Kind.INTER_TYPE_CONSTRUCTOR; + } else if (munger.getMunger().getKind() == ResolvedTypeMunger.Method) { + kind = IProgramElement.Kind.INTER_TYPE_METHOD; + } else if (munger.getMunger().getKind() == ResolvedTypeMunger.Parent) { + kind = IProgramElement.Kind.INTER_TYPE_PARENT; + } + + if (munger.getSourceLocation() != null + && munger.getSourceLocation() != null) { + String sourceHandle = + munger.getSourceLocation().getSourceFile().getAbsolutePath() + IProgramElement.ID_DELIM + + munger.getSourceLocation().getLine() + IProgramElement.ID_DELIM + + munger.getSourceLocation().getColumn(); + + String targetHandle = + onType.getSourceLocation().getSourceFile().getAbsolutePath() + IProgramElement.ID_DELIM + + onType.getSourceLocation().getLine() + IProgramElement.ID_DELIM + + onType.getSourceLocation().getColumn(); + + IRelationshipMap mapper = AsmManager.getDefault().getRelationshipMap(); + if (sourceHandle != null && targetHandle != null) { + IRelationship foreward = mapper.get(sourceHandle, IRelationship.Kind.ADVICE, INTER_TYPE_DECLARES); + foreward.getTargets().add(targetHandle); + + IRelationship back = mapper.get(targetHandle, IRelationship.Kind.ADVICE, INTER_TYPE_DECLARED_BY); + back.getTargets().add(sourceHandle); + } + } + } + +} 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 8cb60f48f..bada76650 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 @@ -22,6 +22,7 @@ import org.aspectj.ajdt.internal.compiler.lookup.*; import org.aspectj.ajdt.internal.compiler.parser.AjParser; import org.aspectj.ajdt.internal.compiler.problem.AjProblemReporter; import org.aspectj.asm.*; +import org.aspectj.asm.internal.*; import org.aspectj.asm.internal.ProgramElement; import org.aspectj.bridge.*; import org.aspectj.weaver.World; @@ -42,7 +43,7 @@ public class AjBuildManager { private int compiledCount; private int sourceFileCount; - private AspectJModel structureModel; + private IHierarchy structureModel; public AjBuildConfig buildConfig; AjState state = new AjState(this); @@ -118,7 +119,7 @@ public class AjBuildManager { if (batch) { // System.err.println("XXXX batch: " + buildConfig.getFiles()); if (buildConfig.isEmacsSymMode() || buildConfig.isGenerateModelMode()) { - bcelWorld.setModel(AsmManager.getDefault().getModel()); + bcelWorld.setModel(AsmManager.getDefault().getHierarchy()); // in incremental build, only get updated model? } performCompilation(buildConfig.getFiles()); @@ -167,7 +168,7 @@ public class AjBuildManager { private void setupModel() { String rootLabel = "<root>"; - AspectJModel model = AsmManager.getDefault().getModel(); + IHierarchy model = AsmManager.getDefault().getHierarchy(); IProgramElement.Kind kind = IProgramElement.Kind.FILE_JAVA; if (buildConfig.getConfigFile() != null) { rootLabel = buildConfig.getConfigFile().getName(); @@ -523,14 +524,14 @@ public class AjBuildManager { } - public void setStructureModel(AspectJModel structureModel) { + public void setStructureModel(IHierarchy structureModel) { this.structureModel = structureModel; } /** * Returns null if there is no structure model */ - public AspectJModel getStructureModel() { + public IHierarchy getStructureModel() { return structureModel; } diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmNodeFormatter.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmElementFormatter.java index e2025743e..114bf7439 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmNodeFormatter.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmElementFormatter.java @@ -10,7 +10,7 @@ package org.aspectj.ajdt.internal.core.builder; -import java.util.Iterator; +import java.util.*; import org.aspectj.ajdt.internal.compiler.ast.*; import org.aspectj.asm.IProgramElement; @@ -18,13 +18,13 @@ import org.aspectj.weaver.*; import org.aspectj.weaver.patterns.*; import org.eclipse.jdt.internal.compiler.ast.*; -public class AsmNodeFormatter { +public class AsmElementFormatter { - public static final String DECLARE_PRECEDENCE = "precedence: "; - public static final String DECLARE_SOFT = "soft: "; - public static final String DECLARE_PARENTS = "parents: "; - public static final String DECLARE_WARNING = "warning: "; - public static final String DECLARE_ERROR = "error: "; + public static final String DECLARE_PRECEDENCE = "precedence"; + public static final String DECLARE_SOFT = "soft"; + public static final String DECLARE_PARENTS = "parents"; + public static final String DECLARE_WARNING = "warning"; + public static final String DECLARE_ERROR = "error"; public static final String DECLARE_UNKNONWN = "<unknown declare>"; public static final String POINTCUT_ABSTRACT = "<abstract pointcut>"; public static final String POINTCUT_ANONYMOUS = "<anonymous pointcut>"; @@ -32,110 +32,118 @@ public class AsmNodeFormatter { public static final String DEC_LABEL = "declare"; public void genLabelAndKind(MethodDeclaration methodDeclaration, IProgramElement node) { + if (methodDeclaration instanceof AdviceDeclaration) { AdviceDeclaration ad = (AdviceDeclaration)methodDeclaration; - node.setKind( IProgramElement.Kind.ADVICE); - String label = ""; - label += ad.kind.toString(); - label += "(" + genArguments(ad) + "): "; + node.setKind(IProgramElement.Kind.ADVICE); if (ad.kind == AdviceKind.Around) { node.setReturnType(ad.returnTypeToString(0)); } + String details = ""; if (ad.pointcutDesignator != null) { if (ad.pointcutDesignator.getPointcut() instanceof ReferencePointcut) { ReferencePointcut rp = (ReferencePointcut)ad.pointcutDesignator.getPointcut(); - label += rp.name + ".."; + details += rp.name + ".."; } else if (ad.pointcutDesignator.getPointcut() instanceof AndPointcut) { AndPointcut ap = (AndPointcut)ad.pointcutDesignator.getPointcut(); if (ap.getLeft() instanceof ReferencePointcut) { - label += ap.getLeft().toString() + ".."; + details += ap.getLeft().toString() + ".."; } else { - label += POINTCUT_ANONYMOUS + ".."; + details += POINTCUT_ANONYMOUS + ".."; } } else if (ad.pointcutDesignator.getPointcut() instanceof OrPointcut) { OrPointcut op = (OrPointcut)ad.pointcutDesignator.getPointcut(); if (op.getLeft() instanceof ReferencePointcut) { - label += op.getLeft().toString() + ".."; + details += op.getLeft().toString() + ".."; } else { - label += POINTCUT_ANONYMOUS + ".."; + details += POINTCUT_ANONYMOUS + ".."; } } else { - label += POINTCUT_ANONYMOUS; + details += POINTCUT_ANONYMOUS; } } else { - label += POINTCUT_ABSTRACT; + details += POINTCUT_ABSTRACT; } - node.setName(label); + node.setName(ad.kind.toString()); + node.setDetails(details); + setParameters(methodDeclaration, node); } else if (methodDeclaration instanceof PointcutDeclaration) { PointcutDeclaration pd = (PointcutDeclaration)methodDeclaration; - node.setKind( IProgramElement.Kind.POINTCUT); - String label = translatePointcutName(new String(methodDeclaration.selector)); - label += "(" + genArguments(pd) + ")"; - node.setName(label); + node.setKind(IProgramElement.Kind.POINTCUT); + node.setName(translatePointcutName(new String(methodDeclaration.selector))); + setParameters(methodDeclaration, node); } else if (methodDeclaration instanceof DeclareDeclaration) { DeclareDeclaration declare = (DeclareDeclaration)methodDeclaration; - String label = DEC_LABEL + " "; + String name = DEC_LABEL + " "; if (declare.declare instanceof DeclareErrorOrWarning) { DeclareErrorOrWarning deow = (DeclareErrorOrWarning)declare.declare; if (deow.isError()) { node.setKind( IProgramElement.Kind.DECLARE_ERROR); - label += DECLARE_ERROR; + name += DECLARE_ERROR; } else { node.setKind( IProgramElement.Kind.DECLARE_WARNING); - label += DECLARE_WARNING; + name += DECLARE_WARNING; } - node.setName(label + "\"" + genDeclareMessage(deow.getMessage()) + "\"") ; - + node.setName(name) ; + node.setDetails("\"" + genDeclareMessage(deow.getMessage()) + "\""); + } else if (declare.declare instanceof DeclareParents) { node.setKind( IProgramElement.Kind.DECLARE_PARENTS); DeclareParents dp = (DeclareParents)declare.declare; - node.setName(label + DECLARE_PARENTS + genTypePatternLabel(dp.getChild())); + node.setName(name + DECLARE_PARENTS); + node.setDetails(genTypePatternLabel(dp.getChild())); } else if (declare.declare instanceof DeclareSoft) { node.setKind( IProgramElement.Kind.DECLARE_SOFT); DeclareSoft ds = (DeclareSoft)declare.declare; - node.setName(label + DECLARE_SOFT + genTypePatternLabel(ds.getException())); + node.setName(name + DECLARE_SOFT); + node.setDetails(genTypePatternLabel(ds.getException())); + } else if (declare.declare instanceof DeclarePrecedence) { node.setKind( IProgramElement.Kind.DECLARE_PRECEDENCE); DeclarePrecedence ds = (DeclarePrecedence)declare.declare; - node.setName(label + DECLARE_PRECEDENCE + genPrecedenceListLabel(ds.getPatterns())); + node.setName(name + DECLARE_PRECEDENCE); + node.setDetails(genPrecedenceListLabel(ds.getPatterns())); + + } else { - node.setKind( IProgramElement.Kind.ERROR); + node.setKind(IProgramElement.Kind.ERROR); node.setName(DECLARE_UNKNONWN); } } else if (methodDeclaration instanceof InterTypeDeclaration) { InterTypeDeclaration itd = (InterTypeDeclaration)methodDeclaration; - String label = itd.onType.toString() + "." + new String(itd.getDeclaredSelector()); + String name = itd.onType.toString() + "." + new String(itd.getDeclaredSelector()); if (methodDeclaration instanceof InterTypeFieldDeclaration) { node.setKind(IProgramElement.Kind.INTER_TYPE_FIELD); } else if (methodDeclaration instanceof InterTypeMethodDeclaration) { node.setKind(IProgramElement.Kind.INTER_TYPE_METHOD); - InterTypeMethodDeclaration itmd = (InterTypeMethodDeclaration)methodDeclaration; - label += "(" + genArguments(itd) + ")"; + InterTypeMethodDeclaration itmd = (InterTypeMethodDeclaration)methodDeclaration; } else if (methodDeclaration instanceof InterTypeConstructorDeclaration) { node.setKind(IProgramElement.Kind.INTER_TYPE_CONSTRUCTOR); InterTypeConstructorDeclaration itcd = (InterTypeConstructorDeclaration)methodDeclaration; } else { node.setKind(IProgramElement.Kind.ERROR); } - node.setName(label); + node.setName(name); node.setReturnType(itd.returnType.toString()); - - } else { + if (node.getKind() != IProgramElement.Kind.INTER_TYPE_FIELD) { + setParameters(methodDeclaration, node); + } + } else { if (methodDeclaration.isConstructor()) { node.setKind(IProgramElement.Kind.CONSTRUCTOR); } else { node.setKind(IProgramElement.Kind.METHOD); } String label = new String(methodDeclaration.selector); - label += "(" + genArguments(methodDeclaration) + ")"; node.setName(label); + setParameters(methodDeclaration, node); } } @@ -149,26 +157,49 @@ public class AsmNodeFormatter { return tpList; } - private String genArguments(MethodDeclaration md) { - String args = ""; +// private String genArguments(MethodDeclaration md) { +// String args = ""; +// Argument[] argArray = md.arguments; +// if (argArray == null) return args; +// for (int i = 0; i < argArray.length; i++) { +// String argName = new String(argArray[i].name); +// String argType = argArray[i].type.toString(); +// if (acceptArgument(argName, argType)) { +// args += argType + ", "; +// } +// } +// int lastSepIndex = args.lastIndexOf(','); +// if (lastSepIndex != -1 && args.endsWith(", ")) args = args.substring(0, lastSepIndex); +// return args; +// } + + private void setParameters(MethodDeclaration md, IProgramElement pe) { Argument[] argArray = md.arguments; - if (argArray == null) return args; + List names = new ArrayList(); + List types = new ArrayList(); + pe.setParameterNames(names); + pe.setParameterTypes(types); + + if (argArray == null) return; for (int i = 0; i < argArray.length; i++) { String argName = new String(argArray[i].name); String argType = argArray[i].type.toString(); -// TODO: fix this way of determing ajc-added arguments, make subtype of Argument with extra info - if (!argName.startsWith("ajc$this_") - && !argType.equals("org.aspectj.lang.JoinPoint.StaticPart") - && !argType.equals("org.aspectj.lang.JoinPoint") - && !argType.equals("org.aspectj.runtime.internal.AroundClosure")) { - args += argType + ", "; - } + if (acceptArgument(argName, argType)) { + names.add(argName); + types.add(argType); + } } - int lastSepIndex = args.lastIndexOf(','); - if (lastSepIndex != -1 && args.endsWith(", ")) args = args.substring(0, lastSepIndex); - return args; } + // TODO: fix this way of determing ajc-added arguments, make subtype of Argument with extra info + private boolean acceptArgument(String name, String type) { + return !name.startsWith("ajc$this_") + && !type.equals("org.aspectj.lang.JoinPoint.StaticPart") + && !type.equals("org.aspectj.lang.JoinPoint") + && !type.equals("org.aspectj.runtime.internal.AroundClosure"); + } + + public String genTypePatternLabel(TypePattern tp) { final String TYPE_PATTERN_LITERAL = "<type pattern>"; String label; diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmHierarchyBuilder.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmHierarchyBuilder.java index c159919d5..d044ab0fb 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmHierarchyBuilder.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmHierarchyBuilder.java @@ -19,6 +19,7 @@ import java.util.*; import org.aspectj.ajdt.internal.compiler.ast.AspectDeclaration; import org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory; import org.aspectj.asm.*; +import org.aspectj.asm.internal.*; import org.aspectj.asm.internal.ProgramElement; import org.aspectj.bridge.*; import org.aspectj.util.LangUtil; @@ -32,14 +33,14 @@ public class AsmHierarchyBuilder extends AbstractSyntaxTreeVisitorAdapter { public static void build( CompilationUnitDeclaration unit, - AspectJModel structureModel) { + IHierarchy structureModel) { LangUtil.throwIaxIfNull(unit, "unit"); new AsmHierarchyBuilder(unit.compilationResult()).internalBuild(unit, structureModel); } private final Stack stack; private final CompilationResult currCompilationResult; - private AsmNodeFormatter formatter = new AsmNodeFormatter(); + private AsmElementFormatter formatter = new AsmElementFormatter(); protected AsmHierarchyBuilder(CompilationResult result) { LangUtil.throwIaxIfNull(result, "result"); @@ -53,7 +54,7 @@ public class AsmHierarchyBuilder extends AbstractSyntaxTreeVisitorAdapter { */ private void internalBuild( CompilationUnitDeclaration unit, - AspectJModel structureModel) { + IHierarchy structureModel) { LangUtil.throwIaxIfNull(structureModel, "structureModel"); if (!currCompilationResult.equals(unit.compilationResult())) { throw new IllegalArgumentException("invalid unit: " + unit); @@ -112,11 +113,11 @@ public class AsmHierarchyBuilder extends AbstractSyntaxTreeVisitorAdapter { } /** - * Get/create teh node (package or root) to add to. + * Get/create the node (package or root) to add to. */ private IProgramElement genAddToNode( CompilationUnitDeclaration unit, - AspectJModel structureModel) { + IHierarchy structureModel) { final IProgramElement addToNode; { ImportReference currentPackage = unit.currentPackage; @@ -174,8 +175,6 @@ public class AsmHierarchyBuilder extends AbstractSyntaxTreeVisitorAdapter { typeDeclaration.modifiers, "", new ArrayList()); -// peNode.setFullSignature(typeDeclaration.()); - ((IProgramElement)stack.peek()).addChild(peNode); stack.push(peNode); return true; @@ -201,8 +200,6 @@ public class AsmHierarchyBuilder extends AbstractSyntaxTreeVisitorAdapter { "", new ArrayList()); - peNode.setFullSignature(memberTypeDeclaration.toString()); - ((IProgramElement)stack.peek()).addChild(peNode); stack.push(peNode); return true; @@ -265,7 +262,7 @@ public class AsmHierarchyBuilder extends AbstractSyntaxTreeVisitorAdapter { return (IProgramElement)stack.peek(); } - public boolean visit(MethodDeclaration methodDeclaration, ClassScope scope) { + public boolean visit(MethodDeclaration methodDeclaration, ClassScope scope) { IProgramElement peNode = new ProgramElement( "", IProgramElement.Kind.ERROR, @@ -280,7 +277,7 @@ public class AsmHierarchyBuilder extends AbstractSyntaxTreeVisitorAdapter { // TODO: add return type test if (peNode.getKind().equals(IProgramElement.Kind.METHOD)) { - if (peNode.getName().equals("main(String[])") + if (peNode.toLabelString().equals("main(String[])") && peNode.getModifiers().contains(IProgramElement.Modifiers.STATIC) && peNode.getAccessibility().equals(IProgramElement.Accessibility.PUBLIC)) { ((IProgramElement)stack.peek()).setRunnable(true); 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 93e1bd5fe..4188adeb4 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 (!AsmManager.getDefault().getModel().isValid()) return; + if (!AsmManager.getDefault().getHierarchy().isValid()) return; try { //Set fileSet = StructureModelManager.INSTANCE.getStructureModel().getFileMap().entrySet(); - Set fileSet = AsmManager.getDefault().getModel().getFileMapEntrySet(); + Set fileSet = AsmManager.getDefault().getHierarchy().getFileMapEntrySet(); for (Iterator it = fileSet.iterator(); it.hasNext(); ) { IProgramElement peNode = (IProgramElement)((Map.Entry)it.next()).getValue(); dumpStructureToFile(peNode); |