|
1 | 1 | package net.seesharpsoft.intellij.plugins.csv.editor; |
2 | 2 |
|
3 | | -import com.intellij.ide.impl.convert.JDomConvertingUtil; |
4 | 3 | import com.intellij.openapi.editor.EditorSettings; |
5 | 4 | import com.intellij.openapi.fileEditor.*; |
6 | 5 | import com.intellij.openapi.fileEditor.ex.FileEditorProviderManager; |
7 | 6 | import com.intellij.openapi.fileEditor.impl.text.TextEditorState; |
8 | | -import com.intellij.openapi.util.JDOMUtil; |
9 | 7 | import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase; |
10 | | -import org.jetbrains.jps.model.serialization.JDomSerializationUtil; |
| 8 | +import org.jdom.Element; |
11 | 9 |
|
12 | 10 | public class CsvFileEditorTest extends LightCodeInsightFixtureTestCase { |
13 | 11 |
|
@@ -77,11 +75,12 @@ public void testCsvEditorStateReadsAndWritesStates() { |
77 | 75 |
|
78 | 76 | FileEditorProvider[] fileEditorProviders = FileEditorProviderManager.getInstance().getProviders(myFixture.getProject(), myFixture.getFile().getVirtualFile()); |
79 | 77 | CsvFileEditorProvider fileEditorProvider = (CsvFileEditorProvider)fileEditorProviders[0]; |
80 | | - |
81 | | - FileEditorState state = fileEditorProvider.readState(JDomConvertingUtil.createComponentElement(JDomSerializationUtil.COMPONENT_ELEMENT), this.getProject(), this.getFile().getVirtualFile()); |
| 78 | + Element dummy = new Element("dummy"); |
| 79 | + |
| 80 | + FileEditorState state = fileEditorProvider.readState(dummy, this.getProject(), this.getFile().getVirtualFile()); |
82 | 81 | assertInstanceOf(state, TextEditorState.class); |
83 | 82 | textEditor.setState(state); |
84 | | - fileEditorProvider.writeState(state, this.getProject(), JDomConvertingUtil.createComponentElement(JDomSerializationUtil.COMPONENT_ELEMENT)); |
| 83 | + fileEditorProvider.writeState(state, this.getProject(), dummy); |
85 | 84 |
|
86 | 85 | disposeTextEditor(textEditor); |
87 | 86 | } |
|
0 commit comments