Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-dev] Service Configuration preference page and project properties page questions

Dave,

The way the getConfigurations method is implemented at the moment requires you to trap the ProjectNotConfigured exception and handle this appropriately.

Greg




On Aug 7, 2009, at 1:24 PM, Dave Wootton wrote:

Greg
There's a couple other problems I ran into with the properties page that I
forgot to note.

I'm trying to display the set of service configurations that already exist
for the project when the properties page is opened. I'm calling
ServiceModelManager.getConfigurations(IProject) to get the set.

If there are no service configurations for the project, the when I click on the 'Service Configurations' entry on the left side of the properties
page, I get a popup that says 'The currently displayed page contains
invalid values' and the page does not display. I also get an error log
entry with a ProjectNotConfigured exception. The top of the traceback is
ServiceModelManager.getConf(line 103), called from
ServiceModelManager.getConfigurations(line 197), called from my properties
page. If I click other property page entries then click my service
configuration properties page, I get a blank service configuration list,
as I should.


If I add service configurations to the project then I no longer get the
exception.

Is there something I should be doing to avoid this? Should there be a way
to check for an empty service configuration list?
Dave



From:
Dave Wootton/Poughkeepsie/IBM@IBMUS
To:
Parallel Tools Platform general developers <ptp-dev@xxxxxxxxxxx>
Date:
08/07/2009 11:36 AM
Subject:
Re: [ptp-dev] Service Configuration preference page and project properties
page questions
Sent by:
ptp-dev-bounces@xxxxxxxxxxx



Greg
There's a createContents(Composite) method in the PropertyPage class. I'm using that to create a set of Composites, a Table widget, a couple Button widgets and the ServiceModelWidget. I create all the UI objects except the

ServiceModelWidget in the createContents() method, including the Composite

I'm using as a container for the  ServiceModelWidget. I create the
ServiceModelWidget and call ServiceModelWidget.createContents() later, in
a SelectionListener I have registered for my table widget that lists
service configurations. This might be a problem with my choice of layout manager for the Composite containing the ServiceModelWidget. I'm using a GridLayout while other code that uses the widget uses a FillLayout. I'll
experiment a bit more later today with this.

I was thinking ServiceModelManager.remove() and typed
ServiceModelWidget.remove() by mistake.

If you're suggesting renaming setConfiguration to addConfiguration, I
agree.
Dave



From:
Greg Watson <g.watson@xxxxxxxxxxxx>
To:
Parallel Tools Platform general developers <ptp-dev@xxxxxxxxxxx>
Date:
08/07/2009 11:03 AM
Subject:
Re: [ptp-dev] Service Configuration preference page and project properties

page questions
Sent by:
ptp-dev-bounces@xxxxxxxxxxx




On Aug 7, 2009, at 10:08 AM, Dave Wootton wrote:

I have a mostly working preference page and project properties page
for
service configurations. I have a few questions.

I have a properties page with a Composite object which I'm intending
to
use as the parent  for the ServiceModelWidget. I create a new
ServiceModelWidget passing in the selected IServiceConfiguration
object,
then call ServiceModelWidget.createContents(), passing in the
Composite as
the parent widget. I don't see the ServiceModelWidget appear in the
properties page. Do I need to do something else to have this appear?
Is
this the proper way to get the widget to display? Do I need to do
something else?

For dialogs, you have to call setControl(composite) in the
createControl() method before it will display anything. Is there
something similar for properties pages?


When I add a service configuration to the project I'm calling
ServiceModelManager.setConfiguration(IProject, IServiceConfiguration)
which seems to work because I end up with multiple service
configurations
associated with the project.. The 'setConfiguration' method name
implies
to me that it's only allowing a single service configuration so I
want to
be sure I'm doing this right.

Maybe addConfiguration() would be better?


If I try to remove a service configuration from the set of available
service configurations in my preferences page, I call
ServiceModelWidget.remove(IServiceConfiguration) but it doesn't
remove the
service configuration.

Do you mean ServiceModelManager..remove()? In any case, yes, there
should be a listener for model events, or at least adding/removing
configurations. I'll need to add this functionality.

Greg
_______________________________________________
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



Back to the top