Search in sources :

Example 1 with DebugConfiguration

use of org.eclipse.che.ide.api.debug.DebugConfiguration in project che by eclipse.

the class DebugConfigurationsManagerImpl method createConfiguration.

@Override
public DebugConfiguration createConfiguration(String typeId, String name, String host, int port, Map<String, String> connectionProperties) {
    final DebugConfigurationType configurationType = configurationTypeRegistry.getConfigurationTypeById(typeId);
    final DebugConfiguration configuration = new DebugConfiguration(configurationType, generateUniqueConfigurationName(configurationType, name), host, port, connectionProperties);
    configurations.add(configuration);
    saveConfigurations();
    fireConfigurationAdded(configuration);
    return configuration;
}
Also used : DebugConfiguration(org.eclipse.che.ide.api.debug.DebugConfiguration) DebugConfigurationType(org.eclipse.che.ide.api.debug.DebugConfigurationType)

Example 2 with DebugConfiguration

use of org.eclipse.che.ide.api.debug.DebugConfiguration in project che by eclipse.

the class EditDebugConfigurationsPresenter method onSaveClicked.

@Override
public void onSaveClicked() {
    final DebugConfiguration selectedConfiguration;
    if (view.getSelectedConfiguration() == null) {
        return;
    }
    onNameChanged();
    selectedConfiguration = view.getSelectedConfiguration();
    updateConfiguration(selectedConfiguration);
    fetchConfigurations();
}
Also used : DebugConfiguration(org.eclipse.che.ide.api.debug.DebugConfiguration)

Example 3 with DebugConfiguration

use of org.eclipse.che.ide.api.debug.DebugConfiguration in project che by eclipse.

the class EditDebugConfigurationsPresenter method onDebugClicked.

@Override
public void onDebugClicked() {
    DebugConfiguration selectedConfiguration = view.getSelectedConfiguration();
    if (selectedConfiguration != null) {
        debugConfigurationsManager.setCurrentDebugConfiguration(selectedConfiguration);
        debugConfigurationsManager.apply(selectedConfiguration);
        onCloseClicked();
    }
}
Also used : DebugConfiguration(org.eclipse.che.ide.api.debug.DebugConfiguration)

Example 4 with DebugConfiguration

use of org.eclipse.che.ide.api.debug.DebugConfiguration in project che by eclipse.

the class EditDebugConfigurationsPresenter method onNameChanged.

@Override
public void onNameChanged() {
    DebugConfiguration selectedConfiguration = view.getSelectedConfiguration();
    if (selectedConfiguration == null || !selectedConfiguration.equals(editedConfiguration)) {
        return;
    }
    selectedConfiguration.setName(view.getConfigurationName());
    view.setCancelButtonState(isViewModified());
    view.setSaveButtonState(isViewModified());
    view.setDebugButtonState(!isViewModified());
}
Also used : DebugConfiguration(org.eclipse.che.ide.api.debug.DebugConfiguration)

Example 5 with DebugConfiguration

use of org.eclipse.che.ide.api.debug.DebugConfiguration in project che by eclipse.

the class EditDebugConfigurationsPresenter method createConfiguration.

private void createConfiguration(DebugConfigurationType type, String customName, Map<String, String> connectionProperties) {
    final DebugConfiguration configuration = debugConfigurationsManager.createConfiguration(type.getId(), customName, "localhost", 8000, connectionProperties);
    fetchConfigurations();
    view.setSelectedConfiguration(configuration);
}
Also used : DebugConfiguration(org.eclipse.che.ide.api.debug.DebugConfiguration)

Aggregations

DebugConfiguration (org.eclipse.che.ide.api.debug.DebugConfiguration)15 DebugConfigurationType (org.eclipse.che.ide.api.debug.DebugConfigurationType)4 ArrayList (java.util.ArrayList)3 HashMap (java.util.HashMap)2 Test (org.junit.Test)2 Optional (com.google.common.base.Optional)1 HashSet (java.util.HashSet)1 List (java.util.List)1 ActionEvent (org.eclipse.che.ide.api.action.ActionEvent)1 Presentation (org.eclipse.che.ide.api.action.Presentation)1 DirtyStateListener (org.eclipse.che.ide.api.debug.DebugConfigurationPage.DirtyStateListener)1 Category (org.eclipse.che.ide.ui.list.Category)1 DebugConfigurationDto (org.eclipse.che.plugin.debugger.ide.configuration.dto.DebugConfigurationDto)1