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

Collapse All | Expand All

(-)META-INF/MANIFEST.MF (-1 / +1 lines)
Lines 9-15 Link Here
9
Export-Package: 
9
Export-Package: 
10
 org.eclipse.pde.core,
10
 org.eclipse.pde.core,
11
 org.eclipse.pde.core.build,
11
 org.eclipse.pde.core.build,
12
 org.eclipse.pde.core.importing,
13
 org.eclipse.pde.core.plugin,
12
 org.eclipse.pde.core.plugin,
14
 org.eclipse.pde.core.project,
13
 org.eclipse.pde.core.project,
15
 org.eclipse.pde.internal.core;x-friends:="org.eclipse.pde.ui,org.eclipse.pde.runtime,org.eclipse.pde.launching",
14
 org.eclipse.pde.internal.core;x-friends:="org.eclipse.pde.ui,org.eclipse.pde.runtime,org.eclipse.pde.launching",
Lines 23-28 Link Here
23
 org.eclipse.pde.internal.core.ibundle;x-friends:="org.eclipse.pde.ui",
22
 org.eclipse.pde.internal.core.ibundle;x-friends:="org.eclipse.pde.ui",
24
 org.eclipse.pde.internal.core.ifeature;x-friends:="org.eclipse.pde.ui",
23
 org.eclipse.pde.internal.core.ifeature;x-friends:="org.eclipse.pde.ui",
25
 org.eclipse.pde.internal.core.importing;x-friends:="org.eclipse.pde.ui",
24
 org.eclipse.pde.internal.core.importing;x-friends:="org.eclipse.pde.ui",
25
 org.eclipse.pde.internal.core.importing.provisional;x-friends:="org.eclipse.pde.ui",
26
 org.eclipse.pde.internal.core.iproduct;x-friends:="org.eclipse.pde.ui",
26
 org.eclipse.pde.internal.core.iproduct;x-friends:="org.eclipse.pde.ui",
27
 org.eclipse.pde.internal.core.ischema;x-friends:="org.eclipse.pde.ui",
27
 org.eclipse.pde.internal.core.ischema;x-friends:="org.eclipse.pde.ui",
28
 org.eclipse.pde.internal.core.isite;x-friends:="org.eclipse.pde.ui",
28
 org.eclipse.pde.internal.core.isite;x-friends:="org.eclipse.pde.ui",
(-)schema/bundleImporters.exsd (-5 / +8 lines)
Lines 6-19 Link Here
6
         <meta.schema plugin="org.eclipse.pde.core" id="bundleImporters" name="Bundle Importers"/>
6
         <meta.schema plugin="org.eclipse.pde.core" id="bundleImporters" name="Bundle Importers"/>
7
      </appInfo>
7
      </appInfo>
8
      <documentation>
8
      <documentation>
9
         A bundle importer is capable of creating a project in the workspace based on specific entries contained in a bundle manifest. An importer can register for one or more bundle headers, identified by name. By default, a bundle importer is registered for the &apos;Eclipse-SourceReferences&apos; header.
9
         &lt;strong&gt;EXPERIMENTAL&lt;/strong&gt;. This extension point has been added as part of a work in progress. There is no guarantee that this API will work or that it will remain the same in future releases. Please do not use this API without consulting with the PDE team.
10
&lt;p&gt;
11
A bundle importer is capable of creating a project in the workspace based on specific entries contained in a bundle manifest. An importer can register for one or more bundle headers, identified by name. By default, a bundle importer is registered for the &apos;Eclipse-SourceReferences&apos; header.
12
&lt;/p&gt;
10
      </documentation>
13
      </documentation>
11
   </annotation>
14
   </annotation>
12
15
13
   <element name="extension">
16
   <element name="extension">
14
      <annotation>
17
      <annotation>
15
         <appInfo>
18
         <appInfo>
16
            <meta.element />
19
            <meta.element internal="true" />
17
         </appInfo>
20
         </appInfo>
18
      </annotation>
21
      </annotation>
19
      <complexType>
22
      <complexType>
Lines 52-61 Link Here
52
         <attribute name="class" type="string" use="required">
55
         <attribute name="class" type="string" use="required">
53
            <annotation>
56
            <annotation>
54
               <documentation>
57
               <documentation>
55
                  Fully qualified name of a Java class providing an implementation of &lt;code&gt;org.eclipse.pde.core.importing.IBundleImporterDelegate&lt;/code&gt; for this handler.
58
                  Fully qualified name of a Java class providing an implementation of &lt;code&gt;org.eclipse.pde.internal.core.importing.provisional.IBundleImporterDelegate&lt;/code&gt; for this handler.
56
               </documentation>
59
               </documentation>
57
               <appInfo>
60
               <appInfo>
58
                  <meta.attribute kind="java" basedOn=":org.eclipse.pde.core.importing.IBundleImporterDelegate"/>
61
                  <meta.attribute kind="java" basedOn=":org.eclipse.pde.internal.core.importing.provisional.IBundleImporterDelegate"/>
59
               </appInfo>
62
               </appInfo>
60
            </annotation>
63
            </annotation>
61
         </attribute>
64
         </attribute>
Lines 123-129 Link Here
123
         <meta.section type="apiinfo"/>
126
         <meta.section type="apiinfo"/>
124
      </appInfo>
127
      </appInfo>
125
      <documentation>
128
      <documentation>
126
         Value of a importer&apos;s &lt;b&gt;class&lt;/b&gt; attribute must be a fully qualified name of a Java class that implements the interface &lt;b&gt;org.eclipse.pde.core.importing.IBundleImporterDelegate&lt;/b&gt;.
129
         Value of a importer&apos;s &lt;b&gt;class&lt;/b&gt; attribute must be a fully qualified name of a Java class that implements the interface &lt;b&gt;org.eclipse.pde.internal.core.importing.provisional.IBundleImporterDelegate&lt;/b&gt;.
127
      </documentation>
130
      </documentation>
128
   </annotation>
131
   </annotation>
129
132
(-)src/org/eclipse/pde/core/importing/BundleImportDescription.java (-107 lines)
Removed Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2010 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.pde.core.importing;
12
13
import java.util.HashMap;
14
import java.util.Map;
15
16
/**
17
 * Describes how a bundle import will be executed. A bundle importer delegate
18
 * creates bundle import descriptions when it validates bundle manifests for
19
 * importing. When asked to import bundles, it is passed back the instances
20
 * of bundle import descriptions is created. However, the target project
21
 * may have been modified and properties may have been modified.
22
 * <p>
23
 * Clients may instantiate this class. Clients may subclass this class to
24
 * implement model specific behavior and include model specific data in import
25
 * descriptions.
26
 * </p> 
27
 * @since 3.6
28
 */
29
public class BundleImportDescription {
30
31
	private String project;
32
	private Map manifest;
33
	private Map properties;
34
35
	/**
36
	 * Constructs a bundle import description with given project and manifest.
37
	 * 
38
	 * @param project the project the bundle should be imported into which may
39
	 *  or may not exist
40
	 * @param manifest bundle manifest headers and values
41
	 */
42
	public BundleImportDescription(String project, Map manifest) {
43
		this.project = project;
44
		this.manifest = manifest;
45
	}
46
47
	/**
48
	 * Sets or removes a client property.
49
	 * 
50
	 * @param key property key
51
	 * @param value property value or <code>null</code> to remove the property
52
	 */
53
	public synchronized void setProperty(String key, Object value) {
54
		if (properties == null) {
55
			properties = new HashMap();
56
		}
57
		if (value == null) {
58
			properties.remove(key);
59
		} else {
60
			properties.put(key, value);
61
		}
62
63
	}
64
65
	/**
66
	 * Returns the specified client property, or <code>null</code> if none.
67
	 * 
68
	 * @param key property key
69
	 * @return property value or <code>null</code>
70
	 */
71
	public synchronized Object getProperty(String key) {
72
		if (properties == null) {
73
			return null;
74
		}
75
		return properties.get(key);
76
	}
77
78
	/**
79
	 * Returns the project name the bundle will be imported into. The project
80
	 * may or may not exist before the import. However, when the import operation
81
	 * beings, the project will not exist.
82
	 * 
83
	 * @return target project
84
	 */
85
	public synchronized String getProject() {
86
		return project;
87
	}
88
89
	/**
90
	 * Returns the manifest of the bundle to be imported.
91
	 * 
92
	 * @return bundle manifest keys and values
93
	 */
94
	public Map getManifest() {
95
		return manifest;
96
	}
97
98
	/**
99
	 * Sets the project name that is the target of the import operation.
100
	 * 
101
	 * @param project target project
102
	 */
103
	public synchronized void setProject(String project) {
104
		this.project = project;
105
	}
106
107
}
(-)src/org/eclipse/pde/core/importing/IBundleImporterDelegate.java (-60 lines)
Removed Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2010 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.pde.core.importing;
12
13
import java.util.Map;
14
import org.eclipse.core.resources.IProject;
15
import org.eclipse.core.runtime.CoreException;
16
import org.eclipse.core.runtime.IProgressMonitor;
17
18
/**
19
 * A bundle importer delegate is contributed by a bundle importer extension and is capable
20
 * of importing projects into the workspace from a repository based on bundle manifest entries.
21
 * <p>
22
 * Following is an example extension:
23
 * <pre>
24
 * &lt;extension point=&quot;org.eclipse.pde.core.bundleImporters&quot;&gt;
25
 *  &lt;importer
26
 *   id=&quot;com.example.ExampleIdentifier&quot;
27
 *   class=&quot;com.example.ExampleBundleImporterDelegate&quot;&gt;
28
 *  &lt;/importer&gt;
29
 * &lt;/extension&gt;
30
 * </pre>
31
 * </p>
32
 * <p>
33
 * Clients contributing bundle importer extensions are intended to implement this interface.
34
 * </p>
35
 * @since 3.6
36
 * @noextend This interface is not intended to be extended by clients.
37
 */
38
public interface IBundleImporterDelegate {
39
40
	/**
41
	 * Returns an array of objects describing how each given bundle (manifest headers and values)
42
	 * can be imported into a workspace project. A <code>null</code> entry in the returned array
43
	 * indicates the corresponding bundle cannot be imported by this delegate.
44
	 * 
45
	 * @param manifests array of maps containing manifest headers and values of the associated bundles
46
	 * @return array of bundle import descriptions that may contain <code>null</code> entries
47
	 */
48
	public BundleImportDescription[] validateImport(Map[] manifests);
49
50
	/**
51
	 * Imports bundles into the workspace creating a project for each import description.
52
	 * Reports progress to the given monitor, if not <code>null</code>.
53
	 * 
54
	 * @param descriptions description of bundles to import
55
	 * @param monitor progress monitor or <code>null</code>
56
	 * @return collection of projects created in the workspace or <code>null</code> if none
57
	 * @throws CoreException if unable to import projects
58
	 */
59
	public IProject[] performImport(BundleImportDescription[] descriptions, IProgressMonitor monitor) throws CoreException;
60
}
(-)src/org/eclipse/pde/core/importing/package.html (-23 lines)
Removed Link Here
1
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
2
<html>
3
<head>
4
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
5
   <meta name="Author" content="IBM">
6
   <title>Package-level Javadoc</title>
7
</head>
8
<body>
9
Application programming interfaces for importing projects into the workspace.
10
<h2>
11
Package Specification</h2>
12
<p>
13
Provides support for importing projects into the workspace from a repository. 
14
</p>
15
<p>
16
A bundle manifest may contain information identifying source code for the bundle
17
or a project in a repository associated with the bundle. Clients may contribute
18
implementations of <code>org.eclipse.pde.core.importing.IBundleImporterDelegate</code>
19
to the <code>org.eclipse.pde.core.bundleImporters</code> extension point to participate
20
in the import of bundles into workspace projects based on bundle manifests.
21
</p>
22
</body>
23
</html>
(-)src/org/eclipse/pde/internal/core/importing/BundleImporterExtension.java (-1 / +2 lines)
Lines 13-20 Link Here
13
import java.util.Map;
13
import java.util.Map;
14
import org.eclipse.core.resources.IProject;
14
import org.eclipse.core.resources.IProject;
15
import org.eclipse.core.runtime.*;
15
import org.eclipse.core.runtime.*;
16
import org.eclipse.pde.core.importing.*;
17
import org.eclipse.pde.internal.core.PDECore;
16
import org.eclipse.pde.internal.core.PDECore;
17
import org.eclipse.pde.internal.core.importing.provisional.BundleImportDescription;
18
import org.eclipse.pde.internal.core.importing.provisional.IBundleImporterDelegate;
18
19
19
/**
20
/**
20
 * A bundle importer extension.
21
 * A bundle importer extension.
(-)src/org/eclipse/pde/internal/core/importing/CvsBundleImportDescription.java (-1 / +2 lines)
Lines 10-17 Link Here
10
 *******************************************************************************/
10
 *******************************************************************************/
11
package org.eclipse.pde.internal.core.importing;
11
package org.eclipse.pde.internal.core.importing;
12
12
13
import org.eclipse.pde.internal.core.importing.provisional.BundleImportDescription;
14
13
import java.util.Map;
15
import java.util.Map;
14
import org.eclipse.pde.core.importing.BundleImportDescription;
15
16
16
/**
17
/**
17
 * Describes a bundle to be imported by CVS.
18
 * Describes a bundle to be imported by CVS.
(-)src/org/eclipse/pde/internal/core/importing/CvsBundleImporterDelegate.java (-2 / +3 lines)
Lines 10-21 Link Here
10
 *******************************************************************************/
10
 *******************************************************************************/
11
package org.eclipse.pde.internal.core.importing;
11
package org.eclipse.pde.internal.core.importing;
12
12
13
import org.eclipse.pde.internal.core.importing.provisional.BundleImportDescription;
14
import org.eclipse.pde.internal.core.importing.provisional.IBundleImporterDelegate;
15
13
import java.util.*;
16
import java.util.*;
14
import org.eclipse.core.resources.IProject;
17
import org.eclipse.core.resources.IProject;
15
import org.eclipse.core.runtime.*;
18
import org.eclipse.core.runtime.*;
16
import org.eclipse.osgi.util.ManifestElement;
19
import org.eclipse.osgi.util.ManifestElement;
17
import org.eclipse.pde.core.importing.BundleImportDescription;
18
import org.eclipse.pde.core.importing.IBundleImporterDelegate;
19
import org.eclipse.pde.internal.core.ICoreConstants;
20
import org.eclipse.pde.internal.core.ICoreConstants;
20
import org.eclipse.pde.internal.core.PDECore;
21
import org.eclipse.pde.internal.core.PDECore;
21
import org.eclipse.team.core.*;
22
import org.eclipse.team.core.*;
(-)src/org/eclipse/pde/internal/core/importing/IBundleImporter.java (-1 / +1 lines)
Lines 10-16 Link Here
10
 *******************************************************************************/
10
 *******************************************************************************/
11
package org.eclipse.pde.internal.core.importing;
11
package org.eclipse.pde.internal.core.importing;
12
12
13
import org.eclipse.pde.core.importing.IBundleImporterDelegate;
13
import org.eclipse.pde.internal.core.importing.provisional.IBundleImporterDelegate;
14
14
15
/**
15
/**
16
 * A bundle importer represents an instance of a bundle importer extension.
16
 * A bundle importer represents an instance of a bundle importer extension.
(-)src/org/eclipse/pde/internal/core/importing/provisional/BundleImportDescription.java (+113 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2010 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.pde.internal.core.importing.provisional;
12
13
import java.util.HashMap;
14
import java.util.Map;
15
16
/**
17
 * Describes how a bundle import will be executed. A bundle importer delegate
18
 * creates bundle import descriptions when it validates bundle manifests for
19
 * importing. When asked to import bundles, it is passed back the instances
20
 * of bundle import descriptions is created. However, the target project
21
 * may have been modified and properties may have been modified.
22
 * <p>
23
 * Clients may instantiate this class. Clients may subclass this class to
24
 * implement model specific behavior and include model specific data in import
25
 * descriptions.
26
 * </p> 
27
 * <p>
28
 * <strong>EXPERIMENTAL</strong>. This class has been added as
29
 * part of a work in progress. There is no guarantee that this API will
30
 * work or that it will remain the same. Please do not use this API without
31
 * consulting with the PDE team.
32
 * </p>
33
 * @since 3.6
34
 */
35
public class BundleImportDescription {
36
37
	private String project;
38
	private Map manifest;
39
	private Map properties;
40
41
	/**
42
	 * Constructs a bundle import description with given project and manifest.
43
	 * 
44
	 * @param project the project the bundle should be imported into which may
45
	 *  or may not exist
46
	 * @param manifest bundle manifest headers and values
47
	 */
48
	public BundleImportDescription(String project, Map manifest) {
49
		this.project = project;
50
		this.manifest = manifest;
51
	}
52
53
	/**
54
	 * Sets or removes a client property.
55
	 * 
56
	 * @param key property key
57
	 * @param value property value or <code>null</code> to remove the property
58
	 */
59
	public synchronized void setProperty(String key, Object value) {
60
		if (properties == null) {
61
			properties = new HashMap();
62
		}
63
		if (value == null) {
64
			properties.remove(key);
65
		} else {
66
			properties.put(key, value);
67
		}
68
69
	}
70
71
	/**
72
	 * Returns the specified client property, or <code>null</code> if none.
73
	 * 
74
	 * @param key property key
75
	 * @return property value or <code>null</code>
76
	 */
77
	public synchronized Object getProperty(String key) {
78
		if (properties == null) {
79
			return null;
80
		}
81
		return properties.get(key);
82
	}
83
84
	/**
85
	 * Returns the project name the bundle will be imported into. The project
86
	 * may or may not exist before the import. However, when the import operation
87
	 * beings, the project will not exist.
88
	 * 
89
	 * @return target project
90
	 */
91
	public synchronized String getProject() {
92
		return project;
93
	}
94
95
	/**
96
	 * Returns the manifest of the bundle to be imported.
97
	 * 
98
	 * @return bundle manifest keys and values
99
	 */
100
	public Map getManifest() {
101
		return manifest;
102
	}
103
104
	/**
105
	 * Sets the project name that is the target of the import operation.
106
	 * 
107
	 * @param project target project
108
	 */
109
	public synchronized void setProject(String project) {
110
		this.project = project;
111
	}
112
113
}
(-)src/org/eclipse/pde/internal/core/importing/provisional/IBundleImporterDelegate.java (+66 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2010 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.pde.internal.core.importing.provisional;
12
13
import java.util.Map;
14
import org.eclipse.core.resources.IProject;
15
import org.eclipse.core.runtime.CoreException;
16
import org.eclipse.core.runtime.IProgressMonitor;
17
18
/**
19
 * A bundle importer delegate is contributed by a bundle importer extension and is capable
20
 * of importing projects into the workspace from a repository based on bundle manifest entries.
21
 * <p>
22
 * Following is an example extension:
23
 * <pre>
24
 * &lt;extension point=&quot;org.eclipse.pde.core.bundleImporters&quot;&gt;
25
 *  &lt;importer
26
 *   id=&quot;com.example.ExampleIdentifier&quot;
27
 *   class=&quot;com.example.ExampleBundleImporterDelegate&quot;&gt;
28
 *  &lt;/importer&gt;
29
 * &lt;/extension&gt;
30
 * </pre>
31
 * </p>
32
 * <p>
33
 * Clients contributing bundle importer extensions are intended to implement this interface.
34
 * </p>
35
 * <p>
36
 * <strong>EXPERIMENTAL</strong>. This interface has been added as
37
 * part of a work in progress. There is no guarantee that this API will
38
 * work or that it will remain the same. Please do not use this API without
39
 * consulting with the PDE team.
40
 * </p>
41
 * @since 3.6
42
 * @noextend This interface is not intended to be extended by clients.
43
 */
44
public interface IBundleImporterDelegate {
45
46
	/**
47
	 * Returns an array of objects describing how each given bundle (manifest headers and values)
48
	 * can be imported into a workspace project. A <code>null</code> entry in the returned array
49
	 * indicates the corresponding bundle cannot be imported by this delegate.
50
	 * 
51
	 * @param manifests array of maps containing manifest headers and values of the associated bundles
52
	 * @return array of bundle import descriptions that may contain <code>null</code> entries
53
	 */
54
	public BundleImportDescription[] validateImport(Map[] manifests);
55
56
	/**
57
	 * Imports bundles into the workspace creating a project for each import description.
58
	 * Reports progress to the given monitor, if not <code>null</code>.
59
	 * 
60
	 * @param descriptions description of bundles to import
61
	 * @param monitor progress monitor or <code>null</code>
62
	 * @return collection of projects created in the workspace or <code>null</code> if none
63
	 * @throws CoreException if unable to import projects
64
	 */
65
	public IProject[] performImport(BundleImportDescription[] descriptions, IProgressMonitor monitor) throws CoreException;
66
}
(-)src/org/eclipse/pde/internal/core/importing/provisional/package.html (+23 lines)
Added Link Here
1
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
2
<html>
3
<head>
4
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
5
   <meta name="Author" content="IBM">
6
   <title>Package-level Javadoc</title>
7
</head>
8
<body>
9
Application programming interfaces for importing projects into the workspace.
10
<h2>
11
Package Specification</h2>
12
<p>
13
Provides support for importing projects into the workspace from a repository. 
14
</p>
15
<p>
16
A bundle manifest may contain information identifying source code for the bundle
17
or a project in a repository associated with the bundle. Clients may contribute
18
implementations of <code>org.eclipse.pde.core.importing.IBundleImporterDelegate</code>
19
to the <code>org.eclipse.pde.core.bundleImporters</code> extension point to participate
20
in the import of bundles into workspace projects based on bundle manifests.
21
</p>
22
</body>
23
</html>
(-)src/org/eclipse/pde/internal/core/project/BundleProjectService.java (-1 / +2 lines)
Lines 10-20 Link Here
10
 *******************************************************************************/
10
 *******************************************************************************/
11
package org.eclipse.pde.internal.core.project;
11
package org.eclipse.pde.internal.core.project;
12
12
13
import org.eclipse.pde.internal.core.importing.provisional.BundleImportDescription;
14
13
import org.eclipse.pde.internal.core.importing.IBundleImporter;
15
import org.eclipse.pde.internal.core.importing.IBundleImporter;
14
16
15
import org.eclipse.pde.internal.core.importing.BundleImporterExtension;
17
import org.eclipse.pde.internal.core.importing.BundleImporterExtension;
16
18
17
import org.eclipse.pde.core.importing.BundleImportDescription;
18
19
19
import java.io.*;
20
import java.io.*;
20
import java.util.*;
21
import java.util.*;
(-)pdeOptions.txt (-1 lines)
Lines 73-79 Link Here
73
org.eclipse.pde.build
73
org.eclipse.pde.build
74
org.eclipse.pde.core
74
org.eclipse.pde.core
75
org.eclipse.pde.core.build
75
org.eclipse.pde.core.build
76
org.eclipse.pde.core.importing
77
org.eclipse.pde.core.plugin
76
org.eclipse.pde.core.plugin
78
org.eclipse.pde.core.project
77
org.eclipse.pde.core.project
79
org.eclipse.pde.ui
78
org.eclipse.pde.ui
(-)topics_Reference.xml (-2 lines)
Lines 278-285 Link Here
278
   </topic>
278
   </topic>
279
   <topic href="reference/api/org/eclipse/pde/core/build/package-summary.html" label="org.eclipse.pde.core.build">
279
   <topic href="reference/api/org/eclipse/pde/core/build/package-summary.html" label="org.eclipse.pde.core.build">
280
   </topic>
280
   </topic>
281
   <topic href="reference/api/org/eclipse/pde/core/importing/package-summary.html" label="org.eclipse.pde.core.importing">
282
   </topic>
283
   <topic href="reference/api/org/eclipse/pde/core/plugin/package-summary.html" label="org.eclipse.pde.core.plugin">
281
   <topic href="reference/api/org/eclipse/pde/core/plugin/package-summary.html" label="org.eclipse.pde.core.plugin">
284
   </topic>
282
   </topic>
285
   <topic href="reference/api/org/eclipse/pde/core/project/package-summary.html" label="org.eclipse.pde.core.project">
283
   <topic href="reference/api/org/eclipse/pde/core/project/package-summary.html" label="org.eclipse.pde.core.project">
(-).settings/org.eclipse.jdt.ui.prefs (-2 / +2 lines)
Lines 1-11 Link Here
1
#Sun Dec 23 21:49:35 CST 2007
1
#Sun Feb 28 21:27:07 CST 2010
2
eclipse.preferences.version=1
2
eclipse.preferences.version=1
3
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
3
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
4
formatter_profile=_core
4
formatter_profile=_core
5
formatter_settings_version=11
5
formatter_settings_version=11
6
org.eclipse.jdt.ui.ignorelowercasenames=true
6
org.eclipse.jdt.ui.ignorelowercasenames=true
7
org.eclipse.jdt.ui.importorder=;
7
org.eclipse.jdt.ui.importorder=;
8
org.eclipse.jdt.ui.ondemandthreshold=3
8
org.eclipse.jdt.ui.ondemandthreshold=12
9
org.eclipse.jdt.ui.staticondemandthreshold=99
9
org.eclipse.jdt.ui.staticondemandthreshold=99
10
sp_cleanup.add_default_serial_version_id=true
10
sp_cleanup.add_default_serial_version_id=true
11
sp_cleanup.add_generated_serial_version_id=false
11
sp_cleanup.add_generated_serial_version_id=false
(-)schema/bundleImportPages.exsd (-6 / +9 lines)
Lines 3-19 Link Here
3
<schema targetNamespace="org.eclipse.pde.ui" xmlns="http://www.w3.org/2001/XMLSchema">
3
<schema targetNamespace="org.eclipse.pde.ui" xmlns="http://www.w3.org/2001/XMLSchema">
4
<annotation>
4
<annotation>
5
      <appInfo>
5
      <appInfo>
6
         <meta.schema plugin="org.eclipse.pde.ui" id="bundleImportPages" name="%expoint.bundleImportPages.name"/>
6
         <meta.schema plugin="org.eclipse.pde.ui" id="bundleImportPages" name="Bundle Import Pages"/>
7
      </appInfo>
7
      </appInfo>
8
      <documentation>
8
      <documentation>
9
         A bundle import page provides a wizard page that can be used in the Plug-in import wizard to configure settings for bundles to be imported by a &lt;code&gt;org.eclipse.pde.core.bundleImporters&lt;/code&gt; extension.
9
         &lt;strong&gt;EXPERIMENTAL&lt;/strong&gt;. This extension point has been added as part of a work in progress. There is no guarantee that this API will work or that it will remain the same in future releases. Please do not use this API without consulting with the PDE team.
10
&lt;p&gt;
11
A bundle import page provides a wizard page that can be used in the Plug-in import wizard to configure settings for bundles to be imported by a &lt;code&gt;org.eclipse.pde.core.bundleImporters&lt;/code&gt; extension.
12
&lt;/p&gt;
10
      </documentation>
13
      </documentation>
11
   </annotation>
14
   </annotation>
12
15
13
   <element name="extension">
16
   <element name="extension">
14
      <annotation>
17
      <annotation>
15
         <appInfo>
18
         <appInfo>
16
            <meta.element />
19
            <meta.element internal="true" />
17
         </appInfo>
20
         </appInfo>
18
      </annotation>
21
      </annotation>
19
      <complexType>
22
      <complexType>
Lines 59-68 Link Here
59
         <attribute name="class" type="string" use="required">
62
         <attribute name="class" type="string" use="required">
60
            <annotation>
63
            <annotation>
61
               <documentation>
64
               <documentation>
62
                  Fully qualified name of a Java class providing an implementation of &lt;code&gt;org.eclipse.pde.ui.IBundeImportWizardPage&lt;/code&gt;.
65
                  Fully qualified name of a Java class providing an implementation of &lt;code&gt;org.eclipse.pde.internal.ui.provisional.IBundeImportWizardPage&lt;/code&gt;.
63
               </documentation>
66
               </documentation>
64
               <appInfo>
67
               <appInfo>
65
                  <meta.attribute kind="java" basedOn=":org.eclipse.pde.ui.IBundeImportWizardPage"/>
68
                  <meta.attribute kind="java" basedOn=":org.eclipse.pde.internal.ui.provisional.IBundeImportWizardPage"/>
66
               </appInfo>
69
               </appInfo>
67
            </annotation>
70
            </annotation>
68
         </attribute>
71
         </attribute>
Lines 114-120 Link Here
114
         <meta.section type="apiinfo"/>
117
         <meta.section type="apiinfo"/>
115
      </appInfo>
118
      </appInfo>
116
      <documentation>
119
      <documentation>
117
         Value of a page&apos;s &lt;b&gt;class&lt;/b&gt; attribute must be a fully qualified name of a Java class that implements the interface &lt;b&gt;org.eclipse.pde.ui.IBundeImportWizardPage&lt;/b&gt;.
120
         Value of a page&apos;s &lt;b&gt;class&lt;/b&gt; attribute must be a fully qualified name of a Java class that implements the interface &lt;b&gt;org.eclipse.pde.internal.ui.provisional.IBundeImportWizardPage&lt;/b&gt;.
118
      </documentation>
121
      </documentation>
119
   </annotation>
122
   </annotation>
120
123
(-)src/org/eclipse/pde/internal/ui/provisional/IBundeImportWizardPage.java (+58 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2010 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.pde.internal.ui.provisional;
12
13
import org.eclipse.jface.wizard.IWizardPage;
14
import org.eclipse.pde.internal.core.importing.provisional.BundleImportDescription;
15
16
/**
17
 * A wizard page contributed by a <code>org.eclipse.pde.ui.bundleImportPages</code>
18
 * extension.
19
 * <p>
20
 * <strong>EXPERIMENTAL</strong>. This interface has been added as
21
 * part of a work in progress. There is no guarantee that this API will
22
 * work or that it will remain the same. Please do not use this API without
23
 * consulting with the PDE team.
24
 * </p>
25
 * @since 3.6
26
 */
27
public interface IBundeImportWizardPage extends IWizardPage {
28
	/**
29
	 * Called when the import wizard is closed by selecting 
30
	 * the finish button.
31
	 * Implementers may store the page result (new/changed bundle
32
	 * import descriptions in getSelection) here.
33
	 * 
34
	 * @return if the operation was successful. The wizard will only close
35
	 * when <code>true</code> is returned.
36
	 */
37
	public boolean finish();
38
39
	/**
40
	 * Returns the bundle import descriptions edited or created on the page 
41
	 * after the wizard has closed.
42
	 * Returns bundle import descriptions initially set using 
43
	 * <code>setSelection</code>if the wizard has not been 
44
	 * closed yet.
45
	 * 
46
	 * @return the bundle import descriptions edited or created on the page.
47
	 */
48
	public BundleImportDescription[] getSelection();
49
50
	/**
51
	 * Sets the bundle import descriptions to be edited on the page.
52
	 * The passed descriptions can be edited and should be 
53
	 * returned in getSelection().
54
	 * 
55
	 * @param descriptions the bundle import descriptions edited on the page.
56
	 */
57
	public void setSelection(BundleImportDescription[] descriptions);
58
}
(-)src/org/eclipse/pde/internal/ui/wizards/imports/CVSBundleImportPage.java (-2 / +4 lines)
Lines 10-15 Link Here
10
 *******************************************************************************/
10
 *******************************************************************************/
11
package org.eclipse.pde.internal.ui.wizards.imports;
11
package org.eclipse.pde.internal.ui.wizards.imports;
12
12
13
import org.eclipse.pde.internal.ui.provisional.IBundeImportWizardPage;
14
15
import org.eclipse.pde.internal.core.importing.provisional.BundleImportDescription;
16
13
import org.eclipse.jface.dialogs.IDialogSettings;
17
import org.eclipse.jface.dialogs.IDialogSettings;
14
import org.eclipse.jface.viewers.ArrayContentProvider;
18
import org.eclipse.jface.viewers.ArrayContentProvider;
15
import org.eclipse.jface.viewers.ILabelProvider;
19
import org.eclipse.jface.viewers.ILabelProvider;
Lines 19-29 Link Here
19
import org.eclipse.jface.viewers.ViewerCell;
23
import org.eclipse.jface.viewers.ViewerCell;
20
import org.eclipse.jface.viewers.ViewerComparator;
24
import org.eclipse.jface.viewers.ViewerComparator;
21
import org.eclipse.jface.wizard.WizardPage;
25
import org.eclipse.jface.wizard.WizardPage;
22
import org.eclipse.pde.core.importing.BundleImportDescription;
23
import org.eclipse.pde.internal.core.importing.CvsBundleImportDescription;
26
import org.eclipse.pde.internal.core.importing.CvsBundleImportDescription;
24
import org.eclipse.pde.internal.ui.PDEUIMessages;
27
import org.eclipse.pde.internal.ui.PDEUIMessages;
25
import org.eclipse.pde.internal.ui.SWTFactory;
28
import org.eclipse.pde.internal.ui.SWTFactory;
26
import org.eclipse.pde.ui.IBundeImportWizardPage;
27
import org.eclipse.swt.SWT;
29
import org.eclipse.swt.SWT;
28
import org.eclipse.swt.events.SelectionAdapter;
30
import org.eclipse.swt.events.SelectionAdapter;
29
import org.eclipse.swt.events.SelectionEvent;
31
import org.eclipse.swt.events.SelectionEvent;
(-)src/org/eclipse/pde/internal/ui/wizards/imports/PluginImportOperation.java (-1 / +2 lines)
Lines 10-15 Link Here
10
 *******************************************************************************/
10
 *******************************************************************************/
11
package org.eclipse.pde.internal.ui.wizards.imports;
11
package org.eclipse.pde.internal.ui.wizards.imports;
12
12
13
import org.eclipse.pde.internal.core.importing.provisional.BundleImportDescription;
14
13
import org.eclipse.pde.internal.core.importing.IBundleImporter;
15
import org.eclipse.pde.internal.core.importing.IBundleImporter;
14
16
15
import java.io.File;
17
import java.io.File;
Lines 55-61 Link Here
55
import org.eclipse.osgi.util.NLS;
57
import org.eclipse.osgi.util.NLS;
56
import org.eclipse.pde.core.build.IBuild;
58
import org.eclipse.pde.core.build.IBuild;
57
import org.eclipse.pde.core.build.IBuildEntry;
59
import org.eclipse.pde.core.build.IBuildEntry;
58
import org.eclipse.pde.core.importing.BundleImportDescription;
59
import org.eclipse.pde.core.plugin.IPluginBase;
60
import org.eclipse.pde.core.plugin.IPluginBase;
60
import org.eclipse.pde.core.plugin.IPluginLibrary;
61
import org.eclipse.pde.core.plugin.IPluginLibrary;
61
import org.eclipse.pde.core.plugin.IPluginModelBase;
62
import org.eclipse.pde.core.plugin.IPluginModelBase;
(-)src/org/eclipse/pde/internal/ui/wizards/imports/PluginImportWizardFirstPage.java (-2 / +4 lines)
Lines 10-15 Link Here
10
 *******************************************************************************/
10
 *******************************************************************************/
11
package org.eclipse.pde.internal.ui.wizards.imports;
11
package org.eclipse.pde.internal.ui.wizards.imports;
12
12
13
import org.eclipse.pde.internal.ui.provisional.IBundeImportWizardPage;
14
15
import org.eclipse.pde.internal.core.importing.provisional.BundleImportDescription;
16
13
import org.eclipse.pde.internal.core.importing.IBundleImporter;
17
import org.eclipse.pde.internal.core.importing.IBundleImporter;
14
18
15
import java.io.File;
19
import java.io.File;
Lines 44-50 Link Here
44
import org.eclipse.jface.wizard.IWizardPage;
48
import org.eclipse.jface.wizard.IWizardPage;
45
import org.eclipse.jface.wizard.Wizard;
49
import org.eclipse.jface.wizard.Wizard;
46
import org.eclipse.jface.wizard.WizardPage;
50
import org.eclipse.jface.wizard.WizardPage;
47
import org.eclipse.pde.core.importing.BundleImportDescription;
48
import org.eclipse.pde.core.plugin.IPluginBase;
51
import org.eclipse.pde.core.plugin.IPluginBase;
49
import org.eclipse.pde.core.plugin.IPluginModelBase;
52
import org.eclipse.pde.core.plugin.IPluginModelBase;
50
import org.eclipse.pde.core.plugin.PluginRegistry;
53
import org.eclipse.pde.core.plugin.PluginRegistry;
Lines 67-73 Link Here
67
import org.eclipse.pde.internal.ui.PDEUIMessages;
70
import org.eclipse.pde.internal.ui.PDEUIMessages;
68
import org.eclipse.pde.internal.ui.SWTFactory;
71
import org.eclipse.pde.internal.ui.SWTFactory;
69
import org.eclipse.pde.internal.ui.preferences.TargetPlatformPreferenceNode;
72
import org.eclipse.pde.internal.ui.preferences.TargetPlatformPreferenceNode;
70
import org.eclipse.pde.ui.IBundeImportWizardPage;
71
import org.eclipse.swt.SWT;
73
import org.eclipse.swt.SWT;
72
import org.eclipse.swt.custom.BusyIndicator;
74
import org.eclipse.swt.custom.BusyIndicator;
73
import org.eclipse.swt.events.ModifyEvent;
75
import org.eclipse.swt.events.ModifyEvent;
(-)src/org/eclipse/pde/ui/IBundeImportWizardPage.java (-54 lines)
Removed Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2010 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.pde.ui;
12
13
import org.eclipse.jface.wizard.IWizardPage;
14
import org.eclipse.pde.core.importing.BundleImportDescription;
15
16
/**
17
 * A wizard page contributed by a <code>org.eclipse.pde.ui.bundleImportPages</code>
18
 * extension.
19
 * 
20
 * @since 3.6
21
 *
22
 */
23
public interface IBundeImportWizardPage extends IWizardPage {
24
	/**
25
	 * Called when the import wizard is closed by selecting 
26
	 * the finish button.
27
	 * Implementers may store the page result (new/changed bundle
28
	 * import descriptions in getSelection) here.
29
	 * 
30
	 * @return if the operation was successful. The wizard will only close
31
	 * when <code>true</code> is returned.
32
	 */
33
	public boolean finish();
34
35
	/**
36
	 * Returns the bundle import descriptions edited or created on the page 
37
	 * after the wizard has closed.
38
	 * Returns bundle import descriptions initially set using 
39
	 * <code>setSelection</code>if the wizard has not been 
40
	 * closed yet.
41
	 * 
42
	 * @return the bundle import descriptions edited or created on the page.
43
	 */
44
	public BundleImportDescription[] getSelection();
45
46
	/**
47
	 * Sets the bundle import descriptions to be edited on the page.
48
	 * The passed descriptions can be edited and should be 
49
	 * returned in getSelection().
50
	 * 
51
	 * @param descriptions the bundle import descriptions edited on the page.
52
	 */
53
	public void setSelection(BundleImportDescription[] descriptions);
54
}
(-)src/org/eclipse/pde/ui/tests/project/BundleImporterTests.java (-1 / +2 lines)
Lines 10-22 Link Here
10
 *******************************************************************************/
10
 *******************************************************************************/
11
package org.eclipse.pde.ui.tests.project;
11
package org.eclipse.pde.ui.tests.project;
12
12
13
import org.eclipse.pde.internal.core.importing.provisional.BundleImportDescription;
14
13
import org.eclipse.pde.internal.core.importing.IBundleImporter;
15
import org.eclipse.pde.internal.core.importing.IBundleImporter;
14
16
15
import java.util.HashMap;
17
import java.util.HashMap;
16
import java.util.Map;
18
import java.util.Map;
17
import junit.framework.*;
19
import junit.framework.*;
18
import org.eclipse.core.runtime.CoreException;
20
import org.eclipse.core.runtime.CoreException;
19
import org.eclipse.pde.core.importing.BundleImportDescription;
20
import org.eclipse.pde.internal.core.ICoreConstants;
21
import org.eclipse.pde.internal.core.ICoreConstants;
21
import org.eclipse.pde.internal.core.importing.CvsBundleImportDescription;
22
import org.eclipse.pde.internal.core.importing.CvsBundleImportDescription;
22
import org.eclipse.pde.internal.core.project.BundleProjectService;
23
import org.eclipse.pde.internal.core.project.BundleProjectService;

Return to bug 195729