Search in sources :

Example 1 with AdtImportProvider

use of com.android.tools.idea.gradle.eclipse.AdtImportProvider in project android by JetBrains.

the class AndroidImportProjectAction method importAdtProject.

private static void importAdtProject(@NotNull VirtualFile file) {
    AdtImportProvider adtImportProvider = new AdtImportProvider(true);
    AddModuleWizard wizard = new AddModuleWizard(null, ProjectImportProvider.getDefaultPath(file), adtImportProvider);
    if (wizard.showAndGet()) {
        try {
            doCreate(wizard);
        } catch (final IOException e) {
            invokeLaterIfNeeded(new Runnable() {

                @Override
                public void run() {
                    Messages.showErrorDialog(e.getMessage(), "Project Initialization Failed");
                }
            });
        }
    }
}
Also used : AdtImportProvider(com.android.tools.idea.gradle.eclipse.AdtImportProvider) AddModuleWizard(com.intellij.ide.util.newProjectWizard.AddModuleWizard) IOException(java.io.IOException)

Aggregations

AdtImportProvider (com.android.tools.idea.gradle.eclipse.AdtImportProvider)1 AddModuleWizard (com.intellij.ide.util.newProjectWizard.AddModuleWizard)1 IOException (java.io.IOException)1