-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Filtering unqualified Stacktraces #115
Using method name to filter unqualified stacktraces generated in java stacktrace console to provide more accurate search results. Fixes #115
- Loading branch information
Showing
12 changed files
with
1,221 additions
and
83 deletions.
There are no files selected for viewing
465 changes: 465 additions & 0 deletions
465
....tests/console tests/org/eclipse/jdt/debug/tests/console/JavaStackTraceAmbiguityTest.java
Large diffs are not rendered by default.
Oops, something went wrong.
32 changes: 32 additions & 0 deletions
32
org.eclipse.jdt.debug.tests/testfiles/AmbiguityTest/InnerClassTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2024 IBM Corporation. | ||
* | ||
* 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 | ||
*******************************************************************************/ | ||
/** | ||
* Test class | ||
*/ | ||
class InnerClassTest { | ||
public static void main(String[] ar) { | ||
|
||
} | ||
class innerL1 { | ||
void check2() { | ||
System.out.println("EXPECTED_INNERCLASS"); | ||
} | ||
class innerL2 { | ||
void check4() { | ||
System.out.println("EXPECTED_INNER-INNER_CLASS"); | ||
} | ||
} | ||
} | ||
} | ||
|
32 changes: 32 additions & 0 deletions
32
org.eclipse.jdt.debug.tests/testfiles/AmbiguityTest/MyScheduledExecutor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2024 IBM Corporation. | ||
* | ||
* 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 | ||
*******************************************************************************/ | ||
public class MyScheduledExecutor { | ||
public void executeTask() { | ||
Wor worker = new Wor(); | ||
} | ||
class Worker { | ||
public void doWork2(Wor w) { | ||
|
||
} | ||
public void doWorkParams(Wor w,Ran r) { | ||
System.out.println("Expected_Result"); | ||
} | ||
} | ||
class Wor { | ||
|
||
} | ||
class Ran { | ||
|
||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
org.eclipse.jdt.debug.tests/testfiles/AmbiguityTest/SampleGenerics.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2024 IBM Corporation. | ||
* | ||
* 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 | ||
*******************************************************************************/ | ||
/** | ||
* Test class | ||
*/ | ||
class Node<E> { | ||
E data; | ||
Node<E> next; | ||
Node(E data){}; | ||
} | ||
public class SampleGenerics<E> { | ||
private Node<E> head; | ||
public E remove() { | ||
System.out.print("EXPECTED_GENERICS"); | ||
return null; | ||
} | ||
|
||
} |
26 changes: 26 additions & 0 deletions
26
org.eclipse.jdt.debug.tests/testfiles/AmbiguityTest/a/MyScheduledExecutor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2024 IBM Corporation. | ||
* | ||
* 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 | ||
*******************************************************************************/ | ||
public class MyScheduledExecutor { | ||
public void executeTask() { | ||
Wor worker = new Wor(); | ||
} | ||
class Worker { | ||
public void doWork(Wor w) { | ||
System.out.println("Expected_Result"); | ||
} | ||
} | ||
class Wor { | ||
|
||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
org.eclipse.jdt.debug.tests/testfiles/AmbiguityTest/a/Sample.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2024 IBM Corporation. | ||
* | ||
* 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 a; | ||
import java.net.URL; | ||
/** | ||
* Test class | ||
*/ | ||
public class Sample { | ||
public static void main(String[] args) { | ||
System.out.println("Main Method"); | ||
test(); | ||
} | ||
public static void test() { | ||
System.out.println("Testing.."); | ||
} | ||
public void testMethod() { | ||
System.out.println("Random"); | ||
} | ||
public static void tes3(int x) { | ||
System.out.println("Expected_Single_Parameter"); | ||
} | ||
public void tes2() { | ||
|
||
} | ||
public static void tesComplex(String[] x, java.net.URL[] sx) { | ||
System.out.println("Expected_One_normal_&_One_fully_qualified"); | ||
} | ||
public void testBlank() { | ||
System.out.println("Expected_No_Signature"); | ||
} | ||
public void tes2(java.lang.Object... objects ) { | ||
|
||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
org.eclipse.jdt.debug.tests/testfiles/AmbiguityTest/b/InnerClassTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2024 IBM Corporation. | ||
* | ||
* 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 | ||
*******************************************************************************/ | ||
/** | ||
* Test class | ||
*/ | ||
class InnerClassTest { | ||
public static void main(String[] ar) { | ||
|
||
} | ||
class innerL1 { | ||
void check1() { | ||
System.out.println("EXPECTED_INNERCLASS"); | ||
} | ||
class innerL2 { | ||
void check23() { | ||
System.out.println("EXPECTED_INNER-INNER_CLASS"); | ||
} | ||
} | ||
} | ||
} | ||
|
42 changes: 42 additions & 0 deletions
42
org.eclipse.jdt.debug.tests/testfiles/AmbiguityTest/b/Sample.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2024 IBM Corporation. | ||
* | ||
* 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 b; | ||
|
||
/** | ||
* Test class | ||
*/ | ||
public class Sample { | ||
public static void main(String[] args) { | ||
System.out.println("Main Method"); | ||
test(); | ||
} | ||
public static void test() { | ||
System.out.println("Testing.."); | ||
} | ||
public void testMethod() { | ||
System.out.println("Random"); | ||
} | ||
public static void tes3() { | ||
System.out.println("Expected_Zero_Parameter"); | ||
} | ||
public void tes2() { | ||
|
||
} | ||
public static void tesComplex(java.lang.Object x, java.net.URL[] sx) { | ||
System.out.println("Expected_both_fully_qualified"); | ||
} | ||
public void tes2(java.lang.Object x,java.lang.Object... args ) { | ||
System.out.println("Expected_VarArgs"); | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
org.eclipse.jdt.debug.tests/testfiles/AmbiguityTest/c/InnerClassTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2024 IBM Corporation. | ||
* | ||
* 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 | ||
*******************************************************************************/ | ||
/** | ||
* Test class | ||
*/ | ||
class InnerClassTest { | ||
public static void main(String[] ar) { | ||
|
||
} | ||
class innerL1 { | ||
void check() { | ||
System.out.println("EXPECTED_INNERCLASS"); | ||
} | ||
class innerL2 { | ||
void check2() { | ||
System.out.println("EXPECTED_INNER-INNER_CLASS"); | ||
} | ||
} | ||
} | ||
} | ||
|
46 changes: 46 additions & 0 deletions
46
org.eclipse.jdt.debug.tests/testfiles/AmbiguityTest/c/Sample.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2024 IBM Corporation. | ||
* | ||
* 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 c; | ||
|
||
/** | ||
* Test class | ||
*/ | ||
public class Sample { | ||
public static void main(String[] args) { | ||
System.out.println("Main Method"); | ||
test(); | ||
} | ||
public static void test() { | ||
System.out.println("Testing.."); | ||
} | ||
public void testMethod() { | ||
System.out.println("Random"); | ||
} | ||
public static void tes3(int x, String v) { | ||
System.out.println("Expected_Multiple_Parameter"); | ||
} | ||
public static void tes3(int x, String v, Sample s) { | ||
System.out.println("Expected_Multiple_Parameter_Three"); | ||
} | ||
public void tes2() { | ||
|
||
} | ||
public void testMethod(Object s,Object... sd) { | ||
System.out.println("Expected_oneNormal&oneVarArgs"); | ||
} | ||
public void testMethod(Object... sd) { | ||
System.out.println("Expected_oneVarArgs"); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.