[Eric] Why does Rope sometimes not find a definition?

Detlev Offenbach detlev at die-offenbachs.de
Fri Nov 7 16:05:02 GMT 2008


On Sonntag, 2. November 2008, Ali Gholami Rudi wrote:
> Hi,
>
> On Sun, Nov 02, 2008 at 09:41:34AM +0000, OldGrantonian wrote:
> > Once again, thanks for all your help. I think I'm nearly there :)
> >
> :-)
> :
> > I think I can enable SOA by:
> >
> > Refactoring > Utilities > Analyse all modules
> >
> > Is that correct?
>
> This analyzes all of the modules in the project.  It is a good idea to
> use it when the project was not written with automatic SOA turned on
> (actually it helps to run SOA multiple times but since doing that is
> time-consuming it might not be very interesting).
>
> Automatic SOA performs SOA on changed scopes when saving files.  I think
> that is enabled by default when you enable rope plugin.  So you don't
> need to do anything for enabling it.
>
> > How do I enable DOA?
>
> I'm not sure how to do that in eric.  Detlev?

That's not supported by eric yet because of it's slowness, as Ali already 
said. Ali, how could a DOA run be started while the project is open in eric?

> But you can test it with this program:
>
> # rundoi.py
> import sys
>
> from rope.base import libutils
> from rope.base.project import Project
>
>
> project = Project('.')
> resource = libutils.path_to_resource(project, sys.argv[1])
> process = project.pycore.run_module(resource)
> process.wait_process()
> project.close()
> # rundoi.py
>
> Note that current directory is considered to be the project root.  You
> can run it like:
>
> $ python rundoi.py path/to/mod.py
>
> It runs a module and collects information about function calls.  For
> best outcome, you can call it for your test suite so that most parts of
> the project are executed.  (don't run this while the project is already
> opened in eric; closing the latter overwrites collected object
> information.)
>
> Regards,
> Ali



-- 
Detlev Offenbach
detlev at die-offenbachs.de


More information about the Eric mailing list