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 User
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: Thu Oct 02 00:36:15 GMT 2014

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

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