Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Schindl2015-06-19 09:08:40 +0000
committerTom Schindl2015-06-19 09:08:40 +0000
commit5b25227758172e96b1c3a65cec1313f92aa80c11 (patch)
tree0966505c438f8e54b6c6f0a2657840287f3f1186 /experimental
parent2a7667a40d62014b943f2edb6e6b301863aff528 (diff)
downloadorg.eclipse.efxclipse-5b25227758172e96b1c3a65cec1313f92aa80c11.tar.gz
org.eclipse.efxclipse-5b25227758172e96b1c3a65cec1313f92aa80c11.tar.xz
org.eclipse.efxclipse-5b25227758172e96b1c3a65cec1313f92aa80c11.zip
remove hack to replace tabs
Diffstat (limited to 'experimental')
-rw-r--r--experimental/compensator/org.eclipse.fx.code.compensator.editor/src/org/eclipse/fx/code/compensator/editor/internal/FileInput.java13
1 files changed, 3 insertions, 10 deletions
diff --git a/experimental/compensator/org.eclipse.fx.code.compensator.editor/src/org/eclipse/fx/code/compensator/editor/internal/FileInput.java b/experimental/compensator/org.eclipse.fx.code.compensator.editor/src/org/eclipse/fx/code/compensator/editor/internal/FileInput.java
index c564553c1..ffb94d7b1 100644
--- a/experimental/compensator/org.eclipse.fx.code.compensator.editor/src/org/eclipse/fx/code/compensator/editor/internal/FileInput.java
+++ b/experimental/compensator/org.eclipse.fx.code.compensator.editor/src/org/eclipse/fx/code/compensator/editor/internal/FileInput.java
@@ -10,7 +10,6 @@
*******************************************************************************/
package org.eclipse.fx.code.compensator.editor.internal;
-import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.nio.file.Files;
@@ -27,6 +26,7 @@ import org.eclipse.fx.code.compensator.editor.TextEditor;
import org.eclipse.fx.code.compensator.editor.URIProvider;
import org.eclipse.fx.code.compensator.editor.services.ContentTypeDetector;
import org.eclipse.fx.core.URI;
+import org.eclipse.fx.core.Util;
import org.eclipse.fx.core.di.Service;
public class FileInput implements Input<String>, ContentTypeProvider, URIProvider {
@@ -48,15 +48,8 @@ public class FileInput implements Input<String>, ContentTypeProvider, URIProvide
@Override
public String getData() {
if( data == null ) {
- try(BufferedReader reader = Files.newBufferedReader(path)) {
- StringBuilder b = new StringBuilder();
- String line;
- while( (line = reader.readLine()) != null ) {
- //FIXME We need to replace TABs for now
- b.append(line.replaceAll("\t", " ")+"\n");
- }
- reader.close();
- data = b.toString();
+ try {
+ data = Util.slurpFileContent(path);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();

Back to the top