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 27887 - Operations with FileSets
Summary: Operations with FileSets
Status: VERIFIED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 3.x
Hardware: All All
: P1 blocker (vote)
Assignee: Jan Pokorsky
URL:
Keywords: API
Depends on:
Blocks:
 
Reported: 2002-10-09 15:20 UTC by Jan Pokorsky
Modified: 2004-04-19 16:17 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Pokorsky 2002-10-09 15:20:37 UTC
Petr proposed an interesting change of the FileSet
API in order to enable to generalize current
filtering to operations like union or intersection.

So I would integrate following modifications to
realize this enhancement:

1. introduce interface ContentListener + class
ContentEvent(extending EventObject)
  ContentListener
    contentChanged(ContentEvent)
  ContentEvent(Content source)
    
2. Replace Filter class with abstract class
Content containing
  public void addContentListener(ContentListener);
  public void removeContentListener(ContentListener);
  public abstract boolean contains(URL); // moved
from FileSet
  protected final void
fireContentChanged(ContentEvent) // moved from FileSet

3. FileSet will extend Content
  remove addPropertyChangeListener,
removePropertyChangeListener, fireContentChanged,
contains, PROP_CONTENT
  
4. MutableFileSet
  replace removeAll(FileSet) with removeAll(Content)
  
5. FileSets
  remove filterSet
  add methods:
  Content union(Content, Content)
  Content intersection(Content, Content)
   

The original proposal is accessible at
http://projects.netbeans.org/servlets/ReadMsg?msgId=381936&listName=dev
Comment 1 Petr Jiricka 2002-10-10 09:03:33 UTC
Looks good. Thanks !
Comment 3 Jan Pokorsky 2003-07-15 14:44:51 UTC
verified