Skip to content

Commit 39565bc

Browse files
authored
docs: Add test plan for delegating read directory and file/text search to IDE for ABAP (#150)
1 parent 391f8c9 commit 39565bc

2 files changed

Lines changed: 226 additions & 0 deletions

File tree

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
# Support Delegating File and Text Search to IDE
2+
3+
## Overview
4+
Verify that Copilot Agent mode can satisfy language-server `workspace/findFiles` and `workspace/findTextInFiles`
5+
requests by delegating file-name and text-content search to Eclipse. This matters for ABAP support because ADT resources
6+
may use Eclipse-managed or virtual URIs that the Copilot language server cannot search directly from the local file system.
7+
8+
Entry points:
9+
- Window -> Show View -> Other... -> Copilot -> Copilot Chat -> Agent mode
10+
11+
Not exercised:
12+
- Manual unit-level invocation of `workspace/findFiles` or `workspace/findTextInFiles`; this plan verifies the
13+
user-visible Agent flow.
14+
- Generic local-file search outside ABAP ADT resources.
15+
16+
---
17+
18+
## Prerequisites
19+
20+
- Eclipse IDE with the GitHub Copilot for Eclipse plugin installed and activated.
21+
- The user is signed in to GitHub Copilot and Agent mode is available in the Copilot Chat view.
22+
- ABAP Development Tools is installed and connected to an ABAP system.
23+
- The workspace contains an imported ABAP project with a known package that has at least one ABAP development object
24+
visible in Project Explorer.
25+
- A test ABAP development object is available that can be opened in ADT and contains, or can safely be updated to
26+
contain, a unique search token such as `ZCOPILOT_SEARCH_ABAP_144` in a comment or string literal.
27+
28+
---
29+
30+
## 1. ABAP ADT file and text search delegation
31+
32+
### TC-001: Agent finds a known token inside ABAP source through Eclipse text search
33+
34+
**Type:** `Happy Path`
35+
**Priority:** `P0`
36+
37+
#### Preconditions
38+
- The Eclipse workbench is open with the ABAP project loaded and connected.
39+
- A test ABAP development object in the target package contains the unique token `ZCOPILOT_SEARCH_ABAP_144` in a comment
40+
or string literal.
41+
- The object containing the token is visible in Project Explorer and can be opened from ADT.
42+
- Copilot Chat is open in Agent mode.
43+
44+
#### Steps
45+
1. Open the ABAP development object that contains `ZCOPILOT_SEARCH_ABAP_144` and verify the token is present in the
46+
editor.
47+
2. Open **Copilot Chat** from `Window -> Show View -> Other... -> Copilot -> Copilot Chat` if it is not already open.
48+
3. Switch the chat mode selector to **Agent**.
49+
4. Send a prompt that asks Agent mode to search the ABAP project or package for the token, for example: `Search ABAP
50+
project <project name> for the text ZCOPILOT_SEARCH_ABAP_144. Return the matching object path
51+
and line text.`
52+
5. If Copilot asks for tool confirmation, approve the requested workspace text-search operation.
53+
6. Wait for the Copilot response to complete.
54+
7. Compare the returned object and line text with the ABAP editor content.
55+
56+
#### Expected Result
57+
- Copilot completes the request without reporting that the ABAP source, ADT resource, `semanticfs` URI, or virtual file
58+
cannot be searched or read.
59+
- The response includes the ABAP development object that contains `ZCOPILOT_SEARCH_ABAP_144`.
60+
- The response includes the matching line text, or enough surrounding context to prove that the token was found inside
61+
the ABAP source object.
62+
- The Eclipse error log has no `workspace/findTextInFiles`, `Invalid regex`, `Invalid glob`, or `Failed to search text`
63+
error for the selected ABAP resource.
64+
65+
#### Key Screenshots
66+
- [ ] **ABAP token in editor** -- The ABAP development object open in ADT with `ZCOPILOT_SEARCH_ABAP_144` visible.
67+
- [ ] **Agent text-search prompt** -- Copilot Chat in Agent mode with the token-search prompt visible.
68+
- [ ] **Completed text-search response** -- The completed response showing the matching ABAP object and line text.
69+
70+
#### Notes on failure modes
71+
- Copilot returns file-name matches but cannot find the token -- `workspace/findFiles` may work while
72+
`workspace/findTextInFiles` is not reading ABAP resources through Eclipse EFS.
73+
- The match is missing when the token differs only by case -- text search should be case-insensitive, so check the
74+
regex/text-search handling path.
75+
- The chat turn hangs after approval -- the text search may be blocked while reading an ADT-backed resource.
76+
77+
### TC-002: Agent handles no-match ABAP searches without surfacing errors
78+
79+
**Type:** `Edge Case`
80+
**Priority:** `P1`
81+
82+
#### Preconditions
83+
- The Eclipse workbench is open with the ABAP project loaded and connected.
84+
- Copilot Chat is open in Agent mode.
85+
- A deliberately nonexistent ABAP object name or token is chosen, for example `ZCOPILOT_SEARCH_ABAP_144_DOES_NOT_EXIST`.
86+
87+
#### Steps
88+
1. Ask Agent mode to search the target ABAP package for files or development objects matching the nonexistent name.
89+
2. If Copilot asks for tool confirmation, approve the requested workspace search operation.
90+
3. Wait for the response to complete.
91+
4. Ask Agent mode to search the same ABAP package for the nonexistent text token.
92+
5. If Copilot asks for tool confirmation, approve the requested workspace text-search operation.
93+
6. Wait for the response to complete.
94+
7. Open the Eclipse error log and check for errors emitted during both searches.
95+
96+
#### Expected Result
97+
- Copilot completes both turns and explains that no matching ABAP files, objects, or text results were found.
98+
- No error dialog is shown to the user.
99+
- The Eclipse error log has no uncaught exception or stack trace from `workspace/findFiles`, `workspace/findTextInFiles`,
100+
glob matching, regex matching, or URI parsing.
101+
102+
#### Key Screenshots
103+
- [ ] **No-match file-search response** -- Copilot Chat showing a completed response for the nonexistent ABAP object
104+
name.
105+
- [ ] **No-match text-search response** -- Copilot Chat showing a completed response for the nonexistent ABAP token.
106+
107+
#### Notes on failure modes
108+
- An invalid-pattern or URI error appears for an ordinary no-match search -- the delegated search should return an empty
109+
result rather than surfacing an exception.
110+
- The response includes unrelated local files or source lines -- the search may not be scoped to the selected ABAP
111+
project or package.
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
# Support Delegating Read Directory to IDE
2+
3+
## Overview
4+
Verify that Copilot Agent mode can satisfy language-server `workspace/readDirectory` requests by delegating
5+
directory listing to Eclipse. This matters for ABAP support because ADT resources may use Eclipse-managed or virtual
6+
URIs that the Copilot language server cannot list directly from the local file system.
7+
8+
Entry points:
9+
- Window -> Show View -> Other... -> Copilot -> Copilot Chat -> Agent mode
10+
11+
Not exercised:
12+
- General file and text search delegation, which is covered by the separate search delegation task.
13+
- Manual unit-level invocation of `workspace/readDirectory`; this plan verifies the user-visible Agent flow.
14+
15+
---
16+
17+
## Prerequisites
18+
19+
- Eclipse IDE with the GitHub Copilot for Eclipse plugin installed and activated.
20+
- The user is signed in to GitHub Copilot and Agent mode is available in the Copilot Chat view.
21+
- ABAP Development Tools is installed and connected to an ABAP system.
22+
- The workspace contains an imported ABAP project that has previously cached at least one ABAP development object
23+
locally (i.e., the object has been opened from Project Explorer at least once so the `.adt/...` workspace folder
24+
contains a corresponding `IFolder`/`IFile` for it).
25+
- A folder under the project's locally cached ADT structure (e.g., `<project>/.adt/classlib/classes/<class_name>/`) is
26+
visible in Project Explorer with the **Show Hidden Resources** filter disabled, and has at least one child entry on
27+
disk.
28+
29+
---
30+
31+
## 1. ABAP ADT directory delegation
32+
33+
### TC-001: Agent lists a cached ADT directory through Eclipse
34+
35+
**Type:** `Happy Path`
36+
**Priority:** `P0`
37+
38+
> Note: Virtual ABAP packages shown in Project Explorer are not Eclipse `IResource`s, and ADT only materializes
39+
> development objects under `<project>/.adt/...` after they are opened. The delegated `workspace/readDirectory`
40+
> implementation lists workspace resources, so this test targets a *cached* ADT folder where children are guaranteed to
41+
> exist on disk.
42+
43+
#### Preconditions
44+
- The Eclipse workbench is open with the ABAP project loaded and connected.
45+
- A locally cached ADT folder (e.g., `<project>/.adt/classlib/classes/<class_name>/`) is visible in Project Explorer
46+
and contains at least one cached child entry (a sub-folder or a development object file such as `<name>.aclass`).
47+
- Copilot Chat is open in a fresh or cleared conversation.
48+
49+
#### Steps
50+
1. Open **Copilot Chat** from `Window -> Show View -> Other... -> Copilot -> Copilot Chat`.
51+
2. Switch the chat mode selector to **Agent**.
52+
3. In Project Explorer, expand the target ABAP project and create a folder under it.
53+
4. Attach that folder to the chat context (drag-and-drop into the input area or use **Add Context...**) so Copilot
54+
sends its workspace URI to the language server.
55+
5. Send a prompt that asks Agent mode to list its immediate children, for example:
56+
`List the immediate children of the attached folder. Do not search recursively.`
57+
6. If Copilot asks for tool confirmation, approve the requested workspace read operation.
58+
7. Wait for the Copilot response to complete.
59+
8. Compare the listed entries in the response with the immediate children visible under the same folder in Project
60+
Explorer.
61+
62+
#### Expected Result
63+
- Copilot completes the request without reporting that the folder URI, ADT resource, `platform:/resource` URI, or
64+
`semanticfs:` URI cannot be read.
65+
- The response includes the immediate child entries that are visible on disk for the attached cached ADT folder.
66+
- The response does not include recursive grandchildren when the prompt requested immediate children only.
67+
- The Eclipse error log has no `workspace/readDirectory`, `Invalid container URI`, or `Failed to read directory` error
68+
for the selected ABAP resource.
69+
70+
#### Key Screenshots
71+
- [ ] **Cached ADT folder in Project Explorer** -- The selected folder expanded to show the child entries used as the
72+
expected result.
73+
- [ ] **Agent prompt** -- Copilot Chat in Agent mode with the folder attached and the listing prompt visible.
74+
- [ ] **Completed Agent response** -- The completed response showing the matching child entries.
75+
76+
#### Notes on failure modes
77+
- Copilot says the directory cannot be read or is unsupported -- Eclipse may not be resolving the ADT,
78+
`platform:/resource`, or `semanticfs:` URI through the delegated `workspace/readDirectory` path.
79+
- The response is empty while Project Explorer shows children -- the IDE may have returned no accessible `IContainer`
80+
for the resource; verify the URI scheme is among the supported schemes (`PlatformUtils.getSupportedUriSchemes()`),
81+
the ABAP project is connected, and the target folder is genuinely cached on disk (a virtual ABAP *package* will
82+
legitimately return empty because it is not an `IResource`).
83+
- The response includes unrelated workspace files -- the language server may have fallen back to local filesystem
84+
listing instead of the Eclipse workspace resource.
85+
86+
### TC-002: Agent handles an empty or inaccessible ABAP package without crashing
87+
88+
**Type:** `Edge Case`
89+
**Priority:** `P1`
90+
91+
#### Preconditions
92+
- The Eclipse workbench is open with the ABAP project loaded.
93+
- An empty ABAP package, a package with no visible child resources, or a package that can be temporarily
94+
disconnected/unloaded is available.
95+
- Copilot Chat is open in Agent mode.
96+
97+
#### Steps
98+
1. In Project Explorer, locate the empty, unloaded, or inaccessible ABAP package and note its displayed name.
99+
2. Ask Agent mode to list the immediate children of that ABAP package.
100+
3. If Copilot asks for tool confirmation, approve the requested workspace read operation.
101+
4. Wait for the response to complete.
102+
5. Open the Eclipse error log and check for errors emitted during the request.
103+
104+
#### Expected Result
105+
- Copilot completes the turn and explains that no child entries are available, or that the resource could not be accessed, without hanging or crashing the chat view.
106+
- No error dialog is shown to the user.
107+
- The Eclipse error log has no uncaught exception or stack trace from `workspace/readDirectory` or directory URI parsing.
108+
109+
#### Key Screenshots
110+
- [ ] **Empty or inaccessible ABAP package** -- Project Explorer showing the package state before the prompt.
111+
- [ ] **Graceful Agent response** -- Copilot Chat showing a completed response without a crash or endless spinner.
112+
113+
#### Notes on failure modes
114+
- The chat turn remains in progress indefinitely -- the `workspace/readDirectory` request may not be completing for unresolved ADT resources.
115+
- An error dialog or stack trace appears -- URI handling should return an empty directory result for unresolved resources instead of surfacing an exception.

0 commit comments

Comments
 (0)