From 621d44b5d81de3a772034cf2d6c755dc96a3c750 Mon Sep 17 00:00:00 2001 From: Siva Velusamy Date: Mon, 16 Jun 2014 17:14:43 -0700 Subject: Set default product This CL fixes a bunch of issues in the packaging of the ADT product. Specifically: - the correct default product is now used giving us the correct initial Java perspective - the dependencies go one way (ADT package -> ADT), and this allows upgrading of ADT without upgrading the ADT package. Change-Id: I9a1b85e0bee8d073e27067e7450ce08a88609c3c --- eclipse/artifacts/bundles/ide.product | 33 ++-- .../feature.xml | 17 ++- .../com.android.ide.eclipse.adt/feature.xml | 6 - .../com.android.ide.eclipse.adt.package/.classpath | 8 - .../com.android.ide.eclipse.adt.package/.project | 6 - .../META-INF/MANIFEST.MF | 10 +- .../about.mappings | 1 - .../com.android.ide.eclipse.adt.package/plugin.xml | 38 +++-- .../android/ide/eclipse/adt/internal/AdtIntro.java | 168 --------------------- 9 files changed, 52 insertions(+), 235 deletions(-) delete mode 100644 eclipse/plugins/com.android.ide.eclipse.adt.package/.classpath delete mode 100644 eclipse/plugins/com.android.ide.eclipse.adt.package/about.mappings delete mode 100644 eclipse/plugins/com.android.ide.eclipse.adt.package/src/com/android/ide/eclipse/adt/internal/AdtIntro.java (limited to 'eclipse') diff --git a/eclipse/artifacts/bundles/ide.product b/eclipse/artifacts/bundles/ide.product index 81d7c9d..b64b9d0 100644 --- a/eclipse/artifacts/bundles/ide.product +++ b/eclipse/artifacts/bundles/ide.product @@ -1,20 +1,28 @@ - + + + + + + Specified in the plugin.xml of the branding plugin. + + - -product adtproduct - --launcher.XXMaxPermSize 256M - -Dosgi.requiredJavaVersion=1.6 -Xms40m -Xmx768m - -XX:MaxPermSize=256m + -product com.android.ide.eclipse.adt.package.adtproduct + -Dosgi.requiredJavaVersion=1.6 +-XX:MaxPermSize=256m +-Xms512m +-Xmx1024m -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts - + @@ -25,6 +33,7 @@ + org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6 org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6 @@ -36,17 +45,13 @@ - - - - - - - - + + + + diff --git a/eclipse/features/com.android.ide.eclipse.adt.package/feature.xml b/eclipse/features/com.android.ide.eclipse.adt.package/feature.xml index d3320fa..80e2153 100644 --- a/eclipse/features/com.android.ide.eclipse.adt.package/feature.xml +++ b/eclipse/features/com.android.ide.eclipse.adt.package/feature.xml @@ -11,26 +11,27 @@ - Copyright (C) 2007-2012 The Android Open Source Project + Copyright (C) 2007-2014 The Android Open Source Project Note: kxml2-2.3.0.jar is under the BSD license rather ... - - - - + + + + + + + - - - + - - diff --git a/eclipse/plugins/com.android.ide.eclipse.adt.package/.classpath b/eclipse/plugins/com.android.ide.eclipse.adt.package/.classpath deleted file mode 100644 index 522e779..0000000 --- a/eclipse/plugins/com.android.ide.eclipse.adt.package/.classpath +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/eclipse/plugins/com.android.ide.eclipse.adt.package/.project b/eclipse/plugins/com.android.ide.eclipse.adt.package/.project index 50d3fd1..eedf4c6 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt.package/.project +++ b/eclipse/plugins/com.android.ide.eclipse.adt.package/.project @@ -6,11 +6,6 @@ - org.eclipse.jdt.core.javabuilder - - - - org.eclipse.pde.ManifestBuilder @@ -23,6 +18,5 @@ org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature diff --git a/eclipse/plugins/com.android.ide.eclipse.adt.package/META-INF/MANIFEST.MF b/eclipse/plugins/com.android.ide.eclipse.adt.package/META-INF/MANIFEST.MF index 53e4501..1b9790a 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt.package/META-INF/MANIFEST.MF +++ b/eclipse/plugins/com.android.ide.eclipse.adt.package/META-INF/MANIFEST.MF @@ -7,12 +7,4 @@ Bundle-Vendor: The Android Open Source Project Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Eclipse-BundleShape: dir Require-Bundle: org.eclipse.platform, - org.eclipse.equinox.app, - org.eclipse.ui.intro, - org.eclipse.ui.workbench, - org.eclipse.swt, - org.eclipse.core.runtime, - org.eclipse.core.commands, - org.eclipse.ui.forms, - org.eclipse.jface, - com.android.ide.eclipse.adt + org.eclipse.equinox.app diff --git a/eclipse/plugins/com.android.ide.eclipse.adt.package/about.mappings b/eclipse/plugins/com.android.ide.eclipse.adt.package/about.mappings deleted file mode 100644 index c77017a..0000000 --- a/eclipse/plugins/com.android.ide.eclipse.adt.package/about.mappings +++ /dev/null @@ -1 +0,0 @@ -0=buildId \ No newline at end of file diff --git a/eclipse/plugins/com.android.ide.eclipse.adt.package/plugin.xml b/eclipse/plugins/com.android.ide.eclipse.adt.package/plugin.xml index ed4f265..7974659 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt.package/plugin.xml +++ b/eclipse/plugins/com.android.ide.eclipse.adt.package/plugin.xml @@ -3,24 +3,24 @@ + name="Eclipse"> + value="Eclipse" /> + value="Android Developer Tools This product includes Eclipse Platform, JDT, CDT, EMF, GEF and WTP, all of which are Copyright (c) Eclipse contributors and others. Visit http://eclipse.org/ Android Developer Tools are Copyright (c) The Android Open Source Project. Visit http://developer.android.com"> + + + + + + + + + value="platform:/plugin/org.eclipse.ui.themes/images/"> - - - + introId="org.eclipse.ui.intro.universal" + productId="com.android.ide.eclipse.adt.package.product"> diff --git a/eclipse/plugins/com.android.ide.eclipse.adt.package/src/com/android/ide/eclipse/adt/internal/AdtIntro.java b/eclipse/plugins/com.android.ide.eclipse.adt.package/src/com/android/ide/eclipse/adt/internal/AdtIntro.java deleted file mode 100644 index 27e758c..0000000 --- a/eclipse/plugins/com.android.ide.eclipse.adt.package/src/com/android/ide/eclipse/adt/internal/AdtIntro.java +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Copyright (C) 2013 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.android.ide.eclipse.adt.internal; - -import com.android.ide.eclipse.adt.AdtPlugin; -import com.android.ide.eclipse.adt.internal.wizards.actions.NewProjectAction; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Label; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.browser.IWebBrowser; -import org.eclipse.ui.browser.IWorkbenchBrowserSupport; -import org.eclipse.ui.forms.events.HyperlinkAdapter; -import org.eclipse.ui.forms.events.HyperlinkEvent; -import org.eclipse.ui.forms.events.IHyperlinkListener; -import org.eclipse.ui.forms.widgets.FormToolkit; -import org.eclipse.ui.forms.widgets.Hyperlink; -import org.eclipse.ui.forms.widgets.ScrolledForm; -import org.eclipse.ui.forms.widgets.Section; -import org.eclipse.ui.intro.IIntroPart; -import org.eclipse.ui.part.IntroPart; - -import java.net.URL; - -public class AdtIntro extends IntroPart implements IIntroPart { - private static final int TEXT_WIDTH = 600; - - private FormToolkit mToolkit; - private ScrolledForm mForm; - - @Override - public void standbyStateChanged(boolean standby) { - } - - @Override - public void createPartControl(Composite parent) { - mToolkit = new FormToolkit(parent.getDisplay()); - mForm = mToolkit.createScrolledForm(parent); - - mForm.setText("Welcome!"); - mToolkit.decorateFormHeading(mForm.getForm()); - mForm.getToolBarManager().update(true); - - //TableWrapLayout layout = new TableWrapLayout(); - //layout.numColumns = 2; - GridLayout layout = new GridLayout(1, false); - mForm.getBody().setLayout(layout); - - createText(mForm.getBody(), - "The Android Developer Tools provide a first-class development environment for " + - "building Android apps. This integrated development environment is set up with " + - "the latest version of the Android platform and system image so you can " + - "immediately begin building apps and running them on the Android emulator." - ); - - Button newProject = mToolkit.createButton(mForm.getBody(), - "New Android Application...", - SWT.PUSH); - newProject.addSelectionListener(new SelectionAdapter() { - @Override - public void widgetSelected(SelectionEvent e) { - NewProjectAction npwAction = new NewProjectAction(); - npwAction.run(null /*action*/); - PlatformUI.getWorkbench().getIntroManager().closeIntro(AdtIntro.this); - } - }); - - Section section = mToolkit.createSection(mForm.getBody(), - Section.SHORT_TITLE_BAR | Section.CLIENT_INDENT); - section.setText("Tutorials"); - - Composite c = mToolkit.createComposite(section); - c.setLayout(new GridLayout(2, false)); - - createHyperlink(c, "Build Your First App", - "http://developer.android.com/training/basics/firstapp/index.html"); - createText(c, "If you're new to Android, follow this class to learn the fundamental " + - "Android APIs for creating a user interface that responds to input."); - - createHyperlink(c, "Design Your App", "http://developer.android.com/design/index.html"); - createText(c, - "Before you begin developing your app, be sure you understand the design patterns " - + "that Android users expect from your app."); - - createHyperlink(c, "Test Your App", - "http://developer.android.com/tools/testing/testing_android.html"); - createText(c, "The Android Framework provides tools that help you test every aspect of " - + "your app to be sure it behaves as expected under various conditions."); - - section.setClient(c); - - mForm.reflow(true); - } - - private void createText(Composite body, String text) { - Label l = mToolkit.createLabel(body, text, SWT.WRAP); - GridData gd = new GridData(); - gd.widthHint = TEXT_WIDTH; - l.setLayoutData(gd); - } - - private void createHyperlink(Composite c, String text, String url) { - Hyperlink link = mToolkit.createHyperlink(c, text, SWT.WRAP); - link.setHref(url); - link.addHyperlinkListener(sHyperLinkListener); - GridData gd = new GridData(); - gd.verticalAlignment = SWT.TOP; - link.setLayoutData(gd); - } - - private static final IHyperlinkListener sHyperLinkListener = new HyperlinkAdapter() { - @Override - public void linkActivated(HyperlinkEvent e) { - if (!(e.getHref() instanceof String)) { - return; - } - - String url = (String) e.getHref(); - if (url.isEmpty()) { - return; - } - - IWorkbenchBrowserSupport support = PlatformUI.getWorkbench().getBrowserSupport(); - IWebBrowser browser; - try { - browser = support.getExternalBrowser(); - browser.openURL(new URL(url)); - } catch (Exception ex) { - AdtPlugin.log(ex, "Error launching browser for URL: %1$s", url); - } - } - }; - - @Override - public void setFocus() { - mForm.setFocus(); - } - - @Override - public void dispose() { - if (mToolkit != null) { - mToolkit.dispose(); - mToolkit = null; - } - - super.dispose(); - } -} -- cgit v1.1