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 173018

Summary: Don't load javafx.source.tasklist.FXErrorAnnotator at startup
Product: javafx Reporter: Oleg Khokhlov <ovk>
Component: EditorAssignee: J Bachorik <yardus>
Status: VERIFIED FIXED    
Severity: blocker CC: issues, jtulach
Priority: P2 Keywords: PERFORMANCE, REGRESSION, TEST
Version: 6.x   
Hardware: All   
OS: Windows XP   
URL: http://wiki.netbeans.org/FitnessViaWhiteAndBlackList
Issue Type: DEFECT Exception Reporter:
Bug Depends on: 179459    
Bug Blocks:    

Description Oleg Khokhlov 2009-09-24 14:00:53 UTC
Performance test reports that the following classes loaded during startup:

org.netbeans.modules.javafx.source.tasklist.FXErrorAnnotator


Comment from jtulach: "Report P2 against this class. It is (mis)using masterfs friend API designed 
for version control systems for some strange purposes. As a result every 
operation on every FileObject is slowed down by consulting JavaFX is it is OK 
to perform it. That is not acceptable."

Build 20090922

test: ant in ide.kit/tests/whitelist

<violator class="org.netbeans.modules.javafx.source.tasklist.FXErrorAnnotator">
<stacktrace instantiator="SystemClassLoader[664 modules]">
          org.netbeans.test.ide.BlacklistedClassesHandlerSingleton.publish(BlacklistedClassesHandlerSingleton.java:352)
          java.util.logging.Logger.log(Logger.java:452)
          java.util.logging.Logger.doLog(Logger.java:474)
          java.util.logging.Logger.log(Logger.java:538)
          org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:188)
          java.lang.ClassLoader.loadClass(ClassLoader.java:251)
          java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
          java.lang.Class.forName0(Native Method)
          java.lang.Class.forName(Class.java:242)
          org.openide.util.lookup.MetaInfServicesLookup.search(MetaInfServicesLookup.java:261)
          org.openide.util.lookup.MetaInfServicesLookup.beforeLookup(MetaInfServicesLookup.java:120)
          org.openide.util.lookup.AbstractLookup$R.beforeLookup(AbstractLookup.java:1124)
          org.openide.util.lookup.ProxyLookup$R.myBeforeLookup(ProxyLookup.java:653)
          org.openide.util.lookup.ProxyLookup$R.computeResult(ProxyLookup.java:518)
          org.openide.util.lookup.ProxyLookup$R.allInstances(ProxyLookup.java:489)
         
org.netbeans.modules.masterfs.filebasedfs.FileBasedFileSystem$StatusImpl.resultChanged(FileBasedFileSystem.java:241)
          org.netbeans.modules.masterfs.filebasedfs.FileBasedFileSystem$StatusImpl.<init>(FileBasedFileSystem.java:232)
          org.netbeans.modules.masterfs.filebasedfs.FileBasedFileSystem.<init>(FileBasedFileSystem.java:74)
          org.netbeans.modules.masterfs.filebasedfs.FileBasedFileSystem.<clinit>(FileBasedFileSystem.java:72)
          org.netbeans.modules.masterfs.filebasedfs.FileBasedURLMapper.getFileObjects(FileBasedURLMapper.java:128)
          org.netbeans.modules.masterfs.MasterURLMapper.getFileObjects(MasterURLMapper.java:62)
          org.openide.filesystems.URLMapper.findFileObject(URLMapper.java:213)
          org.openide.filesystems.FileUtil.toFileObject(FileUtil.java:893)
          org.openide.filesystems.FileUtil.getDiskFileSystemFor(FileUtil.java:128)
          org.openide.filesystems.FileUtil.addFileChangeListener(FileUtil.java:182)
          org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.start(RepositoryUpdater.java:158)
          org.netbeans.modules.parsing.impl.Installer.restored(Installer.java:29)
          org.netbeans.core.startup.NbInstaller.loadCode(NbInstaller.java:440)
          org.netbeans.core.startup.NbInstaller.load(NbInstaller.java:361)
          org.netbeans.ModuleManager.enable(ModuleManager.java:917)
          org.netbeans.core.startup.ModuleList.installNew(ModuleList.java:289)
          org.netbeans.core.startup.ModuleList.trigger(ModuleList.java:225)
          org.netbeans.core.startup.ModuleSystem.restore(ModuleSystem.java:276)
          org.netbeans.core.startup.Main.getModuleSystem(Main.java:168)
          org.netbeans.core.startup.Main.start(Main.java:309)
          org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:111)
          java.lang.Thread.run(Thread.java:595)
</stacktrace>
</violator>
Comment 1 Petr Nejedly 2009-11-09 10:00:29 UTC
JavaFX support uses the same annotation mechanism as Java does, as there's nothing else currently available. Yarda promised to provide a solution for this later, so I'm marking this as NO68. This is not a functional problem for JavaFX plugin.
Comment 2 Jaroslav Tulach 2010-01-21 23:44:04 UTC
Now, when the bug 179459 is resolved, there is an easy to use, effective way to implement badges. Java and CSL languages switched to the new API by now. Please include this bug in your plans for 6.9 too.
Comment 3 Petr Nejedly 2010-03-12 11:39:55 UTC
Jardo,

I was looking into this, and fixing it currently means deleting most of the FXErrorAnnotator class. But you add some magic with lamba function there lately, so I'd like to ask you to fix it yourself. I would have to study the code more than you currently.
Thanks.
Comment 4 J Bachorik 2010-03-12 13:04:07 UTC
Well, the lambda is there only to provide a callback from FXErrorAnnotator back to JavaFXIndexer in order to schedule supplementary indexing of files possibly affected by an error in the currently processed file.
AFAIU, the FXErrorAnnotator will have to be removed completely and we will need to use the ErrorsCache API instead.
Comment 5 J Bachorik 2010-03-15 13:32:07 UTC
fixed in http://hg.netbeans.org/javafx/rev/e7859d70a051
Comment 6 Alexandr Scherbatiy 2010-03-29 10:10:22 UTC
Please, reopen the issue if it is still reproduced.