You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by Matteo Alessandroni <sk...@apache.org> on 2018/11/27 11:14:15 UTC

Add compilation classpath support to groovy classes created from a Netbeans plugin

Hi,

we have a Netbeans plugin [1] for our application that mainly allows you to create a ".groovy" script on the fly that will be placed under the system temp folder.
The problem we have is that, when the groovy class is created, Netbeans does not recognize imports and code autocompletion is not available.

Any idea on how to set a specific classpath to the plugin source code (we know what dependencies to add but don't know where to put them in order to let groovy scripts see them) so that Netbeans will recognize related imports and so code autocompletion will be available?

Best regards,
Matteo

[1] https://github.com/apache/syncope/tree/2_1_X/ide/netbeans

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.incubator.apache.org
For additional commands, e-mail: dev-help@netbeans.incubator.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: Add compilation classpath support to groovy classes created from a Netbeans plugin

Posted by Matteo Alessandroni <sk...@apache.org>.
Just to add another thing I discovered.
Netbeans correctly resolves imports like:

import java.util.List

although the groovy file is in the system temp folder, but fails in resolving all others e.g.

import groovy.transform.CompileStatic
import org.apache.syncope.core.persistence.api.dao.Reportlet
import org.xml.sax.SAXException
import java.util.concurrent.atomic.AtomicReference

On 2018/11/27 11:14:15, Matteo Alessandroni <sk...@apache.org> wrote: 
> Hi,
> 
> we have a Netbeans plugin [1] for our application that mainly allows you to create a ".groovy" script on the fly that will be placed under the system temp folder.
> The problem we have is that, when the groovy class is created, Netbeans does not recognize imports and code autocompletion is not available.
> 
> Any idea on how to set a specific classpath to the plugin source code (we know what dependencies to add but don't know where to put them in order to let groovy scripts see them) so that Netbeans will recognize related imports and so code autocompletion will be available?
> 
> Best regards,
> Matteo
> 
> [1] https://github.com/apache/syncope/tree/2_1_X/ide/netbeans
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@netbeans.incubator.apache.org
> For additional commands, e-mail: dev-help@netbeans.incubator.apache.org
> 
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> 
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.incubator.apache.org
For additional commands, e-mail: dev-help@netbeans.incubator.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists