[Jarspy-commits] CVS: JarSpy/src/com/ociweb/jarspy/intellij/plugin JarSpyIntelliJPlugin.java,1.5,1.6
Status: Beta
Brought to you by:
brown_j
|
From: Jeff B. <br...@us...> - 2003-01-28 03:07:17
|
Update of /cvsroot/jarspy/JarSpy/src/com/ociweb/jarspy/intellij/plugin
In directory sc8-pr-cvs1:/tmp/cvs-serv30261
Modified Files:
JarSpyIntelliJPlugin.java
Log Message:
added code to collapse and expand tree
Index: JarSpyIntelliJPlugin.java
===================================================================
RCS file: /cvsroot/jarspy/JarSpy/src/com/ociweb/jarspy/intellij/plugin/JarSpyIntelliJPlugin.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** JarSpyIntelliJPlugin.java 25 Jan 2003 23:24:33 -0000 1.5
--- JarSpyIntelliJPlugin.java 28 Jan 2003 03:07:14 -0000 1.6
***************
*** 19,47 ****
package com.ociweb.jarspy.intellij.plugin;
! import com.intellij.openapi.components.ProjectComponent;
! import com.intellij.openapi.project.Project;
! import com.intellij.openapi.diagnostic.Logger;
! import com.intellij.openapi.wm.ToolWindowManager;
! import com.intellij.openapi.wm.ToolWindowAnchor;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.DefaultActionGroup;
! import com.intellij.openapi.actionSystem.ActionToolbar;
! import com.intellij.openapi.actionSystem.ActionManager;
import com.ociweb.jarspy.JarInspector;
- import com.ociweb.jarspy.gui.ClassesViewer;
import com.ociweb.jarspy.gui.AboutJarSpy;
import com.ociweb.jarspy.gui.tree.JarSpyTreeCellRenderer;
import java.io.File;
import java.io.IOException;
- import java.net.URL;
- import java.util.Properties;
- import java.util.Map;
import java.util.HashMap;
! import java.awt.BorderLayout;
! import java.awt.event.ActionEvent;
import javax.swing.ImageIcon;
- import javax.swing.JPanel;
import javax.swing.JFrame;
import javax.swing.SwingUtilities;
--- 19,44 ----
package com.ociweb.jarspy.intellij.plugin;
! import com.intellij.openapi.actionSystem.ActionManager;
! import com.intellij.openapi.actionSystem.ActionToolbar;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.DefaultActionGroup;
! import com.intellij.openapi.components.ProjectComponent;
! import com.intellij.openapi.diagnostic.Logger;
! import com.intellij.openapi.project.Project;
! import com.intellij.openapi.wm.ToolWindowAnchor;
! import com.intellij.openapi.wm.ToolWindowManager;
import com.ociweb.jarspy.JarInspector;
import com.ociweb.jarspy.gui.AboutJarSpy;
+ import com.ociweb.jarspy.gui.ClassesViewer;
import com.ociweb.jarspy.gui.tree.JarSpyTreeCellRenderer;
+ import java.awt.BorderLayout;
import java.io.File;
import java.io.IOException;
import java.util.HashMap;
! import java.util.Map;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
+ import javax.swing.JPanel;
import javax.swing.SwingUtilities;
***************
*** 87,91 ****
ToolWindowManager twm = ToolWindowManager.getInstance(myProject);
! ClassesViewer cv = new ClassesViewer(jarInspector);
final JPanel myPanel = new JPanel(new BorderLayout());
--- 84,88 ----
ToolWindowManager twm = ToolWindowManager.getInstance(myProject);
! final ClassesViewer cv = new ClassesViewer(jarInspector);
final JPanel myPanel = new JPanel(new BorderLayout());
***************
*** 100,104 ****
} catch (Exception e) {
}
!
AboutJarSpy ajs = new AboutJarSpy(parentFrame);
ajs.setVisible(true);
--- 97,101 ----
} catch (Exception e) {
}
!
AboutJarSpy ajs = new AboutJarSpy(parentFrame);
ajs.setVisible(true);
***************
*** 107,112 ****
--- 104,127 ----
};
+ AnAction collapseAllAction = new AnAction("Collapse All",
+ "Collapse All",
+ new ImageIcon(getClass().getResource("/actions/collapseall.png"))) {
+ public void actionPerformed(AnActionEvent ae) {
+ cv.collapseTree();
+ }
+ };
+
+ AnAction expandAllAction = new AnAction("Expand All",
+ "Expand All",
+ new ImageIcon(getClass().getResource("/actions/expandall.png"))) {
+ public void actionPerformed(AnActionEvent ae) {
+ cv.expandTree();
+ }
+ };
+
DefaultActionGroup actionGroup = new DefaultActionGroup("jarspy", true);
+ actionGroup.add(expandAllAction);
+ actionGroup.add(collapseAllAction);
actionGroup.add(aboutAction);
|