DESCRIPTION

Bug 431714 - EModelService.findElements does not find handlers and
commands

and

Bug 431798 - EModelService.findElements does not find bindings and
bindingtables

- I added more tests and also provided a resource file. This is easier
to read for a tester and also easier to add elements

-Optimize the search tree a little bit for better performance

Change-Id: I67fe64e75d05dce3e24544ebeefbef9a60bd9f13
Signed-off-by: Owen Strickland xxx@xxx.xxx

COMMENTS

author: Owen Strickland
date: 2014-04-03 02:51:01.000000000

Uploaded patch set 5.

-------------------------------------
author: Brenden Conley
date: 2014-04-03 02:51:06.000000000

Patch Set 5:

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

-------------------------------------
author: Brenden Conley
date: 2014-04-03 03:05:28.000000000

Patch Set 5: Verified+1

Build Successful 

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

-------------------------------------
author: Slade Moran
date: 2014-04-03 15:11:03.000000000

Patch Set 5: Code-Review-1

The added usecases look good and I like that you use an e4xmi file to load a model to search.

But the new testcases and testFindHandler() should use the new API to find the model elements.  ex:
List<MHandler> handlers = ms.findElements(searchRoot, MHandler.class,
		EModelService.ANYWHERE, new Selector() {
xxx@xxx.xxx
			public boolean select(MApplicationElement element) {
				return element instanceof MHandler
						&& id.equals(element.getElementId());
			}
		});

i.e. they should pass in a Selector.

I think because of this difference in testFindHandler(), I can't rebase this change any more.  Could you please update it to the new findElements(*) method?

-------------------------------------
author: Owen Strickland
date: 2014-04-03 15:57:12.000000000

Patch Set 5:

They are using the new API...indirectly !
All findElements method that are not getting a Selector as a parameter, are creating a Selector in the implementation.

Is this OK for you?

-------------------------------------
author: Slade Moran
date: 2014-04-03 16:28:41.000000000

Patch Set 5:

While I don't mind if one or two used the old API, our tests should show the preferred way in this case, the new API.

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