View | Details | Raw Unified | Return to bug 273177 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionTest.java (-2 / +53 lines)
Lines 20-27 Link Here
20
import org.eclipse.equinox.internal.p2.publisher.eclipse.ProductFile;
20
import org.eclipse.equinox.internal.p2.publisher.eclipse.ProductFile;
21
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
21
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
22
import org.eclipse.equinox.internal.provisional.p2.core.Version;
22
import org.eclipse.equinox.internal.provisional.p2.core.Version;
23
import org.eclipse.equinox.p2.publisher.IPublisherInfo;
23
import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
24
import org.eclipse.equinox.p2.publisher.IPublisherResult;
24
import org.eclipse.equinox.p2.publisher.*;
25
import org.eclipse.equinox.p2.publisher.actions.RootIUAdvice;
25
import org.eclipse.equinox.p2.publisher.actions.RootIUAdvice;
26
import org.eclipse.equinox.p2.publisher.eclipse.*;
26
import org.eclipse.equinox.p2.publisher.eclipse.*;
27
import org.eclipse.equinox.p2.tests.TestData;
27
import org.eclipse.equinox.p2.tests.TestData;
Lines 74-79 Link Here
74
		//TODO assert branding was done correctly
74
		//TODO assert branding was done correctly
75
	}
75
	}
76
76
77
	public void testLicense() throws Exception {
78
		ProductFile productFile = new ProductFile(TestData.getFile("ProductActionTest", "productWithLicense.product").toString());
79
		PublisherInfo info = new PublisherInfo();
80
		info.setConfigurations(new String[] {"win32.win32.x86"});
81
		testAction = new ProductAction(source, productFile, flavorArg, executablesFeatureLocation);
82
		testAction.perform(info, publisherResult, null);
83
		Collection ius = publisherResult.getIUs("licenseIU.product", IPublisherResult.NON_ROOT);
84
		assertEquals("1.0", 1, ius.size());
85
		IInstallableUnit iu = (IInstallableUnit) ius.iterator().next();
86
		assertEquals("1.1", "http://www.example.com", iu.getLicense().getLocation().toString());
87
		assertEquals("1.2", "This is the liCenSE.", iu.getLicense().getBody().trim());
88
	}
89
90
	public void testLicenseNoURL() throws Exception {
91
		ProductFile productFile = new ProductFile(TestData.getFile("ProductActionTest", "licenseNoURL.product").toString());
92
		PublisherInfo info = new PublisherInfo();
93
		info.setConfigurations(new String[] {"win32.win32.x86"});
94
		testAction = new ProductAction(source, productFile, flavorArg, executablesFeatureLocation);
95
		testAction.perform(info, publisherResult, null);
96
		Collection ius = publisherResult.getIUs("licenseIU.product", IPublisherResult.NON_ROOT);
97
		assertEquals("1.0", 1, ius.size());
98
		IInstallableUnit iu = (IInstallableUnit) ius.iterator().next();
99
		assertEquals("1.1", "", iu.getLicense().getLocation().toString());
100
		assertEquals("1.2", "This is the liCenSE.", iu.getLicense().getBody().trim());
101
	}
102
103
	public void testLicenseNoText() throws Exception {
104
		ProductFile productFile = new ProductFile(TestData.getFile("ProductActionTest", "licenseNoText.product").toString());
105
		PublisherInfo info = new PublisherInfo();
106
		info.setConfigurations(new String[] {"win32.win32.x86"});
107
		testAction = new ProductAction(source, productFile, flavorArg, executablesFeatureLocation);
108
		testAction.perform(info, publisherResult, null);
109
		Collection ius = publisherResult.getIUs("licenseIU.product", IPublisherResult.NON_ROOT);
110
		assertEquals("1.0", 1, ius.size());
111
		IInstallableUnit iu = (IInstallableUnit) ius.iterator().next();
112
		assertEquals("1.1", "http://www.example.com", iu.getLicense().getLocation().toString());
113
		assertEquals("1.2", "", iu.getLicense().getBody().trim());
114
	}
115
116
	public void testMissingLicense() throws Exception {
117
		ProductFile productFile = new ProductFile(TestData.getFile("ProductActionTest", "productWithNoLicense.product").toString());
118
		PublisherInfo info = new PublisherInfo();
119
		info.setConfigurations(new String[] {"win32.win32.x86"});
120
		testAction = new ProductAction(source, productFile, flavorArg, executablesFeatureLocation);
121
		testAction.perform(info, publisherResult, null);
122
		Collection ius = publisherResult.getIUs("licenseIU.product", IPublisherResult.NON_ROOT);
123
		assertEquals("1.0", 1, ius.size());
124
		IInstallableUnit iu = (IInstallableUnit) ius.iterator().next();
125
		assertNull("1.1", iu.getLicense());
126
	}
127
77
	/**
128
	/**
78
	 * Tests that a product file containing bundle configuration data produces appropriate 
129
	 * Tests that a product file containing bundle configuration data produces appropriate 
79
	 * IConfigAdvice (start levels, auto-start).
130
	 * IConfigAdvice (start levels, auto-start).
(-)src/org/eclipse/equinox/p2/tests/publisher/actions/RootIUActionTest.java (+1 lines)
Lines 345-350 Link Here
345
		expect(publisherInfo.getAdvice(null, false, rootIU, versionArg, ITouchpointAdvice.class)).andReturn(new ArrayList()).anyTimes();
345
		expect(publisherInfo.getAdvice(null, false, rootIU, versionArg, ITouchpointAdvice.class)).andReturn(new ArrayList()).anyTimes();
346
		expect(publisherInfo.getAdvice(null, false, rootIU, versionArg, IPropertyAdvice.class)).andReturn(new ArrayList()).anyTimes();
346
		expect(publisherInfo.getAdvice(null, false, rootIU, versionArg, IPropertyAdvice.class)).andReturn(new ArrayList()).anyTimes();
347
		expect(publisherInfo.getAdvice(null, false, rootIU, versionArg, IAdditionalInstallableUnitAdvice.class)).andReturn(new ArrayList()).anyTimes();
347
		expect(publisherInfo.getAdvice(null, false, rootIU, versionArg, IAdditionalInstallableUnitAdvice.class)).andReturn(new ArrayList()).anyTimes();
348
		expect(publisherInfo.getAdvice(null, true, rootIU, versionArg, ILicenseAdvice.class)).andReturn(new ArrayList()).anyTimes();
348
		expect(publisherInfo.getMetadataRepository()).andReturn(metadataRepository).anyTimes();
349
		expect(publisherInfo.getMetadataRepository()).andReturn(metadataRepository).anyTimes();
349
		expect(publisherInfo.getContextMetadataRepository()).andReturn(null).anyTimes();
350
		expect(publisherInfo.getContextMetadataRepository()).andReturn(null).anyTimes();
350
	}
351
	}
(-)src/org/eclipse/equinox/p2/tests/publisher/actions/ProductFileTest.java (+12 lines)
Lines 196-199 Link Here
196
		assertEquals("1.1", "programArg", programArguments);
196
		assertEquals("1.1", "programArg", programArguments);
197
	}
197
	}
198
198
199
	public void testGetLicenseURL() throws Exception {
200
		String productWithLicense = TestData.getFile("ProductActionTest", "productWithLicense.product").toString();
201
		ProductFile product = new ProductFile(productWithLicense);
202
		assertEquals("1.0", "http://www.example.com", product.getLicenseURL());
203
	}
204
205
	public void testGetLicenseText() throws Exception {
206
		String productWithLicense = TestData.getFile("ProductActionTest", "productWithLicense.product").toString();
207
		ProductFile product = new ProductFile(productWithLicense);
208
		assertEquals("1.0", "This is the liCenSE.", product.getLicenseText().trim());
209
	}
210
199
}
211
}
(-)testData/ProductActionTest/productWithLicense.product (+34 lines)
Added Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<?pde version="3.5"?>
3
4
<product name="Product With License" uid="licenseIU.product" useFeatures="false" includeLaunchers="true">
5
6
   <configIni use="default">
7
   </configIni>
8
9
   <launcherArgs>
10
      <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
11
   </launcherArgs>
12
13
   <launcher>
14
      <solaris/>
15
      <win useIco="false">
16
         <bmp/>
17
      </win>
18
   </launcher>
19
20
   <vm>
21
   </vm>
22
23
   <license>
24
        <url>http://www.example.com</url>
25
        <text>
26
   This is the liCenSE.
27
         </text>
28
   </license>
29
30
   <plugins>
31
   </plugins>
32
33
34
</product>
(-)testData/ProductActionTest/licenseNoURL.product (+37 lines)
Added Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<?pde version="3.5"?>
3
4
<product name="Product With License" uid="licenseIU.product" useFeatures="false" includeLaunchers="true">
5
6
7
   <configIni use="default">
8
   </configIni>
9
10
   <launcherArgs>
11
      <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
12
   </launcherArgs>
13
14
   <windowImages/>
15
16
   <launcher>
17
      <solaris/>
18
      <win useIco="false">
19
         <bmp/>
20
      </win>
21
   </launcher>
22
23
24
   <vm>
25
   </vm>
26
27
   <license>
28
        <text>
29
   This is the liCenSE.
30
         </text>
31
   </license>
32
33
   <plugins>
34
   </plugins>
35
36
37
</product>
(-)testData/ProductActionTest/productWithNoLicense.product (+27 lines)
Added Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<?pde version="3.5"?>
3
4
<product name="Product With License" uid="licenseIU.product" useFeatures="false" includeLaunchers="true">
5
6
   <configIni use="default">
7
   </configIni>
8
9
   <launcherArgs>
10
      <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
11
   </launcherArgs>
12
13
   <launcher>
14
      <solaris/>
15
      <win useIco="false">
16
         <bmp/>
17
      </win>
18
   </launcher>
19
20
   <vm>
21
   </vm>
22
23
    <plugins>
24
   </plugins>
25
26
27
</product>
(-)testData/ProductActionTest/licenseNoText.product (+33 lines)
Added Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<?pde version="3.5"?>
3
4
<product name="Product With License" uid="licenseIU.product" useFeatures="false" includeLaunchers="true">
5
6
   <configIni use="default">
7
   </configIni>
8
9
   <launcherArgs>
10
      <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
11
   </launcherArgs>
12
13
   <windowImages/>
14
15
   <launcher>
16
      <solaris/>
17
      <win useIco="false">
18
         <bmp/>
19
      </win>
20
   </launcher>
21
22
   <vm>
23
   </vm>
24
25
   <license>
26
        <url>http://www.example.com</url>
27
   </license>
28
29
   <plugins>
30
   </plugins>
31
32
33
</product>
(-)src/org/eclipse/equinox/internal/p2/publisher/eclipse/IProductDescriptor.java (+10 lines)
Lines 116-119 Link Here
116
	 */
116
	 */
117
	public File getLocation();
117
	public File getLocation();
118
118
119
	/**
120
	 * Returns the license URL for this product
121
	 */
122
	public String getLicenseURL();
123
124
	/**
125
	 * Returns the license text for this product
126
	 */
127
	public String getLicenseText();
128
119
}
129
}
(-)src/org/eclipse/equinox/internal/p2/publisher/eclipse/ProductFile.java (+44 lines)
Lines 85-90 Link Here
85
	private static final String EL_LAUNCHER_ARGS = "launcherArgs"; //$NON-NLS-1$
85
	private static final String EL_LAUNCHER_ARGS = "launcherArgs"; //$NON-NLS-1$
86
	private static final String EL_SPLASH = "splash"; //$NON-NLS-1$
86
	private static final String EL_SPLASH = "splash"; //$NON-NLS-1$
87
	private static final String EL_CONFIGURATIONS = "configurations"; //$NON-NLS-1$
87
	private static final String EL_CONFIGURATIONS = "configurations"; //$NON-NLS-1$
88
	private static final String EL_LICENSE = "license"; //$NON-NLS-1$
89
	private static final String EL_URL = "url"; //$NON-NLS-1$
90
	private static final String EL_TEXT = "text"; //$NON-NLS-1$
88
91
89
	//These constants form a small state machine to parse the .product file
92
	//These constants form a small state machine to parse the .product file
90
	private static final int STATE_START = 0;
93
	private static final int STATE_START = 0;
Lines 105-110 Link Here
105
	private static final int STATE_VM_ARGS_WIN = 15;
108
	private static final int STATE_VM_ARGS_WIN = 15;
106
	private static final int STATE_CONFIG_INI = 16;
109
	private static final int STATE_CONFIG_INI = 16;
107
	private static final int STATE_CONFIGURATIONS = 17;
110
	private static final int STATE_CONFIGURATIONS = 17;
111
	private static final int STATE_LICENSE = 18;
112
	private static final int STATE_LICENSE_URL = 19;
113
	private static final int STATE_LICENSE_TEXT = 20;
108
114
109
	private int state = STATE_START;
115
	private int state = STATE_START;
110
116
Lines 130-135 Link Here
130
	private File location;
136
	private File location;
131
	private List bundleInfos;
137
	private List bundleInfos;
132
	private Properties properties;
138
	private Properties properties;
139
	private String licenseURL;
140
	private String licenseText = null;
133
141
134
	private static String normalize(String text) {
142
	private static String normalize(String text) {
135
		if (text == null || text.trim().length() == 0)
143
		if (text == null || text.trim().length() == 0)
Lines 370-375 Link Here
370
		return normalize(args);
378
		return normalize(args);
371
	}
379
	}
372
380
381
	public String getLicenseText() {
382
		return licenseText;
383
	}
384
385
	public String getLicenseURL() {
386
		return licenseURL;
387
	}
388
373
	public void startElement(String uri, String localName, String qName, Attributes attributes) {
389
	public void startElement(String uri, String localName, String qName, Attributes attributes) {
374
		switch (state) {
390
		switch (state) {
375
			case STATE_START :
391
			case STATE_START :
Lines 396-401 Link Here
396
					splashLocation = attributes.getValue(ATTRIBUTE_LOCATION);
412
					splashLocation = attributes.getValue(ATTRIBUTE_LOCATION);
397
				} else if (EL_CONFIGURATIONS.equals(localName)) {
413
				} else if (EL_CONFIGURATIONS.equals(localName)) {
398
					state = STATE_CONFIGURATIONS;
414
					state = STATE_CONFIGURATIONS;
415
				} else if (EL_LICENSE.equals(localName)) {
416
					state = STATE_LICENSE;
399
				}
417
				}
400
				break;
418
				break;
401
419
Lines 450-455 Link Here
450
				}
468
				}
451
				break;
469
				break;
452
470
471
			case STATE_LICENSE :
472
				if (EL_URL.equals(localName)) {
473
					state = STATE_LICENSE_URL;
474
				} else if (EL_TEXT.equals(localName)) {
475
					licenseText = ""; //$NON-NLS-1$
476
					state = STATE_LICENSE_TEXT;
477
				}
478
				break;
479
453
			case STATE_FEATURES :
480
			case STATE_FEATURES :
454
				if (EL_FEATURE.equals(localName)) {
481
				if (EL_FEATURE.equals(localName)) {
455
					processFeature(attributes);
482
					processFeature(attributes);
Lines 519-524 Link Here
519
				if (EL_CONFIGURATIONS.equals(localName))
546
				if (EL_CONFIGURATIONS.equals(localName))
520
					state = STATE_PRODUCT;
547
					state = STATE_PRODUCT;
521
				break;
548
				break;
549
			case STATE_LICENSE :
550
				if (EL_LICENSE.equals(localName))
551
					state = STATE_PRODUCT;
552
				break;
522
553
523
			case STATE_PROGRAM_ARGS :
554
			case STATE_PROGRAM_ARGS :
524
			case STATE_PROGRAM_ARGS_LINUX :
555
			case STATE_PROGRAM_ARGS_LINUX :
Lines 532-537 Link Here
532
			case STATE_VM_ARGS_WIN :
563
			case STATE_VM_ARGS_WIN :
533
				state = STATE_LAUNCHER_ARGS;
564
				state = STATE_LAUNCHER_ARGS;
534
				break;
565
				break;
566
			case STATE_LICENSE_URL :
567
			case STATE_LICENSE_TEXT :
568
				state = STATE_LICENSE;
569
				break;
535
570
536
			case STATE_CONFIG_INI :
571
			case STATE_CONFIG_INI :
537
				if (EL_CONFIG_INI.equals(localName))
572
				if (EL_CONFIG_INI.equals(localName))
Lines 578-583 Link Here
578
				if (platformConfigPath != null)
613
				if (platformConfigPath != null)
579
					platformConfigPath += String.valueOf(ch, start, length);
614
					platformConfigPath += String.valueOf(ch, start, length);
580
				break;
615
				break;
616
			case STATE_LICENSE_URL :
617
				licenseURL = String.valueOf(ch, start, length);
618
				break;
619
			case STATE_LICENSE_TEXT :
620
				if (licenseText != null)
621
					licenseText += String.valueOf(ch, start, length);
622
				break;
623
581
		}
624
		}
582
	}
625
	}
583
626
Lines 698-701 Link Here
698
	private void processMac(Attributes attributes) {
741
	private void processMac(Attributes attributes) {
699
		addIcon(OS_MACOSX, attributes.getValue(ATTRIBUTE_ICON));
742
		addIcon(OS_MACOSX, attributes.getValue(ATTRIBUTE_ICON));
700
	}
743
	}
744
701
}
745
}
(-)src/org/eclipse/equinox/p2/publisher/actions/RootIUAction.java (+25 lines)
Lines 10-15 Link Here
10
 ******************************************************************************/
10
 ******************************************************************************/
11
package org.eclipse.equinox.p2.publisher.actions;
11
package org.eclipse.equinox.p2.publisher.actions;
12
12
13
import java.net.URI;
14
import java.net.URISyntaxException;
13
import java.util.*;
15
import java.util.*;
14
import org.eclipse.core.runtime.*;
16
import org.eclipse.core.runtime.*;
15
import org.eclipse.equinox.internal.p2.publisher.*;
17
import org.eclipse.equinox.internal.p2.publisher.*;
Lines 49-54 Link Here
49
		processCapabilityAdvice(descriptor, info);
51
		processCapabilityAdvice(descriptor, info);
50
		processTouchpointAdvice(descriptor, null, info);
52
		processTouchpointAdvice(descriptor, null, info);
51
		processInstallableUnitPropertiesAdvice(descriptor, info);
53
		processInstallableUnitPropertiesAdvice(descriptor, info);
54
		processLicense(descriptor, info);
52
		IInstallableUnit rootIU = MetadataFactory.createInstallableUnit(descriptor);
55
		IInstallableUnit rootIU = MetadataFactory.createInstallableUnit(descriptor);
53
		if (rootIU == null)
56
		if (rootIU == null)
54
			return new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.error_rootIU_generation, new Object[] {name, id, version}));
57
			return new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.error_rootIU_generation, new Object[] {name, id, version}));
Lines 64-69 Link Here
64
		//		result.addIU(generateDefaultCategory(rootIU, rootCategory), IPublisherResult.NON_ROOT);
67
		//		result.addIU(generateDefaultCategory(rootIU, rootCategory), IPublisherResult.NON_ROOT);
65
	}
68
	}
66
69
70
	protected static void processLicense(InstallableUnitDescription iu, IPublisherInfo info) {
71
		Collection advice = info.getAdvice(null, true, iu.getId(), iu.getVersion(), ILicenseAdvice.class);
72
		if (advice.size() > 0) {
73
			// Only process the first license we find for this IU.
74
			ILicenseAdvice entry = (ILicenseAdvice) advice.iterator().next();
75
			String licenseText = entry.getLicenseText() == null ? "" : entry.getLicenseText(); //$NON-NLS-1$
76
			String licenseUrl = entry.getLicenseURL() == null ? "" : entry.getLicenseURL(); //$NON-NLS-1$
77
			if (licenseText.length() > 0 || licenseUrl.length() > 0)
78
				iu.setLicense(MetadataFactory.createLicense(toURIOrNull(licenseUrl), licenseText));
79
		}
80
	}
81
82
	private static URI toURIOrNull(String url) {
83
		if (url == null)
84
			return null;
85
		try {
86
			return URIUtil.fromString(url);
87
		} catch (URISyntaxException e) {
88
			return null;
89
		}
90
	}
91
67
	/**
92
	/**
68
	 * This was copied over from Generator to match up with the call from generateRootIU (above).
93
	 * This was copied over from Generator to match up with the call from generateRootIU (above).
69
	 * It is entirely unclear why it was needed.  Should review.
94
	 * It is entirely unclear why it was needed.  Should review.
(-)src/org/eclipse/equinox/p2/publisher/eclipse/ProductFileAdvice.java (-3 / +29 lines)
Lines 20-31 Link Here
20
import org.eclipse.equinox.internal.provisional.p2.core.Version;
20
import org.eclipse.equinox.internal.provisional.p2.core.Version;
21
import org.eclipse.equinox.p2.publisher.AbstractAdvice;
21
import org.eclipse.equinox.p2.publisher.AbstractAdvice;
22
import org.eclipse.equinox.p2.publisher.AbstractPublisherAction;
22
import org.eclipse.equinox.p2.publisher.AbstractPublisherAction;
23
import org.eclipse.equinox.p2.publisher.actions.ILicenseAdvice;
23
24
24
/**
25
/**
25
 * Provide advice derived from the .product file.  The product can give some info on 
26
 * Provide advice derived from the .product file.  The product can give some info on 
26
 * launching as well as the configuration (bundles, properties, ...)
27
 * launching as well as the configuration (bundles, properties, ...)
27
 */
28
 */
28
public class ProductFileAdvice extends AbstractAdvice implements IExecutableAdvice, IConfigAdvice, IBrandingAdvice {
29
public class ProductFileAdvice extends AbstractAdvice implements ILicenseAdvice, IExecutableAdvice, IConfigAdvice, IBrandingAdvice {
29
30
30
	private final static String OSGI_SPLASH_PATH = "osgi.splashPath"; //$NON-NLS-1$
31
	private final static String OSGI_SPLASH_PATH = "osgi.splashPath"; //$NON-NLS-1$
31
	private final static String SPLASH_PREFIX = "platform:/base/plugins/"; //$NON-NLS-1$
32
	private final static String SPLASH_PREFIX = "platform:/base/plugins/"; //$NON-NLS-1$
Lines 49-54 Link Here
49
		}
50
		}
50
	};
51
	};
51
52
53
	protected String getId() {
54
		return product.getId();
55
	}
56
57
	protected Version getVersion() {
58
		return Version.parseVersion(product.getVersion());
59
	}
60
52
	/**
61
	/**
53
	 * Constructs a new ProductFileAdvice for a given product file and a
62
	 * Constructs a new ProductFileAdvice for a given product file and a
54
	 * particular configuration. Configurations are 
63
	 * particular configuration. Configurations are 
Lines 132-137 Link Here
132
		return this.os;
141
		return this.os;
133
	}
142
	}
134
143
144
	/**
145
	 * Returns the license text for this product
146
	 */
147
	public String getLicenseURL() {
148
		return product.getLicenseURL();
149
	}
150
151
	/**
152
	 * Returns the license URL for this product
153
	 */
154
	public String getLicenseText() {
155
		return product.getLicenseText();
156
	}
157
135
	private ConfigData getConfigData() {
158
	private ConfigData getConfigData() {
136
		DataLoader loader = createDataLoader();
159
		DataLoader loader = createDataLoader();
137
		ConfigData result;
160
		ConfigData result;
Lines 206-213 Link Here
206
	}
229
	}
207
230
208
	protected boolean matchConfig(String spec, boolean includeDefault) {
231
	protected boolean matchConfig(String spec, boolean includeDefault) {
209
		String targetOS = AbstractPublisherAction.parseConfigSpec(spec)[1];
232
		if (spec != null) {
210
		return os.equals(targetOS);
233
			String targetOS = AbstractPublisherAction.parseConfigSpec(spec)[1];
234
			return os.equals(targetOS);
235
		}
236
		return true;
211
	}
237
	}
212
238
213
	private DataLoader createDataLoader() {
239
	private DataLoader createDataLoader() {
(-)src/org/eclipse/equinox/p2/publisher/actions/ILicenseAdvice.java (+21 lines)
Added Link Here
1
/******************************************************************************* 
2
* Copyright (c) 2009 EclipseSource and others. All rights reserved. This
3
* program and the accompanying materials are made available under the terms of
4
* the Eclipse Public License v1.0 which accompanies this distribution, and is
5
* available at http://www.eclipse.org/legal/epl-v10.html
6
*
7
* Contributors:
8
*   EclipseSource - initial API and implementation
9
******************************************************************************/
10
package org.eclipse.equinox.p2.publisher.actions;
11
12
/**
13
 * Provides advice about a license.
14
 */
15
public interface ILicenseAdvice {
16
17
	public String getLicenseURL();
18
19
	public String getLicenseText();
20
21
}

Return to bug 273177