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 218972 - New File Type creates DataObject class with unused imports
Summary: New File Type creates DataObject class with unused imports
Status: RESOLVED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Templates (show other bugs)
Version: 7.2
Hardware: PC Windows 7
: P4 normal (vote)
Assignee: Martin Kozeny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-25 12:24 UTC by pjdm
Modified: 2012-12-12 08:50 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 pjdm 2012-09-25 12:24:11 UTC
In a new module, use New File Type, MIME Type "application/x-test", extension "test", class name prefix "Test", use any icon, uncheck "Use MultiView", Finish.

The resulting TestDataObject.java contains two unused imports.

"import org.openide.util.Lookup;" isn't used, but is otherwise harmless.

"import org.openide.windows.TopComponent;" isn't used, but the module does not have a dependency on Window System API, so this import causes a "package org.openide.windows does not exist" error.

This is easily fixed using Fix Imports, therefore priority P4.
Comment 1 Martin Kozeny 2012-12-11 08:40:08 UTC
When creating DataObject class using New File Type, unused imports are removed.
Comment 2 Quality Engineering 2012-12-12 02:45:04 UTC
Integrated into 'main-golden', will be available in build *201212120001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/80a6f16a3e62
User: Martin Kozeny <mkozeny@netbeans.org>
Log: #218972: When creating DataObject class using New File Type, unused imports are removed