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

Summary: ProjectUtilities still searchs for OpenCookie instead of Openable in Lookup
Product: projects Reporter: j.boesl
Component: Generic InfrastructureAssignee: Tomas Stupka <tstupka>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 8.0.1   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

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