Bookmarks getting cleared when doing code formatting in aspx page

I have mentioned this issue several months ago and I wish it gets fixed.

When I do a code foramt in an aspx page, I sometimes lose the bookmarks in the page and the page scrolls to the top of the page after the code formatting.  It seems this happens after doing a certain amount of page changes like adding or deleting some lines of html.

If I have a bookmark on a line that reads something like <div id="someid"...> and I do a code format, why can't R# find that line again and assign the same bookmark on it? I know the line # changes after the code format but so what? Just find that line again.

This issue happens frequently for me to be annoying. I have to find that line by manually doing a find and using a keyword which I have to jog my memory to extract.

9 comments
Comment actions Permalink

>I know the line # changes after the code format but so what? Just find that line again.

It's probably not so trivial since both line itself and its line number may change due to reformatting.

0
Comment actions Permalink

Hi,

1. Which ReSharper version do you use?
2. Is it reproducible only in ASPX pages?
3. Do you have a small example page, which will demonstrate this?

I'm asking this because ReSharper 7.1 EAP is working fine for me in this case.

Thanks.

0
Comment actions Permalink

The line contents does not change.

0
Comment actions Permalink

I am upgrading to the new EAP every time. This issue doesn't happen all the time. However I have reported this isseu several months ago and the bookmarks functionality is not very stable. I have another recent post about bookmarks, http://devnet.jetbrains.net/message/5470063#5470063.

I even sometimes get a R# exception when I try to use a bookmark. I have submitted some of those..

0
Comment actions Permalink

This is  a R# exception which happens quite frequently when selecting a bookmark. Bookmark #3 is defined and I can see it with ctril-`.
I select bookmark #3 and it works. If I select it again I get an exception: "An exception has occurred during action 'Bookmarks.GoToBookmark3' execution. Value cannot be null. Parameter name: popupWindowContext.".

These exceptions happen when there's no cursor blinking and it's R# doing it.

A scenraio:



Cursor blinking and I hit ctrl-3 and it to goes to bookmak #3. BUT there's no cursor and some text at the bookmark is highlited. In this case, it's the whole html tag in the ascx file. From that point if I go to any bookmark, I get the exception.

I am using the latest EAP.

0
Comment actions Permalink

Hello Abdu,

Thanks for the info. Could you please try the latest EAP now, since we included a bugfix for the bookmarks issue?
Please let me know how it goes for you.

Thanks in advance!

0
Comment actions Permalink

It seems to be more stable. I think the fix was it doesn't go to a bookmar that doesn't exist.

However I still get the R# exception when there's no cursor.

My questions is why for some bookmarks, the cursor is gone after using a bookmark? The problem is that from that point, all bookmarks give an exception.

Thanks for the work on this.

0
Comment actions Permalink

Hello Abdu,

Could you please record a video of this issue happening? You may use Jing (http://www.techsmith.com/jing.html) to do it.
Having the video will help to determine what's going wrong in this case.

Thank you.

0
Comment actions Permalink

The bookmarks are getting better. I don't get exceptions as of build 7.1.20.60. What issue I noticed.

In this scenario, I have all bookmarks used except for #6 & #7. I hit ctril-1, then ctrl-2 ..... when I reach ctrl-6, there's no bookmark. That's fine. But I don't get any messages. then I hit ctril-7. Same thing. ctrl-8, goes to bookmark. The I go back and I hit ctrl-7, I get message "Could not go to bookmark #7.Bookmark is not set". I expect to see this mesaage everytime.


BTW, it would be more helpful if messages in the R# exception window can be copied.

0

Please sign in to leave a comment.