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

Summary: Operations with FileSets
Product: projects Reporter: Jan Pokorsky <jpokorsky>
Component: Generic InfrastructureAssignee: Jan Pokorsky <jpokorsky>
Status: VERIFIED FIXED    
Severity: blocker CC: pjiricka
Priority: P1 Keywords: API
Version: 3.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

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