Author: agomes Date: Fri Nov 17 22:30:29 2017 New Revision: 1815635 URL: http://svn.apache.org/viewvc?rev=1815635&view=rev Log: Bug 61774 - Add a link to help menu to create an issue (it open the browser with the link to issues)
Added: jmeter/trunk/src/core/org/apache/jmeter/gui/action/LinkBugTracker.java Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/action/ActionNames.java jmeter/trunk/src/core/org/apache/jmeter/gui/util/JMeterMenuBar.java jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties jmeter/trunk/xdocs/changes.xml Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/action/ActionNames.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/action/ActionNames.java?rev=1815635&r1=1815634&r2=1815635&view=diff ============================================================================== --- jmeter/trunk/src/core/org/apache/jmeter/gui/action/ActionNames.java (original) +++ jmeter/trunk/src/core/org/apache/jmeter/gui/action/ActionNames.java Fri Nov 17 22:30:29 2017 @@ -60,6 +60,7 @@ public final class ActionNames { public static final String HELP = "help"; // $NON-NLS-1$ public static final String HEAP_DUMP = "heap_dump"; // $NON-NLS-1$ public static final String LAF_PREFIX = "laf:"; // Look and Feel prefix + public static final String LINK_BUG_TRACKER = "link_bug_tracker:"; // URI of bug tracker public static final String LOGGER_PANEL_ENABLE_DISABLE = "logger_panel_enable_disable"; // $NON-NLS-1$ public static final String LOG_LEVEL_PREFIX = "loglevel:"; // Logger level prefix public static final String MERGE = "merge"; // $NON-NLS-1$ Added: jmeter/trunk/src/core/org/apache/jmeter/gui/action/LinkBugTracker.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/action/LinkBugTracker.java?rev=1815635&view=auto ============================================================================== --- jmeter/trunk/src/core/org/apache/jmeter/gui/action/LinkBugTracker.java (added) +++ jmeter/trunk/src/core/org/apache/jmeter/gui/action/LinkBugTracker.java Fri Nov 17 22:30:29 2017 @@ -0,0 +1,61 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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.apache.jmeter.gui.action; + +import java.awt.event.ActionEvent; +import java.io.IOException; +import java.util.HashSet; +import java.util.Set; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class LinkBugTracker extends AbstractAction { + private static final Logger log = LoggerFactory.getLogger(LinkBugTracker.class); + + private static final Set<String> commands = new HashSet<>(); + + static { + commands.add(ActionNames.LINK_BUG_TRACKER); + } + + @Override + public Set<String> getActionNames() { + return commands; + } + + /** + * @see org.apache.jmeter.gui.action.Command#doAction(ActionEvent) + */ + @Override + public void doAction(ActionEvent e) { + String url = "http://jmeter.apache.org/issues.html"; + try { + java.awt.Desktop.getDesktop().browse(java.net.URI.create(url)); + } catch (IOException err) { + log.error("LinkBugTracker: User default browser is not found, or it fails to be launched, or the default handler application failed to be launched on {}", err); + } catch (UnsupportedOperationException err) { + log.error("LinkBugTracker: Current platform does not support the Desktop.Action.BROWSE actionon {}", err); + } catch (SecurityException err) { + log.error("LinkBugTracker: Security problem on {}", err); + } catch (Exception err) { + log.error("LinkBugTracker on {}", err); + } + } +} Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/util/JMeterMenuBar.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/util/JMeterMenuBar.java?rev=1815635&r1=1815634&r2=1815635&view=diff ============================================================================== --- jmeter/trunk/src/core/org/apache/jmeter/gui/util/JMeterMenuBar.java (original) +++ jmeter/trunk/src/core/org/apache/jmeter/gui/util/JMeterMenuBar.java Fri Nov 17 22:30:29 2017 @@ -301,6 +301,8 @@ public class JMeterMenuBar extends JMenu JMenuItem heapDump = makeMenuItemRes("heap_dump", ActionNames.HEAP_DUMP);//$NON-NLS-1$ JMenuItem threadDump = makeMenuItemRes("thread_dump", ActionNames.THREAD_DUMP);//$NON-NLS-1$ + + JMenuItem linkBugTracker = makeMenuItemRes("link_bug_tracker", ActionNames.LINK_BUG_TRACKER);//$NON-NLS-1$ helpAbout = makeMenuItemRes("about", 'A', ActionNames.ABOUT); //$NON-NLS-1$ @@ -315,6 +317,8 @@ public class JMeterMenuBar extends JMenu addPluginsMenuItems(helpMenu, menuCreators, MENU_LOCATION.HELP); helpMenu.addSeparator(); + helpMenu.add(linkBugTracker); + helpMenu.addSeparator(); helpMenu.add(helpAbout); } Modified: jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties?rev=1815635&r1=1815634&r2=1815635&view=diff ============================================================================== --- jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties (original) +++ jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties Fri Nov 17 22:30:29 2017 @@ -605,6 +605,7 @@ ldap_testing_title=LDAP Request ldapext_sample_title=LDAP Extended Request Defaults ldapext_testing_title=LDAP Extended Request library=Library +link_bug_tracker=Create an issue load=Load locale_format=String format of a locale (ex\: fr_FR , en_EN) (optional) log_errors_only=Errors Modified: jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties?rev=1815635&r1=1815634&r2=1815635&view=diff ============================================================================== --- jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties (original) +++ jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties Fri Nov 17 22:30:29 2017 @@ -595,6 +595,7 @@ ldap_testing_title=Requ\u00EAte LDAP ldapext_sample_title=Requ\u00EAte LDAP \u00E9tendue par d\u00E9faut ldapext_testing_title=Requ\u00EAte LDAP \u00E9tendue library=Librairie +link_bug_tracker=Cr\u00E9er un ticket load=Charger locale_format=Text representant la langue et le pays (ex\: fr_FR , en_EN) (optionnel) log_errors_only=Erreurs Modified: jmeter/trunk/xdocs/changes.xml URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1815635&r1=1815634&r2=1815635&view=diff ============================================================================== --- jmeter/trunk/xdocs/changes.xml [utf-8] (original) +++ jmeter/trunk/xdocs/changes.xml [utf-8] Fri Nov 17 22:30:29 2017 @@ -164,6 +164,7 @@ Summary <li><bug>61704</bug>Toolbar : Improve a bit the right part</li> <li><bug>61731</bug>Enhance Test plan Backup with option to save before run. Based on a contribution by orimarko at gmail.com</li> <li><bug>61640</bug>JSR223 Test Elements : Enable by default caching. Contributed by Ubik Load Pack (support at ubikloadpack.com)</li> + <li><bug>61774</bug>Add a link to help menu to create an issue (it open the browser with the link to issues)</li> </ul> <ch_section>Non-functional changes</ch_section>