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 136543 - "Implement All Abstract Methods" insert import org.openide.filesystems.FileObject; twice
Summary: "Implement All Abstract Methods" insert import org.openide.filesystems.FileOb...
Status: REOPENED
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 6.x
Hardware: PC Windows Vista
: P4 blocker (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-05 11:15 UTC by dao
Modified: 2013-09-02 14:24 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dao 2008-06-05 11:15:13 UTC
I've created a netbeans module project using NB6.1 latest patch, created a class witch implement ProjectFactory
interface, imported the project api, then in the class declaration line I used that bubble hint "Implement All Abstract
Methods", I've got this line inserted twice:

import org.openide.filesystems.FileObject;
import org.openide.filesystems.FileObject;
Comment 1 Jan Lahoda 2008-06-05 12:17:47 UTC
Was the o.o.f.FileObject on the classpath of the given class? I.e. was there dependency on the Filesystem API?
Comment 2 dao 2008-06-05 12:58:06 UTC
Well those are the exact steps involved:
- Create a new netbeans module project.
- Create a new class org.myorg.module.ModuleProjectFactory.
- Add "implements ProjectFactory" to the class declaration.
      At this point have not yet declared any dependency on any api, the ProjectFactory isn't yet reconised by the IDE
so I open the module project Properties --> Add Dependency --> In filter I type "Project Factory" --> Select the
"Project Api".
- Now the hint shows "Add Import for org.netbeans.spi.project.ProjectFactory". I select it and the import is added correctly
- The hint shows "implement all all abstract methods". I select it and here I get the "import
org.openide.filesystems.FileObject;" inserted twice.

So for your question, no at this point the "File System API" dependency isn't yet declared and the "FileObject" class
isn't yet in the classpath.

Regards.
Comment 3 Max Sauer 2008-06-16 16:13:18 UTC
The mechanism would work OK in case CP would be correct. We'll enhance the functionality in the future. Thanks.
Comment 4 Max Sauer 2008-06-16 16:13:30 UTC
The mechanism would work OK in case CP would be correct. We'll enhance the functionality in the future. Thanks.
Comment 5 Max Sauer 2008-06-16 16:14:37 UTC
Reopening for the future.