Search in sources :

Example 11 with MutableProjectConfig

use of org.eclipse.che.ide.api.project.MutableProjectConfig in project che by eclipse.

the class ImportProjectWizardPresenter method createDefaultWizard.

/** Creates and returns 'default' project wizard with pre-defined pages only. */
private ImportWizard createDefaultWizard() {
    final MutableProjectConfig dataObject = new MutableProjectConfig();
    final ImportWizard importWizard = importWizardFactory.newWizard(dataObject);
    importWizard.setUpdateDelegate(this);
    // add pre-defined first page
    importWizard.addPage(mainPage);
    return importWizard;
}
Also used : MutableProjectConfig(org.eclipse.che.ide.api.project.MutableProjectConfig) ImportWizard(org.eclipse.che.ide.projectimport.wizard.ImportWizard)

Example 12 with MutableProjectConfig

use of org.eclipse.che.ide.api.project.MutableProjectConfig in project che by eclipse.

the class ConvertFolderToProjectActionTest method configurationWizardShouldBeShowed.

@Test
public void configurationWizardShouldBeShowed() throws Exception {
    when(resource.getName()).thenReturn(TEXT);
    action.actionPerformed(event);
    verify(resource).getName();
    verify(projectConfigWizard).show(projectConfigCapture.capture());
    MutableProjectConfig projectConfig = projectConfigCapture.getValue();
    assertEquals(TEXT, projectConfig.getName());
    assertEquals(TEXT, projectConfig.getPath());
}
Also used : MutableProjectConfig(org.eclipse.che.ide.api.project.MutableProjectConfig) Test(org.junit.Test)

Example 13 with MutableProjectConfig

use of org.eclipse.che.ide.api.project.MutableProjectConfig in project che by eclipse.

the class ProjectWizardPresenter method show.

/** Open the project wizard with given mode. */
public void show(Path parent) {
    resetState();
    this.wizardMode = CREATE;
    MutableProjectConfig config = new MutableProjectConfig();
    config.setPath(parent.toString());
    showDialog(config);
}
Also used : MutableProjectConfig(org.eclipse.che.ide.api.project.MutableProjectConfig)

Aggregations

MutableProjectConfig (org.eclipse.che.ide.api.project.MutableProjectConfig)13 List (java.util.List)3 Function (org.eclipse.che.api.promises.client.Function)3 FunctionException (org.eclipse.che.api.promises.client.FunctionException)3 Promise (org.eclipse.che.api.promises.client.Promise)3 Project (org.eclipse.che.ide.api.resources.Project)3 Resource (org.eclipse.che.ide.api.resources.Resource)3 Provider (com.google.inject.Provider)2 PromiseError (org.eclipse.che.api.promises.client.PromiseError)2 WizardPage (org.eclipse.che.ide.api.wizard.WizardPage)2 ImportWizard (org.eclipse.che.ide.projectimport.wizard.ImportWizard)2 Path (org.eclipse.che.ide.resource.Path)2 Optional (com.google.common.base.Optional)1 Lists.newArrayList (com.google.common.collect.Lists.newArrayList)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 NewProjectConfig (org.eclipse.che.api.core.model.project.NewProjectConfig)1 SourceStorage (org.eclipse.che.api.core.model.project.SourceStorage)1 AttributeDto (org.eclipse.che.api.project.shared.dto.AttributeDto)1