DESCRIPTION

Reduce amount of duplicate code for finding highest priority provider.

The method getOrderedConfigElements should be accessible by other
methods that need the same functionality. Exception handling will safely
ignore any extension points that fail to respect the schema.

Change-Id: Ica1960ce2b406c0e7dade6eec5b0dd7e33fe1598


COMMENTS

author: Nathanael Holden
date: 2012-10-24 14:28:27.000000000

Patch Set 1: Do not submit

For now I'd like to discuss this change.

We have 3 methods that pretty much do something very similar. They require the provider of a certain type, that has the highest priority. Where they differ, is in what part of the provider schema they need. Some need just the "id", others might need an instance of the "shortcut" class, and others might need the "id" but would like to assert that the "tabgroup" class exists.

If we assumed that all provider extension points are proper, then we could make a few more simplifications and reduce some more duplicate code.

-------------------------------------
author: Octavio Lucero
date: 2012-10-24 14:41:40.000000000

Patch Set 1:

I agree, with this assumption the logic of the mentioned methods is almost identical. We could create a single method where we would provide a type and the specific attribute that we would like to access.

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