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 171428

Summary: Need common method to mark modified & r/o status on files
Product: platform Reporter: Jesse Glick <jglick>
Component: TextAssignee: Jesse Glick <jglick>
Status: RESOLVED FIXED    
Severity: blocker CC: apireviews, raccah
Priority: P1 Keywords: API, API_REVIEW_FAST
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on:    
Bug Blocks: 47290    

Description Jesse Glick 2009-09-03 18:18:13 UTC
DataEditorSupport marks up editor tabs with modified and/or r/o status according to a nontrivial algorithm, made more
complex by the possibility of disabling issue #47290. This code is duplicated in several modules which use custom editor
components, such as form (due to use of multitab) and properties (for historical reasons in the editor, and also in the
table view). A public utility method is needed to centralize the implementation.
Comment 1 Jesse Glick 2009-09-03 22:11:43 UTC
core-main #fb38741d5a80

Apologies for the lack of actual review, but was asked to get in #47290 before feature freeze. If there are any
objections or comments I can address them, at the very worst by copying the impls of the new methods into the calling
modules.
Comment 2 Rochelle Raccah 2009-09-04 02:30:00 UTC
Please include a link to an example of usage.
Comment 3 Jaroslav Tulach 2009-09-04 09:14:29 UTC
Y01 Making "static boolean TABNAMES_HTML" final would allow the client HotSpot compiler to throw away half of the 
annotateNameMethod and toolTip methods code during their compilation.

Comment 4 Jesse Glick 2009-09-04 14:57:04 UTC
The changeset includes several examples.

Y01 - yes but then the unit test cannot change it.
Comment 5 Rochelle Raccah 2009-09-04 20:58:58 UTC
I was looking for a link to the changeset.  In case it is useful to others, here it is:
http://hg.netbeans.org/core-main/rev/fb38741d5a80
Comment 6 Quality Engineering 2009-09-07 17:06:27 UTC
Integrated into 'main-golden', will be available in build *200909071104* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/fb38741d5a80
User: Jesse Glick <jglick@netbeans.org>
Log: Issue #171428: centralized convenience API to compute tab label information based on data object r/o & modified status.
Comment 7 Jesse Glick 2009-09-09 17:28:09 UTC
raccah - you can wait for a production build to incorporate a changeset, or just install

http://wiki.netbeans.org/BrowserTools#section-BrowserTools-LinkToMercurialChangesets