Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 187877
Collapse All | Expand All

(-)extensions/org/eclipse/ui/part/FileEditorInput.java (+4 lines)
Lines 172-183 Link Here
172
		//this is not a local file, so try to obtain a local file
172
		//this is not a local file, so try to obtain a local file
173
		try {
173
		try {
174
			final URI locationURI = file.getLocationURI();
174
			final URI locationURI = file.getLocationURI();
175
			if(locationURI == null)
176
				return null;
175
			IFileStore store = EFS.getStore(locationURI);
177
			IFileStore store = EFS.getStore(locationURI);
176
			//first try to obtain a local file directly fo1r this store
178
			//first try to obtain a local file directly fo1r this store
177
			java.io.File localFile = store.toLocalFile(EFS.NONE, null);
179
			java.io.File localFile = store.toLocalFile(EFS.NONE, null);
178
			//if no local file is available, obtain a cached file
180
			//if no local file is available, obtain a cached file
179
			if (localFile == null)
181
			if (localFile == null)
180
				localFile = store.toLocalFile(EFS.CACHE, null);
182
				localFile = store.toLocalFile(EFS.CACHE, null);
183
			if (localFile == null)
184
				return null;
181
			return Path.fromOSString(localFile.getAbsolutePath());
185
			return Path.fromOSString(localFile.getAbsolutePath());
182
		} catch (CoreException e) {
186
		} catch (CoreException e) {
183
			//this can only happen if the file system is not available for this scheme
187
			//this can only happen if the file system is not available for this scheme

Return to bug 187877