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

(-)src/org/eclipse/pde/internal/core/builders/FeatureErrorReporter.java (-2 / +21 lines)
Lines 7-12 Link Here
7
 *
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 *     IBM Corporation - initial API and implementation
10
 *     Simon Muschel <smuschel@gmx.de> - bug 260549
10
 *******************************************************************************/
11
 *******************************************************************************/
11
package org.eclipse.pde.internal.core.builders;
12
package org.eclipse.pde.internal.core.builders;
12
13
Lines 15-22 Link Here
15
import org.eclipse.core.resources.IFile;
16
import org.eclipse.core.resources.IFile;
16
import org.eclipse.core.runtime.IProgressMonitor;
17
import org.eclipse.core.runtime.IProgressMonitor;
17
import org.eclipse.osgi.util.NLS;
18
import org.eclipse.osgi.util.NLS;
18
import org.eclipse.pde.core.plugin.IPluginModelBase;
19
import org.eclipse.pde.core.plugin.*;
19
import org.eclipse.pde.core.plugin.PluginRegistry;
20
import org.eclipse.pde.internal.core.*;
20
import org.eclipse.pde.internal.core.*;
21
import org.eclipse.pde.internal.core.ibundle.IBundlePluginModel;
21
import org.eclipse.pde.internal.core.ibundle.IBundlePluginModel;
22
import org.eclipse.pde.internal.core.ibundle.IManifestHeader;
22
import org.eclipse.pde.internal.core.ibundle.IManifestHeader;
Lines 105-110 Link Here
105
					validatePluginID(plugin, attr, isFragment);
105
					validatePluginID(plugin, attr, isFragment);
106
				} else if (name.equals("version")) { //$NON-NLS-1$
106
				} else if (name.equals("version")) { //$NON-NLS-1$
107
					validateVersionAttribute(plugin, attr);
107
					validateVersionAttribute(plugin, attr);
108
					validateVersion(plugin, attr);
108
				} else if (name.equals("fragment") || name.equals("unpack")) { //$NON-NLS-1$ //$NON-NLS-2$
109
				} else if (name.equals("fragment") || name.equals("unpack")) { //$NON-NLS-1$ //$NON-NLS-2$
109
					validateBoolean(plugin, attr);
110
					validateBoolean(plugin, attr);
110
				} else if (!name.equals("os") && !name.equals("ws") && !name.equals("nl") //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
111
				} else if (!name.equals("os") && !name.equals("ws") && !name.equals("nl") //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
Lines 425-428 Link Here
425
			report(message, getLine(parent), severity, PDEMarkerFactory.CAT_OTHER);
426
			report(message, getLine(parent), severity, PDEMarkerFactory.CAT_OTHER);
426
		}
427
		}
427
	}
428
	}
429
430
	private void validateVersion(Element plugin, Attr attr) {
431
		String id = plugin.getAttribute("id"); //$NON-NLS-1$
432
		String version = plugin.getAttribute("version"); //$NON-NLS-1$
433
		if (version.equals("0.0.0")) //$NON-NLS-1$
434
			return;
435
		ModelEntry entry = PluginRegistry.findEntry(id);
436
		IPluginModelBase[] allModels = entry.getActiveModels();
437
		for (int i = 0; i < allModels.length; i++) {
438
			IPluginModelBase availablePlugin = allModels[i];
439
			if (id.equals(availablePlugin.getPluginBase().getId())) {
440
				if (version.equals(availablePlugin.getPluginBase().getVersion())) {
441
					return;
442
				}
443
			}
444
		}
445
		report(NLS.bind(PDECoreMessages.Builders_Feature_mismatchPluginVersion, new String[] {version, id}), getLine(plugin, attr.getName()), CompilerFlags.WARNING, PDEMarkerFactory.CAT_OTHER);
446
	}
428
}
447
}
(-)src/org/eclipse/pde/internal/core/PDECoreMessages.java (-1 / +2 lines)
Lines 8-14 Link Here
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 *     IBM Corporation - initial API and implementation
10
 *     Code 9 Corporation - on going enhancements and maintenance
10
 *     Code 9 Corporation - on going enhancements and maintenance
11
 *     Simon Muschel <smuschel@gmx.de> - bug 215743
11
 *     Simon Muschel <smuschel@gmx.de> - bugs 215743, 260549
12
 *******************************************************************************/
12
 *******************************************************************************/
13
package org.eclipse.pde.internal.core;
13
package org.eclipse.pde.internal.core;
14
14
Lines 114-119 Link Here
114
	public static String Builders_Feature_patchedMatch;
114
	public static String Builders_Feature_patchedMatch;
115
	public static String Builders_Feature_missingUnpackFalse;
115
	public static String Builders_Feature_missingUnpackFalse;
116
	public static String Builders_Feature_mismatchUnpackBundleShape;
116
	public static String Builders_Feature_mismatchUnpackBundleShape;
117
	public static String Builders_Feature_mismatchPluginVersion;
117
	public static String Builders_Schema_compiling;
118
	public static String Builders_Schema_compiling;
118
	public static String Builders_Schema_compilingSchemas;
119
	public static String Builders_Schema_compilingSchemas;
119
	public static String Builders_Schema_removing;
120
	public static String Builders_Schema_removing;
(-)src/org/eclipse/pde/internal/core/pderesources.properties (-1 / +2 lines)
Lines 7-13 Link Here
7
#
7
#
8
# Contributors:
8
# Contributors:
9
#     IBM Corporation - initial API and implementation
9
#     IBM Corporation - initial API and implementation
10
#     Simon Muschel <smuschel@gmx.de> - bug 215743
10
#     Simon Muschel <smuschel@gmx.de> - bugs 215743, 260549
11
###############################################################################
11
###############################################################################
12
12
13
###### Status text #####################################
13
###### Status text #####################################
Lines 59-64 Link Here
59
Builders_Feature_patchedMatch = ''{0}'' attribute cannot be used when ''patch'' attribue is set
59
Builders_Feature_patchedMatch = ''{0}'' attribute cannot be used when ''patch'' attribue is set
60
Builders_Feature_missingUnpackFalse = It is recommended for plug-in ''{0}'' to run from a JAR, specify ''{1}'' attribute
60
Builders_Feature_missingUnpackFalse = It is recommended for plug-in ''{0}'' to run from a JAR, specify ''{1}'' attribute
61
Builders_Feature_mismatchUnpackBundleShape = The feature specifies ''{0}'', however the plug-in ''{1}'' specifies ''{2}''
61
Builders_Feature_mismatchUnpackBundleShape = The feature specifies ''{0}'', however the plug-in ''{1}'' specifies ''{2}''
62
Builders_Feature_mismatchPluginVersion = Version ''{0}'' of plug-in ''{1}'' is not available.
62
Builders_Schema_compiling = Compiling {0} ...
63
Builders_Schema_compiling = Compiling {0} ...
63
Builders_Schema_compilingSchemas=Compiling extension point schemas...
64
Builders_Schema_compilingSchemas=Compiling extension point schemas...
64
Builders_Schema_removing = Removing {0} ...
65
Builders_Schema_removing = Removing {0} ...

Return to bug 260549