Bug 9015 Organize imports feature finds errors in assert statements
Eclipse version 2.0, build 20020125, Windows, installed JDK1.4RC3 from Sun, used as external compiler, Compilation settings Java 1.4 (source and bytecode). When I use asserts of the form assert xx != null; in the code and try to invoke the Organize Imports feature, I get an error Compilation unit has syntax errors: Line <someline>: Syntax error on token "!=", ",", ";" expected. The class runs fine and shows no errors / warnings otherwise. Organize imports work fine if I place assert expression in brackets, like this: assert (xx != null);
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaStructureCreator.java
DiffNode d= (DiffNode) differencer.findDifferences(true, null, root, i.fAncestor, i.fLeft, i.fRight);
				if (d != null) {
					d.setDontExpand(true);
					Iterator it2= i.fChildren.iterator();
					while (it2.hasNext()) {
						IDiffElement rd= (IDiffElement) it2.next();
						root.removeToRoot(rd);
						d.add(rd);
					}
				}
			}
		}
	}
	
	/**
	 * If selector is an IJavaElement this method tries to return an
	 * IStructureComparator object for it.
	 * In case of error or if the given selector cannot be found
	 * null is returned.
	 * @param selector the IJavaElement to extract
	 * @param input must implement the IStreamContentAccessor interface.
	 */
	public IStructureComparator locate(Object selector, Object input) {
		
		if (!(selector instanceof IJavaElement))
			return null;
		
		IStructureComparator structure= getStructure(input);