Project Filtering

Milian Wolff mail at milianw.de
Tue Jul 23 12:21:04 BST 2013


On Tuesday 23 July 2013 08:24:14 Andreas Pakulat wrote:
> Hi,
> 
> On Tue, Jul 23, 2013 at 2:25 AM, Milian Wolff <mail at milianw.de> wrote:
> > On Tuesday 23 July 2013 02:08:41 Milian Wolff wrote:
> > > Hey all,
> > > 
> > > I finally sat down to implement a generic project filter interface and
> > 
> > user
> > 
> > > configuration. I've published what I have so far in the projectfilter
> > > branch, please take a look.
> > > 
> > > What I want to know now though, is whether my fancy settings dialog I
> > 
> > wrote
> > 
> > > years ago for the GenericManager actually is useful. I have the feeling
> > 
> > that
> > 
> > > its too complicated, albeit powerful.
> > > 
> > > The reason it's so complicated is that it allows a twofold
> > > configuration,
> > > i.e. you can configure it to only include certain parts of a folder tree
> > > and then furthermore filter in that selection. Back then I wanted to
> > > emulate what Quanta offered in KDE3 times.
> > > 
> > > Anyhow, as I said, I think what we have there is too complicated. How
> > 
> > can we
> > 
> > > make it simpler? Do we need this two-stage filtering? Is it sufficient
> > > to
> > > only offer the user a way to exclude stuff?
> > > 
> > > Furthermore, do you think it should be configurable whether to exclude
> > 
> > VCS
> > 
> > > folders, object files, moc files, ...? It would easily be possible, but
> > > I
> > > somehow doubt it's useful?
> > 
> > If others know an IDE where the above is implemented in a sane manner from
> > a
> > usability pov, please tell us. Screenshots etc. would be awesome.
> 
> Not having tried your branch yet, but wanted to note two things:
> 
> - the filter should also affect quick open. I just happened to try this
> yesterday and for me the project filter  (to filter out *.pyc or stuff in a
> build subdir) is useless because quickopen does not care

Yes, that's the whole point why I finally sat down and implemented this. See 
e.g.: https://bugs.kde.org/show_bug.cgi?id=321016

Personally, I think we should reevaluate whether the existing project tree 
view filter should be kept. It just filters that one view, and none of the 
other plugins cares... Having two places to configure a filter is also 
something that might confuse a user.

> - the filter should be IMO in addition to the filters that the VCS sets up,
> i.e. the VCS-ignored files should be filtered anyway without further user
> configuration.

This could now be achieved by implementing the IProjectFilter interface in the 
VCS plugins. Then they check whether a given project is using said VCS and 
then additionally filter out files based on e.g. the gitignore files.

> Eclipse does support filtering, but the filters are not user-editable but
> rather provided by plugins. Users can then decide which filters to apply.
> The individual filters can either be inclusive or exclusive. The filters
> (and the workingsets) affect their 'quickopen files' list which is very
> handy.

Yep, with my patch we have this now but user configurable. Additional plugins 
can be written that add more features if needed. Also I found e.g. 
http://www.mail-archive.com/qt-creator@qt-project.org/msg01681.html
 which gives a good usecase for why we should probably keep the 
inclusive/exclusive pattern matching.

Cheers
-- 
Milian Wolff
mail at milianw.de
http://milianw.de



More information about the KDevelop mailing list