Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 324247 - [Form Editor] User can't remove an extension without modifying source file
Summary: [Form Editor] User can't remove an extension without modifying source file
Status: VERIFIED FIXED
Alias: None
Product: Tigerstripe
Classification: Technology
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 enhancement (vote)
Target Milestone: 0.5M0   Edit
Assignee: Yuri Strot CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-01 16:57 EDT by Navid Mehregani CLA
Modified: 2010-10-15 19:02 EDT (History)
1 user (show)

See Also:


Attachments
Patch (20.72 KB, patch)
2010-10-15 09:53 EDT, Valentin Yerastov CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Navid Mehregani CLA 2010-09-01 16:57:34 EDT
Build Identifier: 

This defect is a regression of bug#320416.  
When something is specified in the extends field of an artifact and file is saved, user isn't able to remove the extension without modifying the source of the artifact.

Reproducible: Always

Steps to Reproduce:
1. In an Entity artifact editor, click on Select for the extends field
2. Select an artifact and save the file.  Try removing the extension without modifying the artifact source! It cannot be done from the editor because we made the text box uneditable.  There should be another way of enabling the user to do this.
Comment 1 Yuri Strot CLA 2010-09-03 05:18:42 EDT
Done.
Comment 2 Navid Mehregani CLA 2010-09-03 12:46:53 EDT
Hi Yuri,

I think you may have misunderstood me on this.  I noticed that you made 'Extends' and 'Implements' fields editable now.  This takes us back to square one.

The value typed in Implements field is not even saved.  If you type in something random in this field, do something else in editor that will make it dirty > save your changes > what you typed in Implements field will be removed!

Here's how this defect should be resolved:

- Both Extends and Implements field should be read-only.  They can only be modified by clicking on 'Select' next to them.
- Clicking on Select will pop up a dialog with a list of items that user can check/uncheck before clicking on OK (note that Implements field already does this). 
- For Extends field, user will only be allowed to check ONE item or uncheck everything.  For Implements field, they would be allowed to check multiple items or uncheck everything (again, this is already done).

For the time being let's leave 'Extends' field editable, until this enhancement is addressed properly.
Comment 3 Valentin Yerastov CLA 2010-09-27 04:38:00 EDT
Hi Navid,

Sorry, I misunderstood your request
"user isn't able to remove the extension without modifying the source of
the artifact."

“modifying the source” - I understood as a change of the source code in Java editor, and to fix it I made an editable “implements” field (“extend” field has already been editable). But only now realized that the ability to edit “extends” field is workaround to simply remove the inheritance, and you actually asked to disable both fields and be able to cancel the inheritance in a modal window to select artifacts inheritance.

I’ll fix it.
Comment 4 Valentin Yerastov CLA 2010-10-15 09:53:43 EDT
Created attachment 180956 [details]
Patch

Done.
Comment 5 Yuri Strot CLA 2010-10-15 13:12:19 EDT
Applied Valentin's patch.
Comment 6 Navid Mehregani CLA 2010-10-15 19:02:07 EDT
Thanks Valentin! Looks good.  I just changed 'without extends' label to 'clear extension'.  Marking as Verified.