Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » add import to a groovy file from an eclipse plugin
add import to a groovy file from an eclipse plugin [message #816685] Fri, 09 March 2012 06:16
Eclipse UserFriend
Hi,

I want to add some import statements in a groovy class via my plugin.
I m trying to do

compilationUnit.createImport(type.getFullyQualifiedName(), null, null);

where type is what i want to import. I get a null pointer exception. I
am using the same code for a Java class and it works.
Can somebody suggest me what could be wrong.

Thanks in advance!!

Regards,
Krishnaveni.S
Previous Topic:Can't get Eclipse to start
Next Topic:get compilation unit object for php
Goto Forum:
  


Current Time: Tue Mar 19 08:20:07 GMT 2024

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

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

Back to the top