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

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





Back to the top