View | Details | Raw Unified | Return to bug 225107
Collapse All | Expand All

(-)src/org/eclipse/pde/internal/core/TargetPlatformHelper.java (-1 / +1 lines)
Lines 95-101 Link Here
95
		StringTokenizer tokenizer = new StringTokenizer(osgiBundles, ","); //$NON-NLS-1$
95
		StringTokenizer tokenizer = new StringTokenizer(osgiBundles, ","); //$NON-NLS-1$
96
		while (tokenizer.hasMoreElements()) {
96
		while (tokenizer.hasMoreElements()) {
97
			String token = tokenizer.nextToken();
97
			String token = tokenizer.nextToken();
98
			token = token.replaceAll("\\\\:", ":"); //$NON-NLS-1$ //$NON-NLS-2$
98
			token = token.replaceAll("\\\\:|/:", ":"); //$NON-NLS-1$ //$NON-NLS-2$
99
99
100
			// read up until the first @, if there
100
			// read up until the first @, if there
101
			int atIndex = token.indexOf('@');
101
			int atIndex = token.indexOf('@');
(-)src/org/eclipse/pde/ui/tests/target/TargetPlatformHelperTests.java (-25 / +27 lines)
Lines 10-16 Link Here
10
 *******************************************************************************/
10
 *******************************************************************************/
11
package org.eclipse.pde.ui.tests.target;
11
package org.eclipse.pde.ui.tests.target;
12
12
13
import java.io.File;
13
import junit.framework.*;
14
import junit.framework.*;
15
import org.eclipse.pde.internal.core.TargetPlatformHelper;
14
16
15
/**
17
/**
16
 * Tests TargetPlatformHelper.java convenience methods
18
 * Tests TargetPlatformHelper.java convenience methods
Lines 22-53 Link Here
22
		return new TestSuite(TargetPlatformHelperTests.class);
24
		return new TestSuite(TargetPlatformHelperTests.class);
23
	}
25
	}
24
	
26
	
25
//	public void testStripPathInformation(){
27
	public void testStripPathInformation(){
26
//		String[] bundleStrings = new String[]{
28
		String[] bundleStrings = new String[]{
27
//				"org.eclipse.osgi",
29
				"org.eclipse.osgi0",
28
//				"org.eclipse.osgi.jar",
30
				"org.eclipse.osgi1.jar",
29
//				"org.eclipse.osgi_3.4.0.v20080310.jar",
31
				"org.eclipse.osgi2_3.4.0.v20080310.jar",
30
//				"file:plugins\\org.eclipse.osgi_3.4.0.v20080310.jar",
32
				"file:plugins" + File.separatorChar + "org.eclipse.osgi3_3.4.0.v20080310.jar",
31
//				"file\\:plugins\\\\org.eclipse.osgi_3.4.0.v20080310.jar",
33
				"file" + File.separatorChar + ":plugins" + File.separatorChar + "" + File.separatorChar + "org.eclipse.osgi4_3.4.0.v20080310.jar",
32
//				"reference:file:plugins\\org.eclipse.osgi_3.4.0.v20080310.jar",
34
				"reference:file:plugins" + File.separatorChar + "org.eclipse.osgi5_3.4.0.v20080310.jar",
33
//				"osgi.framework=file\\:plugins\\\\org.eclipse.osgi_3.4.0.v20080310.jar",
35
				"osgi.framework=file" + File.separatorChar + ":plugins" + File.separatorChar + "" + File.separatorChar + "org.eclipse.osgi6_3.4.0.v20080310.jar",
34
//				"platform:\\file\\:plugins\\\\org.eclipse.osgi_3.4.0.v20080310.jar",
36
				"platform:" + File.separatorChar + "file" + File.separatorChar + ":plugins" + File.separatorChar + "" + File.separatorChar + "org.eclipse.osgi7_3.4.0.v20080310.jar",
35
//				"org.eclipse.osgi@1:start",
37
				"org.eclipse.osgi8@1:start",
36
//				"org.eclipse.osgi.jar@1\\:start",
38
				"org.eclipse.osgi9.jar@1" + File.separatorChar + ":start",
37
//				"platform\\:file\\:C\\:/Eclipse/eclipse-SDK-N20080312-2000-win32/eclipse/plugins/org.eclipse.osgi_0.1.0.N20080312-2000.jar@1\\:start",
39
				"platform" + File.separatorChar + ":file" + File.separatorChar + ":C" + File.separatorChar + ":/Eclipse/eclipse-SDK-N20080312-2000-win32/eclipse/plugins/org.eclipse.osgi10_0.1.0.N20080312-2000.jar@1" + File.separatorChar + ":start",
38
//				"reference\\:file\\:C\\:/Eclipse/eclipse-SDK-N20080312-2000-win32/eclipse/plugins/org.eclipse.osgi_0.1.0.N20080312-2000.jar@1\\:start",
40
				"reference" + File.separatorChar + ":file" + File.separatorChar + ":C" + File.separatorChar + ":/Eclipse/eclipse-SDK-N20080312-2000-win32/eclipse/plugins/org.eclipse.osgi11_0.1.0.N20080312-2000.jar@1" + File.separatorChar + ":start",
39
//		};
41
		};
40
//		
42
		
41
//		for (int i = 0; i < bundleStrings.length; i++) {
43
		for (int i = 0; i < bundleStrings.length; i++) {
42
//			System.out.println(TargetPlatformHelper.stripPathInformation(bundleStrings[i]));
44
//			System.out.println(TargetPlatformHelper.stripPathInformation(bundleStrings[i]));
43
//			if (i <= 7){ 
45
			if (i <= 7){ 
44
//				assertEquals("Bundle path was not stripped properly", "org.eclipse.osgi", TargetPlatformHelper.stripPathInformation(bundleStrings[i]));
46
				assertEquals("Bundle path was not stripped properly", "org.eclipse.osgi" + i, TargetPlatformHelper.stripPathInformation(bundleStrings[i]));
45
//			} else {
47
			} else {
46
//				assertEquals("Bundle path was not stripped properly", "org.eclipse.osgi@1:start", TargetPlatformHelper.stripPathInformation(bundleStrings[i]));
48
				assertEquals("Bundle path was not stripped properly", "org.eclipse.osgi" + i + "@1:start", TargetPlatformHelper.stripPathInformation(bundleStrings[i]));
47
//			}
49
			}
48
//		}
50
		}
49
//
51
50
//	}
52
	}
51
53
52
	
54
	
53
}
55
}

Return to bug 225107