Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
da9fbe4
Tempmaster2 (#31)
carstenartur Oct 14, 2025
d459839
Merge branch 'eclipse-jdt:master' into master
carstenartur Oct 18, 2025
f4e7b6f
Merge branch 'eclipse-jdt:master' into master
carstenartur Oct 26, 2025
2a92e5d
Merge branch 'eclipse-jdt:master' into master
carstenartur Nov 23, 2025
ff98667
Merge branch 'eclipse-jdt:master' into master
carstenartur Dec 7, 2025
bed9329
Merge branch 'eclipse-jdt:master' into master
carstenartur Dec 14, 2025
92191e1
Merge branch 'eclipse-jdt:master' into master
carstenartur Dec 20, 2025
ef4aa4f
Update CI to JDK 21 for Tycho 5.0.0 compatibility (#33)
Copilot Dec 20, 2025
a638db9
Align Tycho version to 5.0.1 in extensions.xml (#34)
Copilot Dec 20, 2025
8acb85d
Unify Tycho version to 5.0.1 across all POMs (#35)
Copilot Dec 20, 2025
4739ba4
Fix Maven/Tycho configuration for CI builds (#36)
Copilot Dec 20, 2025
23d7d5d
Initial plan (#37)
Copilot Dec 20, 2025
eccd74d
Downgrade Tycho from 5.0.1 to 5.0.0 to fix build failure (#39)
Copilot Dec 20, 2025
0aca2df
Upgrade Tycho from 5.0.0 to 5.0.1 to fix build ProvisionException (#40)
Copilot Dec 20, 2025
8c82f28
Add missing .mvn/extensions.xml for Tycho pomless extension (#38)
Copilot Dec 20, 2025
50eae99
Merge branch 'eclipse-jdt:master' into master
carstenartur Dec 24, 2025
cc7728f
Merge branch 'eclipse-jdt:master' into master
carstenartur Dec 31, 2025
4d8b8e3
Initial plan
Copilot Dec 31, 2025
92d4c57
Add JUnit Quick Assist Processor for disabling/enabling tests
Copilot Jan 1, 2026
68d174b
Fix code review issues: remove redundancy, add message fields, optimi…
Copilot Jan 1, 2026
9445656
Remove duplicate JUNIT4_TEST_ANNOTATION constant
Copilot Jan 1, 2026
f63f8bb
Address final code review issues: remove unused import, fix edit orde…
Copilot Jan 1, 2026
ec213e1
Apply import edits before AST edits to avoid position conflicts
Copilot Jan 1, 2026
df7e4ff
Add comprehensive JUnit tests for Quick Assist Processor
Copilot Jan 1, 2026
fa9b3bc
Add support for parameterized and other JUnit 5 test annotations
Copilot Jan 1, 2026
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
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "maven" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
67 changes: 67 additions & 0 deletions .github/workflows/codacy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# This workflow checks out code, performs a Codacy security scan
# and integrates the results with the
# GitHub Advanced Security code scanning feature. For more information on
# the Codacy security scan action usage and parameters, see
# https://github.com/codacy/codacy-analysis-cli-action.
# For more information on Codacy Analysis CLI in general, see
# https://github.com/codacy/codacy-analysis-cli.

name: Codacy Security Scan

on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '24 8 * * 2'

permissions:
contents: read

jobs:
codacy-security-scan:
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
name: Codacy Security Scan
runs-on: ubuntu-latest
steps:
# Checkout the repository to the GitHub Actions runner
- name: Checkout code
uses: actions/checkout@v4

# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
- name: Run Codacy Analysis CLI
uses: codacy/codacy-analysis-cli-action@d840f886c4bd4edc059706d09c6a1586111c540b
# uses: codacy/codacy-analysis-cli-action@33d455949345bddfdb845fba76b57b70cc83754b
env:
CODEQL_ACTION_EXTRA_OPTIONS: '{"database":{"interpret-results":["--max-paths", 1]}}'

with:
# Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
# You can also omit the token and run the tools that support default configurations
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
verbose: true
output: results.sarif
format: sarif
# Adjust severity of non-security issues
gh-code-scanning-compat: true
# Force 0 exit code to allow SARIF file generation
# This will handover control about PR rejection to the GitHub side
max-allowed-issues: 2147483647




# Upload the SARIF file generated in the previous step
- name: Upload SARIF results file
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: results.sarif
71 changes: 67 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,76 @@
name: CodeQL call

# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ "master" ]
branches: [ master ]
pull_request:
branches: [ "master" ]
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '15 8 * * 1'
- cron: '20 9 * * 2'

jobs:
callCodeQLworkflow:
uses: eclipse-platform/eclipse.platform.releng.aggregator/.github/workflows/codeQLworkflow.yml@master
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'java' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Maven
uses: stCarolas/setup-maven@d6af6abeda15e98926a57b5aa970a96bb37f97d1 # v5
with:
maven-version: 3.9.5
- name: Setup Java JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '21'

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# For Tycho/Eclipse projects, we need to use explicit Maven build instead
- name: Build with Maven
run: mvn -B package -Pbuild-individual-bundles --file pom.xml

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
env:
CODEQL_ACTION_EXTRA_OPTIONS: '{"database":{"interpret-results":["--max-paths", 1]}}'
31 changes: 31 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Java CI with Maven

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: maven
- name: Set up Maven
uses: stCarolas/setup-maven@d6af6abeda15e98926a57b5aa970a96bb37f97d1 # v5
with:
maven-version: 3.9.5
- name: Build with Maven
# run: mvn -B package -Dmaven.resolver.transport=wagon -Pbuild-individual-bundles --file pom.xml
run: mvn -B package -Pbuild-individual-bundles --file pom.xml
4 changes: 2 additions & 2 deletions .github/workflows/rebase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the latest code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
- name: Automatic Rebase
uses: cirrus-actions/rebase@1.7
uses: cirrus-actions/rebase@1.8
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .mvn/extensions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<extension>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-build</artifactId>
<version>5.0.0</version>
<version>5.0.1</version>
</extension>
</extensions>
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
# JDT UI

[![Java CI with Maven](https://github.com/carstenartur/eclipse.jdt.ui/actions/workflows/maven.yml/badge.svg)](https://github.com/carstenartur/eclipse.jdt.ui/actions/workflows/maven.yml)

[![Check Code Freeze Period](https://github.com/carstenartur/eclipse.jdt.ui/actions/workflows/verifyFreezePeriod.yml/badge.svg)](https://github.com/carstenartur/eclipse.jdt.ui/actions/workflows/verifyFreezePeriod.yml)

[![CodeQL](https://github.com/carstenartur/eclipse.jdt.ui/actions/workflows/codeql.yml/badge.svg)](https://github.com/carstenartur/eclipse.jdt.ui/actions/workflows/codeql.yml)

[![Codacy Security Scan](https://github.com/carstenartur/eclipse.jdt.ui/actions/workflows/codacy.yml/badge.svg)](https://github.com/carstenartur/eclipse.jdt.ui/actions/workflows/codacy.yml)

Thanks for your interest in this project.

This is the UI part of Eclipse's Java development tools, the user interface for the Java IDE.
This includes views like Package Explorer and JUnit, the Java and properties files editors, Java search, and refactorings.


For more information and important links, refer to the [JDT wiki page](https://github.com/eclipse-jdt/eclipse.jdt.core/wiki) or the [JDT project overview page](https://projects.eclipse.org/projects/eclipse.jdt).


Expand Down
1 change: 1 addition & 0 deletions org.eclipse.jdt.junit/plugin.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ providerName=Eclipse.org

testRunListeners.name= Test Run Listeners
junitQuickFixProcessor= JUnit Quick Fix Processor
junitQuickAssistProcessor= JUnit Quick Assist Processor
junitClasspathFixProcessor= JUnit Classpath Fix Processor

junitLaunchConfigs.name= JUnit Launch Configurations
Expand Down
9 changes: 9 additions & 0 deletions org.eclipse.jdt.junit/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,15 @@
</quickFixProcessor>
</extension>

<extension
point="org.eclipse.jdt.ui.quickAssistProcessors">
<quickAssistProcessor
name="%junitQuickAssistProcessor"
class="org.eclipse.jdt.internal.junit.ui.JUnitQuickAssistProcessor"
id="org.eclipse.jdt.junit.JUnitQuickAssistProcessor">
</quickAssistProcessor>
</extension>

<extension
point="org.eclipse.jdt.ui.classpathFixProcessors">
<classpathFixProcessor
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
/*******************************************************************************
* Copyright (c) 2025 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.jdt.internal.junit.ui;

import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;

import org.eclipse.core.runtime.CoreException;

import org.eclipse.text.edits.TextEdit;

import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.contentassist.IContextInformation;

import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.dom.AST;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jdt.core.dom.MethodDeclaration;
import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
import org.eclipse.jdt.core.dom.rewrite.ImportRewrite;
import org.eclipse.jdt.core.dom.rewrite.ListRewrite;

import org.eclipse.jdt.ui.CodeStyleConfiguration;
import org.eclipse.jdt.ui.ISharedImages;
import org.eclipse.jdt.ui.JavaUI;
import org.eclipse.jdt.ui.text.java.IInvocationContext;
import org.eclipse.jdt.ui.text.java.IJavaCompletionProposal;

public class AddAnnotationProposal implements IJavaCompletionProposal {

private final IInvocationContext fContext;
private final MethodDeclaration fMethodDecl;
private final String fAnnotationQualifiedName;
private final String fAnnotationSimpleName;

public AddAnnotationProposal(IInvocationContext context, MethodDeclaration methodDecl, String annotationQualifiedName, String annotationSimpleName) {
fContext = context;
fMethodDecl = methodDecl;
fAnnotationQualifiedName = annotationQualifiedName;
fAnnotationSimpleName = annotationSimpleName;
}

@Override
public void apply(IDocument document) {
try {
CompilationUnit astRoot = fContext.getASTRoot();
ICompilationUnit cu = fContext.getCompilationUnit();

AST ast = astRoot.getAST();
ASTRewrite rewrite = ASTRewrite.create(ast);

// Add the annotation
org.eclipse.jdt.core.dom.MarkerAnnotation annotation = ast.newMarkerAnnotation();
annotation.setTypeName(ast.newName(fAnnotationSimpleName));

ListRewrite listRewrite = rewrite.getListRewrite(fMethodDecl, MethodDeclaration.MODIFIERS2_PROPERTY);
listRewrite.insertFirst(annotation, null);

// Add import
ImportRewrite importRewrite = CodeStyleConfiguration.createImportRewrite(astRoot, true);
importRewrite.addImport(fAnnotationQualifiedName);

// Apply changes - imports first, then AST rewrite
TextEdit importEdit = importRewrite.rewriteImports(null);
TextEdit rewriteEdit = rewrite.rewriteAST(document, cu.getOptions(true));

importEdit.apply(document);
rewriteEdit.apply(document);

} catch (CoreException | BadLocationException e) {
JUnitPlugin.log(e);
}
}

@Override
public String getAdditionalProposalInfo() {
return java.text.MessageFormat.format(JUnitMessages.JUnitQuickAssistProcessor_add_annotation_info, fAnnotationSimpleName);
}

@Override
public IContextInformation getContextInformation() {
return null;
}

@Override
public String getDisplayString() {
return java.text.MessageFormat.format(JUnitMessages.JUnitQuickAssistProcessor_add_annotation_description, fAnnotationSimpleName);
}

@Override
public Image getImage() {
return JavaUI.getSharedImages().getImage(ISharedImages.IMG_OBJS_ANNOTATION);
}

@Override
public Point getSelection(IDocument document) {
return null;
}

@Override
public int getRelevance() {
return 10;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,14 @@ public final class JUnitMessages extends NLS {

public static String JUnitQuickFixProcessor_add_assert_info;

public static String JUnitQuickAssistProcessor_add_annotation_description;

public static String JUnitQuickAssistProcessor_add_annotation_info;

public static String JUnitQuickAssistProcessor_remove_annotation_description;

public static String JUnitQuickAssistProcessor_remove_annotation_info;

public static String JUnitViewEditorLauncher_dialog_title;

public static String JUnitViewEditorLauncher_error_occurred;
Expand Down
Loading
Loading