KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > internal > runtime > registry > ExtensionPointAdapter


1 /*******************************************************************************
2  * Copyright (c) 2000, 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 package org.eclipse.pde.internal.runtime.registry;
12
13 import org.eclipse.core.runtime.IExtension;
14 import org.eclipse.core.runtime.IExtensionPoint;
15
16 public class ExtensionPointAdapter extends ParentAdapter {
17
18     public ExtensionPointAdapter(Object JavaDoc object) {
19         super(object);
20     }
21
22     protected Object JavaDoc[] createChildren() {
23         IExtensionPoint extensionPoint = (IExtensionPoint) getObject();
24
25         IExtension[] extensions = extensionPoint.getExtensions();
26         Object JavaDoc[] result = new Object JavaDoc[extensions.length];
27         for (int i = 0; i < extensions.length; i++) {
28             IExtension extension = extensions[i];
29             result[i] = new ExtensionAdapter(extension);
30         }
31         return result;
32     }
33 }
34
Popular Tags