* @deprecated use getDefault() method instead
*/
private static AsmManager INSTANCE = new AsmManager();
+
+
private IElementHandleProvider handleProvider;
- private boolean shouldSaveModel = true;
- protected IHierarchy hierarchy;
private List structureListeners = new ArrayList();
+ private boolean shouldSaveModel = true;
+
+
+ public void setRelationshipMap(IRelationshipMap irm) { mapper = irm;}
+ public void setHierarchy(IHierarchy ih) { hierarchy=ih;}
+
+ // The model is 'manipulated' by the AjBuildManager.setupModel() code which trashes all the
+ // fields when setting up a new model for a batch build.
+ // Due to the requirements of incremental compilation we need to tie some of the info
+ // below to the AjState for a compilation and recover it if switching between projects.
+ protected IHierarchy hierarchy;
private IRelationshipMap mapper;
- private static boolean creatingModel = false;
-
- public static boolean dumpModelPostBuild = false; // Dumping the model is expensive
- public static boolean attemptIncrementalModelRepairs = false;
-// for debugging ...
+ private static boolean creatingModel = false;
+ public static boolean dumpModelPostBuild = false; // Dumping the model is expensive
+ // SECRETAPI asc pull the secret options together into a system API you lazy fool
+ public static boolean attemptIncrementalModelRepairs = false;
// For offline debugging, you can now ask for the AsmManager to
// dump the model - see the method setReporting()
mapper = new RelationshipMap(hierarchy);
handleProvider = new FullPathHandleProvider();
}
+
+ public void createNewASM() {
+ hierarchy = new AspectJElementHierarchy();
+ mapper = new RelationshipMap(hierarchy);
+ }
+
+
public IHierarchy getHierarchy() {
return hierarchy;
}
}
- public static void setReporting(String filename,boolean dModel,boolean dRels,boolean dDeltaProcessing,boolean deletefile) {
+ // SECRETAPI
+ public static void setReporting(String filename,boolean dModel,boolean dRels,boolean dDeltaProcessing,
+ boolean deletefile) {
reporting = true;
dumpModel = dModel;
dumpRelationships = dRels;
}
}
+ public static void dumptree(IProgramElement node,int indent) throws IOException {
+ for (int i =0 ;i<indent;i++) System.out.print(" ");
+ String loc = "";
+ if (node!=null) {
+ if (node.getSourceLocation()!=null)
+ loc = node.getSourceLocation().toString();
+ }
+ System.out.println(node+" ["+(node==null?"null":node.getKind().toString())+"] "+loc);
+ if (node!=null)
+ for (Iterator i = node.getChildren().iterator();i.hasNext();) {
+ dumptree((IProgramElement)i.next(),indent+2);
+ }
+ }
+
private void dumprels(Writer w) throws IOException {
IRelationshipMap irm = AsmManager.getDefault().getRelationshipMap();
int ctr = 1;
*/
public static boolean isCreatingModel() { return creatingModel;}
-
}