01: /* This file is *not* under GPL or any other public license
02: * Copyright 2005 Ugo Taddei
03: */
04: package de.latlon.deejump.plugin.manager;
05:
06: import com.vividsolutions.jump.I18N;
07: import com.vividsolutions.jump.task.TaskMonitor;
08: import com.vividsolutions.jump.workbench.plugin.PlugInContext;
09: import com.vividsolutions.jump.workbench.plugin.ThreadedBasePlugIn;
10: import com.vividsolutions.jump.workbench.ui.MenuNames;
11:
12: public class ExtensionManagerPlugIn extends ThreadedBasePlugIn {
13:
14: private ExtensionManagerDialog managerDialog;
15:
16: public ExtensionManagerPlugIn() {
17: //nuffin to do
18: }
19:
20: public String getName() {
21: return I18N
22: .get("deejump.pluging.manager.ExtensionManagerDialog.Extension-Manager");
23: }
24:
25: public boolean execute(PlugInContext context) throws Exception {
26: if (managerDialog == null) {
27: managerDialog = new ExtensionManagerDialog(context
28: .getWorkbenchFrame(),
29: context.getWorkbenchContext(),
30: "http://jump-pilot.sourceforge.net/download/"
31: //"file:///e:/proj/openjump/plugins/"
32: );
33: }
34:
35: managerDialog.setVisible(true);
36:
37: return managerDialog.isOkClicked();
38: }
39:
40: public void run(TaskMonitor monitor, PlugInContext context)
41: throws Exception {
42: managerDialog.updateExtensions(monitor);
43: context
44: .getWorkbenchFrame()
45: .setStatusMessage(
46: I18N
47: .get("deejump.pluging.manager.ExtensionManagerPlugIn.Plug-ins-will-only-be-removed-after-next-start"));
48: }
49:
50: public void install(PlugInContext context) {
51: context.getFeatureInstaller().addMainMenuItem(
52: // [Michael Michaud 2007-03-23] Change MenuNames.TOOLS to MenuNames.CUSTOMIZE
53: this , MenuNames.CUSTOMIZE, this .getName(), null, null);
54: }
55:
56: /**
57: * @param args
58: */
59: public static void main(String[] args) {
60: // TODO Auto-generated method stub
61:
62: }
63:
64: }
|