use of org.eclipse.linuxtools.internal.profiling.launch.provider.launch.ProviderLaunchShortcut in project linuxtools by eclipse.
the class LaunchTest method testIExecutableExtension.
@Test
public void testIExecutableExtension() {
IExtensionPoint extPoint = Platform.getExtensionRegistry().getExtensionPoint(LAUNCH_SHORT_EXTPT);
assertNotNull(extPoint);
IConfigurationElement[] configs = extPoint.getConfigurationElements();
assertTrue(configs.length > 0);
for (IConfigurationElement cfg : configs) {
if (cfg.getAttribute("id").equals(STUB_ID)) {
// $NON-NLS-1$
try {
// $NON-NLS-1$
assertTrue(cfg.createExecutableExtension("class") instanceof ProviderLaunchShortcut);
} catch (CoreException e) {
fail(e.getMessage());
}
// $NON-NLS-1$
assertEquals(cfg.getChildren("class").length, 1);
// $NON-NLS-1$
IConfigurationElement elem = cfg.getChildren("class")[0];
for (int i = 0; i < 2; i++) {
// $NON-NLS-1$ //$NON-NLS-2$
assertNotNull(elem.getChildren("parameter")[i].getAttribute("name"));
// $NON-NLS-1$ //$NON-NLS-2$
assertNotNull(elem.getChildren("parameter")[i].getAttribute("value"));
}
}
}
}
Aggregations