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 199568 - Define empty begin/end COMMIT_GROUP behavior, add MARK_COMMIT_GROUP
Summary: Define empty begin/end COMMIT_GROUP behavior, add MARK_COMMIT_GROUP
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Text (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords: API, API_REVIEW_FAST
Depends on:
Blocks: 179047 150251 199699
  Show dependency tree
 
Reported: 2011-06-21 05:47 UTC by err
Modified: 2011-07-19 13:55 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
as described in bug summary (16.59 KB, patch)
2011-06-21 06:35 UTC, err
Details | Diff
updated to include fix for bug 199699 (16.97 KB, patch)
2011-06-26 17:13 UTC, err
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description err 2011-06-21 05:47:34 UTC
The fix for bug 150251 uses BEGIN/END_COMMIT_GROUP. It uncovered an issue with nesting empty commit-groups; see bug 150251 comment 5 for details. The attached patch clarifies, and fixes, an incompletely defined situation; MARK_COMMIT_GROUP is added to the API to fill the gap. Tests are added.

The behavior when a nested empty begin/end is different, they are now ignored. Since UndoGroupManager is new and hardly used, I didn't flag this as a semantic change; if you want this flagged as a change, I'll need details on how/where to describe it. Note that with this change, the old tests all still pass.
Comment 1 err 2011-06-21 06:35:22 UTC
Created attachment 109007 [details]
as described in bug summary
Comment 2 err 2011-06-22 14:05:02 UTC
I'm unclear about procedure to get this patch considered. I know there are various keyword and whiteboard flags. Someone please advise?

IMO, it is low risk and should only affect things when jVi is active. Can it get considered for 701?
Comment 3 Jesse Glick 2011-06-24 14:40:25 UTC
(In reply to comment #2)
> I'm unclear about procedure to get this patch considered. I know there are
> various keyword and whiteboard flags. Someone please advise?

Looks OK as far as that goes. (I am not knowledgeable enough to comment on the actual content of the patch.)

> it is low risk

Anything making several logic changes to such a critical class as CloneableEditorSupport cannot be considered low risk.

> Can it get considered for 701?

7.0.1 is in high resistance, accepting only priority bug fixes <http://wiki.netbeans.org/NB701HighResistance>, so I do not think so.
Comment 4 err 2011-06-24 15:03:57 UTC
(In reply to comment #3)
> (In reply to comment #2)
> 
> > it is low risk
> 
> Anything making several logic changes to such a critical class as
> CloneableEditorSupport cannot be considered low risk.

Sigh. Guess I should have originally put the UndoGroupManager class in a separate file package private rather than a nested static class ;-)

> 
> > Can it get considered for 701?
> 
> 7.0.1 is in high resistance, accepting only priority bug fixes
> <http://wiki.netbeans.org/NB701HighResistance>, so I do not think so.

"Timing is everything". At least now I know how to build an nbm with a patch in it.
Comment 5 err 2011-06-26 17:13:00 UTC
Created attachment 109114 [details]
updated to include fix for bug 199699

Updated patch with fix for bug 199699. The control edits BEGIN/END_COMMIT_GROUP always return true for canUndo/canRedo.
Comment 6 err 2011-06-26 17:24:55 UTC
Bug 199700 is another undo issue with properties editor. The changes in this patch are not in conflict with any fix for that.

I believe the right fix for that is to first move UndoGroupManager into UndoRedo.Manager as discussed in that issue. A fix for that could be incorporated into this patch. For policy and procedural reasons, handling them separately may be preferred.
Comment 7 err 2011-07-05 16:35:37 UTC
Re-assigning after review period.

I urge you to consider this.

After commit, this and Bug 199700 can be resolved.
Comment 8 Jaroslav Tulach 2011-07-17 08:34:40 UTC
Integrated as ergonomics#971cca9637b5
Comment 9 err 2011-07-17 15:11:22 UTC
(In reply to comment #7)
> After commit, this and Bug 199700 can be resolved.

Oops, it is 199699 to relolve. I am doing that now
Comment 10 Quality Engineering 2011-07-19 13:55:28 UTC
Integrated into 'main-golden', will be available in build *201107190600* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/971cca9637b5
User: err@netbeans.org
Log: #199568: Define empty begin/end COMMIT_GROUP behavior, add MARK_COMMIT_GROUP