List of usage examples for org.eclipse.jdt.core.search IJavaSearchConstants DECLARATIONS
int DECLARATIONS
To view the source code for org.eclipse.jdt.core.search IJavaSearchConstants DECLARATIONS.
Click Source Link
From source file:org.eclipse.ajdt.core.tests.search.ITDAwareDeclarationSearchTests.java
License:Open Source License
public void testITDSearchMethodStringArgDeclaration3() throws Exception { createCU("Other.java", "abstract class Other { abstract void xxx(String x); }"); ICompilationUnit unit = createCU("Aspect.aj", "aspect Aspect {\n void Java.xxx(String x) { } }"); createCU("Java.java", "class Java extends Other { }"); IntertypeElement itd = findFirstITD(unit); List<SearchMatch> matches = findSearchMatches(itd, this.getName(), IJavaSearchConstants.DECLARATIONS); assertExpectedNumberOfMatches(1, matches); assertDeclarationMatches(itd, matches); }
From source file:org.eclipse.ajdt.core.tests.search.ITDAwareDeclarationSearchTests.java
License:Open Source License
public void testITDSearchMethodStringArgDeclaration4() throws Exception { ICompilationUnit unit = createCU("Aspect.aj", "aspect Aspect {\n void Java.xxx(String x) { } }"); createCU("Java.java", "class Java { }"); ICompilationUnit other = createCU("Other.java", "class Other extends Java { void xxx(String x) { } }"); IntertypeElement itd = findFirstITD(unit); IMember method = findFirstChild(other); List<SearchMatch> matches = findSearchMatches(method, this.getName(), IJavaSearchConstants.DECLARATIONS); assertExpectedNumberOfMatches(2, matches); assertDeclarationMatches(itd, matches); assertDeclarationMatches(method, matches); }
From source file:org.eclipse.ajdt.core.tests.search.ITDAwareDeclarationSearchTests.java
License:Open Source License
public void testITDSearchMethodStringArgDeclaration5() throws Exception { ICompilationUnit other = createCU("Other.java", "abstract class Other { abstract void xxx(String x); }"); ICompilationUnit unit = createCU("Aspect.aj", "aspect Aspect {\n void Java.xxx(String x) { } }"); createCU("Java.java", "class Java extends Other { }"); IntertypeElement itd = findFirstITD(unit); IMember method = findFirstChild(other); List<SearchMatch> matches = findSearchMatches(method, this.getName(), IJavaSearchConstants.DECLARATIONS); assertExpectedNumberOfMatches(2, matches); assertDeclarationMatches(itd, matches); assertDeclarationMatches(method, matches); }
From source file:org.eclipse.ajdt.core.tests.search.ITDAwareDeclarationSearchTests.java
License:Open Source License
public void testITDSearchMethodQualifiedArgDeclaration1() throws Exception { ICompilationUnit unit = createCU("Aspect.aj", "aspect Aspect {\n void Java.xxx(java.net.URL x) { } }"); createCU("Java.java", "class Java { }"); IntertypeElement itd = findFirstITD(unit); List<SearchMatch> matches = findSearchMatches(itd, this.getName(), IJavaSearchConstants.DECLARATIONS); assertExpectedNumberOfMatches(1, matches); assertDeclarationMatches(itd, matches); }
From source file:org.eclipse.ajdt.core.tests.search.ITDAwareDeclarationSearchTests.java
License:Open Source License
public void testITDSearchMethodQualifiedArgDeclaration2() throws Exception { ICompilationUnit unit = createCU("Aspect.aj", "aspect Aspect {\n void Java.xxx(java.net.URL x) { } }"); createCU("Java.java", "class Java { }"); ICompilationUnit other = createCU("Other.java", "class Other extends Java { void xxx(java.net.URL x) { } }"); IntertypeElement itd = findFirstITD(unit); IMember method = findFirstChild(other); List<SearchMatch> matches = findSearchMatches(itd, this.getName(), IJavaSearchConstants.DECLARATIONS); assertExpectedNumberOfMatches(2, matches); assertDeclarationMatches(itd, matches); assertDeclarationMatches(method, matches); }
From source file:org.eclipse.ajdt.core.tests.search.ITDAwareDeclarationSearchTests.java
License:Open Source License
public void testITDSearchMethodQualifiedArgDeclaration3() throws Exception { createCU("Other.java", "abstract class Other { abstract void xxx(java.net.URL x); }"); ICompilationUnit unit = createCU("Aspect.aj", "aspect Aspect {\n void Java.xxx(java.net.URL x) { } }"); createCU("Java.java", "class Java extends Other { }"); IntertypeElement itd = findFirstITD(unit); List<SearchMatch> matches = findSearchMatches(itd, this.getName(), IJavaSearchConstants.DECLARATIONS); assertExpectedNumberOfMatches(1, matches); assertDeclarationMatches(itd, matches); }
From source file:org.eclipse.ajdt.core.tests.search.ITDAwareDeclarationSearchTests.java
License:Open Source License
public void testITDSearchMethodQualifiedArgDeclaration4() throws Exception { ICompilationUnit unit = createCU("Aspect.aj", "aspect Aspect {\n void Java.xxx(java.net.URL x) { } }"); createCU("Java.java", "class Java { }"); ICompilationUnit other = createCU("Other.java", "class Other extends Java { void xxx(java.net.URL x) { } }"); IntertypeElement itd = findFirstITD(unit); IMember method = findFirstChild(other); List<SearchMatch> matches = findSearchMatches(method, this.getName(), IJavaSearchConstants.DECLARATIONS); assertExpectedNumberOfMatches(2, matches); assertDeclarationMatches(itd, matches); assertDeclarationMatches(method, matches); }
From source file:org.eclipse.ajdt.core.tests.search.ITDAwareDeclarationSearchTests.java
License:Open Source License
public void testITDSearchMethodQualifiedArgDeclaration5() throws Exception { ICompilationUnit other = createCU("Other.java", "abstract class Other { abstract void xxx(java.net.URL x); }"); ICompilationUnit unit = createCU("Aspect.aj", "aspect Aspect {\n void Java.xxx(java.net.URL x) { } }"); createCU("Java.java", "class Java extends Other { }"); IntertypeElement itd = findFirstITD(unit); IMember method = findFirstChild(other); List<SearchMatch> matches = findSearchMatches(method, this.getName(), IJavaSearchConstants.DECLARATIONS); assertExpectedNumberOfMatches(2, matches); assertDeclarationMatches(itd, matches); assertDeclarationMatches(method, matches); }
From source file:org.eclipse.ajdt.core.tests.search.ITDAwareDeclarationSearchTests.java
License:Open Source License
public void testITDSearchMethodGenericArgDeclaration1() throws Exception { ICompilationUnit unit = createCU("Aspect.aj", "aspect Aspect {\n void Java.xxx(java.util.List<String> x) { } }"); createCU("Java.java", "class Java { }"); IntertypeElement itd = findFirstITD(unit); List<SearchMatch> matches = findSearchMatches(itd, this.getName(), IJavaSearchConstants.DECLARATIONS); assertExpectedNumberOfMatches(1, matches); assertDeclarationMatches(itd, matches); }
From source file:org.eclipse.ajdt.core.tests.search.ITDAwareDeclarationSearchTests.java
License:Open Source License
public void testITDSearchMethodGenericArgDeclaration2() throws Exception { ICompilationUnit unit = createCU("Aspect.aj", "aspect Aspect {\n void Java.xxx(java.util.List<String> x) { } }"); createCU("Java.java", "class Java { }"); ICompilationUnit other = createCU("Other.java", "class Other extends Java { void xxx(java.util.List<String> x) { } }"); IntertypeElement itd = findFirstITD(unit); IMember method = findFirstChild(other); List<SearchMatch> matches = findSearchMatches(itd, this.getName(), IJavaSearchConstants.DECLARATIONS); assertExpectedNumberOfMatches(2, matches); assertDeclarationMatches(itd, matches); assertDeclarationMatches(method, matches); }