[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-dev] [ajdt AST manipulation]

Hello everyone,

I´m seeking for a way to manipulate the AST elements of the AJDT. How
can I do this? Is there any API for this purpose, because I didn´t
find?
And the most important, how can I do to get the AST from an open .aj
file within the Eclipse? I know how to get the AST DOM from an open
.java file in JDT. I suppose that it would be possible for the ajdt.
  
  I used something as:
  IWorkbenchPage iWorkbenchPage = window.getActivePage();
  IEditorPart iEditorPart = iWorkbenchPage.getActiveEditor();
  IEditorInput editorInput = iEditorPart.getEditorInput();
  IWorkingCopyManager copyManager = JavaUI.getWorkingCopyManager();
  ICompilationUnit iCU = copyManager.getWorkingCopy(editorInput);
  //Finally, I got the CompilationUnit from the ICU

Best regards,

Alex