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 21674 - Two not consistent indentation engines lists
Summary: Two not consistent indentation engines lists
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Options&Settings (show other bugs)
Version: 3.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: Jan Pokorsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-03-18 16:43 UTC by Jan Lahoda
Modified: 2008-12-23 13:39 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
place the patch under lib/patches (31.04 KB, application/octet-stream)
2002-05-02 17:28 UTC, Jan Pokorsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Lahoda 2002-03-18 16:43:28 UTC
Note: This might be a duplicate of Issue #19707.

Tested on 3.3.1 fcs, JDK1.3.1
1. Go into the editor and perform Reformat (Ctrl-Shift-F) (not sure whether
necessary).
2. Go into: Tools/Options/Editing/Indentation Engines
3. Rename the "Java Indentation Engine" (when renaming,
you will see "code name" of the service (see Issue #17247). This is probably
harmless.)
4. Copy&paste the indentation engine, and rename the new copy.
5. Now, change property "Number of spaces per tab" to different values
(let each of the indent engines have different value, and also
different from the default).
6. Now, you see under Tools/Options/Editing/Indentation Engines two engines
of the JavaIndentationEngine with different settings.
7. Go into: Tools/Options/Editing/Java Editor/Indentation Engine, and press
elipsis. You will see, that there are also two indentation engines of type
JavaIndentationEngine, but one of them will be missing in previous list,
and one from previous list will be missing here. This can be proven
by checking properties.
Comment 1 Jan Lahoda 2002-05-02 09:30:23 UTC
So, just found that the same applies to Compilers
(Options/Building/Compiler Types). As services can be used "External
compiler", as identifying property can be used "Encoding" and the list
from point 7 can be used from "Execution" tab of any Java source.
Build 200205020100, Solaris 8. Rising priority and re-assigning to core.
Comment 2 Jan Lahoda 2002-05-02 11:33:53 UTC
I was playing with this a bit now, and found that what is wrong is the
copy&paste of the service (part of point 4). The other steps are not
necessary.
A little better description what seems to happen:
It seems that there are three instances of the service after
copy&paste. One is shared in both lists (as supposed) - this is the copy.
The other two are one in each list. In the list from "Execution" tab,
there is a brand new default instance, in the list in the options,
there is original instance (the one created in the IDE start).
Comment 3 _ ttran 2002-05-02 12:58:09 UTC
Settings problem? Honzo, can you please evaluate?  Thanks
Comment 4 Jan Pokorsky 2002-05-02 17:15:23 UTC
Here is my evaluation. The culprit is InstanceDataObjcet that resets 
original ServiceType after its copying to null.

I've prepared 4-lines fix solving the issue.
Comment 5 Jan Pokorsky 2002-05-02 17:28:56 UTC
Created attachment 5626 [details]
place the patch under lib/patches
Comment 6 Jan Pokorsky 2002-05-02 17:31:10 UTC
Jan L. can you verify the patch with orion-fcs please?
Comment 7 Jan Pokorsky 2002-05-02 18:55:47 UTC
Fixed in the trunk.

http://openide.netbeans.org/source/browse/openide/src/org/openide/load
ers/InstanceDataObject.java.diff?r1=1.125&r2=1.126
Comment 8 Marian Mirilovic 2002-05-03 08:48:04 UTC
Honza, verify this one please. Thanks.

Do you really want get it into Orion ?
Comment 9 Jan Lahoda 2002-05-03 08:54:33 UTC
I verified in on 200205030100 (orion not yet). (btw: found a small
bug, probably in editor, related to this: Issue #23081.)
Comment 10 Jan Lahoda 2002-05-03 12:23:30 UTC
Using the attached patch, the problem disapeared from orion (build
020501_1).
Comment 11 Jan Pokorsky 2002-05-03 13:22:03 UTC
integrated in orion_fcs and release33 branches.

http://openide.netbeans.org/source/browse/openide/src/org/openide/load
ers/InstanceDataObject.java.diff?r1=1.113.2.7&r2=1.113.2.7.4.1

http://openide.netbeans.org/source/browse/openide/src/org/openide/load
ers/InstanceDataObject.java.diff?r1=1.113.2.7&r2=1.113.2.8
Comment 12 Jan Lahoda 2002-05-06 13:11:31 UTC
Verified in orion 20020505, EE.
Comment 13 Quality Engineering 2003-07-01 16:17:35 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.