[RFC] findProjectForUrl() returning >1 Project

Andreas Pakulat apaku at gmx.de
Fri Apr 6 08:56:53 UTC 2007


On 05.04.07 20:57:25, Matt Rogers wrote:
> 
> On Apr 5, 2007, at 8:06 PM, Andreas Pakulat wrote:
> 
> > On 05.04.07 19:18:51, Matt Rogers wrote:
> >> On Apr 5, 2007, at 6:51 AM, Andreas Pakulat wrote:
> >>> My idea is that the projectForUrl() function in ProjectController  
> >>> can
> >>> return a list of projects instead of 1 project. For many cases this
> >>> would be just a 1-element-list, but in the above mentioned cases it
> >>> is a
> >>> list of projects to which the url belongs. For things like the
> >>> user-actions from Quanta this means they have to decide wether they
> >>> want:
> >>>
> >>> a) work on the first item in the list only
> >>> b) work on all items in the list always
> >>> c) ask the user, presenting a list of projects
> >>
> >> That list thing is a bad idea. I would instead, suggest that we use
> >> the parent->child relationship in the model to determine which
> >> project the url is in, if we can. Sorry, no code for this, it's just
> >> my idea.
> >
> > You're missing the point: The url is part of 2 or more projects. Thats
> > the problem at hand.
> 
> i don't think i'm missing the point. if the url comes from a project  
> model item, the parent -> child relationship there should allow us to  
> accurately determine what project the url belongs to since they  
> should have different model items. of course, this might not work in  
> all cases, but like i said, it's just an idea. :)

Uhm, we're tackling the case where we don't know from which item in the
projects tree the URL comes from. For example an action that just takes
the currently opened file url. If you have a project item already there's
no need to ask the project controller which project the url belongs to,
each project item knows to which project it belongs.

Andreas

-- 
You will gain money by an immoral action.




More information about the KDevelop-devel mailing list