DESCRIPTION

Bug 484105: RegistryReader to also handle registry addition

Simply registers itself as a listener for the extension registry to be
notified on additions and trigger addition of extension to functional
model (relying on already existing APIs)

Change-Id: I4820d15fcc04e8313c8344cbc8d90e68642efd29
Signed-off-by: Isis Velasquez xxx@xxx.xxx


COMMENTS

author: Isis Velasquez
date: 2015-12-22 08:58:05.000000000

Uploaded patch set 1.

-------------------------------------
author: Brenden Conley
date: 2015-12-22 08:58:11.000000000

Patch Set 1:

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

-------------------------------------
author: Brenden Conley
date: 2015-12-22 09:35:06.000000000

Patch Set 1: Verified+1

Build Successful 

https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/7791/ : SUCCESS

-------------------------------------
author: Abraham Rubio
date: 2015-12-22 17:07:36.000000000

Patch Set 1:

Very nice!

Similar code has been written a number of years ago (~2004/2005) and went stale by absence of usecase and tests. I would strongly recommend you to add automated tests. 
To do this, you probably don't want to use the simpleconfigurator but directly install the bundle in OSGi by hand (BundleContext.install(...)) and then resolve it. This will allow for the tests to run from the IDE or automated builds reliably.

-------------------------------------
author: Isis Velasquez
date: 2015-12-23 14:26:22.000000000

Patch Set 1:

The tricky thing about automated test is more to create a bundle somewhere with extensions, that is not in the test TP, but can be installed. Are you aware of any test achieving something similar that I could mimic?

-------------------------------------
author: Abraham Rubio
date: 2015-12-23 20:21:51.000000000

Patch Set 1:

> The tricky thing about automated test is more to create a bundle
 > somewhere with extensions, that is not in the test TP, but can be
 > installed. Are you aware of any test achieving something similar
 > that I could mimic?

I think the osgi tests do something like that and in p2 we also do something like that. In p2 we store the bundles as jars because we needed the code.
However for such a case, you would not need to jar the bundle and could simply rely on the folder form. On top of that if you were not trying to activate the class, you would not even need any class files. With all of this, you could directly store the bundles in the git repo and directly feed those to OSGi (using the absolute:file: URL format).

-------------------------------------
author: Isis Velasquez
date: 2015-12-24 10:22:08.000000000

Patch Set 1:

I found classes such as ContextsExtensionDynamicTest that seem to be the perfect class to mimic. I'll try to add some tests for editorRegistry and file/editor association as they are the one of this user story.

-------------------------------------
author: Isis Velasquez
date: 2015-12-24 14:46:59.000000000

Abandoned

As explained in https://bugs.eclipse.org/bugs/show_bug.cgi?id=484105#c5 , this change isn't required since dynamism is already implemented in most Platform-UI extensions.

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