mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-24 23:40:45 +00:00
AS3 error highligter - show multiple errors
This commit is contained in:
@@ -16,11 +16,9 @@
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.gui.action;
|
||||
|
||||
import com.jpexs.decompiler.flash.gui.editor.VariableMarker;
|
||||
import com.jpexs.decompiler.flash.DisassemblyListener;
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.ValueTooLargeException;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.parser.script.ActionScript3SimpleParser;
|
||||
import com.jpexs.decompiler.flash.action.Action;
|
||||
import com.jpexs.decompiler.flash.action.ActionGraph;
|
||||
import com.jpexs.decompiler.flash.action.ActionList;
|
||||
@@ -60,6 +58,7 @@ import com.jpexs.decompiler.flash.gui.ViewMessages;
|
||||
import com.jpexs.decompiler.flash.gui.controls.JPersistentSplitPane;
|
||||
import com.jpexs.decompiler.flash.gui.controls.NoneSelectedButtonGroup;
|
||||
import com.jpexs.decompiler.flash.gui.editor.DebuggableEditorPane;
|
||||
import com.jpexs.decompiler.flash.gui.editor.VariableMarker;
|
||||
import com.jpexs.decompiler.flash.gui.tagtree.AbstractTagTreeModel;
|
||||
import com.jpexs.decompiler.flash.helpers.HighlightedText;
|
||||
import com.jpexs.decompiler.flash.helpers.HighlightedTextWriter;
|
||||
|
||||
@@ -162,6 +162,14 @@ public class VariableMarker implements SyntaxComponent, CaretListener, PropertyC
|
||||
private Token getNearestTokenAt(SyntaxDocument sDoc, int pos) {
|
||||
Token thisToken = sDoc.getTokenAt(pos);
|
||||
if (thisToken != null) {
|
||||
|
||||
if (thisToken.length == 1) {
|
||||
Token nextToken = sDoc.getTokenAt(pos + 1);
|
||||
if (nextToken != null && nextToken.start == pos && nextToken.length > 1) {
|
||||
return nextToken;
|
||||
}
|
||||
}
|
||||
|
||||
return thisToken;
|
||||
}
|
||||
|
||||
@@ -385,6 +393,7 @@ public class VariableMarker implements SyntaxComponent, CaretListener, PropertyC
|
||||
definitionPosToReferences.clear();
|
||||
referenceToDefinition.clear();
|
||||
errors.put((int) ex.position, ex.getMessage());
|
||||
ex.printStackTrace();
|
||||
}
|
||||
Timer tim = errorsTimer;
|
||||
if (tim != null) {
|
||||
|
||||
Reference in New Issue
Block a user