Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-dev] Fw: Questions about JAXB parser

Al
I'll take a look at the spinner class to see if that does what I want.

I have at least one case where the value can be numeric or one of a set of strings where I expect to use an editable dropdown/combo box and need numeric validation. I also have some values where the PE implementation accepts values like 1M instead of 1000000 and I'm thinking I want to follow that pattern, so would need validation there.

I'm also not sure what happens with a spinner if I enter out of range or non-numeric data. If it just beeps at me I think that's confusing since it doesn't tell me what's wrong, whether I'm entering invalid data or if the keyboard focus is somewhere where it shouldn't be.

The command actually does work and write to /tmp/ptp_out. I can implement a shell script which echoes environment variables and invoke that in place of the echo command to see if environment variables are being passed across in the process environment.

One other question.

Is there a stdout or stderr parser implementation in your code that simply echoes the stdout/stderr to the console view in Eclipse? I'm using shell redirection as an alternative to that now since I'm taking this one step at a time.

No need for you to be on the call this morning unless you choose to. It sounds like I'm not too far off track with what I'm doing, so I can make progress until you are back at work.
Dave



From:        "Albert L. Rossi" <arossi@xxxxxxxxxxxxx>
To:        Parallel Tools Platform general developers <ptp-dev@xxxxxxxxxxx>
Date:        05/19/2011 08:43 AM
Subject:        Re: [ptp-dev] Fw: Questions about JAXB parser
Sent by:        ptp-dev-bounces@xxxxxxxxxxx




Hi Dave,

I'm taking a couple of days away from work, but I have been checking my email.  I can respond initially to your questions but ultimately we'll need to revisit them.

First, the validator.  This may be a bug; it should work.  However, in the case of simple numerical validation, why not just use a Spinner widget for that value and forget validation in the attribute? (of course, if this is a bug, I will fix it).

Second, environment variables defined inside a command are precisely that; they are not defined in the scope of the resource manager configuration.  So you will not get it as a substitution into the actual command that is issued; however, I would have thought the echo would get the actual environment variable from the process environment.  Two things:

a) as it stands, the value of the environment variable should not have the ${...} tag, this is added under the covers; try getting rid of that and see if it works.  Your usage, however, has suggested to me that it actually is better to do what you are doing, because the value may just be a constant, not a reference to a property or attribute (I had overlooked this), in which case, wrapping it in ${ptp_rm:...#value} would fail.  So I will eventually change the environment variable to work the way you have it here.

b) I am actually surprised this command runs at all. Do you actually get ptp_out?  I didn't think the RemoteProcessBuilder allowed explicit shell I/O redirection.

I can be on the call today if you want to discuss this more.  Let me know.

Al

----- Dave Wootton <dwootton@xxxxxxxxxx> wrote:
> I intended to attach my XML file but hit send too soon. Trying again.
> Dave
>
>
>
> ----- Forwarded by Dave Wootton/Poughkeepsie/IBM on 05/18/2011 08:36 PM
> -----
>
>
>
> Questions about JAXB parser
>
> Dave Wootton
> to:
> ptp-dev
> 05/18/2011 08:35 PM
>
>
>
>
> Al
> I have partial success with getting a working resource manager. I have a
> simple XML file that defines two widgets in a dynamic tab, intended to set
> MP_PROCS_ATTR and MP_HOSTFILE_ATTR attributes which each are defined as
> attributes. I have a sumbit-interactive element which I use to invoke an
> 'echo' command to try to display variables passed across to the remote
> system. For now, I'm just redirecting stdout & stderr to a file on the
> remote system by shell redirection ('echo foo > /tmp/file 2>&1')
>
> I also have two environment variables MP_PROCS and MP_HOSTFILE which I
> intende to get their values from MP_PROCS_ATTR and MP_HOSTFILE_ATTR
> respectively.
>
> When I open the run configurations, my widgets are displayed and I can
> fill in values. Those values are saved across sessions.
>
> I have two problems
>
> 1) If I click run in the run configuration, then look at the echo command
> output, I can see the executable path and the value of the MP_PROCS_ATTR
> attribute. However, I don't seem to get the value of the MP_PROCS
> environment variable, either as a substitution into the args array for the
> command or as an actual environment variable in the echo command.
>
> 2) Also, I have a validator defined for MP_PROCS which I'm intending to
> accept only numeric input and reject anything else. That doesn't seem to
> be working.
>
> Dave
_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev


Back to the top