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 243683 - Reduce dependencies of o.o.filesystems, remove deprecated APIs
Summary: Reduce dependencies of o.o.filesystems, remove deprecated APIs
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 8.0.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords: API, API_REVIEW
Depends on: 243561
Blocks: 247159
  Show dependency tree
 
Reported: 2014-04-09 08:31 UTC by Svata Dedic
Modified: 2014-11-13 13:01 UTC (History)
2 users (show)

See Also:
Issue Type: TASK
Exception Reporter:


Attachments
Proposed changes (435.74 KB, patch)
2014-04-09 13:10 UTC, Svata Dedic
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Svata Dedic 2014-04-09 08:31:44 UTC

    
Comment 1 Svata Dedic 2014-04-09 08:53:21 UTC
The FileSystem APIs depend on org.openide.util, while org.openide.util.base (independent of desktop processing) exists. ImageUtilities are used from o.o.util to work with Image. Also depenendencies on (semantically obsolete) SharedClassObject should be removed.

FileChooserBuilder entirely depends on Swing and should be moved off the Filesytems API.

ImageUtilities are only used from the default filesystem's Status implementation. The implmentation may move to another module, while FileSystems API retain a basic Status implementation with no image annotations.

SharedClassObject is only constructed from code that handles instance creation in absence of the 'instanceCreate' attribute. This part of code can be moved elsewhere

The proposal is to

1/ create an interface org.openide.filesystems.spi.CustomInstanceFactory for handling class instance creation (incl. special handling of SharedClassObject)

2/ lookup the FileSystem.Status implementation for the system (default) filesystem in the default Lookup.

3/ create a org.openide.filesystems.nb module, which will host the FileChooserBuilder implementation and implementations of FileSystem.Status and CustomInstanceFactory. The module will become part of platform cluster
This module will be auto-injected using module-auto-deps.xml for client modules which depend on older FileSystem APIs - preserves both compile and runtime compatibility.

Diffs will follow shortly.
Comment 2 Svata Dedic 2014-04-09 13:09:28 UTC
Note: target is the server_split branch
Comment 3 Svata Dedic 2014-04-09 13:10:34 UTC
Created attachment 146650 [details]
Proposed changes

Should be applied on top of the patch from issue #243561
Comment 4 Svata Dedic 2014-04-09 13:51:41 UTC
Will be committed to branch as changesets jet-main#00fa24ad97e and jet-main#d135d78c706b
Comment 5 Jaroslav Havlin 2014-04-10 08:49:54 UTC
All the modifications seem fine to me. Great job!
Comment 6 Quality Engineering 2014-10-18 05:13:35 UTC
Integrated into 'main-silver', will be available in build *201410180001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/200fa24ad97e
User: Svata Dedic <sdedic@netbeans.org>
Log: #243683: filesystem dependencies reduced, NB/swing related moved to filesystems.nb, provided 8.0 compat patches
Comment 7 Jaroslav Tulach 2014-11-05 12:08:09 UTC
If fixed, then close the issue.