diff --git a/Core/build.xml b/Core/build.xml index 2d313a2de7..9a3fe484fe 100644 --- a/Core/build.xml +++ b/Core/build.xml @@ -8,9 +8,7 @@ - - - + diff --git a/Core/manifest.mf b/Core/manifest.mf index 10bd758bba..3a50c0d8a7 100644 --- a/Core/manifest.mf +++ b/Core/manifest.mf @@ -3,7 +3,7 @@ OpenIDE-Module: org.sleuthkit.autopsy.core/10 OpenIDE-Module-Localizing-Bundle: org/sleuthkit/autopsy/core/Bundle.properties OpenIDE-Module-Layer: org/sleuthkit/autopsy/core/layer.xml OpenIDE-Module-Implementation-Version: 12 -OpenIDE-Module-Requires: org.openide.windows.WindowManager, org.netbeans.api.javahelp.Help +OpenIDE-Module-Requires: org.openide.windows.WindowManager AutoUpdate-Show-In-Client: true AutoUpdate-Essential-Module: true OpenIDE-Module-Install: org/sleuthkit/autopsy/core/Installer.class diff --git a/Core/nbproject/project.xml b/Core/nbproject/project.xml index 178e1bd134..84f8bba38a 100644 --- a/Core/nbproject/project.xml +++ b/Core/nbproject/project.xml @@ -24,15 +24,6 @@ - - org.netbeans.modules.javahelp - - - - 1 - 2.27.1 - - org.netbeans.modules.options.api diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle.properties b/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle.properties index a595cbc1e5..be35962d76 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle.properties @@ -27,6 +27,8 @@ Format_OperatingSystem_Value={0} version {1} running on {2} LBL_Copyright=
Autopsy™ is a digital forensics platform based on The Sleuth Kit™ and other tools.
Copyright © 2003-2014.
URL_ON_IMG=http://www.sleuthkit.org/ +URL_ON_HELP=http://sleuthkit.org/autopsy/docs/user-docs/3.1/ + LBL_Close=Close DataContentViewerString.copyMenuItem.text=Copy DataContentViewerHex.copyMenuItem.text=Copy diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/OnlineHelpAction.java b/Core/src/org/sleuthkit/autopsy/corecomponents/OnlineHelpAction.java new file mode 100644 index 0000000000..1e28c815a2 --- /dev/null +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/OnlineHelpAction.java @@ -0,0 +1,97 @@ +/* + * Autopsy Forensic Browser + * + * Copyright 2011-2014 Basis Technology Corp. + * Contact: carrier sleuthkit org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.sleuthkit.autopsy.corecomponents; + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.Desktop; +import java.io.IOException; +import java.net.MalformedURLException; +import java.net.URISyntaxException; +import java.net.URI; +import org.netbeans.core.actions.HTMLViewAction; +import org.openide.awt.ActionID; +import org.openide.awt.ActionReference; +import org.openide.awt.ActionReferences; +import org.openide.awt.ActionRegistration; +import org.openide.awt.HtmlBrowser; +import org.openide.util.NbBundle; +import org.openide.util.NbBundle.Messages; + +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * Implements a hyperlink to the Online Documentation. + */ +@ActionID( + category = "Help", + id = "org.sleuthkit.autopsy.corecomponents.OnlineHelpAction" +) +@ActionRegistration( + displayName = "#CTL_OnlineHelpAction" +) +@ActionReferences({ + @ActionReference(path = "Menu/Help", position = 0), + @ActionReference(path = "Shortcuts", name = "F1") +}) +@Messages("CTL_OnlineHelpAction=Online Documentation") +public final class OnlineHelpAction implements ActionListener { + + private URI uri; + private static final Logger Logger = org.sleuthkit.autopsy.coreutils.Logger.getLogger(AboutWindowPanel.class.getName()); + + @Override + public void actionPerformed(ActionEvent e) { + // TODO implement action body + viewOnlineHelp(); + } + + /** + * Displays the Online Documentation in the system browser. If not + * available, displays it in the built-in OpenIDE HTML Browser. + */ + private void viewOnlineHelp() { + try { + uri = new URI(NbBundle.getMessage(OnlineHelpAction.class, "URL_ON_HELP")); + } catch (URISyntaxException ex) { + Logger.log(Level.SEVERE, "Unable to load Online Documentation", ex); + } + if (uri != null) { + // Display URL in the SYstem browser + if (Desktop.isDesktopSupported()) { + Desktop desktop = Desktop.getDesktop(); + try { + desktop.browse(uri); + } catch (IOException ex) { + // TODO Auto-generated catch block + Logger.log(Level.SEVERE, "Unable to launch the system browser", ex); + } + } else { + org.openide.awt.StatusDisplayer.getDefault().setStatusText(NbBundle.getMessage(HTMLViewAction.class, "CTL_OpeningBrowser")); //NON-NLS + try { + HtmlBrowser.URLDisplayer.getDefault().showURL(uri.toURL()); + } catch (MalformedURLException ex) { + Logger.log(Level.SEVERE, "Unable to launch the built-in browser", ex); + } + } + } + } + +} diff --git a/KeywordSearch/nbproject/project.xml b/KeywordSearch/nbproject/project.xml index 74e14747a0..6a540e5835 100644 --- a/KeywordSearch/nbproject/project.xml +++ b/KeywordSearch/nbproject/project.xml @@ -15,15 +15,6 @@ 1.24.1
- - org.netbeans.modules.javahelp - - - - 1 - 2.22.1 - - org.netbeans.modules.options.api