Search in sources :

Example 1 with DirtyStateListener

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());
}
Also used : DebugConfiguration(org.eclipse.che.ide.api.debug.DebugConfiguration) DirtyStateListener(org.eclipse.che.ide.api.debug.DebugConfigurationPage.DirtyStateListener)

Aggregations

DebugConfiguration (org.eclipse.che.ide.api.debug.DebugConfiguration)1 DirtyStateListener (org.eclipse.che.ide.api.debug.DebugConfigurationPage.DirtyStateListener)1