mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-22 14:12:10 +02:00
Removed an unused constant.
This commit is contained in:
parent
d046e0a25f
commit
acef14f15d
1 changed files with 8 additions and 11 deletions
|
@ -6,7 +6,7 @@
|
||||||
* http://www.eclipse.org/legal/epl-v10.html
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Markus Schorn - initial API and implementation
|
* Markus Schorn - initial API and implementation
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.ui.tests.callhierarchy;
|
package org.eclipse.cdt.ui.tests.callhierarchy;
|
||||||
|
|
||||||
|
@ -37,7 +37,6 @@ import org.eclipse.cdt.internal.ui.callhierarchy.CallHierarchyUI;
|
||||||
import org.eclipse.cdt.internal.ui.editor.CEditor;
|
import org.eclipse.cdt.internal.ui.editor.CEditor;
|
||||||
|
|
||||||
public class CallHierarchyBaseTest extends BaseUITestCase {
|
public class CallHierarchyBaseTest extends BaseUITestCase {
|
||||||
protected static final int INDEXER_WAIT_TIME = 8000;
|
|
||||||
private static int sProjectCounter= 0;
|
private static int sProjectCounter= 0;
|
||||||
|
|
||||||
protected ICProject fCProject;
|
protected ICProject fCProject;
|
||||||
|
@ -51,7 +50,7 @@ public class CallHierarchyBaseTest extends BaseUITestCase {
|
||||||
protected void setUp() throws Exception {
|
protected void setUp() throws Exception {
|
||||||
super.setUp();
|
super.setUp();
|
||||||
CallHierarchyUI.setIsJUnitTest(true);
|
CallHierarchyUI.setIsJUnitTest(true);
|
||||||
String prjName= "chTest"+sProjectCounter++;
|
String prjName= "chTest" + sProjectCounter++;
|
||||||
fCProject= CProjectHelper.createCCProject(prjName, "bin", IPDOMManager.ID_FAST_INDEXER);
|
fCProject= CProjectHelper.createCCProject(prjName, "bin", IPDOMManager.ID_FAST_INDEXER);
|
||||||
waitForIndexer(fCProject);
|
waitForIndexer(fCProject);
|
||||||
fIndex= CCorePlugin.getIndexManager().getIndex(fCProject);
|
fIndex= CCorePlugin.getIndexManager().getIndex(fCProject);
|
||||||
|
@ -66,7 +65,7 @@ public class CallHierarchyBaseTest extends BaseUITestCase {
|
||||||
protected void tearDown() throws Exception {
|
protected void tearDown() throws Exception {
|
||||||
// Set ShowReferencedBy back to its default value
|
// Set ShowReferencedBy back to its default value
|
||||||
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
|
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
|
||||||
CHViewPart ch= (CHViewPart)page.findView(CUIPlugin.ID_CALL_HIERARCHY);
|
CHViewPart ch= (CHViewPart) page.findView(CUIPlugin.ID_CALL_HIERARCHY);
|
||||||
if (ch != null) {
|
if (ch != null) {
|
||||||
ch.onSetShowReferencedBy(true);
|
ch.onSetShowReferencedBy(true);
|
||||||
}
|
}
|
||||||
|
@ -100,7 +99,7 @@ public class CallHierarchyBaseTest extends BaseUITestCase {
|
||||||
protected void openCallHierarchy(CEditor editor, boolean showReferencedBy) throws InterruptedException {
|
protected void openCallHierarchy(CEditor editor, boolean showReferencedBy) throws InterruptedException {
|
||||||
openCallHierarchy(editor);
|
openCallHierarchy(editor);
|
||||||
IWorkbenchPage page = editor.getSite().getPage();
|
IWorkbenchPage page = editor.getSite().getPage();
|
||||||
CHViewPart ch= (CHViewPart)page.findView(CUIPlugin.ID_CALL_HIERARCHY);
|
CHViewPart ch= (CHViewPart) page.findView(CUIPlugin.ID_CALL_HIERARCHY);
|
||||||
assertNotNull(ch);
|
assertNotNull(ch);
|
||||||
ch.onSetShowReferencedBy(showReferencedBy);
|
ch.onSetShowReferencedBy(showReferencedBy);
|
||||||
runEventQueue(0);
|
runEventQueue(0);
|
||||||
|
@ -110,8 +109,8 @@ public class CallHierarchyBaseTest extends BaseUITestCase {
|
||||||
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
|
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
|
||||||
runEventQueue(0);
|
runEventQueue(0);
|
||||||
CHViewPart ch= null;
|
CHViewPart ch= null;
|
||||||
for (int i=0; i<50; i++) {
|
for (int i= 0; i < 50; i++) {
|
||||||
ch= (CHViewPart)page.findView(CUIPlugin.ID_CALL_HIERARCHY);
|
ch= (CHViewPart) page.findView(CUIPlugin.ID_CALL_HIERARCHY);
|
||||||
if (ch != null)
|
if (ch != null)
|
||||||
break;
|
break;
|
||||||
runEventQueue(10);
|
runEventQueue(10);
|
||||||
|
@ -122,7 +121,7 @@ public class CallHierarchyBaseTest extends BaseUITestCase {
|
||||||
protected TreeItem checkTreeNode(TreeItem root, int i1, String label) {
|
protected TreeItem checkTreeNode(TreeItem root, int i1, String label) {
|
||||||
TreeItem item= null;
|
TreeItem item= null;
|
||||||
try {
|
try {
|
||||||
for (int i=0; i<200; i++) {
|
for (int i= 0; i < 200; i++) {
|
||||||
item= root.getItem(i1);
|
item= root.getItem(i1);
|
||||||
try {
|
try {
|
||||||
String text= item.getText();
|
String text= item.getText();
|
||||||
|
@ -134,8 +133,7 @@ public class CallHierarchyBaseTest extends BaseUITestCase {
|
||||||
}
|
}
|
||||||
runEventQueue(10);
|
runEventQueue(10);
|
||||||
}
|
}
|
||||||
}
|
} catch (IllegalArgumentException e) {
|
||||||
catch (IllegalArgumentException e) {
|
|
||||||
assertNull("Tree node " + label + " does not exist!", label);
|
assertNull("Tree node " + label + " does not exist!", label);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -143,5 +141,4 @@ public class CallHierarchyBaseTest extends BaseUITestCase {
|
||||||
assertEquals(label, item.getText());
|
assertEquals(label, item.getText());
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue