Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Every bundle's `bnd.bnd` follows this structure:
-include: ${workspace}/cnf/fixedIndices/bnd_buildpath_Eclipse_Platform.bndrun

-buildpath: \
${fea_org.eclipse.rcp_4.35.0.v20250228-0640},\
org.eclipse.e4.rcp;version='4.35.0.v20250228-0640';type=org.eclipse.update.feature,\
<other deps>

-includeresource: ./root/
Expand All @@ -76,6 +76,7 @@ Private-Package: \
```

- Non-API packages go in `Private-Package`; only public API goes in `Export-Package`
- Eclipse features are first-class buildpath entries. Reference them with their bundle identity, exact version, and `type=org.eclipse.update.feature`; bnd expands their member bundles.
- Static resources (icons, CSS, model files) live in `root/` and are included via `-includeresource: ./root/`
- Use `${project.name}` macro for `Bundle-SymbolicName` — never hard-code it

Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/actions_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,58 @@ on:
- 'main'

jobs:
ci:
name: CI (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
swtbot_task: testrun.swtbot_linux.gtk.x86-64
- os: windows-latest
swtbot_task: testrun.swtbot_win32.win32.x86-64
- os: macos-latest
swtbot_task: testrun.swtbot_macosx.cocoa.aarch64
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 1

- name: Set up Java 21
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: '21'

- name: Run all Gradle tests
shell: bash
run: ./gradlew build --no-daemon

- name: Run SWTBot UI tests
shell: bash
run: |
gradle_tasks=(
:example.rcp.app.ui:jar
:example.rcp.app.ui.swtbot.tests:jar
:example.rcp.app.ui.swtbot.tests:${{ matrix.swtbot_task }}
)
if [[ "${{ runner.os }}" == "Linux" ]]; then
xvfb-run --auto-servernum ./gradlew "${gradle_tasks[@]}" --no-daemon
else
./gradlew "${gradle_tasks[@]}" --no-daemon
fi

- name: Upload test results and screenshots
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results-${{ runner.os }}
if-no-files-found: warn
path: |
**/reports/**
**/screenshots/**

start:
runs-on: ubuntu-latest
steps:
Expand Down
3 changes: 2 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ docker run -d -p 5800:5800 klibio/example.bnd.rcp
-include: ${workspace}/cnf/fixedIndices/bnd_buildpath_Eclipse_Platform.bndrun

-buildpath: \
${fea_org.eclipse.rcp_4.35.0.v20250228-0640},\
org.eclipse.e4.rcp;version='4.35.0.v20250228-0640';type=org.eclipse.update.feature,\
jakarta.inject.jakarta.inject-api,\
jakarta.annotation-api

Expand All @@ -114,6 +114,7 @@ Private-Package: \

**Rules**:
- Always use `${project.name}` macro — never hard-code `Bundle-SymbolicName`
- Eclipse features are first-class buildpath entries. Reference them with their bundle identity, exact version, and `type=org.eclipse.update.feature`; bnd expands their member bundles.
- Non-API packages → `Private-Package`; only published API → `Export-Package`
- Static resources (icons, CSS, model files) → `root/` directory, included via `-includeresource: ./root/`
- Maven POM generation is automatic (`-pom: true` in `cnf/build.bnd`) — do not add manual POM files
Expand Down
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ See the project [![Project](https://img.shields.io/badge/Project-Wiki-blueviolet
|------|---------|-------|
| Java JDK | 21 | Any distribution, e.g. [Eclipse Temurin](https://adoptium.net/). Must be on `PATH` or `JAVA_HOME` set. |
| Gradle | wrapper | `./gradlew` / `gradlew.bat` included — no separate install required. |
| bnd CLI | 7.3.0 | `biz.aQute.bnd-7.3.0.jar` is **committed to the workspace root** — no download needed. If you need to refresh it, download from [Maven Central](https://search.maven.org/artifact/biz.aQute.bnd/biz.aQute.bnd/7.3.0/jar) or [GitHub Releases](https://github.com/bndtools/bnd/releases/tag/7.3.0). |
| bnd CLI | 7.3.0 | Needed for the SWTBot command below. The Gradle build resolves bnd automatically; download the standalone jar from [Maven Central](https://search.maven.org/artifact/biz.aQute.bnd/biz.aQute.bnd/7.3.0/jar) or [GitHub Releases](https://github.com/bndtools/bnd/releases/tag/7.3.0). |
| Graphical display | — | Required for the SWTBot test suite (Windows desktop or X11 on Linux). |

## Build
Expand All @@ -52,28 +52,28 @@ See the project [![Project](https://img.shields.io/badge/Project-Wiki-blueviolet

## Run exported artifacts

After the export Gradle task completes, launch the product directly:
After the export Gradle task completes, launch the generated product directly:

```bash
# Linux — Eclipse 4 RCP product
./example.rcp.app.ui/_export/linux.gtk.x86-64/eclipse
./example.rcp.app.ui/generated/distributions/executable/eclipse

# Linux — Headless Equinox application
./example.rcp.headless/_export/linux.gtk.x86-64/eclipse
./example.rcp.headless/generated/distributions/executable/eclipse

# Linux — SWT dialog application
./example.rcp.ui/_export/linux.gtk.x86-64/eclipse
./example.rcp.ui/generated/distributions/executable/eclipse
```

On Windows, replace `eclipse` with `eclipse.exe` and the path token `linux.gtk.x86-64` with `win32.win32.x86-64`.
On Windows, replace `eclipse` with `eclipse.exe`.

## Run the test suite (SWTBot UI tests)

The SWTBot test suite launches the full Eclipse 4 RCP application in-process and exercises it through the SWTBot API.

```bash
# Windows — from the workspace root
java -jar biz.aQute.bnd-7.3.0.jar runtests \
java -jar /path/to/biz.aQute.bnd-7.3.0.jar runtests \
example.rcp.app.ui.swtbot.tests/swtbot_win32.win32.x86-64.bndrun

# Linux / macOS — substitute the matching .bndrun when available
Expand All @@ -89,18 +89,18 @@ java -jar biz.aQute.bnd-7.3.0.jar runtests \

| Path | Contents |
|------|----------|
| `reports/TEST-*.xml` | JUnit XML report (parsed by CI / IDEs) |
| `reports/TEST-*.html` | Human-readable HTML summary |
| `reports/summary.xml` | Run-level summary with duration |
| `reports/TEST-*.xml` | JUnit XML report (generated and parsed by CI / IDEs) |
| `reports/TEST-*.html` | Human-readable HTML summary (generated) |
| `reports/summary.xml` | Run-level summary with duration (generated) |
| `example.rcp.app.ui.swtbot.tests/screenshots/` | PNG screenshots captured at key test steps |

Screenshot filenames:
Screenshot filenames use these generated patterns:

| File | Captured at |
|------|-------------|
| `01_main_window_open.png` | After the main application shell becomes active |
| `02_table_verified.png` | After the Sample Part table row-count assertion passes |
| `03_before_quit.png` | Immediately before the File → Quit sequence |
| Pattern | Captured at |
|---------|-------------|
| `01_main_window_open_{screen,shell,swt}.png` | After the main application shell becomes active |
| `02_table_verified_{screen,shell,swt}.png` | After the Sample Part table row-count assertion passes |
| `03_before_quit_{screen,shell,swt}.png` | Immediately before the File → Quit sequence |

Screenshots persist across `osgi.clean=true` restarts because they are written outside the bnd-managed `_rt/` directory (resolved from the bundle jar location: `<project>/screenshots/`).

Expand Down
2 changes: 0 additions & 2 deletions cnf/.settings/org.eclipse.core.resources.prefs

This file was deleted.

Loading
Loading