You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by Keith Lancaster <kl...@swbell.net> on 2003/12/15 21:43:51 UTC
[PATCH] Display current filename in title bar
All,
This is my first time to request a patch, so please let me know if this
is the correct method for this group. I will be happy to enter this as
an enh request if that would be preferred.
When working with JMeter, I have found that I can easily lose track of
the exact name and location of the current file. This patch displays the
current filename in the application titlebar in the following format:
"FileName ( <full path to file name> ) - Apache JMeter"
This is similar to the format used by Open Office and other common
applications. In addition, this patch changes the names of some of the
commands related to saving to make them more consistent. While strictly
speaking these changes were not necessary, they should make maintenance
easier by using the terms "save", "save as", and "save_all_as"
consistently. The function which builds the title was placed in
JMeterUtils so that it may be reused, rather than embedding the code in
the Save command.
Thanks for your time,
Keith Lancaster
Index: core/org/apache/jmeter/gui/action/ExitCommand.java
===================================================================
RCS file:
/home/cvspublic/jakarta-jmeter/src/core/org/apache/jmeter/gui/action/ExitCommand.java,v
retrieving revision 1.9
diff -u -r1.9 ExitCommand.java
--- core/org/apache/jmeter/gui/action/ExitCommand.java 19 Oct 2003
22:26:08 -0000 1.9
+++ core/org/apache/jmeter/gui/action/ExitCommand.java 15 Dec 2003
20:28:39 -0000
@@ -118,7 +118,7 @@
else if (chosenOption == JOptionPane.YES_OPTION)
{
ActionRouter.getInstance().doActionNow(
- new ActionEvent(e.getSource(), e.getID(),
Save.SAVE_ALL));
+ new ActionEvent(e.getSource(), e.getID(), Save.SAVE));
if (!GuiPackage.getInstance().isDirty())
{
System.exit(0);
Index: core/org/apache/jmeter/gui/action/Save.java
===================================================================
RCS file:
/home/cvspublic/jakarta-jmeter/src/core/org/apache/jmeter/gui/action/Save.java,v
retrieving revision 1.17
diff -u -r1.17 Save.java
--- core/org/apache/jmeter/gui/action/Save.java 19 Oct 2003 22:26:08
-0000 1.17
+++ core/org/apache/jmeter/gui/action/Save.java 15 Dec 2003 20:28:40
-0000
@@ -75,7 +75,7 @@
import org.apache.jorphan.collections.ListedHashTree;
import org.apache.jorphan.logging.LoggingManager;
import org.apache.log.Logger;
-
+import org.apache.jmeter.util.JMeterUtils;
/**
* @author Michael Stover
* Created February 13, 2001
@@ -84,17 +84,16 @@
public class Save implements Command
{
transient private static Logger log =
LoggingManager.getLoggerForClass();
- public final static String SAVE_ALL = "save_all";
- public final static String SAVE = "save_as";
- public final static String SAVE_TO_PREVIOUS = "save";
- private String chosenFile;
+ public final static String SAVE_ALL_AS = "save_all_as";
+ public final static String SAVE_AS = "save_as";
+ public final static String SAVE = "save";
private String testPlanFile;
private static Set commands = new HashSet();
static {
commands.add(SAVE);
- commands.add(SAVE_ALL);
- commands.add(SAVE_TO_PREVIOUS);
+ commands.add(SAVE_AS);
+ commands.add(SAVE_ALL_AS);
}
/**
@@ -117,23 +116,27 @@
public void setTestPlanFile(String f)
{
testPlanFile = f;
+
GuiPackage.getInstance().getMainFrame().setTitle(JMeterUtils.getExtendedFrameTitle(testPlanFile));
}
public void doAction(ActionEvent e) throws IllegalUserActionException
{
HashTree subTree = null;
- if (e.getActionCommand().equals(SAVE))
+ if (!commands.contains(e.getActionCommand()))
+ {
+ throw new IllegalUserActionException("Invalid user
command:" + e.getActionCommand());
+ }
+ if (e.getActionCommand().equals(SAVE_AS))
{
subTree = GuiPackage.getInstance().getCurrentSubTree();
}
- else if (
- e.getActionCommand().equals(SAVE_ALL)
- || e.getActionCommand().equals(SAVE_TO_PREVIOUS))
+ else
{
subTree =
GuiPackage.getInstance().getTreeModel().getTestPlan();
}
- if (!SAVE_TO_PREVIOUS.equals(e.getActionCommand())
+ String updateFile = testPlanFile;
+ if (!SAVE.equals(e.getActionCommand())
|| testPlanFile == null)
{
JFileChooser chooser =
@@ -148,22 +151,14 @@
{
return;
}
- if (e.getActionCommand().equals(SAVE_ALL)
- || e.getActionCommand().equals(SAVE_TO_PREVIOUS))
- {
- testPlanFile = chooser.getSelectedFile().getAbsolutePath();
- chosenFile = testPlanFile;
- }
- else
+ updateFile = chooser.getSelectedFile().getAbsolutePath();
+ if (!e.getActionCommand().equals(SAVE_AS))
{
- chosenFile = chooser.getSelectedFile().getAbsolutePath();
+ testPlanFile = updateFile;
}
}
- else
- {
- chosenFile = testPlanFile;
- }
-
+ // TODO: doesn't putting this here mark the tree as
+ // saved even though a failure may occur later?
ActionRouter.getInstance().doActionNow(
new ActionEvent(subTree, e.getID(),
CheckDirty.SUB_TREE_SAVED));
try
@@ -176,7 +171,7 @@
OutputStream writer = null;
try
{
- writer = new FileOutputStream(chosenFile);
+ writer = new FileOutputStream(updateFile);
SaveService.saveSubTree(subTree, writer);
}
catch (Throwable ex)
@@ -184,11 +179,15 @@
testPlanFile = null;
log.error("", ex);
throw new IllegalUserActionException(
- "Couldn't save test plan to file: " + chosenFile);
+ "Couldn't save test plan to file: " + updateFile);
}
finally
{
closeWriter(writer);
+ if(testPlanFile != null)
+ {
+
GuiPackage.getInstance().getMainFrame().setTitle(JMeterUtils.getExtendedFrameTitle(testPlanFile));
+ }
GuiPackage.getInstance().getMainFrame().repaint();
}
}
Index: core/org/apache/jmeter/gui/util/JMeterMenuBar.java
===================================================================
RCS file:
/home/cvspublic/jakarta-jmeter/src/core/org/apache/jmeter/gui/util/JMeterMenuBar.java,v
retrieving revision 1.18
diff -u -r1.18 JMeterMenuBar.java
--- core/org/apache/jmeter/gui/util/JMeterMenuBar.java 19 Oct 2003
22:26:08 -0000 1.18
+++ core/org/apache/jmeter/gui/util/JMeterMenuBar.java 15 Dec 2003
20:28:41 -0000
@@ -85,7 +85,7 @@
{
transient private static Logger log =
LoggingManager.getLoggerForClass();
JMenu fileMenu;
- JMenuItem file_save_all;
+ JMenuItem file_save_as;
JMenuItem file_load;
JMenuItem file_exit;
JMenuItem file_new;
@@ -132,7 +132,7 @@
public void setFileSaveEnabled(boolean enabled)
{
- file_save_all.setEnabled(enabled);
+ file_save_as.setEnabled(enabled);
}
public void setFileLoadEnabled(boolean enabled)
@@ -239,7 +239,7 @@
*/
public void createMenuBar()
{
- createFileMenu();
+ makeFileMenu();
makeEditMenu();
makeRunMenu();
makeOptionsMenu();
@@ -422,26 +422,26 @@
editMenu.setEnabled(false);
}
- private void createFileMenu()
+ private void makeFileMenu()
{
// FILE MENU
fileMenu = new JMenu(JMeterUtils.getResString("file"));
fileMenu.setMnemonic('F');
JMenuItem file_save =
- new JMenuItem(JMeterUtils.getResString("save_all"), 'S');
+ new JMenuItem(JMeterUtils.getResString("save"), 'S');
file_save.setAccelerator(
KeyStroke.getKeyStroke(KeyEvent.VK_S, KeyEvent.CTRL_MASK));
file_save.setActionCommand("save");
file_save.addActionListener(ActionRouter.getInstance());
file_save.setEnabled(true);
- file_save_all =
+ file_save_as =
new JMenuItem(JMeterUtils.getResString("save_all_as"), 'A');
- file_save_all.setAccelerator(
+ file_save_as.setAccelerator(
KeyStroke.getKeyStroke(KeyEvent.VK_A, KeyEvent.CTRL_MASK));
- file_save_all.setActionCommand("save_all");
- file_save_all.addActionListener(ActionRouter.getInstance());
- file_save_all.setEnabled(true);
+ file_save_as.setActionCommand("save_all_as");
+ file_save_as.addActionListener(ActionRouter.getInstance());
+ file_save_as.setEnabled(true);
file_load = new JMenuItem(JMeterUtils.getResString("open"), 'O');
file_load.setAccelerator(
KeyStroke.getKeyStroke(KeyEvent.VK_O, KeyEvent.CTRL_MASK));
@@ -463,7 +463,7 @@
fileMenu.add(file_new);
fileMenu.add(file_load);
fileMenu.add(file_save);
- fileMenu.add(file_save_all);
+ fileMenu.add(file_save_as);
fileMenu.addSeparator();
fileMenu.add(file_exit);
}
Index: core/org/apache/jmeter/gui/util/MenuFactory.java
===================================================================
RCS file:
/home/cvspublic/jakarta-jmeter/src/core/org/apache/jmeter/gui/util/MenuFactory.java,v
retrieving revision 1.22
diff -u -r1.22 MenuFactory.java
--- core/org/apache/jmeter/gui/util/MenuFactory.java 5 Oct 2003
01:05:31 -0000 1.22
+++ core/org/apache/jmeter/gui/util/MenuFactory.java 15 Dec 2003
20:28:43 -0000
@@ -195,7 +195,7 @@
menu.add(
makeMenuItem(JMeterUtils.getResString("open"), "Open",
"open"));
menu.add(
- makeMenuItem(JMeterUtils.getResString("save"), "Save",
"save_as"));
+ makeMenuItem(JMeterUtils.getResString("save_as"), "Save
As", "save_as"));
JMenuItem disabled =
makeMenuItem(
JMeterUtils.getResString("disable"),
Index: core/org/apache/jmeter/resources/messages.properties
===================================================================
RCS file:
/home/cvspublic/jakarta-jmeter/src/core/org/apache/jmeter/resources/messages.properties,v
retrieving revision 1.77
diff -u -r1.77 messages.properties
--- core/org/apache/jmeter/resources/messages.properties 9 Dec 2003
14:53:37 -0000 1.77
+++ core/org/apache/jmeter/resources/messages.properties 15 Dec 2003
20:28:44 -0000
@@ -326,8 +326,8 @@
sampler_on_error_stop_thread=Stop Thread
save?=Save?
save_all_as=Save Test Plan as
-save_all=Save Test Plan
-save=Save As...
+save=Save Test Plan
+save_as=Save As...
scheduler_configuration=Scheduler Configuration
scheduler=Scheduler
search_base=Search base
Index: core/org/apache/jmeter/resources/messages_de.properties
===================================================================
RCS file:
/home/cvspublic/jakarta-jmeter/src/core/org/apache/jmeter/resources/messages_de.properties,v
retrieving revision 1.64
diff -u -r1.64 messages_de.properties
--- core/org/apache/jmeter/resources/messages_de.properties 9 Dec
2003 14:53:37 -0000 1.64
+++ core/org/apache/jmeter/resources/messages_de.properties 15 Dec
2003 20:28:46 -0000
@@ -326,8 +326,8 @@
sampler_on_error_stop_thread=Stop Thread
save?=Speichern?
save_all_as=Speichern Test Plan unter
-save_all=Speichern Test Plan
-save=Speichern unter
+save=Speichern Test Plan
+save_as=Speichern unter
scheduler_configuration=Scheduler Configuration
scheduler=Scheduler
search_base=Search base
Index: core/org/apache/jmeter/resources/messages_ja.properties
===================================================================
RCS file:
/home/cvspublic/jakarta-jmeter/src/core/org/apache/jmeter/resources/messages_ja.properties,v
retrieving revision 1.61
diff -u -r1.61 messages_ja.properties
--- core/org/apache/jmeter/resources/messages_ja.properties 9 Dec
2003 14:53:37 -0000 1.61
+++ core/org/apache/jmeter/resources/messages_ja.properties 15 Dec
2003 20:28:48 -0000
@@ -326,8 +326,8 @@
sampler_on_error_stop_thread=Stop Thread
save?=\u4fdd\u5b58?
save_all_as=\u30c6\u30b9\u30c8\u8a08\u753b\u306b\u540d\u524d\u3092\u3064\u3051\u3066\u4fdd\u5b58
-save_all=\u30c6\u30b9\u30c8\u8a08\u753b\u3092\u4fdd\u5b58
-save=\u5225\u540d\u3067\u4fdd\u5b58...
+save=\u30c6\u30b9\u30c8\u8a08\u753b\u3092\u4fdd\u5b58
+save_as=\u5225\u540d\u3067\u4fdd\u5b58...
scheduler_configuration=\u30b9\u30b1\u30b8\u30e5\u30fc\u30e9\u8a2d\u5b9a
scheduler=\u30b9\u30b1\u30b8\u30e5\u30fc\u30e9
search_base=\u691c\u7d22\u57fa\u6e96
Index: core/org/apache/jmeter/resources/messages_no.properties
===================================================================
RCS file:
/home/cvspublic/jakarta-jmeter/src/core/org/apache/jmeter/resources/messages_no.properties,v
retrieving revision 1.60
diff -u -r1.60 messages_no.properties
--- core/org/apache/jmeter/resources/messages_no.properties 9 Dec
2003 14:53:37 -0000 1.60
+++ core/org/apache/jmeter/resources/messages_no.properties 15 Dec
2003 20:28:50 -0000
@@ -326,8 +326,8 @@
sampler_on_error_stop_thread=Stop Thread
save?=Save?
save_all_as=Lagre alle som...
-save_all=Lagre alle
-save=Lagre som...
+save=Lagre alle
+save_as=Lagre som...
scheduler_configuration=Scheduler Configuration
scheduler=Scheduler
search_base=Search base
Index: core/org/apache/jmeter/util/JMeterUtils.java
===================================================================
RCS file:
/home/cvspublic/jakarta-jmeter/src/core/org/apache/jmeter/util/JMeterUtils.java,v
retrieving revision 1.55
diff -u -r1.55 JMeterUtils.java
--- core/org/apache/jmeter/util/JMeterUtils.java 13 Dec 2003 02:16:32
-0000 1.55
+++ core/org/apache/jmeter/util/JMeterUtils.java 15 Dec 2003 20:28:53
-0000
@@ -1075,4 +1075,25 @@
{
return JMeterVersion.VERSION;
}
+
+ /**
+ * Builds the string used as the main frame title
+ * @param the fully qualified name of the current working file
+ * @return a string of the form "FileName (<full path>/FileName) -
Apache JMeter".
+ * If fname is null, returns "Apache JMeter".
+ */
+ public static String getExtendedFrameTitle(String fname)
+ {
+ // file New operation may set to null, so just return
+ // app name
+ if (fname == null)
+ {
+ return "Apache JMeter";
+ }
+
+ // allow for windows / chars in filename
+ String temp = fname.replace('\\','/');
+ String simpleName = temp.substring(temp.lastIndexOf("/") + 1);
+ return simpleName + " (" + fname + ") - Apache JMeter";
+ }
}
Index: core/org/apache/jmeter/util/JMeterVersion.java
===================================================================
RCS file:
/home/cvspublic/jakarta-jmeter/src/core/org/apache/jmeter/util/JMeterVersion.java,v
retrieving revision 1.6
diff -u -r1.6 JMeterVersion.java
--- core/org/apache/jmeter/util/JMeterVersion.java 9 Dec 2003
23:16:50 -0000 1.6
+++ core/org/apache/jmeter/util/JMeterVersion.java 15 Dec 2003
20:28:53 -0000
@@ -24,7 +24,9 @@
* pattern: VERSION = <quote>.*<quote>
*
*/
- static final String VERSION = "1.9.20031207";
+
+ static final String VERSION = "1.9.20031215";
+
private JMeterVersion() // Not instantiable
{
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
Re: [PATCH] Display current filename in title bar
Posted by Jordi Salvat i Alabart <js...@atg.com>.
I'm taking the task of applying this one.
En/na Keith Lancaster ha escrit:
> All,
> This is my first time to request a patch, so please let me know if this
> is the correct method for this group. I will be happy to enter this as
> an enh request if that would be preferred.
>
> When working with JMeter, I have found that I can easily lose track of
> the exact name and location of the current file. This patch displays the
> current filename in the application titlebar in the following format:
> "FileName ( <full path to file name> ) - Apache JMeter"
>
> This is similar to the format used by Open Office and other common
> applications. In addition, this patch changes the names of some of the
> commands related to saving to make them more consistent. While strictly
> speaking these changes were not necessary, they should make maintenance
> easier by using the terms "save", "save as", and "save_all_as"
> consistently. The function which builds the title was placed in
> JMeterUtils so that it may be reused, rather than embedding the code in
> the Save command.
>
> Thanks for your time,
> Keith Lancaster
>
> Index: core/org/apache/jmeter/gui/action/ExitCommand.java
> ===================================================================
> RCS file:
> /home/cvspublic/jakarta-jmeter/src/core/org/apache/jmeter/gui/action/ExitCommand.java,v
>
> retrieving revision 1.9
> diff -u -r1.9 ExitCommand.java
> --- core/org/apache/jmeter/gui/action/ExitCommand.java 19 Oct 2003
> 22:26:08 -0000 1.9
> +++ core/org/apache/jmeter/gui/action/ExitCommand.java 15 Dec 2003
> 20:28:39 -0000
> @@ -118,7 +118,7 @@
> else if (chosenOption == JOptionPane.YES_OPTION)
> {
> ActionRouter.getInstance().doActionNow(
> - new ActionEvent(e.getSource(), e.getID(),
> Save.SAVE_ALL));
> + new ActionEvent(e.getSource(), e.getID(), Save.SAVE));
> if (!GuiPackage.getInstance().isDirty())
> {
> System.exit(0);
> Index: core/org/apache/jmeter/gui/action/Save.java
> ===================================================================
> RCS file:
> /home/cvspublic/jakarta-jmeter/src/core/org/apache/jmeter/gui/action/Save.java,v
>
> retrieving revision 1.17
> diff -u -r1.17 Save.java
> --- core/org/apache/jmeter/gui/action/Save.java 19 Oct 2003 22:26:08
> -0000 1.17
> +++ core/org/apache/jmeter/gui/action/Save.java 15 Dec 2003 20:28:40
> -0000
> @@ -75,7 +75,7 @@
> import org.apache.jorphan.collections.ListedHashTree;
> import org.apache.jorphan.logging.LoggingManager;
> import org.apache.log.Logger;
> -
> +import org.apache.jmeter.util.JMeterUtils;
> /**
> * @author Michael Stover
> * Created February 13, 2001
> @@ -84,17 +84,16 @@
> public class Save implements Command
> {
> transient private static Logger log =
> LoggingManager.getLoggerForClass();
> - public final static String SAVE_ALL = "save_all";
> - public final static String SAVE = "save_as";
> - public final static String SAVE_TO_PREVIOUS = "save";
> - private String chosenFile;
> + public final static String SAVE_ALL_AS = "save_all_as";
> + public final static String SAVE_AS = "save_as";
> + public final static String SAVE = "save";
> private String testPlanFile;
>
> private static Set commands = new HashSet();
> static {
> commands.add(SAVE);
> - commands.add(SAVE_ALL);
> - commands.add(SAVE_TO_PREVIOUS);
> + commands.add(SAVE_AS);
> + commands.add(SAVE_ALL_AS);
> }
>
> /**
> @@ -117,23 +116,27 @@
> public void setTestPlanFile(String f)
> {
> testPlanFile = f;
> +
> GuiPackage.getInstance().getMainFrame().setTitle(JMeterUtils.getExtendedFrameTitle(testPlanFile));
>
> }
>
> public void doAction(ActionEvent e) throws IllegalUserActionException
> {
> HashTree subTree = null;
> - if (e.getActionCommand().equals(SAVE))
> + if (!commands.contains(e.getActionCommand()))
> + {
> + throw new IllegalUserActionException("Invalid user
> command:" + e.getActionCommand());
> + }
> + if (e.getActionCommand().equals(SAVE_AS))
> {
> subTree = GuiPackage.getInstance().getCurrentSubTree();
> }
> - else if (
> - e.getActionCommand().equals(SAVE_ALL)
> - || e.getActionCommand().equals(SAVE_TO_PREVIOUS))
> + else
> {
> subTree =
> GuiPackage.getInstance().getTreeModel().getTestPlan();
> }
>
> - if (!SAVE_TO_PREVIOUS.equals(e.getActionCommand())
> + String updateFile = testPlanFile;
> + if (!SAVE.equals(e.getActionCommand())
> || testPlanFile == null)
> {
> JFileChooser chooser =
> @@ -148,22 +151,14 @@
> {
> return;
> }
> - if (e.getActionCommand().equals(SAVE_ALL)
> - || e.getActionCommand().equals(SAVE_TO_PREVIOUS))
> - {
> - testPlanFile =
> chooser.getSelectedFile().getAbsolutePath();
> - chosenFile = testPlanFile;
> - }
> - else
> + updateFile = chooser.getSelectedFile().getAbsolutePath();
> + if (!e.getActionCommand().equals(SAVE_AS))
> {
> - chosenFile = chooser.getSelectedFile().getAbsolutePath();
> + testPlanFile = updateFile;
> }
> }
> - else
> - {
> - chosenFile = testPlanFile;
> - }
> -
> + // TODO: doesn't putting this here mark the tree as
> + // saved even though a failure may occur later?
> ActionRouter.getInstance().doActionNow(
> new ActionEvent(subTree, e.getID(),
> CheckDirty.SUB_TREE_SAVED));
> try
> @@ -176,7 +171,7 @@
> OutputStream writer = null;
> try
> {
> - writer = new FileOutputStream(chosenFile);
> + writer = new FileOutputStream(updateFile);
> SaveService.saveSubTree(subTree, writer);
> }
> catch (Throwable ex)
> @@ -184,11 +179,15 @@
> testPlanFile = null;
> log.error("", ex);
> throw new IllegalUserActionException(
> - "Couldn't save test plan to file: " + chosenFile);
> + "Couldn't save test plan to file: " + updateFile);
> }
> finally
> {
> closeWriter(writer);
> + if(testPlanFile != null)
> + {
> +
> GuiPackage.getInstance().getMainFrame().setTitle(JMeterUtils.getExtendedFrameTitle(testPlanFile));
>
> + }
> GuiPackage.getInstance().getMainFrame().repaint();
> }
> }
> Index: core/org/apache/jmeter/gui/util/JMeterMenuBar.java
> ===================================================================
> RCS file:
> /home/cvspublic/jakarta-jmeter/src/core/org/apache/jmeter/gui/util/JMeterMenuBar.java,v
>
> retrieving revision 1.18
> diff -u -r1.18 JMeterMenuBar.java
> --- core/org/apache/jmeter/gui/util/JMeterMenuBar.java 19 Oct 2003
> 22:26:08 -0000 1.18
> +++ core/org/apache/jmeter/gui/util/JMeterMenuBar.java 15 Dec 2003
> 20:28:41 -0000
> @@ -85,7 +85,7 @@
> {
> transient private static Logger log =
> LoggingManager.getLoggerForClass();
> JMenu fileMenu;
> - JMenuItem file_save_all;
> + JMenuItem file_save_as;
> JMenuItem file_load;
> JMenuItem file_exit;
> JMenuItem file_new;
> @@ -132,7 +132,7 @@
>
> public void setFileSaveEnabled(boolean enabled)
> {
> - file_save_all.setEnabled(enabled);
> + file_save_as.setEnabled(enabled);
> }
>
> public void setFileLoadEnabled(boolean enabled)
> @@ -239,7 +239,7 @@
> */
> public void createMenuBar()
> {
> - createFileMenu();
> + makeFileMenu();
> makeEditMenu();
> makeRunMenu();
> makeOptionsMenu();
> @@ -422,26 +422,26 @@
> editMenu.setEnabled(false);
> }
> - private void createFileMenu()
> + private void makeFileMenu()
> {
> // FILE MENU
> fileMenu = new JMenu(JMeterUtils.getResString("file"));
> fileMenu.setMnemonic('F');
> JMenuItem file_save =
> - new JMenuItem(JMeterUtils.getResString("save_all"), 'S');
> + new JMenuItem(JMeterUtils.getResString("save"), 'S');
> file_save.setAccelerator(
> KeyStroke.getKeyStroke(KeyEvent.VK_S, KeyEvent.CTRL_MASK));
> file_save.setActionCommand("save");
> file_save.addActionListener(ActionRouter.getInstance());
> file_save.setEnabled(true);
>
> - file_save_all =
> + file_save_as =
> new JMenuItem(JMeterUtils.getResString("save_all_as"), 'A');
> - file_save_all.setAccelerator(
> + file_save_as.setAccelerator(
> KeyStroke.getKeyStroke(KeyEvent.VK_A, KeyEvent.CTRL_MASK));
> - file_save_all.setActionCommand("save_all");
> - file_save_all.addActionListener(ActionRouter.getInstance());
> - file_save_all.setEnabled(true);
> + file_save_as.setActionCommand("save_all_as");
> + file_save_as.addActionListener(ActionRouter.getInstance());
> + file_save_as.setEnabled(true);
> file_load = new JMenuItem(JMeterUtils.getResString("open"), 'O');
> file_load.setAccelerator(
> KeyStroke.getKeyStroke(KeyEvent.VK_O, KeyEvent.CTRL_MASK));
> @@ -463,7 +463,7 @@
> fileMenu.add(file_new);
> fileMenu.add(file_load);
> fileMenu.add(file_save);
> - fileMenu.add(file_save_all);
> + fileMenu.add(file_save_as);
> fileMenu.addSeparator();
> fileMenu.add(file_exit);
> }
> Index: core/org/apache/jmeter/gui/util/MenuFactory.java
> ===================================================================
> RCS file:
> /home/cvspublic/jakarta-jmeter/src/core/org/apache/jmeter/gui/util/MenuFactory.java,v
>
> retrieving revision 1.22
> diff -u -r1.22 MenuFactory.java
> --- core/org/apache/jmeter/gui/util/MenuFactory.java 5 Oct 2003
> 01:05:31 -0000 1.22
> +++ core/org/apache/jmeter/gui/util/MenuFactory.java 15 Dec 2003
> 20:28:43 -0000
> @@ -195,7 +195,7 @@
> menu.add(
> makeMenuItem(JMeterUtils.getResString("open"), "Open",
> "open"));
> menu.add(
> - makeMenuItem(JMeterUtils.getResString("save"), "Save",
> "save_as"));
> + makeMenuItem(JMeterUtils.getResString("save_as"), "Save
> As", "save_as"));
> JMenuItem disabled =
> makeMenuItem(
> JMeterUtils.getResString("disable"),
> Index: core/org/apache/jmeter/resources/messages.properties
> ===================================================================
> RCS file:
> /home/cvspublic/jakarta-jmeter/src/core/org/apache/jmeter/resources/messages.properties,v
>
> retrieving revision 1.77
> diff -u -r1.77 messages.properties
> --- core/org/apache/jmeter/resources/messages.properties 9 Dec 2003
> 14:53:37 -0000 1.77
> +++ core/org/apache/jmeter/resources/messages.properties 15 Dec 2003
> 20:28:44 -0000
> @@ -326,8 +326,8 @@
> sampler_on_error_stop_thread=Stop Thread
> save?=Save?
> save_all_as=Save Test Plan as
> -save_all=Save Test Plan
> -save=Save As...
> +save=Save Test Plan
> +save_as=Save As...
> scheduler_configuration=Scheduler Configuration
> scheduler=Scheduler
> search_base=Search base
> Index: core/org/apache/jmeter/resources/messages_de.properties
> ===================================================================
> RCS file:
> /home/cvspublic/jakarta-jmeter/src/core/org/apache/jmeter/resources/messages_de.properties,v
>
> retrieving revision 1.64
> diff -u -r1.64 messages_de.properties
> --- core/org/apache/jmeter/resources/messages_de.properties 9 Dec
> 2003 14:53:37 -0000 1.64
> +++ core/org/apache/jmeter/resources/messages_de.properties 15 Dec
> 2003 20:28:46 -0000
> @@ -326,8 +326,8 @@
> sampler_on_error_stop_thread=Stop Thread
> save?=Speichern?
> save_all_as=Speichern Test Plan unter
> -save_all=Speichern Test Plan
> -save=Speichern unter
> +save=Speichern Test Plan
> +save_as=Speichern unter
> scheduler_configuration=Scheduler Configuration
> scheduler=Scheduler
> search_base=Search base
> Index: core/org/apache/jmeter/resources/messages_ja.properties
> ===================================================================
> RCS file:
> /home/cvspublic/jakarta-jmeter/src/core/org/apache/jmeter/resources/messages_ja.properties,v
>
> retrieving revision 1.61
> diff -u -r1.61 messages_ja.properties
> --- core/org/apache/jmeter/resources/messages_ja.properties 9 Dec
> 2003 14:53:37 -0000 1.61
> +++ core/org/apache/jmeter/resources/messages_ja.properties 15 Dec
> 2003 20:28:48 -0000
> @@ -326,8 +326,8 @@
> sampler_on_error_stop_thread=Stop Thread
> save?=\u4fdd\u5b58?
> save_all_as=\u30c6\u30b9\u30c8\u8a08\u753b\u306b\u540d\u524d\u3092\u3064\u3051\u3066\u4fdd\u5b58
>
> -save_all=\u30c6\u30b9\u30c8\u8a08\u753b\u3092\u4fdd\u5b58
> -save=\u5225\u540d\u3067\u4fdd\u5b58...
> +save=\u30c6\u30b9\u30c8\u8a08\u753b\u3092\u4fdd\u5b58
> +save_as=\u5225\u540d\u3067\u4fdd\u5b58...
> scheduler_configuration=\u30b9\u30b1\u30b8\u30e5\u30fc\u30e9\u8a2d\u5b9a
> scheduler=\u30b9\u30b1\u30b8\u30e5\u30fc\u30e9
> search_base=\u691c\u7d22\u57fa\u6e96
> Index: core/org/apache/jmeter/resources/messages_no.properties
> ===================================================================
> RCS file:
> /home/cvspublic/jakarta-jmeter/src/core/org/apache/jmeter/resources/messages_no.properties,v
>
> retrieving revision 1.60
> diff -u -r1.60 messages_no.properties
> --- core/org/apache/jmeter/resources/messages_no.properties 9 Dec
> 2003 14:53:37 -0000 1.60
> +++ core/org/apache/jmeter/resources/messages_no.properties 15 Dec
> 2003 20:28:50 -0000
> @@ -326,8 +326,8 @@
> sampler_on_error_stop_thread=Stop Thread
> save?=Save?
> save_all_as=Lagre alle som...
> -save_all=Lagre alle
> -save=Lagre som...
> +save=Lagre alle
> +save_as=Lagre som...
> scheduler_configuration=Scheduler Configuration
> scheduler=Scheduler
> search_base=Search base
> Index: core/org/apache/jmeter/util/JMeterUtils.java
> ===================================================================
> RCS file:
> /home/cvspublic/jakarta-jmeter/src/core/org/apache/jmeter/util/JMeterUtils.java,v
>
> retrieving revision 1.55
> diff -u -r1.55 JMeterUtils.java
> --- core/org/apache/jmeter/util/JMeterUtils.java 13 Dec 2003 02:16:32
> -0000 1.55
> +++ core/org/apache/jmeter/util/JMeterUtils.java 15 Dec 2003 20:28:53
> -0000
> @@ -1075,4 +1075,25 @@
> {
> return JMeterVersion.VERSION;
> }
> +
> + /**
> + * Builds the string used as the main frame title
> + * @param the fully qualified name of the current working file
> + * @return a string of the form "FileName (<full path>/FileName) -
> Apache JMeter".
> + * If fname is null, returns "Apache JMeter".
> + */ + public static String getExtendedFrameTitle(String fname)
> + {
> + // file New operation may set to null, so just return
> + // app name
> + if (fname == null)
> + {
> + return "Apache JMeter";
> + }
> +
> + // allow for windows / chars in filename
> + String temp = fname.replace('\\','/');
> + String simpleName = temp.substring(temp.lastIndexOf("/") + 1);
> + return simpleName + " (" + fname + ") - Apache JMeter";
> + }
> }
> Index: core/org/apache/jmeter/util/JMeterVersion.java
> ===================================================================
> RCS file:
> /home/cvspublic/jakarta-jmeter/src/core/org/apache/jmeter/util/JMeterVersion.java,v
>
> retrieving revision 1.6
> diff -u -r1.6 JMeterVersion.java
> --- core/org/apache/jmeter/util/JMeterVersion.java 9 Dec 2003
> 23:16:50 -0000 1.6
> +++ core/org/apache/jmeter/util/JMeterVersion.java 15 Dec 2003
> 20:28:53 -0000
> @@ -24,7 +24,9 @@
> * pattern: VERSION = <quote>.*<quote>
> *
> */
> - static final String VERSION = "1.9.20031207";
> +
> + static final String VERSION = "1.9.20031215";
> +
>
> private JMeterVersion() // Not instantiable
> {
>
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
Re: [PATCH] Display current filename in title bar
Posted by Jordi Salvat i Alabart <js...@atg.com>.
May have been my fault. I'm used to diff/patch, but I was using Eclipse,
which is new to me. I'll try harder next time.
Anyway, it wasn't that long, and doing it manually helps careful review.
--
Salut,
Jordi.
En/na Keith Lancaster ha escrit:
> Jordi,
> Interesting. I synced up to cvs right before doing the diff by doing cvs
> update. Maybe I did something wrong...I've worked with quite a number of
> CM systems, but am relatively new to CVS. Sorry you had to do the work
> manually.
> Thanks,
> Keith
>
> Jordi Salvat i Alabart wrote:
>
>> Hi Keith,
>>
>> your patch worked flawlessly (as far as I tested it) on the first
>> shot, although it was not trivial to apply it -- had to do most by
>> hand. Maybe you didn't work from the latest CVS code? You're welcome
>> to use that as the base for your next contribution -- but please don't
>> stop your patches comming for this reason: we desperately need people
>> to contribute to the GUI aspects of JMeter.
>>
>> Feel free to add your name to the contributor list in
>> http://nagoya.apache.org/wiki/apachewiki.cgi?JMeterCommitters
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
Re: [PATCH] Display current filename in title bar
Posted by Keith Lancaster <kl...@swbell.net>.
Jordi,
Interesting. I synced up to cvs right before doing the diff by doing cvs
update. Maybe I did something wrong...I've worked with quite a number of
CM systems, but am relatively new to CVS. Sorry you had to do the work
manually.
Thanks,
Keith
Jordi Salvat i Alabart wrote:
> Hi Keith,
>
> your patch worked flawlessly (as far as I tested it) on the first
> shot, although it was not trivial to apply it -- had to do most by
> hand. Maybe you didn't work from the latest CVS code? You're welcome
> to use that as the base for your next contribution -- but please don't
> stop your patches comming for this reason: we desperately need people
> to contribute to the GUI aspects of JMeter.
>
> Feel free to add your name to the contributor list in
> http://nagoya.apache.org/wiki/apachewiki.cgi?JMeterCommitters
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
Re: [PATCH] Display current filename in title bar
Posted by Jordi Salvat i Alabart <js...@atg.com>.
Hi Keith,
your patch worked flawlessly (as far as I tested it) on the first shot,
although it was not trivial to apply it -- had to do most by hand. Maybe
you didn't work from the latest CVS code? You're welcome to use that as
the base for your next contribution -- but please don't stop your
patches comming for this reason: we desperately need people to
contribute to the GUI aspects of JMeter.
Feel free to add your name to the contributor list in
http://nagoya.apache.org/wiki/apachewiki.cgi?JMeterCommitters
--
Salut,
Jordi.
En/na Keith Lancaster ha escrit:
> Thanks! I enjoyed working on it. I tested it pretty thoroughly, but
> PLEASE TEST IT!! :-) I'd hate for my first contribution to break JMeter.
> :-)
>
> Keith
>
> Jordi Salvat i Alabart wrote:
>
>> Hi Keith,
>>
>> thanks a lot for your very valuable patch.
>>
>> As for your question on the correct method: it is correct. You may
>> prefer to post your patches as attachments to enhancement requests in
>> bugzilla --in this way they will never go forgotten-- but we quite
>> frankly welcome contributions in any useable format.
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
Re: [PATCH] Display current filename in title bar
Posted by Keith Lancaster <kl...@swbell.net>.
Thanks! I enjoyed working on it. I tested it pretty thoroughly, but
PLEASE TEST IT!! :-) I'd hate for my first contribution to break JMeter. :-)
Keith
Jordi Salvat i Alabart wrote:
> Hi Keith,
>
> thanks a lot for your very valuable patch.
>
> As for your question on the correct method: it is correct. You may
> prefer to post your patches as attachments to enhancement requests in
> bugzilla --in this way they will never go forgotten-- but we quite
> frankly welcome contributions in any useable format.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
Re: [PATCH] Display current filename in title bar
Posted by Jordi Salvat i Alabart <js...@atg.com>.
Hi Keith,
thanks a lot for your very valuable patch.
As for your question on the correct method: it is correct. You may
prefer to post your patches as attachments to enhancement requests in
bugzilla --in this way they will never go forgotten-- but we quite
frankly welcome contributions in any useable format.
--
Cheers,
Jordi.
En/na Keith Lancaster ha escrit:
> All,
> This is my first time to request a patch, so please let me know if this
> is the correct method for this group. I will be happy to enter this as
> an enh request if that would be preferred.
>
> When working with JMeter, I have found that I can easily lose track of
> the exact name and location of the current file. This patch displays the
> current filename in the application titlebar in the following format:
> "FileName ( <full path to file name> ) - Apache JMeter"
>
> This is similar to the format used by Open Office and other common
> applications. In addition, this patch changes the names of some of the
> commands related to saving to make them more consistent. While strictly
> speaking these changes were not necessary, they should make maintenance
> easier by using the terms "save", "save as", and "save_all_as"
> consistently. The function which builds the title was placed in
> JMeterUtils so that it may be reused, rather than embedding the code in
> the Save command.
>
> Thanks for your time,
> Keith Lancaster
>
> Index: core/org/apache/jmeter/gui/action/ExitCommand.java
> ===================================================================
> RCS file:
> /home/cvspublic/jakarta-jmeter/src/core/org/apache/jmeter/gui/action/ExitCommand.java,v
>
> retrieving revision 1.9
> diff -u -r1.9 ExitCommand.java
> --- core/org/apache/jmeter/gui/action/ExitCommand.java 19 Oct 2003
> 22:26:08 -0000 1.9
> +++ core/org/apache/jmeter/gui/action/ExitCommand.java 15 Dec 2003
> 20:28:39 -0000
> @@ -118,7 +118,7 @@
> else if (chosenOption == JOptionPane.YES_OPTION)
> {
> ActionRouter.getInstance().doActionNow(
> - new ActionEvent(e.getSource(), e.getID(),
> Save.SAVE_ALL));
> + new ActionEvent(e.getSource(), e.getID(), Save.SAVE));
> if (!GuiPackage.getInstance().isDirty())
> {
> System.exit(0);
> Index: core/org/apache/jmeter/gui/action/Save.java
> ===================================================================
> RCS file:
> /home/cvspublic/jakarta-jmeter/src/core/org/apache/jmeter/gui/action/Save.java,v
>
> retrieving revision 1.17
> diff -u -r1.17 Save.java
> --- core/org/apache/jmeter/gui/action/Save.java 19 Oct 2003 22:26:08
> -0000 1.17
> +++ core/org/apache/jmeter/gui/action/Save.java 15 Dec 2003 20:28:40
> -0000
> @@ -75,7 +75,7 @@
> import org.apache.jorphan.collections.ListedHashTree;
> import org.apache.jorphan.logging.LoggingManager;
> import org.apache.log.Logger;
> -
> +import org.apache.jmeter.util.JMeterUtils;
> /**
> * @author Michael Stover
> * Created February 13, 2001
> @@ -84,17 +84,16 @@
> public class Save implements Command
> {
> transient private static Logger log =
> LoggingManager.getLoggerForClass();
> - public final static String SAVE_ALL = "save_all";
> - public final static String SAVE = "save_as";
> - public final static String SAVE_TO_PREVIOUS = "save";
> - private String chosenFile;
> + public final static String SAVE_ALL_AS = "save_all_as";
> + public final static String SAVE_AS = "save_as";
> + public final static String SAVE = "save";
> private String testPlanFile;
>
> private static Set commands = new HashSet();
> static {
> commands.add(SAVE);
> - commands.add(SAVE_ALL);
> - commands.add(SAVE_TO_PREVIOUS);
> + commands.add(SAVE_AS);
> + commands.add(SAVE_ALL_AS);
> }
>
> /**
> @@ -117,23 +116,27 @@
> public void setTestPlanFile(String f)
> {
> testPlanFile = f;
> +
> GuiPackage.getInstance().getMainFrame().setTitle(JMeterUtils.getExtendedFrameTitle(testPlanFile));
>
> }
>
> public void doAction(ActionEvent e) throws IllegalUserActionException
> {
> HashTree subTree = null;
> - if (e.getActionCommand().equals(SAVE))
> + if (!commands.contains(e.getActionCommand()))
> + {
> + throw new IllegalUserActionException("Invalid user
> command:" + e.getActionCommand());
> + }
> + if (e.getActionCommand().equals(SAVE_AS))
> {
> subTree = GuiPackage.getInstance().getCurrentSubTree();
> }
> - else if (
> - e.getActionCommand().equals(SAVE_ALL)
> - || e.getActionCommand().equals(SAVE_TO_PREVIOUS))
> + else
> {
> subTree =
> GuiPackage.getInstance().getTreeModel().getTestPlan();
> }
>
> - if (!SAVE_TO_PREVIOUS.equals(e.getActionCommand())
> + String updateFile = testPlanFile;
> + if (!SAVE.equals(e.getActionCommand())
> || testPlanFile == null)
> {
> JFileChooser chooser =
> @@ -148,22 +151,14 @@
> {
> return;
> }
> - if (e.getActionCommand().equals(SAVE_ALL)
> - || e.getActionCommand().equals(SAVE_TO_PREVIOUS))
> - {
> - testPlanFile =
> chooser.getSelectedFile().getAbsolutePath();
> - chosenFile = testPlanFile;
> - }
> - else
> + updateFile = chooser.getSelectedFile().getAbsolutePath();
> + if (!e.getActionCommand().equals(SAVE_AS))
> {
> - chosenFile = chooser.getSelectedFile().getAbsolutePath();
> + testPlanFile = updateFile;
> }
> }
> - else
> - {
> - chosenFile = testPlanFile;
> - }
> -
> + // TODO: doesn't putting this here mark the tree as
> + // saved even though a failure may occur later?
> ActionRouter.getInstance().doActionNow(
> new ActionEvent(subTree, e.getID(),
> CheckDirty.SUB_TREE_SAVED));
> try
> @@ -176,7 +171,7 @@
> OutputStream writer = null;
> try
> {
> - writer = new FileOutputStream(chosenFile);
> + writer = new FileOutputStream(updateFile);
> SaveService.saveSubTree(subTree, writer);
> }
> catch (Throwable ex)
> @@ -184,11 +179,15 @@
> testPlanFile = null;
> log.error("", ex);
> throw new IllegalUserActionException(
> - "Couldn't save test plan to file: " + chosenFile);
> + "Couldn't save test plan to file: " + updateFile);
> }
> finally
> {
> closeWriter(writer);
> + if(testPlanFile != null)
> + {
> +
> GuiPackage.getInstance().getMainFrame().setTitle(JMeterUtils.getExtendedFrameTitle(testPlanFile));
>
> + }
> GuiPackage.getInstance().getMainFrame().repaint();
> }
> }
> Index: core/org/apache/jmeter/gui/util/JMeterMenuBar.java
> ===================================================================
> RCS file:
> /home/cvspublic/jakarta-jmeter/src/core/org/apache/jmeter/gui/util/JMeterMenuBar.java,v
>
> retrieving revision 1.18
> diff -u -r1.18 JMeterMenuBar.java
> --- core/org/apache/jmeter/gui/util/JMeterMenuBar.java 19 Oct 2003
> 22:26:08 -0000 1.18
> +++ core/org/apache/jmeter/gui/util/JMeterMenuBar.java 15 Dec 2003
> 20:28:41 -0000
> @@ -85,7 +85,7 @@
> {
> transient private static Logger log =
> LoggingManager.getLoggerForClass();
> JMenu fileMenu;
> - JMenuItem file_save_all;
> + JMenuItem file_save_as;
> JMenuItem file_load;
> JMenuItem file_exit;
> JMenuItem file_new;
> @@ -132,7 +132,7 @@
>
> public void setFileSaveEnabled(boolean enabled)
> {
> - file_save_all.setEnabled(enabled);
> + file_save_as.setEnabled(enabled);
> }
>
> public void setFileLoadEnabled(boolean enabled)
> @@ -239,7 +239,7 @@
> */
> public void createMenuBar()
> {
> - createFileMenu();
> + makeFileMenu();
> makeEditMenu();
> makeRunMenu();
> makeOptionsMenu();
> @@ -422,26 +422,26 @@
> editMenu.setEnabled(false);
> }
> - private void createFileMenu()
> + private void makeFileMenu()
> {
> // FILE MENU
> fileMenu = new JMenu(JMeterUtils.getResString("file"));
> fileMenu.setMnemonic('F');
> JMenuItem file_save =
> - new JMenuItem(JMeterUtils.getResString("save_all"), 'S');
> + new JMenuItem(JMeterUtils.getResString("save"), 'S');
> file_save.setAccelerator(
> KeyStroke.getKeyStroke(KeyEvent.VK_S, KeyEvent.CTRL_MASK));
> file_save.setActionCommand("save");
> file_save.addActionListener(ActionRouter.getInstance());
> file_save.setEnabled(true);
>
> - file_save_all =
> + file_save_as =
> new JMenuItem(JMeterUtils.getResString("save_all_as"), 'A');
> - file_save_all.setAccelerator(
> + file_save_as.setAccelerator(
> KeyStroke.getKeyStroke(KeyEvent.VK_A, KeyEvent.CTRL_MASK));
> - file_save_all.setActionCommand("save_all");
> - file_save_all.addActionListener(ActionRouter.getInstance());
> - file_save_all.setEnabled(true);
> + file_save_as.setActionCommand("save_all_as");
> + file_save_as.addActionListener(ActionRouter.getInstance());
> + file_save_as.setEnabled(true);
> file_load = new JMenuItem(JMeterUtils.getResString("open"), 'O');
> file_load.setAccelerator(
> KeyStroke.getKeyStroke(KeyEvent.VK_O, KeyEvent.CTRL_MASK));
> @@ -463,7 +463,7 @@
> fileMenu.add(file_new);
> fileMenu.add(file_load);
> fileMenu.add(file_save);
> - fileMenu.add(file_save_all);
> + fileMenu.add(file_save_as);
> fileMenu.addSeparator();
> fileMenu.add(file_exit);
> }
> Index: core/org/apache/jmeter/gui/util/MenuFactory.java
> ===================================================================
> RCS file:
> /home/cvspublic/jakarta-jmeter/src/core/org/apache/jmeter/gui/util/MenuFactory.java,v
>
> retrieving revision 1.22
> diff -u -r1.22 MenuFactory.java
> --- core/org/apache/jmeter/gui/util/MenuFactory.java 5 Oct 2003
> 01:05:31 -0000 1.22
> +++ core/org/apache/jmeter/gui/util/MenuFactory.java 15 Dec 2003
> 20:28:43 -0000
> @@ -195,7 +195,7 @@
> menu.add(
> makeMenuItem(JMeterUtils.getResString("open"), "Open",
> "open"));
> menu.add(
> - makeMenuItem(JMeterUtils.getResString("save"), "Save",
> "save_as"));
> + makeMenuItem(JMeterUtils.getResString("save_as"), "Save
> As", "save_as"));
> JMenuItem disabled =
> makeMenuItem(
> JMeterUtils.getResString("disable"),
> Index: core/org/apache/jmeter/resources/messages.properties
> ===================================================================
> RCS file:
> /home/cvspublic/jakarta-jmeter/src/core/org/apache/jmeter/resources/messages.properties,v
>
> retrieving revision 1.77
> diff -u -r1.77 messages.properties
> --- core/org/apache/jmeter/resources/messages.properties 9 Dec 2003
> 14:53:37 -0000 1.77
> +++ core/org/apache/jmeter/resources/messages.properties 15 Dec 2003
> 20:28:44 -0000
> @@ -326,8 +326,8 @@
> sampler_on_error_stop_thread=Stop Thread
> save?=Save?
> save_all_as=Save Test Plan as
> -save_all=Save Test Plan
> -save=Save As...
> +save=Save Test Plan
> +save_as=Save As...
> scheduler_configuration=Scheduler Configuration
> scheduler=Scheduler
> search_base=Search base
> Index: core/org/apache/jmeter/resources/messages_de.properties
> ===================================================================
> RCS file:
> /home/cvspublic/jakarta-jmeter/src/core/org/apache/jmeter/resources/messages_de.properties,v
>
> retrieving revision 1.64
> diff -u -r1.64 messages_de.properties
> --- core/org/apache/jmeter/resources/messages_de.properties 9 Dec
> 2003 14:53:37 -0000 1.64
> +++ core/org/apache/jmeter/resources/messages_de.properties 15 Dec
> 2003 20:28:46 -0000
> @@ -326,8 +326,8 @@
> sampler_on_error_stop_thread=Stop Thread
> save?=Speichern?
> save_all_as=Speichern Test Plan unter
> -save_all=Speichern Test Plan
> -save=Speichern unter
> +save=Speichern Test Plan
> +save_as=Speichern unter
> scheduler_configuration=Scheduler Configuration
> scheduler=Scheduler
> search_base=Search base
> Index: core/org/apache/jmeter/resources/messages_ja.properties
> ===================================================================
> RCS file:
> /home/cvspublic/jakarta-jmeter/src/core/org/apache/jmeter/resources/messages_ja.properties,v
>
> retrieving revision 1.61
> diff -u -r1.61 messages_ja.properties
> --- core/org/apache/jmeter/resources/messages_ja.properties 9 Dec
> 2003 14:53:37 -0000 1.61
> +++ core/org/apache/jmeter/resources/messages_ja.properties 15 Dec
> 2003 20:28:48 -0000
> @@ -326,8 +326,8 @@
> sampler_on_error_stop_thread=Stop Thread
> save?=\u4fdd\u5b58?
> save_all_as=\u30c6\u30b9\u30c8\u8a08\u753b\u306b\u540d\u524d\u3092\u3064\u3051\u3066\u4fdd\u5b58
>
> -save_all=\u30c6\u30b9\u30c8\u8a08\u753b\u3092\u4fdd\u5b58
> -save=\u5225\u540d\u3067\u4fdd\u5b58...
> +save=\u30c6\u30b9\u30c8\u8a08\u753b\u3092\u4fdd\u5b58
> +save_as=\u5225\u540d\u3067\u4fdd\u5b58...
> scheduler_configuration=\u30b9\u30b1\u30b8\u30e5\u30fc\u30e9\u8a2d\u5b9a
> scheduler=\u30b9\u30b1\u30b8\u30e5\u30fc\u30e9
> search_base=\u691c\u7d22\u57fa\u6e96
> Index: core/org/apache/jmeter/resources/messages_no.properties
> ===================================================================
> RCS file:
> /home/cvspublic/jakarta-jmeter/src/core/org/apache/jmeter/resources/messages_no.properties,v
>
> retrieving revision 1.60
> diff -u -r1.60 messages_no.properties
> --- core/org/apache/jmeter/resources/messages_no.properties 9 Dec
> 2003 14:53:37 -0000 1.60
> +++ core/org/apache/jmeter/resources/messages_no.properties 15 Dec
> 2003 20:28:50 -0000
> @@ -326,8 +326,8 @@
> sampler_on_error_stop_thread=Stop Thread
> save?=Save?
> save_all_as=Lagre alle som...
> -save_all=Lagre alle
> -save=Lagre som...
> +save=Lagre alle
> +save_as=Lagre som...
> scheduler_configuration=Scheduler Configuration
> scheduler=Scheduler
> search_base=Search base
> Index: core/org/apache/jmeter/util/JMeterUtils.java
> ===================================================================
> RCS file:
> /home/cvspublic/jakarta-jmeter/src/core/org/apache/jmeter/util/JMeterUtils.java,v
>
> retrieving revision 1.55
> diff -u -r1.55 JMeterUtils.java
> --- core/org/apache/jmeter/util/JMeterUtils.java 13 Dec 2003 02:16:32
> -0000 1.55
> +++ core/org/apache/jmeter/util/JMeterUtils.java 15 Dec 2003 20:28:53
> -0000
> @@ -1075,4 +1075,25 @@
> {
> return JMeterVersion.VERSION;
> }
> +
> + /**
> + * Builds the string used as the main frame title
> + * @param the fully qualified name of the current working file
> + * @return a string of the form "FileName (<full path>/FileName) -
> Apache JMeter".
> + * If fname is null, returns "Apache JMeter".
> + */ + public static String getExtendedFrameTitle(String fname)
> + {
> + // file New operation may set to null, so just return
> + // app name
> + if (fname == null)
> + {
> + return "Apache JMeter";
> + }
> +
> + // allow for windows / chars in filename
> + String temp = fname.replace('\\','/');
> + String simpleName = temp.substring(temp.lastIndexOf("/") + 1);
> + return simpleName + " (" + fname + ") - Apache JMeter";
> + }
> }
> Index: core/org/apache/jmeter/util/JMeterVersion.java
> ===================================================================
> RCS file:
> /home/cvspublic/jakarta-jmeter/src/core/org/apache/jmeter/util/JMeterVersion.java,v
>
> retrieving revision 1.6
> diff -u -r1.6 JMeterVersion.java
> --- core/org/apache/jmeter/util/JMeterVersion.java 9 Dec 2003
> 23:16:50 -0000 1.6
> +++ core/org/apache/jmeter/util/JMeterVersion.java 15 Dec 2003
> 20:28:53 -0000
> @@ -24,7 +24,9 @@
> * pattern: VERSION = <quote>.*<quote>
> *
> */
> - static final String VERSION = "1.9.20031207";
> +
> + static final String VERSION = "1.9.20031215";
> +
>
> private JMeterVersion() // Not instantiable
> {
>
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org