Skip to content
Snippets Groups Projects
Commit efe1cbf8 authored by ladenberger's avatar ladenberger
Browse files

Workaround for save bug. The method getTextTimestamp returns in some cases -1...

Workaround for save bug. The method getTextTimestamp returns in some cases -1 (no time annotation exists). I noticed that many different instances of the same resource exist. Some are annotated, the others not.

git-svn-id: svn://svn.code.sf.net/p/rodin-b-sharp/svn/trunk/Camille@16184 1434b563-b632-4741-aa49-43a3a8374d2e
parent f41a4d30
No related branches found
No related tags found
No related merge requests found
...@@ -60,7 +60,14 @@ public class PersistenceHelper { ...@@ -60,7 +60,14 @@ public class PersistenceHelper {
* Try to set timestamp to the same as in the annotation. Setting on * Try to set timestamp to the same as in the annotation. Setting on
* both Resource and IResource to be save. * both Resource and IResource to be save.
*/ */
final long textTimestamp = getTextTimestamp(resource); //final long textTimestamp = getTextTimestamp(resource);
// TODO: Workaround for save bug. The method getTextTimestamp
// returns in some cases -1 (no time annotation exists). I noticed
// that many different instances of the same resource exist. Some
// are annotated, the others not.
long textTimestamp = getTextTimestamp(resource);
if(textTimestamp == -1)
textTimestamp = System.currentTimeMillis();
resource.setTimeStamp(textTimestamp); resource.setTimeStamp(textTimestamp);
getIResource(resource).setLocalTimeStamp(textTimestamp); getIResource(resource).setLocalTimeStamp(textTimestamp);
} catch (final IOException e) { } catch (final IOException e) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment