diff options
author | Tomas O'Connor <toconnor@openoffice.org> | 2003-02-20 10:57:46 +0000 |
---|---|---|
committer | Tomas O'Connor <toconnor@openoffice.org> | 2003-02-20 10:57:46 +0000 |
commit | 013cda233528efc96e5e3063e58d15a2878c062d (patch) | |
tree | 6f48918f72911ac5b58fdb19ead91e77825c0c71 /scripting/java/org/openoffice/netbeans/modules/office/utils/OfficeModule.java | |
parent | 4ca28fe7d6c60d36f0b72db690577319100a50cc (diff) |
IssueZilla 10661 - Pop up dialog requesting Office installation path on first execution of the module.
Diffstat (limited to 'scripting/java/org/openoffice/netbeans/modules/office/utils/OfficeModule.java')
-rw-r--r-- | scripting/java/org/openoffice/netbeans/modules/office/utils/OfficeModule.java | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/scripting/java/org/openoffice/netbeans/modules/office/utils/OfficeModule.java b/scripting/java/org/openoffice/netbeans/modules/office/utils/OfficeModule.java index 3373d20ae6ec..23dbab79204d 100644 --- a/scripting/java/org/openoffice/netbeans/modules/office/utils/OfficeModule.java +++ b/scripting/java/org/openoffice/netbeans/modules/office/utils/OfficeModule.java @@ -2,9 +2,9 @@ * * $RCSfile: OfficeModule.java,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: toconnor $ $Date: 2003-01-28 20:52:35 $ + * last change: $Author: toconnor $ $Date: 2003-02-20 11:57:46 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -61,14 +61,37 @@ package org.openoffice.netbeans.modules.office.utils; +import org.openide.TopManager; +import org.openide.WizardDescriptor; +import org.openide.NotifyDescriptor; import org.openide.modules.ModuleInstall; + +import org.openoffice.idesupport.OfficeInstallation; import org.openoffice.idesupport.xml.XMLParserFactory; +import org.openoffice.netbeans.modules.office.wizard.InstallationPathDescriptor; +import org.openoffice.netbeans.modules.office.options.OfficeSettings; public class OfficeModule extends ModuleInstall { private static final long serialVersionUID = -8499324854301243852L; + public void installed () { + WizardDescriptor wiz = new InstallationPathDescriptor(); + TopManager.getDefault().createDialog(wiz).show(); + + if(wiz.getValue() == NotifyDescriptor.OK_OPTION) { + OfficeInstallation oi = (OfficeInstallation) + wiz.getProperty(InstallationPathDescriptor.PROP_INSTALLPATH); + + OfficeSettings settings = OfficeSettings.getDefault(); + settings.setOfficeDirectory(oi); + } + FrameworkJarChecker.mountDependencies(); + XMLParserFactory.setParser(ManifestParser.getManifestParser()); + } + public void restored () { + FrameworkJarChecker.mountDependencies(); XMLParserFactory.setParser(ManifestParser.getManifestParser()); } |