Community
Participate
Working Groups
Fix released to HEAD
I need to back out of this temporarily. Although the spec says that null can be returned the TextFileDocumentProvider doesn't behave well when it is.
Created attachment 78099 [details] Patch that adds IURIEditorInput when a URI is available I've attached a patch with the fix for this. I want to hold off on releasing it until after M2 because making an editor input implement IURIEditorInput changes a significant number of interactions between the input, the editor and the document provider.
One scenario that seems to have degraded performance is opening a Compare Editor after a restart.
I'm not sure if we'll have the cycles to address this in 3.4.
Mass update - removing 3.4 target. This was one of the bugs marked for investigation (and potential fixing) in 3.4 but we ran out of time. Please ping on the bug if fixing it would be really important for 3.4, and does not require API changes or feature work.
We've had to write a whack of reflective code like this to avoid even visible optional dependencies on CVS to be able to view CVS-based resources. static final Class<?> FILE_REVISION_CLASS; static final Method FILE_REVISION_GET_URI_METHOD; static { Class<?> fileRevisionClass = null; Method fileRevisionGetURIMethod = null; Bundle bundle = Platform.getBundle("org.eclipse.team.core"); if (bundle != null && (bundle.getState() & (Bundle.ACTIVE | Bundle.STARTING | Bundle.RESOLVED)) != 0) { try { fileRevisionClass = bundle.loadClass("org.eclipse.team.core.history.IFileRevision"); fileRevisionGetURIMethod = fileRevisionClass.getMethod("getURI"); } catch (Throwable exeption) { // Ignore any exceptions and assume the class isn't available. } } FILE_REVISION_CLASS = fileRevisionClass; FILE_REVISION_GET_URI_METHOD = fileRevisionGetURIMethod; } public static URI getURI(IEditorInput editorInput) { if (FILE_REVISION_CLASS != null) { Object fileRevision = editorInput.getAdapter(FILE_REVISION_CLASS); if (fileRevision != null) { try { return URI.createURI(((java.net.URI)FILE_REVISION_GET_URI_METHOD.invoke(fileRevision)).toString()); } catch (Throwable exception) { EMFEditUIPlugin.INSTANCE.log(exception); } } But given that we have this, we can get by quite nicely.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.