Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 298610 - [modeling] Provide a default implementation for the ViewerFilter to be used in the EmfMasterDetailBlock
Summary: [modeling] Provide a default implementation for the ViewerFilter to be used i...
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: Incubators (show other bugs)
Version: 3.6   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Benjamin Cabé CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-29 10:06 EST by Jacques LESCOT CLA
Modified: 2010-01-05 10:44 EST (History)
1 user (show)

See Also:
contact: iplog+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jacques LESCOT CLA 2009-12-29 10:06:53 EST
In the class EmfMasterDetailBlock, the method getTreeFilter() is defined as abstract. However, I think that in most cases, subclasses will implement it using the following code :

protected ViewerFilter getTreeFilter()
{
  return new ViewerFilter() {
    @Override
    public boolean select(Viewer viewer, Object parentElement, Object element)
    {
      return true;
    }
  };
}

So it would be better to provide this as the default implementation and inform users through the JavaDoc that he could override that method in order to provide its own filter.
Comment 1 Benjamin Cabé CLA 2010-01-05 10:42:16 EST
Agreed, I've release the modification.
Thanks!