directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r688716 - /directory/studio/trunk/test-integration-ui/src/main/java/org/apache/directory/studio/test/integration/ui/SWTBotUtils.java
Date Mon, 25 Aug 2008 13:13:39 GMT
Author: seelmann
Date: Mon Aug 25 06:13:38 2008
New Revision: 688716

URL: http://svn.apache.org/viewvc?rev=688716&view=rev
Log:
Some optimization when opening the LDAP perspective

Modified:
    directory/studio/trunk/test-integration-ui/src/main/java/org/apache/directory/studio/test/integration/ui/SWTBotUtils.java

Modified: directory/studio/trunk/test-integration-ui/src/main/java/org/apache/directory/studio/test/integration/ui/SWTBotUtils.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/test-integration-ui/src/main/java/org/apache/directory/studio/test/integration/ui/SWTBotUtils.java?rev=688716&r1=688715&r2=688716&view=diff
==============================================================================
--- directory/studio/trunk/test-integration-ui/src/main/java/org/apache/directory/studio/test/integration/ui/SWTBotUtils.java
(original)
+++ directory/studio/trunk/test-integration-ui/src/main/java/org/apache/directory/studio/test/integration/ui/SWTBotUtils.java
Mon Aug 25 06:13:38 2008
@@ -72,6 +72,20 @@
      */
     public static void openLdapPerspective( final SWTEclipseBot eBot ) throws Exception
     {
+        // optimization: only open LDAP perspective if not yet opened
+        try
+        {
+            if ( eBot.view( "Connections" ) != null )
+            {
+                // LDAP perspective already opened
+                return;
+            }
+        }
+        catch ( Exception e )
+        {
+            // no 'Connections' view, continue to open the LDAP perspective
+        }
+        
         // open "Open Perspective" dialog
         SWTBotMenu windowMenu = eBot.menu( "Window" );
         windowMenu.click();
@@ -102,6 +116,15 @@
                 return "Could not find widget";
             }
         } );
+        
+        // close welcome view, if it is there
+        try
+        {
+            eBot.view( "Welcome" ).close();
+        }
+        catch ( Exception e )
+        {
+        }
     }
 
 



Mime
View raw message