Bug 46377 [misc] Save not working for linked resources in Java editor
Trying to open a java file stored in a linked folder, results in error message "Java editor could not initialize" and no editor is opened. Other functions like compiling or comparing work fine with files in a linked folder. In previous build of Eclipse the Java editor used to work fine on files in linked folder. The build I have found this bug in is the M4.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/filebuffers/DocumentAdapter2.java
}
	
	/*
	 * @see IBuffer#replace(int, int, String)
	 */
	public void replace(int position, int length, String text) {
		if (DEBUG_LINE_DELIMITERS) {
			validateLineDelimiters(text);
		}
		fReplaceCmd.replace(position, length, text);
	}
	
	/*
	 * @see IBuffer#save(IProgressMonitor, boolean)
	 */
	public void save(IProgressMonitor progress, boolean force) throws JavaModelException {
		try {
			if (fTextFileBuffer != null)
				fTextFileBuffer.commit(progress, force);
		} catch (CoreException e) {
			throw new JavaModelException(e);
		}
	}
	
	/*
	 * @see IBuffer#setContents(char[])
	 */
	public void setContents(char[] contents) {
		setContents(new String(contents));
	}