Bug 95142 [JUnit] JUnit view is missing context menu
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/TestHierarchyTab.java
}
	
	private void initMenu() {
		MenuManager menuMgr= new MenuManager("#PopupMenu"); 
		menuMgr.setRemoveAllWhenShown(true);
		menuMgr.addMenuListener(this);
		fTestRunnerPart.getSite().registerContextMenu(menuMgr, this);
		Menu menu= menuMgr.createContextMenu(fTree);
		fTree.setMenu(menu);	
	}
	private String getTestMethod() {
		return getTestInfo().getTestMethodName();
	}
	private TestRunInfo getTestInfo() {
		TreeItem[] treeItems= fTree.getSelection();
		if(treeItems.length == 0) 
			return null;
		return ((TestRunInfo)treeItems[0].getData());
	}	 
	
	private boolean isSuiteSelected() {
		TreeItem[] treeItems= fTree.getSelection();
		if(treeItems.length != 1) 
			return false;
		return treeItems[0].getItemCount() > 0;
	}	
	
	private String getClassName() {
		return getTestInfo().getClassName();
	}