diff options
Diffstat (limited to 'plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/extension/ExtensionUtils.java')
-rw-r--r-- | plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/extension/ExtensionUtils.java | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/extension/ExtensionUtils.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/extension/ExtensionUtils.java index 5f816d434ba..495e1e8fd84 100644 --- a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/extension/ExtensionUtils.java +++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/extension/ExtensionUtils.java @@ -1,7 +1,7 @@ /***************************************************************************** * Copyright (c) 2008 CEA LIST. * - * + * * 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 @@ -20,7 +20,7 @@ import org.osgi.framework.Bundle; /** * Utility methods for Eclipse extension reading. This class can be extended, or * access throw the unique instance. - * + * * @author cedric dumoulin * @author Patrick Tessier */ @@ -35,32 +35,34 @@ public abstract class ExtensionUtils { /** * used to verify if the name of the {@link IConfigurationElement} is the * same as the given name - * + * * @param element - * an {@link IConfigurationElement} see eclipse extension point + * an {@link IConfigurationElement} see eclipse extension point * @param tagName - * the name of the {@link IConfigurationElement} that has to be - * verified + * the name of the {@link IConfigurationElement} that has to be + * verified * @throws InvalidRegistryObjectException * @throws BadNameExtensionException */ protected void checkTagName(IConfigurationElement element, String tagName) throws BadNameExtensionException { String name = element.getName(); - if(!tagName.equals(name)) + if (!tagName.equals(name)) + { throw new BadNameExtensionException("Expected '" + tagName + "', found '" + name + "'."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + } } /** * Retrieves the value of a specific attribute in a configuration element - * + * * @param element - * the configuration element to parse + * the configuration element to parse * @param attributeName - * the name of the attribute to read + * the name of the attribute to read * @param extensionPointName - * Name of the extension point. Used in exception msg. TODO: - * remove ? - * + * Name of the extension point. Used in exception msg. TODO: + * remove ? + * * @return the class, result of the parsing * @throws InvalidRegistryObjectException * @throws BadClassNameException @@ -69,7 +71,7 @@ public abstract class ExtensionUtils { String className = element.getAttribute(attributeName); element.getContributor().getName(); - if(className == null || className.length() == 0) { + if (className == null || className.length() == 0) { throw new BadClassNameException(attributeName + "=null ", extensionPointName, attributeName); //$NON-NLS-1$ } Class<?> factoryClass; |