You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bcel-user@jakarta.apache.org by "Nikhil C. Khedkar" <ni...@yahoo.com> on 2004/02/19 10:55:13 UTC
Line Coverage
Hi,
Some more help required. I have been working on line
coverage. I want to put a method call before each of
the line in the class file. Works pretty well for
simple case like
public void updateUI()
{
CellRenderer cellRenderer = getTreeCellRenderer();
this.setCellRenderer(cellRenderer);
super.updateUI();
}
public void updateUI()
{
MYMETHOD();
CellRenderer cellRenderer = getTreeCellRenderer();
MYMETHOD();
this.setCellRenderer(cellRenderer);
MYMETHOD();
super.updateUI();
}
But fails for
public void actionPerformed(ActionEvent event)
{
byte[] a = event.getActionCommand().getBytes();
int command = a[0];
if (IActionCommand.HELP_INDEX == command)
{
showHelp();
}
if (IActionCommand.COLLAPSE_ALL == command)
{
int rows[] = getSelectionRows();
for (int i = rows.length; --i > -1;)
{
collapseAllRow(rows[i]);
}
}
else if (IActionCommand.EXPAND_ALL == command)
{
int rows[] = getSelectionRows();
for (int i = 0; i < rows.length; i++)
{
expandAllRow(rows[i]);
}
}
else if (IActionCommand.SHOW_EDITOR == command)
{
new Thread(new Runnable()
{
/**
* @see java.lang.Runnable#run()
*/
public void run()
{
showEditor();
}
}).run();
}
else if (IActionCommand.LOAD == command)
{
TreePath tp = getSelectionPath();
Node oCurrentNode = (Node)
tp.getLastPathComponent();
try
{
oCurrentNode.getUserObject().reLoad();
}
catch (Exception e)
{
Logger.log(sClassName, FATAL, e);
}
}
else if (IActionCommand.FIND == command)
{
showFindDialog();
}
else if (IActionCommand.START == command)
{
new Thread(new Runnable()
{
public void run()
{
MainPanel.analysis();
}
}).start();
}
}
Any inputs?
Thanks,
Nikhil Khedkar
__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools
---------------------------------------------------------------------
To unsubscribe, e-mail: bcel-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bcel-user-help@jakarta.apache.org