Skip to content

openFile opens files kept by another file system (ABAP); the diff tools refuse them plainly - #218

Merged
eilonwy06 merged 1 commit into
eilonwy06:devfrom
LalaLolLucky:non-disk-editors
Oct 21, 2026
Merged

eilonwy06 merged 1 commit into
eilonwy06:devfrom
LalaLolLucky:non-disk-editors

Conversation

@LalaLolLucky

Copy link
Copy Markdown
Contributor

What changed and why

Follow-up to #153 (SAP ADT / ABAP). The first fix made getOpenEditors and 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:

  • openFile built 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 / 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: "… 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 and openFile works. It references #153 and does not close it.

How was this tested?

  • Unit tests: the new EditorParts helpers (a semanticfs:/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) and NonDiskDiffToolsTest (both tools refuse before touching the workbench). Compiled against the real Eclipse jars and run with the JUnit launcher: 23 tests pass (the existing EditorPartsTest and the new ones).
  • Not exercised: openFile on a real semanticfs: 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

  • I have not changed version numbers in MANIFEST.MF, feature.xml, or site.xml — the maintainer sets these on release.
  • I have not added a CHANGELOG.md entry — the maintainer adds this on release.
  • I have not hand-edited the generated p2 artifacts under com.anthropic.claudecode.eclipse.site/.
  • If this touches claude-eclipse-core: I ran cargo 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.)
  • If this would need a native library for a platform I can't build and test myself, I've left that out and said so above rather than including an untested binary. (None needed.)

…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>
@eilonwy06
eilonwy06 merged commit cd6ff7e into eilonwy06:dev Oct 21, 2026
6 checks passed
@github-actions github-actions Bot mentioned this pull request Oct 21, 2026
@LalaLolLucky
LalaLolLucky deleted the non-disk-editors branch October 22, 2026 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants