diff options
19 files changed, 220 insertions, 69 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/ApkBuilder.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/ApkBuilder.java index 979f6b1..ad20e5b 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/ApkBuilder.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/ApkBuilder.java @@ -343,17 +343,18 @@ public class ApkBuilder extends BaseBuilder { // if the main resources didn't change, then we check for the library // ones (will trigger resource repackaging too) - if (mPackageResources == false && libProjects != null && - libProjects.length > 0) { + if ((mPackageResources == false || mBuildFinalPackage == false) && + libProjects != null && libProjects.length > 0) { for (IProject libProject : libProjects) { delta = getDelta(libProject); if (delta != null) { LibraryDeltaVisitor visitor = new LibraryDeltaVisitor(); delta.accept(visitor); - mPackageResources = visitor.getResChange(); + mPackageResources |= visitor.getResChange(); + mBuildFinalPackage |= visitor.getLibChange(); - if (mPackageResources) { + if (mPackageResources && mBuildFinalPackage) { break; } } @@ -660,7 +661,7 @@ public class ApkBuilder extends BaseBuilder { String classesDexPath = osBinPath + File.separator + AndroidConstants.FN_CLASSES_DEX; if (finalPackage(osBinPath + File.separator + AndroidConstants.FN_RESOURCES_AP_, - classesDexPath,osFinalPackagePath, javaProject, + classesDexPath, osFinalPackagePath, javaProject, libProjects, referencedJavaProjects, debuggable) == false) { return allRefProjects; } @@ -678,7 +679,7 @@ public class ApkBuilder extends BaseBuilder { String apkOsFilePath = osBinPath + File.separator + ProjectHelper.getApkFilename(project, entry.getKey()); if (finalPackage(resPath, classesDexPath, apkOsFilePath, javaProject, - referencedJavaProjects, debuggable) == false) { + libProjects, referencedJavaProjects, debuggable) == false) { return allRefProjects; } } @@ -946,14 +947,16 @@ public class ApkBuilder extends BaseBuilder { * @param intermediateApk The path to the temporary resource file. * @param dex The path to the dex file. * @param output The path to the final package file to create. - * @param javaProject - * @param referencedJavaProjects - * @param debuggable + * @param javaProject the java project being compiled + * @param libProjects an optional list of library projects (can be null) + * @param referencedJavaProjects referenced projects. + * @param debuggable whether the project manifest has debuggable==true. If true, any gdbserver + * executables will be packaged with the native libraries. * @return true if success, false otherwise. */ private boolean finalPackage(String intermediateApk, String dex, String output, - final IJavaProject javaProject, IJavaProject[] referencedJavaProjects, - boolean debuggable) { + final IJavaProject javaProject, IProject[] libProjects, + IJavaProject[] referencedJavaProjects, boolean debuggable) { FileOutputStream fos = null; try { @@ -1083,6 +1086,18 @@ public class ApkBuilder extends BaseBuilder { writeNativeLibraries((IFolder) libFolder, builder, debuggable); } + // write the native libraries for the library projects. + if (libProjects != null) { + for (IProject lib : libProjects) { + libFolder = lib.findMember(SdkConstants.FD_NATIVE_LIBS); + if (libFolder != null && libFolder.exists() && + libFolder.getType() == IResource.FOLDER) { + // look inside and put .so in lib/* by keeping the relative folder path. + writeNativeLibraries((IFolder) libFolder, builder, debuggable); + } + } + } + // close the jar file and write the manifest and sign it. builder.close(); } catch (GeneralSecurityException e1) { diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/LibraryDeltaVisitor.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/LibraryDeltaVisitor.java index a24eff0..77d7422 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/LibraryDeltaVisitor.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/LibraryDeltaVisitor.java @@ -26,18 +26,23 @@ import org.eclipse.core.runtime.IPath; /** * Delta visitor specifically for Library resources. - * The goal is to detect library resource change when compiling the main project + * The goal is to detect library resource/library changes when compiling the main project * and trigger a resource recompilation/repackaging. * */ public class LibraryDeltaVisitor implements IResourceDeltaVisitor { private boolean mResChange = false; + private boolean mLibChange = false; public boolean getResChange() { return mResChange; } + public boolean getLibChange() { + return mLibChange; + } + public boolean visit(IResourceDelta delta) throws CoreException { // we are only going to look for changes in res/ // Since the delta visitor goes through the main @@ -60,6 +65,10 @@ public class LibraryDeltaVisitor implements IResourceDeltaVisitor { // res folder was changed! // This is all that matters, we can stop (return false below) mResChange = true; + } else if (SdkConstants.FD_NATIVE_LIBS.equalsIgnoreCase(segments[1])) { + // libs folder was changed. + // This is all that matters, we can stop (return false below) + mLibChange = true; } } diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/ExplodedRenderingHelper.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/ExplodedRenderingHelper.java index 62d1b6c..be882a7 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/ExplodedRenderingHelper.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/ExplodedRenderingHelper.java @@ -84,7 +84,7 @@ public final class ExplodedRenderingHelper { * @param root the root node (ie the top layout). * @param layoutNames the list of layout classes */ - ExplodedRenderingHelper(Node root, Set<String> layoutNames) { + public ExplodedRenderingHelper(Node root, Set<String> layoutNames) { mLayoutNames = layoutNames; computePadding(root, mPadding); diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/manifest/pages/OverviewExportPart.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/manifest/pages/OverviewExportPart.java index ec947c5..4c75a86 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/manifest/pages/OverviewExportPart.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/manifest/pages/OverviewExportPart.java @@ -19,6 +19,8 @@ package com.android.ide.eclipse.adt.internal.editors.manifest.pages; import com.android.ide.eclipse.adt.internal.editors.manifest.ManifestEditor; import com.android.ide.eclipse.adt.internal.editors.ui.SectionHelper.ManifestSectionPart; import com.android.ide.eclipse.adt.internal.project.ExportHelper; +import com.android.ide.eclipse.adt.internal.project.ProjectState; +import com.android.ide.eclipse.adt.internal.sdk.Sdk; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IProject; @@ -43,45 +45,69 @@ final class OverviewExportPart extends ManifestSectionPart { mOverviewPage = overviewPage; Section section = getSection(); section.setText("Exporting"); - section.setDescription("To export the application for distribution, you have the following options:"); - Composite table = createTableLayout(toolkit, 2 /* numColumns */); - - StringBuffer buf = new StringBuffer(); - buf.append("<form><li><a href=\"wizard\">"); //$NON-NLS-1$ - buf.append("Use the Export Wizard"); - buf.append("</a>"); //$NON-NLS-1$ - buf.append(" to export and sign an APK"); - buf.append("</li>"); //$NON-NLS-1$ - buf.append("<li><a href=\"manual\">"); //$NON-NLS-1$ - buf.append("Export an unsigned APK"); - buf.append("</a>"); //$NON-NLS-1$ - buf.append(" and sign it manually"); - buf.append("</li></form>"); //$NON-NLS-1$ + final IProject project = getProject(); + boolean isLibrary = false; + if (project != null) { + ProjectState state = Sdk.getProjectState(project); + if (state != null) { + isLibrary = state.isLibrary(); + } + } + + if (isLibrary) { + section.setDescription("Library project cannot be exported."); + Composite table = createTableLayout(toolkit, 2 /* numColumns */); + createFormText(table, toolkit, true, "<form></form>", false /* setupLayoutData */); + } else { + section.setDescription("To export the application for distribution, you have the following options:"); + + Composite table = createTableLayout(toolkit, 2 /* numColumns */); + + StringBuffer buf = new StringBuffer(); + buf.append("<form><li><a href=\"wizard\">"); //$NON-NLS-1$ + buf.append("Use the Export Wizard"); + buf.append("</a>"); //$NON-NLS-1$ + buf.append(" to export and sign an APK"); + buf.append("</li>"); //$NON-NLS-1$ + buf.append("<li><a href=\"manual\">"); //$NON-NLS-1$ + buf.append("Export an unsigned APK"); + buf.append("</a>"); //$NON-NLS-1$ + buf.append(" and sign it manually"); + buf.append("</li></form>"); //$NON-NLS-1$ - FormText text = createFormText(table, toolkit, true, buf.toString(), - false /* setupLayoutData */); - text.addHyperlinkListener(new HyperlinkAdapter() { - @Override - public void linkActivated(HyperlinkEvent e) { - // get the project from the editor - IEditorInput input = mOverviewPage.mEditor.getEditorInput(); - if (input instanceof FileEditorInput) { - FileEditorInput fileInput = (FileEditorInput)input; - IFile file = fileInput.getFile(); - IProject project = file.getProject(); - - if ("manual".equals(e.data)) { //$NON-NLS-1$ - // now we can export an unsigned apk for the project. - ExportHelper.exportProject(project); - } else { - // call the export wizard - ExportHelper.startExportWizard(project); + FormText text = createFormText(table, toolkit, true, buf.toString(), + false /* setupLayoutData */); + text.addHyperlinkListener(new HyperlinkAdapter() { + @Override + public void linkActivated(HyperlinkEvent e) { + if (project != null) { + if ("manual".equals(e.data)) { //$NON-NLS-1$ + // now we can export an unsigned apk for the project. + ExportHelper.exportProject(project); + } else { + // call the export wizard + ExportHelper.startExportWizard(project); + } } } - } - }); - + }); + } + layoutChanged(); - } + } + + /** + * Returns the project of the edited file. + */ + private IProject getProject() { + IEditorInput input = mOverviewPage.mEditor.getEditorInput(); + if (input instanceof FileEditorInput) { + FileEditorInput fileInput = (FileEditorInput)input; + IFile file = fileInput.getFile(); + return file.getProject(); + } + + return null; + } } diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/LaunchShortcut.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/LaunchShortcut.java index 1235f9d..432827e 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/LaunchShortcut.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/LaunchShortcut.java @@ -16,15 +16,20 @@ package com.android.ide.eclipse.adt.internal.launch; +import com.android.ide.eclipse.adt.internal.project.ProjectState; +import com.android.ide.eclipse.adt.internal.sdk.Sdk; + import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.debug.core.ILaunchConfiguration; import org.eclipse.debug.ui.DebugUITools; import org.eclipse.debug.ui.ILaunchShortcut; +import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.PlatformUI; /** * Launch shortcut to launch debug/run configuration directly. @@ -52,8 +57,17 @@ public class LaunchShortcut implements ILaunchShortcut { IProject project = r.getProject(); if (project != null) { - // and launch - launch(project, mode); + ProjectState state = Sdk.getProjectState(project); + if (state != null && state.isLibrary()) { + + MessageDialog.openError( + PlatformUI.getWorkbench().getDisplay().getActiveShell(), + "Android Launch", + "Android library projects cannot be launched."); + } else{ + // and launch + launch(project, mode); + } } } } diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/MainLaunchConfigTab.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/MainLaunchConfigTab.java index 2c96c98..1374dc7 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/MainLaunchConfigTab.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/MainLaunchConfigTab.java @@ -289,7 +289,8 @@ public class MainLaunchConfigTab extends AbstractLaunchConfigurationTab { */ protected void handleProjectButtonSelected() { IJavaProject javaProject = mProjectChooserHelper.chooseJavaProject( - mProjText.getText().trim()); + mProjText.getText().trim(), + "Please select a project to launch"); if (javaProject == null) { return; }// end if diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/junit/AndroidJUnitLaunchConfigurationTab.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/junit/AndroidJUnitLaunchConfigurationTab.java index 0850e14..305e703 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/junit/AndroidJUnitLaunchConfigurationTab.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/junit/AndroidJUnitLaunchConfigurationTab.java @@ -556,7 +556,8 @@ public class AndroidJUnitLaunchConfigurationTab extends AbstractLaunchConfigurat * constraining the search for main types to the specified project. */ private void handleProjectButtonSelected() { - IJavaProject project = mProjectChooserHelper.chooseJavaProject(getProjectName()); + IJavaProject project = mProjectChooserHelper.chooseJavaProject(getProjectName(), + "Please select a project to launch"); if (project == null) { return; } diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/project/ProjectChooserHelper.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/project/ProjectChooserHelper.java index e549d58..a7a6e72 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/project/ProjectChooserHelper.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/project/ProjectChooserHelper.java @@ -104,15 +104,20 @@ public class ProjectChooserHelper { * * @param projectName If non null and not empty, represents the name of an Android project * that will be selected by default. + * @param message Message for the dialog box. Can be null in which case a default message + * is displayed. * @return the project chosen by the user in the dialog, or null if the dialog was canceled. */ - public IJavaProject chooseJavaProject(String projectName) { + public IJavaProject chooseJavaProject(String projectName, String message) { ILabelProvider labelProvider = new JavaElementLabelProvider( JavaElementLabelProvider.SHOW_DEFAULT); ElementListSelectionDialog dialog = new ElementListSelectionDialog( mParentShell, labelProvider); dialog.setTitle("Project Selection"); - dialog.setMessage("Select a project to constrain your search."); + if (message == null) { + message = "Please select a project"; + } + dialog.setMessage(message); IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot(); IJavaModel javaModel = JavaCore.create(workspaceRoot); diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/properties/LibraryProperties.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/properties/LibraryProperties.java index 6bcc0d3..1675f7f 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/properties/LibraryProperties.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/properties/LibraryProperties.java @@ -154,7 +154,8 @@ final class LibraryProperties { mAddButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { - IJavaProject javaProject = mProjectChooser.chooseJavaProject(null); + IJavaProject javaProject = mProjectChooser.chooseJavaProject(null /*projectName*/, + "Please select a library project"); if (javaProject != null) { IProject iProject = javaProject.getProject(); IPath relativePath = Sdk.makeRelativeTo( @@ -179,6 +180,7 @@ final class LibraryProperties { mItemDataList.remove(data); mTable.remove(mTable.getSelectionIndex()); resetEnabled(); + mMustSave = true; } }); @@ -201,6 +203,7 @@ final class LibraryProperties { // reset the selection mTable.select(index - 1); resetEnabled(); + mMustSave = true; } }); @@ -220,6 +223,7 @@ final class LibraryProperties { // reset the selection mTable.select(index + 1); resetEnabled(); + mMustSave = true; } }); diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/actions/ExportAction.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/actions/ExportAction.java index 9093470..c331680 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/actions/ExportAction.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/actions/ExportAction.java @@ -17,23 +17,29 @@ package com.android.ide.eclipse.adt.internal.wizards.actions; import com.android.ide.eclipse.adt.internal.project.ExportHelper; +import com.android.ide.eclipse.adt.internal.project.ProjectState; +import com.android.ide.eclipse.adt.internal.sdk.Sdk; import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.jface.action.IAction; +import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IObjectActionDelegate; import org.eclipse.ui.IWorkbenchPart; public class ExportAction implements IObjectActionDelegate { private ISelection mSelection; + private Shell mShell; /** * @see IObjectActionDelegate#setActivePart(IAction, IWorkbenchPart) */ public void setActivePart(IAction action, IWorkbenchPart targetPart) { + mShell = targetPart.getSite().getShell(); } public void run(IAction action) { @@ -53,13 +59,19 @@ public class ExportAction implements IObjectActionDelegate { // and finally do the action if (project != null) { - ExportHelper.exportProject(project); + ProjectState state = Sdk.getProjectState(project); + if (state.isLibrary()) { + MessageDialog.openError(mShell, "Android Export", + "Android library projects cannot be exported."); + } else { + ExportHelper.exportProject(project); + } } } } } public void selectionChanged(IAction action, ISelection selection) { - this.mSelection = selection; + mSelection = selection; } } diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/actions/ExportWizardAction.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/actions/ExportWizardAction.java index 8165f97..cfdab0f 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/actions/ExportWizardAction.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/actions/ExportWizardAction.java @@ -16,9 +16,14 @@ package com.android.ide.eclipse.adt.internal.wizards.actions; +import com.android.ide.eclipse.adt.internal.project.ProjectState; +import com.android.ide.eclipse.adt.internal.sdk.Sdk; import com.android.ide.eclipse.adt.internal.wizards.export.ExportWizard; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.runtime.IAdaptable; import org.eclipse.jface.action.IAction; +import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.wizard.WizardDialog; @@ -42,16 +47,39 @@ public class ExportWizardAction implements IObjectActionDelegate { if (mSelection instanceof IStructuredSelection) { IStructuredSelection selection = (IStructuredSelection)mSelection; - // call the export wizard on the current selection. - ExportWizard wizard = new ExportWizard(); - wizard.init(mWorkbench, selection); - WizardDialog dialog = new WizardDialog(mWorkbench.getDisplay().getActiveShell(), - wizard); - dialog.open(); + // get the unique selected item. + if (selection.size() == 1) { + Object element = selection.getFirstElement(); + + // get the project object from it. + IProject project = null; + if (element instanceof IProject) { + project = (IProject) element; + } else if (element instanceof IAdaptable) { + project = (IProject) ((IAdaptable) element).getAdapter(IProject.class); + } + + // and finally do the action + if (project != null) { + ProjectState state = Sdk.getProjectState(project); + if (state.isLibrary()) { + MessageDialog.openError(mWorkbench.getDisplay().getActiveShell(), + "Android Export", + "Android library projects cannot be exported."); + } else { + // call the export wizard on the current selection. + ExportWizard wizard = new ExportWizard(); + wizard.init(mWorkbench, selection); + WizardDialog dialog = new WizardDialog( + mWorkbench.getDisplay().getActiveShell(), wizard); + dialog.open(); + } + } + } } } public void selectionChanged(IAction action, ISelection selection) { - this.mSelection = selection; + mSelection = selection; } } diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/export/ProjectCheckPage.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/export/ProjectCheckPage.java index 11a40e5..aa65e6e 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/export/ProjectCheckPage.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/export/ProjectCheckPage.java @@ -109,7 +109,8 @@ final class ProjectCheckPage extends ExportWizardPage { @Override public void widgetSelected(SelectionEvent e) { IJavaProject javaProject = mProjectChooserHelper.chooseJavaProject( - mProjectText.getText().trim()); + mProjectText.getText().trim(), + "Please select a project to export"); if (javaProject != null) { IProject project = javaProject.getProject(); diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/newproject/NewTestProjectCreationPage.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/newproject/NewTestProjectCreationPage.java index d43831e..df5a39b 100755 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/newproject/NewTestProjectCreationPage.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/newproject/NewTestProjectCreationPage.java @@ -812,7 +812,8 @@ public class NewTestProjectCreationPage extends WizardPage { * Callback called when the user uses the "Browse Projects" button. */ private void onProjectBrowse() { - IJavaProject p = mProjectChooserHelper.chooseJavaProject(mTestedProjectNameField.getText()); + IJavaProject p = mProjectChooserHelper.chooseJavaProject(mTestedProjectNameField.getText(), + null /*message*/); if (p != null) { setExistingProject(p.getProject()); mTestedProjectNameField.setText(mExistingTestedProject.getName()); diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/newxmlfile/NewXmlFileCreationPage.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/newxmlfile/NewXmlFileCreationPage.java index dc4d852..81a9952 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/newxmlfile/NewXmlFileCreationPage.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/newxmlfile/NewXmlFileCreationPage.java @@ -875,7 +875,8 @@ class NewXmlFileCreationPage extends WizardPage { * Callback called when the user uses the "Browse Projects" button. */ private void onProjectBrowse() { - IJavaProject p = mProjectChooserHelper.chooseJavaProject(mProjectTextField.getText()); + IJavaProject p = mProjectChooserHelper.chooseJavaProject(mProjectTextField.getText(), + "Please select the target project"); if (p != null) { changeProject(p.getProject()); mProjectTextField.setText(mProject.getName()); diff --git a/emulator/mksdcard/MODULE_LICENSE_BSD b/emulator/mksdcard/MODULE_LICENSE_BSD new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/emulator/mksdcard/MODULE_LICENSE_BSD diff --git a/emulator/mksdcard/NOTICE b/emulator/mksdcard/NOTICE new file mode 100644 index 0000000..e4f5db9 --- /dev/null +++ b/emulator/mksdcard/NOTICE @@ -0,0 +1,23 @@ +Copyright 2007, The Android Open Source Project + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of Google Inc. nor the names of its contributors may + be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY Google Inc. ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +EVENT SHALL Google Inc. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/files/ant_rules_r1.xml b/files/ant_rules_r1.xml index 675017c..9ff30f3 100644 --- a/files/ant_rules_r1.xml +++ b/files/ant_rules_r1.xml @@ -242,6 +242,10 @@ value="${tested.project.absolute.dir}/bin/classes" else="."> <isset property="tested.project.absolute.dir" /> </condition> + <condition property="extensible.libs.classpath" + value="${tested.project.absolute.dir}/libs" else="./libs"> + <isset property="tested.project.absolute.dir" /> + </condition> <javac encoding="ascii" target="1.5" debug="true" extdirs="" destdir="${out.classes.absolute.dir}" bootclasspathref="android.target.classpath" @@ -250,6 +254,7 @@ <src path="${gen.absolute.dir}" /> <classpath> <fileset dir="${external.libs.absolute.dir}" includes="*.jar" /> + <fileset dir="${extensible.libs.classpath}" includes="*.jar" /> </classpath> </javac> </target> diff --git a/files/ant_rules_r2.xml b/files/ant_rules_r2.xml index 6e48796..ffd7c41 100644 --- a/files/ant_rules_r2.xml +++ b/files/ant_rules_r2.xml @@ -244,6 +244,10 @@ value="${tested.project.absolute.dir}/bin/classes" else="."> <isset property="tested.project.absolute.dir" /> </condition> + <condition property="extensible.libs.classpath" + value="${tested.project.absolute.dir}/libs" else="./libs"> + <isset property="tested.project.absolute.dir" /> + </condition> <javac encoding="ascii" target="1.5" debug="true" extdirs="" destdir="${out.classes.absolute.dir}" bootclasspathref="android.target.classpath" @@ -254,6 +258,7 @@ <src refid="android.libraries.src" /> <classpath> <fileset dir="${external.libs.absolute.dir}" includes="*.jar" /> + <fileset dir="${extensible.libs.classpath}" includes="*.jar" /> </classpath> </javac> </target> diff --git a/files/ant_test_rules_r2.xml b/files/ant_test_rules_r2.xml index 78503ae..00ebfea 100644 --- a/files/ant_test_rules_r2.xml +++ b/files/ant_test_rules_r2.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <project name="android_test_rules" default="run-tests"> - <import file="android_rules.xml" /> + <import file="ant_rules_r2.xml" /> <property name="tested.project.absolute.dir" location="${tested.project.dir}" /> <property name="instrumentation.dir" value="instrumented" /> |