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 9681 - IDE ignore attribute 'NetBeansAttrAssignedLoader'
Summary: IDE ignore attribute 'NetBeansAttrAssignedLoader'
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: PC Linux
: P1 blocker (vote)
Assignee: rmatous
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-02-19 10:52 UTC by Martin Schovanek
Modified: 2008-12-22 15:43 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
ide.log (7.52 KB, text/plain)
2001-07-20 20:34 UTC, Martin Ryzl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Schovanek 2001-02-19 10:52:26 UTC
[Forte Build 010217 on RedHat 6.2 with JDK 1.3.1-b15]

In this build I does't see any project because IDE ignore in .nbattrs file
attribute NetBeansAttrAssignedLoader.

.nbattrs:
...
   <fileobject name="Default">
      <attr name="SystemFileSystem.localizingBundle"
stringvalue="org.netbeans.modules.projects.Bundle"/>
      <attr name="NetBeansAttrAssignedLoader"
stringvalue="org.netbeans.modules.projects.ProjectDataLoader"/>
  
</fileobject>                                                                                                          
...

Example:
--------
/*
 * Main.java
 *
 * Created on February 19, 2001, 10:53 AM
 */

package Package;

import org.openide.loaders.DataObject;
import org.openide.filesystems.FileObject;
import org.openide.TopManager;
import java.util.Enumeration;

public class Main extends Object {
    
    public static void main (String args[]) throws Exception {
        FileObject fo = TopManager.getDefault ().getRepository
().findResource("/Projects/Default");
        DataObject dao = DataObject.find(fo);
        System.out.println("Data objec class: " + dao.getClass().getName());
        System.out.println("NetBeansAttrAssignedLoader: " +
fo.getAttribute("NetBeansAttrAssignedLoader"));
        
        fo.setAttribute("NetBeansAttrAssignedLoader",
"org.netbeans.modules.projects.ProjectDataLoader");
        System.out.println("NetBeansAttrAssignedLoader: " +
fo.getAttribute("NetBeansAttrAssignedLoader"));
        
        System.out.println("FO Attributes: ");
        Enumeration e = fo.getAttributes();
        while (e.hasMoreElements()) {
            System.out.println(e.nextElement());
        }        
    }
    
}
Comment 1 Martin Ryzl 2001-02-19 11:00:55 UTC
I've attached additional information. 
BTW, ClassNotFoundException in project module is thrown because the newly 
created data object has not assigned ProjectDataLoader. 
Comment 2 Martin Ryzl 2001-02-19 11:03:54 UTC
Created attachment 635 [details]
ide.log
Comment 3 Jesse Glick 2001-02-19 12:10:05 UTC
FYI there is some optimization in MultiFileObject to assume this attr is only
set on the delegate which originally produced the file object, assuming that it
would not happen that some layer overrides the type of a file specified in
another layer. This is important for startup time. Perhaps the optimization is
malfunctioning here.
Comment 4 rmatous 2001-02-19 16:44:03 UTC
Fixed in main trunk. There was an obvious bug while 
evaluating 'NetBeansAttrAssignedLoader'. 
Comment 5 pzajac 2003-02-12 15:45:26 UTC
It seems be fine
Comment 6 Quality Engineering 2003-07-01 16:15:58 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.