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 235731 - export package action on dependency packages
Summary: export package action on dependency packages
Status: STARTED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Milos Kleint
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-10 06:19 UTC by Milos Kleint
Modified: 2013-09-13 08:22 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
experimental patch (30.08 KB, patch)
2013-09-13 08:22 UTC, Milos Kleint
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Milos Kleint 2013-09-10 06:19:48 UTC
in 7.4 we've implemented export package on sources in module projects. for library wrapper style projects, it would be nice to have the same action available on dependency jar packages as well. Along with it comes the public/private icon.

request originates in satisfaction survey
Comment 1 Milos Kleint 2013-09-13 08:22:09 UTC
Created attachment 140023 [details]
experimental patch

attached is the experimental patch that almost works.
1. nb module project dependencies get custom icon based on if the dependency is a jar/nb module/osgi bundle.
2. the module project's Accessibilityqueryimpl is used to show public/private package icon.
3. export package icon is shown.


the missing or shaky parts:
1a. computing the custom icon requires opening the META-INF/manifest.mf file in the jar, could be slow. Is there a way to cache? fileobject attributes come to mind.
1b. the module jar/osgi jar icon could be confused with the project link icon we have now. Maybe just a badge is appropriate?
1c. currently just for direct dependencies, we have no clear way of mimicking the nbm-maven-plugin behaviour in resolving what is a Class-Path: item and what is a module dependency.

2a. related to 1c. we currently match the module dependency with project's pattern, not it's own pattern as defined in jar manifest. maybe a specialized AccessibilityQueryImplementation is needed that would work on top of jar FileObjects?
2b. jars referenced from dependency module jars also don't get marked correctly.

3a. the export action can only be written by relying on AccessibilityQueryImplementation and PackageModificationImplementation instances residing in the node's lookup directly. Appears hack-like to me right now.