Skip to content

Commit 8ab8d4d

Browse files
SougandhSiloveeclipsemerksHannesWellsubyssurendran666
authored
Merge Master to BETA_JAVA25 (#703)
* Touch bundles affected by compiler changes See eclipse-platform/eclipse.platform.releng.aggregator#2995 * Don't use Display.syncExec() for refresh in RuntimeClasspathViewer The listener may be called from a background thread that already holds some locks. To refresh RuntimeClasspathViewer UI in the current case, syncExec is not needed, asyncExec is enough and it would not acquire the UI lock from an unknown thread. Fixes #672 * Force qualifier update to fix build failure eclipse-platform/eclipse.platform.releng.aggregator#3006 * [Build] Migrate to new tycho-apitools log and list maven issues Also make sure the issues are published even in case of a failed build, as otherwise they are not visualized and improve order of post-actions. Additionally record maven issues, but don't add a quality-gate for them. * Fixed Trigger point disabled automatically (#667) The trigger point is being disabled during debugging when a conditional breakpoint is hit. Fixes: #546 * Regression fix in (#688) #608 Invalid links generated with multiple spaces Fixes : #687 * Disable on hit for Breakpoints (#682) Disable on Hit feature is now supported for all breakpoints except trigger points Fixes: #680 * Add SVGs to org.eclipse.jdt.debug Bundles (#678) * add all svgs to eclipse.jdt.debug bundles This commit adds SVGs for all icons in the bundle `org.eclipse.jdt.debug.ui` except for the following as these are not available as SVG yet: obj16/groupedframe.svg obj16/javastacktrace_console.svg obj16/jexcept_obj.svg Referenced icons from `org.eclipse.debug.ui` were also changed to SVG as these already exist. Please note that `JDT Debug` also has the following missing SVGs in other bundles: org.eclipse.jdt.launching.ui.macosx/icons/full/ctool16/exportappbundle_wiz.xvg org.eclipse.jdt.launching.ui.macosx/icons/full/wizban/exportapp_wiz.xvg org.eclipse.jdt.debug.setup - JDTDebugConfiguration.setup uses the following link: `https://www.eclipse.org/downloads/images/committers.png` * Remove explicit disabled icons from org.eclipse.jdt.debug.ui Use on-the-fly-generated disabled version of SVG-rasterized icons instead. Hardcoded disabled entries in class `JavaDebugImages` can't be removed as other classes depend on them. These entries use a specific disabled icon variant which also exists as SVG. * Modify existing behaviour of opening Exception Stack trace (#698) Add option for navigating to exception types in editor instead of directly creating or modifying exception breakpoints on clicking exception types from console Fix: #670 * Additional handling for Disable on Hit (#699) This commit moves disable on hit check to JDIThread class + uncheck the option when disabled * Method Breakpoint does not recognised when set at end of a method (#700) This PR fixes the issue where breakpoints set at method closing braces did not created exit method breakpoints Fix: #697 --------- Co-authored-by: Andrey Loskutov <loskutov@gmx.de> Co-authored-by: Ed Merks <ed.merks@gmail.com> Co-authored-by: Hannes Wellmann <wellmann.hannes1@gmx.net> Co-authored-by: Suby S Surendran <suby.surendran@ibm.com> Co-authored-by: Michael Bangas <102024826+Michael5601@users.noreply.github.com>
1 parent ed5a6f0 commit 8ab8d4d

116 files changed

Lines changed: 40514 additions & 200 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Jenkinsfile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,16 @@ pipeline {
3737
// The following lines use the newest build on master that did not fail a reference
3838
// To not fail master build on failed test maven needs to be started with "-Dmaven.test.failure.ignore=true" it will then only marked unstable.
3939
// To not fail the build also "unstable: true" is used to only mark the build unstable instead of failing when qualityGates are missed
40-
// Also do not record mavenConsole() as failing tests are logged with ERROR duplicating the failure into the "Maven" plugin
4140
// To accept unstable builds (test errors or new warnings introduced by third party changes) as reference using "ignoreQualityGate:true"
4241
// To only show warnings related to the PR on a PR using "publishAllIssues:false"
43-
// The eclipse compiler name is changed because the logfile not only contains ECJ but also API warnings.
44-
// "pattern:" is used to collect warnings in dedicated files avoiding output of junit tests treated as warnings
45-
junit '**/target/surefire-reports/*.xml'
4642
discoverGitReferenceBuild referenceJob: 'eclipse.jdt.debug-github/master'
47-
recordIssues publishAllIssues:false, ignoreQualityGate:true, tool: eclipse(name: 'Compiler and API Tools', pattern: '**/target/compilelogs/*.xml'), qualityGates: [[threshold: 1, type: 'DELTA', unstable: true]]
48-
recordIssues publishAllIssues:false, ignoreQualityGate:true, tool: javaDoc(), qualityGates: [[threshold: 1, type: 'DELTA', unstable: true]]
43+
junit allowEmptyResults: true, testResults: '**/target/surefire-reports/*.xml'
44+
recordIssues publishAllIssues: false, ignoreQualityGate: true, enabledForFailure: true, tools: [
45+
eclipse(name: 'Compiler', pattern: '**/target/compilelogs/*.xml'),
46+
issues(name: 'API Tools', id: 'apitools', pattern: '**/target/apianalysis/*.xml'),
47+
javaDoc(),
48+
], qualityGates: [[threshold: 1, type: 'DELTA', unstable: true]]
49+
recordIssues tools: [mavenConsole()]
4950
}
5051
}
5152
}

org.eclipse.jdt.debug.tests/console tests/org/eclipse/jdt/debug/tests/console/JavaStackTraceAmbiguityTest.java

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,59 @@ public void testLinkNavigationTrueForLinksWithMultiSpaceBeforeSignature() throws
488488
project.getProject().delete(force, new NullProgressMonitor());
489489
}
490490
}
491+
492+
public void testLinkNavigationTrueForLinksWithTimeStamps1() throws Exception {
493+
String projectName = "StackTest";
494+
IJavaProject project = createProject(projectName, "testfiles/AmbiguityTest/", JavaProjectHelper.JAVA_SE_1_8_EE_NAME, false);
495+
waitForBuild();
496+
waitForJobs();
497+
consoleDocumentWithText("250420 12:59:13.999 (SampleGenerics.java:25) Hello");
498+
IHyperlink[] hyperlinks = fConsole.getHyperlinks();
499+
assertEquals("Wrong hyperlinks, listing all links: " + allLinks(), 1, hyperlinks.length);
500+
String expectedText = "System.out.print(\"EXPECTED_GENERICS\");";
501+
try {
502+
for (IHyperlink hyperlink : hyperlinks) {
503+
closeAllEditors();
504+
hyperlink.linkActivated();
505+
IEditorPart editor = waitForEditorOpen();
506+
String[] selectedText = new String[1];
507+
sync(() -> selectedText[0] = getSelectedText(editor));
508+
selectedText[0] = selectedText[0].trim();
509+
assertEquals("Wrong text selected after hyperlink navigation", expectedText, selectedText[0]);
510+
511+
}
512+
} finally {
513+
closeAllEditors();
514+
boolean force = true;
515+
project.getProject().delete(force, new NullProgressMonitor());
516+
}
517+
}
518+
public void testLinkNavigationTrueForLinksWithTimeStamps2() throws Exception {
519+
String projectName = "StackTest";
520+
IJavaProject project = createProject(projectName, "testfiles/AmbiguityTest/", JavaProjectHelper.JAVA_SE_1_8_EE_NAME, false);
521+
waitForBuild();
522+
waitForJobs();
523+
consoleDocumentWithText("2025-04-20 12.01.23 (SampleGenerics.java:25) Hello");
524+
IHyperlink[] hyperlinks = fConsole.getHyperlinks();
525+
assertEquals("Wrong hyperlinks, listing all links: " + allLinks(), 1, hyperlinks.length);
526+
String expectedText = "System.out.print(\"EXPECTED_GENERICS\");";
527+
try {
528+
for (IHyperlink hyperlink : hyperlinks) {
529+
closeAllEditors();
530+
hyperlink.linkActivated();
531+
IEditorPart editor = waitForEditorOpen();
532+
String[] selectedText = new String[1];
533+
sync(() -> selectedText[0] = getSelectedText(editor));
534+
selectedText[0] = selectedText[0].trim();
535+
assertEquals("Wrong text selected after hyperlink navigation", expectedText, selectedText[0]);
536+
537+
}
538+
} finally {
539+
closeAllEditors();
540+
boolean force = true;
541+
project.getProject().delete(force, new NullProgressMonitor());
542+
}
543+
}
491544
private void waitForJobs() throws Exception {
492545
TestUtil.waitForJobs(getName(), 250, 10_000);
493546
}

org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/AutomatedSuite.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import org.eclipse.jdt.debug.tests.breakpoints.ConditionalBreakpointsWithFileClass;
3434
import org.eclipse.jdt.debug.tests.breakpoints.ConditionalBreakpointsWithGenerics;
3535
import org.eclipse.jdt.debug.tests.breakpoints.DeferredBreakpointTests;
36+
import org.eclipse.jdt.debug.tests.breakpoints.DisableOnHitTest;
3637
import org.eclipse.jdt.debug.tests.breakpoints.ExceptionBreakpointTests;
3738
import org.eclipse.jdt.debug.tests.breakpoints.HitCountBreakpointsTests;
3839
import org.eclipse.jdt.debug.tests.breakpoints.ImportBreakpointsTest;
@@ -403,6 +404,7 @@ public AutomatedSuite() {
403404
addTest(new TestSuite(JavaThreadEventHandlerTests.class));
404405
addTest(new TestSuite(ConditionalBreakpointsWithFileClass.class));
405406
addTest(new TestSuite(CompareObjectsTest.class));
407+
addTest(new TestSuite(DisableOnHitTest.class));
406408

407409
if (JavaProjectHelper.isJava8Compatible()) {
408410
addTest(new TestSuite(TestToggleBreakpointsTarget8.class));
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2025 IBM Corporation and others.
3+
*
4+
* This program and the accompanying materials
5+
* are made available under the terms of the Eclipse Public License 2.0
6+
* which accompanies this distribution, and is available at
7+
* https://www.eclipse.org/legal/epl-2.0/
8+
*
9+
* SPDX-License-Identifier: EPL-2.0
10+
*
11+
* Contributors:
12+
* IBM Corporation - initial API and implementation
13+
*******************************************************************************/
14+
package org.eclipse.jdt.debug.tests.breakpoints;
15+
16+
import org.eclipse.jdt.debug.core.IJavaLineBreakpoint;
17+
import org.eclipse.jdt.debug.core.IJavaThread;
18+
import org.eclipse.jdt.debug.tests.AbstractDebugTest;
19+
20+
/**
21+
* Tests for disable on hit breakpoints.
22+
*/
23+
24+
public class DisableOnHitTest extends AbstractDebugTest {
25+
26+
/**
27+
* Constructor
28+
*
29+
* @param name
30+
* the name of the test
31+
*/
32+
public DisableOnHitTest(String name) {
33+
super(name);
34+
}
35+
36+
public void testBreakpointHitWith() throws Exception {
37+
String typeName = "TriggerPoint_01";
38+
IJavaLineBreakpoint bp1 = createLineBreakpoint(19, typeName);
39+
IJavaLineBreakpoint bp2 = createLineBreakpoint(20, typeName);
40+
bp1.setDisableOnHit(true);
41+
IJavaThread thread = null;
42+
try {
43+
thread = launchToBreakpoint(typeName);
44+
thread.resume();
45+
boolean isBp1Disabled = bp1.isEnabled();
46+
assertFalse("Breakpoint should be disabled after hit", isBp1Disabled);
47+
bp1.delete();
48+
bp2.delete();
49+
} finally {
50+
terminateAndRemove(thread);
51+
removeAllBreakpoints();
52+
}
53+
}
54+
55+
public void testBreakpointHitWithout() throws Exception {
56+
String typeName = "TriggerPoint_01";
57+
IJavaLineBreakpoint bp1 = createLineBreakpoint(19, typeName);
58+
IJavaLineBreakpoint bp2 = createLineBreakpoint(20, typeName);
59+
IJavaThread thread = null;
60+
try {
61+
thread = launchToBreakpoint(typeName);
62+
thread.resume();
63+
boolean isBp1Disabled = bp1.isEnabled();
64+
assertTrue("Breakpoint should be not be disabled after hit", isBp1Disabled);
65+
bp1.delete();
66+
bp2.delete();
67+
} finally {
68+
terminateAndRemove(thread);
69+
removeAllBreakpoints();
70+
}
71+
}
72+
}

org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/TriggerPointBreakpointsTests.java

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,11 @@
1313
*******************************************************************************/
1414
package org.eclipse.jdt.debug.tests.breakpoints;
1515

16+
import org.eclipse.debug.core.ILaunch;
17+
import org.eclipse.debug.core.model.IBreakpoint;
1618
import org.eclipse.debug.core.model.IVariable;
1719
import org.eclipse.jdt.debug.core.IJavaBreakpoint;
20+
import org.eclipse.jdt.debug.core.IJavaDebugTarget;
1821
import org.eclipse.jdt.debug.core.IJavaLineBreakpoint;
1922
import org.eclipse.jdt.debug.core.IJavaPrimitiveValue;
2023
import org.eclipse.jdt.debug.core.IJavaStackFrame;
@@ -135,4 +138,33 @@ public void testTriggerPointBreakpointWithResumeAndConditionAsTrue() throws Exce
135138
removeAllBreakpoints();
136139
}
137140
}
141+
142+
// see bug : https://github.com/eclipse-jdt/eclipse.jdt.debug/issues/546
143+
public void testTriggerPointAutoEnableAfterConditionalBp() throws Exception {
144+
String typeName = "TriggerPoint_01";
145+
IJavaLineBreakpoint bp1 = createLineBreakpoint(20, typeName);
146+
IJavaLineBreakpoint bp2 = createLineBreakpoint(21, typeName);
147+
bp1.setTriggerPoint(true);
148+
bp2.setCondition("true");
149+
bp2.setConditionEnabled(true);
150+
bp2.setConditionSuspendOnTrue(true);
151+
IJavaThread thread = null;
152+
try {
153+
thread = launchToBreakpoint(typeName);
154+
IJavaStackFrame frame = (IJavaStackFrame) thread.getTopStackFrame();
155+
int lineNumber = frame.getLineNumber();
156+
assertEquals("Breakpoint should hit at triggeroint", 20, lineNumber);
157+
IJavaDebugTarget debugTarget = (IJavaDebugTarget) thread.getDebugTarget();
158+
ILaunch launch = debugTarget.getLaunch();
159+
thread.getLaunch().terminate();
160+
Thread.sleep(3000);
161+
IBreakpoint[] bps = getBreakpointManager().getBreakpoints();
162+
boolean enabledStatus = bps[0].isEnabled();
163+
assertTrue("Trigger point should be enabled after termination", enabledStatus);
164+
getLaunchManager().removeLaunch(launch);
165+
} finally {
166+
terminateAndRemove(thread);
167+
removeAllBreakpoints();
168+
}
169+
}
138170
}

org.eclipse.jdt.debug.ui/META-INF/MANIFEST.MF

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,4 @@ Require-Bundle: org.eclipse.ui.ide;bundle-version="[3.5.0,4.0.0)",
5454
Bundle-ActivationPolicy: lazy
5555
Bundle-RequiredExecutionEnvironment: JavaSE-21
5656
Automatic-Module-Name: org.eclipse.jdt.debug.ui
57+
Require-Capability: eclipse.swt;filter:="(image.format=svg)"

org.eclipse.jdt.debug.ui/forceQualifierUpdate.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,6 @@ https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/issues/13
99
https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/issues/1659
1010
https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/issues/1781
1111
https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/issues/1923
12-
https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/issues/1979
12+
https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/issues/1979
13+
https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/issues/2995
14+
https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/issues/3006

0 commit comments

Comments
 (0)