DESCRIPTION

Bug 512601 - Add databinding observables for active workLeon Ochoach window,
active workLeon Ochoach page, and active workbench part

Change-Id: I8f43d5f4edd4cf8db9cc1976aed04b87cac96320


COMMENTS

author: Brock Pruitt
date: 2017-02-24 01:41:49.000000000

Uploaded patch set 4.

-------------------------------------
author: Brenden Conley
date: 2017-02-24 01:41:55.000000000

Patch Set 4:

Build Started https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/12145/

-------------------------------------
author: Brenden Conley
date: 2017-02-24 02:07:49.000000000

Patch Set 4: Code-Review-1

Build Unstable 

https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/12145/ : UNSTABLE

-------------------------------------
author: Kelly Potter
date: 2017-02-24 02:53:01.000000000

Patch Set 4:

(7 comments)

Line:302, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/databinding/WorkbenchObservables.java -> I don't think this implementation is correct. In the case where the active editor is not the active part, this will incorrectly return null.

Line:358, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/databinding/WorkbenchObservables.java -> final

Line:367, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/databinding/WorkbenchObservables.java -> final

This should probably contain this.value = value at some point... and it should only do so if isListening = true.

Line:374, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/databinding/WorkbenchObservables.java -> final

Line:389, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/databinding/WorkbenchObservables.java -> final

Line:394, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/databinding/WorkbenchObservables.java -> I believe there's a race condition between lastListenerAdded/lastListenerRemoved and these runnables. It looks like it's possible for startListeningInternal to be called twice with no remove between, for the remove to be called without a start, or for the remove to be omitted entirely.

If the circumstances aren't clear, ping me and we can dig into it.

Line:404, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/databinding/WorkbenchObservables.java -> startListening is overridable and calls into other code that this class has no control over. It should be the last thing in this method to prevent any possibility of other code calling back into this object while it's in an invalid intermediate state.

-------------------------------------
author: Brock Pruitt
date: 2017-02-24 04:31:41.000000000

Patch Set 4:

(5 comments)

Line:358, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/databinding/WorkbenchObservables.java -> Done

Line:367, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/databinding/WorkbenchObservables.java -> this.value = value is at the end of line 369. Added a state check and made final.

Line:374, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/databinding/WorkbenchObservables.java -> Done

Line:389, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/databinding/WorkbenchObservables.java -> Done

Line:394, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/databinding/WorkbenchObservables.java -> There is no race condition.

-------------------------------------
author: Gerrit Code Review
date: 2017-02-24 19:10:15.000000000

Change has been successfully merged into the git repository by Brock Pruitt

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