Bug 6158 - Renaming a variable sometimes renames other things that shouldn't change
Summary: Renaming a variable sometimes renames other things that shouldn't change
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Version: unspecified
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2012-07-17 12:45 UTC by Stephen Shaw
Modified: 2012-10-04 02:22 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NOT_REPRODUCIBLE

Description Stephen Shaw 2012-07-17 12:45:49 UTC
In a mono for android app I was trying to rename:
Context _context;
to
Context Context; (so that I could get rid of the variable)

When I hit command-r it highlighted each instance as expected, but also renamed a using statement and one of the interfaces before I started typing anything.

For example,
it renamed something like Android.Views.View.Something to Android.V_contex.ew.Something with the _context highlighted.

I haven't been able to track down a decent test case as this doesn't normally happen.
Comment 1 Mike Krüger 2012-07-17 12:47:47 UTC
A test case would help - just renaming a _context identifier seems to work.
Comment 2 Andrey Gankov 2012-09-30 11:07:28 UTC
I have some like problem. When i try rename some variable, context menu -> re-factoring -> rename, very often another text is broken in different place. Example of code:
		treeviewLessees.AppendColumn("Код", new Gtk.CellRendererText (), "text", 0);
		treeviewLessees.AppendColumn("Название", new Gtk.CellRendererText (), "text", 1);
		treeviewLessees.AppendColumn("Директор", new Gtk.CellRendererText (), "text", 2);
		treeviewLessees.AppendColumn(INNColumn);
		treeviewLessees.AppendColumn("Товары", new Gtk.CellRendererText (), "text", 4);
		treeviewLessees.AppendColumn("Опт", new Gtk.CellRendererToggle (), "active", 5);
		treeviewLessees.AppendColumn("Розница", new Gtk.CellRendererToggle (), "active", 6);

If i click on treeviewLessees and select rename, all these string is broken.

I use build of 3.1 from git code, in openSUSE from repository home:dirk-s:Mono
Comment 3 Mike Krüger 2012-10-04 02:22:22 UTC
Works for me in our internal version.