Link Here
|
17 |
import junit.framework.Test; |
17 |
import junit.framework.Test; |
18 |
import junit.framework.TestSuite; |
18 |
import junit.framework.TestSuite; |
19 |
|
19 |
|
|
|
20 |
import org.eclipse.core.runtime.NullProgressMonitor; |
20 |
import org.eclipse.jface.text.BadLocationException; |
21 |
import org.eclipse.jface.text.BadLocationException; |
21 |
import org.eclipse.jface.text.IDocument; |
22 |
import org.eclipse.jface.text.IDocument; |
22 |
import org.eclipse.jface.text.IRegion; |
23 |
import org.eclipse.jface.text.IRegion; |
Link Here
|
35 |
|
36 |
|
36 |
import org.eclipse.cdt.core.model.ICProject; |
37 |
import org.eclipse.cdt.core.model.ICProject; |
37 |
import org.eclipse.cdt.core.testplugin.CProjectHelper; |
38 |
import org.eclipse.cdt.core.testplugin.CProjectHelper; |
|
|
39 |
import org.eclipse.cdt.ui.CUIPlugin; |
40 |
import org.eclipse.cdt.ui.PreferenceConstants; |
38 |
import org.eclipse.cdt.ui.tests.BaseUITestCase; |
41 |
import org.eclipse.cdt.ui.tests.BaseUITestCase; |
39 |
import org.eclipse.cdt.ui.tests.text.Accessor; |
42 |
import org.eclipse.cdt.ui.tests.text.Accessor; |
40 |
import org.eclipse.cdt.ui.tests.text.EditorTestHelper; |
43 |
import org.eclipse.cdt.ui.tests.text.EditorTestHelper; |
Link Here
|
92 |
protected void setUp() throws Exception { |
95 |
protected void setUp() throws Exception { |
93 |
super.setUp(); |
96 |
super.setUp(); |
94 |
fCProject= EditorTestHelper.createCProject(PROJECT, LINKED_FOLDER); |
97 |
fCProject= EditorTestHelper.createCProject(PROJECT, LINKED_FOLDER); |
95 |
|
98 |
CUIPlugin.getDefault().getPreferenceStore().setValue(PreferenceConstants.REMOVE_TRAILING_WHITESPACE, false); |
96 |
AbstractTextEditor fEditor= (CEditor) EditorTestHelper.openInEditor(ResourceTestHelper.findFile(fTestFilename), true); |
99 |
AbstractTextEditor fEditor= (CEditor) EditorTestHelper.openInEditor(ResourceTestHelper.findFile(fTestFilename), true); |
97 |
fSourceViewer= EditorTestHelper.getSourceViewer(fEditor); |
100 |
fSourceViewer= EditorTestHelper.getSourceViewer(fEditor); |
98 |
// source positions depend on Windows line separator |
101 |
// source positions depend on Windows line separator |
99 |
adjustLineSeparator(fSourceViewer.getDocument(), "\r\n"); |
102 |
adjustLineSeparator(fSourceViewer.getDocument(), "\r\n"); |
|
|
103 |
fEditor.doSave(new NullProgressMonitor()); |
100 |
assertTrue(EditorTestHelper.joinReconciler(fSourceViewer, 0, 10000, 100)); |
104 |
assertTrue(EditorTestHelper.joinReconciler(fSourceViewer, 0, 10000, 100)); |
101 |
} |
105 |
} |
102 |
|
106 |
|