Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-dev] Question about IRMLaunchConfigurationDynamicTab.setDefaults

Randy
I made my changes to use setDefaults as you intended and it seems to be 
working fine.

All of the attributes I'm storing in the launch configuration, including 
BigInteger, are stored as strings. At the time I did it, it seemed like 
the simplest way to handle it. When run is clicked and PTP code retrieves 
the attributes out of the launch configuration to build the run command, 
I'm getting keyword/value pairs that look identical to an environment 
variable assignment, for instance MP_PROCS=2. In most cases, my proxy is 
just passing the value to the PE runtime environment exactly as is. I have 
a few cases that my proxy handles specially.

The only place I'm using the various attribute types other than String is 
as a way for the proxy to pass the upper/lower bounds or set of valid 
enumerations for an attribute to the GUI code. This way, I can validity 
check the values in the GUI without having to hard code those values in 
the Java code. My thinking was to have the Java code know as little as it 
could about specifics of each attribute as I could and have the proxy 
define what attributes were valid in a particular configuration 
(Linux/AIX) and with/without LoadLeveler. I've mostly accomplished that 
except for code that has to deal with dependencies between attributes and 
some of the attribute validation logic.
Dave



"Randy M. Roberts" <rsqrd@xxxxxxxx> 
Sent by: ptp-dev-bounces@xxxxxxxxxxx
07/13/2007 12:06 PM
Please respond to
Parallel Tools Platform general developers <ptp-dev@xxxxxxxxxxx>


To
ptp-dev <ptp-dev@xxxxxxxxxxx>
cc

Subject
Re: [ptp-dev] Question about IRMLaunchConfigurationDynamicTab.setDefaults






Dave,

You are spot on.  I tried to mimic the functionality of the 
ILaunchConfigurationTab in IRMLaunchConfigurationDynamicTab.

This does bring up an interesting aside, though.  How are you
planning on storing your BigInteger's in the passed in
ILaunchConfigurationWorkingCopy for setDefaults(...), and then
how will you be loading them in initializeFrom(...)?  I would
suggest storing and retrieving them via their String representations,
since your only other choices would be, int, boolean, List<String>,
Map<String,String>, or Set<String>.  Notice that the List, Map, and
Set must be of String's.

R^2
 
On Fri, 2007-07-13 at 08:55 -0400, Dave Wootton wrote:
> I think I misunderstood the purpose for the setDefaults method in 
> IRMLaunchConfigurationDynamicTab. I had implemented it so that it got 
the 
> default values for attributes from my resource manager and set those 
> values into the widgets in my implementation of this tab. In 
restructuring 
> code, I reread the comments for this method and it appears that the real 

> purpose for it is to set the default values for attributes in the 
> ILaunchConfigurationWorkingCopy that is passed in, using values obtained 

> from the IResourceManager that is passed in. It also looks like the 
> initializeFrom method is how the widgets in my tab get filled in, which 
is 
> what I have done and is working just fine.
> 
> Can you confirm this is correct or if not, what the purpose of 
setDefaults 
> is?
> 
> Thanks
> Dave
> _______________________________________________
> ptp-dev mailing list
> ptp-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/ptp-dev

_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev




Back to the top