Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [Wtp-wst-dev] How to modify/disable sections or controls within the [server] editor overview page?


Hi Georg,

First, thank you for using our WTP Server framework for the implementation of your server adapter.

Your server doesn't sound like one of our typical server. Most server adapter would provide the implementation for start, stop and other basic functions also most would actually start supporting local publishing first, and then provide the complicated remote support but it sounds like you guys went the other way around :). Nevertheless, we would try to work with you to see how we can improve our framework.

I have to forewarn you that your request is coming in late for Helios(3.2). Helios  is already starting its normal shutdown cycle. We are currently in the planning stage of RC1 and we are mainly looking at defects fixing and making our build stable.

To specifically answer some of your questions:
> - Is there any other possibility to disable "publishing" and "timeouts" configuration (or even the complete sections) within the server editor overview page
> for our specific server type? Did I miss an existing approach?
AutoPublishing can be disable by implementing ServerDelegate.setDefault call and setting the attribute 'auto-publish-setting' to 1. This will set the publishing options to "Never publish automatically". This doesn't give you the entire desired effect as user will still be able to modify the UI, but it will set the initial state of the server to never publish automatically.  As far timeouts, our framework doesn't support disabling the timeout, if that is something you interested to work on, we will gladly provide guidance and review the patch for the next release.

>- If there is no other approach: Couldn't "OverviewEditorPart" be extended to also invoke "ServerEditorOverviewPageModifier" within the methods

>"createPublishingSection" and "createTimeoutsSection" just like it is implemented for "createGeneralSection"?
There isn't a createGeneralSection method, but I assumed you are talking about the createControl method. This method was intended to be generic to allow the insertion of new widgets to the overview section and the wizard page, its behaviour was not intended to allow full control of the already created widgets but rather to allow adopters to add their own widgets. In your scenario it sounds to me like you are interested in disabling the publish and timeout sections within the editor. We currently don't have support for controlling this sections. But I can provide guidance and perhaps you can contribute a patch to support this function for the next release.


>- Would you accept a related patch delivery for Helios if I would try to extend the current implementation to be invoked for the additional overview page

>sections - or is it too late in the release process for extending this experimental new API yet?
It is too late to accept a patch for Helios.

> - In general: How I would restrict my "ServerEditorOverviewPageModifier" to only make the desired modifications in case of my specific server type?

> Shouldn't the extension point provide the possibility to specify server type ids and be invoked only if any ID matches - like editorPages and
> editorPageSections extension points do? (BTW: The same question regards to the implementation of the extension point
> "org.eclipse.swordfish.tooling.server.ui.serverCreationWizardPageExtension".)

'ServerEditorOverviewPageModifier' and the 'ServerCreationWizardPageExtension' apply to all servers, perhaps the ServerEditorOverviewPageModifier can be server type specific, but no the ServerCreationWizardPageExtension due to how the wizard is designed (server types is displayed within the same page where we allow for insertion of widgets). For now you can get server type from the  serverWc within the extension point class (although there is a bug that I just found out see bug 311580) and if Server Type is not one that you are interested then exit.  

To further clarifies things.. the two extension points were created:
- to allow adopters to insert new widgets.
- to allow the WTP framework to react accordingly depending on UI changes on the adopters widgets.
- to allow adopters inserting new widgets to react accordingly depending on UI changes on the default WTP provided widgets.

As you found out the extensions are new and a lot more can be done with them. Currently we only support UI behaviour changes in the hostname text field. We can continue to enhance the two extension points to support more UI changes but it again it has to wait until next release.

Let me know if you have more questions..

Best Regards,
-- --
Mr. Angel Vera
  Server Tools Developer
  E-Mail: arvera@xxxxxxxxxx
  Tel: 905-413-5919
-----
Those who think that something is impossible,
should not interfere with those who are willing to do it. - Angel Vera



From: Georg Voutsinos <georg.voutsinos@xxxxxxxxx>
To: "wtp-wst-dev@xxxxxxxxxxx" <wtp-wst-dev@xxxxxxxxxxx>
Date: 05/03/2010 10:40 AM
Subject: [Wtp-wst-dev] How to modify/disable sections or controls within the service editor overview page?
Sent by: wtp-wst-dev-bounces@xxxxxxxxxxx





Hello,

My question regards to the service editor overview page implementation:

We (at Swordfish project) have implemented a custom server adapter for publishing Swordfish related components (consumer / provider) to a remote Swordfish server runtime over HTTP. We currently neither support local deployment nor automated publishing in case of resource changes or build events, nor starting or stopping the remote server over the UI. In order to avoid confusion we want to disable the possibility to choose automated publishing as well as start/stop timeout configuration within the overview page for our specific server type.

After a little research I've found the brand new extension point 'org.eclipse.wst.server.ui.serverEditorOverviewPageModifier' which has been introduced with the enhancement request
https://bugs.eclipse.org/bugs/show_bug.cgi?id=296731. This sounds promising as it should enable us to modify existing UI controls or even overview page sections respectively. But the current implementation of "org.eclipse.wst.server.ui.editor.ServerEditorOverviewPageModifier" does only support the modification of the "general" section, not the "publishing" or "timeouts" section of the overview page because  "ServerEditorOverviewPageModifier" are only invoked within "createGeneralSection” method of the "org.eclipse.wst.server.ui.internal.editor.OverviewEditorPart" class. So this currently does not help.

I've also tried the approach of inheriting from "org.eclipse.wst.server.ui.internal.editor.OverviewEditorPart", modifying the desired controls by overwriting the methods "createPublishingSection" and "createTimeoutsSection" and specifying the inheriting class as editorPage of our server type. - But this, of course, is a very bad idea, would depend on internal API and is not working at all.

So my questions are:

- Is there any other possibility to disable "publishing" and "timeouts" configuration (or even the complete sections) within the server editor overview page for our specific server type? Did I miss an existing approach?

- If there is no other approach: Couldn't "OverviewEditorPart" be extended to also invoke "ServerEditorOverviewPageModifier" within the methods "createPublishingSection" and "createTimeoutsSection" just like it is implemented for "createGeneralSection"?

- Would you accept a related patch delivery for Helios if I would try to extend the current implementation to be invoked for the additional overview page sections - or is it too late in the release process for extending this experimental new API yet?

- In general: How I would restrict my "ServerEditorOverviewPageModifier" to only make the desired modifications in case of my specific server type? Shouldn't the extension point provide the possibility to specify server type ids and be invoked only if any ID matches - like editorPages and editorPageSections extension points do? (BTW: The same question regards to the implementation of the extension point "org.eclipse.swordfish.tooling.server.ui.serverCreationWizardPageExtension".)

Thank you very much for your attention.

Best regards
Georg
_______________________________________________
wtp-wst-dev mailing list
wtp-wst-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/wtp-wst-dev



Back to the top