Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 222480 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/PlatformConfigurationWrapper.java (+5 lines)
Lines 190-195 Link Here
190
		addedFeature.setId(id);
190
		addedFeature.setId(id);
191
		addedFeature.setVersion(version);
191
		addedFeature.setVersion(version);
192
		addedFeature.setUrl(makeFeatureURL(id, version));
192
		addedFeature.setUrl(makeFeatureURL(id, version));
193
		addedFeature.setApplication(application);
194
		addedFeature.setPluginIdentifier(pluginIdentifier);
195
		addedFeature.setPluginVersion(pluginVersion);
196
		addedFeature.setRoots(root);
197
		addedFeature.setPrimary(primary);
193
		site.addFeature(addedFeature);
198
		site.addFeature(addedFeature);
194
		return Status.OK_STATUS;
199
		return Status.OK_STATUS;
195
	}
200
	}
(-)src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/InstallFeatureAction.java (-1 / +4 lines)
Lines 65-70 Link Here
65
		if (file == null || !file.exists()) {
65
		if (file == null || !file.exists()) {
66
			return Util.createError(NLS.bind(Messages.artifact_file_not_found, artifactKey));
66
			return Util.createError(NLS.bind(Messages.artifact_file_not_found, artifactKey));
67
		}
67
		}
68
		return configuration.addFeatureEntry(file, featureId, featureVersion, artifactKey.getId(), artifactKey.getVersion().toString(), /*primary*/false, /*application*/null, /*root*/null);
68
		String pluginId = iu.getProperty("feature.plugin");
69
		boolean isPrimary = Boolean.valueOf(iu.getProperty("feature.primary")).booleanValue();
70
		String application = iu.getProperty("feature.application");
71
		return configuration.addFeatureEntry(file, featureId, featureVersion, pluginId, artifactKey.getVersion().toString(), isPrimary, application, /*root*/null);
69
	}
72
	}
70
}
73
}
(-)src/org/eclipse/equinox/internal/p2/metadata/generator/features/FeatureParser.java (+5 lines)
Lines 251-256 Link Here
251
			String arch = attributes.getValue("arch"); //$NON-NLS-1$
251
			String arch = attributes.getValue("arch"); //$NON-NLS-1$
252
			result.setEnvironment(os, ws, arch, nl);
252
			result.setEnvironment(os, ws, arch, nl);
253
253
254
			result.setApplication(attributes.getValue("application")); //$NON-NLS-1$
255
			result.setPlugin(attributes.getValue("plugin")); //$NON-NLS-1$
256
			result.setExclusive(Boolean.valueOf(attributes.getValue("exclusive")).booleanValue()); //$NON-NLS-1$
257
			result.setPrimary(Boolean.valueOf(attributes.getValue("primary")).booleanValue()); //$NON-NLS-1$
258
254
			//TODO rootURLs
259
			//TODO rootURLs
255
			if (url != null && "file".equals(url.getProtocol())) { //$NON-NLS-1$
260
			if (url != null && "file".equals(url.getProtocol())) { //$NON-NLS-1$
256
				File f = new File(url.getFile().replace('/', File.separatorChar));
261
				File f = new File(url.getFile().replace('/', File.separatorChar));
(-)src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Feature.java (+36 lines)
Lines 23-28 Link Here
23
	private String version;
23
	private String version;
24
	private String label;
24
	private String label;
25
	private String image;
25
	private String image;
26
	private String pluginId;
27
	private boolean primary = false;
28
	private boolean exclusive = false;
29
	private String application;
26
30
27
	private URLEntry description;
31
	private URLEntry description;
28
	private URLEntry license;
32
	private URLEntry license;
Lines 70-75 Link Here
70
		entries.add(plugin);
74
		entries.add(plugin);
71
	}
75
	}
72
76
77
	public String getApplication() {
78
		return application;
79
	}
80
73
	public String getArch() {
81
	public String getArch() {
74
		return arch;
82
		return arch;
75
	}
83
	}
Lines 162-167 Link Here
162
		return os;
170
		return os;
163
	}
171
	}
164
172
173
	public String getPlugin() {
174
		return pluginId;
175
	}
176
165
	public String getProviderName() {
177
	public String getProviderName() {
166
		return providerName;
178
		return providerName;
167
	}
179
	}
Lines 186-191 Link Here
186
		return ws;
198
		return ws;
187
	}
199
	}
188
200
201
	public boolean isExclusive() {
202
		return exclusive;
203
	}
204
205
	public boolean isPrimary() {
206
		return primary;
207
	}
208
209
	public void setApplication(String application) {
210
		this.application = application;
211
	}
212
189
	public void setCopyright(String copyright) {
213
	public void setCopyright(String copyright) {
190
		if (this.copyright == null)
214
		if (this.copyright == null)
191
			this.copyright = new URLEntry();
215
			this.copyright = new URLEntry();
Lines 217-222 Link Here
217
		this.nl = nl;
241
		this.nl = nl;
218
	}
242
	}
219
243
244
	public void setExclusive(boolean exclusive) {
245
		this.exclusive = exclusive;
246
	}
247
220
	public void setImage(String image) {
248
	public void setImage(String image) {
221
		this.image = image;
249
		this.image = image;
222
	}
250
	}
Lines 257-262 Link Here
257
		this.location = location;
285
		this.location = location;
258
	}
286
	}
259
287
288
	public void setPlugin(String pluginId) {
289
		this.pluginId = pluginId;
290
	}
291
292
	public void setPrimary(boolean primary) {
293
		this.primary = primary;
294
	}
295
260
	public void setProviderName(String value) {
296
	public void setProviderName(String value) {
261
		providerName = value;
297
		providerName = value;
262
	}
298
	}
(-)src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/MetadataGeneratorHelper.java (+8 lines)
Lines 571-576 Link Here
571
			iu.setLicense(new License(feature.getLicenseURL(), feature.getLicense()));
571
			iu.setLicense(new License(feature.getLicenseURL(), feature.getLicense()));
572
		if (feature.getCopyright() != null)
572
		if (feature.getCopyright() != null)
573
			iu.setCopyright(new Copyright(feature.getCopyrightURL(), feature.getCopyright()));
573
			iu.setCopyright(new Copyright(feature.getCopyrightURL(), feature.getCopyright()));
574
		if (feature.getApplication() != null)
575
			iu.setProperty("feature.application", feature.getApplication());
576
		if (feature.getPlugin() != null)
577
			iu.setProperty("feature.plugin", feature.getPlugin());
578
		if (feature.isExclusive())
579
			iu.setProperty("feature.exclusive", "true");
580
		if (feature.isPrimary())
581
			iu.setProperty("feature.primary", "true");
574
582
575
		// The required capabilities are not specified at this level because we don't want the feature jar to be attractive to install.
583
		// The required capabilities are not specified at this level because we don't want the feature jar to be attractive to install.
576
584

Return to bug 222480