ICompilationUnit cu= manager.getWorkingCopy(input); if (SHOW_OUTLINE_FOR_REMOTE_FILES && cu == null && input instanceof IStorageEditorInput) { IStorageEditorInput sei= (IStorageEditorInput)input; try { IStorage storage= sei.getStorage();  if (storage.isReadOnly()) { IPath path= storage.getFullPath(); int READER_CHUNK_SIZE= 2048; int BUFFER_SIZE= 8 * READER_CHUNK_SIZE; Reader in= new BufferedReader(new InputStreamReader(storage.getContents())); StringBuffer buffer= new StringBuffer(BUFFER_SIZE); char[] readBuffer= new char[READER_CHUNK_SIZE]; int n; try { n= in.read(readBuffer); while (n > 0) { buffer.append(readBuffer, 0, n); n= in.read(readBuffer); } } catch (IOException e) { JavaPlugin.log(e); } IJavaModel jm= JavaCore.create(ResourcesPlugin.getWorkspace().getRoot()); IJavaProject jp= jm.getJavaProject("__projectWorkingcopy__"); IPackageFragmentRoot root= jp.getPackageFragmentRoot(jp.getProject()); IPackageFragment pkg= root.getPackageFragment(""); cu= pkg.getCompilationUnit("A.java");  WorkingCopyOwner woc= new WorkingCopyOwner() {};  cu= cu.getWorkingCopy(woc, null, getProgressMonitor()); cu.getBuffer().setContents(buffer.toString()); cu.reconcile(AST.JLS3, false, woc, getProgressMonitor());     } } catch (CoreException ex) { cu= null; } } page.setInput(cu);
page.setInput(manager.getWorkingCopy(input));
	protected void setOutlinePageInput(JavaOutlinePage page, IEditorInput input) {		if (page != null) {			IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager();			ICompilationUnit cu= manager.getWorkingCopy(input);			if (SHOW_OUTLINE_FOR_REMOTE_FILES && cu == null && input instanceof IStorageEditorInput) {				IStorageEditorInput sei= (IStorageEditorInput)input;				try {					IStorage storage= sei.getStorage();					// XXX: currently no support for external non-readonly files					if (storage.isReadOnly()) {						IPath path= storage.getFullPath();						int READER_CHUNK_SIZE= 2048;						int BUFFER_SIZE= 8 * READER_CHUNK_SIZE;						Reader in= new BufferedReader(new InputStreamReader(storage.getContents()));						StringBuffer buffer= new StringBuffer(BUFFER_SIZE);						char[] readBuffer= new char[READER_CHUNK_SIZE];						int n;						try {							n= in.read(readBuffer);							while (n > 0) {								buffer.append(readBuffer, 0, n);								n= in.read(readBuffer);							}						} catch (IOException e) {							JavaPlugin.log(e);						}						IJavaModel jm= JavaCore.create(ResourcesPlugin.getWorkspace().getRoot());						IJavaProject jp= jm.getJavaProject("__projectWorkingcopy__"); //$NON-NLS-1$						IPackageFragmentRoot root= jp.getPackageFragmentRoot(jp.getProject());						IPackageFragment pkg= root.getPackageFragment(""); //$NON-NLS-1$						cu= pkg.getCompilationUnit("A.java"); //$NON-NLS-1$						/*						 * FIXME:	Must use a shared working copy owner, e.g. JavaPlugin.getDefault().getFakeWokringCopyOwner())						 * 			This will allow to actions to detect fake working copies ==> disable 						 */						WorkingCopyOwner woc= new WorkingCopyOwner() {};						/*						 * FIXME: must dispose dispose the working copy later						 */						cu= cu.getWorkingCopy(woc, null, getProgressMonitor());						cu.getBuffer().setContents(buffer.toString());						cu.reconcile(AST.JLS3, false, woc, getProgressMonitor());												/*						 * XXX: if we enable this code it should be during doSetInput 						 */						//					if (manager instanceof WorkingCopyManager)						//						((WorkingCopyManager)manager).setWorkingCopy(input, cu);					}				} catch (CoreException ex) {					cu= null;				}			}			page.setInput(cu);		}	}