Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Bridge between internal and external representation
Bridge between internal and external representation [message #253261] Mon, 12 May 2008 02:58
Eclipse UserFriend
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
Previous Topic:iTextViewer
Next Topic:createMethod issue
Goto Forum:
  


Current Time: Thu Jul 10 03:56:08 EDT 2025

Powered by FUDForum. Page generated in 0.27289 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top