Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 354342

Summary: The version number can not be changed after the ValgrindOptionTab has been initialized
Product: [Tools] Linux Tools Reporter: Ryan Xu <xuruoyu1979>
Component: ValgrindAssignee: Elliott Baron <ebaron>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: jjohnstn, mober.at+eclipse, overholt
Version: 0.8.0   
Target Milestone: 0.9.0   
Hardware: PC   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 315504    
Attachments:
Description Flags
patch v1 jjohnstn: iplog+

Description Ryan Xu CLA 2011-08-10 04:49:10 EDT
The valgrind version number is seted when the ValgrindOptionTab is initialed and can not be changed anymore.

In some user case, maybe we need to change the version number on fly.

Can we add a setter/getter for the variable valgrindVersion?
Comment 1 Ryan Xu CLA 2011-08-10 04:57:13 EDT
If we can provide a setter/getter for the variable "valgrindVersion", after the version is changed . the control should also redraw.
Comment 2 Martin Oberhuber CLA 2011-08-10 05:11:31 EDT
Background: In our product, we run valgrind on remote targets (by extending the original Linuxtools launches).

Since a different valgrind version can be installed on different targets, and users can select a different target in the UI, it's important to be able and change the valgrind version.
Comment 3 Martin Oberhuber CLA 2011-08-10 05:34:21 EDT
Created attachment 201221 [details]
patch v1

Attached is a simple patch against master.

I don't think we can redraw controls while a tab is being displayed... I've never seen an SWT control vanish or reappear based on a change on that page (well, except a "Details>>" button in dialogs.

So my first approach is only allowing to change the valgrind version while the tab is not being displayed. That's good enough for our approach, where a different tab will pick the connection. Switching back to the valgrind tab, the tab should be redrawn.

Ryan, could you check whether that patch fits your needs?
Comment 4 Martin Oberhuber CLA 2011-09-07 05:14:48 EDT
Ping, could my patch be reviewed / considered ?

FWIW, in our commercial product we use introspection today, in order to access the private "valgrindVersion" field.
Comment 5 Jeff Johnston CLA 2011-09-08 18:02:44 EDT
(In reply to comment #4)
> Ping, could my patch be reviewed / considered ?
> 
> FWIW, in our commercial product we use introspection today, in order to access
> the private "valgrindVersion" field.

Patch is very reasonable considering that remote Valgrind version will have to be calculated once user has picked target.

Patch has been applied to master.
Comment 6 Jeff Johnston CLA 2011-09-21 16:09:34 EDT
Comment on attachment 201221 [details]
patch v1

Less than 250 lines.