felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dsav...@apache.org
Subject svn commit: r830155 - /felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/views/RepositoryViewPart.java
Date Tue, 27 Oct 2009 12:48:17 GMT
Author: dsavage
Date: Tue Oct 27 12:48:17 2009
New Revision: 830155

URL: http://svn.apache.org/viewvc?rev=830155&view=rev
Log:
add collapse all action to repository view

Modified:
    felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/views/RepositoryViewPart.java

Modified: felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/views/RepositoryViewPart.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/views/RepositoryViewPart.java?rev=830155&r1=830154&r2=830155&view=diff
==============================================================================
--- felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/views/RepositoryViewPart.java
(original)
+++ felix/trunk/sigil/eclipse/ui/src/org/apache/felix/sigil/ui/eclipse/ui/views/RepositoryViewPart.java
Tue Oct 27 12:48:17 2009
@@ -57,6 +57,8 @@
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Tree;
 import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.part.ViewPart;
 
 
@@ -152,6 +154,29 @@
         }
     }
 
+    class CollapseAction extends Action
+    {
+        @Override
+        public void run()
+        {
+            treeViewer.collapseAll();
+        }
+
+
+        @Override
+        public String getText()
+        {
+            return "Collapse All";
+        }
+
+
+        @Override
+        public ImageDescriptor getImageDescriptor()
+        {
+            return PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_ELCL_COLLAPSEALL);
+        }
+    }
+    
     class RefreshAction extends Action
     {
         @Override
@@ -176,6 +201,7 @@
         @Override
         public ImageDescriptor getImageDescriptor()
         {
+            
             return ImageDescriptor.createFromFile( RepositoryViewPart.class, "/icons/bundle-refresh.gif"
);
         }
 
@@ -219,6 +245,7 @@
         IActionBars bars = getViewSite().getActionBars();
         IToolBarManager toolBar = bars.getToolBarManager();
         toolBar.add( new RefreshAction() );
+        toolBar.add( new CollapseAction() );
     }
 
 



Mime
View raw message