Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 109423 Details for
Bug 243441
[selfhosting] refactor registry view model
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
patch
patch.txt (text/plain), 57.60 KB, created by
Jacek Pospychala
on 2008-08-07 11:55:36 EDT
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Jacek Pospychala
Created:
2008-08-07 11:55:36 EDT
Size:
57.60 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.pde.runtime >Index: src/org/eclipse/pde/internal/runtime/registry/ConfigurationAttributeAdapter.java >=================================================================== >RCS file: src/org/eclipse/pde/internal/runtime/registry/ConfigurationAttributeAdapter.java >diff -N src/org/eclipse/pde/internal/runtime/registry/ConfigurationAttributeAdapter.java >--- src/org/eclipse/pde/internal/runtime/registry/ConfigurationAttributeAdapter.java 6 Mar 2006 14:50:59 -0000 1.2 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,23 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2006 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.runtime.registry; >- >-public class ConfigurationAttributeAdapter extends ParentAdapter { >- >- public ConfigurationAttributeAdapter(Object object) { >- super(object); >- } >- >- protected Object[] createChildren() { >- return null; >- } >- >-} >Index: src/org/eclipse/pde/internal/runtime/registry/PluginAdapter.java >=================================================================== >RCS file: src/org/eclipse/pde/internal/runtime/registry/PluginAdapter.java >diff -N src/org/eclipse/pde/internal/runtime/registry/PluginAdapter.java >--- src/org/eclipse/pde/internal/runtime/registry/PluginAdapter.java 24 Apr 2008 08:57:27 -0000 1.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,39 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 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.runtime.registry; >- >-import org.eclipse.pde.internal.runtime.registry.RegistryBrowserContentProvider.BundleFolder; >-import org.osgi.framework.Bundle; >- >-/** >- * Adapter for bundle objects. >- * >- */ >-public class PluginAdapter extends ParentAdapter { >- >- public PluginAdapter(Bundle object) { >- super(object); >- } >- >- protected Object[] createChildren() { >- Bundle bundle = (Bundle) getObject(); >- >- Object[] array = new Object[7]; >- array[0] = new BundleFolder(bundle, IBundleFolder.F_LOCATION); >- array[1] = new BundleFolder(bundle, IBundleFolder.F_IMPORTS); >- array[2] = new BundleFolder(bundle, IBundleFolder.F_LIBRARIES); >- array[3] = new BundleFolder(bundle, IBundleFolder.F_EXTENSION_POINTS); >- array[4] = new BundleFolder(bundle, IBundleFolder.F_EXTENSIONS); >- array[5] = new BundleFolder(bundle, IBundleFolder.F_REGISTERED_SERVICES); >- array[6] = new BundleFolder(bundle, IBundleFolder.F_SERVICES_IN_USE); >- return array; >- } >-} >Index: src/org/eclipse/pde/internal/runtime/registry/IConfigurationAttribute.java >=================================================================== >RCS file: src/org/eclipse/pde/internal/runtime/registry/IConfigurationAttribute.java >diff -N src/org/eclipse/pde/internal/runtime/registry/IConfigurationAttribute.java >--- src/org/eclipse/pde/internal/runtime/registry/IConfigurationAttribute.java 6 Mar 2006 14:50:59 -0000 1.2 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,15 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2006 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.runtime.registry; >- >-public interface IConfigurationAttribute { >- public String getLabel(); >-} >Index: src/org/eclipse/pde/internal/runtime/registry/RegistryBrowserContentProvider.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/RegistryBrowserContentProvider.java,v >retrieving revision 1.29 >diff -u -r1.29 RegistryBrowserContentProvider.java >--- src/org/eclipse/pde/internal/runtime/registry/RegistryBrowserContentProvider.java 24 Apr 2008 08:57:27 -0000 1.29 >+++ src/org/eclipse/pde/internal/runtime/registry/RegistryBrowserContentProvider.java 7 Aug 2008 15:45:17 -0000 >@@ -12,92 +12,21 @@ > > import java.util.*; > import org.eclipse.core.runtime.*; >+import org.eclipse.core.runtime.IConfigurationElement; >+import org.eclipse.core.runtime.IExtensionPoint; > import org.eclipse.jface.viewers.ITreeContentProvider; > import org.eclipse.jface.viewers.Viewer; > import org.eclipse.osgi.util.ManifestElement; > import org.eclipse.pde.internal.runtime.PDERuntimePlugin; >+import org.eclipse.pde.internal.runtime.registry.model.*; >+import org.eclipse.pde.internal.runtime.registry.model.impl.generic.PluginObjectAdapter; >+import org.eclipse.pde.internal.runtime.registry.model.impl.local.*; > import org.osgi.framework.*; > > public class RegistryBrowserContentProvider implements ITreeContentProvider { > private Hashtable fExtensionPointMap = new Hashtable(); > public boolean isInExtensionSet; > >- static class BundleFolder implements IBundleFolder { >- private int id; >- private Bundle bundle; >- private Object[] children; >- >- public BundleFolder(Bundle pd, int id) { >- this.bundle = pd; >- this.id = id; >- } >- >- public Bundle getBundle() { >- return bundle; >- } >- >- public Object[] getChildren() { >- if (children == null) { >- children = getFolderChildren(bundle, id); >- } >- return children; >- } >- >- /** >- * Resets folder's previously cached knowledge about it's children. >- */ >- public void refresh() { >- children = null; >- } >- >- public int getFolderId() { >- return id; >- } >- >- public Object getAdapter(Class key) { >- return null; >- } >- } >- >- static class BundlePrerequisite implements IBundlePrerequisite { >- private ManifestElement underlyingElement; >- >- public BundlePrerequisite(ManifestElement element) { >- underlyingElement = element; >- } >- >- public ManifestElement getPrerequisite() { >- return underlyingElement; >- } >- >- public boolean isExported() { >- String visibility = underlyingElement.getDirective(Constants.VISIBILITY_DIRECTIVE); >- return Constants.VISIBILITY_REEXPORT.equals(visibility); >- } >- >- public String getLabel() { >- String version = underlyingElement.getAttribute(Constants.BUNDLE_VERSION_ATTRIBUTE); >- String value = underlyingElement.getValue(); >- if (version == null) >- return value; >- if (Character.isDigit(version.charAt(0))) >- version = '(' + version + ')'; >- return value + ' ' + version; >- } >- } >- >- static class BundleLibrary implements IBundleLibrary { >- private ManifestElement underlyingElement; >- >- public BundleLibrary(ManifestElement element) { >- underlyingElement = element; >- } >- >- public String getLibrary() { >- return underlyingElement.getValue(); >- } >- } >- > /** > * Creates contents adapter for given folder id. > * @param object Folder contents to be wrapped in adapter >@@ -185,7 +114,7 @@ > return null; > } > >- protected static Object[] getFolderChildren(Bundle bundle, int id) { >+ public static Object[] getFolderChildren(Bundle bundle, int id) { > Object[] array = null; > String bundleId = bundle.getSymbolicName(); > switch (id) { >Index: src/org/eclipse/pde/internal/runtime/registry/IBundlePrerequisite.java >=================================================================== >RCS file: src/org/eclipse/pde/internal/runtime/registry/IBundlePrerequisite.java >diff -N src/org/eclipse/pde/internal/runtime/registry/IBundlePrerequisite.java >--- src/org/eclipse/pde/internal/runtime/registry/IBundlePrerequisite.java 2 Jan 2008 16:06:15 -0000 1.3 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,21 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2006 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.runtime.registry; >- >-import org.eclipse.osgi.util.ManifestElement; >- >-public interface IBundlePrerequisite { >- public ManifestElement getPrerequisite(); >- >- public boolean isExported(); >- >- public String getLabel(); >-} >Index: src/org/eclipse/pde/internal/runtime/registry/ParentAdapter.java >=================================================================== >RCS file: src/org/eclipse/pde/internal/runtime/registry/ParentAdapter.java >diff -N src/org/eclipse/pde/internal/runtime/registry/ParentAdapter.java >--- src/org/eclipse/pde/internal/runtime/registry/ParentAdapter.java 29 Oct 2007 19:17:17 -0000 1.6 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,27 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2000, 2006 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.runtime.registry; >- >-public abstract class ParentAdapter extends PluginObjectAdapter { >- Object[] fChildren; >- >- public ParentAdapter(Object object) { >- super(object); >- } >- >- protected abstract Object[] createChildren(); >- >- public Object[] getChildren() { >- if (fChildren == null) >- fChildren = createChildren(); >- return fChildren; >- } >-} >Index: src/org/eclipse/pde/internal/runtime/registry/RegistryBrowser.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/RegistryBrowser.java,v >retrieving revision 1.63 >diff -u -r1.63 RegistryBrowser.java >--- src/org/eclipse/pde/internal/runtime/registry/RegistryBrowser.java 9 Jul 2008 18:11:28 -0000 1.63 >+++ src/org/eclipse/pde/internal/runtime/registry/RegistryBrowser.java 7 Aug 2008 15:45:17 -0000 >@@ -11,6 +11,12 @@ > *******************************************************************************/ > package org.eclipse.pde.internal.runtime.registry; > >+import org.eclipse.pde.internal.runtime.registry.model.impl.generic.PluginObjectAdapter; >+ >+import org.eclipse.pde.internal.runtime.registry.model.impl.local.PluginAdapter; >+ >+import org.eclipse.pde.internal.runtime.registry.model.IBundleFolder; >+ > import java.util.*; > import java.util.List; > import org.eclipse.core.runtime.*; >Index: src/org/eclipse/pde/internal/runtime/registry/ExtensionAdapter.java >=================================================================== >RCS file: src/org/eclipse/pde/internal/runtime/registry/ExtensionAdapter.java >diff -N src/org/eclipse/pde/internal/runtime/registry/ExtensionAdapter.java >--- src/org/eclipse/pde/internal/runtime/registry/ExtensionAdapter.java 29 Oct 2007 19:17:17 -0000 1.8 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,33 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2000, 2006 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.runtime.registry; >- >-import org.eclipse.core.runtime.IConfigurationElement; >-import org.eclipse.core.runtime.IExtension; >- >-public class ExtensionAdapter extends ParentAdapter { >- >- public ExtensionAdapter(Object object) { >- super(object); >- } >- >- protected Object[] createChildren() { >- IExtension extension = (IExtension) getObject(); >- >- IConfigurationElement[] elements = extension.getConfigurationElements(); >- Object[] result = new ConfigurationElementAdapter[elements.length]; >- for (int i = 0; i < elements.length; i++) { >- IConfigurationElement config = elements[i]; >- result[i] = new ConfigurationElementAdapter(config); >- } >- return result; >- } >-} >Index: src/org/eclipse/pde/internal/runtime/registry/ExtensionPointAdapter.java >=================================================================== >RCS file: src/org/eclipse/pde/internal/runtime/registry/ExtensionPointAdapter.java >diff -N src/org/eclipse/pde/internal/runtime/registry/ExtensionPointAdapter.java >--- src/org/eclipse/pde/internal/runtime/registry/ExtensionPointAdapter.java 29 Oct 2007 19:17:18 -0000 1.8 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,33 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2000, 2006 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.runtime.registry; >- >-import org.eclipse.core.runtime.IExtension; >-import org.eclipse.core.runtime.IExtensionPoint; >- >-public class ExtensionPointAdapter extends ParentAdapter { >- >- public ExtensionPointAdapter(Object object) { >- super(object); >- } >- >- protected Object[] createChildren() { >- IExtensionPoint extensionPoint = (IExtensionPoint) getObject(); >- >- IExtension[] extensions = extensionPoint.getExtensions(); >- Object[] result = new Object[extensions.length]; >- for (int i = 0; i < extensions.length; i++) { >- IExtension extension = extensions[i]; >- result[i] = new ExtensionAdapter(extension); >- } >- return result; >- } >-} >Index: src/org/eclipse/pde/internal/runtime/registry/ServiceReferenceAdapter.java >=================================================================== >RCS file: src/org/eclipse/pde/internal/runtime/registry/ServiceReferenceAdapter.java >diff -N src/org/eclipse/pde/internal/runtime/registry/ServiceReferenceAdapter.java >--- src/org/eclipse/pde/internal/runtime/registry/ServiceReferenceAdapter.java 24 Apr 2008 08:57:27 -0000 1.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,35 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 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.runtime.registry; >- >-import org.osgi.framework.ServiceReference; >- >-public class ServiceReferenceAdapter extends ParentAdapter { >- >- public ServiceReferenceAdapter(ServiceReference object) { >- super(object); >- } >- >- protected Object[] createChildren() { >- // TODO pluggable support for different services >- return null; >- } >- >- public boolean equals(Object obj) { >- // imitate ServiceReference behavior, that multiple ServiceReference instances are equal >- return (obj instanceof ServiceReferenceAdapter) ? getObject().equals(((ServiceReferenceAdapter) obj).getObject()) : false; >- } >- >- public int hashCode() { >- // imitate ServiceReference behavior, that multiple ServiceReference instances return the same hashCode >- return getObject().hashCode(); >- } >-} >Index: src/org/eclipse/pde/internal/runtime/registry/PluginObjectAdapter.java >=================================================================== >RCS file: src/org/eclipse/pde/internal/runtime/registry/PluginObjectAdapter.java >diff -N src/org/eclipse/pde/internal/runtime/registry/PluginObjectAdapter.java >--- src/org/eclipse/pde/internal/runtime/registry/PluginObjectAdapter.java 29 Oct 2007 19:17:18 -0000 1.7 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,25 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2000, 2006 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.runtime.registry; >- >-import org.eclipse.core.runtime.PlatformObject; >- >-public class PluginObjectAdapter extends PlatformObject { >- private Object fObject; >- >- public PluginObjectAdapter(Object object) { >- this.fObject = object; >- } >- >- public Object getObject() { >- return fObject; >- } >-} >Index: src/org/eclipse/pde/internal/runtime/registry/ConfigurationElementAdapter.java >=================================================================== >RCS file: src/org/eclipse/pde/internal/runtime/registry/ConfigurationElementAdapter.java >diff -N src/org/eclipse/pde/internal/runtime/registry/ConfigurationElementAdapter.java >--- src/org/eclipse/pde/internal/runtime/registry/ConfigurationElementAdapter.java 2 Jan 2008 16:06:15 -0000 1.8 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,51 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2000, 2006 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.runtime.registry; >- >-import org.eclipse.core.runtime.IConfigurationElement; >- >-public class ConfigurationElementAdapter extends ParentAdapter { >- >- class ConfigurationAttribute implements IConfigurationAttribute { >- private String fLabel; >- >- public ConfigurationAttribute(String name, String value) { >- fLabel = name + " = " + value; //$NON-NLS-1$ >- } >- >- public String getLabel() { >- return fLabel; >- } >- } >- >- public ConfigurationElementAdapter(Object object) { >- super(object); >- } >- >- protected Object[] createChildren() { >- IConfigurationElement config = (IConfigurationElement) getObject(); >- String[] atts = config.getAttributeNames(); >- IConfigurationAttribute[] catts = new IConfigurationAttribute[atts.length]; >- for (int i = 0; i < atts.length; i++) >- catts[i] = new ConfigurationAttribute(atts[i], config.getAttribute(atts[i])); >- IConfigurationElement[] children = config.getChildren(); >- Object[] result = new Object[children.length + catts.length]; >- for (int i = 0; i < children.length; i++) { >- IConfigurationElement child = children[i]; >- result[i] = new ConfigurationElementAdapter(child); >- } >- for (int i = 0; i < catts.length; i++) { >- IConfigurationAttribute child = catts[i]; >- result[children.length + i] = new ConfigurationAttributeAdapter(child); >- } >- return result; >- } >-} >Index: src/org/eclipse/pde/internal/runtime/registry/RegistryBrowserListener.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/RegistryBrowserListener.java,v >retrieving revision 1.5 >diff -u -r1.5 RegistryBrowserListener.java >--- src/org/eclipse/pde/internal/runtime/registry/RegistryBrowserListener.java 30 May 2008 16:49:08 -0000 1.5 >+++ src/org/eclipse/pde/internal/runtime/registry/RegistryBrowserListener.java 7 Aug 2008 15:45:17 -0000 >@@ -10,8 +10,12 @@ > *******************************************************************************/ > package org.eclipse.pde.internal.runtime.registry; > >+import org.eclipse.pde.internal.runtime.registry.model.impl.generic.PluginObjectAdapter; >+ >+import org.eclipse.pde.internal.runtime.registry.model.impl.local.*; >+ > import org.eclipse.core.runtime.*; >-import org.eclipse.pde.internal.runtime.registry.RegistryBrowserContentProvider.BundleFolder; >+import org.eclipse.pde.internal.runtime.registry.model.IBundleFolder; > import org.eclipse.swt.widgets.Tree; > import org.eclipse.swt.widgets.TreeItem; > import org.osgi.framework.*; >Index: src/org/eclipse/pde/internal/runtime/registry/RegistryBrowserLabelProvider.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/RegistryBrowserLabelProvider.java,v >retrieving revision 1.33 >diff -u -r1.33 RegistryBrowserLabelProvider.java >--- src/org/eclipse/pde/internal/runtime/registry/RegistryBrowserLabelProvider.java 24 Apr 2008 08:57:27 -0000 1.33 >+++ src/org/eclipse/pde/internal/runtime/registry/RegistryBrowserLabelProvider.java 7 Aug 2008 15:45:17 -0000 >@@ -10,6 +10,16 @@ > *******************************************************************************/ > package org.eclipse.pde.internal.runtime.registry; > >+import org.eclipse.pde.internal.runtime.registry.model.impl.generic.PluginObjectAdapter; >+ >+import org.eclipse.pde.internal.runtime.registry.model.IConfigurationAttribute; >+ >+import org.eclipse.pde.internal.runtime.registry.model.IBundlePrerequisite; >+ >+import org.eclipse.pde.internal.runtime.registry.model.IBundleLibrary; >+ >+import org.eclipse.pde.internal.runtime.registry.model.IBundleFolder; >+ > import java.io.IOException; > import java.net.URL; > import java.util.Arrays; >Index: src/org/eclipse/pde/internal/runtime/registry/IBundleFolder.java >=================================================================== >RCS file: src/org/eclipse/pde/internal/runtime/registry/IBundleFolder.java >diff -N src/org/eclipse/pde/internal/runtime/registry/IBundleFolder.java >--- src/org/eclipse/pde/internal/runtime/registry/IBundleFolder.java 24 Apr 2008 08:57:27 -0000 1.4 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,32 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2000, 2006 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.runtime.registry; >- >-import org.eclipse.core.runtime.IAdaptable; >-import org.osgi.framework.Bundle; >- >-public interface IBundleFolder extends IAdaptable { >- public static final int F_LOCATION = 0; >- public static final int F_EXTENSIONS = 1; >- public static final int F_EXTENSION_POINTS = 2; >- public static final int F_IMPORTS = 3; >- public static final int F_LIBRARIES = 4; >- public static final int F_REGISTERED_SERVICES = 5; >- public static final int F_SERVICES_IN_USE = 6; >- >- public Object[] getChildren(); >- >- public void refresh(); >- >- int getFolderId(); >- >- public Bundle getBundle(); >-} >Index: src/org/eclipse/pde/internal/runtime/registry/IBundleLibrary.java >=================================================================== >RCS file: src/org/eclipse/pde/internal/runtime/registry/IBundleLibrary.java >diff -N src/org/eclipse/pde/internal/runtime/registry/IBundleLibrary.java >--- src/org/eclipse/pde/internal/runtime/registry/IBundleLibrary.java 6 Mar 2006 14:50:59 -0000 1.2 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,15 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2006 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.runtime.registry; >- >-public interface IBundleLibrary { >- public String getLibrary(); >-} >Index: META-INF/MANIFEST.MF >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.pde.runtime/META-INF/MANIFEST.MF,v >retrieving revision 1.25 >diff -u -r1.25 MANIFEST.MF >--- META-INF/MANIFEST.MF 16 May 2008 17:17:24 -0000 1.25 >+++ META-INF/MANIFEST.MF 7 Aug 2008 15:45:17 -0000 >@@ -17,6 +17,9 @@ > Eclipse-LazyStart: true > Export-Package: org.eclipse.pde.internal.runtime;x-internal:=true, > org.eclipse.pde.internal.runtime.registry;x-internal:=true, >+ org.eclipse.pde.internal.runtime.registry.model;x-internal:=true, >+ org.eclipse.pde.internal.runtime.registry.model.impl.generic;x-internal:=true, >+ org.eclipse.pde.internal.runtime.registry.model.impl.local;x-internal:=true, > org.eclipse.pde.internal.runtime.spy;x-internal:=true, > org.eclipse.pde.internal.runtime.spy.dialogs;x-internal:=true, > org.eclipse.pde.internal.runtime.spy.handlers;x-internal:=true, >Index: src/org/eclipse/pde/internal/runtime/registry/model/IRegistryModel.java >=================================================================== >RCS file: src/org/eclipse/pde/internal/runtime/registry/model/IRegistryModel.java >diff -N src/org/eclipse/pde/internal/runtime/registry/model/IRegistryModel.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/pde/internal/runtime/registry/model/IRegistryModel.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,14 @@ >+package org.eclipse.pde.internal.runtime.registry.model; >+ >+public interface IRegistryModel { >+ >+ void connect(); >+ >+ IBundle[] getBundles(); >+ >+ IService[] getServices(); >+ >+ IExtensionPoint[] getExtensionPoints(); >+ >+ void disconnect(); >+} >Index: src/org/eclipse/pde/internal/runtime/registry/model/IModelObject.java >=================================================================== >RCS file: src/org/eclipse/pde/internal/runtime/registry/model/IModelObject.java >diff -N src/org/eclipse/pde/internal/runtime/registry/model/IModelObject.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/pde/internal/runtime/registry/model/IModelObject.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,8 @@ >+package org.eclipse.pde.internal.runtime.registry.model; >+ >+ >+public interface IModelObject { >+ >+ IModelObject getParent(); >+ >+} >Index: src/org/eclipse/pde/internal/runtime/registry/model/IExtension.java >=================================================================== >RCS file: src/org/eclipse/pde/internal/runtime/registry/model/IExtension.java >diff -N src/org/eclipse/pde/internal/runtime/registry/model/IExtension.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/pde/internal/runtime/registry/model/IExtension.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,5 @@ >+package org.eclipse.pde.internal.runtime.registry.model; >+ >+public interface IExtension extends IModelObject { >+ >+} >Index: src/org/eclipse/pde/internal/runtime/registry/model/impl/generic/ConfigurationAttribute.java >=================================================================== >RCS file: src/org/eclipse/pde/internal/runtime/registry/model/impl/generic/ConfigurationAttribute.java >diff -N src/org/eclipse/pde/internal/runtime/registry/model/impl/generic/ConfigurationAttribute.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/pde/internal/runtime/registry/model/impl/generic/ConfigurationAttribute.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,24 @@ >+/** >+ * >+ */ >+package org.eclipse.pde.internal.runtime.registry.model.impl.generic; >+ >+import org.eclipse.pde.internal.runtime.registry.model.IConfigurationAttribute; >+import org.eclipse.pde.internal.runtime.registry.model.IModelObject; >+ >+public class ConfigurationAttribute implements IConfigurationAttribute { >+ private String fLabel; >+ >+ public ConfigurationAttribute(String name, String value) { >+ fLabel = name + " = " + value; //$NON-NLS-1$ >+ } >+ >+ public String getLabel() { >+ return fLabel; >+ } >+ >+ public IModelObject getParent() { >+ // TODO Auto-generated method stub >+ return null; >+ } >+} >Index: src/org/eclipse/pde/internal/runtime/registry/model/IBundle.java >=================================================================== >RCS file: src/org/eclipse/pde/internal/runtime/registry/model/IBundle.java >diff -N src/org/eclipse/pde/internal/runtime/registry/model/IBundle.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/pde/internal/runtime/registry/model/IBundle.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,5 @@ >+package org.eclipse.pde.internal.runtime.registry.model; >+ >+public interface IBundle extends IModelObject { >+ >+} >Index: src/org/eclipse/pde/internal/runtime/registry/model/impl/generic/ParentAdapter.java >=================================================================== >RCS file: src/org/eclipse/pde/internal/runtime/registry/model/impl/generic/ParentAdapter.java >diff -N src/org/eclipse/pde/internal/runtime/registry/model/impl/generic/ParentAdapter.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/pde/internal/runtime/registry/model/impl/generic/ParentAdapter.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,28 @@ >+/******************************************************************************* >+ * Copyright (c) 2000, 2006 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.runtime.registry.model.impl.generic; >+ >+ >+public abstract class ParentAdapter extends PluginObjectAdapter { >+ Object[] fChildren; >+ >+ public ParentAdapter(Object object) { >+ super(object); >+ } >+ >+ protected abstract Object[] createChildren(); >+ >+ public Object[] getChildren() { >+ if (fChildren == null) >+ fChildren = createChildren(); >+ return fChildren; >+ } >+} >Index: src/org/eclipse/pde/internal/runtime/registry/model/IBundleFolder.java >=================================================================== >RCS file: src/org/eclipse/pde/internal/runtime/registry/model/IBundleFolder.java >diff -N src/org/eclipse/pde/internal/runtime/registry/model/IBundleFolder.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/pde/internal/runtime/registry/model/IBundleFolder.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,31 @@ >+/******************************************************************************* >+ * Copyright (c) 2000, 2006 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.runtime.registry.model; >+ >+import org.osgi.framework.Bundle; >+ >+public interface IBundleFolder extends IModelObject { >+ public static final int F_LOCATION = 0; >+ public static final int F_EXTENSIONS = 1; >+ public static final int F_EXTENSION_POINTS = 2; >+ public static final int F_IMPORTS = 3; >+ public static final int F_LIBRARIES = 4; >+ public static final int F_REGISTERED_SERVICES = 5; >+ public static final int F_SERVICES_IN_USE = 6; >+ >+ public Object[] getChildren(); >+ >+ public void refresh(); >+ >+ int getFolderId(); >+ >+ public Bundle getBundle(); >+} >Index: src/org/eclipse/pde/internal/runtime/registry/model/IBundleLibrary.java >=================================================================== >RCS file: src/org/eclipse/pde/internal/runtime/registry/model/IBundleLibrary.java >diff -N src/org/eclipse/pde/internal/runtime/registry/model/IBundleLibrary.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/pde/internal/runtime/registry/model/IBundleLibrary.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,15 @@ >+/******************************************************************************* >+ * Copyright (c) 2006 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.runtime.registry.model; >+ >+public interface IBundleLibrary extends IModelObject { >+ public String getLibrary(); >+} >Index: src/org/eclipse/pde/internal/runtime/registry/model/impl/local/ExtensionPointAdapter.java >=================================================================== >RCS file: src/org/eclipse/pde/internal/runtime/registry/model/impl/local/ExtensionPointAdapter.java >diff -N src/org/eclipse/pde/internal/runtime/registry/model/impl/local/ExtensionPointAdapter.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/pde/internal/runtime/registry/model/impl/local/ExtensionPointAdapter.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,35 @@ >+/******************************************************************************* >+ * Copyright (c) 2000, 2006 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.runtime.registry.model.impl.local; >+ >+import org.eclipse.pde.internal.runtime.registry.model.impl.generic.ParentAdapter; >+ >+import org.eclipse.core.runtime.IExtension; >+import org.eclipse.core.runtime.IExtensionPoint; >+ >+public class ExtensionPointAdapter extends ParentAdapter { >+ >+ public ExtensionPointAdapter(Object object) { >+ super(object); >+ } >+ >+ protected Object[] createChildren() { >+ IExtensionPoint extensionPoint = (IExtensionPoint) getObject(); >+ >+ IExtension[] extensions = extensionPoint.getExtensions(); >+ Object[] result = new Object[extensions.length]; >+ for (int i = 0; i < extensions.length; i++) { >+ IExtension extension = extensions[i]; >+ result[i] = new ExtensionAdapter(extension); >+ } >+ return result; >+ } >+} >Index: src/org/eclipse/pde/internal/runtime/registry/model/impl/local/ExtensionAdapter.java >=================================================================== >RCS file: src/org/eclipse/pde/internal/runtime/registry/model/impl/local/ExtensionAdapter.java >diff -N src/org/eclipse/pde/internal/runtime/registry/model/impl/local/ExtensionAdapter.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/pde/internal/runtime/registry/model/impl/local/ExtensionAdapter.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,36 @@ >+/******************************************************************************* >+ * Copyright (c) 2000, 2006 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.runtime.registry.model.impl.local; >+ >+import org.eclipse.pde.internal.runtime.registry.model.impl.generic.ParentAdapter; >+ >+ >+import org.eclipse.core.runtime.IConfigurationElement; >+import org.eclipse.core.runtime.IExtension; >+ >+public class ExtensionAdapter extends ParentAdapter { >+ >+ public ExtensionAdapter(Object object) { >+ super(object); >+ } >+ >+ protected Object[] createChildren() { >+ IExtension extension = (IExtension) getObject(); >+ >+ IConfigurationElement[] elements = extension.getConfigurationElements(); >+ Object[] result = new ConfigurationElementAdapter[elements.length]; >+ for (int i = 0; i < elements.length; i++) { >+ IConfigurationElement config = elements[i]; >+ result[i] = new ConfigurationElementAdapter(config); >+ } >+ return result; >+ } >+} >Index: src/org/eclipse/pde/internal/runtime/registry/model/impl/local/ServiceReferenceAdapter.java >=================================================================== >RCS file: src/org/eclipse/pde/internal/runtime/registry/model/impl/local/ServiceReferenceAdapter.java >diff -N src/org/eclipse/pde/internal/runtime/registry/model/impl/local/ServiceReferenceAdapter.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/pde/internal/runtime/registry/model/impl/local/ServiceReferenceAdapter.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,37 @@ >+/******************************************************************************* >+ * Copyright (c) 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.runtime.registry.model.impl.local; >+ >+import org.eclipse.pde.internal.runtime.registry.model.impl.generic.ParentAdapter; >+ >+import org.osgi.framework.ServiceReference; >+ >+public class ServiceReferenceAdapter extends ParentAdapter { >+ >+ public ServiceReferenceAdapter(ServiceReference object) { >+ super(object); >+ } >+ >+ protected Object[] createChildren() { >+ // TODO pluggable support for different services >+ return null; >+ } >+ >+ public boolean equals(Object obj) { >+ // imitate ServiceReference behavior, that multiple ServiceReference instances are equal >+ return (obj instanceof ServiceReferenceAdapter) ? getObject().equals(((ServiceReferenceAdapter) obj).getObject()) : false; >+ } >+ >+ public int hashCode() { >+ // imitate ServiceReference behavior, that multiple ServiceReference instances return the same hashCode >+ return getObject().hashCode(); >+ } >+} >Index: src/org/eclipse/pde/internal/runtime/registry/model/IBundlePrerequisite.java >=================================================================== >RCS file: src/org/eclipse/pde/internal/runtime/registry/model/IBundlePrerequisite.java >diff -N src/org/eclipse/pde/internal/runtime/registry/model/IBundlePrerequisite.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/pde/internal/runtime/registry/model/IBundlePrerequisite.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,21 @@ >+/******************************************************************************* >+ * Copyright (c) 2006 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.runtime.registry.model; >+ >+import org.eclipse.osgi.util.ManifestElement; >+ >+public interface IBundlePrerequisite extends IModelObject { >+ public ManifestElement getPrerequisite(); >+ >+ public boolean isExported(); >+ >+ public String getLabel(); >+} >Index: src/org/eclipse/pde/internal/runtime/registry/model/impl/local/ConfigurationElementAdapter.java >=================================================================== >RCS file: src/org/eclipse/pde/internal/runtime/registry/model/impl/local/ConfigurationElementAdapter.java >diff -N src/org/eclipse/pde/internal/runtime/registry/model/impl/local/ConfigurationElementAdapter.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/pde/internal/runtime/registry/model/impl/local/ConfigurationElementAdapter.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,46 @@ >+/******************************************************************************* >+ * Copyright (c) 2000, 2006 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.runtime.registry.model.impl.local; >+ >+ >+import org.eclipse.pde.internal.runtime.registry.model.impl.generic.ParentAdapter; >+ >+import org.eclipse.pde.internal.runtime.registry.model.impl.generic.ConfigurationAttribute; >+ >+import org.eclipse.pde.internal.runtime.registry.model.IConfigurationAttribute; >+ >+import org.eclipse.core.runtime.IConfigurationElement; >+ >+public class ConfigurationElementAdapter extends ParentAdapter { >+ >+ public ConfigurationElementAdapter(Object object) { >+ super(object); >+ } >+ >+ protected Object[] createChildren() { >+ IConfigurationElement config = (IConfigurationElement) getObject(); >+ String[] atts = config.getAttributeNames(); >+ IConfigurationAttribute[] catts = new IConfigurationAttribute[atts.length]; >+ for (int i = 0; i < atts.length; i++) >+ catts[i] = new ConfigurationAttribute(atts[i], config.getAttribute(atts[i])); >+ IConfigurationElement[] children = config.getChildren(); >+ Object[] result = new Object[children.length + catts.length]; >+ for (int i = 0; i < children.length; i++) { >+ IConfigurationElement child = children[i]; >+ result[i] = new ConfigurationElementAdapter(child); >+ } >+ for (int i = 0; i < catts.length; i++) { >+ IConfigurationAttribute child = catts[i]; >+ result[children.length + i] = new ConfigurationAttributeAdapter(child); >+ } >+ return result; >+ } >+} >Index: src/org/eclipse/pde/internal/runtime/registry/model/IExtensionPoint.java >=================================================================== >RCS file: src/org/eclipse/pde/internal/runtime/registry/model/IExtensionPoint.java >diff -N src/org/eclipse/pde/internal/runtime/registry/model/IExtensionPoint.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/pde/internal/runtime/registry/model/IExtensionPoint.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,5 @@ >+package org.eclipse.pde.internal.runtime.registry.model; >+ >+public interface IExtensionPoint extends IModelObject { >+ >+} >Index: src/org/eclipse/pde/internal/runtime/registry/model/impl/local/BundlePrerequisite.java >=================================================================== >RCS file: src/org/eclipse/pde/internal/runtime/registry/model/impl/local/BundlePrerequisite.java >diff -N src/org/eclipse/pde/internal/runtime/registry/model/impl/local/BundlePrerequisite.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/pde/internal/runtime/registry/model/impl/local/BundlePrerequisite.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,41 @@ >+/** >+ * >+ */ >+package org.eclipse.pde.internal.runtime.registry.model.impl.local; >+ >+import org.eclipse.osgi.util.ManifestElement; >+import org.eclipse.pde.internal.runtime.registry.model.IBundlePrerequisite; >+import org.eclipse.pde.internal.runtime.registry.model.IModelObject; >+import org.osgi.framework.Constants; >+ >+public class BundlePrerequisite implements IBundlePrerequisite { >+ private ManifestElement underlyingElement; >+ >+ public BundlePrerequisite(ManifestElement element) { >+ underlyingElement = element; >+ } >+ >+ public ManifestElement getPrerequisite() { >+ return underlyingElement; >+ } >+ >+ public boolean isExported() { >+ String visibility = underlyingElement.getDirective(Constants.VISIBILITY_DIRECTIVE); >+ return Constants.VISIBILITY_REEXPORT.equals(visibility); >+ } >+ >+ public String getLabel() { >+ String version = underlyingElement.getAttribute(Constants.BUNDLE_VERSION_ATTRIBUTE); >+ String value = underlyingElement.getValue(); >+ if (version == null) >+ return value; >+ if (Character.isDigit(version.charAt(0))) >+ version = '(' + version + ')'; >+ return value + ' ' + version; >+ } >+ >+ public IModelObject getParent() { >+ // TODO Auto-generated method stub >+ return null; >+ } >+} >Index: src/org/eclipse/pde/internal/runtime/registry/model/RegistryModelFactory.java >=================================================================== >RCS file: src/org/eclipse/pde/internal/runtime/registry/model/RegistryModelFactory.java >diff -N src/org/eclipse/pde/internal/runtime/registry/model/RegistryModelFactory.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/pde/internal/runtime/registry/model/RegistryModelFactory.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,22 @@ >+package org.eclipse.pde.internal.runtime.registry.model; >+ >+import java.net.URL; >+ >+/** >+ * Produces RegistryModels for URLs. Valid URLs: >+ * local >+ * target >+ * remote://host:port >+ * >+ */ >+public class RegistryModelFactory { >+ >+ /** >+ * >+ * @param codename >+ * @return never returns null >+ */ >+ public IRegistryModel getRegistryModel(URL codename) { >+ return null; >+ } >+} >Index: src/org/eclipse/pde/internal/runtime/registry/model/impl/generic/PluginObjectAdapter.java >=================================================================== >RCS file: src/org/eclipse/pde/internal/runtime/registry/model/impl/generic/PluginObjectAdapter.java >diff -N src/org/eclipse/pde/internal/runtime/registry/model/impl/generic/PluginObjectAdapter.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/pde/internal/runtime/registry/model/impl/generic/PluginObjectAdapter.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,25 @@ >+/******************************************************************************* >+ * Copyright (c) 2000, 2006 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.runtime.registry.model.impl.generic; >+ >+import org.eclipse.core.runtime.PlatformObject; >+ >+public class PluginObjectAdapter extends PlatformObject { >+ private Object fObject; >+ >+ public PluginObjectAdapter(Object object) { >+ this.fObject = object; >+ } >+ >+ public Object getObject() { >+ return fObject; >+ } >+} >Index: src/org/eclipse/pde/internal/runtime/registry/model/IConfigurationAttribute.java >=================================================================== >RCS file: src/org/eclipse/pde/internal/runtime/registry/model/IConfigurationAttribute.java >diff -N src/org/eclipse/pde/internal/runtime/registry/model/IConfigurationAttribute.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/pde/internal/runtime/registry/model/IConfigurationAttribute.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,15 @@ >+/******************************************************************************* >+ * Copyright (c) 2006 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.runtime.registry.model; >+ >+public interface IConfigurationAttribute extends IModelObject { >+ public String getLabel(); >+} >Index: src/org/eclipse/pde/internal/runtime/registry/model/IService.java >=================================================================== >RCS file: src/org/eclipse/pde/internal/runtime/registry/model/IService.java >diff -N src/org/eclipse/pde/internal/runtime/registry/model/IService.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/pde/internal/runtime/registry/model/IService.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,5 @@ >+package org.eclipse.pde.internal.runtime.registry.model; >+ >+public interface IService extends IModelObject { >+ >+} >Index: src/org/eclipse/pde/internal/runtime/registry/model/impl/local/ConfigurationAttributeAdapter.java >=================================================================== >RCS file: src/org/eclipse/pde/internal/runtime/registry/model/impl/local/ConfigurationAttributeAdapter.java >diff -N src/org/eclipse/pde/internal/runtime/registry/model/impl/local/ConfigurationAttributeAdapter.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/pde/internal/runtime/registry/model/impl/local/ConfigurationAttributeAdapter.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,25 @@ >+/******************************************************************************* >+ * Copyright (c) 2006 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.runtime.registry.model.impl.local; >+ >+import org.eclipse.pde.internal.runtime.registry.model.impl.generic.ParentAdapter; >+ >+public class ConfigurationAttributeAdapter extends ParentAdapter { >+ >+ public ConfigurationAttributeAdapter(Object object) { >+ super(object); >+ } >+ >+ protected Object[] createChildren() { >+ return null; >+ } >+ >+} >Index: src/org/eclipse/pde/internal/runtime/registry/model/IConfigurationElement.java >=================================================================== >RCS file: src/org/eclipse/pde/internal/runtime/registry/model/IConfigurationElement.java >diff -N src/org/eclipse/pde/internal/runtime/registry/model/IConfigurationElement.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/pde/internal/runtime/registry/model/IConfigurationElement.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,5 @@ >+package org.eclipse.pde.internal.runtime.registry.model; >+ >+public interface IConfigurationElement extends IModelObject { >+ >+} >Index: src/org/eclipse/pde/internal/runtime/registry/model/impl/local/BundleFolder.java >=================================================================== >RCS file: src/org/eclipse/pde/internal/runtime/registry/model/impl/local/BundleFolder.java >diff -N src/org/eclipse/pde/internal/runtime/registry/model/impl/local/BundleFolder.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/pde/internal/runtime/registry/model/impl/local/BundleFolder.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,51 @@ >+/** >+ * >+ */ >+package org.eclipse.pde.internal.runtime.registry.model.impl.local; >+ >+import org.eclipse.pde.internal.runtime.registry.RegistryBrowserContentProvider; >+import org.eclipse.pde.internal.runtime.registry.model.IBundleFolder; >+import org.eclipse.pde.internal.runtime.registry.model.IModelObject; >+import org.osgi.framework.Bundle; >+ >+public class BundleFolder implements IBundleFolder { >+ private int id; >+ private Bundle bundle; >+ private Object[] children; >+ >+ public BundleFolder(Bundle pd, int id) { >+ this.bundle = pd; >+ this.id = id; >+ } >+ >+ public Bundle getBundle() { >+ return bundle; >+ } >+ >+ public Object[] getChildren() { >+ if (children == null) { >+ children = RegistryBrowserContentProvider.getFolderChildren(bundle, id); >+ } >+ return children; >+ } >+ >+ /** >+ * Resets folder's previously cached knowledge about it's children. >+ */ >+ public void refresh() { >+ children = null; >+ } >+ >+ public int getFolderId() { >+ return id; >+ } >+ >+ public Object getAdapter(Class key) { >+ return null; >+ } >+ >+ public IModelObject getParent() { >+ // TODO Auto-generated method stub >+ return null; >+ } >+} >Index: src/org/eclipse/pde/internal/runtime/registry/model/impl/local/PluginAdapter.java >=================================================================== >RCS file: src/org/eclipse/pde/internal/runtime/registry/model/impl/local/PluginAdapter.java >diff -N src/org/eclipse/pde/internal/runtime/registry/model/impl/local/PluginAdapter.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/pde/internal/runtime/registry/model/impl/local/PluginAdapter.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,41 @@ >+/******************************************************************************* >+ * Copyright (c) 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.runtime.registry.model.impl.local; >+ >+import org.eclipse.pde.internal.runtime.registry.model.impl.generic.ParentAdapter; >+ >+import org.eclipse.pde.internal.runtime.registry.model.IBundleFolder; >+import org.osgi.framework.Bundle; >+ >+/** >+ * Adapter for bundle objects. >+ * >+ */ >+public class PluginAdapter extends ParentAdapter { >+ >+ public PluginAdapter(Bundle object) { >+ super(object); >+ } >+ >+ protected Object[] createChildren() { >+ Bundle bundle = (Bundle) getObject(); >+ >+ Object[] array = new Object[7]; >+ array[0] = new BundleFolder(bundle, IBundleFolder.F_LOCATION); >+ array[1] = new BundleFolder(bundle, IBundleFolder.F_IMPORTS); >+ array[2] = new BundleFolder(bundle, IBundleFolder.F_LIBRARIES); >+ array[3] = new BundleFolder(bundle, IBundleFolder.F_EXTENSION_POINTS); >+ array[4] = new BundleFolder(bundle, IBundleFolder.F_EXTENSIONS); >+ array[5] = new BundleFolder(bundle, IBundleFolder.F_REGISTERED_SERVICES); >+ array[6] = new BundleFolder(bundle, IBundleFolder.F_SERVICES_IN_USE); >+ return array; >+ } >+} >Index: src/org/eclipse/pde/internal/runtime/registry/model/impl/local/BundleLibrary.java >=================================================================== >RCS file: src/org/eclipse/pde/internal/runtime/registry/model/impl/local/BundleLibrary.java >diff -N src/org/eclipse/pde/internal/runtime/registry/model/impl/local/BundleLibrary.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/pde/internal/runtime/registry/model/impl/local/BundleLibrary.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,25 @@ >+/** >+ * >+ */ >+package org.eclipse.pde.internal.runtime.registry.model.impl.local; >+ >+import org.eclipse.osgi.util.ManifestElement; >+import org.eclipse.pde.internal.runtime.registry.model.IBundleLibrary; >+import org.eclipse.pde.internal.runtime.registry.model.IModelObject; >+ >+public class BundleLibrary implements IBundleLibrary { >+ private ManifestElement underlyingElement; >+ >+ public BundleLibrary(ManifestElement element) { >+ underlyingElement = element; >+ } >+ >+ public String getLibrary() { >+ return underlyingElement.getValue(); >+ } >+ >+ public IModelObject getParent() { >+ // TODO Auto-generated method stub >+ return null; >+ } >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 243441
:
109423
|
109425
|
109519
|
109664
|
109665
|
115415