Author Topic: Did something change in how Slick detects deleted/modified files?  (Read 526 times)

jporkkahtc

  • Senior Community Member
  • Posts: 1861
  • Hero Points: 179
  • Text
I switch back and forth between Slick and IntelliJ.
IntelliJ always automatically saves on switching apps.

Slick now sometimes prompts "Save deleted files ...." with the path of a file I was editing in IntelliJ.
Of course, the file isn't really deleted, but presumably IntelliJ is in the middle of saving it.
In the last couple of days I've hit this twice -- and before Beta1, I've never seen this interaction between Slick and IntelliJ.

IntelliJ appears to do a safe save, as in:
Code: [Select]
write foo.java_temp
rename foo.java foo.java_old
rename foo.java_temp foo.java
del foo.java_old

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4964
  • Hero Points: 409
Re: Did something change in how Slick detects deleted/modified files?
« Reply #1 on: August 15, 2018, 12:43:04 am »
I would think this would be more likely to occur if IntelliJ has some feature where it auto saves files when you switch to another application. I guess would also be more likely to happen if IntellliJ is very slow at saving files.

I'm not aware of any bug where SlickEdit mistakenly thinks a file is deleted. However, SlickEdit probably only checks once (does not poll).

jporkkahtc

  • Senior Community Member
  • Posts: 1861
  • Hero Points: 179
  • Text
Re: Did something change in how Slick detects deleted/modified files?
« Reply #2 on: August 15, 2018, 08:03:34 pm »
As I said, it *does* have that feature...
I was asking, because I've hit this problem twice in the last few days, but never before in the last many months that I've been using both editors together.

The one thing that is different now is the Slickedit version.

IntelliJ seems to begin saving as soon as you hit Alt-Tab.
If click on slick to activate it (instead of alt-tab), then Slick doesn't see that the file has changed at all - as IntelliJ doesn't start saving until that click, so it is too late.
I don't usually switch apps this way -- just testing here).

If I'm slow with Alt-tab, then the save completes, Slick reloads the file, and life is good.

I don't know why saving would be any slower now that it used to be.
Maybe Slick is faster doing its modified check now?

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4964
  • Hero Points: 409
Re: Did something change in how Slick detects deleted/modified files?
« Reply #3 on: August 15, 2018, 09:32:49 pm »
I didn't think we made any changes in v23 beta 1 vs v22. The code for determining whether a file date changes is threaded and has been for many versions. The thread doesn't check until SlickEdit gets application focus. We had to thread this to avoid hangs.