Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.help/src/org/eclipse/help/internal/dynamic/ValidationHandler.java')
-rw-r--r--org.eclipse.help/src/org/eclipse/help/internal/dynamic/ValidationHandler.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/org.eclipse.help/src/org/eclipse/help/internal/dynamic/ValidationHandler.java b/org.eclipse.help/src/org/eclipse/help/internal/dynamic/ValidationHandler.java
index cc67509f8..4a4739fb6 100644
--- a/org.eclipse.help/src/org/eclipse/help/internal/dynamic/ValidationHandler.java
+++ b/org.eclipse.help/src/org/eclipse/help/internal/dynamic/ValidationHandler.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2015 IBM Corporation and others.
+ * Copyright (c) 2006, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -22,14 +22,14 @@ import org.eclipse.help.internal.UAElement;
*/
public class ValidationHandler extends ProcessorHandler {
- private Map requiredAttributes;
- private Map deprecatedElements;
+ private Map<String, String[]> requiredAttributes;
+ private Map<String, String> deprecatedElements;
/*
* Creates a new validator that looks for the given mapping of
* element names to required attribute names.
*/
- public ValidationHandler(Map requiredAttributes) {
+ public ValidationHandler(Map<String, String[]> requiredAttributes) {
this(requiredAttributes, null);
}
@@ -38,7 +38,7 @@ public class ValidationHandler extends ProcessorHandler {
* element names to required attribute names, as well as a mapping
* of deprecated element names to suggested new element names.
*/
- public ValidationHandler(Map requiredAttributes, Map deprecatedElements) {
+ public ValidationHandler(Map<String, String[]> requiredAttributes, Map<String, String> deprecatedElements) {
this.requiredAttributes = requiredAttributes;
this.deprecatedElements = deprecatedElements;
}
@@ -46,13 +46,13 @@ public class ValidationHandler extends ProcessorHandler {
@Override
public short handle(UAElement element, String id) {
if (deprecatedElements != null) {
- String suggestion = (String)deprecatedElements.get(element.getElementName());
+ String suggestion = deprecatedElements.get(element.getElementName());
if (suggestion != null) {
String msg = "The \"" + element.getElementName() + "\" element is deprecated in \"" + id + "\"; use \"" + suggestion + "\" instead."; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
HelpPlugin.logWarning(msg);
}
}
- String[] attributes = (String[])requiredAttributes.get(element.getElementName());
+ String[] attributes = requiredAttributes.get(element.getElementName());
if (attributes != null) {
for (int i=0;i<attributes.length;++i) {
if (element.getAttribute(attributes[i]) == null) {

Back to the top