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
*/
	public String getName() {
		return CompareMessages.getString("JavaStructureViewer.title"); 
	}
	
	/**
	 * Returns a tree of JavaNodes for the given input
	 * which must implement the IStreamContentAccessor interface.
	 * In case of error null is returned.
	 */
	public IStructureComparator getStructure(final Object input) {
		
		String contents= null;
		if (input instanceof IStreamContentAccessor) {
			IStreamContentAccessor sca= (IStreamContentAccessor) input;			
			try {
				contents= JavaCompareUtilities.readString(sca.getContents());
			} catch (CoreException ex) {
				JavaPlugin.log(ex);
				return null;
			}			
		}
		
		if (contents != null) {
			int n= contents.length();
			char[] buffer= new char[n];
			contents.getChars(0, n, buffer, 0);
			
			Document doc= new Document(contents);
			IDocumentPartitioner dp= JavaCompareUtilities.createJavaPartitioner();