KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > loadgenerator > Installer


1 package org.netbeans.modules.loadgenerator;
2
3 import org.netbeans.modules.loadgenerator.nodes.ManagerNode;
4 import org.netbeans.modules.loadgenerator.spi.Engine;
5 import org.openide.modules.ModuleInstall;
6 import org.openide.util.Lookup;
7
8 /**
9  * Manages a module's lifecycle. Remember that an installer is optional and
10  * often not needed at all.
11  */

12 public class Installer extends ModuleInstall {
13   @Override JavaDoc
14   public void restored() {
15     // By default, do nothing.
16
// Put your startup code here.
17
ManagerNode.getInstance().setEngineLookup(Lookup.getDefault().lookupResult(Engine.class));
18   }
19   
20   @Override JavaDoc
21   public void uninstalled() {
22     ManagerNode.getInstance().setEngineLookup(null);
23   }
24 }
25
Popular Tags