DESCRIPTION

Refactor launch provider to allow other plug-ins to extend its functionality.

This plug-in is a refactoring of the current snapshot launch provider
plug-in, removing all harcoded references of a specific profiling type
and replacing them with abstract getters. This allows for launch provider
plug-ins to extend the existing functionality and set their specific
profiling types.

Change-Id: Ibab63109cba5589f3657123f7911abacab30f3b6


COMMENTS

author: Kamila Nguyen
date: 2012-08-27 18:43:18.000000000

Patch Set 1: (5 inline comments)

This looks good to me. Just a few nitpicks here and there, but I think Roland should approve it, I am not familiar enough with this area yet.

Line:135, profiling/org.eclipse.linuxtools.profiling.provider/src/org/eclipse/linuxtools/internal/profiling/provider/ProviderOptionsTab.java -> Can the name of this attribute ("provider") be made a constant somewhere ?

Line:28, profiling/org.eclipse.linuxtools.profiling.provider/src/org/eclipse/linuxtools/internal/profiling/provider/AbstractProviderPreferencesPage.java -> I think profiling types should be public static final Strings (or Objects) defined in a central place.

Line:32, profiling/org.eclipse.linuxtools.profiling.provider/src/org/eclipse/linuxtools/internal/profiling/provider/AbstractProviderPreferencesPage.java -> If this is not needed it should be removed. We should avoid having commented out code

Line:34, profiling/org.eclipse.linuxtools.profiling.provider/src/org/eclipse/linuxtools/internal/profiling/provider/AbstractProviderPreferencesPage.java -> Should the string be externalized ?

Line:39, profiling/org.eclipse.linuxtools.profiling.provider/src/org/eclipse/linuxtools/internal/profiling/provider/AbstractProviderPreferencesPage.java -> Hmm.. I am a little confused with the setup of this code.
Why do we check if the type is not generic ? Doesn't this class correspond to "generic" profiling type ? or is that orthogonal ?

-------------------------------------
author: Octavio Lucero
date: 2012-08-27 21:10:06.000000000

Patch Set 1: (4 inline comments)



Line:28, profiling/org.eclipse.linuxtools.profiling.provider/src/org/eclipse/linuxtools/internal/profiling/provider/AbstractProviderPreferencesPage.java -> Done

Line:32, profiling/org.eclipse.linuxtools.profiling.provider/src/org/eclipse/linuxtools/internal/profiling/provider/AbstractProviderPreferencesPage.java -> Done

Line:34, profiling/org.eclipse.linuxtools.profiling.provider/src/org/eclipse/linuxtools/internal/profiling/provider/AbstractProviderPreferencesPage.java -> Done

Line:39, profiling/org.eclipse.linuxtools.profiling.provider/src/org/eclipse/linuxtools/internal/profiling/provider/AbstractProviderPreferencesPage.java -> The "generic" profiling type is used for the parent preference page, which plug-ins of specific profiling types will contribute to. At the moment it's just an empty parent page, but will contain global profiling preferences if ever necessary, so I think it's best to differentiate this type from rest.

-------------------------------------
author: Kamila Nguyen
date: 2012-08-28 13:52:05.000000000

Patch Set 1: (1 inline comment)



Line:39, profiling/org.eclipse.linuxtools.profiling.provider/src/org/eclipse/linuxtools/internal/profiling/provider/AbstractProviderPreferencesPage.java -> I guess what I was trying to say here is: can we use polymorphism instead string comparison. KWIM ?

-------------------------------------
author: Octavio Lucero
date: 2012-08-28 14:09:37.000000000

Patch Set 1: (1 inline comment)



Line:39, profiling/org.eclipse.linuxtools.profiling.provider/src/org/eclipse/linuxtools/internal/profiling/provider/AbstractProviderPreferencesPage.java -> Yes, that can be done. It would mean reintroducing the ProviderPreferencePage class, which I removed in the latest patchset, from where these methods would be overridden.

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