Repository navigation
openFile opens files kept by another file system (ABAP); the diff tools refuse them plainly - #218
Merged
Merged
Conversation
…se them plainly A file whose file system is not the local disk (ABAP's semanticfs:, a remote project) has no disk path, so getOpenEditors reports its URI. The tools that take a path then misbehaved on it: - openFile built a local file store from it and failed (on Windows the ':' made the path invalid). It now opens such a file through the workspace (findFilesForLocationURI, else the file system behind the URI), and finds the text editor of a multi-page editor so the line and selection apply. - openDiff and acceptDiff read and write by disk path: on Windows they threw an obscure path error, elsewhere the URI was taken for a new relative file. They now refuse at once, saying the file is not on disk and to use its editor. This does not make such files editable through openDiff: after an accepted diff the CLI writes the file by path, and there is no path to write. Refs eilonwy06#153 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed and why
Follow-up to #153 (SAP ADT / ABAP). The first fix made
getOpenEditorsand the selection tools see ABAP editors, which report a file that has no disk path by its URI (semanticfs:/…). The tools that take a path then still assumed a local disk:openFilebuilt a local file store from the path and failed (on Windows the:makes it an invalid path). It now opens such a file through the workspace (findFilesForLocationURI, which is what ADT's own editor expects, else the file system behind the URI), and finds the text editor of a multi-page editor so the line and selection still apply. Disk paths take the same route as before.openDiff/acceptDiffread and write by disk path. On Windows they threw an obscure path error; elsewhere the URI was taken for a new, relative file. They now refuse at once: "… is not a file on disk: the "semanticfs" file system keeps it, so this tool, which reads and writes files by path, cannot work on it. Use the editor it is open in instead."What this does not do. It does not make ABAP sources editable through
openDiff. After an accepted diff the CLI writes the file itself, by path, and there is no path to write to, so that needs a different mechanism (tools that read and change an open editor's document). This PR is only the hardening, so the failure is clear andopenFileworks. It references #153 and does not close it.How was this tested?
EditorPartshelpers (asemanticfs:/http:URI is not a disk path; Windows drive letters, UNC paths,file:URIs, paths with a colon in a folder name and relative paths are; a URI with spaces is still not a disk path but gives no URI) andNonDiskDiffToolsTest(both tools refuse before touching the workbench). Compiled against the real Eclipse jars and run with the JUnit launcher: 23 tests pass (the existingEditorPartsTestand the new ones).openFileon a realsemanticfs:file. It needs a running workbench and SAP ADT, which I don't have. The reporter on SAP ADT (ABAP) editors are invisible to getOpenEditors / getCurrentSelection / getWorkspaceFolders #153 offered to test a build against ADT.Checklist
MANIFEST.MF,feature.xml, orsite.xml— the maintainer sets these on release.CHANGELOG.mdentry — the maintainer adds this on release.com.anthropic.claudecode.eclipse.site/.claude-eclipse-core: I rancargo test, and for any platform I can build and run on, rebuilt the native library and exercised it in a running Eclipse instance. (Not touched: Java only.)