Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 21952 - Do not load classes on startup
Do not load classes on startup
Status: CLOSED FIXED
Product: utilities
Classification: Unclassified
Component: Code
3.x
PC Linux
: P2 (vote)
: 3.x
Assigned To: issues@utilities
issues@utilities
: PERFORMANCE
Depends on:
Blocks: 21676
  Show dependency treegraph
 
Reported: 2002-03-28 16:42 UTC by Jaroslav Tulach
Modified: 2003-07-01 15:31 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments
CVS commit report. (3.81 KB, text/plain)
2002-04-04 07:08 UTC, _ lkramolis
Details
Used .instance files with "instanceOf" attribute name assigned. (3.00 KB, text/plain)
2002-04-04 14:16 UTC, _ lkramolis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2002-03-28 16:42:33 UTC
I am working on issue 21676 and I have run the IDE with this patch
http://www.netbeans.org/issues/showattachment.cgi?attach_id=5081 and the
arguments described there. I have found out that following class is being
loaded into the system on startup. Please investigate why  and
prevent that to happen. Thanks.

org.netbeans.modules.url.BookmarksNode
Comment 1 _ lkramolis 2002-04-03 09:03:31 UTC
Fixed in main trunk.
Comment 2 Jaroslav Tulach 2002-04-04 06:35:44 UTC
Ok, Libor can you tell me what was wrong, I am searching for all ways
that may initialize a module class...
Comment 3 _ lkramolis 2002-04-04 07:08:11 UTC
Created attachment 5284 [details]
CVS commit report.
Comment 4 _ lkramolis 2002-04-04 07:09:44 UTC
See attached CVS commit report. Essentially I changed .instance with
.settings.
Comment 5 Jaroslav Tulach 2002-04-04 08:56:56 UTC
I do not think that replacing .instance with .settings is the best
solution. Processing of .settings takes more time then .instance.

Please continue to use .instance, you can probably use:

<file name="BookmarkNode.instance">
  <attr name="instanceClass" stringvalue="org.openide.nodes.Node" />
  <attr name="instanceCreate"
newvalue="org.netbeans.modules.url.BookmarkNode" />
</file>

which should work the same and not load the class at startup.
Comment 6 _ lkramolis 2002-04-04 09:29:43 UTC
OK, I will revert it to .instance file.

But when you filed this bug I think you should write "'Do not load
classes on startup' bug-fixing guidelines" because I fixed this bug by
.settings files. And if you do not recommend it, you should publish
tips, how to correctly fix it. Thanks.
Comment 7 _ lkramolis 2002-04-04 14:16:37 UTC
Created attachment 5291 [details]
Used .instance files with "instanceOf" attribute name assigned.
Comment 8 _ lkramolis 2002-04-04 14:20:41 UTC
Jardo, I used your proposed solution again by .instance file. I have
extended it with instanceOf attribute name which is necessary:

<attr name="instanceOf" stringvalue="org.openide.nodes.Node,
org.openide.nodes.AbstractNode, org.openide.loaders.DataNode,
org.openide.loaders.DataFolder$FolderNode,
org.netbeans.modules.url.BookmarksNode" />

Is it right now?
Comment 9 Jaroslav Tulach 2002-04-13 14:11:27 UTC
Seems like BookmarkNode is gone. 

Other possible trick is to write 

<attr name="instanceClass" stringvalue="org.openide.nodes.Node" />

then you might skip the instanceOf attribute.
Comment 10 Quality Engineering 2003-07-01 15:31:38 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo