On Sun, Jan 29, 2012 at 7:52 PM, sebb <[email protected]> wrote: > On 29 January 2012 18:49, Anthony Johnson <[email protected]> wrote: >> Hey Sebb, >> The point is to keep track of variable scoping and give the user a >> quick link to in-scope variables. > > Variables don't have a scope - or rather, their scope is the entire > active thread. > And the only sure way to know what variables are defined at a > particular point is to run the test.
Those variables are entered into a JTextField, JTextArea, etc and they have a defined format. Why would I not be able to add an onChange triggers to know when a variable is declared? The Beanshell-type areas would need some custom work, but imagine having a context or code-complete for variables and functions in those Beanshell JTextArea input areas. It would speed up a lot of Test Creation activities and cut down on a lot of view switching. > > In theory it would be possible to extract a list of variable names > from their definition elements - but there are a lot of different ways > variables can be defined (test elements, functions, scripts), so this > would be a lot of work. But would still not know which ones would be > set at a given point, so it would not be possible to provide a > context-sensitive list. > > If a test uses a lot of variables, just use a naming convention and document > it. > >> For instance, user is editing a text field. User right-clicks and >> sees a JMenu for "Thread Variables". Highlighting that Menu would >> show a list of JMenuItems for each variable that is in-scope. >> >> If not a right-click menu, I think a code-complete type of interactive >> typing would be nice as well. >> >> Thanks for the reply! >> >> Anthony >> >> On Sun, Jan 29, 2012 at 10:49 AM, sebb <[email protected]> wrote: >>> On 27 January 2012 15:28, Anthony Johnson <[email protected]> wrote: >>>> Hey Devs, >>>> Just wanting to get some feedback before I proceed forward. >>>> >>>> Idea: Create a JTextField/JTextArea right click pop-up that gives the >>>> user short-cuts to useful things. >>>> >>>> Things: Properties, Variable names in scope, JMeter functions, >>>> Copy/Cut/Paste >>>> >>>> Goal: Make the entire variable/property system more accessible since >>>> it is required to write a good Test Plan. >>>> >>>> What I have so far is a custom JTextField that has a right click menu >>>> with all the defined properties in it. I haven't seen the work that >>>> was done for Undo support, but I'm hoping that we now have a custom >>>> JTextField and JTextArea classes that have already been plumbed in >>>> which would not make this such a huge addition. >>>> >>>> Does this sound useful? >>> >>> I don't understand the proposal. >>> >>> There is already a Property Display under Workbench; not sure if >>> that's what you want. >>> >>>> Thanks, >>>> >>>> Anthony
