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 224290 - New FileType template contains invalid createEditor method signature.
Summary: New FileType template contains invalid createEditor method signature.
Status: RESOLVED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Templates (show other bugs)
Version: 7.3
Hardware: Macintosh (x86) Mac OS X
: P3 normal (vote)
Assignee: issues@apisupport
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-28 20:32 UTC by esmithbss
Modified: 2013-01-04 02:29 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 esmithbss 2012-12-28 20:32:19 UTC
When creating a new FileType object in a module, the generated method signature for "public static MultiViewEditorElement createEditor(Lookup lkp)" contains 2 errors.

First, it references TopComponent.PERSISTENCE_ONLY_OPENED which is not available via the imports.

Second, it uses Lookup which is not available via the imports.

Solution:

Simple import of the TopComponent class will generate a third error regarding the type of values allowed in the annotation so the proper correction is to provide a static import for the TopComponent.PERSISTENCE_ONLY_OPENED value.

A simple import of the Lookup class is sufficient to correct the second problem.
Comment 1 Ondrej Vrabec 2013-01-02 14:54:29 UTC
fix: http://hg.netbeans.org/core-main/rev/fbc6a22c00c6
Comment 2 Quality Engineering 2013-01-04 02:29:14 UTC
Integrated into 'main-golden', will be available in build *201301040001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/fbc6a22c00c6
User: Ondrej Vrabec <ovrabec@netbeans.org>
Log: #224290 - New FileType template contains invalid createEditor method signature.
fixing missing imports in template