vscode-cpptools icon indicating copy to clipboard operation
vscode-cpptools copied to clipboard

Please add renaming

Open tinganho opened this issue 10 years ago • 142 comments

It would be very useful if this tool also supported renaming of variables.

tinganho avatar Oct 18 '16 16:10 tinganho

I tried to disable all theming I could find. Besides the built in theme support in settings, I also had One Dark Pro (but disabled it). I've included a couple additional SS below. The first two are light and dark themes while hovering the mouse over a bar in the Explorer pane (built-in). The last is hovering the mouse of the Pending Rename bar for C++ Rename pane. Explorer pane buttons work/are visible. C++ Rename does not work but you can see the tooltip. Screenshot from 2019-10-14 11-13-24 Screenshot from 2019-10-14 11-17-45 Screenshot from 2019-10-14 11-18-07

monkeycoder99 avatar Oct 14 '19 18:10 monkeycoder99

Can you check if the images for the buttons exist under the extension package path? The path to images should be under /home/<userfolder>/.vscode/extensions/ms-vscode.cpptools-0.26.0-insiders3/assets. You should see these files https://github.com/microsoft/vscode-cpptools/tree/master/Extension/assets

If the images exists, can you try modifying the path to the referenced images in file /home/<userfolder>/.vscode/extensions/ms-vscode.cpptools-0.26.0-insiders3/package.json to have a ./ to the beginning of the path? See example of change in this pull request.

michelleangela avatar Oct 14 '19 20:10 michelleangela

I have no assets directory in that location. Here's what's there:

.                             LICENSE.txt          package.nls.ko.json
..                            LLVM                 package.nls.pl.json
bin                           node_modules         package.nls.pt-br.json
c_cpp_properties.schema.json  out                  package.nls.ru.json
CHANGELOG.md                  package.json         package.nls.tr.json
cppdbg.ad7Engine.json         package.nls.cs.json  package.nls.zh-CN.json
cpp.hint                      package.nls.de.json  package.nls.zh-TW.json
cpptools.json                 package.nls.es.json  README.md
debugAdapters                 package.nls.fr.json  ThirdPartyNotices.Mono.txt
dist                          package.nls.it.json  ThirdPartyNotices.txt
install.lock                  package.nls.ja.json  ui
LanguageCCPP_color_128x.png   package.nls.json     VCPkgHeadersDatabase.zip

monkeycoder99 avatar Oct 14 '19 22:10 monkeycoder99

We checked the shipped packages and they include the assets directory. Perhaps something went wrong when the extension was updated or installed? Can you try re-installing?

michelleangela avatar Oct 14 '19 22:10 michelleangela

Uninstall/reinstall fixed the problem. Not sure how this happened. Maybe something with an earlier install that switched to the Preview version?

monkeycoder99 avatar Oct 14 '19 22:10 monkeycoder99

Uninstall/reinstall fixed the problem. Not sure how this happened. Maybe something with an earlier install that switched to the Preview version?

It's hard to guess how the folder was not installed. But if you get a consistent repo of a folder or files missing after installation, please create a new issue for it for us to look at.

michelleangela avatar Oct 14 '19 22:10 michelleangela

Rename is available in 0.26.0.

sean-mcmanus avatar Oct 16 '19 02:10 sean-mcmanus

I'm using with cmake tools and nothing happens except loading signal when renaming symbols. Extension info:

Name: C/C++
id: ms-vscode.cpptools
Description: C/C++ IntelliSense, debugging, and code browsing.
Version: 0.26.3-insiders2
Publisher: Microsoft
VS Marketplace link: https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools

ryancheung avatar Jan 07 '20 04:01 ryancheung

@ryancheung Can you a file a bug with more info? What type of "loading signal" do you see? Are other features working?

sean-mcmanus avatar Jan 07 '20 07:01 sean-mcmanus

I'm mean the light loading bar after doing a symbol rename. After a while, light loading bar disappears and no other action.

ryancheung avatar Jan 07 '20 08:01 ryancheung

@ryancheung What "light loading bar" are you referring to? In the "References: Results" pane or above the document or in the bottom right notification dialog? Can you provide a screenshot? Does the output window show any "Connection closed" or "Failed to read" messages? Does it only repro for certain workspaces? Does it only repro for 0.26.3-insiders2 or 0.26.2 also?

sean-mcmanus avatar Jan 07 '20 19:01 sean-mcmanus

Its above the document , no other message. I could provide gif later.

ryancheung avatar Jan 08 '20 00:01 ryancheung

When i have other extensions disabled, renaming works...

ryancheung avatar Jan 08 '20 04:01 ryancheung

I believe it's the cmake tools extension prevent the symbol renaming.

I have cmake compile_commands.json enable in C++ entension configurations. Every time i open my project(it's kinda big), c++ extension is doing analysis for 16K+ files. If disables cmake tools extension, c++ extension won't do any busy jobs like the analysis.

image 捕获2 捕获3

I think c++ extension is too busy and do not do symbol renaming job until the analysis job done.

ryancheung avatar Jan 08 '20 04:01 ryancheung

After disable compileCommands option in C++ entension configuration, symbol renaming works very well now.

ryancheung avatar Jan 08 '20 05:01 ryancheung

After disable compileCommands option in C++ entension configuration, symbol renaming works very well now.

How did you disable it? I'm having the same issue, where I will get the light progress indicator near the top toolbar scrolling upon rename, and nothing happens...

bonfire62 avatar Jan 21 '20 16:01 bonfire62

@ryancheung What "light loading bar" are you referring to? In the "References: Results" pane or above the document or in the bottom right notification dialog? Can you provide a screenshot? Does the output window show any "Connection closed" or "Failed to read" messages? Does it only repro for certain workspaces? Does it only repro for 0.26.3-insiders2 or 0.26.2 also?

Having the same issue as described previously, Currently on 0.26.3-insiders. Looked through the logs, didnt see any weird output or disconnects, but I'm happy to collect logs and post if helpful!

bonfire62 avatar Jan 21 '20 17:01 bonfire62

seeing this image Could it be caused by a large workspace? (number of files)

bonfire62 avatar Jan 21 '20 17:01 bonfire62

@bonfire62 That's the normal progress indicator as it's confirming references. Is that getting stuck? Are you using a multi-root workspace?

sean-mcmanus avatar Jan 21 '20 22:01 sean-mcmanus

After disable compileCommands option in C++ entension configuration, symbol renaming works very well now.

How did you disable it? I'm having the same issue, where I will get the light progress indicator near the top toolbar scrolling upon rename, and nothing happens...

Remove the json key from c++ extension configuration file.

ryancheung avatar Jan 22 '20 01:01 ryancheung