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.
In NB3.3.1, the editor shows [read only] in the editor tab for read only files. This takes up valuable space on the tab. Please change it to r/o
I guess this belongs to openide/text - I think it's only necessary to change the bundle org.openide.text.Bundle.properties. Reassigning to openide
Reassigning to ui team, to decide whether it is necessary? It is in org.openide.text.Bundle.properties, the LAB_EditorName key.
Can't you change the icon to indicate that it is read only? The [read only] thing is annoying and [r/o] would be better but I think it could be gotten rid of completely (i.e. change the icon).
I think that could work too. Not sure if that would require an API change though.
Set target milestone to TBD
Assigning to Tim
*** Issue 32444 has been marked as a duplicate of this issue. ***
OK, who owns this? No activity for two years? It's a one-line bundle change, either do it or reject it.
Preferable would probably be to use HTML, and use greyed out for read only, bold for modified. Changing to defect (makes tabs too big and that way it'll stay on my radar screen) and setting milestone to promo d. We'll either do this or the html thing (also filed somewhere).
FYI, to run an experimental version of HTML-izing tab names, run with: -J-Dnb.tabnames.html
Doesn't appear to do anything in dev-040505, did you just add this feature now?
Works for me on yesterday's sources; was integrated with the tab control merge. Do you not get a bold font if a file is modified and unsaved?
OT: BTW we should consider ditching ".java" in tab names. Fine in explorer, but makes the tabs unnecessarily wide in the editor - icon and looking at the file should be enough to tell what it is there.
No, I don't get a bold font for modified files with that flag... I don't get anything. I am using dev-040505, maybe I need something newer? Ah maybe you mean -J-Dnb.tabnames.html=true rather than -J-Dnb.tabnames.html
Yes, works with the correct flag. Very nice. Buglet (I think I have mentioned this long ago): modifying a file and thus boldfacing the name increases the tab width slightly, which is a little visually disturbing. I guess the font metrics change somehow. Re. hiding ".java" in tab names - reasonable but for which file types should we do so? Need the full file name with extension for *some* file types.
> Buglet (I think I have mentioned this long ago): modifying a file and > thus boldfacing the name increases the tab width slightly, which is a > little visually disturbing. I guess the font metrics change somehow. I guess the algorithm for getPreferredSize for the tab can be changed to use bold font, ie make it a bit wider even if the font is not bold yet.
BTW the use of bold and italics for modified and r/o feels *much* nicer to me. I have been using this flag for a few days and like it. Can we make this the default?
I like it too and personally see no problem turning it on. But the current implemenation is really a hack, see Tim's comment in the code.
If you can convince Jarda that we need TopComponent.getHtmlDisplayName() (or have another suggestion for how get at the modified and read-only status info from the winsys which just has a TopComponent to play with) :-) What's there now is a dirty hack that strips out asterisks and "[read-only]" in WindowManagerImpl. Actually if I knew what bundle to get the key from, it could be done that way at least for now (yet another cross-package, cross-module bundle reference - oh yeah! I spent a couple hours trying to blow away all our hundreds of dead bundle keys, and finally gave up). Then again, it would likely do no harm in other locales (is * a legal filename anywhere [on VMS I suppose...]? Is there any language in which "[read-only]" is a likely file name? It would be better to do it right, but I'm not above hacks if we can prove they will do no harm.
While we're fixing that, we could also take care of filename extensions in tab names (they make sense in Explorer, they just make tabs bigger, and multi-views should solve most cases like form vs. .java)
Let's leave filename extensions in tabs out of this - another issue. Re. TopComponent.getHtmlDisplayName - OK, why not? If we can use it, file a fast-track apireview and let's add it and do it properly. There's no need to hack anything.
Too late now for 4.0, let's try again for E?
Well, read-only -> r/o is easy and won't kill anyone to do now. The problem is, where the heck is it? I've grepped the entire source base and found myriad occurances of that phrase, but haven't been able to figure out which one it is.
I think openide/loaders/src/org/openide/loaders/Bundle.properties#LAB_EditorName
As originally defined, this issue is fixed. I've created issue 47290 to track the nb.tabnames.html stuff. Checking in core/windows/src/org/netbeans/core/windows/WindowManagerImpl.java; /cvs/core/windows/src/org/netbeans/core/windows/WindowManagerImpl.java,v <-- WindowManagerImpl.java new revision: 1.28; previous revision: 1.27 done Processing log script arguments... More commits to come... Checking in openide/loaders/src/org/openide/loaders/Bundle.properties; /cvs/openide/loaders/src/org/openide/loaders/Bundle.properties,v <-- Bundle.properties new revision: 1.12; previous revision: 1.11 done
So, FIXED then?
read-only should not be visible in title, for more details see issue 44592
x
Issue #44592 is about whether the annotation should appear at all. This is just about the text of it, which was indeed fixed to be shorter, whether or not it is ultimately removed anyway.
verified in [nb_dev](200408231800)