This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 91288 - Can't change last char between guarded blocks
Summary: Can't change last char between guarded blocks
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@editor
URL:
Keywords:
: 109488 120127 136523 143606 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-12-19 16:56 UTC by Tomas Pavek
Modified: 2009-02-19 20:45 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Pavek 2006-12-19 16:56:06 UTC
The new code customizer in form editor allows to edit the code of property
values inside the guarded blocks. E.g. add a JButton to a form and invoke
Customize Code from context menu. Use combo box on the left to switch to "custom
property" for the text property:

jButton1.setText("jButton1");

Now part of the line - "jButton1" - is unguarded and selected. Try to type
something - only the first char appears (that replaces the selected text). Now
you can't edit on the last position before the guarded block (that should still
be editable). It only works for the very first char placed between the guarded
blocks.
Comment 1 Vitezslav Stejskal 2006-12-19 20:08:12 UTC
Honzo, you probably know the most about guarded blocks at the moment. Could you
please have a look at this? Is it java or editor problem? Thanks
Comment 2 Jan Pokorsky 2006-12-20 12:40:29 UTC
I guess this has nothing to do with the editor/guards but with the
GuardedDocument. You use NbDocumen.markGuarde/unmarkGuarded in order to permit
custom editing, don't you?
Comment 3 Tomas Pavek 2006-12-20 14:26:24 UTC
Yes.
Comment 4 Jan Pokorsky 2006-12-20 15:04:24 UTC
Then it is most likely a GuardedDocument's bug in the editor module.
Comment 5 Tomas Pavek 2007-07-12 13:26:28 UTC
*** Issue 109488 has been marked as a duplicate of this issue. ***
Comment 6 Jan Stola 2007-10-31 17:43:29 UTC
*** Issue 120127 has been marked as a duplicate of this issue. ***
Comment 7 Jiri Prox 2008-04-11 00:44:38 UTC
moving opened issues from TM <= 6.1 to TM=Dev
Comment 8 Jan Stola 2008-06-05 08:53:51 UTC
*** Issue 136523 has been marked as a duplicate of this issue. ***
Comment 9 Jan Stola 2008-08-12 13:10:42 UTC
*** Issue 143606 has been marked as a duplicate of this issue. ***
Comment 10 Tomas Pavek 2008-08-12 14:41:28 UTC
Editor guys, is this difficult to fix? It significantly affects usability of the Customize Code dialog - people can't 
enter custom code for property values, the workaround is not obvious. The editor does not allow to insert character 
between guarded blocks at the last position.

Would be nice if the target milestone 6.5 is right and the fix is planned :). Thanks
Comment 11 Vitezslav Stejskal 2008-08-18 09:54:44 UTC
Just for the record, there is also a problem with guarded sections painting - see issue #135496.
Comment 12 Tomas Pavek 2008-08-19 15:53:25 UTC
As for the sections painting, isnt' it issue 133826? That's probably even more important - happens very often.
Comment 13 _ gtzabari 2008-11-20 19:16:32 UTC
I'm just wondering, who is working on this issue? The workaround is rather bad and guard blocks are already annoying to
work with. Please don't let this bug slip yet another release.
Comment 14 Petr Dvorak 2009-02-04 11:06:33 UTC
This seems to be already fixed in the latest dev build (probably after the fix of the famous "off-by-one bug" reported 
by gtzabari).

Can you please have a look at it (and verify), tpavek?
Comment 15 Tomas Pavek 2009-02-04 12:17:29 UTC
This is the "off-by-one bug". The issue reported by gtzabari (153486) is the same thing, in addition it revealed that 
guarded blocks can be deleted via Ctrl+DEL. Thanks to that the off-by-one bug was fixed too.
Comment 16 Petr Dvorak 2009-02-04 12:26:11 UTC
Yes, I thought so;)... closing as fixed.