Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!

Bug 199568

Summary: Define empty begin/end COMMIT_GROUP behavior, add MARK_COMMIT_GROUP
Product: platform Reporter: err <err>
Component: TextAssignee: Jaroslav Tulach <jtulach>
Status: RESOLVED FIXED QA Contact: issues <issues.netbeans.org>
Priority: P3 CC: dbalek, jglick, jtulach, mmetelka
Version: 7.0Keywords: API, API_REVIEW_FAST
Target Milestone: 7.1   
Hardware: All   
OS: All   
Whiteboard:
Issue Type: DEFECT Exception Report:
Bug Depends on:    
Bug Blocks: 179047, 150251, 199699    
Attachments: as described in bug summary
updated to include fix for bug 199699

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
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo