Bug 300012 [CommonNavigator] CNF test improvements
Various improvements and corrections.
tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/NavigatorTestBase.java
}
		for (int i = 0; i < items.length; i++) {
			if (items[i] instanceof ActionContributionItem) {
				ActionContributionItem aci = (ActionContributionItem) items[i];
				if (aci.getAction().getText().startsWith(item))
					return true;
				if (DEBUG)
					System.out.println("action text: " + aci.getAction().getText());
			}
		}
		return false;
	}
	protected static final boolean ALL = true;
	protected static final boolean TEXT = true;
	protected void checkItems(TreeItem[] rootItems, TestLabelProvider tlp) {
		checkItems(rootItems, tlp, ALL, TEXT);
	}
	protected void checkItemsText(TreeItem[] rootItems, TestLabelProvider tlp, boolean all) {
		checkItems(rootItems, tlp, all, TEXT);
	}
	protected void checkItems(TreeItem[] rootItems, TestLabelProvider tlp, boolean all, boolean text) {
		for (int i = 0; i < rootItems.length; i++) {
			
			if (rootItems[i].getText() == null || rootItems[i].getText().equals(""))
				continue;
			if (text && !rootItems[i].getText().startsWith(tlp.getColorName()))
				fail("Wrong text: " + rootItems[i].getText());
			assertEquals(tlp.backgroundColor, rootItems[i].getBackground(0));
			assertEquals(TestLabelProvider.toForegroundColor(tlp.backgroundColor), rootItems[i]
					.getForeground(0));