DESCRIPTION

Implement isSynchronized() in LocalNonWorkspaceTypedElement

To solve bug 481682, we'll use a LocalNonWorkspaceTypedElement to show
a diff on a file not in any open Eclipse project. The super class
implements isSynchronized() only for accessible workspace resources via
the Eclipse resource tree. We need to handle it ourselves here,
otherwise any attempt to save from the compare editor will pop up a
dialog falsely claiming the file had been modified outside of the
compare editor.

The implementation is closely modeled after the one in the super class,
but using the file system's last-modified timestamp directly instead of
going through the Eclipse resource tree, which would always give -1L
for such inaccessible resources.

Bug: 481682
Change-Id: Idb73c049f28327efdd65bcb0fdd6465e9928e317
Signed-off-by: Alayna Houston xxx@xxx.xxx

COMMENTS

author: Alayna Houston
date: 2015-11-11 21:43:41.000000000

Uploaded patch set 1.

-------------------------------------
author: Brenden Conley
date: 2015-11-11 21:43:47.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/egit/job/egit.gerrit/7785/

-------------------------------------
author: Brenden Conley
date: 2015-11-11 22:13:58.000000000

Patch Set 1: Verified+1

Build Successful 

https://hudson.eclipse.org/egit/job/egit.gerrit/7785/ : SUCCESS

-------------------------------------
author: Alayna Houston
date: 2015-11-14 11:22:36.000000000

Patch Set 1:

(1 comment)

Line:9, /COMMIT_MSG -> To clarify: this doesn't solve bug 481682 yet. But it's a prerequisite for the fix.

-------------------------------------
author: Douglas Trujillo
date: 2015-11-14 13:48:45.000000000

Patch Set 1:

(3 comments)

Line:52, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/synchronize/compare/LocalNonWorkspaceTypedElement.java -> unnecessary assignment as this is the default for long variables.

Line:99, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/synchronize/compare/LocalNonWorkspaceTypedElement.java -> why do we need this ? The type says it's a non-workspace typed element ... I'd assume that instances which are resources are rather of the super-class type

Line:107, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/synchronize/compare/LocalNonWorkspaceTypedElement.java -> why do we need this ? The type says it's a non-workspace typed element ... I'd assume that instances which are resources are rather of the super-class type

-------------------------------------
author: Alayna Houston
date: 2015-11-14 14:19:03.000000000

Patch Set 1:

(2 comments)

Line:99, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/synchronize/compare/LocalNonWorkspaceTypedElement.java -> Right. I thought it might be safer in case the closed project was re-opened while the compare editor was still open, but it turns out it's not needed.

Line:107, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/synchronize/compare/LocalNonWorkspaceTypedElement.java -> Ditto. I'll remove these two.

-------------------------------------
author: Alayna Houston
date: 2015-11-14 14:27:43.000000000

Patch Set 1:

(3 comments)

Line:52, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/synchronize/compare/LocalNonWorkspaceTypedElement.java -> Done

Line:99, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/synchronize/compare/LocalNonWorkspaceTypedElement.java -> Done

Line:107, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/synchronize/compare/LocalNonWorkspaceTypedElement.java -> Done

-------------------------------------
author: Gerrit Johnathan Pham
date: 2015-11-14 16:26:05.000000000

Change has been successfully merged into the git repository by Jayvion Booth

-------------------------------------
