1 /* 2 * Copyright (C) 2014 The Android Open Source Project 3 * 4 * Licensed under the Eclipse Public License, Version 1.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.eclipse.org/org/documents/epl-v10.php 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package com.android.ide.eclipse.adt.internal.wizards.exportgradle; 17 18 import org.eclipse.jface.wizard.WizardPage; 19 import org.eclipse.swt.SWT; 20 import org.eclipse.swt.custom.CLabel; 21 import org.eclipse.swt.layout.GridData; 22 import org.eclipse.swt.layout.GridLayout; 23 import org.eclipse.swt.widgets.Composite; 24 25 class ImportInsteadPage extends WizardPage { 26 public ImportInsteadPage() { 27 super("importInstead"); 28 setTitle("Import Instead?"); 29 setDescription("Consider importing directly into Android Studio instead of exporting from Eclipse"); 30 } 31 32 @Override 33 public void createControl(Composite parent) { 34 Composite container = new Composite(parent, SWT.NULL); 35 setControl(container); 36 container.setLayout(new GridLayout(1, false)); 37 38 CLabel label = new CLabel(container, SWT.NONE); 39 label.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, true, false, 1, 1)); 40 label.setText( 41 "Recent versions of Android Studio now support direct import of ADT projects.\n" + 42 "\n" + 43 "There are advantages to importing from Studio instead of exporting from Eclipse:\n" + 44 "- It can replace jars and library projects with Gradle dependencies instead\n" + 45 "- On import, it creates a new copy of the project and changes the project structure\n" + 46 " to the new Gradle directory layout which better supports multiple resource directories.\n" + 47 "- It can merge instrumentation test projects into the same project\n" + 48 "- Android Studio is released more frequently than the ADT plugin, so the import\n" + 49 " mechanism more closely tracks the requirements of Studio Gradle projects.\n" + 50 "\n" + 51 "If you want to preserve your Eclipse directory structure, or if for some reason import\n" + 52 "in Studio doesn't work (please let us know by filing a bug), continue to export from\n" + 53 "Eclipse instead."); 54 } 55 } 56