private void validateEclipseGenericCapability() { IHeader header = getHeader(ICoreConstants.ECLIPSE_GENERIC_CAPABILITY); if (header == null) { return; } String message; if ((TargetPlatformHelper.getTargetVersion() >= 3.7) && isCheckDeprecated()) { message = NLS.bind(PDECoreMessages.BundleErrorReporter_eclipse_genericCapabilityDeprecated, ICoreConstants.ECLIPSE_GENERIC_CAPABILITY, Constants.PROVIDE_CAPABILITY); report(message, header.getLineNumber() + 1, CompilerFlags.P_DEPRECATED, PDEMarkerFactory.CAT_DEPRECATION); } }
private void validateProvidePackage() { IHeader header = getHeader(ICoreConstants.PROVIDE_PACKAGE); if (header == null) return; if (fOsgiR4 && isCheckDeprecated()) { report(PDECoreMessages.BundleErrorReporter_providePackageHeaderDeprecated, header.getLineNumber() + 1, CompilerFlags.P_DEPRECATED, PDEMarkerFactory.M_DEPRECATED_PROVIDE_PACKAGE, PDEMarkerFactory.CAT_OTHER); } }
private void validateEclipseGenericRequire() { IHeader header = getHeader(ICoreConstants.ECLIPSE_GENERIC_REQUIRED); if (header == null) { return; } String message; if ((TargetPlatformHelper.getTargetVersion() >= 3.7) && isCheckDeprecated()) { message = NLS.bind(PDECoreMessages.BundleErrorReporter_eclipse_genericRequireDeprecated, ICoreConstants.ECLIPSE_GENERIC_REQUIRED, Constants.REQUIRE_CAPABILITY); report(message, header.getLineNumber() + 1, CompilerFlags.P_DEPRECATED, PDEMarkerFactory.CAT_DEPRECATION); } }
private void validateOptionalAttribute(IHeader header, ManifestElement element) { String rexport = element.getAttribute(ICoreConstants.OPTIONAL_ATTRIBUTE); if (rexport != null) { validateBooleanAttributeValue(header, element, ICoreConstants.OPTIONAL_ATTRIBUTE); if (fOsgiR4 && isCheckDeprecated()) { report(NLS.bind(PDECoreMessages.BundleErrorReporter_deprecated_attribute_optional, ICoreConstants.OPTIONAL_ATTRIBUTE), getLine(header, ICoreConstants.OPTIONAL_ATTRIBUTE + "="), //$NON-NLS-1$ CompilerFlags.P_DEPRECATED, PDEMarkerFactory.CAT_DEPRECATION); } } }
private void validateReprovideAttribute(IHeader header, ManifestElement element) { String message; String rexport = element.getAttribute(ICoreConstants.REPROVIDE_ATTRIBUTE); if (rexport != null) { validateBooleanAttributeValue(header, element, ICoreConstants.REPROVIDE_ATTRIBUTE); if (fOsgiR4 && isCheckDeprecated()) { message = NLS.bind(PDECoreMessages.BundleErrorReporter_deprecated_attribute_reprovide, ICoreConstants.REPROVIDE_ATTRIBUTE); report(message, getLine(header, ICoreConstants.REPROVIDE_ATTRIBUTE + "="), //$NON-NLS-1$ CompilerFlags.P_DEPRECATED, PDEMarkerFactory.CAT_DEPRECATION); } } }
private void validateOptionalAttribute(IHeader header, ManifestElement element) { String rexport = element.getAttribute(ICoreConstants.OPTIONAL_ATTRIBUTE); if (rexport != null) { validateBooleanAttributeValue(header, element, ICoreConstants.OPTIONAL_ATTRIBUTE); if (fOsgiR4 && isCheckDeprecated()) { report(NLS.bind(PDECoreMessages.BundleErrorReporter_deprecated_attribute_optional, ICoreConstants.OPTIONAL_ATTRIBUTE), getLine(header, ICoreConstants.OPTIONAL_ATTRIBUTE + "="), //$NON-NLS-1$ CompilerFlags.P_DEPRECATED, PDEMarkerFactory.CAT_DEPRECATION); } } }
private void validateReprovideAttribute(IHeader header, ManifestElement element) { String message; String rexport = element.getAttribute(ICoreConstants.REPROVIDE_ATTRIBUTE); if (rexport != null) { validateBooleanAttributeValue(header, element,ICoreConstants.REPROVIDE_ATTRIBUTE); if (fOsgiR4 && isCheckDeprecated()) { message = NLS.bind(PDECoreMessages.BundleErrorReporter_deprecated_attribute_reprovide, ICoreConstants.REPROVIDE_ATTRIBUTE); report(message, getLine(header, ICoreConstants.REPROVIDE_ATTRIBUTE + "="), //$NON-NLS-1$ CompilerFlags.P_DEPRECATED, PDEMarkerFactory.CAT_DEPRECATION); } } }
private void validateSpecificationVersionAttribute(IHeader header, ManifestElement element) { String version = element.getAttribute(ICoreConstants.PACKAGE_SPECIFICATION_VERSION); IStatus status = VersionUtil.validateVersion(version); if (!status.isOK()) { report(status.getMessage(), getPackageLine(header, element), CompilerFlags.ERROR, PDEMarkerFactory.CAT_FATAL); } if (isCheckDeprecated()) { if (fOsgiR4 && version != null) { report(NLS.bind(PDECoreMessages.BundleErrorReporter_deprecated_attribute_specification_version, ICoreConstants.PACKAGE_SPECIFICATION_VERSION), getPackageLine(header, element), CompilerFlags.P_DEPRECATED, PDEMarkerFactory.CAT_DEPRECATION); } } }
private void validateSpecificationVersionAttribute(IHeader header, ManifestElement element) { String version = element.getAttribute(ICoreConstants.PACKAGE_SPECIFICATION_VERSION); IStatus status = VersionUtil.validateVersion(version); if(!status.isOK()){ report(status.getMessage(), getPackageLine(header, element), CompilerFlags.ERROR, PDEMarkerFactory.CAT_FATAL); } if (isCheckDeprecated()) { if (fOsgiR4 && version != null) { report(NLS.bind(PDECoreMessages.BundleErrorReporter_deprecated_attribute_specification_version, ICoreConstants.PACKAGE_SPECIFICATION_VERSION), getPackageLine(header, element), CompilerFlags.P_DEPRECATED, PDEMarkerFactory.CAT_DEPRECATION); } } }
if (!"true".equals(singletonDir)) { //$NON-NLS-1$ if ("true".equals(singletonAttr)) { //$NON-NLS-1$ if (isCheckDeprecated() && fOsgiR4) { String message = PDECoreMessages.BundleErrorReporter_deprecated_attribute_singleton; report(message, getLine(header, ICoreConstants.SINGLETON_ATTRIBUTE + "="), //$NON-NLS-1$ if (isCheckDeprecated()) { String message = PDECoreMessages.BundleErrorReporter_deprecated_attribute_singleton; report(message, getLine(header, ICoreConstants.SINGLETON_ATTRIBUTE + "="), //$NON-NLS-1$ if (isCheckDeprecated()) { String message = PDECoreMessages.BundleErrorReporter_unsupportedSingletonDirective; report(message, getLine(header, Constants.SINGLETON_DIRECTIVE + ":="), //$NON-NLS-1$
if (!"true".equals(singletonDir)) { //$NON-NLS-1$ if ("true".equals(singletonAttr)) { //$NON-NLS-1$ if (isCheckDeprecated()) { String message = PDECoreMessages.BundleErrorReporter_deprecated_attribute_singleton; report(message, getLine(header, ICoreConstants.SINGLETON_ATTRIBUTE + "="), //$NON-NLS-1$ if (isCheckDeprecated()) { String message = PDECoreMessages.BundleErrorReporter_deprecated_attribute_singleton; report(message, getLine(header, ICoreConstants.SINGLETON_ATTRIBUTE + "="), //$NON-NLS-1$ if (isCheckDeprecated()) { String message = PDECoreMessages.BundleErrorReporter_unsupportedSingletonDirective; report(message, getLine(header, Constants.SINGLETON_DIRECTIVE + ":="), //$NON-NLS-1$