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 22338 - Need global settings
Summary: Need global settings
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Settings (show other bugs)
Version: -FFJ-
Hardware: PC Windows ME/2000
: P2 blocker with 3 votes (vote)
Assignee: issues@editor
URL:
Keywords:
: 29708 31299 37677 40190 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-04-11 23:14 UTC by Jeffrey Norton
Modified: 2007-11-05 13:42 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeffrey Norton 2002-04-11 23:14:51 UTC
Settings common to all or most editors should be settable
globally.  

It is nice I suppose to have the ability to have the java
editor have one setting (for say whether line number are
displayed) and the XML editor to have another.  But I don't
want to have to set it 9 different times for all the 
different editor types.  I want to set it once for all.
If I can then override the setting for the editors that
I want different that would be an additional feature.
Comment 1 Jan Lahoda 2002-04-15 16:18:52 UTC
This may be done for simple properties (like line numbers, other
boolean, integer, indentation engines, and many others, not for
abbreviations, macros, keybindings, fonts&colors and maybe others)
simply by selecting more "* editor" nodes and changing properties.

Comment 2 Jeffrey Norton 2002-04-16 18:39:59 UTC
I agree that a common global setting doesn't make sense for 
all properties.  As I look at it the following properties 
should be settable globally:

All items on the "Expert" tab (these all seem to be common)
Font Size (and default font -- see (*) below)
Line Numbers
Tab Size
Key Bindings (see (**) below)

(*) In addition to the basic font size it would be
advantages to have a common default font.  This is similar 
to a base style used by many word processors these days.

(**) You may want special key bindings for different 
editors (as you may want special settings for any of the 
items that can be set globally) but many of the key 
bindings are going to be common.  You most likely want to 
set the copy-to-clipboard binding once for instance.  
Comment 3 Miloslav Metelka 2002-04-17 11:09:30 UTC
I see other candidates for global settings too. For example it should
be possible to define a common highlighting of the token categories
e.g. it should be possible to define the "keyword" highlighting just
once for all the languages such as  java, c++.
 IMHO We should find out some generic visual mechanism for
inheriting/overriding the editor settings. Although the underlying
Settings class allows both settings inheritance and programatic
evaluators (for using the value of some other setting), the visual
level does not benefit from it. We would probably have to tweak either
each property editor or the whole property sheet in some way or both.
 I think that we need some deeper research/discussion/proposal here.
Comment 4 Jan Lahoda 2002-05-09 09:27:20 UTC
So, I probably did not say it well:
You *can* set simple properties for more editors right now (3.3.1 for
sure). It works for boolean, integer, Insets and other "simple"
properties. It does not work for complex properties such as
abbreviations and macros. Just:
Select more editor nodes (Java Editor+HTML Editor) and try to change
the properties.

The KeyBindings are a bit special. There are global keybindings, try
to look here: Tools/Options/Editing/Editor Settings.

But, I would like to see something more reliable - currently when try
to multi-edit "Macros" (etc.), an exception is thrown (probably
harmless, but you can not edit this property). It is not nice.
Comment 5 Marek Grummich 2002-07-22 10:01:35 UTC
Set target milestone to TBD
Comment 6 Marek Grummich 2002-07-22 10:07:42 UTC
Set target milestone to TBD
Comment 7 Martin Roskanin 2003-05-30 13:36:24 UTC
*** Issue 29708 has been marked as a duplicate of this issue. ***
Comment 8 Mike Cepek 2003-08-25 19:08:04 UTC
This continues to be a desired issue as NB 3.5.1 is 
released.

I have a UI implementation suggestion which, I believe, 
naturally offers the two levels of inheritance which is the 
core of this issue:

- Add a new item under "Editor Settings" called "Editor 
Defaults".  The properties settable here would be the union 
of all properties for all Editors.  Each row could have a 
read-only pull-down called "Used by..." to see which 
editors make use of each property.  Or perhaps use a hover.

- Let simple customizers allow inheritance from the "Editor 
Defaults" (like the "Inherit" checkbox, but label 
it "Inherit Editor Default" for clarity).

- For customizers with named property sets (like "Fonts and 
Colors"), change the name of any "Default" property set to 
be named after the specific editor (e.g. "Java Defaults").  

- Allow three inheritance choices for each property in 
customizers with property sets (via radio buttons instead 
of the "Inherit" checkbox):
   o Inherit Editor Defaults
   o Inherit XXX Defaults
   o Don't inherit

By making sensible default choices as the NetBeans initial 
defaults, users will find it easy to change any setting at 
any level.  For example, all font and font size settings 
would initially inherit from the Editor Defaults; this 
allows the font and font size for all editors to be set in 
one place.  The font styles (italic, bold, etc) would have 
no inheritance since they are specific to each XXX Editor.
Many font colors would inherit from "XXX Editor" as they do 
now.

There also needs to be some improved separation between 
related properties.  Issue 35751 illustrates colors 
changing when a font is changed (a bug).  But font styles 
also get reset (losing the bold or italic settings) when 
the font is changed -- wrong!  I can see that happening if 
you select a font that has no such styles, but then a 
dialog about losing those settings is necessary.

I find the existing Font customizers to be nearly useless.  
I want to change the font for ALL one editors, since my 
projects use many types of files.  But when I change the 
font type, the font styles get reset, so I would have to re-
enter all the italic and bold settings (there are dozens of 
them to first write down, and then manually restore).

Well, enough whining (sorry).  I hope my implementation 
suggestion above will be helpful.  Thanks.
Comment 9 psuk 2004-03-23 19:59:37 UTC
Changing subcomponent to "setting"


Comment 10 Martin Roskanin 2004-11-12 14:57:15 UTC
*** Issue 40190 has been marked as a duplicate of this issue. ***
Comment 11 Martin Roskanin 2004-11-12 14:58:23 UTC
*** Issue 37677 has been marked as a duplicate of this issue. ***
Comment 12 Roman Strobl 2005-04-22 10:45:13 UTC
-------------%<-------------
If you select all the  editors ( or just some ) in the Editor Settings branch
the common properties are shown and modifiable as a group.  This appears to work
quite well.  I haven't done an extensive test of this but I didn't find any show
stoppers.  Satisfied my questions anyway.

Not sure at this point if any further NB code enhancements are required.
Improved documentation with a couple of solid examples are needed.  A
verification test case or two may be all that is needed to close out this
enhancement.. 
-------------%<-------------

Interesting, I didn't know we support changing parameters of multiple editors! I
have tested it and it works well for simple fields - numbers or checkboxes. So
you can change globally the default font size or highlight caret row or other
important parameters. The Tools | Options dialog will be hopefully redesigned in
the future and there we should have a more intuitive way of setting such parameters.

CCing Patrick, Patrick, we need to put this into documentation and help (that
users can change settings over multiple editors using multiselection). I'll keep
this RFE opened so that we do not forget about it when designing new Options dialog.

Thanks!
Comment 13 Max Sauer 2005-08-19 13:49:28 UTC
*** Issue 31299 has been marked as a duplicate of this issue. ***
Comment 14 Vitezslav Stejskal 2006-07-02 22:56:22 UTC
The redesigned Tools/Options dialog is out there since 5.0 (I believe) and I
think it addressed all the issues described here. If there is anything specific
that has not been covered please file a sperate RFEs. Thanks.