Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Leherbauer2008-03-14 13:52:25 +0000
committerAnton Leherbauer2008-03-14 13:52:25 +0000
commitf9ddd200f88eea28e9c97931c7c3df45aee77cd7 (patch)
treed25ad7df64c94dc0ae0ff78493c208c9d8b97655 /core/org.eclipse.cdt.ui.tests
parent16ba335d76501db8b859d21835b0b4ef7726fac4 (diff)
downloadorg.eclipse.cdt-f9ddd200f88eea28e9c97931c7c3df45aee77cd7.tar.gz
org.eclipse.cdt-f9ddd200f88eea28e9c97931c7c3df45aee77cd7.tar.xz
org.eclipse.cdt-f9ddd200f88eea28e9c97931c7c3df45aee77cd7.zip
222728: [editor] Register C/C++ editor with common hyperlinking preferences
Diffstat (limited to 'core/org.eclipse.cdt.ui.tests')
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/HyperlinkTest.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/HyperlinkTest.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/HyperlinkTest.java
index 5ebadb7b674..1d7fd28f5dc 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/HyperlinkTest.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/HyperlinkTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -19,8 +19,6 @@ import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.Region;
import org.eclipse.jface.text.hyperlink.IHyperlink;
-import org.eclipse.jface.text.hyperlink.IHyperlinkDetector;
-import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.cdt.core.dom.IPDOMManager;
import org.eclipse.cdt.core.model.ICContainer;
@@ -71,7 +69,7 @@ public class HyperlinkTest extends TestCase {
private ICProject project;
- private ITextEditor editor;
+ private CEditor editor;
public static TestSuite suite() {
@@ -96,9 +94,10 @@ public class HyperlinkTest extends TestCase {
}
private IHyperlink[] getHyperlinks(int mouseOffset) {
- IHyperlinkDetector detector = new CElementHyperlinkDetector(editor);
+ CElementHyperlinkDetector detector = new CElementHyperlinkDetector();
+ detector.setContext(editor);
IRegion region = new Region(mouseOffset, 0);
- return detector.detectHyperlinks(null, region, false);
+ return detector.detectHyperlinks(EditorTestHelper.getSourceViewer(editor), region, false);
}
private void assertHyperlink(int mouseOffset, int linkStartOffset, int linkLength) {

Back to the top