directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r477255 - in /directory/sandbox/pamarcelot/ldapstudio/ldapstudio-rcp/src/main: java/org/apache/directory/ldapstudio/ java/org/apache/directory/ldapstudio/view/ resources/org/apache/directory/ldapstudio/ resources/org/apache/directory/ldapst...
Date Mon, 20 Nov 2006 17:02:58 GMT
Author: pamarcelot
Date: Mon Nov 20 09:02:57 2006
New Revision: 477255

URL: http://svn.apache.org/viewvc?view=rev&rev=477255
Log:
Updating the LDAP Studio RCP Application to display a Welcome Perspective.
This perspective offers the choice to launch the LDAP Browser Perspective or the Schemas Editor
Perspective.
A link has also been added to the ASF logo at the bottom of the view. 

Added:
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-rcp/src/main/resources/org/apache/directory/ldapstudio/view/
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-rcp/src/main/resources/org/apache/directory/ldapstudio/view/asf-logo.gif
  (with props)
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-rcp/src/main/resources/org/apache/directory/ldapstudio/view/ldapstudio_ldap-browser-plugin.png
  (with props)
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-rcp/src/main/resources/org/apache/directory/ldapstudio/view/ldapstudio_schemas-editor-plugin.png
  (with props)
Removed:
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-rcp/src/main/resources/org/safehaus/
Modified:
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-rcp/src/main/java/org/apache/directory/ldapstudio/ApplicationWorkbenchAdvisor.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-rcp/src/main/java/org/apache/directory/ldapstudio/view/WelcomeView.java
    directory/sandbox/pamarcelot/ldapstudio/ldapstudio-rcp/src/main/resources/org/apache/directory/ldapstudio/messages.properties

Modified: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-rcp/src/main/java/org/apache/directory/ldapstudio/ApplicationWorkbenchAdvisor.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-rcp/src/main/java/org/apache/directory/ldapstudio/ApplicationWorkbenchAdvisor.java?view=diff&rev=477255&r1=477254&r2=477255
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-rcp/src/main/java/org/apache/directory/ldapstudio/ApplicationWorkbenchAdvisor.java
(original)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-rcp/src/main/java/org/apache/directory/ldapstudio/ApplicationWorkbenchAdvisor.java
Mon Nov 20 09:02:57 2006
@@ -90,7 +90,7 @@
      */
     public String getInitialWindowPerspectiveId()
     {
-        return "org.apache.directory.ldapstudio.schemas.perspective"; // We open the Schema
Perspective by Default
+        return PERSPECTIVE_ID;
     }
 
 

Modified: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-rcp/src/main/java/org/apache/directory/ldapstudio/view/WelcomeView.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-rcp/src/main/java/org/apache/directory/ldapstudio/view/WelcomeView.java?view=diff&rev=477255&r1=477254&r2=477255
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-rcp/src/main/java/org/apache/directory/ldapstudio/view/WelcomeView.java
(original)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-rcp/src/main/java/org/apache/directory/ldapstudio/view/WelcomeView.java
Mon Nov 20 09:02:57 2006
@@ -21,13 +21,22 @@
 package org.apache.directory.ldapstudio.view;
 
 
+import java.net.MalformedURLException;
+import java.net.URL;
+
 import org.apache.directory.ldapstudio.Messages;
 import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Label;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.part.ViewPart;
 
 
@@ -38,8 +47,6 @@
 public class WelcomeView extends ViewPart
 {
     public static final String ID = "org.apache.directory.ldapstudio.view.WelcomeView"; //$NON-NLS-1$
-    private Label filler;
-    private Label label;
 
 
     /**
@@ -57,15 +64,92 @@
      */
     public void createPartControl( Composite parent )
     {
-        GridLayout layout = new GridLayout( 1, true );
-        parent.setLayout( layout );
-        filler = new Label( parent, SWT.CENTER );
-        filler.setText( "" ); //$NON-NLS-1$
-        filler.setLayoutData( new GridData( GridData.FILL, GridData.FILL, true, true ) );
-        label = new Label( parent, SWT.CENTER );
-        label.setFont( new Font( null, "Georgia", 13, SWT.BOLD ) ); //$NON-NLS-1$
-        label.setText( Messages.getString( "WelcomeView.Welcome_message" ) ); //$NON-NLS-1$
-        label.setLayoutData( new GridData( GridData.FILL, GridData.FILL, true, true ) );
+        Composite container = new Composite( parent, SWT.NULL );
+        GridLayout layout = new GridLayout( 2, true );
+        container.setLayout( layout );
+
+        // Welcome Label
+        Label welcomeLabel = new Label( container, SWT.CENTER );
+        welcomeLabel.setFont( new Font( null, "Georgia", 13, SWT.BOLD ) ); //$NON-NLS-1$
+        welcomeLabel.setText( Messages.getString( "WelcomeView.Welcome_message" ) ); //$NON-NLS-1$
+        welcomeLabel.setLayoutData( new GridData( GridData.FILL, GridData.FILL, true, true,
2, 1 ) );
+
+        // LDAP Browser Plugin Image & Button
+        Image ldapBrowserImage = new Image( PlatformUI.getWorkbench().getDisplay(), getClass().getResourceAsStream(
+            "ldapstudio_ldap-browser-plugin.png" ) );
+        Button ldapBrowserButton = new Button( container, SWT.PUSH );
+        ldapBrowserButton.setImage( ldapBrowserImage );
+        ldapBrowserButton.setLayoutData( new GridData( SWT.CENTER, SWT.NONE, false, false
) );
+        ldapBrowserButton.addSelectionListener( new SelectionAdapter()
+        {
+            public void widgetSelected( SelectionEvent e )
+            {
+                PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().setPerspective(
+                    PlatformUI.getWorkbench().getPerspectiveRegistry().findPerspectiveWithId(
+                        "org.apache.directory.ldapstudio.browser.perspective" ) );
+            }
+        } );
+
+        // Schemas Editor Plugin Image & Button
+        Image schemasEditorImage = new Image( PlatformUI.getWorkbench().getDisplay(), getClass().getResourceAsStream(
+            "ldapstudio_schemas-editor-plugin.png" ) );
+        Button schemasEditorButton = new Button( container, SWT.PUSH );
+        schemasEditorButton.setImage( schemasEditorImage );
+        schemasEditorButton.setLayoutData( new GridData( SWT.CENTER, SWT.NONE, false, false
) );
+        schemasEditorButton.addSelectionListener( new SelectionAdapter()
+        {
+            public void widgetSelected( SelectionEvent e )
+            {
+                PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().setPerspective(
+                    PlatformUI.getWorkbench().getPerspectiveRegistry().findPerspectiveWithId(
+                        "org.apache.directory.ldapstudio.schemas.perspective" ) );
+            }
+        } );
+
+        // LDAP Browser Plugin Label
+        Label ldapBrowserLabel = new Label( container, SWT.NONE );
+        ldapBrowserLabel.setFont( new Font( null, "Georgia", 13, SWT.BOLD ) );
+        ldapBrowserLabel.setText( "LDAP Browser Plugin" );
+        ldapBrowserLabel.setLayoutData( new GridData( SWT.CENTER, SWT.NONE, true, true )
);
+
+        // Schemas Editor Plugin Label
+        Label schemasEditorLabel = new Label( container, SWT.NONE );
+        schemasEditorLabel.setFont( new Font( null, "Georgia", 13, SWT.BOLD ) );
+        schemasEditorLabel.setText( "Schemas Editor Plugin" );
+        schemasEditorLabel.setLayoutData( new GridData( SWT.CENTER, SWT.NONE, true, true
) );
+
+        // Apache Software Foundation Image
+        Image asfLogoImange = new Image( PlatformUI.getWorkbench().getDisplay(), getClass().getResourceAsStream(
+            "asf-logo.gif" ) );
+        Button asfLogoButton = new Button( container, SWT.PUSH );
+        asfLogoButton.setImage( asfLogoImange );
+        asfLogoButton.setLayoutData( new GridData( SWT.CENTER, SWT.NONE, false, false, 2,
1 ) );
+        asfLogoButton.addSelectionListener( new SelectionAdapter()
+        {
+            public void widgetSelected( SelectionEvent e )
+            {
+                try
+                {
+                    PlatformUI.getWorkbench().getBrowserSupport().getExternalBrowser().openURL(
+                        new URL( "http://www.apache.org/" ) );
+                }
+                catch ( PartInitException e1 )
+                {
+                    // TODO Auto-generated catch block
+                    e1.printStackTrace();
+                }
+                catch ( MalformedURLException e1 )
+                {
+                    // TODO Auto-generated catch block
+                    e1.printStackTrace();
+                }
+            }
+        } );
+
+        // Copyright Label
+        Label copyrightLabel = new Label( container, SWT.NONE );
+        copyrightLabel.setText( "© Copyright 2006 - Apache Software Foundation" );
+        copyrightLabel.setLayoutData( new GridData( SWT.CENTER, SWT.NONE, false, false, 2,
1 ) );
     }
 
 

Modified: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-rcp/src/main/resources/org/apache/directory/ldapstudio/messages.properties
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-rcp/src/main/resources/org/apache/directory/ldapstudio/messages.properties?view=diff&rev=477255&r1=477254&r2=477255
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-rcp/src/main/resources/org/apache/directory/ldapstudio/messages.properties
(original)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-rcp/src/main/resources/org/apache/directory/ldapstudio/messages.properties
Mon Nov 20 09:02:57 2006
@@ -43,4 +43,4 @@
 UpdateAction.Searching_for_updates=Searching for updates
 
 # Strings used by WelcomeView Class
-WelcomeView.Welcome_message=Welcome to LDAP Studio.\n\nPlease select a perspective on the
right to start working...
+WelcomeView.Welcome_message=Welcome to LDAP Studio.\n\nPlease select a perspective above...

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-rcp/src/main/resources/org/apache/directory/ldapstudio/view/asf-logo.gif
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-rcp/src/main/resources/org/apache/directory/ldapstudio/view/asf-logo.gif?view=auto&rev=477255
==============================================================================
Binary file - no diff available.

Propchange: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-rcp/src/main/resources/org/apache/directory/ldapstudio/view/asf-logo.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-rcp/src/main/resources/org/apache/directory/ldapstudio/view/ldapstudio_ldap-browser-plugin.png
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-rcp/src/main/resources/org/apache/directory/ldapstudio/view/ldapstudio_ldap-browser-plugin.png?view=auto&rev=477255
==============================================================================
Binary file - no diff available.

Propchange: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-rcp/src/main/resources/org/apache/directory/ldapstudio/view/ldapstudio_ldap-browser-plugin.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-rcp/src/main/resources/org/apache/directory/ldapstudio/view/ldapstudio_schemas-editor-plugin.png
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-rcp/src/main/resources/org/apache/directory/ldapstudio/view/ldapstudio_schemas-editor-plugin.png?view=auto&rev=477255
==============================================================================
Binary file - no diff available.

Propchange: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-rcp/src/main/resources/org/apache/directory/ldapstudio/view/ldapstudio_schemas-editor-plugin.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream



Mime
View raw message