Skip to content
Open
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
56 changes: 20 additions & 36 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,15 @@ Each bundle contains:
- `src/` or `eclipseui/` - Java source code
- `.settings/` - Eclipse compiler settings

## Build System

### Critical Limitation

## Build System

Use the `-Pbuild-individual-bundles` profile:
### Building Individual Bundles

```bash
# Compile single bundle
mvn clean compile -pl :bundle-artifact-id -Pbuild-individual-bundles -q

# Example for building a single bundle
mvn clean verify -Pbuild-individual-bundles mvn clean verify -pl bundles/org.eclipse.ui -DskipTests
# Compile single bundle such as org.eclipse.jface
mvn clean compile -pl :org.eclipse.jface
```

### Test Properties

Expand All @@ -82,40 +78,26 @@ From `pom.xml`:
- `tycho.surefire.useUIThread=true` - Run tests on UI thread
- `failOnJavadocErrors=true` - Fail build on Javadoc errors

## Testing

### Running Tests

**⚠️ IMPORTANT:** Use `mvn verify` (NOT `mvn test`) for Tycho projects.
Due to Maven Tycho lifecycle binding, tests run in the `integration-test` phase, not the `test` phase. Running `mvn test` will NOT execute tests.

```bash
# Run tests for a specific test bundle from repository root
mvn clean verify -pl :org.eclipse.ui.tests -Pbuild-individual-bundles

# Run specific test class within a bundle
mvn clean verify -pl :org.eclipse.ui.tests -Pbuild-individual-bundles -Dtest=StructuredViewerTest
mvn clean verify -pl :org.eclipse.jface.tests

# Skip tests during compilation
mvn clean compile -Pbuild-individual-bundles -DskipTests
# Run a specific test class within a bundle
mvn clean verify -pl :org.eclipse.jface.tests -Dtest=ViewerTest
```

**Finding test bundles:** Test bundles mirror production bundles:
- Production: `bundles/org.eclipse.jface`
- Tests: `tests/org.eclipse.jface.tests`

### JUnit Guidelines

- Prefer JUnit 5 (`org.junit.jupiter.api.*`) for new tests

## Common Development Commands
If classes under test have been modified, include both the changed source bundle and the test bundle in `-pl`:
```bash
mvn clean verify -pl :org.eclipse.jface,:org.eclipse.jface.tests
```

### Compilation


# Compile and run tests
mvn clean test -pl :bundle-artifact-id -Pbuild-individual-bundles
```
## Development Hints

### Finding Code

Expand All @@ -130,9 +112,14 @@ cat bundles/org.eclipse.jface/META-INF/MANIFEST.MF
grep -r "pattern" bundles/org.eclipse.jface/src
```

## Git Commits
**Finding test bundles:** Test bundles mirror production bundles:
- Production: `bundles/org.eclipse.jface`
- Tests: `tests/org.eclipse.jface.tests`

### JUnit Guidelines

- Prefer JUnit 5 (`org.junit.jupiter.api.*`) for new tests

**Do NOT add `Co-Authored-By` or similar AI attribution trailers to commits.** This fails the Eclipse license check.

## Critical Development Rules

Expand Down Expand Up @@ -205,9 +192,6 @@ output.. = bin/

## Troubleshooting

### "Non-resolvable parent POM"
Expected when running `mvn verify` at root. Use `-Pbuild-individual-bundles` for individual bundles.

### "Package does not exist"
Check `META-INF/MANIFEST.MF` - add missing package to `Import-Package` or bundle to `Require-Bundle`.

Expand Down
Loading