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 boolean canSave() {
		return true;
	}
	
	public void save(IStructureComparator node, Object input) {
		if (node instanceof JavaNode && input instanceof IEditableContent) {
			IDocument document= ((JavaNode)node).getDocument();
			IEditableContent bca= (IEditableContent) input;
			bca.setContent(document.get().getBytes());
		}
	}
	
	/**
	 * Returns the contents of the given node as a string.
	 * This string is used to test the content of a Java element
	 * for equality. Is is never shown in the UI, so any string representing
	 * the content will do.
	 * @param node must implement the IStreamContentAccessor interface
	 * @param ignoreWhiteSpace if true all Java white space (incl. comments) is removed from the contents.
	 */
	public String getContents(Object node, boolean ignoreWhiteSpace) {
		
		if (! (node instanceof IStreamContentAccessor))
			return null;
			
		IStreamContentAccessor sca= (IStreamContentAccessor) node;
		String content= null;
		try {
			content= JavaCompareUtilities.readString(sca.getContents());