You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2011/11/09 14:50:47 UTC

DO NOT REPLY [Bug 52161] New: Enable plugins to add own translation rules in addition to upgrade.properties

https://issues.apache.org/bugzilla/show_bug.cgi?id=52161

             Bug #: 52161
           Summary: Enable plugins to add own translation rules in
                    addition to upgrade.properties
           Product: JMeter
           Version: 2.5.1
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main
        AssignedTo: issues@jmeter.apache.org
        ReportedBy: stephane.hoblingre@gmail.com
    Classification: Unclassified


Could it be possible to add this method in
org.apache.jmeter.util.NameUpdater.java :

public static Object setProperty(String key, String value)  {
    return nameMap.setProperty(String key, String value);
}

This would allow plugins to add their own translation rules, without having to
modify the properties file.

Stef

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52161] Enable plugins to add own translation rules in addition to upgrade.properties

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52161

--- Comment #6 from stef <st...@gmail.com> 2011-11-11 08:23:45 UTC ---
Created attachment 27927
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=27927
New Interface to add to src/core/org/apache/jmeter/util

Plugins need to implement this interface to add additional entries in nameMap

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52161] Enable plugins to add own translation rules in addition to upgrade.properties

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52161

stef <st...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #27926|0                           |1
        is obsolete|                            |
  Attachment #27927|0                           |1
        is obsolete|                            |

--- Comment #13 from stef <st...@gmail.com> 2011-11-16 08:26:57 UTC ---
Created attachment 27946
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=27946
NameUpdater update

The new proposal using ClassLoader#getResources

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52161] Enable plugins to add own translation rules in addition to upgrade.properties

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52161

Sebb <se...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #14 from Sebb <se...@apache.org> 2011-11-16 12:25:30 UTC ---
Thanks!

Had to replace the stringPropertyNames() method call as that requires Java 1.6;
JMeter still targets 1.5+. Also added a log message for each properties file
found.


URL: http://svn.apache.org/viewvc?rev=1202658&view=rev
Log:
Bug 52161 - Enable plugins to add own translation rules in addition to
upgrade.properties.

Modified:
   jmeter/trunk/src/core/org/apache/jmeter/util/NameUpdater.java
   jmeter/trunk/xdocs/changes.xml

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52161] Enable plugins to add own translation rules in addition to upgrade.properties

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52161

--- Comment #11 from Sebb <se...@apache.org> 2011-11-14 01:18:23 UTC ---
(In reply to comment #10)
> *** Bug 29603 has been marked as a duplicate of this bug. ***

Np longer marked as such. That is about messages.properties; this is about
upgrade.properties.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52161] Enable plugins to add own translation rules in addition to upgrade.properties

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52161

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mstover1@apache.org

--- Comment #10 from Philippe Mouawad <p....@ubik-ingenierie.com> 2011-11-12 15:15:01 UTC ---
*** Bug 29603 has been marked as a duplicate of this bug. ***

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52161] Enable plugins to add own translation rules in addition to upgrade.properties

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52161

--- Comment #8 from Sebb <se...@apache.org> 2011-11-11 12:54:54 UTC ---
(In reply to comment #7)
> Hi Sebb,
> 
> Do you think this implementation could be he right approach?
> 
> Stef

That would work, but it is quite involved. 

I was thinking more on the lines of reading an additional properties file, e.g.
use ClassLoader#getResources(String name) to find all resources with a
particular name, where the name is something like
META-INF/resources/org.apache.jmeter.nameupdater.properties

This would also be easier for the plugins to provide.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52161] Enable plugins to add own translation rules in addition to upgrade.properties

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52161

--- Comment #7 from stef <st...@gmail.com> 2011-11-11 11:12:14 UTC ---
Hi Sebb,

Do you think this implementation could be he right approach?

Stef

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52161] Enable plugins to add own translation rules in addition to upgrade.properties

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52161

--- Comment #4 from stef <st...@gmail.com> 2011-11-09 16:38:12 UTC ---
(In reply to comment #3)
> It would be better if the additional entries could be provided at class load
> time.

Yes that would be the ideal solution. Is it feasible?

Stef

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52161] Enable plugins to add own translation rules in addition to upgrade.properties

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52161

--- Comment #2 from stef <st...@gmail.com> 2011-11-09 15:01:35 UTC ---
(In reply to comment #1)
> I don't think that is a good idea; the intention is for the namemap to be
> immutable once created.

Yes I agree the existing implementation ensured that.
Could it be possible to add an additional map and to fetch data first look in
namemap and if (and only if) not found look in the second one?

Stef

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52161] Enable plugins to add own translation rules in addition to upgrade.properties

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52161

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |p.mouawad@ubik-ingenierie.c
                   |                            |om
           Platform|PC                          |All
         OS/Version|Windows XP                  |All
           Severity|normal                      |enhancement

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52161] Enable plugins to add own translation rules in addition to upgrade.properties

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52161

--- Comment #1 from Sebb <se...@apache.org> 2011-11-09 14:12:46 UTC ---
I don't think that is a good idea; the intention is for the namemap to be
immutable once created.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52161] Enable plugins to add own translation rules in addition to upgrade.properties

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52161

--- Comment #5 from stef <st...@gmail.com> 2011-11-11 08:22:04 UTC ---
Created attachment 27926
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=27926
NameUpdater update

Load additional items to nameMap

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52161] Enable plugins to add own translation rules in addition to upgrade.properties

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52161

--- Comment #12 from stef <st...@gmail.com> 2011-11-16 08:25:28 UTC ---
(In reply to comment #8)

Hi Sebb,

Please find attached the patch following your recommendations.

Stef

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52161] Enable plugins to add own translation rules in addition to upgrade.properties

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52161

--- Comment #9 from stef <st...@gmail.com> 2011-11-12 11:59:12 UTC ---
Yes that will be much simpler, I will look at this.

Stef

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52161] Enable plugins to add own translation rules in addition to upgrade.properties

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52161

--- Comment #3 from Sebb <se...@apache.org> 2011-11-09 15:09:56 UTC ---
It would be better if the additional entries could be provided at class load
time.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.