Getting the current active project
Andras Mantia
amantia at kde.org
Sat Mar 31 13:05:33 UTC 2007
On Saturday 31 March 2007, Andreas Pakulat wrote:
> On 31.03.07 13:42:06, Andras Mantia wrote:
> > Hi,
> >
> > At this moment it is not possible to find out what is the active
> > project inside KDevelop. In Quanta we need to know the current
> > project in the following places:
> >
> > - monitoring all opened project folders and notifying the user if
> > there was a change there. Problem: how will this work with remote
> > projects?
>
> I don't think we support remote projects, atm.
We should. This was discussed before and we all agreed that we should
make the platform use only KUrl's and thus support remote projects.
> > - iterate over all the projects and do the check for each and
> > everyone. Problem: slower, more compilcated code.
>
> Well, iterating over a list isn't that slow, especially as the list
> of opened projects shouldn't be _that_ large (I think less than 20
> projects is sane to anticipate). And the complicated code would be
> inside projectcontroller and it will exist anyway because we need a
> way to find the project or projectitem for a given url.
Ok, so this part can be solved with iteration.
> > Thereby I request to introduce back the notion of the current
> > project in the KDevelop platform.
>
> What happens if your user actions or the other stuff doesn't get a
> project?
It will limit the user, so he cannot run scripts that work on the active
project, only on the active document (and probably the folder where the
document lies).
> For example currently if the first project is opened the
> currentProject is not yet set, its connected to the currentChanged
> signal of the treeview. Thus currentProject() would return a
> 0-pointer. While this can be "worked around" by automatically
> activating the first opened project, this won't work for closing
> projects.
You mean what will happen if no project is opened? That's not a problem,
as in that case the path given to the script will be the path of the
active document. This workes (and worked) fine.
> Then again there's no "current item" in the treeview and I
> don't think its sane to just select the top-most project in the
> treeview...
Sorry, what treeview is this?
Andras
--
Quanta Plus developer - http://quanta.kdewebdev.org
K Desktop Environment - http://www.kde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20070331/655189f5/attachment.sig>
More information about the KDevelop-devel
mailing list