Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 337349

Summary: org.eclipse.wst.server.ui.editorPageSection property tester not called on first open
Product: [WebTools] WTP ServerTools Reporter: Mike Reid <mikereid>
Component: wst.serverAssignee: Angel Vera <arvera>
Status: RESOLVED FIXED QA Contact: Angel Vera <arvera>
Severity: major    
Priority: P3 CC: eyuen7, kathy
Version: unspecified   
Target Milestone: 3.2.4   
Hardware: PC   
OS: Linux   
See Also: https://git.eclipse.org/r/109038
Whiteboard:
Attachments:
Description Flags
Proposed patch arvera: iplog+

Description Mike Reid CLA 2011-02-16 14:27:48 EST
If an extension to org.eclipse.wst.server.ui.editorPageSections specifies a property tester as per the enablement element, then the first time that a server editor is opened, the property tester is not called, and so the editorPageSection is unconditionally included in the server editor.

If the server editor is closed, and then re-opened, the property tester is then called from then on.

Tested against org.eclipse.wst.server.ui 1.1.207.v20110119.
Comment 1 Mike Reid CLA 2011-02-22 15:00:21 EST
Created attachment 189537 [details]
Proposed patch

It appears that this occurs if the plugin declaring the enablement test has not yet been activated. The expression framework does not auto-load bundles unless explicitly requested to do so.

This has to be enabled both by the enablement test via the 'forcePluginActivation' attribute, e.g.:

 <enablement>
  <test property="org.myorg.myproperty" 
        value="true" 
        forcePluginActivation="true"/>
 </enablement>         

and this also has to be enabled on the EvaluationContext under which the expression is evaluated. If the EvaluationContext is not enabled then the forcePluginActivation attribute is ignored.

Attached a proposed patch to enable this for each of the editor page extension points.
Comment 2 Kathy Chan CLA 2011-02-22 15:59:48 EST
Angel,

This is affecting an adopting product.  Could you please target this to WTP 3.2.4 if possible?  Thanks!
Comment 3 Kathy Chan CLA 2011-03-28 14:27:26 EDT
This problem is encountered by other adopting products as well.  Raising severity.  If this problem is not fixed, sections in the server editor that should not show up is showing up, causing confusion to the user.

Since the target milestone of this defect is not set yet, I would like to confirm that this is still on target to be delivered in WTP 3.2.4.
Comment 4 Angel Vera CLA 2011-03-30 16:52:08 EDT
The change is simple and provides for better product adoption. Testing didn't show any problems.
Comment 5 Angel Vera CLA 2011-03-30 16:57:45 EDT
Changes committed to 32M
Comment 6 Angel Vera CLA 2011-03-30 22:07:14 EDT
Code released to 32M
Comment 7 Angel Vera CLA 2011-04-19 11:19:10 EDT
Changes committed to HEAD(3.3)
Comment 8 Angel Vera CLA 2011-04-19 15:35:42 EDT
Changes released to HEAD(3.3)
Comment 9 Eclipse Genie CLA 2017-10-11 16:36:15 EDT
New Gerrit change created: https://git.eclipse.org/r/109038