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 148180 - org.netbeans.modules.languages classes are loaded on NetBeans startup with LimeWire project
Summary: org.netbeans.modules.languages classes are loaded on NetBeans startup with Li...
Status: RESOLVED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: YAML (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: issues@ruby
URL:
Keywords: PERFORMANCE, TEST
Depends on:
Blocks:
 
Reported: 2008-09-24 10:22 UTC by Alexander Kouznetsov
Modified: 2009-05-22 09:25 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Stacktraces (17.45 KB, text/plain)
2008-09-24 10:23 UTC, Alexander Kouznetsov
Details
Stacktrace (3.75 KB, text/plain)
2008-10-06 12:31 UTC, Alexander Kouznetsov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kouznetsov 2008-09-24 10:22:40 UTC
Performance test reports that the following classes are loaded on NetBeans startup with LimeWare project:

    org.netbeans.modules.languages.dataobject.LanguagesEditorKit$EditorSettings
    org.netbeans.modules.languages.yaml.EmbeddedSectionsHighlighting$Factory
    org.netbeans.modules.languages.yaml.RubyEmbeddingModel
    org.netbeans.modules.languages.yaml.YamlLanguage

Please don't load these classes unless they are really necessary.
Comment 1 Alexander Kouznetsov 2008-09-24 10:23:02 UTC
Created attachment 70422 [details]
Stacktraces
Comment 2 Torbjorn Norbye 2008-09-24 21:38:38 UTC
LanguagesEditorKit comes from Schliemann so I'll let Hanz comment on that one.

The yaml EmbeddingSectionsHighlightingFactory is created because the editor initializes all highlighting factories near
startup. We've discussed this before; this class is reasonably new (for the YAML support) which is why it's showing up
now, but I believe it should be whitelisted.

RubyEmbeddingModel gets loaded because there is an attempt to parse an embedded file (such as a PHP file). In this case,
GSF needs to find an embedding model capable of going from ${source mime type} to ${target mime type}. It does a lookup
on EmbeddingModel to find all the translators. RubyEmbeddingModel is one of them. Arguably, we could use some sort of
mimetype (mime) lookup to declare these things by mimetype in the layer instead - but that isn't done now; instead all
EmbeddingModel implementations are registered in the services/ folder and located using Lookup.

YamlLanguage is loaded because the tasklist is open. The tasklist description takes its name from the registered
languages - thus it iterates over the language names. (This means for example that in the Ruby-only IDE, the task
provider will say "Ruby Hints", whereas in the full IDE it will say something like "Ruby, PHP, Groovy hints". The
display name is provided by the language config object. This could also be converted to a declarative registration in
the layer name.
Comment 3 Torbjorn Norbye 2008-10-02 00:38:34 UTC
I suspect the RubyEmbeddingModel class load was fixed by Martin's fix of issue 148179.

The highlighting factory class loading is done by the editor (and it's a known issue that it initializes all
highlighting containers, there is nothing yaml specific about this.)

The YamlLanguage class is loaded because the tasklist is open, which means the YAML filter is enabled and the display
name is called. This cannot be easily fixed in 6.5.

That leaves the LanguagesEditorKit$EditorSettings class. Since that's unrelated to the languages.yaml support I will
reassign this issue for Hanz to evaluate that specific class. The other classes have been evaluated and this issue can
have its milestone set to "future" when Hanz is done (assuming there is nothing to be done about that specific class).
Comment 4 Alexander Kouznetsov 2008-10-06 12:30:17 UTC
Yes, but one class is still being loaded:
    org.netbeans.modules.languages.yaml.YamlLanguage
Comment 5 Alexander Kouznetsov 2008-10-06 12:31:44 UTC
Created attachment 71195 [details]
Stacktrace
Comment 6 Jan Jancura 2008-10-10 08:18:23 UTC
LanguagesEditorKit$EditorSettings (instance of StorageFilter) is registered in Meta-inf/services in top level lookup.
So, it must be loaded.
Comment 7 Alexander Kouznetsov 2008-11-11 10:06:57 UTC
Comment from jtulach: "No justifiable reason to load YamlLanguage class exists."
Comment 8 Alexander Kouznetsov 2008-12-02 15:55:02 UTC
The following classes are loaded again with 081201:

org.netbeans.modules.languages.dataobject.LanguagesEditorKit$EditorSettings
org.netbeans.modules.languages.yaml.EmbeddedSectionsHighlighting$Factory
Comment 9 Erno Mononen 2009-05-21 14:21:34 UTC
Is this still a problem?
Comment 10 Vitezslav Stejskal 2009-05-22 08:42:03 UTC
I don't think so, AFAIK languages.yaml no longer uses Schliemann framework. IMO it can be closed.
Comment 11 Erno Mononen 2009-05-22 09:25:32 UTC
OK, thanks -- I'm closing this then.