++
решение проблемы совместимости с java 1.8._4xx
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
package Common.Visual.Editor;
|
||||
import Common.MainModule_;
|
||||
import Common.Utils.Pair;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Visual.Menus.StyledPopupMenu;
|
||||
import Common.Visual.Menus.TextEditorMenu;
|
||||
import Common.Visual.Themes.ThemeElement;
|
||||
import Common.Visual.UI;
|
||||
import Common.Visual.Windows.Dialog.DialogFields;
|
||||
import _VisualDVM.Utils;
|
||||
import _VisualDVM.Visual.Syntax.SPFEditorTheme;
|
||||
import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea;
|
||||
|
||||
@@ -15,6 +17,7 @@ import java.awt.*;
|
||||
import java.awt.event.KeyAdapter;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.net.URI;
|
||||
import java.util.Vector;
|
||||
public class BaseEditor extends RSyntaxTextArea implements ThemeElement, DialogFields {
|
||||
protected final StyledPopupMenu menu;
|
||||
// protected int changesCount = 0;
|
||||
@@ -153,4 +156,20 @@ public class BaseEditor extends RSyntaxTextArea implements ThemeElement, DialogF
|
||||
menu.applyTheme();
|
||||
//меню связано с редактором. поэтому тема меняется только вместе с ним.
|
||||
}
|
||||
//--
|
||||
public Vector<Pair<Integer, Integer>> getErrorsForHightlight() {
|
||||
Vector<Pair<Integer, Integer>> res = new Vector<>();
|
||||
for (int i = 0; i < this.getLineCount(); ++i) {
|
||||
try {
|
||||
int start = getLineStartOffset(i);
|
||||
int end = getLineEndOffset(i);
|
||||
String line = this.getText(start, end);
|
||||
if (Utils.isCrushedLine(line))
|
||||
res.add(new Pair<>(start, end));
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user