Loading

Tag Archives: module

JUnit and Netbeans. Injecting in objects in the default Lookup

If you need to unit test classes in a netbeans module and the classes use the Lookup.getDefault() to “lookup” things that you want to mock you probably wonder how you can place the mock objects in the default Lookup Adding objects to the Netbeans’s default Lookup is relatively simple. Here is the answer: Replace the [...]

CGLib, NetBeans Modules and class loaders

My first try at using CGLib from a Netbeans RCP ended up in a ClassNotFoundException for net.sf.cglib.proxy.Factory I had two modules, MainModule and cglib and MainModule was depending on cglib. And the following snippet was raising the ClassNotFoundException. Enhancer enhancer = new Enhancer(); enhancer.setSuperclass(Graph.class); enhancer.setCallback(NoOp.INSTANCE); Graph g = (Graph) enhancer.create(new Class[]{FrameListener.class,InterpreterAbstraction.class},new Object[]{fl,ia}) ; As I [...]

Opening Favorites window at startup in a Netbeans Platform Application

After learning about the Favorites window in the NetBeans Platform Quick Start. I wanted to use it in an application of my own. This easy task became more difficult that I though because I was getting random results, sometimes after a clean build I got the Favorites window open and sometimes not. But let’s start [...]

Attach source code to a Netbeans Library Wrapper Module

I´m new in NetBeans and today I´ve been struggling a couple of hours with the simple task of attaching the source code for an external JAR (NetBean Library Wrapper Module). I´ve been trying to find in google how to do it without success until I reached this post in the netbeans-users mailing list. Then I [...]