use of bndtools.release.api.IReleaseParticipant in project bndtools by bndtools.
the class Activator method getReleaseParticipants.
public static List<IReleaseParticipant> getReleaseParticipants() {
//$NON-NLS-1$
IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor(PLUGIN_ID, "bndtoolsReleaseParticipant");
if (elements.length == 0) {
return Collections.emptyList();
}
List<IReleaseParticipant> participants = new ArrayList<IReleaseParticipant>();
for (IConfigurationElement element : elements) {
try {
//$NON-NLS-1$
IReleaseParticipant participant = (IReleaseParticipant) element.createExecutableExtension("class");
//$NON-NLS-1$
String strRanking = element.getAttribute("ranking");
int ranking = 0;
if (strRanking != null && strRanking.length() > 0) {
ranking = Integer.parseInt(strRanking);
}
participant.setRanking(ranking);
participants.add(participant);
} catch (CoreException e) {
logError(Messages.errorExecutingStartupParticipant, e);
}
}
return participants;
}
use of bndtools.release.api.IReleaseParticipant in project bndtools by bndtools.
the class ReleaseHelper method postRelease.
private static void postRelease(ReleaseContext context, List<IReleaseParticipant> participants, boolean success) {
context.setCurrentScope(Scope.POST_RELEASE);
for (IReleaseParticipant participant : participants) {
participant.postRelease(context, success);
}
context.close();
}
Aggregations