|
From: Lukas P. <pe...@us...> - 2002-08-28 18:00:08
|
Update of /cvsroot/javaprofiler/module/net/sourceforge/javaprofiler/module/nodes
In directory usw-pr-cvs1:/tmp/cvs-serv2114
Modified Files:
BacktraceChildren.java CallTreeChildren.java CallTreeNode.java
Log Message:
property sheets moved to sheets package
Index: BacktraceChildren.java
===================================================================
RCS file: /cvsroot/javaprofiler/module/net/sourceforge/javaprofiler/module/nodes/BacktraceChildren.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** BacktraceChildren.java 23 Aug 2002 18:15:13 -0000 1.1
--- BacktraceChildren.java 28 Aug 2002 18:00:05 -0000 1.2
***************
*** 42,45 ****
--- 42,46 ----
import net.sourceforge.javaprofiler.module.nodes.CallTreeNode;
import net.sourceforge.javaprofiler.module.data.BacktraceSupport;
+ import net.sourceforge.javaprofiler.module.sheets.*;
/** This children object is constructed from a list of <code>CPUTrace</code>
***************
*** 99,104 ****
/*
* $Log$
! * Revision 1.1 2002/08/23 18:15:13 petrul
! * added cpu backtrace view
*
*/
--- 100,105 ----
/*
* $Log$
! * Revision 1.2 2002/08/28 18:00:05 petrul
! * property sheets moved to sheets package
*
*/
Index: CallTreeChildren.java
===================================================================
RCS file: /cvsroot/javaprofiler/module/net/sourceforge/javaprofiler/module/nodes/CallTreeChildren.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** CallTreeChildren.java 20 Aug 2002 19:13:39 -0000 1.1
--- CallTreeChildren.java 28 Aug 2002 18:00:05 -0000 1.2
***************
*** 40,44 ****
import org.openide.nodes.Node;
import net.sourceforge.javaprofiler.jpi.*;
! import net.sourceforge.javaprofiler.module.nodes.CallTreeNode;
/** This class converts a list of JPI objects into <code>Node</code> objects.
--- 40,44 ----
import org.openide.nodes.Node;
import net.sourceforge.javaprofiler.jpi.*;
! import net.sourceforge.javaprofiler.module.sheets.*;
/** This class converts a list of JPI objects into <code>Node</code> objects.
***************
*** 102,106 ****
CallTreeChildren(oo.getThreads()));
node.setDisplayName("Group " + oo.getName());
! node.setIconBase("/org/openide/resources/groupShadow");
return node;
} else if (o instanceof ThreadRef) {
--- 102,106 ----
CallTreeChildren(oo.getThreads()));
node.setDisplayName("Group " + oo.getName());
! node.setIconBase("/org/openide/resources/beans");
return node;
} else if (o instanceof ThreadRef) {
***************
*** 113,117 ****
node=new CallTreeNode(Children.LEAF);
node.setDisplayName(oo.getName());
! node.setIconBase("/org/openide/resources/groupShadow");
return node;
} else if (o instanceof CallTreeRef) {
--- 113,117 ----
node=new CallTreeNode(Children.LEAF);
node.setDisplayName(oo.getName());
! node.setIconBase("/org/openide/resources/beans");
return node;
} else if (o instanceof CallTreeRef) {
***************
*** 120,124 ****
// never happens
AbstractNode node=new AbstractNode(Children.LEAF);
! node.setName("error");
node.setIconBase("/org/openide/resources/pending");
return node;
--- 120,124 ----
// never happens
AbstractNode node=new AbstractNode(Children.LEAF);
! node.setDisplayName("error");
node.setIconBase("/org/openide/resources/pending");
return node;
Index: CallTreeNode.java
===================================================================
RCS file: /cvsroot/javaprofiler/module/net/sourceforge/javaprofiler/module/nodes/CallTreeNode.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** CallTreeNode.java 23 Aug 2002 18:19:01 -0000 1.2
--- CallTreeNode.java 28 Aug 2002 18:00:05 -0000 1.3
***************
*** 38,49 ****
import org.openide.nodes.Children;
import org.openide.util.HelpCtx;
-
- import org.openide.TopManager;
import org.openide.nodes.Sheet;
! import org.openide.nodes.Node;
! import org.openide.nodes.PropertySupport;
! import net.sourceforge.javaprofiler.jpi.CallTreeRef;
! import java.util.ResourceBundle;
! import org.openide.util.NbBundle;
/** An enhancement to <code>AbstractNode</code> adding support for <code>
--- 38,43 ----
import org.openide.nodes.Children;
import org.openide.util.HelpCtx;
import org.openide.nodes.Sheet;
! import net.sourceforge.javaprofiler.module.sheets.*;
/** An enhancement to <code>AbstractNode</code> adding support for <code>
***************
*** 78,126 ****
}
! /** Serves for creation of PropertySheet for call tree item.
! * @author Lukas Petru
! */
! class CallTreeItemSheet implements SheetFactory {
! private CallTreeRef ctRef;
!
! public CallTreeItemSheet(CallTreeRef ref) {
! ctRef=ref;
! }
!
! public Sheet create() {
! ResourceBundle bundle=NbBundle.getBundle(CallTreeItemSheet.class);
! Sheet sh=new Sheet();
! Sheet.Set set=Sheet.createPropertiesSet();
! try {
! Node.Property pr=new PropertySupport.Reflection(ctRef.getFrame()
! .getMethod(), String.class, "toString", null);
! pr.setName("Method");
! pr.setDisplayName(bundle.getString("LBL_CTItemMethod"));
! set.put(pr);
! pr=new PropertySupport.Reflection(ctRef.getFrame(), int.class,
! "getLineNo", null);
! pr.setName("LineNumber");
! pr.setDisplayName(bundle.getString("LBL_CTItemLineNo"));
! set.put(pr);
! pr=new PropertySupport.Reflection(ctRef, int.class,
! "getCPUCumulativeTime", null);
! pr.setName("CumulativeTime");
! pr.setDisplayName(bundle.getString("LBL_CTItemCumulativeTime"));
! set.put(pr);
! pr=new PropertySupport.Reflection(ctRef, int.class,
! "getCPUPureTime", null);
! pr.setName("PureTime");
! pr.setDisplayName(bundle.getString("LBL_CTItemPureTime"));
! set.put(pr);
! pr=new PropertySupport.Reflection(ctRef, int.class,
! "getCPUHitsCount", null);
! pr.setName("HitsCount");
! pr.setDisplayName(bundle.getString("LBL_CTItemHits"));
! set.put(pr);
! } catch (NoSuchMethodException e) {
! TopManager.getDefault().notifyException(e);
! }
! sh.put(set);
! return sh;
! }
! }
\ No newline at end of file
--- 72,79 ----
}
! /*
! * $Log$
! * Revision 1.3 2002/08/28 18:00:05 petrul
! * property sheets moved to sheets package
! *
! */
\ No newline at end of file
|