if (node == IHierarchy.NO_STRUCTURE) {
return null;
} else {
- IProgramElement fileNode = (IProgramElement)node;
+ IProgramElement fileNode = node;
ArrayList peNodes = new ArrayList();
getAllStructureChildren(fileNode, peNodes, showSubMember, showMemberAndType);
for (Iterator it = peNodes.iterator(); it.hasNext(); ) {
&& rels.size() > 0) {
result.add(next);
}
- getAllStructureChildren((IProgramElement)next, result, showSubMember, showMemberAndType);
+ getAllStructureChildren(next, result, showSubMember, showMemberAndType);
}
}
removeNode(progElem);
deletedNodes.add(getCanonicalFilePath(progElem.getSourceLocation().getSourceFile()));
if (!model.removeFromFileMap(correctedPath))
- throw new RuntimeException("Whilst repairing model, couldn't remove entry for file: "+correctedPath.toString()+" from the filemap");
+ throw new RuntimeException("Whilst repairing model, couldn't remove entry for file: "+correctedPath+" from the filemap");
modelModified = true;
}
}
return modelModified;
}
- private void flushModelCache() {
- IHierarchy model = AsmManager.getDefault().getHierarchy();
- model.flushTypeMap();
- }
-
// This code is *SLOW* but it isnt worth fixing until we address the
// bugs in binary weaving.
public void fixupStructureModel(Writer fw,List filesToBeCompiled,Set files_added,Set files_deleted) throws IOException {
removeNode(progElem);
deletedNodes.add(getCanonicalFilePath(progElem.getSourceLocation().getSourceFile()));
if (!model.removeFromFileMap(correctedPath))
- throw new RuntimeException("Whilst repairing model, couldn't remove entry for file: "+correctedPath.toString()+" from the filemap");
+ throw new RuntimeException("Whilst repairing model, couldn't remove entry for file: "+correctedPath+" from the filemap");
modelModified = true;
}
}
long stime = System.currentTimeMillis();
- boolean modificationOccurred = false;
-
//fixupStructureModel(fw,filesToBeCompiled,files_added,files_deleted);
// Let's remove all the files that are deleted on this compile
- modificationOccurred =
- removeStructureModelForFiles(fw,files_deleted) |
- modificationOccurred;
+ removeStructureModelForFiles(fw,files_deleted);
long etime1 = System.currentTimeMillis(); // etime1-stime = time to fix up the model
repairRelationships(fw);
long etime2 = System.currentTimeMillis(); // etime2-stime = time to repair the relationship map
- modificationOccurred =
- removeStructureModelForFiles(fw,files_tobecompiled) |
- modificationOccurred;
-
+ removeStructureModelForFiles(fw,files_tobecompiled);
+
if (dumpDeltaProcessing) {
fw.write("===== Delta Processing timing ==========\n");
fw.write("Hierarchy="+(etime1-stime)+"ms Relationshipmap="+(etime2-etime1)+"ms\n");
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
-import java.util.LinkedList;
import java.util.List;
import java.util.Map;
public static boolean shortITDNames = true;
private final static String UNDEFINED = "<undefined>";
- private static int AccPublic = 0x0001;
- private static int AccPrivate = 0x0002;
- private static int AccProtected = 0x0004;
- private static int AccPrivileged = 0x0006; // XXX is this right?
- private static int AccStatic = 0x0008;
- private static int AccFinal = 0x0010;
- private static int AccSynchronized = 0x0020;
- private static int AccVolatile = 0x0040;
- private static int AccTransient = 0x0080;
- private static int AccNative = 0x0100;
- private static int AccInterface = 0x0200;
- private static int AccAbstract = 0x0400;
- private static int AccStrictfp = 0x0800;
+ private final static int AccPublic = 0x0001;
+ private final static int AccPrivate = 0x0002;
+ private final static int AccProtected = 0x0004;
+ private final static int AccPrivileged = 0x0006; // XXX is this right?
+ private final static int AccStatic = 0x0008;
+ private final static int AccFinal = 0x0010;
+ private final static int AccSynchronized = 0x0020;
+ private final static int AccVolatile = 0x0040;
+ private final static int AccTransient = 0x0080;
+ private final static int AccNative = 0x0100;
+ private final static int AccInterface = 0x0200;
+ private final static int AccAbstract = 0x0400;
+ private final static int AccStrictfp = 0x0800;
protected String name;
private Kind kind;
if (getParent() == null) {
return "";
}
- return ((IProgramElement)getParent()).getPackageName();
+ return getParent().getPackageName();
}
public Kind getKind() {
}
}
- /** AMC added to speed up findByHandle lookups in AspectJElementHierarchy */
- private void cacheByHandle() {
- String handle = getHandleIdentifier();
- if (handle != null) {
- AspectJElementHierarchy hierarchy = (AspectJElementHierarchy)
- AsmManager.getDefault().getHierarchy();
- hierarchy.cache(handle,this);
- //System.err.println("Cache size now "+hierarchy.handleMap.size());
- }
- }
-
public void setExtraInfo(ExtraInformation info) {
if (kvpairs==Collections.EMPTY_MAP) kvpairs = new HashMap();
kvpairs.put("ExtraInformation",info);