On Fri, Apr 30, 2010 at 4:28 PM, Glyph Lefkowitz
<gl...@twistedmatrix.com> wrote:
> Hello there PyDev'ers,
>
> I've recently started using Eclipse with PyDev, and (with some help from the 
> Emacs+ plugin) it's working out pretty well.  Still, there are lots of things 
> that I find myself missing or that don't seem to work right.  I plan to write 
> these up for this list one at a time.
>
> I'm happy to do the work of filing these as bug reports in the sourceforge 
> tracker, but since I'm fairly new to this, I'm not really sure which of these 
> are just "works as designed, get used to it", which ones are general Eclipse 
> issues, and which ones are PyDev specific.  Hopefully this will be a good 
> place to set me straight.
>
> For my first issue: why do I have to manually add 'source locations' to my 
> project?  The algorithm for detecting them should go like this:
>
>  - Find every folder with a .py file in it.
>     - Does that folder have an __init__.py in it?  If so, it's a package, not 
> a source location; look at its parent and perform the same test until you 
> don't see an __init__.py.
>     - Otherwise, it's a source location: add it.
>
> Any project that breaks this rule (and there are some; for example, 
> PyOpenSSL) would also break code completion because PyDev wouldn't be able to 
> properly tell what packages are named.
>
> I ask this because I frequently work on projects with lots of branches, each 
> of which has a dozen or so "source locations", and re-adding them all each 
> time I want to look at a different branch (not to mention coming up with a 
> unique project name, and in some cases adding multiple projects and adding 
> links between them).
>
> Is there some typical way to automate this process for projects with similar 
> structure?

Source folders/External source folders are a direct representation of
what you mean to have in your pythonpath or not, with the difference
that any file in a source folder is meant to be analyzed, whereas
files in external source folders shouldn't (there are cases where the
user has files in a project following the same rule you said but he
still doesn't want to analyze those files), so, a source folder treats
that (and also makes life easier for explicitly knowing about things
without having to guess things).

So, as it is there's nothing that does what you want automatically.
Still, it should not be hard to make up a python script that you run
with the heuristic you just said that updates the .pydevproject file
with those configurations (which would update the information pydev
needs).

Cheers,

Fabo

------------------------------------------------------------------------------
_______________________________________________
Pydev-users mailing list
Pydev-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pydev-users

Reply via email to