directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r651546 - in /directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations: ./ resources/icons/ src/main/java/org/apache/directory/studio/apacheds/experimentations/
Date Fri, 25 Apr 2008 09:10:25 GMT
Author: pamarcelot
Date: Fri Apr 25 02:10:24 2008
New Revision: 651546

URL: http://svn.apache.org/viewvc?rev=651546&view=rev
Log:
Added a simple Servers View.

Added:
    directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/resources/icons/
    directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/resources/icons/serverView.png
  (with props)
    directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/src/main/java/org/apache/directory/studio/apacheds/experimentations/ServersView.java
Modified:
    directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/plugin.xml
    directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/src/main/java/org/apache/directory/studio/apacheds/experimentations/Perspective.java

Modified: directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/plugin.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/plugin.xml?rev=651546&r1=651545&r2=651546&view=diff
==============================================================================
--- directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/plugin.xml
(original)
+++ directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/plugin.xml
Fri Apr 25 02:10:24 2008
@@ -29,5 +29,19 @@
             class="org.apache.directory.studio.apacheds.experimentations.PreferenceInitializer">
       </initializer>
    </extension>
+   <extension
+         point="org.eclipse.ui.views">
+      <category
+            id="org.apache.directory.studio.apacheds.experimentations.category"
+            name="Apache Directory Server">
+      </category>
+      <view
+            category="org.apache.directory.studio.apacheds.experimentations.category"
+            class="org.apache.directory.studio.apacheds.experimentations.ServersView"
+            icon="resources/icons/serverView.png"
+            id="org.apache.directory.studio.apacheds.experimentations.serversView"
+            name="Servers">
+      </view>
+   </extension>
 
 </plugin>

Added: directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/resources/icons/serverView.png
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/resources/icons/serverView.png?rev=651546&view=auto
==============================================================================
Binary file - no diff available.

Propchange: directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/resources/icons/serverView.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/src/main/java/org/apache/directory/studio/apacheds/experimentations/Perspective.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/src/main/java/org/apache/directory/studio/apacheds/experimentations/Perspective.java?rev=651546&r1=651545&r2=651546&view=diff
==============================================================================
--- directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/src/main/java/org/apache/directory/studio/apacheds/experimentations/Perspective.java
(original)
+++ directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/src/main/java/org/apache/directory/studio/apacheds/experimentations/Perspective.java
Fri Apr 25 02:10:24 2008
@@ -20,6 +20,7 @@
 package org.apache.directory.studio.apacheds.experimentations;
 
 
+import org.eclipse.ui.IFolderLayout;
 import org.eclipse.ui.IPageLayout;
 import org.eclipse.ui.IPerspectiveFactory;
 import org.eclipse.ui.console.IConsoleConstants;
@@ -41,7 +42,16 @@
         // Getting the editors area
         String editorArea = layout.getEditorArea();
 
+        // Adding a Servers folder
+        IFolderLayout serversFolder = layout.createFolder( "serversFolder", IPageLayout.LEFT,
( float ) 0.25,
+            editorArea );
+        // Adding the Servers view
+        serversFolder.addView( ServersView.ID );
+
+        // Adding a Console folder
+        IFolderLayout conFolderLayoutFolder = layout.createFolder( "consoleFolder", IPageLayout.BOTTOM,
0.5f,
+            editorArea );
         // Adding the Console view
-        layout.addView( IConsoleConstants.ID_CONSOLE_VIEW, IPageLayout.BOTTOM, 0.66f, editorArea
);
+        conFolderLayoutFolder.addView( IConsoleConstants.ID_CONSOLE_VIEW );
     }
 }

Added: directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/src/main/java/org/apache/directory/studio/apacheds/experimentations/ServersView.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/src/main/java/org/apache/directory/studio/apacheds/experimentations/ServersView.java?rev=651546&view=auto
==============================================================================
--- directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/src/main/java/org/apache/directory/studio/apacheds/experimentations/ServersView.java
(added)
+++ directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/src/main/java/org/apache/directory/studio/apacheds/experimentations/ServersView.java
Fri Apr 25 02:10:24 2008
@@ -0,0 +1,77 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.studio.apacheds.experimentations;
+
+
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.ui.part.ViewPart;
+
+
+/**
+ * This class implements the Servers view.
+ * <p>
+ * It displays the list of Apache Directory Servers.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ServersView extends ViewPart
+{
+    /** The ID of the view */
+    public static final String ID = "org.apache.directory.studio.apacheds.experimentations.serversView";
+
+    /** The table viewer */
+    private TableViewer tableViewer;
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
+     */
+    public void createPartControl( Composite parent )
+    {
+        tableViewer = new TableViewer( parent );
+        tableViewer.getTable().setLayoutData( new GridData( SWT.FILL, SWT.FILL, true, true
) );
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
+     */
+    public void setFocus()
+    {
+        tableViewer.getTable().setFocus();
+    }
+
+
+    /**
+     * Gets the table viewer.
+     *
+     * @return
+     *      the table viewer
+     */
+    public TableViewer getViewer()
+    {
+        return tableViewer;
+    }
+}



Mime
View raw message