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 23806 - Change "read only" in editor tab to "r/o"
Summary: Change "read only" in editor tab to "r/o"
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 3.x
Hardware: All All
: P3 blocker (vote)
Assignee: _ tboudreau
URL:
Keywords: UI
: 32444 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-05-22 04:48 UTC by Lokesh Shah
Modified: 2008-12-22 20:00 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 Lokesh Shah 2002-05-22 04:48:58 UTC
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
Comment 1 Miloslav Metelka 2002-05-22 14:10:53 UTC
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
Comment 2 Peter Zavadsky 2002-05-23 14:21:40 UTC
Reassigning to ui team, to decide whether it is necessary?

It is in org.openide.text.Bundle.properties,
the LAB_EditorName key.
Comment 3 tthompson 2002-06-01 00:00:18 UTC
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).
Comment 4 Jesse Glick 2002-06-02 21:18:28 UTC
I think that could work too. Not sure if that would require an API
change though.
Comment 5 Marek Grummich 2002-07-22 11:47:06 UTC
Set target milestone to TBD
Comment 6 Marek Grummich 2002-07-22 11:51:35 UTC
Set target milestone to TBD
Comment 7 mslama 2004-04-19 15:04:39 UTC
Assigning to Tim
Comment 8 Jesse Glick 2004-04-28 04:19:48 UTC
*** Issue 32444 has been marked as a duplicate of this issue. ***
Comment 9 Jesse Glick 2004-04-28 04:22:06 UTC
OK, who owns this? No activity for two years? It's a one-line bundle
change, either do it or reject it.
Comment 10 _ tboudreau 2004-04-28 09:23:26 UTC
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).
Comment 11 _ tboudreau 2004-05-06 12:52:14 UTC
FYI, to run an experimental version of HTML-izing tab names, run with:

-J-Dnb.tabnames.html

Comment 12 Jesse Glick 2004-05-06 14:52:24 UTC
Doesn't appear to do anything in dev-040505, did you just add this
feature now?
Comment 13 _ tboudreau 2004-05-06 15:40:19 UTC
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?
Comment 14 _ tboudreau 2004-05-06 15:41:14 UTC
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.
Comment 15 Jesse Glick 2004-05-06 18:41:12 UTC
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
Comment 16 Jesse Glick 2004-05-06 18:43:50 UTC
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.
Comment 17 _ ttran 2004-05-07 10:28:50 UTC
> 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.
Comment 18 Jesse Glick 2004-05-07 22:38:20 UTC
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?
Comment 19 _ ttran 2004-05-07 22:51:24 UTC
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.

Comment 20 _ tboudreau 2004-05-08 01:29:38 UTC
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.
Comment 21 _ tboudreau 2004-05-08 01:34:56 UTC
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)
Comment 22 Jesse Glick 2004-05-08 21:03:55 UTC
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.
Comment 23 Jesse Glick 2004-08-16 17:55:15 UTC
Too late now for 4.0, let's try again for E?
Comment 24 _ tboudreau 2004-08-16 21:02:28 UTC
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.
Comment 25 Jesse Glick 2004-08-16 21:56:30 UTC
I think
openide/loaders/src/org/openide/loaders/Bundle.properties#LAB_EditorName
Comment 26 _ tboudreau 2004-08-17 03:29:13 UTC
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
Comment 27 Jesse Glick 2004-08-17 04:53:29 UTC
So, FIXED then?
Comment 28 Marian Mirilovic 2004-08-19 09:39:12 UTC
read-only should not be visible in title, for more details see issue 44592
Comment 29 Marian Mirilovic 2004-08-19 09:39:40 UTC
x
Comment 30 Jesse Glick 2004-08-19 18:55:28 UTC
x
Comment 31 Jesse Glick 2004-08-19 18:56:09 UTC
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.
Comment 32 Marian Mirilovic 2004-08-24 20:19:42 UTC
verified in [nb_dev](200408231800)