You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by ni...@apache.org on 2003/12/02 11:15:17 UTC

cvs commit: avalon-sandbox/ide/org.apache.avalon.ide.eclipse.repository/src/java/org/apache/avalon/ide/eclipse/repository/preferences AddRepositoryDialog.java

niclas      2003/12/02 02:15:17

  Modified:    ide/org.apache.avalon.ide.eclipse.repository/doc
                        org_apache_avalon_ide_eclipse_repository_agent.html
               ide/org.apache.avalon.ide.eclipse.repository/src/java/org/apache/avalon/ide/eclipse/repository/plugins
                        PluginHandlerUninstalled.java
                        PluginHandlerUpdated.java
                        PluginHandlerResolved.java
                        PluginHandlerUnresolved.java
                        PluginHandlerStarted.java PluginHandlerStopped.java
                        PluginHandlerInstalled.java
               ide/org.apache.avalon.ide.eclipse.repository/schema
                        agent.exsd
               ide/org.apache.avalon.ide.eclipse.repository/src/java/org/apache/avalon/ide/eclipse/repository/views
                        ViewContentProvider.java
               ide/org.apache.avalon.ide.eclipse.repository/src/java/org/apache/avalon/ide/eclipse/repository
                        RepositoryPlugin.java
               ide/org.apache.avalon.ide.eclipse.repository/src/java/org/apache/avalon/ide/eclipse/repository/preferences
                        AddRepositoryDialog.java
  Log:
  Consolidating the many changes. Have not reached a stable stage yet.
  
  Revision  Changes    Path
  1.2       +12 -4     avalon-sandbox/ide/org.apache.avalon.ide.eclipse.repository/doc/org_apache_avalon_ide_eclipse_repository_agent.html
  
  Index: org_apache_avalon_ide_eclipse_repository_agent.html
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/ide/org.apache.avalon.ide.eclipse.repository/doc/org_apache_avalon_ide_eclipse_repository_agent.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- org_apache_avalon_ide_eclipse_repository_agent.html	1 Dec 2003 21:14:37 -0000	1.1
  +++ org_apache_avalon_ide_eclipse_repository_agent.html	2 Dec 2003 10:15:16 -0000	1.2
  @@ -16,23 +16,31 @@
   <p>
   <h6 class=CaptionFigColumn id=header>Description: </h6>The Repository Agent extension is all about registration of RepositoryAgentFactory implementations, that knows how to contact repositories, on-line and off-line.</p>
   <p><h6 class=CaptionFigColumn id=header>Configuration Markup:</h6></p>
  -<p class=code id=dtd>&lt;!ELEMENT <a name="e.extension">extension</a> (<a href="#e.description">description</a>)&gt;</p>
  +<p class=code id=dtd>&lt;!ELEMENT <a name="e.extension">extension</a> (<a href="#e.description">description</a> , <a href="#e.scheme">scheme</a>)&gt;</p>
   <p class=code id=dtd>&lt;!ATTLIST extension</p>
  -<p class=code id=dtdAttlist>name&nbsp;&nbsp;CDATA "Sample Repository Agent"<p class=code id=dtdAttlist>id&nbsp;&nbsp;&nbsp;&nbsp;CDATA #IMPLIED<p class=code id=dtdAttlist>point&nbsp;CDATA #REQUIRED<p class=code id=dtdAttlist>class&nbsp;CDATA #REQUIRED&gt;</p>
  +<p class=code id=dtdAttlist>name&nbsp;&nbsp;CDATA "Sample Repository Agent"<p class=code id=dtdAttlist>id&nbsp;&nbsp;&nbsp;&nbsp;CDATA #IMPLIED<p class=code id=dtdAttlist>point&nbsp;CDATA #REQUIRED&gt;</p>
   <p></p>
   <p class=ConfigMarkup id=elementDesc>
   Definition of the Repository Agent extension point.</p>
   <br>
   <ul class=ConfigMarkup id=attlistDesc>
   <li><b>name</b> - The name of the Repository Agent plug-in. This name will be used on-screen.</li>
  -<li><b>class</b> - The classname of the RepositoryAgentFactory interface, of course inclusive of the package name.</li>
   </ul>
   <br><p class=code id=dtd>&lt;!ELEMENT <a name="e.description">description</a> (#CDATA)&gt;</p>
   <p></p>
   <p class=ConfigMarkup id=elementDesc>
   A longer description of the capabilities of the RepositoryAgent and its factory.</p>
   <br><br>
  -<h6 class=CaptionFigColumn id=header>Examples: </h6>[Enter extension point usage example here.]
  +<p class=code id=dtd>&lt;!ELEMENT <a name="e.scheme">scheme</a> (<a href="#e.description">description</a>)&gt;</p>
  +<p class=code id=dtd>&lt;!ATTLIST scheme</p>
  +<p class=code id=dtdAttlist>class&nbsp;&nbsp;CDATA #REQUIRED<p class=code id=dtdAttlist>name&nbsp;&nbsp;&nbsp;CDATA "Sample Repository Agent"<p class=code id=dtdAttlist>prefix&nbsp;CDATA #IMPLIED&gt;</p>
  +<p></p>
  +<ul class=ConfigMarkup id=attlistDesc>
  +<li><b>class</b> - The classname of the RepositoryAgentFactory interface, of course inclusive of the package name.</li>
  +<li><b>name</b> - The official name of the scheme. Example; "Maven Repository"</li>
  +<li><b>prefix</b> - The registered (at Avalon) unique prefix for the Scheme.</li>
  +</ul>
  +<br><h6 class=CaptionFigColumn id=header>Examples: </h6>[Enter extension point usage example here.]
   <p></p>
   
   <h6 class=CaptionFigColumn id=header>API Information: </h6>[Enter API information here.]
  
  
  
  1.2       +2 -1      avalon-sandbox/ide/org.apache.avalon.ide.eclipse.repository/src/java/org/apache/avalon/ide/eclipse/repository/plugins/PluginHandlerUninstalled.java
  
  Index: PluginHandlerUninstalled.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/ide/org.apache.avalon.ide.eclipse.repository/src/java/org/apache/avalon/ide/eclipse/repository/plugins/PluginHandlerUninstalled.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PluginHandlerUninstalled.java	1 Dec 2003 21:14:37 -0000	1.1
  +++ PluginHandlerUninstalled.java	2 Dec 2003 10:15:17 -0000	1.2
  @@ -44,6 +44,7 @@
    */
   package org.apache.avalon.ide.eclipse.repository.plugins;
   
  +import org.apache.avalon.ide.repository.RepositoryTypeRegistry;
   import org.eclipse.core.runtime.IPluginDescriptor;
   
   /**
  @@ -55,7 +56,7 @@
       /**
        * 
        */
  -    public PluginHandlerUninstalled()
  +    public PluginHandlerUninstalled(RepositoryTypeRegistry registry)
       {
           super();
           // TODO Auto-generated constructor stub
  
  
  
  1.2       +2 -1      avalon-sandbox/ide/org.apache.avalon.ide.eclipse.repository/src/java/org/apache/avalon/ide/eclipse/repository/plugins/PluginHandlerUpdated.java
  
  Index: PluginHandlerUpdated.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/ide/org.apache.avalon.ide.eclipse.repository/src/java/org/apache/avalon/ide/eclipse/repository/plugins/PluginHandlerUpdated.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PluginHandlerUpdated.java	1 Dec 2003 21:14:37 -0000	1.1
  +++ PluginHandlerUpdated.java	2 Dec 2003 10:15:17 -0000	1.2
  @@ -44,6 +44,7 @@
    */
   package org.apache.avalon.ide.eclipse.repository.plugins;
   
  +import org.apache.avalon.ide.repository.RepositoryTypeRegistry;
   import org.eclipse.core.runtime.IPluginDescriptor;
   
   /**
  @@ -55,7 +56,7 @@
       /**
        * 
        */
  -    public PluginHandlerUpdated()
  +    public PluginHandlerUpdated(RepositoryTypeRegistry registry)
       {
           super();
           // TODO Auto-generated constructor stub
  
  
  
  1.2       +2 -1      avalon-sandbox/ide/org.apache.avalon.ide.eclipse.repository/src/java/org/apache/avalon/ide/eclipse/repository/plugins/PluginHandlerResolved.java
  
  Index: PluginHandlerResolved.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/ide/org.apache.avalon.ide.eclipse.repository/src/java/org/apache/avalon/ide/eclipse/repository/plugins/PluginHandlerResolved.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PluginHandlerResolved.java	1 Dec 2003 21:14:37 -0000	1.1
  +++ PluginHandlerResolved.java	2 Dec 2003 10:15:17 -0000	1.2
  @@ -44,6 +44,7 @@
    */
   package org.apache.avalon.ide.eclipse.repository.plugins;
   
  +import org.apache.avalon.ide.repository.RepositoryTypeRegistry;
   import org.eclipse.core.runtime.IPluginDescriptor;
   
   /**
  @@ -55,7 +56,7 @@
       /**
        * 
        */
  -    public PluginHandlerResolved()
  +    public PluginHandlerResolved(RepositoryTypeRegistry registry)
       {
           super();
           // TODO Auto-generated constructor stub
  
  
  
  1.2       +2 -1      avalon-sandbox/ide/org.apache.avalon.ide.eclipse.repository/src/java/org/apache/avalon/ide/eclipse/repository/plugins/PluginHandlerUnresolved.java
  
  Index: PluginHandlerUnresolved.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/ide/org.apache.avalon.ide.eclipse.repository/src/java/org/apache/avalon/ide/eclipse/repository/plugins/PluginHandlerUnresolved.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PluginHandlerUnresolved.java	1 Dec 2003 21:14:37 -0000	1.1
  +++ PluginHandlerUnresolved.java	2 Dec 2003 10:15:17 -0000	1.2
  @@ -44,6 +44,7 @@
    */
   package org.apache.avalon.ide.eclipse.repository.plugins;
   
  +import org.apache.avalon.ide.repository.RepositoryTypeRegistry;
   import org.eclipse.core.runtime.IPluginDescriptor;
   
   /**
  @@ -55,7 +56,7 @@
       /**
        * 
        */
  -    public PluginHandlerUnresolved()
  +    public PluginHandlerUnresolved(RepositoryTypeRegistry registry)
       {
           super();
           // TODO Auto-generated constructor stub
  
  
  
  1.2       +2 -1      avalon-sandbox/ide/org.apache.avalon.ide.eclipse.repository/src/java/org/apache/avalon/ide/eclipse/repository/plugins/PluginHandlerStarted.java
  
  Index: PluginHandlerStarted.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/ide/org.apache.avalon.ide.eclipse.repository/src/java/org/apache/avalon/ide/eclipse/repository/plugins/PluginHandlerStarted.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PluginHandlerStarted.java	1 Dec 2003 21:14:37 -0000	1.1
  +++ PluginHandlerStarted.java	2 Dec 2003 10:15:17 -0000	1.2
  @@ -44,6 +44,7 @@
    */
   package org.apache.avalon.ide.eclipse.repository.plugins;
   
  +import org.apache.avalon.ide.repository.RepositoryTypeRegistry;
   import org.eclipse.core.runtime.IPluginDescriptor;
   
   /**
  @@ -55,7 +56,7 @@
       /**
        * 
        */
  -    public PluginHandlerStarted()
  +    public PluginHandlerStarted(RepositoryTypeRegistry registry)
       {
           super();
           // TODO Auto-generated constructor stub
  
  
  
  1.2       +2 -1      avalon-sandbox/ide/org.apache.avalon.ide.eclipse.repository/src/java/org/apache/avalon/ide/eclipse/repository/plugins/PluginHandlerStopped.java
  
  Index: PluginHandlerStopped.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/ide/org.apache.avalon.ide.eclipse.repository/src/java/org/apache/avalon/ide/eclipse/repository/plugins/PluginHandlerStopped.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PluginHandlerStopped.java	1 Dec 2003 21:14:37 -0000	1.1
  +++ PluginHandlerStopped.java	2 Dec 2003 10:15:17 -0000	1.2
  @@ -44,6 +44,7 @@
    */
   package org.apache.avalon.ide.eclipse.repository.plugins;
   
  +import org.apache.avalon.ide.repository.RepositoryTypeRegistry;
   import org.eclipse.core.runtime.IPluginDescriptor;
   
   /**
  @@ -55,7 +56,7 @@
       /**
        * 
        */
  -    public PluginHandlerStopped()
  +    public PluginHandlerStopped(RepositoryTypeRegistry registry)
       {
           super();
           // TODO Auto-generated constructor stub
  
  
  
  1.2       +70 -28    avalon-sandbox/ide/org.apache.avalon.ide.eclipse.repository/src/java/org/apache/avalon/ide/eclipse/repository/plugins/PluginHandlerInstalled.java
  
  Index: PluginHandlerInstalled.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/ide/org.apache.avalon.ide.eclipse.repository/src/java/org/apache/avalon/ide/eclipse/repository/plugins/PluginHandlerInstalled.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PluginHandlerInstalled.java	1 Dec 2003 21:14:37 -0000	1.1
  +++ PluginHandlerInstalled.java	2 Dec 2003 10:15:17 -0000	1.2
  @@ -7,24 +7,23 @@
    * Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
    * 
    * Redistribution and use in source and binary forms, with or without modifica-
  - * tion, are permitted provided that the following conditions are met:
  - *  1. Redistributions of source code must retain the above copyright notice,
  - * this list of conditions and the following disclaimer.
  - *  2. Redistributions in binary form must reproduce the above copyright
  - * notice, this list of conditions and the following disclaimer in the
  - * documentation and/or other materials provided with the distribution.
  - *  3. The end-user documentation included with the redistribution, if any,
  - * must include the following acknowledgment: "This product includes software
  - * developed by the Apache Software Foundation (http://www.apache.org/)."
  - * Alternately, this acknowledgment may appear in the software itself, if and
  - * wherever such third-party acknowledgments normally appear.
  - *  4. The names "Jakarta", "Apache Avalon", "Avalon Framework" and "Apache
  - * Software Foundation" must not be used to endorse or promote products derived
  - * from this software without prior written permission. For written permission,
  - * please contact apache@apache.org.
  - *  5. Products derived from this software may not be called "Apache", nor may
  - * "Apache" appear in their name, without prior written permission of the
  - * Apache Software Foundation.
  + * tion, are permitted provided that the following conditions are met: 1.
  + * Redistributions of source code must retain the above copyright notice, this
  + * list of conditions and the following disclaimer. 2. Redistributions in
  + * binary form must reproduce the above copyright notice, this list of
  + * conditions and the following disclaimer in the documentation and/or other
  + * materials provided with the distribution. 3. The end-user documentation
  + * included with the redistribution, if any, must include the following
  + * acknowledgment: "This product includes software developed by the Apache
  + * Software Foundation (http://www.apache.org/)." Alternately, this
  + * acknowledgment may appear in the software itself, if and wherever such
  + * third-party acknowledgments normally appear. 4. The names "Jakarta", "Apache
  + * Avalon", "Avalon Framework" and "Apache Software Foundation" must not be
  + * used to endorse or promote products derived from this software without prior
  + * written permission. For written permission, please contact
  + * apache@apache.org. 5. Products derived from this software may not be called
  + * "Apache", nor may "Apache" appear in their name, without prior written
  + * permission of the Apache Software Foundation.
    * 
    * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
    * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  @@ -44,6 +43,14 @@
    */
   package org.apache.avalon.ide.eclipse.repository.plugins;
   
  +import org.apache.avalon.ide.repository.InvalidSchemeException;
  +import org.apache.avalon.ide.repository.RepositoryAgentFactory;
  +import org.apache.avalon.ide.repository.RepositorySchemeDescriptor;
  +import org.apache.avalon.ide.repository.RepositoryTypeRegistry;
  +import org.apache.avalon.ide.repository.tools.common.GenericSchemeDescriptor;
  +import org.eclipse.core.runtime.CoreException;
  +import org.eclipse.core.runtime.IConfigurationElement;
  +import org.eclipse.core.runtime.IExtension;
   import org.eclipse.core.runtime.IPluginDescriptor;
   
   /**
  @@ -51,23 +58,58 @@
    */
   public class PluginHandlerInstalled implements PluginHandler
   {
  +    private RepositoryTypeRegistry m_Registry;
   
  -    /**
  -     * 
  -     */
  -    public PluginHandlerInstalled()
  +    public PluginHandlerInstalled(RepositoryTypeRegistry registry)
       {
           super();
  -        // TODO Auto-generated constructor stub
  +        m_Registry = registry;
       }
   
  -    /* (non-Javadoc)
  -     * @see org.apache.avalon.ide.eclipse.repository.PluginHandler#handle(org.eclipse.core.runtime.IPluginDescriptor)
  -     */
  -    public void handle(IPluginDescriptor pDescriptor) throws PluginHandlerException
  +    /**
  +	 * Handle the IPluginEvent.INSTALLED.
  +	 * 
  +	 * @see org.apache.avalon.ide.eclipse.repository.PluginHandler#handle(org.eclipse.core.runtime.IPluginDescriptor)
  +	 */
  +    public void handle(IPluginDescriptor descriptor) throws PluginHandlerException
       {
  -        // TODO Auto-generated method stub
  +        String prefix = null;
  +        try
  +        {
  +            IExtension[] extensions = descriptor.getExtensions();
  +            for (int i = 0; i < extensions.length; i++)
  +            {
  +                IConfigurationElement[] elements = extensions[i].getConfigurationElements();
  +                for (int j = 0; j < elements.length; j++)
  +                {
  +                    if ("scheme".equals(elements[j].getName()))
  +                    {
  +                        RepositoryAgentFactory factory =
  +                            (RepositoryAgentFactory) elements[j].createExecutableExtension("class");
  +                        prefix = elements[j].getAttribute("prefix");
  +                        String name = elements[j].getAttribute("name");
  +                        String description = null;
  +                        IConfigurationElement[] desc = elements[j].getChildren("description");
  +                        if (desc.length > 0)
  +                            description = desc[0].getValue();
  +                        RepositorySchemeDescriptor rsd =
  +                            new GenericSchemeDescriptor(prefix, name, description);
   
  +                        m_Registry.registerRepositoryAgentFactory(rsd, factory);
  +                    }
  +                }
  +            }
  +        } catch (InvalidSchemeException e)
  +        {
  +            throw new PluginHandlerException(
  +                "Scheme '" + prefix + "' contains invalid characters.",
  +                e);
  +        } catch (CoreException e)
  +        {
  +            throw new PluginHandlerException(
  +                "Unable to instantiate '" + descriptor.getUniqueIdentifier() + "'",
  +                e);
  +        }
       }
   
   }
  
  
  
  1.2       +30 -7     avalon-sandbox/ide/org.apache.avalon.ide.eclipse.repository/schema/agent.exsd
  
  Index: agent.exsd
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/ide/org.apache.avalon.ide.eclipse.repository/schema/agent.exsd,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- agent.exsd	1 Dec 2003 21:14:38 -0000	1.1
  +++ agent.exsd	2 Dec 2003 10:15:17 -0000	1.2
  @@ -19,6 +19,7 @@
         <complexType>
            <sequence>
               <element ref="description"/>
  +            <element ref="scheme"/>
            </sequence>
            <attribute name="name" type="string" use="default" value="Sample Repository Agent">
               <annotation>
  @@ -41,13 +42,6 @@
                  </documentation>
               </annotation>
            </attribute>
  -         <attribute name="class" type="string" use="required">
  -            <annotation>
  -               <documentation>
  -                  The classname of the RepositoryAgentFactory interface, of course inclusive of the package name.
  -               </documentation>
  -            </annotation>
  -         </attribute>
         </complexType>
      </element>
   
  @@ -57,6 +51,35 @@
               A longer description of the capabilities of the RepositoryAgent and its factory.
            </documentation>
         </annotation>
  +   </element>
  +
  +   <element name="scheme">
  +      <complexType>
  +         <sequence>
  +            <element ref="description"/>
  +         </sequence>
  +         <attribute name="class" type="string" use="required">
  +            <annotation>
  +               <documentation>
  +                  The classname of the RepositoryAgentFactory interface, of course inclusive of the package name.
  +               </documentation>
  +            </annotation>
  +         </attribute>
  +         <attribute name="name" type="string" use="default" value="Sample Repository Agent">
  +            <annotation>
  +               <documentation>
  +                  The official name of the scheme. Example; &quot;Maven Repository&quot;
  +               </documentation>
  +            </annotation>
  +         </attribute>
  +         <attribute name="prefix" type="string">
  +            <annotation>
  +               <documentation>
  +                  The registered (at Avalon) unique prefix for the Scheme.
  +               </documentation>
  +            </annotation>
  +         </attribute>
  +      </complexType>
      </element>
   
      <annotation>
  
  
  
  1.2       +5 -5      avalon-sandbox/ide/org.apache.avalon.ide.eclipse.repository/src/java/org/apache/avalon/ide/eclipse/repository/views/ViewContentProvider.java
  
  Index: ViewContentProvider.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/ide/org.apache.avalon.ide.eclipse.repository/src/java/org/apache/avalon/ide/eclipse/repository/views/ViewContentProvider.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ViewContentProvider.java	1 Dec 2003 14:16:19 -0000	1.1
  +++ ViewContentProvider.java	2 Dec 2003 10:15:17 -0000	1.2
  @@ -60,7 +60,7 @@
   import org.apache.avalon.ide.repository.RepositoryAgentListener;
   import org.apache.avalon.ide.repository.RepositoryTypeRegistry;
   import org.apache.avalon.ide.repository.ResourceInfo;
  -import org.apache.avalon.ide.repository.URNDescriptor;
  +import org.apache.avalon.ide.repository.RepositorySchemeDescriptor;
   import org.apache.avalon.ide.repository.Version;
   import org.apache.avalon.ide.repository.tools.common.NonVersion;
   import org.apache.avalon.ide.repository.tools.common.ResourceInfoImpl;
  @@ -103,7 +103,7 @@
           m_View = pView;
           RepositoryPlugin plugin = RepositoryPlugin.getDefault();
           RepositoryTypeRegistry reg = plugin.getRepositoryTypeRegistry();
  -        URNDescriptor[] urns = reg.getRegisteredURNs();
  +        RepositorySchemeDescriptor[] urns = reg.getRegisteredURNs();
           for( int i=0 ; i < urns.length ; i++ )
           {
               RepositoryAgentFactory factory = reg.getRepositoryAgentFactory( urns[i] );
  @@ -121,7 +121,7 @@
           
           RepositoryPlugin plugin = RepositoryPlugin.getDefault();
           RepositoryTypeRegistry reg = plugin.getRepositoryTypeRegistry();
  -        URNDescriptor[] urns = reg.getRegisteredURNs();
  +        RepositorySchemeDescriptor[] urns = reg.getRegisteredURNs();
           for( int i=0 ; i < urns.length ; i++ )
           {
               RepositoryAgentFactory factory = reg.getRepositoryAgentFactory( urns[i] );
  @@ -227,7 +227,7 @@
               while (removeList.hasNext())
               {
                   String s = (String) removeList.next();
  -                URNDescriptor urn = reg.findByType(s);
  +                RepositorySchemeDescriptor urn = reg.findByType(s);
                   RepositoryAgentFactory factory = reg.getRepositoryAgentFactory(urn);
                   RepositoryAgent agent = factory.findRepositoryAgentByLocation(s);
                   factory.dispose(agent);
  @@ -239,7 +239,7 @@
                   String s = (String) addList.next();
                   try
                   {
  -                    URNDescriptor urn = reg.findByType(s);
  +                    RepositorySchemeDescriptor urn = reg.findByType(s);
                       RepositoryAgentFactory factory = reg.getRepositoryAgentFactory(urn);
                       factory.create(s, null);
                   } catch (RepositoryAgentCreationException e)
  
  
  
  1.3       +8 -8      avalon-sandbox/ide/org.apache.avalon.ide.eclipse.repository/src/java/org/apache/avalon/ide/eclipse/repository/RepositoryPlugin.java
  
  Index: RepositoryPlugin.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/ide/org.apache.avalon.ide.eclipse.repository/src/java/org/apache/avalon/ide/eclipse/repository/RepositoryPlugin.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- RepositoryPlugin.java	1 Dec 2003 21:14:38 -0000	1.2
  +++ RepositoryPlugin.java	2 Dec 2003 10:15:17 -0000	1.3
  @@ -123,7 +123,7 @@
           throws CoreException
       {
           IPluginRegistry registry = Platform.getPluginRegistry();
  -        IExtensionPoint point = registry.getExtensionPoint("org.eclipse.sample.sampleExtensionPoint");
  +        IExtensionPoint point = registry.getExtensionPoint("org.apache.avalon.ide.eclipse.repository.agent");
           IExtension[] extensions = point.getExtensions();
           for (int i = 0; i < extensions.length; i++) 
           {
  @@ -158,13 +158,13 @@
       private void createHandlers()
       {
           m_PluginHandlers = new HashMap();
  -        createHandler(IPluginEvent.INSTALLED, new PluginHandlerInstalled() );
  -        createHandler(IPluginEvent.RESOLVED, new PluginHandlerResolved() );
  -        createHandler(IPluginEvent.STARTED, new PluginHandlerStarted() );
  -        createHandler(IPluginEvent.STOPPED, new PluginHandlerStopped() );
  -        createHandler(IPluginEvent.UNINSTALLED, new PluginHandlerUninstalled() );
  -        createHandler(IPluginEvent.UNRESOLVED, new PluginHandlerUnresolved() );
  -        createHandler(IPluginEvent.UPDATED, new PluginHandlerUpdated() );
  +        createHandler(IPluginEvent.INSTALLED, new PluginHandlerInstalled(m_RepositoryTypeRegistry) );
  +        createHandler(IPluginEvent.RESOLVED, new PluginHandlerResolved(m_RepositoryTypeRegistry) );
  +        createHandler(IPluginEvent.STARTED, new PluginHandlerStarted(m_RepositoryTypeRegistry) );
  +        createHandler(IPluginEvent.STOPPED, new PluginHandlerStopped(m_RepositoryTypeRegistry) );
  +        createHandler(IPluginEvent.UNINSTALLED, new PluginHandlerUninstalled(m_RepositoryTypeRegistry) );
  +        createHandler(IPluginEvent.UNRESOLVED, new PluginHandlerUnresolved(m_RepositoryTypeRegistry) );
  +        createHandler(IPluginEvent.UPDATED, new PluginHandlerUpdated(m_RepositoryTypeRegistry) );
       }
       
       private void createHandler( int type, PluginHandler handler )
  
  
  
  1.2       +5 -5      avalon-sandbox/ide/org.apache.avalon.ide.eclipse.repository/src/java/org/apache/avalon/ide/eclipse/repository/preferences/AddRepositoryDialog.java
  
  Index: AddRepositoryDialog.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/ide/org.apache.avalon.ide.eclipse.repository/src/java/org/apache/avalon/ide/eclipse/repository/preferences/AddRepositoryDialog.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AddRepositoryDialog.java	1 Dec 2003 14:16:19 -0000	1.1
  +++ AddRepositoryDialog.java	2 Dec 2003 10:15:17 -0000	1.2
  @@ -45,7 +45,7 @@
   
   import org.apache.avalon.ide.eclipse.repository.RepositoryPlugin;
   import org.apache.avalon.ide.repository.RepositoryTypeRegistry;
  -import org.apache.avalon.ide.repository.URNDescriptor;
  +import org.apache.avalon.ide.repository.RepositorySchemeDescriptor;
   import org.eclipse.jface.dialogs.Dialog;
   import org.eclipse.jface.dialogs.IDialogConstants;
   import org.eclipse.jface.dialogs.IInputValidator;
  @@ -71,7 +71,7 @@
       implements SelectionListener
   {
       private String m_TextValue;
  -    private URNDescriptor m_Selected;
  +    private RepositorySchemeDescriptor m_Selected;
   
       private IInputValidator m_Validator;
   
  @@ -122,7 +122,7 @@
           group.setLayoutData(data);
   
           RepositoryTypeRegistry reg = RepositoryPlugin.getDefault().getRepositoryTypeRegistry();
  -        URNDescriptor[] urns = reg.getRegisteredURNs();
  +        RepositorySchemeDescriptor[] urns = reg.getRegisteredURNs();
           m_Selected = urns[0];
           for (int i = 0; i < urns.length; i++)
           {
  @@ -148,11 +148,11 @@
   
       public void widgetSelected( SelectionEvent event )
       {
  -        m_Selected = (URNDescriptor) ((Button) event.getSource()).getData();
  +        m_Selected = (RepositorySchemeDescriptor) ((Button) event.getSource()).getData();
       }
   
       public String getValue()
       {
  -        return "urn:" + m_Selected.getURN() + ":" + m_TextValue;
  +        return "urn:" + m_Selected.getScheme() + ":" + m_TextValue;
       }
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org