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 61600 - Files for which DataLoader-s exist created using New File - Empty File are represented by DefaultDataObject-s
Summary: Files for which DataLoader-s exist created using New File - Empty File are re...
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Data Systems (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
Depends on:
Blocks: 61879
  Show dependency tree
 
Reported: 2005-08-01 14:35 UTC by Andrei Badea
Modified: 2008-12-23 14:33 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Badea 2005-08-01 14:35:01 UTC
[dev build 050801]

1. Have a project.
2. Use New File - Empty file to create a file with an arbitrary extension for
which a DataLoader is registered (for example xml).

The new file is appears in the Projects view, but with the icon of the
DefaultDataObject. When I look at the children of the respective DataFolder, I
see that indeed a DefaultDataObject was created for the new file:

org.openide.loaders.DefaultDataObject@19fd430[MasterFileObject@1ce5700[file:/home/abadea/test/JDBCTest/src/resources/foo.xml]]

It should have been a XMLDataObject.

Not sure if this is an issue of projects/ui, could also be openide/dataloaders.
I'm posting to projects/ui since the code which creates the FileObject for the
new file resides there.
Comment 1 Jesse Glick 2005-08-01 19:33:21 UTC
The template is from core/favorites:

<file name="file">
    <![CDATA[]]>
    <attr name="template" boolvalue="true"/>
    <!-- ... -->
</file>


IMHO DefaultDataObject.createFromTemplate should invalidate the new file so that
it will be refreshed using a more appropriate loader if possible.
Comment 2 Jaroslav Tulach 2005-08-09 08:09:06 UTC
I'll fix this. 
Comment 3 Jaroslav Tulach 2005-08-09 08:09:42 UTC
*** Issue 61918 has been marked as a duplicate of this issue. ***
Comment 4 Jaroslav Tulach 2005-09-13 06:51:23 UTC
/cvs/openide/loaders/src/org/openide/loaders/MultiDataObject.java,v  <--  
MultiDataObject.java 
new revision: 1.12; previous revision: 1.11 
done 
RCS 
file: /cvs/openide/loaders/test/unit/src/org/openide/loaders/DefaultVersusXMLDataObjectTest.java,v 
done 
Checking in 
loaders/test/unit/src/org/openide/loaders/DefaultVersusXMLDataObjectTest.java; 
/cvs/openide/loaders/test/unit/src/org/openide/loaders/DefaultVersusXMLDataObjectTest.java,v  
<--  DefaultVersusXMLDataObjectTest.java 
initial revision: 1.1 
 
Comment 5 Quality Engineering 2008-12-23 14:33:56 UTC
This issue had *1 votes* before move to platform component