summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCurtis Windatt2013-05-28 11:10:12 (EDT)
committerCurtis Windatt2013-06-11 13:30:58 (EDT)
commitc1ecd493e3b766ce1637eefad1a7bc883a04f556 (patch)
treed54e12645639aba0d6d81ca343b0353ac1021aa6
parentae622299625eec702f67637f18b8a50d284b0f3a (diff)
downloadeclipse.pde.ui-c1ecd493e3b766ce1637eefad1a7bc883a04f556.zip
eclipse.pde.ui-c1ecd493e3b766ce1637eefad1a7bc883a04f556.tar.gz
eclipse.pde.ui-c1ecd493e3b766ce1637eefad1a7bc883a04f556.tar.bz2
Bug 409178 - XML export doesn't export source bundles
-rw-r--r--ui/org.eclipse.pde.core/src_ant/org/eclipse/pde/internal/core/ant/BaseExportTask.java28
-rw-r--r--ui/org.eclipse.pde.core/src_ant/org/eclipse/pde/internal/core/ant/FeatureExportTask.java3
-rw-r--r--ui/org.eclipse.pde.core/src_ant/org/eclipse/pde/internal/core/ant/PluginExportTask.java3
-rw-r--r--ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/FeatureExportWizard.java6
-rw-r--r--ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/PluginExportWizard.java6
5 files changed, 41 insertions, 5 deletions
diff --git a/ui/org.eclipse.pde.core/src_ant/org/eclipse/pde/internal/core/ant/BaseExportTask.java b/ui/org.eclipse.pde.core/src_ant/org/eclipse/pde/internal/core/ant/BaseExportTask.java
index 7b1fc92..3e3716d 100644
--- a/ui/org.eclipse.pde.core/src_ant/org/eclipse/pde/internal/core/ant/BaseExportTask.java
+++ b/ui/org.eclipse.pde.core/src_ant/org/eclipse/pde/internal/core/ant/BaseExportTask.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2011 IBM Corporation and others.
+ * Copyright (c) 2003, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -23,6 +23,12 @@ public abstract class BaseExportTask extends Task {
protected boolean fToDirectory;
protected boolean fUseJarFormat;
protected boolean fExportSource;
+ /**
+ * Whether to create a source bundle if creating source. By default the UI
+ * and this task should create a source bundle if {@link #fExportSource} is
+ * <code>true</code>
+ */
+ protected boolean fExportSourceBundle = true;
protected String fQualifier;
protected boolean fAllowBinaryCycles;
protected boolean fUseWorkspaceCompiledClasses;
@@ -62,10 +68,30 @@ public abstract class BaseExportTask extends Task {
fUseJarFormat = new Boolean(useJarFormat).booleanValue();
}
+ /**
+ * Whether to include source when exporting the bundle. By default the source will
+ * be exported as a separate source bundle, but source can be embedded in the binary
+ * output by setting <code>exportSourceBundle=false</code> in the task.
+ *
+ * @see #setExportSourceBundle(String)
+ * @param doExportSource whether to include source in the export
+ */
public void setExportSource(String doExportSource) {
fExportSource = new Boolean(doExportSource).booleanValue();
}
+ /**
+ * Whether a separate source bundle should be created when exporting source. This
+ * is <code>true</code> by default. If <code>false</code> the source will be embedded
+ * inside the binary output.
+ *
+ * @see #setExportSource(String)
+ * @param doExportSourceBundle whether to create a source bundle when exporting source
+ */
+ public void setExportSourceBundle(String doExportSourceBundle) {
+ fExportSourceBundle = new Boolean(doExportSourceBundle).booleanValue();
+ }
+
public void setDestination(String destination) {
fDestination = destination;
}
diff --git a/ui/org.eclipse.pde.core/src_ant/org/eclipse/pde/internal/core/ant/FeatureExportTask.java b/ui/org.eclipse.pde.core/src_ant/org/eclipse/pde/internal/core/ant/FeatureExportTask.java
index d3fe4cb..a308d90 100644
--- a/ui/org.eclipse.pde.core/src_ant/org/eclipse/pde/internal/core/ant/FeatureExportTask.java
+++ b/ui/org.eclipse.pde.core/src_ant/org/eclipse/pde/internal/core/ant/FeatureExportTask.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2012 IBM Corporation and others.
+ * Copyright (c) 2003, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -28,6 +28,7 @@ public class FeatureExportTask extends BaseExportTask {
info.toDirectory = fToDirectory;
info.useJarFormat = fUseJarFormat;
info.exportSource = fExportSource;
+ info.exportSourceBundle = fExportSourceBundle;
info.zipFileName = fZipFilename;
info.items = fFeatures;
info.qualifier = fQualifier;
diff --git a/ui/org.eclipse.pde.core/src_ant/org/eclipse/pde/internal/core/ant/PluginExportTask.java b/ui/org.eclipse.pde.core/src_ant/org/eclipse/pde/internal/core/ant/PluginExportTask.java
index 0dc8bc6..8a6f065 100644
--- a/ui/org.eclipse.pde.core/src_ant/org/eclipse/pde/internal/core/ant/PluginExportTask.java
+++ b/ui/org.eclipse.pde.core/src_ant/org/eclipse/pde/internal/core/ant/PluginExportTask.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2012 IBM Corporation and others.
+ * Copyright (c) 2003, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -27,6 +27,7 @@ public class PluginExportTask extends BaseExportTask {
info.toDirectory = fToDirectory;
info.useJarFormat = fUseJarFormat;
info.exportSource = fExportSource;
+ info.exportSourceBundle = fExportSourceBundle;
info.zipFileName = fZipFilename;
info.items = fPlugins;
info.qualifier = fQualifier;
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/FeatureExportWizard.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/FeatureExportWizard.java
index 9b86da4..d2ec4d2 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/FeatureExportWizard.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/FeatureExportWizard.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -59,6 +59,7 @@ public class FeatureExportWizard extends AntGeneratingExportWizard {
}
protected void scheduleExportJob() {
+ // NOTE: Any changes to the content here must also be copied to generateAntTask() and FeatureExportTask
final FeatureExportInfo info = new FeatureExportInfo();
info.toDirectory = fPage.doExportToDirectory();
info.useJarFormat = fPage.useJARFormat();
@@ -139,6 +140,9 @@ public class FeatureExportWizard extends AntGeneratingExportWizard {
export.setAttribute("exportType", getExportOperation()); //$NON-NLS-1$
export.setAttribute("useJARFormat", Boolean.toString(fPage.useJARFormat())); //$NON-NLS-1$
export.setAttribute("exportSource", Boolean.toString(fPage.doExportSource())); //$NON-NLS-1$
+ if (fPage.doExportSource()) {
+ export.setAttribute("exportSourceBundle", Boolean.toString(fPage.doExportSourceBundles())); //$NON-NLS-1$
+ }
String qualifier = fPage.getQualifier();
if (qualifier != null)
export.setAttribute("qualifier", qualifier); //$NON-NLS-1$
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/PluginExportWizard.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/PluginExportWizard.java
index 3c1c07b..fe92884 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/PluginExportWizard.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/PluginExportWizard.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -41,6 +41,7 @@ public class PluginExportWizard extends AntGeneratingExportWizard {
}
protected void scheduleExportJob() {
+ // NOTE: Any changes to the content here must also be copied to generateAntTask() and PluginExportTask
final FeatureExportInfo info = new FeatureExportInfo();
info.toDirectory = fPage.doExportToDirectory();
info.useJarFormat = fPage.useJARFormat();
@@ -110,6 +111,9 @@ public class PluginExportWizard extends AntGeneratingExportWizard {
export.setAttribute("exportType", getExportOperation()); //$NON-NLS-1$
export.setAttribute("useJARFormat", Boolean.toString(fPage.useJARFormat())); //$NON-NLS-1$
export.setAttribute("exportSource", Boolean.toString(fPage.doExportSource())); //$NON-NLS-1$
+ if (fPage.doExportSource()) {
+ export.setAttribute("exportSourceBundle", Boolean.toString(fPage.doExportSourceBundles())); //$NON-NLS-1$
+ }
String qualifier = fPage.getQualifier();
if (qualifier != null)
export.setAttribute("qualifier", qualifier); //$NON-NLS-1$