Line Coverage

"Nikhil C. Khedkar" <[email protected]>
Newsgroups gmane.comp.jakarta.bcel.devel
Message-ID <20040219095513.90407.qmail__1939.27867007933$1077184525@web13609.mail.yahoo.com>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.