Rename in all project files

Hi guys,

I'm probably missing some point, but I don't get the rename-refactoring working for all project files. The same is true for find usage. PyCharm finds only all the occurrences whithin the file, from which I initiate the refactoring.

Cheers,

Jan

8 comments

Hello Jan,

How is your project configured? If you open another file from which the class

you're trying to rename is referenced, does Goto Definition (Ctrl-B) work

correctly?

I'm probably missing some point, but I don't get the

rename-refactoring working for all project files. The same is true for

find usage. PyCharm finds only all the occurrences whithin the file,

from which I initiate the refactoring.

--

Dmitry Jemerov

Development Lead

JetBrains, Inc.

http://www.jetbrains.com/

"Develop with Pleasure!"

0

Hi Dmitry,

funny ... after performing a "Go To declaration" from one of the usages, PyCharm in turn found all usages from the declaration. (In fact, I first used "Go To declaration" on the class in a constructor statement, then on method calls as well).

I have to perform this steps for other usages as well. Is there something I can do about it?

After restarting it keps working.

By the way, my Project directory is added to the PYTHON_PATH.

Cheers,

Jan

0

Hello Jan,

Did you use "Open Directory" on the directory that contains your project

sources, or did you open some unrelated directory and then open your project

files via Open File?

Are there any exceptions in idea.log?

funny ... after performing a "Go To declaration" from one of the

usages, PyCharm in turn found all usages from the declaration. (In

fact, I first used "Go To declaration" on the class in a constructor

statement, then on method calls as well).

I have to perform this steps for other usages as well. Is there

something I can do about it?

After restarting it keps working.

By the way, my Project directory is added to the PYTHON_PATH.

--

Dmitry Jemerov

Development Lead

JetBrains, Inc.

http://www.jetbrains.com/

"Develop with Pleasure!"

0

Hi Dmitry,

I used Open Directory.

After cleaning all caches I have the original issue. But now the trick (one usage -> find declaration -> find usages) doesn't work any more.

Attached the log-file.

Cheers,

Jan



Attachment(s):
idea.log.zip
0

Hi there,

another observation:

Now "find usage" doesn't even work within one file. I've used it on a function (not a method) in a very simple module.


Also, I've got on all names except function or class declarations the inspection hint "name is not defined" when placing the caret on the name. Some hints refer to a class of another module, which has nothing to do with the current context. PyCharm seems to be confused with this project.

Now I try import the files one by one.

Cheers,

Jan

0

Hello Jan,

Could you please attach a screenshot?

Hi there,

another observation:

Now "find usage" doesn't even work within one file. I've used it on a

function (not a method) in a very simple module.

Also, I've got on all names except function or class declarations the

inspection hint "name is not defined" when placing the caret on the

name. Some hints refer to a class of another module, which has nothing

to do with the current context. PyCharm seems to be confused with this

project.

Now I try import the files one by one.

--

Dmitry Jemerov

Development Lead

JetBrains, Inc.

http://www.jetbrains.com/

"Develop with Pleasure!"

0

Hi Dmitry,

here a screenshot (without the hints). After restarting they're gone. I try to get them back ...

Jan



Attachment(s):
pycharm_screenshot.jpg
0

here's another screenshot:

Show usages did work.

Then I tried again Find usages in Project scope and in Current File scope, but neither did work.

Cheers,

Jan



Attachment(s):
py_charm_show_usages.jpg
0

Please sign in to leave a comment.