directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r572124 - in /directory/studio/tags/1.0.0: studio-connection-ui/ studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/ studio-connection-ui/src/main/resources/ studio-ldapbrowser-common/
Date Sun, 02 Sep 2007 19:35:13 GMT
Author: seelmann
Date: Sun Sep  2 12:35:12 2007
New Revision: 572124

URL: http://svn.apache.org/viewvc?rev=572124&view=rev
Log:
Rollback of change 571963

Modified:
    directory/studio/tags/1.0.0/studio-connection-ui/plugin.xml
    directory/studio/tags/1.0.0/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/AbstractConnectionParameterPage.java
    directory/studio/tags/1.0.0/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/ConnectionParameterPage.java
    directory/studio/tags/1.0.0/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/ConnectionParameterPageManager.java
    directory/studio/tags/1.0.0/studio-connection-ui/src/main/resources/connectionParameterPages.exsd
    directory/studio/tags/1.0.0/studio-ldapbrowser-common/plugin.xml

Modified: directory/studio/tags/1.0.0/studio-connection-ui/plugin.xml
URL: http://svn.apache.org/viewvc/directory/studio/tags/1.0.0/studio-connection-ui/plugin.xml?rev=572124&r1=572123&r2=572124&view=diff
==============================================================================
--- directory/studio/tags/1.0.0/studio-connection-ui/plugin.xml (original)
+++ directory/studio/tags/1.0.0/studio-connection-ui/plugin.xml Sun Sep  2 12:35:12 2007
@@ -28,15 +28,11 @@
          point="org.apache.directory.studio.connectionparameterpages">
       <connectionParameterPage
             class="org.apache.directory.studio.connection.ui.widgets.NetworkParameterPage"
-            dependsOnId="org.apache.directory.studio.connection.ui.widgets.NetworkParameterPage"
             description="Please enter connection name and network parameters."
-            id="org.apache.directory.studio.connection.ui.widgets.NetworkParameterPage"
             name="Network Parameter"/>
       <connectionParameterPage
             class="org.apache.directory.studio.connection.ui.widgets.AuthenticationParameterPage"
-            dependsOnId="org.apache.directory.studio.connection.ui.widgets.NetworkParameterPage"
             description="Please select an authentification method and input authentification
data."
-            id="org.apache.directory.studio.connection.ui.widgets.AuthenticationParameterPage"
             name="Authentication"/>
    </extension>  
 </plugin>

Modified: directory/studio/tags/1.0.0/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/AbstractConnectionParameterPage.java
URL: http://svn.apache.org/viewvc/directory/studio/tags/1.0.0/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/AbstractConnectionParameterPage.java?rev=572124&r1=572123&r2=572124&view=diff
==============================================================================
--- directory/studio/tags/1.0.0/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/AbstractConnectionParameterPage.java
(original)
+++ directory/studio/tags/1.0.0/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/AbstractConnectionParameterPage.java
Sun Sep  2 12:35:12 2007
@@ -33,18 +33,12 @@
 public abstract class AbstractConnectionParameterPage implements ConnectionParameterPage
 {
 
-    /** The page id. */
-    protected String pageId;
-
     /** The page name. */
     protected String pageName;
-    
+
     /** The page description. */
     protected String pageDescription;
 
-    /** The page id this page depends on. */
-    protected String pageDependsOnId;
-    
     /** The runnable context. */
     protected IRunnableContext runnableContext;
 
@@ -100,24 +94,6 @@
 
 
     /**
-     * @see org.apache.directory.studio.connection.ui.ConnectionParameterPage#getPageId()
-     */
-    public String getPageId()
-    {
-        return pageId;
-    }
-
-
-    /**
-     * @see org.apache.directory.studio.connection.ui.ConnectionParameterPage#setPageId(java.lang.String)
-     */
-    public void setPageId( String pageId )
-    {
-        this.pageId = pageId;
-    }
-
-
-    /**
      * @see org.apache.directory.studio.connection.ui.ConnectionParameterPage#getPageName()
      */
     public String getPageName()
@@ -150,24 +126,6 @@
     public void setPageDescription( String pageDescription )
     {
         this.pageDescription = pageDescription;
-    }
-
-
-    /**
-     * @see org.apache.directory.studio.connection.ui.ConnectionParameterPage#getPageDependsOnId()
-     */
-    public String getPageDependsOnId()
-    {
-        return pageDependsOnId;
-    }
-
-
-    /**
-     * @see org.apache.directory.studio.connection.ui.ConnectionParameterPage#setPageDependsOnId(java.lang.String)
-     */
-    public void setPageDependsOnId( String pageDependsOnId )
-    {
-        this.pageDependsOnId = pageDependsOnId;
     }
 
 

Modified: directory/studio/tags/1.0.0/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/ConnectionParameterPage.java
URL: http://svn.apache.org/viewvc/directory/studio/tags/1.0.0/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/ConnectionParameterPage.java?rev=572124&r1=572123&r2=572124&view=diff
==============================================================================
--- directory/studio/tags/1.0.0/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/ConnectionParameterPage.java
(original)
+++ directory/studio/tags/1.0.0/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/ConnectionParameterPage.java
Sun Sep  2 12:35:12 2007
@@ -110,29 +110,13 @@
 
 
     /**
-     * Sets the page id.
-     * 
-     * @param pageId the page id
-     */
-    public void setPageId( String pageId );
-
-
-    /**
-     * Gets the page id.
-     * 
-     * @return the page id
-     */
-    public String getPageId();
-    
-    
-    /**
      * Sets the page name.
      * 
      * @param pageName the page name
      */
     public void setPageName( String pageName );
-    
-    
+
+
     /**
      * Gets the page name.
      * 
@@ -157,22 +141,6 @@
     public String getPageDescription();
 
 
-    /**
-     * Sets the page id this page depends on.
-     * 
-     * @param pageDependsOnId the page id this page depends on
-     */
-    public void setPageDependsOnId( String pageDependsOnId );
-
-
-    /**
-     * Gets the page id this page depends on.
-     * 
-     * @return the page id this page depends on
-     */
-    public String getPageDependsOnId();
-    
-    
     /**
      * Sets the focus.
      */

Modified: directory/studio/tags/1.0.0/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/ConnectionParameterPageManager.java
URL: http://svn.apache.org/viewvc/directory/studio/tags/1.0.0/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/ConnectionParameterPageManager.java?rev=572124&r1=572123&r2=572124&view=diff
==============================================================================
--- directory/studio/tags/1.0.0/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/ConnectionParameterPageManager.java
(original)
+++ directory/studio/tags/1.0.0/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/ConnectionParameterPageManager.java
Sun Sep  2 12:35:12 2007
@@ -22,11 +22,7 @@
 
 
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collection;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.Map;
 
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IExtensionPoint;
@@ -57,20 +53,18 @@
         IExtensionPoint extensionPoint = registry
             .getExtensionPoint( "org.apache.directory.studio.connectionparameterpages" );
         IConfigurationElement[] members = extensionPoint.getConfigurationElements();
-        final Map<String, ConnectionParameterPage> pageMap = new HashMap<String,
ConnectionParameterPage>();
+        Collection<ConnectionParameterPage> pageCollection = new ArrayList<ConnectionParameterPage>();
 
-        // For each extension: instantiate the page
+        // For each extension:
         for ( int m = 0; m < members.length; m++ )
         {
             IConfigurationElement member = members[m];
             try
             {
                 ConnectionParameterPage page = ( ConnectionParameterPage ) member.createExecutableExtension(
"class" );
-                page.setPageId( member.getAttribute( "id" ) );
                 page.setPageName( member.getAttribute( "name" ) );
                 page.setPageDescription( member.getAttribute( "description" ) );
-                page.setPageDependsOnId( member.getAttribute( "dependsOnId" ) );
-                pageMap.put( page.getPageId(), page );
+                pageCollection.add( page );
             }
             catch ( Exception e )
             {
@@ -80,82 +74,7 @@
             }
         }
 
-        final ConnectionParameterPage[] pages = pageMap.values().toArray( new ConnectionParameterPage[0]
);
-        Comparator<? super ConnectionParameterPage> pageComparator = new Comparator<ConnectionParameterPage>()
-        {
-            public int compare( ConnectionParameterPage p1, ConnectionParameterPage p2 )
-            {
-                String dependsOnId1 = p1.getPageDependsOnId();
-                String dependsOnId2 = p2.getPageDependsOnId();
-                do
-                {
-                    if(dependsOnId1 == null && dependsOnId2 != null )
-                    {
-                        return -1;
-                    }
-                    else if(dependsOnId2 == null && dependsOnId1 != null )
-                    {
-                        return 1;
-                    }
-                    else if(dependsOnId1 != null && dependsOnId1.equals( p2.getPageId()
))
-                    {
-                        return 1;
-                    }
-                    else if(dependsOnId2 != null && dependsOnId2.equals( p1.getPageId()
))
-                    {
-                        return -1;
-                    }
-                    
-                    ConnectionParameterPage page = pageMap.get( dependsOnId1 );
-                    if(page != null)
-                    {
-                        dependsOnId1 = page.getPageDependsOnId();
-                    }
-                    else
-                    {
-                        dependsOnId1 = null;
-                    }
-                }
-                while(dependsOnId1 != null && !dependsOnId1.equals( p1.getPageId()
));
-                
-                dependsOnId1 = p1.getPageDependsOnId();
-                dependsOnId2 = p2.getPageDependsOnId();
-                do
-                {
-                    if(dependsOnId1 == null && dependsOnId2 != null )
-                    {
-                        return -1;
-                    }
-                    else if(dependsOnId2 == null && dependsOnId1 != null )
-                    {
-                        return 1;
-                    }
-                    else if(dependsOnId1 != null && dependsOnId1.equals( p2.getPageId()
))
-                    {
-                        return 1;
-                    }
-                    else if(dependsOnId2 != null && dependsOnId2.equals( p1.getPageId()
))
-                    {
-                        return -1;
-                    }
-                    
-                    ConnectionParameterPage page = pageMap.get( dependsOnId2 );
-                    if(page != null)
-                    {
-                        dependsOnId2 = page.getPageDependsOnId();
-                    }
-                    else
-                    {
-                        dependsOnId2 = null;
-                    }
-                }
-                while(dependsOnId2 != null && !dependsOnId2.equals( p2.getPageId()
));
-                
-                return 0;
-            }
-        };
-        Arrays.sort( pages, pageComparator );
-        
+        ConnectionParameterPage[] pages = pageCollection.toArray( new ConnectionParameterPage[0]
);
         return pages;
     }
 }

Modified: directory/studio/tags/1.0.0/studio-connection-ui/src/main/resources/connectionParameterPages.exsd
URL: http://svn.apache.org/viewvc/directory/studio/tags/1.0.0/studio-connection-ui/src/main/resources/connectionParameterPages.exsd?rev=572124&r1=572123&r2=572124&view=diff
==============================================================================
--- directory/studio/tags/1.0.0/studio-connection-ui/src/main/resources/connectionParameterPages.exsd
(original)
+++ directory/studio/tags/1.0.0/studio-connection-ui/src/main/resources/connectionParameterPages.exsd
Sun Sep  2 12:35:12 2007
@@ -46,13 +46,6 @@
          </appInfo>
       </annotation>
       <complexType>
-         <attribute name="id" type="string" use="required">
-            <annotation>
-               <documentation>
-                  
-               </documentation>
-            </annotation>
-         </attribute>
          <attribute name="name" type="string" use="required">
             <annotation>
                <documentation>
@@ -81,13 +74,6 @@
                <appInfo>
                   <meta.attribute kind="java" basedOn="org.apache.directory.studio.connection.ui.IConnectionParameterPage"/>
                </appInfo>
-            </annotation>
-         </attribute>
-         <attribute name="dependsOnId" type="string">
-            <annotation>
-               <documentation>
-                  
-               </documentation>
             </annotation>
          </attribute>
       </complexType>

Modified: directory/studio/tags/1.0.0/studio-ldapbrowser-common/plugin.xml
URL: http://svn.apache.org/viewvc/directory/studio/tags/1.0.0/studio-ldapbrowser-common/plugin.xml?rev=572124&r1=572123&r2=572124&view=diff
==============================================================================
--- directory/studio/tags/1.0.0/studio-ldapbrowser-common/plugin.xml (original)
+++ directory/studio/tags/1.0.0/studio-ldapbrowser-common/plugin.xml Sun Sep  2 12:35:12 2007
@@ -281,9 +281,7 @@
        point="org.apache.directory.studio.connectionparameterpages">
     <connectionParameterPage
           class="org.apache.directory.studio.ldapbrowser.common.widgets.connection.BrowserParameterPage"
-          dependsOnId="org.apache.directory.studio.connection.ui.widgets.AuthenticationParameterPage"
           description="You can specify additional connection parameters."
-          id="org.apache.directory.studio.ldapbrowser.common.widgets.connection.BrowserParameterPage"
           name="Browser Options"/>
  </extension>
  



Mime
View raw message