Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-dev] Problems trying to create resource manager using XML framework


Al
Thanks for the example. I had about an hour to experiment where I started with the example then expanded on it mostly by copy and paste at this point. I was able to add a third tab with a composite containing a couple labels and text fields. I think I follow how the environment variables get set up.

I was thinking again about tabs within tabs and what you have might be acceptable. I'm thinking the outer tab set might be a basic tab and an advanced tab, then within  the basic tab another tab pane with a bunch of tabs by PE environment variable category and a simpler layout in the advanced tab.

I do have a couple questions
1) Does this implementation support remote connections? I'm able to create a remote project using the remote tools connection and then navigate to the project directory on the remote system. However, in the run configuration, even though I select the resource manager, which is started, the browse button for the executable path opens a local file browser. Also if I fill in the run configuration and click run, I get a bunch of output to the console view where it looks like a command is being executed setting a bunch of environment variables from my windows 7 system and the remote command dos not run.
2) Is there an easy way to tell what line in the XML file is invalid when parse exceptions are thrown? I was getting a parse exception because the XML editor I was using was generating a grid-data stanza with   <grid-data horizontalAlign="SWT.BEGINNING" grabExcessHorizontal="true"widthHint="100" horizontalSpan="1"></grid-data>
which was invalid instead of <grid-data horizontalAlign="SWT.BEGINNING" grabExcessHorizontal="true"widthHint="100" horizontalSpan=/> which is valid. I figured this out only because I'm building the XML file incrementally and only had a few places to look. If I had created a bunch of XML, I don't know how to find the statement in error since I don't see any line number of other identifying info in the exception traceback. For instance
org.xml.sax.SAXParseException: cvc-complex-type.2.1: Element 'grid-data' must have no character or element information item [children], because the type's content type is empty.
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.elementLocallyValidComplexType(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.elementLocallyValidType(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.processElementContent(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleEndElement(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.endElement(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
        at com.sun.org.apache.xerces.internal.jaxp.validation.StreamValidatorHelper.validate(Unknown Source)
        at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.validate(Unknown Source)
        at javax.xml.validation.Validator.validate(Unknown Source)
        at org.eclipse.ptp.rm.jaxb.core.utils.JAXBInitializationUtils.validate(JAXBInitializationUtils.java:97)
        at org.eclipse.ptp.rm.jaxb.core.utils.JAXBInitializationUtils.unmarshalResourceManagerData(JAXBInitializationUtils.java:154)
        at org.eclipse.ptp.rm.jaxb.core.utils.JAXBInitializationUtils.initializeRMData(JAXBInitializationUtils.java:78)
        at org.eclipse.ptp.rm.jaxb.core.rm.JAXBResourceManagerConfiguration.realizeRMDataFromXML(JAXBResourceManagerConfiguration.java:161)
        at org.eclipse.ptp.rm.jaxb.core.rm.JAXBResourceManagerConfiguration.getResourceManagerData(JAXBResourceManagerConfiguration.java:68)
        at org.eclipse.ptp.rm.jaxb.core.rm.JAXBResourceManagerConfiguration.getRMVariableMap(JAXBResourceManagerConfiguration.java:103)
        at org.eclipse.ptp.rm.jaxb.core.rm.JAXBResourceManagerControl.initialize(JAXBResourceManagerControl.java:632)
        at org.eclipse.ptp.rm.jaxb.core.rm.JAXBResourceManagerControl.doStartup(JAXBResourceManagerControl.java:332)
        at org.eclipse.ptp.rmsystem.AbstractResourceManagerControl.start(AbstractResourceManagerControl.java:138)
        at org.eclipse.ptp.rmsystem.AbstractResourceManager.doStartup(AbstractResourceManager.java:422)
        at org.eclipse.ptp.rmsystem.AbstractResourceManager.start(AbstractResourceManager.java:340)
        at org.eclipse.ptp.ui.actions.StartResourceManagersObjectActionDelegate$1.run(StartResourceManagersObjectActionDelegate.java:48)
        at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Dave


Re: [ptp-dev]        Problems        trying        to        create        resource        manager        using        XML        framework

Albert L. Rossi to: Parallel Tools Platform general developers
05/04/2011 04:47 PM

Sent by: ptp-dev-bounces@xxxxxxxxxxx

Please respond to Parallel Tools Platform general developers







Dave,

to save you some time, I created a sample of what you are thinking of that you can use as a starting point.  Of course you will have to tweak the look and feel, but this demonstrates both your points (see esp. the XML for the environment business).

I did have to change TabFolder and TabItem to CTabFolder and CTabItem; I didn't realize that the latter were special classes and not just a style of the first widgets; they look so much nicer.

Anyway, I'm ready to respond to any questions (or take more flak ;-) ...

Al

P.S. the XML example is directly available in org.eclise.ptp.rm.jaxb.tests/data.

BTW, I did this in about 15 minutes, so I think once you're over the learning curve the advantages of this model-driven configuration will become evident.


----- Albert L. Rossi <arossi@xxxxxxxxxxxxx> wrote:
> Hi Dave,
>
> 1) The promotion of a tabbed folder to the top level would at this point require a not insignificant rewrite of the code, because the current parent to the three possible controllers has a specific role which in this case would be different; it would just be easier at this point to use the hierarchy that exists (see attached). I'm not sure why you think it would be confusing if you just make a single controller, and then make _its_ top child a tab-folder, adding the various groups as tab-items to that.  You'll have a redundant singleton controller label, but that shouldn't really be confusing.  See, for instance, my PBS interactive tab (attached).  You should in fact be able to nest tabbed folders arbitrarily or add more than one to the main tab too by embedding them in a composite.
>
> 2) If you can expose the various environment variable values as properties or attributes (perhaps using an attribute viewer table), then you should be able to reference these in the command associated with POE (and they will be added to the process builder's environment).  For instance,
>
> <submit-interactive>
>   <arg>...</arg>
>   <environment name="a" value="some_poe_attribute"/>
>   <environment name="b" value="another_poe_attribute"/>
> ....
> </submit-interactive>
>
> (giving value = just the name of the attribute or property is sufficient, as it will automatically reference the "value" field of the property or attribute under the covers).  Since the execution is interactive I would imagine these would get propagated to POE without trouble.
>
> Thanks for making me looking at this again, because I just saw (and corrected) a bug in the code for this. :_)
>
> If you want to discuss this some more we can talk about it on Thursday's call ...
>
> Al
>
> ----- Dave Wootton <dwootton@xxxxxxxxxx> wrote:
> > Al
> > I've been experimenting a bit more with this and have been able to modify
> > the XML config file so that the launch tab so that it displays only the
> > two PE settings I need to get started, and also defined attributes that
> > seem to save them in a run configuration. I have a few questions
> >
> > 1) Is it possible to have an open ended set of tabs in the resources pane?
> > What I did in the existing PE resource manager, and envisioned doing in
> > this implementation, was to organize PE options into logical group with
> > each group getting its own tab. In this implementation, it looks like I
> > have a basic tab, an extended tab and then a custom controller tab. In
> > this model, it looks like I'm limited to a single tabbed pane with a long
> > (around 70) list of PE options or I have to create a second tabbed pane
> > with tabs inside the pane for the basic and/or advanced mode tabs. I'm
> > afraid it will be difficult to find a PE option in a long list and I think
> > the user will be confused to see tabs within tabbed panes.
> > 2) For PE, I can set options using either command line flags to the POE
> > command or environment variables. My existing implementation uses
> > environment variables. Is there a way that I can continue to use
> > environment variables where the plugin generates the proper export
> > commands to set the environment variables before invoking poe or do I have
> > to have a script which sets them then invokes the poe command?
> > Dave
> >
> >
> >
> > From:   "Albert L. Rossi" <arossi@xxxxxxxxxxxxx>
> > To:     Parallel Tools Platform general developers <ptp-dev@xxxxxxxxxxx>
> > Date:   04/30/2011 09:11 PM
> > Subject:        Re: [ptp-dev] Problems  trying  to      create  resource
> > manager using   XML     framework
> > Sent by:        ptp-dev-bounces@xxxxxxxxxxx
> >
> >
> >
> > Also done.
> >
> > Al
> > ----- Greg Watson <g.watson@xxxxxxxxxxxx> wrote:
> > > Great. I suggest removing it from the extension point if it's no longer
> > needed.
> > >
> > > Greg
> > >
> > > On Apr 30, 2011, at 7:28 PM, Albert L. Rossi wrote:
> > >
> > > > Done.  The id is now totally arbitrary. -A;
> > > >
> > > > ----- Albert L. Rossi <arossi@xxxxxxxxxxxxx> wrote:
> > > >> Great, I'll take care of it.
> > > >>
> > > >> Al
> > > >> ----- Greg Watson <g.watson@xxxxxxxxxxxx> wrote:
> > > >>> Al,
> > > >>>
> > > >>> I had a quick look and I don't think there is any need to change
> > RMProviderContributor. I think you just need to modify
> > JAXBRMConfigurationSelectionFactory so that it ignores the id altogether.
> > The id in the
> > org.eclipse.ptp.rm.jaxb.core.JAXBResourceManagerConfigurations extension
> > point is not used by anything in RMProviderContributor.
> > fRMJAXBResourceManagers map can just be reduced to Map<String, URL>.
> > > >>>
> > > >>> Greg
> > > >>>
> > > >>> On Apr 30, 2011, at 3:38 PM, Albert L. Rossi wrote:
> > > >>>
> > > >>>> Greg, Dave
> > > >>>>
> > > >>>> This is a follow-up to the discussion about the "id" attribute on
> > the org.eclipse.ptp.rm.jaxb.core.JAXBResourceManagerConfigurations
> > extension point.  That attribute points to the _selection factory_
> > (org.eclipse.ptp.ui.wizards.RMConfigurationSelectionFactory).
> > > >>>>
> > > >>>> If you change it, you have to implement a new selection factory as
> > well.  But there is no need, because
> > > >>>>
> > > >>>>
> > org.eclipse.ptp.rm.jaxb.ui.wizards.JAXBRMConfigurationSelectionFactory
> > > >>>>
> > > >>>> is written to handle all contributions to this extension point.
> > It's id is "org.eclipse.ptp.rm.jaxb.JAXBServiceProvider"
> > > >>>>
> > > >>>> At this point I'm not sure what the correct thing to do is; the id
> > may be redundant, or it could be useful if a special corner-case
> > configuration needs to be created (but that sort of defeats the purpose of
> > this undertaking);  hence I would be inclined to remove it from the
> > extension point.  However, that will inevitably entail changes to
> > > >>>>
> > > >>>> org.eclipse.ptp.ui.wizards.RMProviderContributor,
> > > >>>>
> > > >>>> private static void getRMConfigurationSelectionFactories() [ll.
> > 58ff.].
> > > >>>>
> > > >>>> This is basically your domain Greg.  Let me know what to do (I know
> > you are currently overloaded).
> > > >>>>
> > > >>>> For the moment, Dave, continue to set that id to
> > "org.eclipse.ptp.rm.jaxb.JAXBServiceProvider" for all contributors to the
> > extension point.
> > > >>>>
> > > >>>> Al
> > > >>>> _______________________________________________
> > > >>>> 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
> > > >>>
> > > >>
> > > >> _______________________________________________
> > > >> 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
> > >
> > > _______________________________________________
> > > 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
> >
>

[attachment "tab2.png" deleted by Dave Wootton/Poughkeepsie/IBM] [attachment "tab1.png" deleted by Dave Wootton/Poughkeepsie/IBM] [attachment "tabbed-example.xml" deleted by Dave Wootton/Poughkeepsie/IBM] _______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev


Back to the top