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

Collapse All | Expand All

(-)META-INF/MANIFEST.MF (-2 / +3 lines)
Lines 2-14 Link Here
2
Bundle-ManifestVersion: 2
2
Bundle-ManifestVersion: 2
3
Bundle-Name: %pluginName
3
Bundle-Name: %pluginName
4
Bundle-SymbolicName: org.eclipse.equinox.frameworkadmin;singleton:=true
4
Bundle-SymbolicName: org.eclipse.equinox.frameworkadmin;singleton:=true
5
Bundle-Version: 1.0.200.qualifier
5
Bundle-Version: 2.0.0.qualifier
6
Bundle-Vendor: %providerName
6
Bundle-Vendor: %providerName
7
Bundle-Localization: plugin
7
Bundle-Localization: plugin
8
Import-Package: org.eclipse.osgi.service.pluginconversion;version="1.0.0",
8
Import-Package: org.eclipse.osgi.service.pluginconversion;version="1.0.0",
9
 org.eclipse.osgi.util;version="1.1.0",
9
 org.eclipse.osgi.util;version="1.1.0",
10
 org.osgi.framework;version="1.3.0"
10
 org.osgi.framework;version="1.3.0"
11
Export-Package: org.eclipse.equinox.internal.frameworkadmin.utils;
11
Export-Package: org.eclipse.equinox.frameworkadmin;version="2.0.0",
12
 org.eclipse.equinox.internal.frameworkadmin.utils;
12
  x-friends:="org.eclipse.equinox.frameworkadmin.equinox,
13
  x-friends:="org.eclipse.equinox.frameworkadmin.equinox,
13
   org.eclipse.equinox.p2.metadata.generator,
14
   org.eclipse.equinox.p2.metadata.generator,
14
   org.eclipse.equinox.p2.publisher,
15
   org.eclipse.equinox.p2.publisher,
(-)src/org/eclipse/equinox/frameworkadmin/BundleInfo.java (+221 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2007, 2009 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.equinox.frameworkadmin;
12
13
import java.net.URI;
14
import org.eclipse.core.runtime.URIUtil;
15
16
/**
17
 * This object represents information of a bundle. This class is a copy of the BundleInfo
18
 * class in org.eclipse.equinox.simpleconfigurator
19
 * @since 2.0
20
 */
21
public class BundleInfo {
22
	public static final int NO_LEVEL = -1;
23
	public static final int NO_BUNDLEID = -1;
24
25
	private String symbolicName = null;
26
	private String version = null;
27
	private URI baseLocation;
28
	private URI location;
29
	private long bundleId = NO_BUNDLEID;
30
31
	private boolean markedAsStarted = false;
32
	private int startLevel = NO_LEVEL;
33
	private boolean resolved = false;
34
35
	private String manifest;
36
	private String fragmentHost;
37
38
	public BundleInfo() {
39
	}
40
41
	public BundleInfo(URI location) {
42
		this.location = location;
43
	}
44
45
	public BundleInfo(URI location, int startLevel, boolean started) {
46
		this.location = location;
47
		this.startLevel = startLevel;
48
		this.markedAsStarted = started;
49
	}
50
51
	public BundleInfo(URI location, int startLevel, boolean started, long bundleId) {
52
		this.location = location;
53
		this.startLevel = startLevel;
54
		this.markedAsStarted = started;
55
		this.bundleId = bundleId;
56
	}
57
58
	public BundleInfo(String symbolic, String version, URI location, int startLevel, boolean started) {
59
		this.symbolicName = symbolic;
60
		this.version = version;
61
		this.location = location;
62
		this.markedAsStarted = started;
63
		this.startLevel = startLevel;
64
	}
65
66
	public long getBundleId() {
67
		return bundleId;
68
	}
69
70
	public URI getBaseLocation() {
71
		return baseLocation;
72
	}
73
74
	public URI getLocation() {
75
		return location;
76
	}
77
78
	public String getManifest() {
79
		return manifest;
80
	}
81
82
	public int getStartLevel() {
83
		return startLevel;
84
	}
85
86
	public String getSymbolicName() {
87
		return symbolicName;
88
	}
89
90
	public String getVersion() {
91
		return version;
92
	}
93
94
	public String getFragmentHost() {
95
		return fragmentHost;
96
	}
97
98
	public boolean isMarkedAsStarted() {
99
		return markedAsStarted;
100
	}
101
102
	public boolean isResolved() {
103
		return resolved;
104
	}
105
106
	public void setBundleId(long bundleId) {
107
		this.bundleId = bundleId;
108
	}
109
110
	public void setBaseLocation(URI baseLocation) {
111
		this.baseLocation = baseLocation;
112
	}
113
114
	public void setLocation(URI location) {
115
		this.location = location;
116
	}
117
118
	public void setManifest(String manifest) {
119
		this.manifest = manifest;
120
	}
121
122
	public void setMarkedAsStarted(boolean markedAsStarted) {
123
		this.markedAsStarted = markedAsStarted;
124
	}
125
126
	public void setResolved(boolean resolved) {
127
		this.resolved = resolved;
128
	}
129
130
	public void setStartLevel(int level) {
131
		this.startLevel = level;
132
	}
133
134
	public void setSymbolicName(String symbolicName) {
135
		this.symbolicName = symbolicName;
136
	}
137
138
	public void setVersion(String value) {
139
		this.version = value;
140
	}
141
142
	public void setFragmentHost(String fragmentHost) {
143
		this.fragmentHost = fragmentHost;
144
	}
145
146
	/* (non-Javadoc)
147
	 * @see java.lang.Object#toString()
148
	 */
149
	public String toString() {
150
		StringBuffer buffer = new StringBuffer();
151
		buffer.append("BundleInfo("); //$NON-NLS-1$
152
		if (symbolicName != null)
153
			buffer.append(symbolicName);
154
		buffer.append(", "); //$NON-NLS-1$
155
		if (version != null)
156
			buffer.append(version);
157
158
		if (fragmentHost != null) {
159
			buffer.append(", fragmentHost="); //$NON-NLA-1$
160
			buffer.append(fragmentHost);
161
		}
162
163
		if (baseLocation != null) {
164
			buffer.append(", baseLocation="); //$NON-NLS-1$
165
			buffer.append(baseLocation);
166
		}
167
		buffer.append(", location="); //$NON-NLS-1$
168
		buffer.append(location);
169
		buffer.append(", startLevel="); //$NON-NLS-1$
170
		buffer.append(startLevel);
171
		buffer.append(", toBeStarted="); //$NON-NLS-1$
172
		buffer.append(markedAsStarted);
173
		buffer.append(", resolved="); //$NON-NLS-1$
174
		buffer.append(resolved);
175
		buffer.append(", id="); //$NON-NLS-1$
176
		buffer.append(this.bundleId);//		buffer.append(',').append(manifest == null ? "no manifest" : "manifest available");
177
		buffer.append(',').append(manifest == null ? "no manifest" : "manifest available"); //$NON-NLS-1$ //$NON-NLS-2$
178
		buffer.append(')');
179
		return buffer.toString();
180
	}
181
182
	public int hashCode() {
183
		final int prime = 31;
184
		int result = 1;
185
		result = prime * result + ((symbolicName == null) ? 0 : symbolicName.hashCode());
186
		result = prime * result + ((version == null) ? 0 : version.hashCode());
187
		return result;
188
	}
189
190
	public boolean equals(Object obj) {
191
		if (this == obj)
192
			return true;
193
194
		if (obj == null)
195
			return false;
196
197
		if (getClass() != obj.getClass())
198
			return false;
199
200
		BundleInfo other = (BundleInfo) obj;
201
		if (symbolicName == null) {
202
			if (other.symbolicName != null)
203
				return false;
204
		} else if (!symbolicName.equals(other.symbolicName))
205
			return false;
206
207
		if (version == null) {
208
			if (other.version != null)
209
				return false;
210
		} else if (!version.equals(other.version))
211
			return false;
212
213
		if (location == null || other.location == null)
214
			return true;
215
216
		//compare absolute location URIs
217
		URI absoluteLocation = baseLocation == null ? location : URIUtil.append(baseLocation, location.toString());
218
		URI otherAbsoluteLocation = other.baseLocation == null ? other.location : URIUtil.append(other.baseLocation, other.location.toString());
219
		return URIUtil.sameURI(absoluteLocation, otherAbsoluteLocation);
220
	}
221
}
(-)src/org/eclipse/equinox/internal/frameworkadmin/utils/SimpleBundlesState.java (+2 lines)
Lines 10-15 Link Here
10
 *******************************************************************************/
10
 *******************************************************************************/
11
package org.eclipse.equinox.internal.frameworkadmin.utils;
11
package org.eclipse.equinox.internal.frameworkadmin.utils;
12
12
13
import org.eclipse.equinox.frameworkadmin.BundleInfo;
14
13
import java.io.File;
15
import java.io.File;
14
import java.io.IOException;
16
import java.io.IOException;
15
import java.net.URI;
17
import java.net.URI;
(-)src/org/eclipse/equinox/internal/frameworkadmin/utils/Utils.java (-1 / +2 lines)
Lines 10-15 Link Here
10
 *******************************************************************************/
10
 *******************************************************************************/
11
package org.eclipse.equinox.internal.frameworkadmin.utils;
11
package org.eclipse.equinox.internal.frameworkadmin.utils;
12
12
13
import org.eclipse.equinox.frameworkadmin.BundleInfo;
14
13
import java.io.*;
15
import java.io.*;
14
import java.net.*;
16
import java.net.*;
15
import java.text.SimpleDateFormat;
17
import java.text.SimpleDateFormat;
Lines 18-24 Link Here
18
import java.util.zip.ZipEntry;
20
import java.util.zip.ZipEntry;
19
import java.util.zip.ZipFile;
21
import java.util.zip.ZipFile;
20
import org.eclipse.core.runtime.*;
22
import org.eclipse.core.runtime.*;
21
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
22
import org.eclipse.osgi.service.pluginconversion.PluginConversionException;
23
import org.eclipse.osgi.service.pluginconversion.PluginConversionException;
23
import org.eclipse.osgi.service.pluginconversion.PluginConverter;
24
import org.eclipse.osgi.service.pluginconversion.PluginConverter;
24
import org.eclipse.osgi.util.ManifestElement;
25
import org.eclipse.osgi.util.ManifestElement;
(-)src/org/eclipse/equinox/internal/provisional/configuratormanipulator/ConfiguratorManipulator.java (-1 / +3 lines)
Lines 12-18 Link Here
12
12
13
import java.io.File;
13
import java.io.File;
14
import java.io.IOException;
14
import java.io.IOException;
15
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
15
import org.eclipse.equinox.frameworkadmin.BundleInfo;
16
import org.eclipse.equinox.internal.provisional.frameworkadmin.FrameworkAdmin;
17
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
16
18
17
/**
19
/**
18
 * 
20
 * 
(-)src/org/eclipse/equinox/internal/provisional/frameworkadmin/BundleInfo.java (-231 lines)
Removed Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2007, 2009 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.equinox.internal.provisional.frameworkadmin;
12
13
import java.net.URI;
14
import org.eclipse.core.runtime.URIUtil;
15
16
/**
17
 * This object represents information of a bundle. This class is a copy of the BundleInfo
18
 * class in org.eclipse.equinox.simpleconfigurator
19
 *
20
 */
21
public class BundleInfo {
22
	public static final int NO_LEVEL = -1;
23
	public static final int NO_BUNDLEID = -1;
24
25
	private String symbolicName = null;
26
	private String version = null;
27
	private URI baseLocation;
28
	private URI location;
29
	private long bundleId = NO_BUNDLEID;
30
31
	private boolean markedAsStarted = false;
32
	private int startLevel = NO_LEVEL;
33
	private boolean resolved = false;
34
35
	private String manifest;
36
	private String fragmentHost;
37
38
	public BundleInfo() {
39
	}
40
41
	public BundleInfo(URI location) {
42
		this.location = location;
43
	}
44
45
	public BundleInfo(URI location, boolean started) {
46
		this.location = location;
47
		this.markedAsStarted = started;
48
	}
49
50
	public BundleInfo(URI location, int startLevel) {
51
		this.location = location;
52
		this.startLevel = startLevel;
53
	}
54
55
	public BundleInfo(URI location, int startLevel, boolean started) {
56
		this.location = location;
57
		this.startLevel = startLevel;
58
		this.markedAsStarted = started;
59
	}
60
61
	public BundleInfo(URI location, int startLevel, boolean started, long bundleId) {
62
		this.location = location;
63
		this.startLevel = startLevel;
64
		this.markedAsStarted = started;
65
		this.bundleId = bundleId;
66
	}
67
68
	public BundleInfo(String symbolic, String version, URI location, int startLevel, boolean started) {
69
		this.symbolicName = symbolic;
70
		this.version = version;
71
		this.location = location;
72
		this.markedAsStarted = started;
73
		this.startLevel = startLevel;
74
	}
75
76
	public long getBundleId() {
77
		return bundleId;
78
	}
79
80
	public URI getBaseLocation() {
81
		return baseLocation;
82
	}
83
84
	public URI getLocation() {
85
		return location;
86
	}
87
88
	public String getManifest() {
89
		return manifest;
90
	}
91
92
	public int getStartLevel() {
93
		return startLevel;
94
	}
95
96
	public String getSymbolicName() {
97
		return symbolicName;
98
	}
99
100
	public String getVersion() {
101
		return version;
102
	}
103
104
	public String getFragmentHost() {
105
		return fragmentHost;
106
	}
107
108
	public boolean isMarkedAsStarted() {
109
		return markedAsStarted;
110
	}
111
112
	public boolean isResolved() {
113
		return resolved;
114
	}
115
116
	public void setBundleId(long bundleId) {
117
		this.bundleId = bundleId;
118
	}
119
120
	public void setBaseLocation(URI baseLocation) {
121
		this.baseLocation = baseLocation;
122
	}
123
124
	public void setLocation(URI location) {
125
		this.location = location;
126
	}
127
128
	public void setManifest(String manifest) {
129
		this.manifest = manifest;
130
	}
131
132
	public void setMarkedAsStarted(boolean markedAsStarted) {
133
		this.markedAsStarted = markedAsStarted;
134
	}
135
136
	public void setResolved(boolean resolved) {
137
		this.resolved = resolved;
138
	}
139
140
	public void setStartLevel(int level) {
141
		this.startLevel = level;
142
	}
143
144
	public void setSymbolicName(String symbolicName) {
145
		this.symbolicName = symbolicName;
146
	}
147
148
	public void setVersion(String value) {
149
		this.version = value;
150
	}
151
152
	public void setFragmentHost(String fragmentHost) {
153
		this.fragmentHost = fragmentHost;
154
	}
155
156
	/* (non-Javadoc)
157
	 * @see java.lang.Object#toString()
158
	 */
159
	public String toString() {
160
		StringBuffer buffer = new StringBuffer();
161
		buffer.append("BundleInfo("); //$NON-NLS-1$
162
		if (symbolicName != null)
163
			buffer.append(symbolicName);
164
		buffer.append(", "); //$NON-NLS-1$
165
		if (version != null)
166
			buffer.append(version);
167
168
		if (fragmentHost != null) {
169
			buffer.append(", fragmentHost="); //$NON-NLA-1$
170
			buffer.append(fragmentHost);
171
		}
172
173
		if (baseLocation != null) {
174
			buffer.append(", baseLocation="); //$NON-NLS-1$
175
			buffer.append(baseLocation);
176
		}
177
		buffer.append(", location="); //$NON-NLS-1$
178
		buffer.append(location);
179
		buffer.append(", startLevel="); //$NON-NLS-1$
180
		buffer.append(startLevel);
181
		buffer.append(", toBeStarted="); //$NON-NLS-1$
182
		buffer.append(markedAsStarted);
183
		buffer.append(", resolved="); //$NON-NLS-1$
184
		buffer.append(resolved);
185
		buffer.append(", id="); //$NON-NLS-1$
186
		buffer.append(this.bundleId);//		buffer.append(',').append(manifest == null ? "no manifest" : "manifest available");
187
		buffer.append(',').append(manifest == null ? "no manifest" : "manifest available"); //$NON-NLS-1$ //$NON-NLS-2$
188
		buffer.append(')');
189
		return buffer.toString();
190
	}
191
192
	public int hashCode() {
193
		final int prime = 31;
194
		int result = 1;
195
		result = prime * result + ((symbolicName == null) ? 0 : symbolicName.hashCode());
196
		result = prime * result + ((version == null) ? 0 : version.hashCode());
197
		return result;
198
	}
199
200
	public boolean equals(Object obj) {
201
		if (this == obj)
202
			return true;
203
204
		if (obj == null)
205
			return false;
206
207
		if (getClass() != obj.getClass())
208
			return false;
209
210
		BundleInfo other = (BundleInfo) obj;
211
		if (symbolicName == null) {
212
			if (other.symbolicName != null)
213
				return false;
214
		} else if (!symbolicName.equals(other.symbolicName))
215
			return false;
216
217
		if (version == null) {
218
			if (other.version != null)
219
				return false;
220
		} else if (!version.equals(other.version))
221
			return false;
222
223
		if (location == null || other.location == null)
224
			return true;
225
226
		//compare absolute location URIs
227
		URI absoluteLocation = baseLocation == null ? location : URIUtil.append(baseLocation, location.toString());
228
		URI otherAbsoluteLocation = other.baseLocation == null ? other.location : URIUtil.append(other.baseLocation, other.location.toString());
229
		return URIUtil.sameURI(absoluteLocation, otherAbsoluteLocation);
230
	}
231
}
(-)src/org/eclipse/equinox/internal/provisional/frameworkadmin/BundlesState.java (+2 lines)
Lines 10-15 Link Here
10
 *******************************************************************************/
10
 *******************************************************************************/
11
package org.eclipse.equinox.internal.provisional.frameworkadmin;
11
package org.eclipse.equinox.internal.provisional.frameworkadmin;
12
12
13
import org.eclipse.equinox.frameworkadmin.BundleInfo;
14
13
/**
15
/**
14
 * This API is used for expecting bundles state virtually.
16
 * This API is used for expecting bundles state virtually.
15
 * 
17
 * 
(-)src/org/eclipse/equinox/internal/provisional/frameworkadmin/ConfigData.java (+1 lines)
Lines 12-17 Link Here
12
package org.eclipse.equinox.internal.provisional.frameworkadmin;
12
package org.eclipse.equinox.internal.provisional.frameworkadmin;
13
13
14
import java.util.*;
14
import java.util.*;
15
import org.eclipse.equinox.frameworkadmin.BundleInfo;
15
16
16
/**
17
/**
17
 * This object is instantiated by {@link Manipulator#getConfigData()};
18
 * This object is instantiated by {@link Manipulator#getConfigData()};
(-)src/org/eclipse/equinox/internal/provisional/frameworkadmin/Manipulator.java (+1 lines)
Lines 12-17 Link Here
12
12
13
import java.io.File;
13
import java.io.File;
14
import java.io.IOException;
14
import java.io.IOException;
15
import org.eclipse.equinox.frameworkadmin.BundleInfo;
15
import org.eclipse.equinox.internal.provisional.configuratormanipulator.ConfiguratorManipulator;
16
import org.eclipse.equinox.internal.provisional.configuratormanipulator.ConfiguratorManipulator;
16
17
17
/**
18
/**
(-)META-INF/MANIFEST.MF (-1 / +2 lines)
Lines 6-11 Link Here
6
Bundle-Vendor: %providerName
6
Bundle-Vendor: %providerName
7
Bundle-Localization: plugin
7
Bundle-Localization: plugin
8
Import-Package: org.eclipse.core.runtime.internal.adaptor,
8
Import-Package: org.eclipse.core.runtime.internal.adaptor,
9
 org.eclipse.equinox.frameworkadmin;version="[2.0.0,3.0.0)",
9
 org.eclipse.equinox.internal.frameworkadmin.utils,
10
 org.eclipse.equinox.internal.frameworkadmin.utils,
10
 org.eclipse.equinox.internal.provisional.configuratormanipulator,
11
 org.eclipse.equinox.internal.provisional.configuratormanipulator,
11
 org.eclipse.equinox.internal.provisional.frameworkadmin,
12
 org.eclipse.equinox.internal.provisional.frameworkadmin,
Lines 18-24 Link Here
18
 org.osgi.service.log;version="1.3.0",
19
 org.osgi.service.log;version="1.3.0",
19
 org.osgi.service.startlevel;version="1.0.0",
20
 org.osgi.service.startlevel;version="1.0.0",
20
 org.osgi.util.tracker;version="1.3.0"
21
 org.osgi.util.tracker;version="1.3.0"
21
Export-Package: org.eclipse.equinox.internal.frameworkadmin.equinox;x-friends:="org.eclipse.equinox.p2.publisher,org.eclipse.equinox.p2.metadata.generator",
22
Export-Package: org.eclipse.equinox.internal.frameworkadmin.equinox;x-friends:="org.eclipse.equinox.p2.publisher,org.eclipse.equinox.p2.metadata.generator,org.eclipse.equinox.simpleconfigurator.manipulator",
22
 org.eclipse.equinox.internal.frameworkadmin.equinox.utils;x-internal:=true
23
 org.eclipse.equinox.internal.frameworkadmin.equinox.utils;x-internal:=true
23
Require-Bundle: org.eclipse.equinox.common
24
Require-Bundle: org.eclipse.equinox.common
24
Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
25
Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
(-)src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxBundlesState.java (+1 lines)
Lines 15-20 Link Here
15
import java.net.URISyntaxException;
15
import java.net.URISyntaxException;
16
import java.util.*;
16
import java.util.*;
17
import org.eclipse.core.runtime.internal.adaptor.EclipseEnvironmentInfo;
17
import org.eclipse.core.runtime.internal.adaptor.EclipseEnvironmentInfo;
18
import org.eclipse.equinox.frameworkadmin.BundleInfo;
18
import org.eclipse.equinox.internal.frameworkadmin.equinox.utils.FileUtils;
19
import org.eclipse.equinox.internal.frameworkadmin.equinox.utils.FileUtils;
19
import org.eclipse.equinox.internal.frameworkadmin.utils.SimpleBundlesState;
20
import org.eclipse.equinox.internal.frameworkadmin.utils.SimpleBundlesState;
20
import org.eclipse.equinox.internal.frameworkadmin.utils.Utils;
21
import org.eclipse.equinox.internal.frameworkadmin.utils.Utils;
(-)src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwConfigFileParser.java (+1 lines)
Lines 14-19 Link Here
14
import java.net.*;
14
import java.net.*;
15
import java.util.*;
15
import java.util.*;
16
import org.eclipse.core.runtime.URIUtil;
16
import org.eclipse.core.runtime.URIUtil;
17
import org.eclipse.equinox.frameworkadmin.BundleInfo;
17
import org.eclipse.equinox.internal.frameworkadmin.equinox.utils.FileUtils;
18
import org.eclipse.equinox.internal.frameworkadmin.equinox.utils.FileUtils;
18
import org.eclipse.equinox.internal.frameworkadmin.utils.Utils;
19
import org.eclipse.equinox.internal.frameworkadmin.utils.Utils;
19
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
20
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
(-)src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxManipulatorImpl.java (+1 lines)
Lines 15-20 Link Here
15
import java.net.*;
15
import java.net.*;
16
import java.util.*;
16
import java.util.*;
17
import org.eclipse.core.runtime.*;
17
import org.eclipse.core.runtime.*;
18
import org.eclipse.equinox.frameworkadmin.BundleInfo;
18
import org.eclipse.equinox.internal.frameworkadmin.utils.SimpleBundlesState;
19
import org.eclipse.equinox.internal.frameworkadmin.utils.SimpleBundlesState;
19
import org.eclipse.equinox.internal.frameworkadmin.utils.Utils;
20
import org.eclipse.equinox.internal.frameworkadmin.utils.Utils;
20
import org.eclipse.equinox.internal.provisional.configuratormanipulator.ConfiguratorManipulator;
21
import org.eclipse.equinox.internal.provisional.configuratormanipulator.ConfiguratorManipulator;
(-)src/org/eclipse/equinox/frameworkadmin/tests/AbstractFwkAdminTest.java (+1 lines)
Lines 17-22 Link Here
17
import java.util.Properties;
17
import java.util.Properties;
18
import junit.framework.TestCase;
18
import junit.framework.TestCase;
19
import org.eclipse.core.runtime.*;
19
import org.eclipse.core.runtime.*;
20
import org.eclipse.equinox.frameworkadmin.BundleInfo;
20
import org.eclipse.equinox.internal.frameworkadmin.equinox.ParserUtils;
21
import org.eclipse.equinox.internal.frameworkadmin.equinox.ParserUtils;
21
import org.eclipse.equinox.internal.frameworkadmin.equinox.utils.FileUtils;
22
import org.eclipse.equinox.internal.frameworkadmin.equinox.utils.FileUtils;
22
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
23
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
(-)src/org/eclipse/equinox/frameworkadmin/tests/Bug196525.java (+1 lines)
Lines 15-20 Link Here
15
import java.net.URISyntaxException;
15
import java.net.URISyntaxException;
16
import org.eclipse.core.runtime.FileLocator;
16
import org.eclipse.core.runtime.FileLocator;
17
import org.eclipse.core.runtime.URIUtil;
17
import org.eclipse.core.runtime.URIUtil;
18
import org.eclipse.equinox.frameworkadmin.BundleInfo;
18
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
19
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
19
import org.osgi.framework.BundleException;
20
import org.osgi.framework.BundleException;
20
21
(-)src/org/eclipse/equinox/frameworkadmin/tests/Bug258370.java (+1 lines)
Lines 15-20 Link Here
15
import java.net.URISyntaxException;
15
import java.net.URISyntaxException;
16
import org.eclipse.core.runtime.FileLocator;
16
import org.eclipse.core.runtime.FileLocator;
17
import org.eclipse.core.runtime.URIUtil;
17
import org.eclipse.core.runtime.URIUtil;
18
import org.eclipse.equinox.frameworkadmin.BundleInfo;
18
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
19
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
19
import org.osgi.framework.BundleException;
20
import org.osgi.framework.BundleException;
20
21
(-)src/org/eclipse/equinox/frameworkadmin/tests/CleanupTest.java (-2 / +2 lines)
Lines 15-21 Link Here
15
import java.net.URISyntaxException;
15
import java.net.URISyntaxException;
16
import org.eclipse.core.runtime.FileLocator;
16
import org.eclipse.core.runtime.FileLocator;
17
import org.eclipse.core.runtime.URIUtil;
17
import org.eclipse.core.runtime.URIUtil;
18
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
18
import org.eclipse.equinox.frameworkadmin.BundleInfo;
19
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
19
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
20
20
21
public class CleanupTest extends FwkAdminAndSimpleConfiguratorTest {
21
public class CleanupTest extends FwkAdminAndSimpleConfiguratorTest {
Lines 90-96 Link Here
90
	}
90
	}
91
91
92
	public void testWithMutipleBundles() throws IOException, URISyntaxException {
92
	public void testWithMutipleBundles() throws IOException, URISyntaxException {
93
		BundleInfo bi = new BundleInfo(URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/bundle_1"))), 2);
93
		BundleInfo bi = new BundleInfo(URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/bundle_1"))), 2, false);
94
		m.getConfigData().addBundle(bi);
94
		m.getConfigData().addBundle(bi);
95
		m.save(false);
95
		m.save(false);
96
96
(-)src/org/eclipse/equinox/frameworkadmin/tests/FrameworkExtensionTest.java (-1 / +1 lines)
Lines 12-18 Link Here
12
12
13
import org.eclipse.core.runtime.FileLocator;
13
import org.eclipse.core.runtime.FileLocator;
14
import org.eclipse.core.runtime.URIUtil;
14
import org.eclipse.core.runtime.URIUtil;
15
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
15
import org.eclipse.equinox.frameworkadmin.BundleInfo;
16
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
16
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
17
import org.osgi.framework.Constants;
17
import org.osgi.framework.Constants;
18
18
(-)src/org/eclipse/equinox/frameworkadmin/tests/FwkAdminAndSimpleConfiguratorTest.java (+1 lines)
Lines 14-19 Link Here
14
import java.io.IOException;
14
import java.io.IOException;
15
import org.eclipse.core.runtime.FileLocator;
15
import org.eclipse.core.runtime.FileLocator;
16
import org.eclipse.core.runtime.URIUtil;
16
import org.eclipse.core.runtime.URIUtil;
17
import org.eclipse.equinox.frameworkadmin.BundleInfo;
17
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
18
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
18
import org.osgi.framework.BundleException;
19
import org.osgi.framework.BundleException;
19
20
(-)src/org/eclipse/equinox/frameworkadmin/tests/LauncherConfigLocationTest.java (+1 lines)
Lines 15-20 Link Here
15
import java.net.URISyntaxException;
15
import java.net.URISyntaxException;
16
import org.eclipse.core.runtime.FileLocator;
16
import org.eclipse.core.runtime.FileLocator;
17
import org.eclipse.core.runtime.URIUtil;
17
import org.eclipse.core.runtime.URIUtil;
18
import org.eclipse.equinox.frameworkadmin.BundleInfo;
18
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
19
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
19
import org.osgi.framework.BundleException;
20
import org.osgi.framework.BundleException;
20
21
(-)src/org/eclipse/equinox/frameworkadmin/tests/MacOSLikeSetup.java (+1 lines)
Lines 12-17 Link Here
12
import java.io.IOException;
12
import java.io.IOException;
13
import java.net.URISyntaxException;
13
import java.net.URISyntaxException;
14
import org.eclipse.core.runtime.FileLocator;
14
import org.eclipse.core.runtime.FileLocator;
15
import org.eclipse.equinox.frameworkadmin.BundleInfo;
15
import org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxConstants;
16
import org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxConstants;
16
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
17
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
17
import org.eclipse.osgi.service.environment.Constants;
18
import org.eclipse.osgi.service.environment.Constants;
(-)src/org/eclipse/equinox/frameworkadmin/tests/ManipulatorTests.java (+1 lines)
Lines 15-20 Link Here
15
import java.util.Properties;
15
import java.util.Properties;
16
import org.eclipse.core.runtime.FileLocator;
16
import org.eclipse.core.runtime.FileLocator;
17
import org.eclipse.core.runtime.URIUtil;
17
import org.eclipse.core.runtime.URIUtil;
18
import org.eclipse.equinox.frameworkadmin.BundleInfo;
18
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
19
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
19
20
20
public class ManipulatorTests extends AbstractFwkAdminTest {
21
public class ManipulatorTests extends AbstractFwkAdminTest {
(-)src/org/eclipse/equinox/frameworkadmin/tests/NoConfigurationValueInEclipseIni.java (+1 lines)
Lines 13-18 Link Here
13
import java.net.URISyntaxException;
13
import java.net.URISyntaxException;
14
import org.eclipse.core.runtime.FileLocator;
14
import org.eclipse.core.runtime.FileLocator;
15
import org.eclipse.core.runtime.URIUtil;
15
import org.eclipse.core.runtime.URIUtil;
16
import org.eclipse.equinox.frameworkadmin.BundleInfo;
16
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
17
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
17
import org.osgi.framework.BundleException;
18
import org.osgi.framework.BundleException;
18
19
(-)src/org/eclipse/equinox/frameworkadmin/tests/NoRenamingLauncherIni.java (+1 lines)
Lines 15-20 Link Here
15
import java.net.URISyntaxException;
15
import java.net.URISyntaxException;
16
import org.eclipse.core.runtime.FileLocator;
16
import org.eclipse.core.runtime.FileLocator;
17
import org.eclipse.core.runtime.URIUtil;
17
import org.eclipse.core.runtime.URIUtil;
18
import org.eclipse.equinox.frameworkadmin.BundleInfo;
18
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
19
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
19
import org.osgi.framework.BundleException;
20
import org.osgi.framework.BundleException;
20
21
(-)src/org/eclipse/equinox/frameworkadmin/tests/OSGiVersionChange.java (-1 / +3 lines)
Lines 14-20 Link Here
14
import java.net.URISyntaxException;
14
import java.net.URISyntaxException;
15
import org.eclipse.core.runtime.FileLocator;
15
import org.eclipse.core.runtime.FileLocator;
16
import org.eclipse.core.runtime.URIUtil;
16
import org.eclipse.core.runtime.URIUtil;
17
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
17
import org.eclipse.equinox.frameworkadmin.BundleInfo;
18
import org.eclipse.equinox.internal.provisional.frameworkadmin.FrameworkAdminRuntimeException;
19
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
18
import org.osgi.framework.BundleException;
20
import org.osgi.framework.BundleException;
19
21
20
public class OSGiVersionChange extends FwkAdminAndSimpleConfiguratorTest {
22
public class OSGiVersionChange extends FwkAdminAndSimpleConfiguratorTest {
(-)src/org/eclipse/equinox/frameworkadmin/tests/RelativePathTest.java (-1 / +2 lines)
Lines 15-20 Link Here
15
import java.net.URL;
15
import java.net.URL;
16
import org.eclipse.core.runtime.FileLocator;
16
import org.eclipse.core.runtime.FileLocator;
17
import org.eclipse.core.runtime.URIUtil;
17
import org.eclipse.core.runtime.URIUtil;
18
import org.eclipse.equinox.frameworkadmin.BundleInfo;
18
import org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxManipulatorImpl;
19
import org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxManipulatorImpl;
19
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
20
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
20
21
Lines 72-78 Link Here
72
		assertContent(new File(configurationFolder, "org.eclipse.equinox.simpleconfigurator/bundles.info"), "file:plugins/org.eclipse.equinox.simpleconfigurator.jar");
73
		assertContent(new File(configurationFolder, "org.eclipse.equinox.simpleconfigurator/bundles.info"), "file:plugins/org.eclipse.equinox.simpleconfigurator.jar");
73
		assertContent(new File(configurationFolder, "org.eclipse.equinox.simpleconfigurator/bundles.info"), "file:plugins/org.eclipse.osgi.jar");
74
		assertContent(new File(configurationFolder, "org.eclipse.equinox.simpleconfigurator/bundles.info"), "file:plugins/org.eclipse.osgi.jar");
74
75
75
		BundleInfo bi = new BundleInfo(URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/bundle_1"))), 2);
76
		BundleInfo bi = new BundleInfo(URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/bundle_1"))), 2, false);
76
		manipulator.getConfigData().addBundle(bi);
77
		manipulator.getConfigData().addBundle(bi);
77
		manipulator.save(false);
78
		manipulator.save(false);
78
		//		assertContent(new File(configurationFolder, "org.eclipse.equinox.simpleconfigurator/bundles.info"), FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/bundle_1")).toExternalForm());
79
		//		assertContent(new File(configurationFolder, "org.eclipse.equinox.simpleconfigurator/bundles.info"), FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/bundle_1")).toExternalForm());
(-)src/org/eclipse/equinox/frameworkadmin/tests/RemovingABundle.java (+1 lines)
Lines 14-19 Link Here
14
import java.io.IOException;
14
import java.io.IOException;
15
import org.eclipse.core.runtime.FileLocator;
15
import org.eclipse.core.runtime.FileLocator;
16
import org.eclipse.core.runtime.URIUtil;
16
import org.eclipse.core.runtime.URIUtil;
17
import org.eclipse.equinox.frameworkadmin.BundleInfo;
17
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
18
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
18
import org.osgi.framework.BundleException;
19
import org.osgi.framework.BundleException;
19
20
(-)src/org/eclipse/equinox/frameworkadmin/tests/RemovingAllBundles.java (+1 lines)
Lines 15-20 Link Here
15
import java.net.URISyntaxException;
15
import java.net.URISyntaxException;
16
import org.eclipse.core.runtime.FileLocator;
16
import org.eclipse.core.runtime.FileLocator;
17
import org.eclipse.core.runtime.URIUtil;
17
import org.eclipse.core.runtime.URIUtil;
18
import org.eclipse.equinox.frameworkadmin.BundleInfo;
18
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
19
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
19
import org.osgi.framework.BundleException;
20
import org.osgi.framework.BundleException;
20
21
(-)src/org/eclipse/equinox/frameworkadmin/tests/RenamingLauncherIni.java (+1 lines)
Lines 15-20 Link Here
15
import java.net.URISyntaxException;
15
import java.net.URISyntaxException;
16
import org.eclipse.core.runtime.FileLocator;
16
import org.eclipse.core.runtime.FileLocator;
17
import org.eclipse.core.runtime.URIUtil;
17
import org.eclipse.core.runtime.URIUtil;
18
import org.eclipse.equinox.frameworkadmin.BundleInfo;
18
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
19
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
19
import org.osgi.framework.BundleException;
20
import org.osgi.framework.BundleException;
20
21
(-)src/org/eclipse/equinox/frameworkadmin/tests/SimpleConfiguratorComingAndGoing.java (-1 / +2 lines)
Lines 15-20 Link Here
15
import java.net.URISyntaxException;
15
import java.net.URISyntaxException;
16
import org.eclipse.core.runtime.FileLocator;
16
import org.eclipse.core.runtime.FileLocator;
17
import org.eclipse.core.runtime.URIUtil;
17
import org.eclipse.core.runtime.URIUtil;
18
import org.eclipse.equinox.frameworkadmin.BundleInfo;
18
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
19
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
19
import org.osgi.framework.BundleException;
20
import org.osgi.framework.BundleException;
20
21
Lines 31-37 Link Here
31
	}
32
	}
32
33
33
	public void testWithMutipleBundles() throws IOException, BundleException, URISyntaxException {
34
	public void testWithMutipleBundles() throws IOException, BundleException, URISyntaxException {
34
		BundleInfo bi = new BundleInfo(URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/bundle_1"))), 2);
35
		BundleInfo bi = new BundleInfo(URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/bundle_1"))), 2, false);
35
		m.getConfigData().addBundle(bi);
36
		m.getConfigData().addBundle(bi);
36
		m.save(false);
37
		m.save(false);
37
38
(-)src/org/eclipse/equinox/frameworkadmin/tests/SimpleConfiguratorTest.java (+1 lines)
Lines 15-20 Link Here
15
import java.net.URISyntaxException;
15
import java.net.URISyntaxException;
16
import org.eclipse.core.runtime.FileLocator;
16
import org.eclipse.core.runtime.FileLocator;
17
import org.eclipse.core.runtime.URIUtil;
17
import org.eclipse.core.runtime.URIUtil;
18
import org.eclipse.equinox.frameworkadmin.BundleInfo;
18
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
19
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
19
import org.osgi.framework.BundleException;
20
import org.osgi.framework.BundleException;
20
21
(-)src/org/eclipse/equinox/frameworkadmin/tests/TestRunningInstance.java (-1 / +3 lines)
Lines 11-17 Link Here
11
package org.eclipse.equinox.frameworkadmin.tests;
11
package org.eclipse.equinox.frameworkadmin.tests;
12
12
13
import org.eclipse.core.runtime.Platform;
13
import org.eclipse.core.runtime.Platform;
14
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
14
import org.eclipse.equinox.frameworkadmin.BundleInfo;
15
import org.eclipse.equinox.internal.provisional.frameworkadmin.FrameworkAdmin;
16
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
15
import org.osgi.framework.*;
17
import org.osgi.framework.*;
16
18
17
public class TestRunningInstance extends AbstractFwkAdminTest {
19
public class TestRunningInstance extends AbstractFwkAdminTest {
(-)META-INF/MANIFEST.MF (-1 / +2 lines)
Lines 21-26 Link Here
21
Bundle-ActivationPolicy: lazy
21
Bundle-ActivationPolicy: lazy
22
Import-Package: javax.xml.parsers,
22
Import-Package: javax.xml.parsers,
23
 org.eclipse.equinox.app;version="1.0.0",
23
 org.eclipse.equinox.app;version="1.0.0",
24
 org.eclipse.equinox.frameworkadmin;version="[2.0.0,3.0.0)",
24
 org.eclipse.equinox.internal.frameworkadmin.equinox,
25
 org.eclipse.equinox.internal.frameworkadmin.equinox,
25
 org.eclipse.equinox.internal.frameworkadmin.utils,
26
 org.eclipse.equinox.internal.frameworkadmin.utils,
26
 org.eclipse.equinox.internal.p2.metadata,
27
 org.eclipse.equinox.internal.p2.metadata,
Lines 30-36 Link Here
30
 org.eclipse.equinox.internal.provisional.frameworkadmin,
31
 org.eclipse.equinox.internal.provisional.frameworkadmin,
31
 org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing,
32
 org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing,
32
 org.eclipse.equinox.internal.provisional.p2.metadata,
33
 org.eclipse.equinox.internal.provisional.p2.metadata,
33
 org.eclipse.equinox.internal.provisional.simpleconfigurator.manipulator,
34
 org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
34
 org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
35
 org.eclipse.equinox.p2.metadata.expression;version="[2.0.0,3.0.0)",
35
 org.eclipse.equinox.p2.metadata.expression;version="[2.0.0,3.0.0)",
36
 org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
36
 org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
Lines 38-43 Link Here
38
 org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
38
 org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
39
 org.eclipse.equinox.p2.repository.artifact.spi;version="[2.0.0,3.0.0)",
39
 org.eclipse.equinox.p2.repository.artifact.spi;version="[2.0.0,3.0.0)",
40
 org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)",
40
 org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)",
41
 org.eclipse.equinox.simpleconfigurator.manipulator;version="[2.0.0,3.0.0)",
41
 org.w3c.dom,
42
 org.w3c.dom,
42
 org.xml.sax,
43
 org.xml.sax,
43
 org.xml.sax.helpers
44
 org.xml.sax.helpers
(-)src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/EclipseInstallGeneratorInfoProvider.java (-2 / +3 lines)
Lines 14-29 Link Here
14
import java.io.IOException;
14
import java.io.IOException;
15
import java.net.*;
15
import java.net.*;
16
import java.util.*;
16
import java.util.*;
17
import org.eclipse.equinox.frameworkadmin.BundleInfo;
17
import org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxFwConfigFileParser;
18
import org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxFwConfigFileParser;
18
import org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxManipulatorImpl;
19
import org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxManipulatorImpl;
19
import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
20
import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
20
import org.eclipse.equinox.internal.p2.metadata.generator.Activator;
21
import org.eclipse.equinox.internal.p2.metadata.generator.Activator;
21
import org.eclipse.equinox.internal.p2.metadata.generator.Messages;
22
import org.eclipse.equinox.internal.p2.metadata.generator.Messages;
22
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
23
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
23
import org.eclipse.equinox.internal.provisional.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
24
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
24
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
25
import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
25
import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
26
import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
26
import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
27
import org.eclipse.equinox.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
27
import org.eclipse.osgi.service.environment.EnvironmentInfo;
28
import org.eclipse.osgi.service.environment.EnvironmentInfo;
28
import org.eclipse.osgi.util.NLS;
29
import org.eclipse.osgi.util.NLS;
29
import org.osgi.framework.*;
30
import org.osgi.framework.*;
Lines 274-280 Link Here
274
			try {
275
			try {
275
				//config.ini uses simpleconfigurator, read the bundles.info and replace the bundle infos
276
				//config.ini uses simpleconfigurator, read the bundles.info and replace the bundle infos
276
				SimpleConfiguratorManipulator simpleManipulator = (SimpleConfiguratorManipulator) ServiceHelper.getService(Activator.getContext(), SimpleConfiguratorManipulator.class.getName());
277
				SimpleConfiguratorManipulator simpleManipulator = (SimpleConfiguratorManipulator) ServiceHelper.getService(Activator.getContext(), SimpleConfiguratorManipulator.class.getName());
277
				BundleInfo[] bundleInfos = simpleManipulator.loadConfiguration(new URL(value), null);
278
				BundleInfo[] bundleInfos = simpleManipulator.loadConfiguration(new URL(value).openStream(), null);
278
				data.setBundles(bundleInfos);
279
				data.setBundles(bundleInfos);
279
			} catch (MalformedURLException e1) {
280
			} catch (MalformedURLException e1) {
280
				// ignore
281
				// ignore
(-)src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Generator.java (-8 / +12 lines)
Lines 10-32 Link Here
10
 *******************************************************************************/
10
 *******************************************************************************/
11
package org.eclipse.equinox.internal.provisional.p2.metadata.generator;
11
package org.eclipse.equinox.internal.provisional.p2.metadata.generator;
12
12
13
import org.eclipse.equinox.internal.p2.core.helpers.FileUtils.IPathComputer;
14
15
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription;
16
17
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
18
13
import java.io.*;
19
import java.io.*;
14
import java.net.URI;
20
import java.net.URI;
15
import java.net.URISyntaxException;
21
import java.net.URISyntaxException;
16
import java.util.*;
22
import java.util.*;
17
import java.util.Map.Entry;
18
import org.eclipse.core.runtime.*;
23
import org.eclipse.core.runtime.*;
24
import org.eclipse.equinox.frameworkadmin.BundleInfo;
19
import org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxConstants;
25
import org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxConstants;
20
import org.eclipse.equinox.internal.p2.core.helpers.*;
26
import org.eclipse.equinox.internal.p2.core.helpers.*;
21
import org.eclipse.equinox.internal.p2.core.helpers.FileUtils.IPathComputer;
22
import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
27
import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
23
import org.eclipse.equinox.internal.p2.metadata.generator.*;
28
import org.eclipse.equinox.internal.p2.metadata.generator.*;
24
import org.eclipse.equinox.internal.p2.metadata.generator.Messages;
29
import org.eclipse.equinox.internal.p2.metadata.generator.Messages;
25
import org.eclipse.equinox.internal.p2.metadata.generator.features.*;
30
import org.eclipse.equinox.internal.p2.metadata.generator.features.*;
26
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
31
import org.eclipse.equinox.internal.provisional.frameworkadmin.ConfigData;
27
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
32
import org.eclipse.equinox.internal.provisional.frameworkadmin.LauncherData;
28
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
33
import org.eclipse.equinox.internal.provisional.p2.metadata.*;
29
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription;
30
import org.eclipse.equinox.p2.core.ProvisionException;
34
import org.eclipse.equinox.p2.core.ProvisionException;
31
import org.eclipse.equinox.p2.metadata.*;
35
import org.eclipse.equinox.p2.metadata.*;
32
import org.eclipse.equinox.p2.metadata.VersionRange;
36
import org.eclipse.equinox.p2.metadata.VersionRange;
Lines 291-297 Link Here
291
		String configurationData = ""; //$NON-NLS-1$
295
		String configurationData = ""; //$NON-NLS-1$
292
		String unconfigurationData = ""; //$NON-NLS-1$
296
		String unconfigurationData = ""; //$NON-NLS-1$
293
		for (Iterator iterator = configData.getProperties().entrySet().iterator(); iterator.hasNext();) {
297
		for (Iterator iterator = configData.getProperties().entrySet().iterator(); iterator.hasNext();) {
294
			Entry aProperty = (Entry) iterator.next();
298
			Map.Entry aProperty = (Map.Entry) iterator.next();
295
			String key = ((String) aProperty.getKey());
299
			String key = ((String) aProperty.getKey());
296
			if (key.equals("osgi.frameworkClassPath") || key.equals("osgi.framework") || key.equals("osgi.bundles") || key.equals("eof")) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
300
			if (key.equals("osgi.frameworkClassPath") || key.equals("osgi.framework") || key.equals("osgi.bundles") || key.equals("eof")) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
297
				continue;
301
				continue;
Lines 299-305 Link Here
299
			unconfigurationData += "setProgramProperty(propName:" + key + ", propValue:);"; //$NON-NLS-1$ //$NON-NLS-2$
303
			unconfigurationData += "setProgramProperty(propName:" + key + ", propValue:);"; //$NON-NLS-1$ //$NON-NLS-2$
300
		}
304
		}
301
		for (Iterator iterator = configData.getProperties().entrySet().iterator(); iterator.hasNext();) {
305
		for (Iterator iterator = configData.getProperties().entrySet().iterator(); iterator.hasNext();) {
302
			Entry aProperty = (Entry) iterator.next();
306
			Map.Entry aProperty = (Map.Entry) iterator.next();
303
			String key = ((String) aProperty.getKey());
307
			String key = ((String) aProperty.getKey());
304
			if (key.equals("osgi.frameworkClassPath") || key.equals("osgi.framework") || key.equals("osgi.bundles") || key.equals("eof")) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
308
			if (key.equals("osgi.frameworkClassPath") || key.equals("osgi.framework") || key.equals("osgi.bundles") || key.equals("eof")) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
305
				continue;
309
				continue;
(-)src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/GeneratorBundleInfo.java (-1 / +1 lines)
Lines 10-16 Link Here
10
 *******************************************************************************/
10
 *******************************************************************************/
11
package org.eclipse.equinox.internal.provisional.p2.metadata.generator;
11
package org.eclipse.equinox.internal.provisional.p2.metadata.generator;
12
12
13
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
13
import org.eclipse.equinox.frameworkadmin.BundleInfo;
14
14
15
public class GeneratorBundleInfo extends BundleInfo {
15
public class GeneratorBundleInfo extends BundleInfo {
16
	//	public static final int NO_LEVEL = -1;
16
	//	public static final int NO_LEVEL = -1;
(-)src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/MetadataGeneratorHelper.java (-1 / +1 lines)
Lines 21-32 Link Here
21
import java.util.zip.ZipFile;
21
import java.util.zip.ZipFile;
22
import org.eclipse.core.runtime.Path;
22
import org.eclipse.core.runtime.Path;
23
import org.eclipse.core.runtime.URIUtil;
23
import org.eclipse.core.runtime.URIUtil;
24
import org.eclipse.equinox.frameworkadmin.BundleInfo;
24
import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
25
import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
25
import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
26
import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
26
import org.eclipse.equinox.internal.p2.metadata.generator.Activator;
27
import org.eclipse.equinox.internal.p2.metadata.generator.Activator;
27
import org.eclipse.equinox.internal.p2.metadata.generator.LocalizationHelper;
28
import org.eclipse.equinox.internal.p2.metadata.generator.LocalizationHelper;
28
import org.eclipse.equinox.internal.p2.metadata.generator.features.SiteCategory;
29
import org.eclipse.equinox.internal.p2.metadata.generator.features.SiteCategory;
29
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
30
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
30
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
31
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.*;
31
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.*;
32
import org.eclipse.equinox.p2.metadata.*;
32
import org.eclipse.equinox.p2.metadata.*;
(-)META-INF/MANIFEST.MF (-1 / +2 lines)
Lines 34-39 Link Here
34
Bundle-ActivationPolicy: lazy
34
Bundle-ActivationPolicy: lazy
35
Import-Package: javax.xml.parsers,
35
Import-Package: javax.xml.parsers,
36
 org.eclipse.equinox.app;version="1.0.0";resolution:=optional,
36
 org.eclipse.equinox.app;version="1.0.0";resolution:=optional,
37
 org.eclipse.equinox.frameworkadmin;version="[2.0.0,3.0.0)",
37
 org.eclipse.equinox.internal.frameworkadmin.equinox,
38
 org.eclipse.equinox.internal.frameworkadmin.equinox,
38
 org.eclipse.equinox.internal.frameworkadmin.utils,
39
 org.eclipse.equinox.internal.frameworkadmin.utils,
39
 org.eclipse.equinox.internal.p2.artifact.repository,
40
 org.eclipse.equinox.internal.p2.artifact.repository,
Lines 45-51 Link Here
45
 org.eclipse.equinox.internal.p2.metadata.repository,
46
 org.eclipse.equinox.internal.p2.metadata.repository,
46
 org.eclipse.equinox.internal.provisional.frameworkadmin,
47
 org.eclipse.equinox.internal.provisional.frameworkadmin,
47
 org.eclipse.equinox.internal.provisional.p2.metadata,
48
 org.eclipse.equinox.internal.provisional.p2.metadata,
48
 org.eclipse.equinox.internal.provisional.simpleconfigurator.manipulator,
49
 org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
49
 org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
50
 org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
50
 org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
51
 org.eclipse.equinox.p2.metadata.expression;version="[2.0.0,3.0.0)",
51
 org.eclipse.equinox.p2.metadata.expression;version="[2.0.0,3.0.0)",
Lines 55-60 Link Here
55
 org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
55
 org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
56
 org.eclipse.equinox.p2.repository.artifact.spi;version="[2.0.0,3.0.0)",
56
 org.eclipse.equinox.p2.repository.artifact.spi;version="[2.0.0,3.0.0)",
57
 org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)",
57
 org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)",
58
 org.eclipse.equinox.simpleconfigurator.manipulator;version="[2.0.0,3.0.0)",
58
 org.eclipse.osgi.service.datalocation;version="1.2.0",
59
 org.eclipse.osgi.service.datalocation;version="1.2.0",
59
 org.eclipse.osgi.service.environment;version="1.1.0",
60
 org.eclipse.osgi.service.environment;version="1.1.0",
60
 org.eclipse.osgi.service.pluginconversion;version="1.0.0",
61
 org.eclipse.osgi.service.pluginconversion;version="1.0.0",
(-)src/org/eclipse/equinox/internal/p2/publisher/eclipse/DataLoader.java (-2 / +4 lines)
Lines 14-26 Link Here
14
import java.net.*;
14
import java.net.*;
15
import org.eclipse.core.runtime.IStatus;
15
import org.eclipse.core.runtime.IStatus;
16
import org.eclipse.core.runtime.Status;
16
import org.eclipse.core.runtime.Status;
17
import org.eclipse.equinox.frameworkadmin.BundleInfo;
17
import org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxFwConfigFileParser;
18
import org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxFwConfigFileParser;
18
import org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxManipulatorImpl;
19
import org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxManipulatorImpl;
19
import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
20
import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
20
import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
21
import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
21
import org.eclipse.equinox.internal.p2.publisher.Activator;
22
import org.eclipse.equinox.internal.p2.publisher.Activator;
22
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
23
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
23
import org.eclipse.equinox.internal.provisional.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
24
import org.eclipse.equinox.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
24
import org.osgi.framework.Constants;
25
import org.osgi.framework.Constants;
25
26
26
public class DataLoader {
27
public class DataLoader {
Lines 86-92 Link Here
86
			try {
87
			try {
87
				//config.ini uses simpleconfigurator, read the bundles.info and replace the bundle infos
88
				//config.ini uses simpleconfigurator, read the bundles.info and replace the bundle infos
88
				SimpleConfiguratorManipulator simpleManipulator = (SimpleConfiguratorManipulator) ServiceHelper.getService(Activator.getContext(), SimpleConfiguratorManipulator.class.getName());
89
				SimpleConfiguratorManipulator simpleManipulator = (SimpleConfiguratorManipulator) ServiceHelper.getService(Activator.getContext(), SimpleConfiguratorManipulator.class.getName());
89
				BundleInfo[] bundleInfos = simpleManipulator.loadConfiguration(new URL(value), null);
90
				//input stream will be buffered and closed for us
91
				BundleInfo[] bundleInfos = simpleManipulator.loadConfiguration(new URL(value).openStream(), null);
90
				data.setBundles(bundleInfos);
92
				data.setBundles(bundleInfos);
91
			} catch (MalformedURLException e1) {
93
			} catch (MalformedURLException e1) {
92
				// ignore
94
				// ignore
(-)src/org/eclipse/equinox/internal/p2/publisher/eclipse/GeneratorBundleInfo.java (-1 / +1 lines)
Lines 10-16 Link Here
10
 *******************************************************************************/
10
 *******************************************************************************/
11
package org.eclipse.equinox.internal.p2.publisher.eclipse;
11
package org.eclipse.equinox.internal.p2.publisher.eclipse;
12
12
13
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
13
import org.eclipse.equinox.frameworkadmin.BundleInfo;
14
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
14
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
15
15
16
public class GeneratorBundleInfo extends BundleInfo {
16
public class GeneratorBundleInfo extends BundleInfo {
(-)src/org/eclipse/equinox/internal/p2/publisher/eclipse/IProductDescriptor.java (-1 / +1 lines)
Lines 13-19 Link Here
13
import java.io.File;
13
import java.io.File;
14
import java.util.List;
14
import java.util.List;
15
import java.util.Map;
15
import java.util.Map;
16
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
16
import org.eclipse.equinox.frameworkadmin.BundleInfo;
17
import org.eclipse.equinox.p2.metadata.IVersionedId;
17
import org.eclipse.equinox.p2.metadata.IVersionedId;
18
18
19
/**
19
/**
(-)src/org/eclipse/equinox/internal/p2/publisher/eclipse/ProductFile.java (-1 / +1 lines)
Lines 17-26 Link Here
17
import java.util.*;
17
import java.util.*;
18
import javax.xml.parsers.SAXParser;
18
import javax.xml.parsers.SAXParser;
19
import javax.xml.parsers.SAXParserFactory;
19
import javax.xml.parsers.SAXParserFactory;
20
import org.eclipse.equinox.frameworkadmin.BundleInfo;
20
import org.eclipse.equinox.internal.p2.core.helpers.*;
21
import org.eclipse.equinox.internal.p2.core.helpers.*;
21
import org.eclipse.equinox.internal.p2.metadata.VersionedId;
22
import org.eclipse.equinox.internal.p2.metadata.VersionedId;
22
import org.eclipse.equinox.internal.p2.publisher.Activator;
23
import org.eclipse.equinox.internal.p2.publisher.Activator;
23
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
24
import org.eclipse.equinox.p2.metadata.IVersionedId;
24
import org.eclipse.equinox.p2.metadata.IVersionedId;
25
import org.eclipse.osgi.service.datalocation.Location;
25
import org.eclipse.osgi.service.datalocation.Location;
26
import org.xml.sax.Attributes;
26
import org.xml.sax.Attributes;
(-)src/org/eclipse/equinox/p2/publisher/eclipse/BundlesAction.java (-4 / +5 lines)
Lines 10-15 Link Here
10
 ******************************************************************************/
10
 ******************************************************************************/
11
package org.eclipse.equinox.p2.publisher.eclipse;
11
package org.eclipse.equinox.p2.publisher.eclipse;
12
12
13
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
14
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription;
15
13
import java.io.*;
16
import java.io.*;
14
import java.util.*;
17
import java.util.*;
15
import java.util.Map.Entry;
18
import java.util.Map.Entry;
Lines 17-32 Link Here
17
import java.util.zip.ZipEntry;
20
import java.util.zip.ZipEntry;
18
import java.util.zip.ZipFile;
21
import java.util.zip.ZipFile;
19
import org.eclipse.core.runtime.*;
22
import org.eclipse.core.runtime.*;
23
import org.eclipse.equinox.frameworkadmin.BundleInfo;
20
import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
24
import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
21
import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
25
import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
22
import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
26
import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
23
import org.eclipse.equinox.internal.p2.publisher.Activator;
27
import org.eclipse.equinox.internal.p2.publisher.Activator;
24
import org.eclipse.equinox.internal.p2.publisher.Messages;
28
import org.eclipse.equinox.internal.p2.publisher.Messages;
25
import org.eclipse.equinox.internal.p2.publisher.eclipse.GeneratorBundleInfo;
29
import org.eclipse.equinox.internal.p2.publisher.eclipse.GeneratorBundleInfo;
26
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
30
import org.eclipse.equinox.internal.provisional.p2.metadata.*;
27
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
28
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
29
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription;
30
import org.eclipse.equinox.p2.metadata.*;
31
import org.eclipse.equinox.p2.metadata.*;
31
import org.eclipse.equinox.p2.metadata.Version;
32
import org.eclipse.equinox.p2.metadata.Version;
32
import org.eclipse.equinox.p2.metadata.VersionRange;
33
import org.eclipse.equinox.p2.metadata.VersionRange;
(-)src/org/eclipse/equinox/p2/publisher/eclipse/ConfigAdvice.java (-1 / +1 lines)
Lines 10-17 Link Here
10
package org.eclipse.equinox.p2.publisher.eclipse;
10
package org.eclipse.equinox.p2.publisher.eclipse;
11
11
12
import java.util.Map;
12
import java.util.Map;
13
import org.eclipse.equinox.frameworkadmin.BundleInfo;
13
import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
14
import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
14
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
15
import org.eclipse.equinox.internal.provisional.frameworkadmin.ConfigData;
15
import org.eclipse.equinox.internal.provisional.frameworkadmin.ConfigData;
16
import org.eclipse.equinox.p2.publisher.AbstractAdvice;
16
import org.eclipse.equinox.p2.publisher.AbstractAdvice;
17
17
(-)src/org/eclipse/equinox/p2/publisher/eclipse/ConfigCUsAction.java (-3 / +2 lines)
Lines 12-21 Link Here
12
12
13
import java.io.File;
13
import java.io.File;
14
import java.util.*;
14
import java.util.*;
15
import java.util.Map.Entry;
16
import org.eclipse.core.runtime.*;
15
import org.eclipse.core.runtime.*;
16
import org.eclipse.equinox.frameworkadmin.BundleInfo;
17
import org.eclipse.equinox.internal.p2.publisher.eclipse.GeneratorBundleInfo;
17
import org.eclipse.equinox.internal.p2.publisher.eclipse.GeneratorBundleInfo;
18
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
19
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
18
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
20
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
19
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
21
import org.eclipse.equinox.p2.metadata.*;
20
import org.eclipse.equinox.p2.metadata.*;
Lines 243-249 Link Here
243
		String unconfigurationData = ""; //$NON-NLS-1$
242
		String unconfigurationData = ""; //$NON-NLS-1$
244
		Set<String> properties = new HashSet<String>();
243
		Set<String> properties = new HashSet<String>();
245
		for (IConfigAdvice advice : configAdvice) {
244
		for (IConfigAdvice advice : configAdvice) {
246
			for (Entry<String, String> aProperty : advice.getProperties().entrySet()) {
245
			for (Map.Entry<String, String> aProperty : advice.getProperties().entrySet()) {
247
				String key = aProperty.getKey();
246
				String key = aProperty.getKey();
248
				if (shouldPublishProperty(key) && !properties.contains(key)) {
247
				if (shouldPublishProperty(key) && !properties.contains(key)) {
249
					properties.add(key);
248
					properties.add(key);
(-)src/org/eclipse/equinox/p2/publisher/eclipse/IConfigAdvice.java (-1 / +1 lines)
Lines 10-16 Link Here
10
package org.eclipse.equinox.p2.publisher.eclipse;
10
package org.eclipse.equinox.p2.publisher.eclipse;
11
11
12
import java.util.Map;
12
import java.util.Map;
13
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
13
import org.eclipse.equinox.frameworkadmin.BundleInfo;
14
import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
14
import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
15
15
16
public interface IConfigAdvice extends IPublisherAdvice {
16
public interface IConfigAdvice extends IPublisherAdvice {
(-)src/org/eclipse/equinox/p2/publisher/eclipse/ProductFileAdvice.java (-1 / +1 lines)
Lines 13-22 Link Here
13
13
14
import java.io.File;
14
import java.io.File;
15
import java.util.*;
15
import java.util.*;
16
import org.eclipse.equinox.frameworkadmin.BundleInfo;
16
import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
17
import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
17
import org.eclipse.equinox.internal.p2.publisher.eclipse.DataLoader;
18
import org.eclipse.equinox.internal.p2.publisher.eclipse.DataLoader;
18
import org.eclipse.equinox.internal.p2.publisher.eclipse.IProductDescriptor;
19
import org.eclipse.equinox.internal.p2.publisher.eclipse.IProductDescriptor;
19
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
20
import org.eclipse.equinox.internal.provisional.frameworkadmin.ConfigData;
20
import org.eclipse.equinox.internal.provisional.frameworkadmin.ConfigData;
21
import org.eclipse.equinox.p2.metadata.IVersionedId;
21
import org.eclipse.equinox.p2.metadata.IVersionedId;
22
import org.eclipse.equinox.p2.metadata.Version;
22
import org.eclipse.equinox.p2.metadata.Version;
(-)All p2 Tests.launch (-4 / +5 lines)
Lines 1-5 Link Here
1
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
1
<?xml version="1.0" encoding="UTF-8"?><launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
2
<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
3
<booleanAttribute key="append.args" value="true"/>
2
<booleanAttribute key="append.args" value="true"/>
4
<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
3
<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
5
<booleanAttribute key="askclear" value="false"/>
4
<booleanAttribute key="askclear" value="false"/>
Lines 53-70 Link Here
53
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
52
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
54
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
53
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
55
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
54
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
55
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/IBM-1.6.0-20090519-SR5"/>
56
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.equinox.p2.tests.AutomatedTests"/>
56
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.equinox.p2.tests.AutomatedTests"/>
57
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consolelog -console"/>
57
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consolelog -console"/>
58
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.equinox.p2.tests"/>
58
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.equinox.p2.tests"/>
59
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
59
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
60
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dorg.eclipse.equinox.p2.reconciler.tests.platform.archive=/home/thhal/Download/eclipse-platform-N20091109-2000-linux-gtk-x86_64.tar.gz&#13;&#10;-Dorg.eclipse.equinox.p2.reconciler.tests.35.platform.archive=/home/thhal/Download/eclipse-platform-3.5.1-linux-gtk-x86_64.tar.gz&#13;&#10;-Dorg.eclipse.equinox.p2.repository&#13;&#10;-Dorg.eclipse.equinox.p2.tests.current.build.repo=http://eclipsebuildserv/3.6-I-builds/&#13;&#13;&#10;-Xmx512m"/>
60
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dorg.eclipse.equinox.p2.reconciler.tests.platform.archive=c:/dev/platform/zips/eclipse-platform-I20100119-0800-win32.zip&#13;&#10;-Dorg.eclipse.equinox.p2.reconciler.tests.35.platform.archive=c:/dev/platform/zips/eclipse-platform-3.5-win32.zip&#13;&#10;-Dorg.eclipse.equinox.p2.repository&#13;&#10;-Dorg.eclipse.equinox.p2.tests.current.build.repo=http://eclipsebuildserv/3.6-I-builds/&#13;&#13;&#10;-Xmx512m"/>
61
<stringAttribute key="pde.version" value="3.3"/>
61
<stringAttribute key="pde.version" value="3.3"/>
62
<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
62
<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
63
<booleanAttribute key="run_in_ui_thread" value="true"/>
63
<booleanAttribute key="run_in_ui_thread" value="true"/>
64
<booleanAttribute key="show_selected_only" value="false"/>
64
<booleanAttribute key="show_selected_only" value="false"/>
65
<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
65
<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
66
<booleanAttribute key="tracing" value="false"/>
66
<booleanAttribute key="tracing" value="false"/>
67
<booleanAttribute key="useCustomFeatures" value="false"/>
67
<booleanAttribute key="useDefaultConfig" value="true"/>
68
<booleanAttribute key="useDefaultConfig" value="true"/>
68
<booleanAttribute key="useDefaultConfigArea" value="false"/>
69
<booleanAttribute key="useDefaultConfigArea" value="false"/>
69
<booleanAttribute key="useProduct" value="false"/>
70
<booleanAttribute key="useProduct" value="false"/>
70
</launchConfiguration>
71
</launchConfiguration>
(-)META-INF/MANIFEST.MF (-1 / +1 lines)
Lines 35-41 Link Here
35
 org.eclipse.equinox.p2.installer;bundle-version="[1.0.0,2.0.0)",
35
 org.eclipse.equinox.p2.installer;bundle-version="[1.0.0,2.0.0)",
36
 org.eclipse.equinox.simpleconfigurator;bundle-version="1.0.100",
36
 org.eclipse.equinox.simpleconfigurator;bundle-version="1.0.100",
37
 org.eclipse.equinox.p2.updatechecker;bundle-version="1.0.0",
37
 org.eclipse.equinox.p2.updatechecker;bundle-version="1.0.0",
38
 org.eclipse.equinox.simpleconfigurator.manipulator;bundle-version="1.0.100",
38
 org.eclipse.equinox.simpleconfigurator.manipulator;version="[2.0.0,3.0.0)",
39
 org.eclipse.equinox.p2.repository;bundle-version="1.0.0",
39
 org.eclipse.equinox.p2.repository;bundle-version="1.0.0",
40
 org.eclipse.equinox.p2.tests.verifier;bundle-version="1.0.0",
40
 org.eclipse.equinox.p2.tests.verifier;bundle-version="1.0.0",
41
 org.eclipse.equinox.security;bundle-version="1.0.0",
41
 org.eclipse.equinox.security;bundle-version="1.0.0",
(-)src/org/eclipse/equinox/p2/tests/publisher/actions/AccumulateConfigDataActionTest.java (-1 / +2 lines)
Lines 10-15 Link Here
10
 ******************************************************************************/
10
 ******************************************************************************/
11
package org.eclipse.equinox.p2.tests.publisher.actions;
11
package org.eclipse.equinox.p2.tests.publisher.actions;
12
12
13
import org.eclipse.equinox.frameworkadmin.BundleInfo;
14
13
import java.io.File;
15
import java.io.File;
14
import java.net.URI;
16
import java.net.URI;
15
import java.net.URISyntaxException;
17
import java.net.URISyntaxException;
Lines 19-25 Link Here
19
import org.easymock.EasyMock;
21
import org.easymock.EasyMock;
20
import org.eclipse.core.runtime.NullProgressMonitor;
22
import org.eclipse.core.runtime.NullProgressMonitor;
21
import org.eclipse.core.runtime.Path;
23
import org.eclipse.core.runtime.Path;
22
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
23
import org.eclipse.equinox.internal.provisional.frameworkadmin.ConfigData;
24
import org.eclipse.equinox.internal.provisional.frameworkadmin.ConfigData;
24
import org.eclipse.equinox.p2.publisher.eclipse.*;
25
import org.eclipse.equinox.p2.publisher.eclipse.*;
25
import org.eclipse.equinox.p2.tests.TestActivator;
26
import org.eclipse.equinox.p2.tests.TestActivator;
(-)src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionTest.java (-1 / +2 lines)
Lines 12-17 Link Here
12
12
13
import static org.easymock.EasyMock.*;
13
import static org.easymock.EasyMock.*;
14
14
15
import org.eclipse.equinox.frameworkadmin.BundleInfo;
16
15
import java.io.File;
17
import java.io.File;
16
import java.io.IOException;
18
import java.io.IOException;
17
import java.util.Collection;
19
import java.util.Collection;
Lines 21-27 Link Here
21
import org.eclipse.core.runtime.NullProgressMonitor;
23
import org.eclipse.core.runtime.NullProgressMonitor;
22
import org.eclipse.equinox.internal.p2.metadata.RequiredCapability;
24
import org.eclipse.equinox.internal.p2.metadata.RequiredCapability;
23
import org.eclipse.equinox.internal.p2.publisher.eclipse.ProductFile;
25
import org.eclipse.equinox.internal.p2.publisher.eclipse.ProductFile;
24
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
25
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
26
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
26
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
27
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
27
import org.eclipse.equinox.p2.metadata.*;
28
import org.eclipse.equinox.p2.metadata.*;
(-)src/org/eclipse/equinox/p2/tests/publisher/actions/ProductFileAdviceTest.java (-1 / +2 lines)
Lines 10-20 Link Here
10
******************************************************************************/
10
******************************************************************************/
11
package org.eclipse.equinox.p2.tests.publisher.actions;
11
package org.eclipse.equinox.p2.tests.publisher.actions;
12
12
13
import org.eclipse.equinox.frameworkadmin.BundleInfo;
14
13
import java.io.File;
15
import java.io.File;
14
import java.util.Map;
16
import java.util.Map;
15
import java.util.Properties;
17
import java.util.Properties;
16
import org.eclipse.equinox.internal.p2.publisher.eclipse.ProductFile;
18
import org.eclipse.equinox.internal.p2.publisher.eclipse.ProductFile;
17
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
18
import org.eclipse.equinox.p2.publisher.eclipse.ProductFileAdvice;
19
import org.eclipse.equinox.p2.publisher.eclipse.ProductFileAdvice;
19
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
20
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
20
import org.eclipse.equinox.p2.tests.TestData;
21
import org.eclipse.equinox.p2.tests.TestData;
(-)src/org/eclipse/equinox/p2/tests/publisher/actions/ProductFileTest.java (-1 / +1 lines)
Lines 12-19 Link Here
12
import java.util.List;
12
import java.util.List;
13
import java.util.Map;
13
import java.util.Map;
14
import junit.framework.TestCase;
14
import junit.framework.TestCase;
15
import org.eclipse.equinox.frameworkadmin.BundleInfo;
15
import org.eclipse.equinox.internal.p2.publisher.eclipse.ProductFile;
16
import org.eclipse.equinox.internal.p2.publisher.eclipse.ProductFile;
16
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
17
import org.eclipse.equinox.p2.metadata.IVersionedId;
17
import org.eclipse.equinox.p2.metadata.IVersionedId;
18
import org.eclipse.equinox.p2.metadata.Version;
18
import org.eclipse.equinox.p2.metadata.Version;
19
import org.eclipse.equinox.p2.tests.TestData;
19
import org.eclipse.equinox.p2.tests.TestData;
(-)src/org/eclipse/equinox/p2/tests/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorTests.java (-9 / +11 lines)
Lines 12-22 Link Here
12
package org.eclipse.equinox.p2.tests.simpleconfigurator.manipulator;
12
package org.eclipse.equinox.p2.tests.simpleconfigurator.manipulator;
13
13
14
import java.io.File;
14
import java.io.File;
15
import java.io.FileInputStream;
15
import java.net.URI;
16
import java.net.URI;
16
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
17
import org.eclipse.equinox.frameworkadmin.BundleInfo;
17
import org.eclipse.equinox.internal.provisional.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
18
import org.eclipse.equinox.internal.simpleconfigurator.manipulator.SimpleConfiguratorManipulatorImpl;
18
import org.eclipse.equinox.internal.simpleconfigurator.manipulator.SimpleConfiguratorManipulatorImpl;
19
import org.eclipse.equinox.internal.simpleconfigurator.utils.URIUtil;
19
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
20
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
21
import org.eclipse.equinox.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
20
22
21
public class SimpleConfiguratorManipulatorTests extends AbstractProvisioningTest {
23
public class SimpleConfiguratorManipulatorTests extends AbstractProvisioningTest {
22
24
Lines 24-49 Link Here
24
		File folder = getTestFolder("saveConfiguration");
26
		File folder = getTestFolder("saveConfiguration");
25
		File infoFile = new File(folder, "bundle.info");
27
		File infoFile = new File(folder, "bundle.info");
26
28
27
		File baseFile = getTempFolder();
29
		URI baseFile = getTempFolder().toURI();
28
30
29
		//absolute location written with base
31
		//absolute location written with base
30
		BundleInfo[] bundles = new BundleInfo[] {new BundleInfo("a", "1.0.0", new File(folder, "plugins/a_1.0.0.jar").toURI(), BundleInfo.NO_LEVEL, false)};
32
		BundleInfo[] bundles = new BundleInfo[] {new BundleInfo("a", "1.0.0", new File(folder, "plugins/a_1.0.0.jar").toURI(), BundleInfo.NO_LEVEL, false)};
31
		SimpleConfiguratorManipulator manipulator = new SimpleConfiguratorManipulatorImpl();
33
		SimpleConfiguratorManipulator manipulator = new SimpleConfiguratorManipulatorImpl();
32
		manipulator.saveConfiguration(bundles, infoFile, folder);
34
		manipulator.saveConfiguration(bundles, infoFile, folder.toURI());
33
		bundles = manipulator.loadConfiguration(infoFile.toURL(), baseFile);
35
		bundles = manipulator.loadConfiguration(new FileInputStream(infoFile), baseFile);
34
		assertEquals(bundles[0].getLocation(), new File(baseFile, "plugins/a_1.0.0.jar").toURI());
36
		assertEquals(bundles[0].getLocation(), URIUtil.append(baseFile, "plugins/a_1.0.0.jar"));
35
37
36
		//relative location written with null base
38
		//relative location written with null base
37
		bundles = new BundleInfo[] {new BundleInfo("b", "1.0.0", new URI("plugins/b_1.0.0.jar"), BundleInfo.NO_LEVEL, false)};
39
		bundles = new BundleInfo[] {new BundleInfo("b", "1.0.0", new URI("plugins/b_1.0.0.jar"), BundleInfo.NO_LEVEL, false)};
38
		manipulator.saveConfiguration(bundles, infoFile, null);
40
		manipulator.saveConfiguration(bundles, infoFile, null);
39
		bundles = manipulator.loadConfiguration(infoFile.toURL(), baseFile);
41
		bundles = manipulator.loadConfiguration(new FileInputStream(infoFile), baseFile);
40
		assertEquals(bundles[0].getLocation(), new File(baseFile, "plugins/b_1.0.0.jar").toURI());
42
		assertEquals(bundles[0].getLocation(), URIUtil.append(baseFile, "plugins/b_1.0.0.jar"));
41
43
42
		//absolute location written with null base
44
		//absolute location written with null base
43
		URI absolute = new File(folder, "plugins/c_1.0.0.jar").toURI();
45
		URI absolute = new File(folder, "plugins/c_1.0.0.jar").toURI();
44
		bundles = new BundleInfo[] {new BundleInfo("c", "1.0.0", absolute, BundleInfo.NO_LEVEL, false)};
46
		bundles = new BundleInfo[] {new BundleInfo("c", "1.0.0", absolute, BundleInfo.NO_LEVEL, false)};
45
		manipulator.saveConfiguration(bundles, infoFile, null);
47
		manipulator.saveConfiguration(bundles, infoFile, null);
46
		bundles = manipulator.loadConfiguration(infoFile.toURL(), baseFile);
48
		bundles = manipulator.loadConfiguration(new FileInputStream(infoFile), baseFile);
47
		assertEquals(bundles[0].getLocation(), absolute);
49
		assertEquals(bundles[0].getLocation(), absolute);
48
	}
50
	}
49
}
51
}
(-)src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddSourceBundleActionTest.java (-1 / +1 lines)
Lines 14-24 Link Here
14
import java.io.IOException;
14
import java.io.IOException;
15
import java.net.URI;
15
import java.net.URI;
16
import java.util.*;
16
import java.util.*;
17
import org.eclipse.equinox.frameworkadmin.BundleInfo;
17
import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
18
import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
18
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.*;
19
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.*;
19
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.ActionConstants;
20
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.ActionConstants;
20
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.AddSourceBundleAction;
21
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.AddSourceBundleAction;
21
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
22
import org.eclipse.equinox.p2.engine.IProfile;
22
import org.eclipse.equinox.p2.engine.IProfile;
23
import org.eclipse.equinox.p2.metadata.IArtifactKey;
23
import org.eclipse.equinox.p2.metadata.IArtifactKey;
24
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
24
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
(-)src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/InstallBundleActionTest.java (-1 / +1 lines)
Lines 13-24 Link Here
13
import java.io.File;
13
import java.io.File;
14
import java.net.URI;
14
import java.net.URI;
15
import java.util.*;
15
import java.util.*;
16
import org.eclipse.equinox.frameworkadmin.BundleInfo;
16
import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
17
import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
17
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
18
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
18
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
19
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
19
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.ActionConstants;
20
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.ActionConstants;
20
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.InstallBundleAction;
21
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.InstallBundleAction;
21
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
22
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
22
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
23
import org.eclipse.equinox.p2.engine.IProfile;
23
import org.eclipse.equinox.p2.engine.IProfile;
24
import org.eclipse.equinox.p2.metadata.IArtifactKey;
24
import org.eclipse.equinox.p2.metadata.IArtifactKey;
(-)src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/MarkStartedActionTest.java (-1 / +1 lines)
Lines 13-24 Link Here
13
import java.io.File;
13
import java.io.File;
14
import java.net.URI;
14
import java.net.URI;
15
import java.util.*;
15
import java.util.*;
16
import org.eclipse.equinox.frameworkadmin.BundleInfo;
16
import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
17
import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
17
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
18
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
18
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
19
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
19
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.ActionConstants;
20
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.ActionConstants;
20
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.MarkStartedAction;
21
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.MarkStartedAction;
21
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
22
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
22
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
23
import org.eclipse.equinox.p2.engine.IProfile;
23
import org.eclipse.equinox.p2.engine.IProfile;
24
import org.eclipse.equinox.p2.metadata.IArtifactKey;
24
import org.eclipse.equinox.p2.metadata.IArtifactKey;
(-)src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveSourceBundleActionTest.java (-1 / +1 lines)
Lines 14-24 Link Here
14
import java.io.IOException;
14
import java.io.IOException;
15
import java.net.URI;
15
import java.net.URI;
16
import java.util.*;
16
import java.util.*;
17
import org.eclipse.equinox.frameworkadmin.BundleInfo;
17
import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
18
import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
18
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.*;
19
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.*;
19
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.ActionConstants;
20
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.ActionConstants;
20
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.RemoveSourceBundleAction;
21
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.RemoveSourceBundleAction;
21
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
22
import org.eclipse.equinox.p2.engine.IProfile;
22
import org.eclipse.equinox.p2.engine.IProfile;
23
import org.eclipse.equinox.p2.metadata.IArtifactKey;
23
import org.eclipse.equinox.p2.metadata.IArtifactKey;
24
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
24
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
(-)src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetLauncherNameActionTest.java (-1 / +1 lines)
Lines 10-20 Link Here
10
10
11
import java.io.File;
11
import java.io.File;
12
import java.util.*;
12
import java.util.*;
13
import org.eclipse.equinox.frameworkadmin.BundleInfo;
13
import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
14
import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
14
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
15
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
15
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.ActionConstants;
16
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.ActionConstants;
16
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.SetLauncherNameAction;
17
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.SetLauncherNameAction;
17
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
18
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
18
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
19
import org.eclipse.equinox.p2.engine.IProfile;
19
import org.eclipse.equinox.p2.engine.IProfile;
20
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
20
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
(-)src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetStartLevelActionTest.java (-1 / +1 lines)
Lines 13-24 Link Here
13
import java.io.File;
13
import java.io.File;
14
import java.net.URI;
14
import java.net.URI;
15
import java.util.*;
15
import java.util.*;
16
import org.eclipse.equinox.frameworkadmin.BundleInfo;
16
import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
17
import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
17
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
18
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
18
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
19
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
19
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.ActionConstants;
20
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.ActionConstants;
20
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.SetStartLevelAction;
21
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.SetStartLevelAction;
21
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
22
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
22
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
23
import org.eclipse.equinox.p2.engine.IProfile;
23
import org.eclipse.equinox.p2.engine.IProfile;
24
import org.eclipse.equinox.p2.metadata.IArtifactKey;
24
import org.eclipse.equinox.p2.metadata.IArtifactKey;
(-)src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/UninstallBundleActionTest.java (-1 / +1 lines)
Lines 13-24 Link Here
13
import java.io.File;
13
import java.io.File;
14
import java.net.URI;
14
import java.net.URI;
15
import java.util.*;
15
import java.util.*;
16
import org.eclipse.equinox.frameworkadmin.BundleInfo;
16
import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
17
import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
17
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
18
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
18
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
19
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
19
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.ActionConstants;
20
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.ActionConstants;
20
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.UninstallBundleAction;
21
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.UninstallBundleAction;
21
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
22
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
22
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
23
import org.eclipse.equinox.p2.engine.IProfile;
23
import org.eclipse.equinox.p2.engine.IProfile;
24
import org.eclipse.equinox.p2.metadata.IArtifactKey;
24
import org.eclipse.equinox.p2.metadata.IArtifactKey;
(-)META-INF/MANIFEST.MF (+1 lines)
Lines 17-22 Link Here
17
Bundle-ActivationPolicy: lazy
17
Bundle-ActivationPolicy: lazy
18
Import-Package: javax.xml.parsers,
18
Import-Package: javax.xml.parsers,
19
 org.eclipse.core.runtime.preferences;version="3.2.0",
19
 org.eclipse.core.runtime.preferences;version="3.2.0",
20
 org.eclipse.equinox.frameworkadmin;version="[2.0.0,3.0.0)",
20
 org.eclipse.equinox.internal.p2.core.helpers,
21
 org.eclipse.equinox.internal.p2.core.helpers,
21
 org.eclipse.equinox.internal.p2.engine,
22
 org.eclipse.equinox.internal.p2.engine,
22
 org.eclipse.equinox.internal.p2.garbagecollector,
23
 org.eclipse.equinox.internal.p2.garbagecollector,
(-)src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseMarkSetProvider.java (-3 / +2 lines)
Lines 10-30 Link Here
10
 *******************************************************************************/
10
 *******************************************************************************/
11
package org.eclipse.equinox.internal.p2.touchpoint.eclipse;
11
package org.eclipse.equinox.internal.p2.touchpoint.eclipse;
12
12
13
import org.eclipse.equinox.p2.query.QueryUtil;
14
15
import java.io.File;
13
import java.io.File;
16
import java.util.*;
14
import java.util.*;
15
import org.eclipse.equinox.frameworkadmin.BundleInfo;
17
import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
16
import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
18
import org.eclipse.equinox.internal.p2.garbagecollector.MarkSet;
17
import org.eclipse.equinox.internal.p2.garbagecollector.MarkSet;
19
import org.eclipse.equinox.internal.p2.garbagecollector.MarkSetProvider;
18
import org.eclipse.equinox.internal.p2.garbagecollector.MarkSetProvider;
20
import org.eclipse.equinox.internal.p2.update.*;
19
import org.eclipse.equinox.internal.p2.update.*;
21
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
22
import org.eclipse.equinox.p2.core.IProvisioningAgent;
20
import org.eclipse.equinox.p2.core.IProvisioningAgent;
23
import org.eclipse.equinox.p2.core.ProvisionException;
21
import org.eclipse.equinox.p2.core.ProvisionException;
24
import org.eclipse.equinox.p2.engine.IProfile;
22
import org.eclipse.equinox.p2.engine.IProfile;
25
import org.eclipse.equinox.p2.engine.IProfileRegistry;
23
import org.eclipse.equinox.p2.engine.IProfileRegistry;
26
import org.eclipse.equinox.p2.metadata.*;
24
import org.eclipse.equinox.p2.metadata.*;
27
import org.eclipse.equinox.p2.query.IQueryResult;
25
import org.eclipse.equinox.p2.query.IQueryResult;
26
import org.eclipse.equinox.p2.query.QueryUtil;
28
import org.eclipse.equinox.p2.repository.artifact.ArtifactKeyQuery;
27
import org.eclipse.equinox.p2.repository.artifact.ArtifactKeyQuery;
29
import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
28
import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
30
29
(-)src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/LazyManipulator.java (+1 lines)
Lines 11-16 Link Here
11
package org.eclipse.equinox.internal.p2.touchpoint.eclipse;
11
package org.eclipse.equinox.internal.p2.touchpoint.eclipse;
12
12
13
import java.io.IOException;
13
import java.io.IOException;
14
import org.eclipse.equinox.frameworkadmin.BundleInfo;
14
import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
15
import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
15
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
16
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
16
import org.eclipse.equinox.p2.core.IProvisioningAgent;
17
import org.eclipse.equinox.p2.core.IProvisioningAgent;
(-)src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/PlatformConfigurationWrapper.java (-1 / +1 lines)
Lines 14-22 Link Here
14
import java.net.*;
14
import java.net.*;
15
import java.util.List;
15
import java.util.List;
16
import org.eclipse.core.runtime.*;
16
import org.eclipse.core.runtime.*;
17
import org.eclipse.equinox.frameworkadmin.BundleInfo;
17
import org.eclipse.equinox.internal.p2.core.helpers.URLUtil;
18
import org.eclipse.equinox.internal.p2.core.helpers.URLUtil;
18
import org.eclipse.equinox.internal.p2.update.*;
19
import org.eclipse.equinox.internal.p2.update.*;
19
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
20
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
20
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
21
import org.eclipse.equinox.p2.core.ProvisionException;
21
import org.eclipse.equinox.p2.core.ProvisionException;
22
import org.eclipse.osgi.util.NLS;
22
import org.eclipse.osgi.util.NLS;
(-)src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/SourceManipulator.java (-6 / +6 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2008 IBM Corporation and others. All rights reserved. This
2
 * Copyright (c) 2008, 2010 IBM Corporation and others. All rights reserved. This
3
 * program and the accompanying materials are made available under the terms of
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
4
 * the Eclipse Public License v1.0 which accompanies this distribution, and is
5
 * available at http://www.eclipse.org/legal/epl-v10.html
5
 * available at http://www.eclipse.org/legal/epl-v10.html
Lines 8-18 Link Here
8
 ******************************************************************************/
8
 ******************************************************************************/
9
package org.eclipse.equinox.internal.p2.touchpoint.eclipse;
9
package org.eclipse.equinox.internal.p2.touchpoint.eclipse;
10
10
11
import java.io.File;
11
import java.io.*;
12
import java.io.IOException;
13
import java.net.MalformedURLException;
12
import java.net.MalformedURLException;
14
import java.util.*;
13
import java.util.*;
15
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
14
import org.eclipse.equinox.frameworkadmin.BundleInfo;
16
import org.eclipse.equinox.internal.simpleconfigurator.manipulator.SimpleConfiguratorManipulatorImpl;
15
import org.eclipse.equinox.internal.simpleconfigurator.manipulator.SimpleConfiguratorManipulatorImpl;
17
import org.eclipse.equinox.p2.engine.IProfile;
16
import org.eclipse.equinox.p2.engine.IProfile;
18
import org.eclipse.equinox.p2.metadata.Version;
17
import org.eclipse.equinox.p2.metadata.Version;
Lines 58-69 Link Here
58
57
59
	public void save() throws IOException {
58
	public void save() throws IOException {
60
		if (sourceBundles != null)
59
		if (sourceBundles != null)
61
			manipulator.saveConfiguration(sourceBundles.toArray(new BundleInfo[sourceBundles.size()]), getFileLocation(), getLauncherLocation());
60
			manipulator.saveConfiguration(sourceBundles.toArray(new BundleInfo[sourceBundles.size()]), getFileLocation(), getLauncherLocation().toURI());
62
	}
61
	}
63
62
64
	private void load() throws MalformedURLException, IOException {
63
	private void load() throws MalformedURLException, IOException {
65
		if (getFileLocation().exists())
64
		if (getFileLocation().exists())
66
			sourceBundles = new ArrayList<BundleInfo>(Arrays.asList(manipulator.loadConfiguration(getFileLocation().toURL(), getLauncherLocation())));
65
			//input stream is bufferd and closed for us
66
			sourceBundles = new ArrayList<BundleInfo>(Arrays.asList(manipulator.loadConfiguration(new FileInputStream(getFileLocation()), getLauncherLocation().toURI())));
67
		else
67
		else
68
			sourceBundles = new ArrayList<BundleInfo>();
68
			sourceBundles = new ArrayList<BundleInfo>();
69
	}
69
	}
(-)src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Util.java (-1 / +1 lines)
Lines 16-23 Link Here
16
import java.net.*;
16
import java.net.*;
17
import java.util.*;
17
import java.util.*;
18
import org.eclipse.core.runtime.*;
18
import org.eclipse.core.runtime.*;
19
import org.eclipse.equinox.frameworkadmin.BundleInfo;
19
import org.eclipse.equinox.internal.p2.core.helpers.*;
20
import org.eclipse.equinox.internal.p2.core.helpers.*;
20
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
21
import org.eclipse.equinox.p2.core.*;
21
import org.eclipse.equinox.p2.core.*;
22
import org.eclipse.equinox.p2.engine.IProfile;
22
import org.eclipse.equinox.p2.engine.IProfile;
23
import org.eclipse.equinox.p2.metadata.*;
23
import org.eclipse.equinox.p2.metadata.*;
(-)src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/WhatIsRunning.java (-1 / +3 lines)
Lines 8-14 Link Here
8
 ******************************************************************************/
8
 ******************************************************************************/
9
package org.eclipse.equinox.internal.p2.touchpoint.eclipse;
9
package org.eclipse.equinox.internal.p2.touchpoint.eclipse;
10
10
11
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
11
import org.eclipse.equinox.frameworkadmin.BundleInfo;
12
import org.eclipse.equinox.internal.provisional.frameworkadmin.FrameworkAdmin;
13
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
12
14
13
public class WhatIsRunning {
15
public class WhatIsRunning {
14
	public BundleInfo[] getBundlesBeingRun() {
16
	public BundleInfo[] getBundlesBeingRun() {
(-)src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/InstallBundleAction.java (-3 / +2 lines)
Lines 8-29 Link Here
8
 ******************************************************************************/
8
 ******************************************************************************/
9
package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
9
package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
10
10
11
import org.eclipse.equinox.p2.query.QueryUtil;
12
13
import java.io.File;
11
import java.io.File;
14
import java.util.Collection;
12
import java.util.Collection;
15
import java.util.Map;
13
import java.util.Map;
16
import org.eclipse.core.runtime.IStatus;
14
import org.eclipse.core.runtime.IStatus;
17
import org.eclipse.core.runtime.Status;
15
import org.eclipse.core.runtime.Status;
16
import org.eclipse.equinox.frameworkadmin.BundleInfo;
18
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
17
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
19
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
18
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
20
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
21
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
19
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
22
import org.eclipse.equinox.p2.core.IProvisioningAgent;
20
import org.eclipse.equinox.p2.core.IProvisioningAgent;
23
import org.eclipse.equinox.p2.engine.IProfile;
21
import org.eclipse.equinox.p2.engine.IProfile;
24
import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
22
import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
25
import org.eclipse.equinox.p2.metadata.IArtifactKey;
23
import org.eclipse.equinox.p2.metadata.IArtifactKey;
26
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
24
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
25
import org.eclipse.equinox.p2.query.QueryUtil;
27
import org.eclipse.osgi.util.NLS;
26
import org.eclipse.osgi.util.NLS;
28
27
29
public class InstallBundleAction extends ProvisioningAction {
28
public class InstallBundleAction extends ProvisioningAction {
(-)src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/MarkStartedAction.java (-1 / +2 lines)
Lines 10-15 Link Here
10
 *******************************************************************************/
10
 *******************************************************************************/
11
package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
11
package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
12
12
13
import org.eclipse.equinox.frameworkadmin.BundleInfo;
14
13
import java.io.File;
15
import java.io.File;
14
import java.util.Collection;
16
import java.util.Collection;
15
import java.util.Map;
17
import java.util.Map;
Lines 17-23 Link Here
17
import org.eclipse.core.runtime.Status;
19
import org.eclipse.core.runtime.Status;
18
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
20
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
19
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
21
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
20
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
21
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
22
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
22
import org.eclipse.equinox.p2.core.IProvisioningAgent;
23
import org.eclipse.equinox.p2.core.IProvisioningAgent;
23
import org.eclipse.equinox.p2.engine.IProfile;
24
import org.eclipse.equinox.p2.engine.IProfile;
(-)src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetStartLevelAction.java (-1 / +2 lines)
Lines 10-15 Link Here
10
 *******************************************************************************/
10
 *******************************************************************************/
11
package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
11
package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
12
12
13
import org.eclipse.equinox.frameworkadmin.BundleInfo;
14
13
import java.io.File;
15
import java.io.File;
14
import java.util.Collection;
16
import java.util.Collection;
15
import java.util.Map;
17
import java.util.Map;
Lines 17-23 Link Here
17
import org.eclipse.core.runtime.Status;
19
import org.eclipse.core.runtime.Status;
18
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
20
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
19
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
21
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
20
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
21
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
22
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
22
import org.eclipse.equinox.p2.core.IProvisioningAgent;
23
import org.eclipse.equinox.p2.core.IProvisioningAgent;
23
import org.eclipse.equinox.p2.engine.IProfile;
24
import org.eclipse.equinox.p2.engine.IProfile;
(-)src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/UninstallBundleAction.java (-3 / +2 lines)
Lines 8-29 Link Here
8
 ******************************************************************************/
8
 ******************************************************************************/
9
package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
9
package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
10
10
11
import org.eclipse.equinox.p2.query.QueryUtil;
12
13
import java.io.File;
11
import java.io.File;
14
import java.util.Collection;
12
import java.util.Collection;
15
import java.util.Map;
13
import java.util.Map;
16
import org.eclipse.core.runtime.IStatus;
14
import org.eclipse.core.runtime.IStatus;
17
import org.eclipse.core.runtime.Status;
15
import org.eclipse.core.runtime.Status;
16
import org.eclipse.equinox.frameworkadmin.BundleInfo;
18
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
17
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
19
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
18
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
20
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
21
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
19
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
22
import org.eclipse.equinox.p2.core.IProvisioningAgent;
20
import org.eclipse.equinox.p2.core.IProvisioningAgent;
23
import org.eclipse.equinox.p2.engine.IProfile;
21
import org.eclipse.equinox.p2.engine.IProfile;
24
import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
22
import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
25
import org.eclipse.equinox.p2.metadata.IArtifactKey;
23
import org.eclipse.equinox.p2.metadata.IArtifactKey;
26
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
24
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
25
import org.eclipse.equinox.p2.query.QueryUtil;
27
import org.eclipse.osgi.util.NLS;
26
import org.eclipse.osgi.util.NLS;
28
27
29
public class UninstallBundleAction extends ProvisioningAction {
28
public class UninstallBundleAction extends ProvisioningAction {
(-)src/org/eclipse/equinox/internal/simpleconfigurator/utils/EquinoxUtils.java (-15 / +19 lines)
Lines 18-23 Link Here
18
public class EquinoxUtils {
18
public class EquinoxUtils {
19
19
20
	public static URL[] getConfigAreaURL(BundleContext context) {
20
	public static URL[] getConfigAreaURL(BundleContext context) {
21
		Location configLocation = getConfigLocation(context);
22
		if (configLocation == null)
23
			return null;
24
25
		URL baseURL = configLocation.getURL();
26
		if (configLocation.getParentLocation() != null && configLocation.getURL() != null) {
27
			if (baseURL == null)
28
				return new URL[] {configLocation.getParentLocation().getURL()};
29
			else
30
				return new URL[] {baseURL, configLocation.getParentLocation().getURL()};
31
		}
32
		if (baseURL != null)
33
			return new URL[] {baseURL};
34
35
		return null;
36
	}
37
38
	public static Location getConfigLocation(BundleContext context) {
21
		Filter filter = null;
39
		Filter filter = null;
22
		try {
40
		try {
23
			filter = context.createFilter(Location.CONFIGURATION_FILTER);
41
			filter = context.createFilter(Location.CONFIGURATION_FILTER);
Lines 27-47 Link Here
27
		ServiceTracker configLocationTracker = new ServiceTracker(context, filter, null);
45
		ServiceTracker configLocationTracker = new ServiceTracker(context, filter, null);
28
		configLocationTracker.open();
46
		configLocationTracker.open();
29
		try {
47
		try {
30
			Location configLocation = (Location) configLocationTracker.getService();
48
			return (Location) configLocationTracker.getService();
31
			if (configLocation == null)
32
				return null;
33
34
			URL baseURL = configLocation.getURL();
35
			if (configLocation.getParentLocation() != null && configLocation.getURL() != null) {
36
				if (baseURL == null)
37
					return new URL[] {configLocation.getParentLocation().getURL()};
38
				else
39
					return new URL[] {baseURL, configLocation.getParentLocation().getURL()};
40
			}
41
			if (baseURL != null)
42
				return new URL[] {baseURL};
43
44
			return null;
45
		} finally {
49
		} finally {
46
			configLocationTracker.close();
50
			configLocationTracker.close();
47
		}
51
		}
(-)src/org/eclipse/equinox/internal/simpleconfigurator/utils/SimpleConfiguratorUtils.java (-6 / +24 lines)
Lines 28-46 Link Here
28
	private static final String ENCODED_COMMA = "%2C";
28
	private static final String ENCODED_COMMA = "%2C";
29
29
30
	public static List readConfiguration(URL url, URI base) throws IOException {
30
	public static List readConfiguration(URL url, URI base) throws IOException {
31
		List bundles = new ArrayList();
31
		InputStream stream = null;
32
33
		BufferedReader r = null;
34
		try {
32
		try {
35
			r = new BufferedReader(new InputStreamReader(url.openStream()));
33
			stream = url.openStream();
36
		} catch (IOException e) {
34
		} catch (IOException e) {
37
			// if the exception is a FNF we return an empty bundle list
35
			// if the exception is a FNF we return an empty bundle list
38
			if (e instanceof FileNotFoundException)
36
			if (e instanceof FileNotFoundException)
39
				return bundles;
37
				return Collections.EMPTY_LIST;
40
			throw e;
38
			throw e;
41
		}
39
		}
40
41
		try {
42
			return readConfiguration(stream, base);
43
		} finally {
44
			stream.close();
45
		}
46
	}
47
48
	/**
49
	 * Read the configuration from the given InputStream
50
	 * 
51
	 * @param stream - the stream is always closed 
52
	 * @param base
53
	 * @return
54
	 * @throws IOException
55
	 */
56
	public static List readConfiguration(InputStream stream, URI base) throws IOException {
57
		List bundles = new ArrayList();
58
59
		BufferedReader r = new BufferedReader(new InputStreamReader(stream));
60
		String line;
42
		try {
61
		try {
43
			String line;
44
			while ((line = r.readLine()) != null) {
62
			while ((line = r.readLine()) != null) {
45
				line = line.trim();
63
				line = line.trim();
46
				//ignore any comment or empty lines
64
				//ignore any comment or empty lines
(-)META-INF/MANIFEST.MF (-4 / +6 lines)
Lines 2-19 Link Here
2
Bundle-ManifestVersion: 2
2
Bundle-ManifestVersion: 2
3
Bundle-Name: %bundleName
3
Bundle-Name: %bundleName
4
Bundle-SymbolicName: org.eclipse.equinox.simpleconfigurator.manipulator;singleton:=true
4
Bundle-SymbolicName: org.eclipse.equinox.simpleconfigurator.manipulator;singleton:=true
5
Bundle-Version: 1.0.200.qualifier
5
Bundle-Version: 2.0.0.qualifier
6
Bundle-Localization: plugin
6
Bundle-Localization: plugin
7
Bundle-ActivationPolicy: lazy
7
Bundle-ActivationPolicy: lazy
8
Import-Package: org.eclipse.equinox.internal.frameworkadmin.equinox,
8
Import-Package: org.eclipse.equinox.frameworkadmin;version="[2.0.0,3.0.0)",
9
 org.eclipse.equinox.internal.frameworkadmin.equinox,
9
 org.eclipse.equinox.internal.frameworkadmin.utils,
10
 org.eclipse.equinox.internal.frameworkadmin.utils,
10
 org.eclipse.equinox.internal.provisional.configuratormanipulator,
11
 org.eclipse.equinox.internal.provisional.configuratormanipulator,
11
 org.eclipse.equinox.internal.provisional.frameworkadmin,
12
 org.eclipse.equinox.internal.provisional.frameworkadmin,
12
 org.eclipse.equinox.internal.simpleconfigurator.utils,
13
 org.eclipse.equinox.internal.simpleconfigurator.utils,
14
 org.eclipse.osgi.service.datalocation,
13
 org.osgi.framework;version="1.3.0"
15
 org.osgi.framework;version="1.3.0"
14
Bundle-Vendor: %providerName
16
Bundle-Vendor: %providerName
15
Export-Package: org.eclipse.equinox.internal.provisional.simpleconfigurator.manipulator;x-friends:="org.eclipse.pde.core,org.eclipse.equinox.p2.metadata.generator,org.eclipse.equinox.p2.publisher",
17
Export-Package: org.eclipse.equinox.internal.simpleconfigurator.manipulator;x-friends:="org.eclipse.equinox.p2.touchpoint.eclipse",
16
 org.eclipse.equinox.internal.simpleconfigurator.manipulator;x-friends:="org.eclipse.equinox.p2.touchpoint.eclipse"
18
 org.eclipse.equinox.simpleconfigurator.manipulator;version="2.0.0"
17
Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
19
Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
18
 J2SE-1.4
20
 J2SE-1.4
19
Require-Bundle: org.eclipse.equinox.common;bundle-version="3.5.0"
21
Require-Bundle: org.eclipse.equinox.common;bundle-version="3.5.0"
(-)OSGI-INF/configurator.xml (-1 / +1 lines)
Lines 5-10 Link Here
5
   <property name="service.vendor" type="String" value="Eclipse.org"/>
5
   <property name="service.vendor" type="String" value="Eclipse.org"/>
6
   <service>
6
   <service>
7
      <provide interface="org.eclipse.equinox.internal.provisional.configuratormanipulator.ConfiguratorManipulator"/>
7
      <provide interface="org.eclipse.equinox.internal.provisional.configuratormanipulator.ConfiguratorManipulator"/>
8
      <provide interface="org.eclipse.equinox.internal.provisional.simpleconfigurator.manipulator.SimpleConfiguratorManipulator"/>
8
      <provide interface="org.eclipse.equinox.simpleconfigurator.manipulator.SimpleConfiguratorManipulator"/>
9
   </service>
9
   </service>
10
</scr:component>
10
</scr:component>
(-)src/org/eclipse/equinox/internal/provisional/simpleconfigurator/manipulator/SimpleConfiguratorManipulator.java (-43 lines)
Removed Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2008, 2009 IBM Corporation and others. All rights reserved.
3
 * This program and the accompanying materials are made available under the
4
 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
5
 * and is available at http://www.eclipse.org/legal/epl-v10.html
6
 * 
7
 * Contributors: IBM Corporation - initial API and implementation
8
 *******************************************************************************/
9
10
package org.eclipse.equinox.internal.provisional.simpleconfigurator.manipulator;
11
12
import java.io.File;
13
import java.io.IOException;
14
import java.net.URL;
15
import org.eclipse.equinox.internal.provisional.configuratormanipulator.ConfiguratorManipulator;
16
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
17
18
public interface SimpleConfiguratorManipulator extends ConfiguratorManipulator {
19
	/**
20
	 * An instance of an ISimpleConfiguratorManipulator is registered as a ConfiguratorManipulator 
21
	 * service with ConfiguratorManipulator.SERVICE_PROP_KEY_CONFIGURATOR_BUNDLESYMBOLICNAME =
22
	 * SERVICE_PROP_VALUE_CONFIGURATOR_SYMBOLICNAME.
23
	 */
24
	public static final String SERVICE_PROP_VALUE_CONFIGURATOR_SYMBOLICNAME = "org.eclipse.equinox.simpleconfigurator"; //$NON-NLS-1$
25
26
	/**
27
	 * 
28
	 * @param url
29
	 * @param launcherLocation
30
	 * @return The loaded configuration
31
	 * @throws IOException
32
	 */
33
	public BundleInfo[] loadConfiguration(URL url, File launcherLocation) throws IOException;
34
35
	/**
36
	 * 
37
	 * @param configuration
38
	 * @param outputFile
39
	 * @param base
40
	 * @throws IOException
41
	 */
42
	public void saveConfiguration(BundleInfo[] configuration, File outputFile, File base) throws IOException;
43
}
(-)src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorImpl.java (-19 / +60 lines)
Lines 8-30 Link Here
8
 *******************************************************************************/
8
 *******************************************************************************/
9
package org.eclipse.equinox.internal.simpleconfigurator.manipulator;
9
package org.eclipse.equinox.internal.simpleconfigurator.manipulator;
10
10
11
import java.io.File;
11
import java.io.*;
12
import java.io.IOException;
13
import java.net.URI;
12
import java.net.URI;
14
import java.net.URL;
15
import java.util.*;
13
import java.util.*;
16
import org.eclipse.core.runtime.URIUtil;
14
import org.eclipse.core.runtime.URIUtil;
15
import org.eclipse.equinox.frameworkadmin.BundleInfo;
17
import org.eclipse.equinox.internal.frameworkadmin.equinox.ParserUtils;
16
import org.eclipse.equinox.internal.frameworkadmin.equinox.ParserUtils;
18
import org.eclipse.equinox.internal.frameworkadmin.utils.Utils;
17
import org.eclipse.equinox.internal.frameworkadmin.utils.Utils;
18
import org.eclipse.equinox.internal.provisional.configuratormanipulator.ConfiguratorManipulator;
19
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
19
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
20
import org.eclipse.equinox.internal.provisional.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
20
import org.eclipse.equinox.internal.simpleconfigurator.utils.EquinoxUtils;
21
import org.eclipse.equinox.internal.simpleconfigurator.utils.SimpleConfiguratorUtils;
21
import org.eclipse.equinox.internal.simpleconfigurator.utils.SimpleConfiguratorUtils;
22
import org.eclipse.equinox.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
23
import org.eclipse.osgi.service.datalocation.Location;
24
import org.osgi.framework.BundleContext;
22
import org.osgi.framework.Constants;
25
import org.osgi.framework.Constants;
23
26
24
/**
27
/**
25
 * 
28
 * 
26
 */
29
 */
27
public class SimpleConfiguratorManipulatorImpl implements SimpleConfiguratorManipulator {
30
public class SimpleConfiguratorManipulatorImpl implements SimpleConfiguratorManipulator, ConfiguratorManipulator {
28
	class LocationInfo {
31
	class LocationInfo {
29
		URI[] prerequisiteLocations = null;
32
		URI[] prerequisiteLocations = null;
30
		URI systemBundleLocation = null;
33
		URI systemBundleLocation = null;
Lines 289-299 Link Here
289
		}
292
		}
290
	}
293
	}
291
294
292
	public BundleInfo[] loadConfiguration(URL url, File base) throws IOException {
295
	public BundleInfo[] loadConfiguration(BundleContext context, String infoPath) throws IOException {
293
		if (url == null)
296
		URI installArea = EquinoxUtils.getInstallLocationURI(context);
297
		Location configLocation = EquinoxUtils.getConfigLocation(context);
298
299
		return loadConfiguration(configLocation.getDataArea(infoPath).openStream(), installArea);
300
	}
301
302
	/*
303
	 * InputStream must be closed
304
	 * (non-Javadoc)
305
	 * @see org.eclipse.equinox.simpleconfigurator.manipulator.SimpleConfiguratorManipulator#loadConfiguration(java.io.InputStream, java.net.URI)
306
	 */
307
	public BundleInfo[] loadConfiguration(InputStream stream, URI installArea) throws IOException {
308
		if (stream == null)
294
			return NULL_BUNDLEINFOS;
309
			return NULL_BUNDLEINFOS;
295
310
296
		List simpleBundles = SimpleConfiguratorUtils.readConfiguration(url, base != null ? base.toURI() : null);
311
		List simpleBundles = SimpleConfiguratorUtils.readConfiguration(stream, installArea);
297
312
298
		// convert to FrameworkAdmin BundleInfo Type
313
		// convert to FrameworkAdmin BundleInfo Type
299
		BundleInfo[] result = new BundleInfo[simpleBundles.size()];
314
		BundleInfo[] result = new BundleInfo[simpleBundles.size()];
Lines 310-320 Link Here
310
		return result;
325
		return result;
311
	}
326
	}
312
327
313
	public void saveConfiguration(BundleInfo[] configuration, File outputFile, File base) throws IOException {
328
	public void saveConfiguration(BundleInfo[] configuration, OutputStream stream, URI installArea) throws IOException {
314
		saveConfiguration(configuration, outputFile, base, false);
329
		org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo[] simpleInfos = convertBundleInfos(configuration, installArea);
330
		SimpleConfiguratorManipulatorUtils.writeConfiguration(simpleInfos, stream);
315
	}
331
	}
316
332
317
	private void saveConfiguration(BundleInfo[] configuration, File outputFile, File base, boolean backup) throws IOException {
333
	public void saveConfiguration(BundleInfo[] configuration, File outputFile, URI installArea) throws IOException {
334
		saveConfiguration(configuration, outputFile, installArea, false);
335
	}
336
337
	private void saveConfiguration(BundleInfo[] configuration, File outputFile, URI installArea, boolean backup) throws IOException {
318
		if (backup && outputFile.exists()) {
338
		if (backup && outputFile.exists()) {
319
			File backupFile = Utils.getSimpleDataFormattedFile(outputFile);
339
			File backupFile = Utils.getSimpleDataFormattedFile(outputFile);
320
			if (!outputFile.renameTo(backupFile)) {
340
			if (!outputFile.renameTo(backupFile)) {
Lines 322-339 Link Here
322
			}
342
			}
323
		}
343
		}
324
344
345
		org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo[] simpleInfos = convertBundleInfos(configuration, installArea);
346
347
		// if empty remove the configuration file
348
		if (simpleInfos == null || simpleInfos.length == 0) {
349
			if (outputFile.exists()) {
350
				outputFile.delete();
351
			}
352
			File parentDir = outputFile.getParentFile();
353
			if (parentDir.exists()) {
354
				parentDir.delete();
355
			}
356
			return;
357
		}
358
		SimpleConfiguratorManipulatorUtils.writeConfiguration(simpleInfos, outputFile);
359
	}
360
361
	private org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo[] convertBundleInfos(BundleInfo[] configuration, URI installArea) {
325
		// convert to SimpleConfigurator BundleInfo Type
362
		// convert to SimpleConfigurator BundleInfo Type
326
		org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo[] simpleInfos = new org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo[configuration.length];
363
		org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo[] simpleInfos = new org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo[configuration.length];
327
		for (int i = 0; i < configuration.length; i++) {
364
		for (int i = 0; i < configuration.length; i++) {
328
			BundleInfo bundleInfo = configuration[i];
365
			BundleInfo bundleInfo = configuration[i];
329
			String symbolicName = bundleInfo.getSymbolicName();
366
			URI location = bundleInfo.getLocation();
330
			String bundleVersion = bundleInfo.getVersion();
367
			if (bundleInfo.getSymbolicName() == null || bundleInfo.getVersion() == null || location == null)
331
			URI location = base != null ? URIUtil.makeRelative(bundleInfo.getLocation(), base.toURI()) : bundleInfo.getLocation();
332
			if (symbolicName == null || bundleVersion == null || location == null)
333
				throw new IllegalArgumentException("Cannot persist bundleinfo: " + bundleInfo.toString());
368
				throw new IllegalArgumentException("Cannot persist bundleinfo: " + bundleInfo.toString());
334
			simpleInfos[i] = new org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo(symbolicName, bundleVersion, location, bundleInfo.getStartLevel(), bundleInfo.isMarkedAsStarted());
369
			//only need to make a new BundleInfo if we are changing it.
370
			if (installArea != null)
371
				location = URIUtil.makeRelative(location, installArea);
372
			simpleInfos[i] = new org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo(bundleInfo.getSymbolicName(), bundleInfo.getVersion(), location, bundleInfo.getStartLevel(), bundleInfo.isMarkedAsStarted());
335
		}
373
		}
336
		SimpleConfiguratorManipulatorUtils.writeConfiguration(simpleInfos, outputFile);
374
		return simpleInfos;
337
	}
375
	}
338
376
339
	public BundleInfo[] save(Manipulator manipulator, boolean backup) throws IOException {
377
	public BundleInfo[] save(Manipulator manipulator, boolean backup) throws IOException {
Lines 345-351 Link Here
345
			return configData.getBundles();
383
			return configData.getBundles();
346
384
347
		File outputFile = getConfigFile(manipulator);
385
		File outputFile = getConfigFile(manipulator);
348
		saveConfiguration((BundleInfo[]) setToSimpleConfig.toArray(new BundleInfo[setToSimpleConfig.size()]), outputFile, ParserUtils.getOSGiInstallArea(Arrays.asList(manipulator.getLauncherData().getProgramArgs()), manipulator.getConfigData().getProperties(), manipulator.getLauncherData()), backup);
386
		URI installArea = ParserUtils.getOSGiInstallArea(Arrays.asList(manipulator.getLauncherData().getProgramArgs()), manipulator.getConfigData().getProperties(), manipulator.getLauncherData()).toURI();
387
		saveConfiguration((BundleInfo[]) setToSimpleConfig.toArray(new BundleInfo[setToSimpleConfig.size()]), outputFile, installArea, backup);
349
		configData.setProperty(SimpleConfiguratorManipulatorImpl.PROP_KEY_CONFIGURL, outputFile.toURL().toExternalForm());
388
		configData.setProperty(SimpleConfiguratorManipulatorImpl.PROP_KEY_CONFIGURL, outputFile.toURL().toExternalForm());
350
		return orderingInitialConfig(setToInitialConfig);
389
		return orderingInitialConfig(setToInitialConfig);
351
	}
390
	}
Lines 414-420 Link Here
414
		boolean exclusiveInstallation = Boolean.valueOf(properties.getProperty(SimpleConfiguratorManipulatorImpl.PROP_KEY_EXCLUSIVE_INSTALLATION)).booleanValue();
453
		boolean exclusiveInstallation = Boolean.valueOf(properties.getProperty(SimpleConfiguratorManipulatorImpl.PROP_KEY_EXCLUSIVE_INSTALLATION)).booleanValue();
415
		File configFile = getConfigFile(manipulator);
454
		File configFile = getConfigFile(manipulator);
416
455
417
		BundleInfo[] toInstall = loadConfiguration(configFile.toURL(), ParserUtils.getOSGiInstallArea(Arrays.asList(manipulator.getLauncherData().getProgramArgs()), manipulator.getConfigData().getProperties(), manipulator.getLauncherData()));
456
		File installArea = ParserUtils.getOSGiInstallArea(Arrays.asList(manipulator.getLauncherData().getProgramArgs()), manipulator.getConfigData().getProperties(), manipulator.getLauncherData());
457
		//input stream will be closed for us
458
		BundleInfo[] toInstall = loadConfiguration(new FileInputStream(configFile), installArea.toURI());
418
459
419
		List toUninstall = new LinkedList();
460
		List toUninstall = new LinkedList();
420
		if (exclusiveInstallation)
461
		if (exclusiveInstallation)
(-)src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorUtils.java (-38 / +38 lines)
Lines 14-21 Link Here
14
import java.util.Comparator;
14
import java.util.Comparator;
15
import org.eclipse.equinox.internal.frameworkadmin.equinox.Messages;
15
import org.eclipse.equinox.internal.frameworkadmin.equinox.Messages;
16
import org.eclipse.equinox.internal.frameworkadmin.utils.Utils;
16
import org.eclipse.equinox.internal.frameworkadmin.utils.Utils;
17
import org.eclipse.equinox.internal.provisional.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
18
import org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo;
17
import org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo;
18
import org.eclipse.equinox.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
19
import org.osgi.framework.Version;
19
import org.osgi.framework.Version;
20
20
21
public class SimpleConfiguratorManipulatorUtils {
21
public class SimpleConfiguratorManipulatorUtils {
Lines 25-43 Link Here
25
	private static final Version OLD_STYLE_SIMPLE_CONFIGURATOR_VERSION = new Version("1.0.100.v20081206"); //$NON-NLS-1$
25
	private static final Version OLD_STYLE_SIMPLE_CONFIGURATOR_VERSION = new Version("1.0.100.v20081206"); //$NON-NLS-1$
26
26
27
	public static void writeConfiguration(BundleInfo[] simpleInfos, File outputFile) throws IOException {
27
	public static void writeConfiguration(BundleInfo[] simpleInfos, File outputFile) throws IOException {
28
		if (!Utils.createParentDir(outputFile)) {
29
			throw new IllegalStateException(Messages.exception_failedToCreateDir);
30
		}
28
31
29
		// if empty remove the configuration file
32
		IOException caughtException = null;
30
		if (simpleInfos == null || simpleInfos.length == 0) {
33
		OutputStream stream = null;
31
			if (outputFile.exists()) {
34
		try {
32
				outputFile.delete();
35
			stream = new FileOutputStream(outputFile);
33
			}
36
			writeConfiguration(simpleInfos, stream);
34
			File parentDir = outputFile.getParentFile();
37
		} catch (IOException e) {
35
			if (parentDir.exists()) {
38
			caughtException = e;
36
				parentDir.delete();
39
		} finally {
40
			try {
41
				if (stream != null)
42
					stream.close();
43
			} catch (IOException e) {
44
				// we want to avoid over-writing the original exception
45
				if (caughtException != null)
46
					caughtException = e;
37
			}
47
			}
38
			return;
39
		}
48
		}
49
		if (caughtException != null)
50
			throw caughtException;
51
	}
40
52
53
	/**
54
	 * The output stream is left open
55
	 * @param simpleInfos
56
	 * @param stream
57
	 * @throws IOException
58
	 */
59
	public static void writeConfiguration(BundleInfo[] simpleInfos, OutputStream stream) throws IOException {
41
		// sort by symbolic name
60
		// sort by symbolic name
42
		Arrays.sort(simpleInfos, new Comparator() {
61
		Arrays.sort(simpleInfos, new Comparator() {
43
			public int compare(Object o1, Object o2) {
62
			public int compare(Object o1, Object o2) {
Lines 48-58 Link Here
48
			}
67
			}
49
		});
68
		});
50
69
51
		if (!Utils.createParentDir(outputFile)) {
52
			throw new IllegalStateException(Messages.exception_failedToCreateDir);
53
		}
54
		BufferedWriter writer = null;
70
		BufferedWriter writer = null;
55
		IOException caughtException = null;
56
		boolean oldStyle = false;
71
		boolean oldStyle = false;
57
		for (int i = 0; i < simpleInfos.length; i++) {
72
		for (int i = 0; i < simpleInfos.length; i++) {
58
			if (SimpleConfiguratorManipulator.SERVICE_PROP_VALUE_CONFIGURATOR_SYMBOLICNAME.equals(simpleInfos[i].getSymbolicName())) {
73
			if (SimpleConfiguratorManipulator.SERVICE_PROP_VALUE_CONFIGURATOR_SYMBOLICNAME.equals(simpleInfos[i].getSymbolicName())) {
Lines 63-94 Link Here
63
			}
78
			}
64
		}
79
		}
65
80
66
		try {
81
		writer = new BufferedWriter(new OutputStreamWriter(stream));
67
			writer = new BufferedWriter(new FileWriter(outputFile));
82
		// version line
68
			// version line
83
		writer.write(createVersionLine());
69
			writer.write(createVersionLine());
84
		writer.newLine();
70
			writer.newLine();
71
85
72
			// bundle info lines
86
		// bundle info lines
73
			for (int i = 0; i < simpleInfos.length; i++) {
87
		for (int i = 0; i < simpleInfos.length; i++) {
74
				writer.write(createBundleInfoLine(simpleInfos[i], oldStyle));
88
			writer.write(createBundleInfoLine(simpleInfos[i], oldStyle));
75
				writer.newLine();
89
			writer.newLine();
76
			}
77
		} catch (IOException e) {
78
			caughtException = e;
79
		} finally {
80
			if (writer != null) {
81
				try {
82
					writer.close();
83
				} catch (IOException e) {
84
					// we want to avoid over-writing the original exception
85
					if (caughtException != null)
86
						caughtException = e;
87
				}
88
			}
89
		}
90
		}
90
		if (caughtException != null)
91
		writer.flush();
91
			throw caughtException;
92
	}
92
	}
93
93
94
	public static String createVersionLine() {
94
	public static String createVersionLine() {
(-)src/org/eclipse/equinox/simpleconfigurator/manipulator/SimpleConfiguratorManipulator.java (+68 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2008, 2010 IBM Corporation and others. All rights reserved.
3
 * This program and the accompanying materials are made available under the
4
 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
5
 * and is available at http://www.eclipse.org/legal/epl-v10.html
6
 * 
7
 * Contributors: IBM Corporation - initial API and implementation
8
 *******************************************************************************/
9
10
package org.eclipse.equinox.simpleconfigurator.manipulator;
11
12
import java.io.*;
13
import java.net.URI;
14
import org.eclipse.equinox.frameworkadmin.BundleInfo;
15
import org.osgi.framework.BundleContext;
16
17
/**
18
 * @since 2.0
19
 * @noimplement This interface is not intended to be implemented by clients.
20
 */
21
public interface SimpleConfiguratorManipulator {
22
	/**
23
	 * An instance of an ISimpleConfiguratorManipulator is registered as a ConfiguratorManipulator 
24
	 * service with ConfiguratorManipulator.SERVICE_PROP_KEY_CONFIGURATOR_BUNDLESYMBOLICNAME =
25
	 * SERVICE_PROP_VALUE_CONFIGURATOR_SYMBOLICNAME.
26
	 */
27
	public static final String SERVICE_PROP_VALUE_CONFIGURATOR_SYMBOLICNAME = "org.eclipse.equinox.simpleconfigurator"; //$NON-NLS-1$
28
29
	/**
30
	 * Load the configuration file for the currently running system
31
	 * @param context : the BundleContext for the running system
32
	 * @param bundleInfoPath: path to the bundle info file to read, relative to the configuration location
33
	 * @throws IOException
34
	 */
35
	public BundleInfo[] loadConfiguration(BundleContext context, String bundleInfoPath) throws IOException;
36
37
	/**
38
	 *	Load the configuration from the given input stream
39
	 *  The supplied input stream is consumed by this method and will be closed.
40
	 *  
41
	 * @param configuration - the input stream to read the configuration from.  The stream will be closed even if an exception is thrown
42
	 * @param installArea: Relative URIs from the configuration file will be resolved relative to here
43
	 * @return The loaded configuration
44
	 * @throws IOException
45
	 */
46
	public BundleInfo[] loadConfiguration(InputStream configuration, URI installArea) throws IOException;
47
48
	/**
49
	 * Save the configuration to the given output stream
50
	 * The output stream is flushed and left open.
51
	 * 
52
	 * @param configuration - bundle information to save
53
	 * @param outputStream - the output stream to write to.  Stream is not closed
54
	 * @param installArea - bundle locations are written as relative to this URI
55
	 * @throws IOException
56
	 */
57
	public void saveConfiguration(BundleInfo[] configuration, OutputStream outputStream, URI installArea) throws IOException;
58
59
	/**
60
	 * Save the configuration to the specified file
61
	 * @param configuration - bundle information to save
62
	 * @param configurationFile - file to save the configuration in
63
	 * @param installArea - bundle locations are written as relative to this URI
64
	 * 
65
	 * @throws IOException
66
	 */
67
	public void saveConfiguration(BundleInfo[] configuration, File configurationFile, URI installArea) throws IOException;
68
}
(-)META-INF/MANIFEST.MF (-2 / +2 lines)
Lines 36-42 Link Here
36
 org.eclipse.ltk.core.refactoring;bundle-version="[3.5.0,4.0.0)",
36
 org.eclipse.ltk.core.refactoring;bundle-version="[3.5.0,4.0.0)",
37
 org.eclipse.core.variables;bundle-version="[3.2.200,4.0.0)",
37
 org.eclipse.core.variables;bundle-version="[3.2.200,4.0.0)",
38
 org.eclipse.ltk.ui.refactoring;bundle-version="[3.4.100,4.0.0)",
38
 org.eclipse.ltk.ui.refactoring;bundle-version="[3.4.100,4.0.0)",
39
 org.eclipse.equinox.simpleconfigurator.manipulator;bundle-version="[1.0.100,2.0.0)",
39
 org.eclipse.equinox.simpleconfigurator.manipulator;bundle-version="[2.0.0,3.0.0)",
40
 org.eclipse.equinox.frameworkadmin;bundle-version="[1.0.100,2.0.0)",
40
 org.eclipse.equinox.frameworkadmin;bundle-version="[2.0.0,3.0.0)",
41
 org.eclipse.jdt.junit.core;bundle-version="[3.6.0,4.0.0)";visibility:=reexport
41
 org.eclipse.jdt.junit.core;bundle-version="[3.6.0,4.0.0)";visibility:=reexport
42
Bundle-RequiredExecutionEnvironment: J2SE-1.4
42
Bundle-RequiredExecutionEnvironment: J2SE-1.4
(-)META-INF/MANIFEST.MF (-2 / +2 lines)
Lines 24-29 Link Here
24
 org.eclipse.jdt.launching;bundle-version="[3.5.0,4.0.0)",
24
 org.eclipse.jdt.launching;bundle-version="[3.5.0,4.0.0)",
25
 org.eclipse.jdt.junit.runtime;bundle-version="[3.4.100,4.0.0)",
25
 org.eclipse.jdt.junit.runtime;bundle-version="[3.4.100,4.0.0)",
26
 org.eclipse.core.variables;bundle-version="[3.2.200,4.0.0)",
26
 org.eclipse.core.variables;bundle-version="[3.2.200,4.0.0)",
27
 org.eclipse.equinox.simpleconfigurator.manipulator;bundle-version="[1.0.100,2.0.0)",
27
 org.eclipse.equinox.simpleconfigurator.manipulator;bundle-version="[2.0.0,3.0.0)",
28
 org.eclipse.equinox.frameworkadmin;bundle-version="[1.0.100,2.0.0)"
28
 org.eclipse.equinox.frameworkadmin;bundle-version="[2.0.0,3.0.0)"
29
Bundle-RequiredExecutionEnvironment: J2SE-1.4
29
Bundle-RequiredExecutionEnvironment: J2SE-1.4
(-)src/org/eclipse/jdt/internal/junit/buildpath/BuildPathSupport.java (-1 / +1 lines)
Lines 18-24 Link Here
18
18
19
import org.osgi.framework.Version;
19
import org.osgi.framework.Version;
20
20
21
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
21
import org.eclipse.equinox.frameworkadmin.BundleInfo;
22
import org.eclipse.osgi.service.resolver.VersionRange;
22
import org.eclipse.osgi.service.resolver.VersionRange;
23
23
24
import org.eclipse.core.runtime.FileLocator;
24
import org.eclipse.core.runtime.FileLocator;
(-)src/org/eclipse/jdt/internal/junit/buildpath/P2Utils.java (-74 / +30 lines)
Lines 13-38 Link Here
13
13
14
import java.io.File;
14
import java.io.File;
15
import java.io.IOException;
15
import java.io.IOException;
16
import java.net.MalformedURLException;
17
import java.net.URI;
16
import java.net.URI;
18
import java.net.URL;
19
import java.net.URLDecoder;
17
import java.net.URLDecoder;
20
import java.util.ArrayList;
21
import java.util.Iterator;
22
import java.util.List;
23
18
19
import org.osgi.framework.BundleContext;
24
import org.osgi.framework.Version;
20
import org.osgi.framework.Version;
25
21
26
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
22
import org.eclipse.equinox.frameworkadmin.BundleInfo;
27
import org.eclipse.equinox.internal.provisional.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
23
import org.eclipse.equinox.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
28
import org.eclipse.osgi.service.datalocation.Location;
29
import org.eclipse.osgi.service.resolver.VersionRange;
24
import org.eclipse.osgi.service.resolver.VersionRange;
30
25
31
import org.eclipse.core.runtime.Assert;
26
import org.eclipse.core.runtime.Assert;
32
import org.eclipse.core.runtime.FileLocator;
27
import org.eclipse.core.runtime.FileLocator;
33
import org.eclipse.core.runtime.IPath;
28
import org.eclipse.core.runtime.IPath;
34
import org.eclipse.core.runtime.Path;
29
import org.eclipse.core.runtime.Path;
35
import org.eclipse.core.runtime.Platform;
36
import org.eclipse.core.runtime.URIUtil;
30
import org.eclipse.core.runtime.URIUtil;
37
31
38
import org.eclipse.jdt.internal.junit.JUnitCorePlugin;
32
import org.eclipse.jdt.internal.junit.JUnitCorePlugin;
Lines 75-105 Link Here
75
	}
69
	}
76
70
77
	/**
71
	/**
78
	 * Adds the directories (as <code>java.io.File</code>) for the given location and all of its parents to the given list.
79
	 * 
80
	 * @param locations the list to add the URLs to
81
	 * @param location the location
82
	 * @param useParent <code>true</code> if location's parent directory should be used <code>false</code> otherwise
83
	 */
84
	private static void addLocationDirs(List locations, Location location, boolean useParent) {
85
		while (location != null) {
86
			URL url= location.getURL();
87
			if (url != null) {
88
				try {
89
					File dir = new File(FileLocator.toFileURL(url).getPath());
90
					if (useParent)
91
						dir = dir.getParentFile();
92
					if (!locations.contains(dir))
93
						locations.add(dir);
94
				} catch (IOException e) {
95
					JUnitCorePlugin.log(e);
96
				}
97
			}
98
			location= location.getParentLocation();
99
		}
100
	}
101
102
	/**
103
	 * Finds the bundle info for the given arguments.
72
	 * Finds the bundle info for the given arguments.
104
	 * <p>
73
	 * <p>
105
	 * The first match will be returned if more than one bundle matches the arguments.
74
	 * The first match will be returned if more than one bundle matches the arguments.
Lines 118-171 Link Here
118
		if (manipulator == null)
87
		if (manipulator == null)
119
			return null;
88
			return null;
120
89
121
		List bundleLocations = new ArrayList();
122
		addLocationDirs(bundleLocations, Platform.getConfigurationLocation(), true);
123
		addLocationDirs(bundleLocations, Platform.getInstallLocation(), false);
124
125
		BundleInfo bestMatch= null;
90
		BundleInfo bestMatch= null;
126
		Version bestVersion= null;
91
		Version bestVersion= null;
127
		for (Location configLocation= Platform.getConfigurationLocation(); configLocation != null; configLocation= configLocation.getParentLocation()) {
92
128
			URL configUrl= configLocation.getURL();
93
		String bundleInfoPath= null;
129
			if (configUrl == null)
94
		if (isSourceBundle)
130
				continue;
95
			bundleInfoPath= SRC_INFO_PATH;
131
96
		else
132
			try {
97
			bundleInfoPath= BUNDLE_INFO_PATH;
133
				String bundleInfoPath= null;
98
134
				if (isSourceBundle)
99
		BundleContext context= JUnitCorePlugin.getDefault().getBundle().getBundleContext();
135
					bundleInfoPath= SRC_INFO_PATH;
100
		BundleInfo bundles[]= null;
136
				else
101
		try {
137
					bundleInfoPath= BUNDLE_INFO_PATH;
102
			bundles= manipulator.loadConfiguration(context, bundleInfoPath);
138
103
		} catch (IOException e) {
139
				URL bundlesTxt = new URL(configUrl.getProtocol(), configUrl.getHost(), new File(configUrl.getPath(), bundleInfoPath).getAbsolutePath());
104
			JUnitCorePlugin.log(e);
140
105
		}
141
				for (Iterator i= bundleLocations.iterator(); i.hasNext(); ) {
106
		
142
					File home= (File) i.next();
107
		if (bundles != null) {
143
					BundleInfo bundles[]= manipulator.loadConfiguration(bundlesTxt, home);
108
			for (int j= 0; j < bundles.length; j++) {
144
					if (bundles != null) {
109
				BundleInfo bundleInfo= bundles[j];
145
						for (int j= 0; j < bundles.length; j++) {
110
				if (symbolicName.equals(bundleInfo.getSymbolicName())) {
146
							BundleInfo bundleInfo= bundles[j];
111
					Version version= new Version(bundleInfo.getVersion());
147
							if (symbolicName.equals(bundleInfo.getSymbolicName())) {
112
					if (versionRange.isIncluded(version)) {
148
								Version version= new Version(bundleInfo.getVersion());
113
						IPath path= getBundleLocationPath(bundleInfo);
149
								if (versionRange.isIncluded(version)) {
114
						if (path.toFile().exists()) {
150
									IPath path= getBundleLocationPath(bundleInfo);
115
							if (bestMatch == null || bestVersion.compareTo(version) < 0) {
151
									if (path.toFile().exists()) {
116
								bestMatch= bundleInfo;
152
										if (bestMatch == null || bestVersion.compareTo(version) < 0) {
117
								bestVersion= version;
153
											bestMatch= bundleInfo;
154
											bestVersion= version;
155
										}
156
									}
157
								}
158
							}
118
							}
159
						}
119
						}
160
					}
120
					}
161
				}
121
				}
162
			} catch (MalformedURLException e) {
163
				JUnitCorePlugin.log(e);
164
			} catch (IOException e) {
165
				JUnitCorePlugin.log(e);
166
			}
122
			}
167
		}
123
		}
168
		
124
169
		return bestMatch;
125
		return bestMatch;
170
	}
126
	}
171
127
(-)META-INF/MANIFEST.MF (-2 / +3 lines)
Lines 26-31 Link Here
26
 org.eclipse.equinox.p2.repository.tools;bundle-version="[2.0.0,3.0.0)";resolution:=optional,
26
 org.eclipse.equinox.p2.repository.tools;bundle-version="[2.0.0,3.0.0)";resolution:=optional,
27
 org.eclipse.equinox.p2.director.app;bundle-version="1.0.200"
27
 org.eclipse.equinox.p2.director.app;bundle-version="1.0.200"
28
Import-Package: com.ibm.icu.util,
28
Import-Package: com.ibm.icu.util,
29
 org.eclipse.equinox.frameworkadmin;version="[2.0.0,3.0.0)",
29
 org.eclipse.equinox.internal.p2.core.helpers,
30
 org.eclipse.equinox.internal.p2.core.helpers,
30
 org.eclipse.equinox.internal.p2.engine,
31
 org.eclipse.equinox.internal.p2.engine,
31
 org.eclipse.equinox.internal.p2.engine.phases,
32
 org.eclipse.equinox.internal.p2.engine.phases,
Lines 34-40 Link Here
34
 org.eclipse.equinox.internal.provisional.frameworkadmin,
35
 org.eclipse.equinox.internal.provisional.frameworkadmin,
35
 org.eclipse.equinox.internal.provisional.p2.core,
36
 org.eclipse.equinox.internal.provisional.p2.core,
36
 org.eclipse.equinox.internal.provisional.p2.metadata,
37
 org.eclipse.equinox.internal.provisional.p2.metadata,
37
 org.eclipse.equinox.internal.provisional.simpleconfigurator.manipulator,
38
 org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
38
 org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
39
 org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
39
 org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
40
 org.eclipse.equinox.p2.metadata.query;version="[2.0.0,3.0.0)",
40
 org.eclipse.equinox.p2.metadata.query;version="[2.0.0,3.0.0)",
Lines 42-47 Link Here
42
 org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
42
 org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
43
 org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
43
 org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
44
 org.eclipse.equinox.p2.repository.artifact.spi;version="[2.0.0,3.0.0)",
44
 org.eclipse.equinox.p2.repository.artifact.spi;version="[2.0.0,3.0.0)",
45
 org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)"
45
 org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)",
46
 org.eclipse.equinox.simpleconfigurator.manipulator;version="[2.0.0,3.0.0)"
46
Bundle-ActivationPolicy: lazy
47
Bundle-ActivationPolicy: lazy
47
Bundle-RequiredExecutionEnvironment: J2SE-1.4
48
Bundle-RequiredExecutionEnvironment: J2SE-1.4
(-)src/org/eclipse/pde/internal/build/ProductFile.java (-1 / +2 lines)
Lines 11-21 Link Here
11
11
12
package org.eclipse.pde.internal.build;
12
package org.eclipse.pde.internal.build;
13
13
14
import org.eclipse.equinox.frameworkadmin.BundleInfo;
15
14
import java.io.*;
16
import java.io.*;
15
import java.util.*;
17
import java.util.*;
16
import javax.xml.parsers.*;
18
import javax.xml.parsers.*;
17
import org.eclipse.core.runtime.*;
19
import org.eclipse.core.runtime.*;
18
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
19
import org.eclipse.osgi.util.NLS;
20
import org.eclipse.osgi.util.NLS;
20
import org.eclipse.pde.internal.build.site.compatibility.FeatureEntry;
21
import org.eclipse.pde.internal.build.site.compatibility.FeatureEntry;
21
import org.xml.sax.*;
22
import org.xml.sax.*;
(-)src/org/eclipse/pde/internal/build/ProductGenerator.java (-1 / +2 lines)
Lines 8-17 Link Here
8
 ******************************************************************************/
8
 ******************************************************************************/
9
package org.eclipse.pde.internal.build;
9
package org.eclipse.pde.internal.build;
10
10
11
import org.eclipse.equinox.frameworkadmin.BundleInfo;
12
11
import java.io.*;
13
import java.io.*;
12
import java.util.*;
14
import java.util.*;
13
import org.eclipse.core.runtime.*;
15
import org.eclipse.core.runtime.*;
14
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
15
import org.eclipse.osgi.service.resolver.BundleDescription;
16
import org.eclipse.osgi.service.resolver.BundleDescription;
16
import org.eclipse.osgi.service.resolver.VersionRange;
17
import org.eclipse.osgi.service.resolver.VersionRange;
17
import org.eclipse.pde.internal.build.site.*;
18
import org.eclipse.pde.internal.build.site.*;
(-)src/org/eclipse/pde/internal/build/publisher/compatibility/AssembledConfigAdvice.java (+2 lines)
Lines 10-15 Link Here
10
 *******************************************************************************/
10
 *******************************************************************************/
11
package org.eclipse.pde.internal.build.publisher.compatibility;
11
package org.eclipse.pde.internal.build.publisher.compatibility;
12
12
13
import org.eclipse.equinox.frameworkadmin.BundleInfo;
14
13
import java.io.File;
15
import java.io.File;
14
import java.util.*;
16
import java.util.*;
15
import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
17
import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
(-)src/org/eclipse/pde/internal/build/site/P2Utils.java (-8 / +17 lines)
Lines 10-21 Link Here
10
 *******************************************************************************/
10
 *******************************************************************************/
11
package org.eclipse.pde.internal.build.site;
11
package org.eclipse.pde.internal.build.site;
12
12
13
import java.io.File;
13
import java.io.*;
14
import java.io.IOException;
15
import java.net.*;
14
import java.net.*;
16
import java.util.*;
15
import java.util.*;
17
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
16
import org.eclipse.equinox.frameworkadmin.BundleInfo;
18
import org.eclipse.equinox.internal.provisional.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
17
import org.eclipse.equinox.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
19
import org.eclipse.osgi.service.resolver.BundleDescription;
18
import org.eclipse.osgi.service.resolver.BundleDescription;
20
import org.eclipse.pde.internal.build.*;
19
import org.eclipse.pde.internal.build.*;
21
20
Lines 51-58 Link Here
51
50
52
		List infos = new ArrayList();
51
		List infos = new ArrayList();
53
		try {
52
		try {
54
			infos.addAll(Arrays.asList(manipulator.loadConfiguration(bundlesTxt.toURL(), root)));
53
			//streams are closed for us
55
			infos.addAll(Arrays.asList(manipulator.loadConfiguration(sourceTxt.toURL(), root)));
54
			infos.addAll(Arrays.asList(manipulator.loadConfiguration(new FileInputStream(bundlesTxt), root.toURI())));
55
			infos.addAll(Arrays.asList(manipulator.loadConfiguration(new FileInputStream(sourceTxt), root.toURI())));
56
		} catch (MalformedURLException e) {
56
		} catch (MalformedURLException e) {
57
			// TODO Auto-generated catch block
57
			// TODO Auto-generated catch block
58
			e.printStackTrace();
58
			e.printStackTrace();
Lines 175-182 Link Here
175
175
176
		SimpleConfiguratorManipulator manipulator = (SimpleConfiguratorManipulator) BundleHelper.getDefault().acquireService(SimpleConfiguratorManipulator.class.getName());
176
		SimpleConfiguratorManipulator manipulator = (SimpleConfiguratorManipulator) BundleHelper.getDefault().acquireService(SimpleConfiguratorManipulator.class.getName());
177
		try {
177
		try {
178
			manipulator.saveConfiguration(infos, bundlesTxt, base);
178
			bundlesTxt.getParentFile().mkdirs();
179
			manipulator.saveConfiguration(sources, srcBundlesTxt, base);
179
			srcBundlesTxt.getParentFile().mkdirs();
180
			OutputStream bundleOutput = new FileOutputStream(bundlesTxt);
181
			OutputStream srcOutput = new FileOutputStream(srcBundlesTxt);
182
			try {
183
				manipulator.saveConfiguration(infos, bundleOutput, base.toURI());
184
				manipulator.saveConfiguration(sources, srcOutput, base.toURI());
185
			} finally {
186
				Utils.close(bundleOutput);
187
				Utils.close(srcOutput);
188
			}
180
		} catch (IOException e) {
189
		} catch (IOException e) {
181
			return null;
190
			return null;
182
		}
191
		}
(-)META-INF/MANIFEST.MF (-3 / +3 lines)
Lines 58-70 Link Here
58
 org.eclipse.core.variables;bundle-version="[3.1.0,4.0.0)",
58
 org.eclipse.core.variables;bundle-version="[3.1.0,4.0.0)",
59
 org.eclipse.pde.build;bundle-version="[3.2.0,4.1.0)",
59
 org.eclipse.pde.build;bundle-version="[3.2.0,4.1.0)",
60
 org.eclipse.ant.core;bundle-version="[3.1.0,4.0.0)",
60
 org.eclipse.ant.core;bundle-version="[3.1.0,4.0.0)",
61
 org.eclipse.equinox.simpleconfigurator.manipulator;bundle-version="[1.0.100,2.0.0)",
61
 org.eclipse.equinox.simpleconfigurator.manipulator;bundle-version="[2.0.0,3.0.0)",
62
 org.eclipse.equinox.frameworkadmin;bundle-version="[1.0.100,2.0.0)",
62
 org.eclipse.equinox.frameworkadmin;bundle-version="[2.0.0,3.0.0)",
63
 org.eclipse.debug.core;bundle-version="[3.5.0,4.0.0)",
63
 org.eclipse.debug.core;bundle-version="[3.5.0,4.0.0)",
64
 org.eclipse.equinox.p2.engine;bundle-version="[2.0.0,3.0.0)",
64
 org.eclipse.equinox.p2.engine;bundle-version="[2.0.0,3.0.0)",
65
 org.eclipse.equinox.p2.core;bundle-version="[2.0.0,3.0.0)",
65
 org.eclipse.equinox.p2.core;bundle-version="[2.0.0,3.0.0)",
66
 org.eclipse.equinox.p2.metadata;bundle-version="[2.0.0,3.0.0)",
66
 org.eclipse.equinox.p2.metadata;bundle-version="[2.0.0,3.0.0)",
67
 org.eclipse.equinox.p2.director;bundle-version="[2.0.0, 3.0.0)",
67
 org.eclipse.equinox.p2.director;bundle-version="[2.0.0,3.0.0)",
68
 org.eclipse.equinox.p2.artifact.repository;bundle-version="[1.0.100,2.0.0)",
68
 org.eclipse.equinox.p2.artifact.repository;bundle-version="[1.0.100,2.0.0)",
69
 org.eclipse.equinox.p2.repository;bundle-version="[2.0.0,3.0.0]",
69
 org.eclipse.equinox.p2.repository;bundle-version="[2.0.0,3.0.0]",
70
 org.eclipse.equinox.p2.metadata.repository;bundle-version="[1.0.100,2.0.0)",
70
 org.eclipse.equinox.p2.metadata.repository;bundle-version="[1.0.100,2.0.0)",
(-)src/org/eclipse/pde/internal/core/P2Utils.java (-3 / +5 lines)
Lines 17-32 Link Here
17
import java.net.URL;
17
import java.net.URL;
18
import java.util.*;
18
import java.util.*;
19
import org.eclipse.core.runtime.*;
19
import org.eclipse.core.runtime.*;
20
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
20
import org.eclipse.equinox.frameworkadmin.BundleInfo;
21
import org.eclipse.equinox.internal.provisional.p2.director.PlannerHelper;
21
import org.eclipse.equinox.internal.provisional.p2.director.PlannerHelper;
22
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
22
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
23
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
23
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
24
import org.eclipse.equinox.internal.provisional.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
25
import org.eclipse.equinox.p2.core.IProvisioningAgent;
24
import org.eclipse.equinox.p2.core.IProvisioningAgent;
26
import org.eclipse.equinox.p2.core.IProvisioningAgentProvider;
25
import org.eclipse.equinox.p2.core.IProvisioningAgentProvider;
27
import org.eclipse.equinox.p2.engine.*;
26
import org.eclipse.equinox.p2.engine.*;
28
import org.eclipse.equinox.p2.metadata.*;
27
import org.eclipse.equinox.p2.metadata.*;
29
import org.eclipse.equinox.p2.metadata.VersionRange;
28
import org.eclipse.equinox.p2.metadata.VersionRange;
29
import org.eclipse.equinox.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
30
import org.eclipse.osgi.service.resolver.*;
30
import org.eclipse.osgi.service.resolver.*;
31
import org.eclipse.pde.core.plugin.IPluginBase;
31
import org.eclipse.pde.core.plugin.IPluginBase;
32
import org.eclipse.pde.core.plugin.IPluginModelBase;
32
import org.eclipse.pde.core.plugin.IPluginModelBase;
Lines 192-198 Link Here
192
		if (manipulator == null) {
192
		if (manipulator == null) {
193
			return null;
193
			return null;
194
		}
194
		}
195
		return manipulator.loadConfiguration(fileURL, home);
195
196
		// the input stream will be buffered and closed for us
197
		return manipulator.loadConfiguration(fileURL.openStream(), home.toURI());
196
	}
198
	}
197
199
198
	/**
200
	/**
(-)src/org/eclipse/pde/internal/core/target/AbstractBundleContainer.java (+1 lines)
Lines 19-24 Link Here
19
import org.eclipse.core.runtime.spi.RegistryContributor;
19
import org.eclipse.core.runtime.spi.RegistryContributor;
20
import org.eclipse.core.variables.IStringVariableManager;
20
import org.eclipse.core.variables.IStringVariableManager;
21
import org.eclipse.core.variables.VariablesPlugin;
21
import org.eclipse.core.variables.VariablesPlugin;
22
import org.eclipse.equinox.frameworkadmin.BundleInfo;
22
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
23
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
23
import org.eclipse.osgi.service.pluginconversion.PluginConversionException;
24
import org.eclipse.osgi.service.pluginconversion.PluginConversionException;
24
import org.eclipse.osgi.service.pluginconversion.PluginConverter;
25
import org.eclipse.osgi.service.pluginconversion.PluginConverter;
(-)src/org/eclipse/pde/internal/core/target/ProfileBundleContainer.java (-1 / +1 lines)
Lines 16-22 Link Here
16
import java.util.ArrayList;
16
import java.util.ArrayList;
17
import java.util.List;
17
import java.util.List;
18
import org.eclipse.core.runtime.*;
18
import org.eclipse.core.runtime.*;
19
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
19
import org.eclipse.equinox.frameworkadmin.BundleInfo;
20
import org.eclipse.osgi.util.NLS;
20
import org.eclipse.osgi.util.NLS;
21
import org.eclipse.pde.internal.build.site.PluginPathFinder;
21
import org.eclipse.pde.internal.build.site.PluginPathFinder;
22
import org.eclipse.pde.internal.core.P2Utils;
22
import org.eclipse.pde.internal.core.P2Utils;
(-)src/org/eclipse/pde/internal/core/target/ResolvedBundle.java (-1 / +1 lines)
Lines 12-18 Link Here
12
12
13
import org.eclipse.core.runtime.IStatus;
13
import org.eclipse.core.runtime.IStatus;
14
import org.eclipse.core.runtime.Status;
14
import org.eclipse.core.runtime.Status;
15
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
15
import org.eclipse.equinox.frameworkadmin.BundleInfo;
16
import org.eclipse.pde.internal.core.target.provisional.IBundleContainer;
16
import org.eclipse.pde.internal.core.target.provisional.IBundleContainer;
17
import org.eclipse.pde.internal.core.target.provisional.IResolvedBundle;
17
import org.eclipse.pde.internal.core.target.provisional.IResolvedBundle;
18
18
(-)src/org/eclipse/pde/internal/core/target/TargetDefinition.java (-1 / +1 lines)
Lines 18-24 Link Here
18
import org.eclipse.core.variables.IStringVariableManager;
18
import org.eclipse.core.variables.IStringVariableManager;
19
import org.eclipse.core.variables.VariablesPlugin;
19
import org.eclipse.core.variables.VariablesPlugin;
20
import org.eclipse.debug.core.DebugPlugin;
20
import org.eclipse.debug.core.DebugPlugin;
21
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
21
import org.eclipse.equinox.frameworkadmin.BundleInfo;
22
import org.eclipse.equinox.p2.engine.IProfile;
22
import org.eclipse.equinox.p2.engine.IProfile;
23
import org.eclipse.equinox.p2.engine.IProfileRegistry;
23
import org.eclipse.equinox.p2.engine.IProfileRegistry;
24
import org.eclipse.equinox.p2.engine.query.IUProfilePropertyQuery;
24
import org.eclipse.equinox.p2.engine.query.IUProfilePropertyQuery;
(-)src/org/eclipse/pde/internal/core/target/TargetPlatformService.java (-1 / +1 lines)
Lines 15-22 Link Here
15
import java.util.*;
15
import java.util.*;
16
import org.eclipse.core.resources.*;
16
import org.eclipse.core.resources.*;
17
import org.eclipse.core.runtime.*;
17
import org.eclipse.core.runtime.*;
18
import org.eclipse.equinox.frameworkadmin.BundleInfo;
18
import org.eclipse.equinox.internal.p2.garbagecollector.GarbageCollector;
19
import org.eclipse.equinox.internal.p2.garbagecollector.GarbageCollector;
19
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
20
import org.eclipse.equinox.p2.core.IProvisioningAgent;
20
import org.eclipse.equinox.p2.core.IProvisioningAgent;
21
import org.eclipse.equinox.p2.engine.IProfile;
21
import org.eclipse.equinox.p2.engine.IProfile;
22
import org.eclipse.equinox.p2.engine.IProfileRegistry;
22
import org.eclipse.equinox.p2.engine.IProfileRegistry;
(-)src/org/eclipse/pde/internal/core/target/provisional/IResolvedBundle.java (-1 / +1 lines)
Lines 11-17 Link Here
11
package org.eclipse.pde.internal.core.target.provisional;
11
package org.eclipse.pde.internal.core.target.provisional;
12
12
13
import org.eclipse.core.runtime.IStatus;
13
import org.eclipse.core.runtime.IStatus;
14
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
14
import org.eclipse.equinox.frameworkadmin.BundleInfo;
15
15
16
/**
16
/**
17
 * A resolved bundle contained in a bundle container of a target definition.
17
 * A resolved bundle contained in a bundle container of a target definition.
(-)src/org/eclipse/pde/internal/core/target/provisional/LoadTargetDefinitionJob.java (-1 / +1 lines)
Lines 20-26 Link Here
20
import org.eclipse.core.runtime.jobs.Job;
20
import org.eclipse.core.runtime.jobs.Job;
21
import org.eclipse.core.variables.IStringVariableManager;
21
import org.eclipse.core.variables.IStringVariableManager;
22
import org.eclipse.core.variables.VariablesPlugin;
22
import org.eclipse.core.variables.VariablesPlugin;
23
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
23
import org.eclipse.equinox.frameworkadmin.BundleInfo;
24
import org.eclipse.jdt.launching.IVMInstall;
24
import org.eclipse.jdt.launching.IVMInstall;
25
import org.eclipse.jdt.launching.JavaRuntime;
25
import org.eclipse.jdt.launching.JavaRuntime;
26
import org.eclipse.pde.core.plugin.IPluginModelBase;
26
import org.eclipse.pde.core.plugin.IPluginModelBase;
(-)META-INF/MANIFEST.MF (-1 / +1 lines)
Lines 104-110 Link Here
104
 org.eclipse.equinox.p2.metadata.repository;bundle-version="[1.0.100,2.0.0)",
104
 org.eclipse.equinox.p2.metadata.repository;bundle-version="[1.0.100,2.0.0)",
105
 org.eclipse.equinox.p2.operations;bundle-version="[2.0.0,3.0.0)",
105
 org.eclipse.equinox.p2.operations;bundle-version="[2.0.0,3.0.0)",
106
 org.eclipse.equinox.p2.repository;bundle-version="[2.0.0,3.0.0)",
106
 org.eclipse.equinox.p2.repository;bundle-version="[2.0.0,3.0.0)",
107
 org.eclipse.equinox.frameworkadmin;bundle-version="[1.0.100,2.0.0)",
107
 org.eclipse.equinox.frameworkadmin;bundle-version="[2.0.0,3.0.0)",
108
 org.eclipse.equinox.frameworkadmin.equinox;bundle-version="[1.0.100,2.0.0)",
108
 org.eclipse.equinox.frameworkadmin.equinox;bundle-version="[1.0.100,2.0.0)",
109
 org.eclipse.pde.launching;bundle-version="[3.6.0,4.0.0)";visibility:=reexport
109
 org.eclipse.pde.launching;bundle-version="[3.6.0,4.0.0)";visibility:=reexport
110
Eclipse-LazyStart: true
110
Eclipse-LazyStart: true
(-)src/org/eclipse/pde/internal/ui/editor/targetdefinition/ImplicitDependenciesSection.java (-1 / +1 lines)
Lines 13-19 Link Here
13
import java.util.*;
13
import java.util.*;
14
import java.util.List;
14
import java.util.List;
15
import org.eclipse.core.runtime.*;
15
import org.eclipse.core.runtime.*;
16
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
16
import org.eclipse.equinox.frameworkadmin.BundleInfo;
17
import org.eclipse.jface.viewers.*;
17
import org.eclipse.jface.viewers.*;
18
import org.eclipse.jface.window.Window;
18
import org.eclipse.jface.window.Window;
19
import org.eclipse.osgi.util.NLS;
19
import org.eclipse.osgi.util.NLS;
(-)src/org/eclipse/pde/internal/ui/preferences/TargetPlatformPreferencePage.java (-1 / +1 lines)
Lines 17-23 Link Here
17
import org.eclipse.core.resources.IFile;
17
import org.eclipse.core.resources.IFile;
18
import org.eclipse.core.runtime.*;
18
import org.eclipse.core.runtime.*;
19
import org.eclipse.core.runtime.jobs.*;
19
import org.eclipse.core.runtime.jobs.*;
20
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
20
import org.eclipse.equinox.frameworkadmin.BundleInfo;
21
import org.eclipse.jface.dialogs.*;
21
import org.eclipse.jface.dialogs.*;
22
import org.eclipse.jface.dialogs.Dialog;
22
import org.eclipse.jface.dialogs.Dialog;
23
import org.eclipse.jface.operation.IRunnableWithProgress;
23
import org.eclipse.jface.operation.IRunnableWithProgress;
(-)src/org/eclipse/pde/internal/ui/shared/target/StyledBundleLabelProvider.java (-1 / +1 lines)
Lines 13-20 Link Here
13
import com.ibm.icu.text.MessageFormat;
13
import com.ibm.icu.text.MessageFormat;
14
import java.net.URI;
14
import java.net.URI;
15
import org.eclipse.core.runtime.*;
15
import org.eclipse.core.runtime.*;
16
import org.eclipse.equinox.frameworkadmin.BundleInfo;
16
import org.eclipse.equinox.internal.p2.metadata.TranslationSupport;
17
import org.eclipse.equinox.internal.p2.metadata.TranslationSupport;
17
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
18
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
18
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
19
import org.eclipse.jface.resource.ImageDescriptor;
19
import org.eclipse.jface.resource.ImageDescriptor;
20
import org.eclipse.jface.viewers.*;
20
import org.eclipse.jface.viewers.*;
(-)src/org/eclipse/pde/internal/ui/shared/target/TargetContentsGroup.java (-1 / +1 lines)
Lines 20-26 Link Here
20
import java.util.zip.ZipEntry;
20
import java.util.zip.ZipEntry;
21
import java.util.zip.ZipFile;
21
import java.util.zip.ZipFile;
22
import org.eclipse.core.runtime.*;
22
import org.eclipse.core.runtime.*;
23
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
23
import org.eclipse.equinox.frameworkadmin.BundleInfo;
24
import org.eclipse.jface.action.Action;
24
import org.eclipse.jface.action.Action;
25
import org.eclipse.jface.action.MenuManager;
25
import org.eclipse.jface.action.MenuManager;
26
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
26
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
(-)src/org/eclipse/pde/internal/ui/wizards/target/TargetDefinitionContentPage.java (-1 / +1 lines)
Lines 17-23 Link Here
17
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
17
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
18
import org.eclipse.core.runtime.preferences.InstanceScope;
18
import org.eclipse.core.runtime.preferences.InstanceScope;
19
import org.eclipse.debug.ui.StringVariableSelectionDialog;
19
import org.eclipse.debug.ui.StringVariableSelectionDialog;
20
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
20
import org.eclipse.equinox.frameworkadmin.BundleInfo;
21
import org.eclipse.jdt.launching.JavaRuntime;
21
import org.eclipse.jdt.launching.JavaRuntime;
22
import org.eclipse.jdt.launching.environments.IExecutionEnvironment;
22
import org.eclipse.jdt.launching.environments.IExecutionEnvironment;
23
import org.eclipse.jdt.launching.environments.IExecutionEnvironmentsManager;
23
import org.eclipse.jdt.launching.environments.IExecutionEnvironmentsManager;
(-)src/org/eclipse/pde/ui/tests/target/AbstractTargetTest.java (-3 / +1 lines)
Lines 10-17 Link Here
10
 *******************************************************************************/
10
 *******************************************************************************/
11
package org.eclipse.pde.ui.tests.target;
11
package org.eclipse.pde.ui.tests.target;
12
12
13
import org.eclipse.core.runtime.Platform;
14
15
import java.io.*;
13
import java.io.*;
16
import java.net.URL;
14
import java.net.URL;
17
import java.util.*;
15
import java.util.*;
Lines 19-25 Link Here
19
import java.util.zip.ZipFile;
17
import java.util.zip.ZipFile;
20
import junit.framework.TestCase;
18
import junit.framework.TestCase;
21
import org.eclipse.core.runtime.*;
19
import org.eclipse.core.runtime.*;
22
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
20
import org.eclipse.equinox.frameworkadmin.BundleInfo;
23
import org.eclipse.pde.core.plugin.TargetPlatform;
21
import org.eclipse.pde.core.plugin.TargetPlatform;
24
import org.eclipse.pde.internal.core.target.provisional.*;
22
import org.eclipse.pde.internal.core.target.provisional.*;
25
import org.eclipse.pde.internal.ui.tests.macro.MacroPlugin;
23
import org.eclipse.pde.internal.ui.tests.macro.MacroPlugin;
(-)src/org/eclipse/pde/ui/tests/target/LocalTargetDefinitionTests.java (-4 / +3 lines)
Lines 10-27 Link Here
10
 *******************************************************************************/
10
 *******************************************************************************/
11
package org.eclipse.pde.ui.tests.target;
11
package org.eclipse.pde.ui.tests.target;
12
12
13
import org.eclipse.pde.internal.core.target.provisional.NameVersionDescriptor;
14
15
import java.io.*;
13
import java.io.*;
16
import java.net.URL;
14
import java.net.URL;
17
import java.util.*;
15
import java.util.*;
18
import junit.framework.Test;
16
import junit.framework.Test;
19
import junit.framework.TestSuite;
17
import junit.framework.TestSuite;
20
import org.eclipse.core.runtime.*;
18
import org.eclipse.core.runtime.*;
21
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
19
import org.eclipse.equinox.frameworkadmin.BundleInfo;
22
import org.eclipse.pde.core.plugin.*;
20
import org.eclipse.pde.core.plugin.*;
23
import org.eclipse.pde.internal.core.*;
21
import org.eclipse.pde.internal.core.*;
24
import org.eclipse.pde.internal.core.target.*;
22
import org.eclipse.pde.internal.core.target.TargetDefinition;
23
import org.eclipse.pde.internal.core.target.TargetDefinitionPersistenceHelper;
25
import org.eclipse.pde.internal.core.target.provisional.*;
24
import org.eclipse.pde.internal.core.target.provisional.*;
26
import org.eclipse.pde.internal.launching.launcher.LaunchArgumentsHelper;
25
import org.eclipse.pde.internal.launching.launcher.LaunchArgumentsHelper;
27
import org.eclipse.pde.internal.ui.tests.macro.MacroPlugin;
26
import org.eclipse.pde.internal.ui.tests.macro.MacroPlugin;
(-)src/org/eclipse/pde/ui/tests/target/TargetDefinitionResolutionTests.java (-11 / +4 lines)
Lines 10-33 Link Here
10
 *******************************************************************************/
10
 *******************************************************************************/
11
package org.eclipse.pde.ui.tests.target;
11
package org.eclipse.pde.ui.tests.target;
12
12
13
import org.eclipse.pde.internal.core.target.provisional.NameVersionDescriptor;
14
15
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
16
17
18
19
import org.eclipse.pde.internal.core.target.IUBundleContainer;
20
21
import org.eclipse.pde.internal.core.target.TargetPlatformService;
22
23
import java.io.File;
13
import java.io.File;
24
import junit.framework.Test;
14
import junit.framework.Test;
25
import junit.framework.TestSuite;
15
import junit.framework.TestSuite;
26
import org.eclipse.core.runtime.*;
16
import org.eclipse.core.runtime.*;
27
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
17
import org.eclipse.equinox.frameworkadmin.BundleInfo;
18
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
28
import org.eclipse.jdt.launching.JavaRuntime;
19
import org.eclipse.jdt.launching.JavaRuntime;
29
import org.eclipse.pde.core.plugin.TargetPlatform;
20
import org.eclipse.pde.core.plugin.TargetPlatform;
30
import org.eclipse.pde.internal.core.*;
21
import org.eclipse.pde.internal.core.*;
22
import org.eclipse.pde.internal.core.target.IUBundleContainer;
23
import org.eclipse.pde.internal.core.target.TargetPlatformService;
31
import org.eclipse.pde.internal.core.target.provisional.*;
24
import org.eclipse.pde.internal.core.target.provisional.*;
32
25
33
public class TargetDefinitionResolutionTests extends AbstractTargetTest {
26
public class TargetDefinitionResolutionTests extends AbstractTargetTest {

Return to bug 269496