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

Collapse All | Expand All

(-)src/org/eclipse/pde/internal/ui/pderesources.properties (+2 lines)
Lines 1502-1507 Link Here
1502
RenameProjectChange_name=Rename ''{0}'' to ''{1}''
1502
RenameProjectChange_name=Rename ''{0}'' to ''{1}''
1503
RenameAutostartResolution_desc=Rename the deprecated Eclipse-AutoStart to Eclipse-LazyStart.  The semantics of the header remain the same.
1503
RenameAutostartResolution_desc=Rename the deprecated Eclipse-AutoStart to Eclipse-LazyStart.  The semantics of the header remain the same.
1504
RenameProjectChange_taskTitle=rename project
1504
RenameProjectChange_taskTitle=rename project
1505
RenameProvidePackageResolution_desc=Rename the deprecated Provide-Package to Export-Package.
1506
RenameProvidePackageResolution_label=rename to Provide-Package
1505
RenameAutostartResolution_label=rename to Eclipse-LazyStart
1507
RenameAutostartResolution_label=rename to Eclipse-LazyStart
1506
RenamePluginWizardPage_idNotSet=ID is not set
1508
RenamePluginWizardPage_idNotSet=ID is not set
1507
RenamePluginWizardPage_invalidId=Invalid ID
1509
RenamePluginWizardPage_invalidId=Invalid ID
(-)src/org/eclipse/pde/internal/ui/PDEUIMessages.java (+4 lines)
Lines 329-334 Link Here
329
329
330
	public static String RenameProjectChange_taskTitle;
330
	public static String RenameProjectChange_taskTitle;
331
331
332
	public static String RenameProvidePackageResolution_desc;
333
334
	public static String RenameProvidePackageResolution_label;
335
332
	public static String RequiresSection_sortAlpha;
336
	public static String RequiresSection_sortAlpha;
333
337
334
	public static String SchemaDtdDetailsSection_title;
338
	public static String SchemaDtdDetailsSection_title;
(-)src/org/eclipse/pde/internal/ui/correction/ResolutionGenerator.java (-1 / +3 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2006 IBM Corporation and others.
2
 * Copyright (c) 2005, 2007 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 89-94 Link Here
89
				return new IMarkerResolution[] {
89
				return new IMarkerResolution[] {
90
						new CreateClassXMLResolution(AbstractPDEMarkerResolution.CREATE_TYPE, marker),
90
						new CreateClassXMLResolution(AbstractPDEMarkerResolution.CREATE_TYPE, marker),
91
						new ChooseClassXMLResolution(AbstractPDEMarkerResolution.RENAME_TYPE, marker)};
91
						new ChooseClassXMLResolution(AbstractPDEMarkerResolution.RENAME_TYPE, marker)};
92
			case PDEMarkerFactory.M_DEPRECATED_PROVIDE_PACKAGE:
93
				return new IMarkerResolution[] {new RenameProvidePackageResolution(AbstractPDEMarkerResolution.RENAME_TYPE)};
92
		}
94
		}
93
		return NO_RESOLUTIONS;
95
		return NO_RESOLUTIONS;
94
	}
96
	}
(-)src/org/eclipse/pde/internal/ui/correction/RenameProvidePackageResolution.java (+37 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2007 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
 *     Brock Janiczak <brockj@tpg.com.au> - bug 169373
11
 *******************************************************************************/
12
package org.eclipse.pde.internal.ui.correction;
13
14
import org.eclipse.pde.internal.core.ICoreConstants;
15
import org.eclipse.pde.internal.core.text.bundle.BundleModel;
16
import org.eclipse.pde.internal.ui.PDEUIMessages;
17
import org.osgi.framework.Constants;
18
19
public class RenameProvidePackageResolution extends AbstractManifestMarkerResolution {
20
21
	public RenameProvidePackageResolution(int type) {
22
		super(type);
23
	}
24
25
	public String getDescription() {
26
		return PDEUIMessages.RenameProvidePackageResolution_desc;
27
	}
28
29
	public String getLabel() {
30
		return PDEUIMessages.RenameProvidePackageResolution_label;
31
	}
32
33
	protected void createChange(BundleModel model) {
34
		model.getBundle().renameHeader(ICoreConstants.PROVIDE_PACKAGE, Constants.EXPORT_PACKAGE);
35
	}
36
	
37
}
(-)src/org/eclipse/pde/internal/core/builders/BundleErrorReporter.java (+14 lines)
Lines 108-113 Link Here
108
		validateTranslatableHeaders();
108
		validateTranslatableHeaders();
109
		validateImportExportServices();
109
		validateImportExportServices();
110
		validateBundleLocalization();
110
		validateBundleLocalization();
111
		validateProvidePackage();
111
	}
112
	}
112
113
113
	private void validateExportPackages() {
114
	private void validateExportPackages() {
Lines 1117-1120 Link Here
1117
			}
1118
			}
1118
		}
1119
		}
1119
	}
1120
	}
1121
	
1122
	private void validateProvidePackage() {
1123
		IHeader header = getHeader(ICoreConstants.PROVIDE_PACKAGE);
1124
		if(header == null)
1125
			return;
1126
		
1127
		if (fOsgiR4 && isCheckDeprecated()) {
1128
			report(PDECoreMessages.BundleErrorReporter_providePackageHeaderDeprecated,
1129
					header.getLineNumber() + 1, CompilerFlags.P_DEPRECATED,
1130
					PDEMarkerFactory.M_DEPRECATED_PROVIDE_PACKAGE,
1131
					PDEMarkerFactory.CAT_OTHER);
1132
		}
1133
	}
1120
}
1134
}
(-)src/org/eclipse/pde/internal/core/builders/PDEMarkerFactory.java (-1 / +2 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2006 IBM Corporation and others.
2
 * Copyright (c) 2000, 2007 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 39-44 Link Here
39
	public static final int M_DEPRECATED_EXPORT_SERVICE = 0x1016; // deprecation
39
	public static final int M_DEPRECATED_EXPORT_SERVICE = 0x1016; // deprecation
40
	public static final int M_UNECESSARY_DEP = 0x1017; // other problem
40
	public static final int M_UNECESSARY_DEP = 0x1017; // other problem
41
	public static final int M_MISSING_EXPORT_PKGS = 0x1018; // other problem
41
	public static final int M_MISSING_EXPORT_PKGS = 0x1018; // other problem
42
	public static final int M_DEPRECATED_PROVIDE_PACKAGE = 0x1019; // deprecation
42
	
43
	
43
	// build properties fixes
44
	// build properties fixes
44
	public static final int B_APPEND_SLASH_FOLDER_ENTRY = 0x2001;
45
	public static final int B_APPEND_SLASH_FOLDER_ENTRY = 0x2001;
(-)src/org/eclipse/pde/internal/core/pderesources.properties (+1 lines)
Lines 119-124 Link Here
119
BundleErrorReporter_localization_folder_not_exist=Folder specified for localization does not exist
119
BundleErrorReporter_localization_folder_not_exist=Folder specified for localization does not exist
120
BundleErrorReporter_deprecated_attribute_reprovide = Attribute ''{0}'' is deprecated.  Use ''visibility:=private'' or ''visibility:=reexport'' directive instead
120
BundleErrorReporter_deprecated_attribute_reprovide = Attribute ''{0}'' is deprecated.  Use ''visibility:=private'' or ''visibility:=reexport'' directive instead
121
BundleErrorReporter_deprecated_attribute_singleton = Attribute 'singleton' is deprecated.  Use the 'singleton' directive instead
121
BundleErrorReporter_deprecated_attribute_singleton = Attribute 'singleton' is deprecated.  Use the 'singleton' directive instead
122
BundleErrorReporter_providePackageHeaderDeprecated=Provide-Package header is deprecated, use Export-Package
122
BundleErrorReporter_deprecated_attribute_specification_version = Attribute ''{0}'' is deprecated.  Use ''version'' attribute instead
123
BundleErrorReporter_deprecated_attribute_specification_version = Attribute ''{0}'' is deprecated.  Use ''version'' attribute instead
123
BundleErrorReporter_directive_hasNoEffectWith_ = the ''{0}'' directive has no effect in the presence of the ''{1}'' directive
124
BundleErrorReporter_directive_hasNoEffectWith_ = the ''{0}'' directive has no effect in the presence of the ''{1}'' directive
124
BundleErrorReporter_singletonAttrRequired = Plug-ins declaring extensions or extension points must set 'singleton' attribute to 'true'
125
BundleErrorReporter_singletonAttrRequired = Plug-ins declaring extensions or extension points must set 'singleton' attribute to 'true'
(-)src/org/eclipse/pde/internal/core/PDECoreMessages.java (+2 lines)
Lines 27-32 Link Here
27
27
28
	public static String BundleErrorReporter_localization_properties_file_not_exist;
28
	public static String BundleErrorReporter_localization_properties_file_not_exist;
29
29
30
	public static String BundleErrorReporter_providePackageHeaderDeprecated;
31
30
	public static String BundleErrorReporter_reqExecEnv_conflict;
32
	public static String BundleErrorReporter_reqExecEnv_conflict;
31
33
32
	public static String BundleErrorReporter_reqExecEnv_unknown;
34
	public static String BundleErrorReporter_reqExecEnv_unknown;

Return to bug 169373