use of org.eclipse.che.ide.api.debug.DebugConfigurationPage.DirtyStateListener in project che by eclipse.
the class EditDebugConfigurationsPresenter method handleConfigurationSelection.
private void handleConfigurationSelection(DebugConfiguration configuration) {
editedConfiguration = configuration;
editedConfigurationOriginName = configuration.getName();
view.setConfigurationName(configuration.getName());
view.setDebugButtonState(true);
final DebugConfigurationPage<? extends DebugConfiguration> page = configuration.getType().getConfigurationPage();
final DebugConfigurationPage<DebugConfiguration> p = ((DebugConfigurationPage<DebugConfiguration>) page);
editedPage = p;
p.setDirtyStateListener(new DirtyStateListener() {
@Override
public void onDirtyStateChanged() {
view.setCancelButtonState(isViewModified());
view.setSaveButtonState(isViewModified());
view.setDebugButtonState(!isViewModified());
}
});
p.resetFrom(configuration);
p.go(view.getDebugConfigurationPageContainer());
}
Aggregations