New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File change detection v3 #3070

Merged
merged 9 commits into from Jan 30, 2015

Conversation

Projects
None yet
4 participants
@pvrs12
Contributor

pvrs12 commented Jan 30, 2015

This attempt at file change detection utilizes the time at which the files were modified through Processing's save/load interface vs the time the files were modifed on disk. A field was added to SketchCode.java to track this (lastModified) and it is updated when a sketch is saved, loaded, or saved as.

I had added some simple exception handling to Sketch.java to allow testing, but removed it for this push. If you want I can re-add that to allow others to successfully run Processing.
This is the simple change I made at line 1214

    try{
    editor.setCode(current);
//    editor.header.rebuild();
    editor.header.repaint();
    }catch(NullPointerException e){
      //e.printStackTrace();
    }

Hopefully this fixes the problems that Mac OS X was having with the spurious reloads and should run faster than reading through the content of each file individually.

benfry added a commit that referenced this pull request Jan 30, 2015

@benfry benfry merged commit 4ad64c4 into processing:master Jan 30, 2015

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Jan 30, 2015

Member

Giving it a shot, thanks for your continued work on this one.

Member

benfry commented Jan 30, 2015

Giving it a shot, thanks for your continued work on this one.

@hamoid

This comment has been minimized.

Show comment
Hide comment
@pvrs12

pvrs12 Jan 31, 2015

Contributor

Thank you :D that helps a lot

Contributor

pvrs12 replied Jan 31, 2015

Thank you :D that helps a lot

@shiffman

This comment has been minimized.

Show comment
Hide comment
@shiffman

shiffman Feb 26, 2015

Member

FYI in current build (233) I'm getting the "Your sketch has been modified externally" messages continuously even with no changes again. I noticed there's still an open issue #2852 so am not filing a new one.

Member

shiffman commented Feb 26, 2015

FYI in current build (233) I'm getting the "Your sketch has been modified externally" messages continuously even with no changes again. I noticed there's still an open issue #2852 so am not filing a new one.

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Feb 26, 2015

Member

Yup, same here.

Member

benfry commented Feb 26, 2015

Yup, same here.

@pvrs12 pvrs12 deleted the pvrs12:file-change-detection branch May 18, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment