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
}
			}
		}
		return null;
	}
	/**
	 * Returns true if the given IJavaElement maps to a JavaNode.
	 * The JavaHistoryAction uses this function to determine whether
	 * a selected Java element can be replaced by some piece of
	 * code from the local history.
	 */
	static boolean hasEdition(IJavaElement je) {
		if (je instanceof IMember && ((IMember)je).isBinary())
			return false;
			
		switch (je.getElementType()) {
		case JavaElement.COMPILATION_UNIT:
		case JavaElement.TYPE:
		case JavaElement.FIELD:
		case JavaElement.METHOD:
		case JavaElement.INITIALIZER:
		case JavaElement.PACKAGE_DECLARATION:
		case JavaElement.IMPORT_CONTAINER:
		case JavaElement.IMPORT_DECLARATION:
			return true;
		}
		return false;
	}
}