Community
Participate
Working Groups
If you delete a component either from the canvas or a container, it deletes the field, the getter/initialization method and one character beyond the method causing compile errors if the extra character is not a blank. Create a class extending JPanel and drop a JButton onto it. Select the button and delete it using the delete key. The button source code is delete and also the closing brace for the class is deleted. Note: if you delete the button using any other mechanism it works fine (e.g. MB2-->Delete; the Delete icon on the toolbar; etc.).
*** Bug 57022 has been marked as a duplicate of this bug. ***
It seems that Eclipse now binds a "org.eclipse.ui.edit.delete" command to the DEL key. Not sure if the code is complete, but the CU editor uses an inner, package protected class (AdaptedSourceViewer() from createJavaSourceViewer()) as the ITextOperationTarget.class target for the (withing the rest) delete command. To get a stable M8 build, I put a workaround (hack) to disable this command when the JavaSource pane is not in focus, and enable it back when it is. ... had to use reflection to get into the Command's API. I am leaving this defect open so that we can fix it properly later on, but for now, it is not a blocker anymore because the delete is working properly with this hack (see the focusListener in the JavaVisualEditorPart) Rich, open a bugzilla on JDT, if you feel that we need AdaptedSourceViewer to be protected (not package protected).
Hm' since my inital one (57022) is directed to this one I wanna add an new issue with the solution here which is in 1.0 RC1: I add a button on a panel, Click on the Button and a Text-Field appears. I press DEL-Key and !!!! a character in the Code-pane is deleted. Quite NAUGHTY because this is at ANY place of the Text!!!! Perhaps a better solution is required.
This is an SWT problem that GEF will try to work around. They are aware of it and it will be coming in a later GEF driver.
I can longer recreate this problem on the latest VE code base. Either GEF fixed this or some other code took care of it. I tried deleting the component using the delete key which worked fine... leaving the code intact. I also tried the scenario with changing the text of a component using direct edit (using the little text field) and this worked fine also.
Setting to 1.0M3 for ship.
Now that 1.0 is released, marking as verified.
Now that 1.0 is released, marking as closed.