AS-Editor - force reload button or hot key missing

Go To Last Post
8 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi freaks,

 

I'm a AS novice and look for something like a "reload from disk" or "revert" button in the AS-editor.

 

Thats the situation:

 

I edit my files on different plattforms, the directory is on a network drive.

 

Here is my test scenario:

 

 - File x.c is openened in AS-editor and notepad++ on Windows and in scite on Linux. (notepad++ is just for testing if Windows sees the file changes)

 

 - if I change the file in Notepad++ ==> scite and notes it immediately, AS-Edit a little bit later

 - if I change the file in scite ==> Notepad++ sees the change almost immediately, AS-Ed does not recognize a change.

 - if I change the file in AS-Ed ==> Notepad++ and scite see the changes almost immediately.

 

So it probably has something todo if or how often the editor polls the file system.

 

The very bad thing is, that AS compiles obviously the wrong files from a cache, if it does not recognize a file change.

 

This would help me with the issue:

 

a) How can I force a reload of a file in AS (^R is it not)?

 

b) is there a tweaking parameter in AS to increase poll rate or disable caching?

 (Modifying the "track changes" check box in the dialogue Tools/Options/Text Editor/General does not change the behaviour at all)

 

 

Since if I don't want to throw away my favourite editor, I apreciate any help.

 

 

 

This topic has a solution.
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The very bad thing is, that AS compiles obviously the wrong files from a cache,

But that is not true. All AS6 (Visual Studio by any other name) does when driving GCC is to create a Makefile that names the files on disk then invokes "make" from a hidden command shell. You can even see this makefile in the build directories so there's no way it can convey information about "cached" source files within the editor - the file names listed there are the ones on your disk.

 

Perhaps what you mean is that it effectively does a File-Save All as it creates then invokes make?

Last Edited: Thu. Jan 8, 2015 - 09:38 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
does a File-Save All as it creates then invokes make?

It does that if you ask it to:

 

Tools > Options > Projects & solutions > Build & run > Before building

 

Options for Save Before Building

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You want the 'Detect when file is changed outside the environment' option.

Document Options

 

Note that, as Steve says, this is all standard Microsoft Visual Studio stuff - so it's worth looking at the MS support pages, VS-related sites, and including that in your googling...

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

as Steve says

Who he? ;-)

 

(but, yes, that was my intention of mentioning the VS heritage - there's an awful lot written about VS and it not noticing file changes on network drives as I've been plagued by this in the past - ISTR it is because of Windows caching changes to network drives and there is some registry hack or something you can do to change the behaviour though it might have "consequences")

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
Who he? ;-)

No idea! Dunno what I was thinking there!

 

Quote:
ISTR it is because of Windows caching changes to network drives

In which case wouldn't all applications be similarly affected?

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

applications be similarly affected?

A good question - I think the notification mechanism might be "different" and there might even be a choice to determine how to find out so some use one mechanism and others use a different one perhaps?

 

In the past I've actually moved large source trees from the network to a local copy on my drive (with all the merge nightmares that implies) simply to get away from Visual Studio's inability to see changes to networked files. You might have thought that Microsoft's own development platform running on Microsoft's own operating system and presumably being used to develop both Windows and VS itself on networked drives might have the optimal solution to this but this issue has existed for getting on for 2 decades! Presumably Microsoft themselves use some form of tools., OS, networking where they aren't seeing this so don't recognise the issue?

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hallo clawson, awneil,

 

thanks for the quick responses, I think I hit another time the limitations of Windows.

 

>Perhaps what you mean is that it effectively does a File-Save All as it creates then invokes make?

No, the main editor will be the external one on Linux, "save all" in AS is exactly the opposite I need, - "read all" would be the way.

 

B.t.w. the settings shown in the screen shots are default ones and they are set also in my AS.

 

However. I think clawson is right, Windows is not able to see those changes.

 

My intention, that the wrong (a mysteriously cached) file is compiled may come from this: Windows does not see, that the file has changed - hence it does not

recompile it and so I have the impression that it used the wrong file.

 

However notepad++ may have some quirks implemented, so that the look and feel in terms of noticing file changes is better than that one from the Visual Foo Bar tools.

 

Well, I stop banging my head on this and write 100 x as penalty:

 

"I won't use Linux Editors with Windows on network drives\n"

"I won't use Linux Editors with Windows on network drives\n"

"I won't use Linux Editors with Windows on network drives\n"

"I won't use Linux Editors with Windows on network drives\n" *97

 

Thanks again.

Last Edited: Thu. Jan 8, 2015 - 12:19 PM