Bug 185853 - [Schema][Editors] Extends and Implements fields are not refreshed correctly
Summary: [Schema][Editors] Extends and Implements fields are not refreshed correctly
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3 RC1   Edit
Assignee: Noam Chitayat CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2007-05-07 16:32 EDT by Simon Archer CLA
Modified: 2007-06-05 18:55 EDT (History)
4 users (show)

See Also:


Attachments
Screen shot (69.74 KB, image/png)
2007-05-07 16:34 EDT, Simon Archer CLA
no flags Details
Patch for bug 185853. (Affects SchemaAttributeDetails.java) (2.29 KB, patch)
2007-05-09 18:18 EDT, Noam Chitayat CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Archer CLA 2007-05-07 16:32:37 EDT
Using Eclipse 3.3 M7.

The Extension Point Schema Editor's Definition page has a bug where the Attribute Details fields "Extends" and "Implements" do not get refresh correctly.  I observed the bug in following scenario:

-- See the attached screen shot --

1.  Open my .exsd file in the Extension Point Schema Editor and turn to the Definition page.

2.  Select an element that does NOT have its "Extends" and "Implements" fields set.  In otherwords, the fields are empty.

3.  Select an element that does have its "Extends" and "Implements" fields set.  In other words, the fields are not empty.

4.  Re-select the element that does NOT have its "Extends" and "Implements" fields set, and you'll see that they look set since the fields were not refreshed correctly when they have no value.

These might not be the only cases.
Comment 1 Simon Archer CLA 2007-05-07 16:34:13 EDT
Created attachment 66212 [details]
Screen shot
Comment 2 Wassim Melhem CLA 2007-05-08 23:58:16 EDT
Noam, replace every instance of the word 'element' with 'attribute' in comment 0, and you have got yourself a scenario.

The Extends/Implements fields appear when the attribute type is set to 'java'
Comment 3 Noam Chitayat CLA 2007-05-09 18:18:07 EDT
Created attachment 66582 [details]
Patch for bug 185853. (Affects SchemaAttributeDetails.java)

Currently, we check if the class and interface attribute exists. If it does not (as would be the case if the attribute is not a Java attribute, or it has no 'extends' or 'implements' values) then we simply did nothing.
If one field has a value, we overwrite that field (except for the case in bug 143874) and do nothing to the other one.

Instead of doing nothing to a field if there is no data with which to populate it, we now actually clear the field value.
Comment 4 Mike Pawlowski CLA 2007-05-09 18:54:06 EDT
I'll review the patch
Comment 5 Mike Pawlowski CLA 2007-05-10 11:01:17 EDT
Works well.  Good job Noam.

Patch applied to HEAD.

Target:  3.3 RC1

Comment 6 Simon Archer CLA 2007-05-10 23:46:15 EDT
Thank you Noam for the prompt fixing of this bug!