directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r518716 - in /directory/ldapstudio/trunk/ldapstudio-schemas-plugin: ./ src/main/java/org/apache/directory/ldapstudio/schemas/view/perspectives/ src/main/java/org/apache/directory/ldapstudio/schemas/view/viewers/
Date Thu, 15 Mar 2007 18:13:52 GMT
Author: pamarcelot
Date: Thu Mar 15 11:13:51 2007
New Revision: 518716

URL: http://svn.apache.org/viewvc?view=rev&rev=518716
Log:
Added the Hierarchy View.
Updated Perspective to add the new Hierarchy View.

Added:
    directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/viewers/HierarchyView.java
Modified:
    directory/ldapstudio/trunk/ldapstudio-schemas-plugin/plugin.xml
    directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/perspectives/Perspective.java

Modified: directory/ldapstudio/trunk/ldapstudio-schemas-plugin/plugin.xml
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-schemas-plugin/plugin.xml?view=diff&rev=518716&r1=518715&r2=518716
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-schemas-plugin/plugin.xml (original)
+++ directory/ldapstudio/trunk/ldapstudio-schemas-plugin/plugin.xml Thu Mar 15 11:13:51 2007
@@ -40,17 +40,26 @@
             id="org.apache.directory.ldapstudio.schemas.view.SchemaElementsView"
             name="%ldapstudio-schemas-plugin.views.schemaElements.name"/>
       <view
+            allowMultiple="false"
             category="org.apache.directory.ldapstudio.schemas.view.category"
             class="org.apache.directory.ldapstudio.schemas.view.viewers.SchemasView"
             icon="ressources/icons/schemas_view.png"
             id="org.apache.directory.ldapstudio.schemas.view.SchemasView"
             name="%ldapstudio-schemas-plugin.views.schemas.name"/>
       <view
+            allowMultiple="false"
             category="org.apache.directory.ldapstudio.schemas.view.category"
             class="org.apache.directory.ldapstudio.schemas.view.viewers.SearchView"
             icon="ressources/icons/search.gif"
             id="org.apache.directory.ldapstudio.schemas.view.SearchView"
             name="%ldapstudio-schemas-plugin.views.search.name"/>
+      <view
+            allowMultiple="false"
+            category="org.apache.directory.ldapstudio.schemas.view.category"
+            class="org.apache.directory.ldapstudio.schemas.view.viewers.HierarchyView"
+            icon="ressources/icons/hierarchy_view.png"
+            id="org.apache.directory.ldapstudio.schemas.view.HierarchyView"
+            name="Hierarchy"/>
    </extension>
    <extension
          point="org.eclipse.ui.commands">

Modified: directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/perspectives/Perspective.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/perspectives/Perspective.java?view=diff&rev=518716&r1=518715&r2=518716
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/perspectives/Perspective.java
(original)
+++ directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/perspectives/Perspective.java
Thu Mar 15 11:13:51 2007
@@ -22,9 +22,11 @@
 
 
 import org.apache.directory.ldapstudio.schemas.Activator;
+import org.apache.directory.ldapstudio.schemas.view.viewers.HierarchyView;
 import org.apache.directory.ldapstudio.schemas.view.viewers.SchemaElementsView;
 import org.apache.directory.ldapstudio.schemas.view.viewers.SchemasView;
 import org.apache.directory.ldapstudio.schemas.view.viewers.SearchView;
+import org.eclipse.ui.IFolderLayout;
 import org.eclipse.ui.IPageLayout;
 import org.eclipse.ui.IPerspectiveFactory;
 
@@ -32,31 +34,42 @@
 /**
  * This is the standard perspective with Schema Elements View on the top left, Schemas View
on bottom left,
  * editor in top right, Search View on bottom right.
- *
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
  */
 public class Perspective implements IPerspectiveFactory
 {
+    /** The ID of the view */
     public static final String ID = Activator.PLUGIN_ID + ".perspective"; //$NON-NLS-1$
 
 
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui.IPageLayout)
+     */
     public void createInitialLayout( IPageLayout layout )
     {
         String editorArea = layout.getEditorArea();
         layout.setEditorAreaVisible( true );
 
-        layout.addStandaloneView( SchemaElementsView.ID, true, IPageLayout.LEFT, 0.3f, editorArea
);
-        layout.getViewLayout( SchemaElementsView.ID ).setCloseable( false );
+        IFolderLayout topLeftFolder = layout.createFolder( "placeholder", IPageLayout.LEFT,
0.3f, editorArea );
 
-        layout.addStandaloneView( SchemasView.ID, true, IPageLayout.BOTTOM, 0.5f, SchemaElementsView.ID
);
-        layout.getViewLayout( SchemasView.ID ).setCloseable( false );
+        layout.addPlaceholder( "placeholder", IPageLayout.LEFT, 0.3f, editorArea );
+        topLeftFolder.addView( SchemaElementsView.ID );
+        topLeftFolder.addView( HierarchyView.ID );
 
+        layout.addStandaloneView( SchemasView.ID, true, IPageLayout.BOTTOM, 0.5f, "placeholder"
);
         layout.addStandaloneView( SearchView.ID, true, IPageLayout.BOTTOM, 0.7f, editorArea
);
+
+        layout.getViewLayout( SchemaElementsView.ID ).setCloseable( false );
+        layout.getViewLayout( SchemasView.ID ).setCloseable( false );
         layout.getViewLayout( SearchView.ID ).setCloseable( false );
 
         layout.addPerspectiveShortcut( "org.apache.directory.ldapstudio.browser.ui.perspective.BrowserPerspective"
); //$NON-NLS-1$
         layout.addPerspectiveShortcut( Perspective.ID );
 
         // Adding View shortcuts
+        layout.addShowViewShortcut( HierarchyView.ID );
         layout.addShowViewShortcut( SchemaElementsView.ID );
         layout.addShowViewShortcut( SchemasView.ID );
         layout.addShowViewShortcut( SearchView.ID );

Added: directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/viewers/HierarchyView.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/viewers/HierarchyView.java?view=auto&rev=518716
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/viewers/HierarchyView.java
(added)
+++ directory/ldapstudio/trunk/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/viewers/HierarchyView.java
Thu Mar 15 11:13:51 2007
@@ -0,0 +1,58 @@
+/*
+ *  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.ldapstudio.schemas.view.viewers;
+
+
+import org.apache.directory.ldapstudio.schemas.Activator;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.part.ViewPart;
+
+
+/**
+ * This class implements the Hierarchy View.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class HierarchyView extends ViewPart
+{
+    /** The view's ID */
+    public static final String ID = Activator.PLUGIN_ID + ".view.HierarchyView"; //$NON-NLS-1$
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
+     */
+    public void createPartControl( Composite parent )
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
+     */
+    public void setFocus()
+    {
+        // TODO Auto-generated method stub
+
+    }
+}



Mime
View raw message