KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > internal > core > plugin > AbbreviatedPluginHandler


1 /*******************************************************************************
2  * Copyright (c) 2006 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
12 package org.eclipse.pde.internal.core.plugin;
13
14 import org.w3c.dom.Element JavaDoc;
15 import org.xml.sax.SAXException JavaDoc;
16
17 /**
18  * CSPluginHandler
19  *
20  */

21 public class AbbreviatedPluginHandler extends PluginHandler {
22
23     private String JavaDoc[] fExtensionPointIDs;
24     
25     /**
26      * @param abbreviated
27      * @param extensionPointIDs
28      */

29     public AbbreviatedPluginHandler(String JavaDoc[] extensionPointIDs) {
30         super(true);
31         
32         fExtensionPointIDs = extensionPointIDs;
33     }
34     
35     /* (non-Javadoc)
36      * @see org.eclipse.pde.internal.core.plugin.PluginHandler#isInterestingExtension(org.w3c.dom.Element)
37      */

38     protected boolean isInterestingExtension(Element JavaDoc element) {
39         String JavaDoc point = element.getAttribute("point"); //$NON-NLS-1$
40
for (int i = 0; i < fExtensionPointIDs.length; i++) {
41             if (point.equals(fExtensionPointIDs[i])) {
42                 return true;
43             }
44         }
45         return false;
46     }
47     
48     /* (non-Javadoc)
49      * @see org.eclipse.pde.internal.core.plugin.PluginHandler#characters(char[], int, int)
50      */

51     public void characters(char[] characters, int start, int length)
52             throws SAXException JavaDoc {
53         processCharacters(characters, start, length);
54     }
55     
56 }
57
Popular Tags