mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-CR-41226 IDEA-204001 don't update state on appClosing — projectClosed (fixed in this commit) and projectOpened (earlier commit) is more correct
This commit is contained in:
@@ -192,7 +192,7 @@ public class RecentProjectsManagerBase extends RecentProjectsManager implements
|
||||
}
|
||||
|
||||
// it is not good to have timestamps in state data, anyway, now state saved not on "timer" (not more than once in 5 minutes),
|
||||
// but if modification counter changed (that's why updateOpenProjectsTimestamps is not called in getModificationCounter as validateRecentProjects)
|
||||
// but if modification counter changed
|
||||
myState.updateOpenProjectsTimestamps(this);
|
||||
return myState;
|
||||
}
|
||||
@@ -307,8 +307,10 @@ public class RecentProjectsManagerBase extends RecentProjectsManager implements
|
||||
}
|
||||
}
|
||||
}
|
||||
myState.validateRecentProjects(myModCounter);
|
||||
}
|
||||
|
||||
// for simplicity, for now just increment and don't check is something really changed
|
||||
myModCounter.incrementAndGet();
|
||||
}
|
||||
|
||||
@@ -652,6 +654,7 @@ public class RecentProjectsManagerBase extends RecentProjectsManager implements
|
||||
markPathRecent(path, openProject);
|
||||
}
|
||||
}
|
||||
updateLastProjectPath();
|
||||
updateUI();
|
||||
}
|
||||
}
|
||||
@@ -757,7 +760,6 @@ public class RecentProjectsManagerBase extends RecentProjectsManager implements
|
||||
|
||||
@Override
|
||||
public long getModificationCount() {
|
||||
myState.validateRecentProjects(myModCounter);
|
||||
return myModCounter.get();
|
||||
}
|
||||
|
||||
@@ -778,20 +780,10 @@ public class RecentProjectsManagerBase extends RecentProjectsManager implements
|
||||
doReopenLastProject();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void projectFrameClosed() {
|
||||
updateLastProjectPath();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void projectOpenFailed() {
|
||||
updateLastProjectPath();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void appClosing() {
|
||||
updateLastProjectPath();
|
||||
}
|
||||
}
|
||||
|
||||
private static class MyIcon extends Pair<Icon, Long> {
|
||||
|
||||
Reference in New Issue
Block a user