use of org.osmorc.run.OsgiRunConfigurationCheckerProvider in project intellij-plugins by JetBrains.
the class OsgiRunConfigurationEditor method onFrameworkChange.
/**
* Called when the framework is changed. This will create a new editor for framework properties and will also remove
* any framework bundles from the list, as they are no longer in classpath.
*/
private void onFrameworkChange() {
if (myFrameworkInstances.getSelectedItem() != null) {
FrameworkInstanceDefinition instance = (FrameworkInstanceDefinition) myFrameworkInstances.getSelectedItem();
FrameworkIntegrator integrator = FrameworkIntegratorRegistry.getInstance().findIntegratorByInstanceDefinition(instance);
assert integrator != null : instance;
// clear the panel
myAdditionalPropertiesPanel.removeAll();
// create and install a new editor (if present)
myCurrentRunPropertiesEditor = integrator.createRunPropertiesEditor();
if (myCurrentRunPropertiesEditor != null) {
myAdditionalPropertiesPanel.removeAll();
myAdditionalPropertiesPanel.add(myCurrentRunPropertiesEditor.getUI(), BorderLayout.CENTER);
if (myRunConfiguration != null) {
myCurrentRunPropertiesEditor.resetEditorFrom(myRunConfiguration);
OsgiRunConfigurationChecker checker = null;
if (integrator instanceof OsgiRunConfigurationCheckerProvider) {
checker = ((OsgiRunConfigurationCheckerProvider) integrator).getOsgiRunConfigurationChecker();
}
myRunConfiguration.setAdditionalChecker(checker);
}
}
// remove all framework bundles from the list
RunConfigurationTableModel model = getTableModel();
model.removeAllOfType(SelectedBundle.BundleType.FrameworkBundle);
}
}
Aggregations