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

Bug 57551

Summary: Visual Editor: Press <Delete> key in the graph viewer has an impact on the source viewer.
Product: z_Archived Reporter: Suwit Srivilairith <suwits>
Component: VEAssignee: Gili Mendel <gmendel>
Status: CLOSED DUPLICATE QA Contact:
Severity: major    
Priority: P3 CC: camle
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Bug 57551 screen capture none

Description Suwit Srivilairith CLA 2004-04-06 06:25:03 EDT
OS:  Windows 2003/Windows XP
Language: Thai
Build level:  Eclipse 3.0 M8 build 200403261517
JDK version:  IBM JDK 1.4.2 Beta
Test case #:   Enablement testing for the Visual Editor 
Summary: Press <Delete> key in the graph viewer has an impact on the source 
viewer.

Steps to recreate problem:
1- Create Java project and select File->New->Visual Class.
2- Select the frame option under the Which visual class would you like to 
extend? section. Then select the Swing checkbox.
3- Type the class name and click Finish button.
4- Visual Editor will open JFrame in the graph viewer and source code in the 
source viewer.
5- Click two times on the title bar of JFrame and enter text on the text box 
opens up on the top left corner of the JFrame.
6- Try to use the delete key to delete text on the text box.

Error:  
character in source viewer will be removed instead of character in text box at 
the graph viewer.

Expected Result: 
character on text box at the graph viwer should be deleted when press <Delete> 
key at text box.

This problem is common, not specific to Thai language.

Please investigate.
Thanks,
Suwit
Comment 1 Suwit Srivilairith CLA 2004-04-06 06:44:37 EDT
Created attachment 9244 [details]
Bug 57551 screen capture
Comment 2 Randy Hudson CLA 2004-04-16 14:24:05 EDT
The current action handler for the delete global action is getting run.  This 
prevents any control from receiving the delete key.

*** This bug has been marked as a duplicate of 58899 ***
Comment 3 Randy Hudson CLA 2004-04-19 15:09:15 EDT
GEF will be setting doit==false when DEL key is pressed.  This will comply to 
the new 3.0 behavior.  However, VE should be re-mapping the global action 
handler based on which control has focus.  At any time the user may either 
press DEL key, or use the Edit menu and select Delete.  The behavior *should* 
be the same.
Comment 4 Peter Walker CLA 2004-04-20 16:44:18 EDT
Gili... I think this is related to the other defect you fixed w.r.t. using the 
delete key for removing a component in the graph viewer. This problem still 
occurs for this case (i.e. delete characters in direct edit mode).
Comment 5 Gili Mendel CLA 2004-04-21 18:09:45 EDT
I had put a work around in Bug 56840 to hack into the (DEL) command ....
Rich/Randy note that there is a formal manner to change scope on the fly, it
needs to be done, and will use 56840 to complete this properly.

In any case the reason the workaround is not working in the direct edit case, is
that the GraphicalEdit part loses focus (and hence re-enable the JavaEditor's
DEL action).  The  (GEF) Direct edit canvas itself have to set doit=false so
that the DEL key that was sent to it, is not pass on forward.   




*** This bug has been marked as a duplicate of 59543 ***
Comment 6 Richard Kulp CLA 2004-05-03 17:33:27 EDT
M1 released, move all resolved to Verified, as prelude to closing.
Comment 7 Richard Kulp CLA 2004-05-03 17:37:03 EDT
M1 released, move all resolved/verified to Closed.