Bridge between internal and external representation [message #253261] |
Mon, 12 May 2008 02:58 |
Eclipse User |
|
|
|
Hi there,
I have a list of internal AbstractMethodDeclarations and need to find the
one that corresponds to a given ..dom.MethodDeclaration. My approach is to
convert the AbstractMethodDeclaration from the internal package to
a MethodDeclaration. I tried to use the ASTConverter
for this, but failed with a NullPointerException because the source is not
set. Can someone give me some hints on how to use the ASTConverter?
Or does anyone have a better idea than converting?
Here's what I've tried:
ASTConverter converter = new AjASTConverterFactory().getASTConverter(new
HashMap(), false, null);
converter.setAST(ASTParser.getAST(AST.JLS3));
MethodDeclaration m = (MethodDeclaration) converter.convert(abstractM);
Thanks
Martin
|
|
|
Powered by
FUDForum. Page generated in 0.27289 seconds