mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Made the project/module files to be written with the same separators they've been read in.
This commit is contained in:
@@ -315,7 +315,7 @@ public class FileDocumentManagerImpl extends FileDocumentManager implements Appl
|
||||
}
|
||||
|
||||
public String getLineSeparator(VirtualFile file, Project project) {
|
||||
String lineSeparator = file.getUserData(DETECTED_LINE_SEPARATOR_KEY);
|
||||
String lineSeparator = file != null ? file.getUserData(DETECTED_LINE_SEPARATOR_KEY) : null;
|
||||
if (lineSeparator == null) {
|
||||
CodeStyleSettingsManager settingsManager = project == null
|
||||
? CodeStyleSettingsManager.getInstance()
|
||||
|
||||
@@ -62,6 +62,10 @@ public class JDOMUtil {
|
||||
return w1.toString().equals(w2.toString());
|
||||
}
|
||||
|
||||
public static Document loadDocument(char[] chars, int length) throws IOException, JDOMException {
|
||||
SAXBuilder builder = createBuilder();
|
||||
return builder.build(new CharArrayReader(chars, 0, length));
|
||||
}
|
||||
|
||||
public static Document loadDocument(File file) throws JDOMException, IOException {
|
||||
SAXBuilder saxBuilder = createBuilder();
|
||||
|
||||
Reference in New Issue
Block a user