[prev in list] [next in list] [prev in thread] [next in thread] 

List:       bcel-dev
Subject:    Line Coverage
From:       "Nikhil C. Khedkar" <nikhilckhedkar () yahoo ! com>
Date:       2004-02-19 9:55:13
Message-ID: 20040219095513.90407.qmail () web13609 ! mail ! yahoo ! com
[Download RAW message or body]

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-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bcel-dev-help@jakarta.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic