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 247954 - ProjectUtilities still searchs for OpenCookie instead of Openable in Lookup
Summary: ProjectUtilities still searchs for OpenCookie instead of Openable in Lookup
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 8.0.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Tomas Stupka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-15 14:03 UTC by j.boesl
Modified: 2015-06-05 02:39 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 j.boesl 2014-10-15 14:03:17 UTC
ProjectUtilities are responsible for restoring TopComponents when a project is re-opened. But it only reopens DataObjects that include an EditCookie or an OpenCookie in its lookups.

The line:
OpenCookie oc = dobj.getLookup().lookup(OpenCookie.class);
should be replaced with:
Openable oc = dobj.getLookup().lookup(Openable.class);

Or maybe even better look for all Openables on the DataObject:
Collection<Openable> openables = dobj.getLookup().lookupAll(Openable.class);



Since DataObjects don't necessarily include an Opencookie anymore that should be changed soon imho.
Comment 1 Tomas Stupka 2015-06-04 15:40:47 UTC
fixed in jet-main #db19edc461da
Comment 2 Quality Engineering 2015-06-05 02:39:14 UTC
Integrated into 'main-silver', will be available in build *201506050001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/db19edc461da
User: Tomas Stupka <tstupka@netbeans.org>
Log: Issue #247954 - ProjectUtilities still searchs for OpenCookie instead of Openable in Lookup