01: /*******************************************************************************
02: * Copyright (c) 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.pde.internal.core.plugin;
11:
12: import org.w3c.dom.Element;
13: import org.xml.sax.SAXException;
14:
15: /**
16: * CSPluginHandler
17: *
18: */
19: public class AbbreviatedPluginHandler extends PluginHandler {
20:
21: private String[] fExtensionPointIDs;
22:
23: /**
24: * @param abbreviated
25: * @param extensionPointIDs
26: */
27: public AbbreviatedPluginHandler(String[] extensionPointIDs) {
28: super (true);
29:
30: fExtensionPointIDs = extensionPointIDs;
31: }
32:
33: /* (non-Javadoc)
34: * @see org.eclipse.pde.internal.core.plugin.PluginHandler#isInterestingExtension(org.w3c.dom.Element)
35: */
36: protected boolean isInterestingExtension(Element element) {
37: String point = element.getAttribute("point"); //$NON-NLS-1$
38: for (int i = 0; i < fExtensionPointIDs.length; i++) {
39: if (point.equals(fExtensionPointIDs[i])) {
40: return true;
41: }
42: }
43: return false;
44: }
45:
46: /* (non-Javadoc)
47: * @see org.eclipse.pde.internal.core.plugin.PluginHandler#characters(char[], int, int)
48: */
49: public void characters(char[] characters, int start, int length)
50: throws SAXException {
51: processCharacters(characters, start, length);
52: }
53:
54: }
|