aboutsummaryrefslogtreecommitdiffstats
path: root/eclipse/plugins
diff options
context:
space:
mode:
authorSiva Velusamy <vsiva@google.com>2014-06-16 17:14:43 -0700
committerSiva Velusamy <vsiva@google.com>2014-06-30 17:12:55 -0700
commit621d44b5d81de3a772034cf2d6c755dc96a3c750 (patch)
treed22ab5ddf4f63a60a6459d5354977ddc02746301 /eclipse/plugins
parent2ac5b9c76d99fc457026cad8a636265f8947f84e (diff)
downloadsdk-621d44b5d81de3a772034cf2d6c755dc96a3c750.tar.gz
sdk-621d44b5d81de3a772034cf2d6c755dc96a3c750.tar.bz2
sdk-621d44b5d81de3a772034cf2d6c755dc96a3c750.zip
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
Diffstat (limited to 'eclipse/plugins')
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt.package/.classpath8
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt.package/.project6
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt.package/META-INF/MANIFEST.MF10
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt.package/about.mappings1
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt.package/plugin.xml38
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt.package/src/com/android/ide/eclipse/adt/internal/AdtIntro.java168
6 files changed, 24 insertions, 207 deletions
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 522e779bb..000000000
--- a/eclipse/plugins/com.android.ide.eclipse.adt.package/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
-
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt.package/.project b/eclipse/plugins/com.android.ide.eclipse.adt.package/.project
index 50d3fd17a..eedf4c6de 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 @@
</projects>
<buildSpec>
<buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
@@ -23,6 +18,5 @@
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
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 53e450113..1b9790adf 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 c77017add..000000000
--- 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 ed4f2650f..7974659cc 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 @@
<plugin>
<extension
id="adtproduct"
+ name="ADT Bundle"
point="org.eclipse.core.runtime.products">
<product
application="org.eclipse.ui.ide.workbench"
- description="Android Developer Tools"
- name="ADT">
+ name="Eclipse">
<property
name="preferenceCustomization"
value="plugin_customization.ini" />
<property
name="appName"
- value="ADT" />
+ value="Eclipse" />
<property
name="aboutImage"
value="adt-about.png">
</property>
<property
name="aboutText"
- value="Android Developer Tools&#x0A;&#x0A;Build: {0}&#x0A;&#x0A;This product includes Eclipse Platform, JDT, CDT, EMF, GEF and WTP,&#x0A;all of which are Copyright (c) Eclipse contributors and others.&#x0A;Visit http://eclipse.org/&#x0A;&#x0A;Android Developer Tools are Copyright (c) The Android Open Source Project.&#x0A;Visit http://developer.android.com">
+ value="Android Developer Tools&#x0A;&#x0A;This product includes Eclipse Platform, JDT, CDT, EMF, GEF and WTP, all of which are&#x0A;Copyright (c) Eclipse contributors and others.&#x0A;Visit http://eclipse.org/&#x0A;&#x0A;Android Developer Tools are Copyright (c) The Android Open Source Project.&#x0A;Visit http://developer.android.com">
</property>
<property
name="startupProgressRect"
@@ -36,28 +36,36 @@
value="icons/adt16.png,icons/adt32.png,icons/adt48.png">
</property>
<property
+ name="introBrandingImage"
+ value="product:intro-eclipse.png">
+ </property>
+ <property
+ name="introTitle"
+ value="Welcome to the Eclipse IDE for Android Developers">
+ </property>
+ <property
+ name="introBrandingImageText"
+ value="Eclipse Project">
+ </property>
+ <property
+ name="applicationXMI"
+ value="org.eclipse.platform/LegacyIDE.e4xmi">
+ </property>
+ <property
name="cssTheme"
value="org.eclipse.e4.ui.css.theme.e4_default">
</property>
<property
name="applicationCSSResources"
- value="platform:/plugin/org.eclipse.platform/images/">
+ value="platform:/plugin/org.eclipse.ui.themes/images/">
</property>
</product>
</extension>
<extension
point="org.eclipse.ui.intro">
- <intro
- class="com.android.ide.eclipse.adt.internal.AdtIntro"
- icon="icons/adt16.png"
- id="com.android.ide.eclipse.adt.intro"
- label="Android IDE"/>
- </extension>
- <extension
- point="org.eclipse.ui.intro">
<introProductBinding
- introId="com.android.ide.eclipse.adt.intro"
- productId="adtproduct">
+ introId="org.eclipse.ui.intro.universal"
+ productId="com.android.ide.eclipse.adt.package.product">
</introProductBinding>
</extension>
</plugin>
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 27e758c09..000000000
--- 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();
- }
-}