Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: aebc56445738e57e1b650600dea2a43a46e8d388 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*******************************************************************************
 *  Copyright (c) 2005, 2008 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
 *  http://www.eclipse.org/legal/epl-v10.html
 * 
 *  Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.pde.internal.core.builders;

import org.eclipse.core.resources.IFile;
import org.w3c.dom.Attr;
import org.w3c.dom.Element;

public class FragmentErrorReporter extends PluginBaseErrorReporter {

	public FragmentErrorReporter(IFile file) {
		super(file);
	}

	/* (non-Javadoc)
	* @see org.eclipse.pde.internal.builders.PluginBaseErrorReporter#validateTopLevelAttributes(org.w3c.dom.Element)
	*/
	@Override
	protected void validateTopLevelAttributes(Element element) {
		super.validateTopLevelAttributes(element);

		if (assertAttributeDefined(element, "plugin-id", CompilerFlags.ERROR)) //$NON-NLS-1$
			validatePluginIDRef(element, element.getAttributeNode("plugin-id")); //$NON-NLS-1$

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

		Attr attr = element.getAttributeNode("match"); //$NON-NLS-1$
		if (attr != null)
			validateMatch(element, attr);
	}

	@Override
	protected String getRootElementName() {
		return "fragment"; //$NON-NLS-1$
	}

}

Back to the top