KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > internal > builders > FragmentErrorReporter


1 /*******************************************************************************
2  * Copyright (c) 2005 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  *******************************************************************************/

11 package org.eclipse.pde.internal.builders;
12
13 import org.eclipse.core.resources.*;
14 import org.w3c.dom.*;
15
16
17 public class FragmentErrorReporter extends PluginBaseErrorReporter {
18
19     public FragmentErrorReporter(IFile file) {
20         super(file);
21     }
22     
23      /* (non-Javadoc)
24      * @see org.eclipse.pde.internal.builders.PluginBaseErrorReporter#validateTopLevelAttributes(org.w3c.dom.Element)
25      */

26     protected void validateTopLevelAttributes(Element element) {
27         super.validateTopLevelAttributes(element);
28         
29         if (assertAttributeDefined(element, "plugin-id", CompilerFlags.ERROR)) //$NON-NLS-1$
30
validatePluginIDRef(element, element.getAttributeNode("plugin-id")); //$NON-NLS-1$
31

32         if (assertAttributeDefined(element, "plugin-version", CompilerFlags.ERROR)) //$NON-NLS-1$
33
validateVersionAttribute(element, element.getAttributeNode("plugin-version")); //$NON-NLS-1$
34

35         Attr attr = element.getAttributeNode("match"); //$NON-NLS-1$
36
if (attr != null)
37             validateMatch(element, attr);
38     }
39     
40     protected String JavaDoc getRootElementName() {
41         return "fragment"; //$NON-NLS-1$
42
}
43     
44 }
45
Popular Tags