mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-26 09:40:43 +00:00
Fixed Incorrect debugger line numbers when "Open loaded while playing" is enabled
Fixed AS3 debugger - Slow injecting debug info - now faster
Fixed AS3 debugger - obfuscated classes debugging
Fixed Delayed open loaded SWFs while playing
Fixed AS3 Direct editation - script initializer for main document class
Changed Wrong unicode escape `{invalid_utf8:xxx}` changed to `{invalid_utf8=xxx}` for compatibility with file names
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
package com.jpexs.decompiler.flash.helpers;
|
||||
|
||||
import com.jpexs.decompiler.flash.helpers.hilight.Highlighting;
|
||||
import com.jpexs.decompiler.flash.helpers.hilight.HighlightingList;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -32,33 +33,33 @@ public class HighlightedText implements Serializable {
|
||||
|
||||
public String text;
|
||||
|
||||
private final List<Highlighting> traitHighlights;
|
||||
private final HighlightingList traitHighlights;
|
||||
|
||||
private final List<Highlighting> classHighlights;
|
||||
private final HighlightingList classHighlights;
|
||||
|
||||
private final List<Highlighting> methodHighlights;
|
||||
private final HighlightingList methodHighlights;
|
||||
|
||||
private final List<Highlighting> instructionHighlights;
|
||||
private final HighlightingList instructionHighlights;
|
||||
|
||||
private final List<Highlighting> specialHighlights;
|
||||
private final HighlightingList specialHighlights;
|
||||
|
||||
public List<Highlighting> getTraitHighlights() {
|
||||
public HighlightingList getTraitHighlights() {
|
||||
return traitHighlights;
|
||||
}
|
||||
|
||||
public List<Highlighting> getMethodHighlights() {
|
||||
public HighlightingList getMethodHighlights() {
|
||||
return methodHighlights;
|
||||
}
|
||||
|
||||
public List<Highlighting> getClassHighlights() {
|
||||
public HighlightingList getClassHighlights() {
|
||||
return classHighlights;
|
||||
}
|
||||
|
||||
public List<Highlighting> getInstructionHighlights() {
|
||||
public HighlightingList getInstructionHighlights() {
|
||||
return instructionHighlights;
|
||||
}
|
||||
|
||||
public List<Highlighting> getSpecialHighlights() {
|
||||
public HighlightingList getSpecialHighlights() {
|
||||
return specialHighlights;
|
||||
}
|
||||
|
||||
@@ -77,10 +78,10 @@ public class HighlightedText implements Serializable {
|
||||
|
||||
public HighlightedText(String text) {
|
||||
this.text = text;
|
||||
this.traitHighlights = new ArrayList<>();
|
||||
this.classHighlights = new ArrayList<>();
|
||||
this.methodHighlights = new ArrayList<>();
|
||||
this.instructionHighlights = new ArrayList<>();
|
||||
this.specialHighlights = new ArrayList<>();
|
||||
this.traitHighlights = new HighlightingList();
|
||||
this.classHighlights = new HighlightingList();
|
||||
this.methodHighlights = new HighlightingList();
|
||||
this.instructionHighlights = new HighlightingList();
|
||||
this.specialHighlights = new HighlightingList();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,10 +21,9 @@ import com.jpexs.decompiler.flash.helpers.hilight.HighlightData;
|
||||
import com.jpexs.decompiler.flash.helpers.hilight.HighlightSpecialType;
|
||||
import com.jpexs.decompiler.flash.helpers.hilight.HighlightType;
|
||||
import com.jpexs.decompiler.flash.helpers.hilight.Highlighting;
|
||||
import com.jpexs.decompiler.flash.helpers.hilight.HighlightingList;
|
||||
import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.helpers.Helper;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Stack;
|
||||
|
||||
/**
|
||||
@@ -50,16 +49,24 @@ public class HighlightedTextWriter extends GraphTextWriter {
|
||||
|
||||
private final Stack<Highlighting> hilightStack = new Stack<>();
|
||||
|
||||
public List<Highlighting> traitHilights = new ArrayList<>();
|
||||
public HighlightingList traitHilights = new HighlightingList();
|
||||
|
||||
public List<Highlighting> classHilights = new ArrayList<>();
|
||||
public HighlightingList classHilights = new HighlightingList();
|
||||
|
||||
public List<Highlighting> methodHilights = new ArrayList<>();
|
||||
public HighlightingList methodHilights = new HighlightingList();
|
||||
|
||||
public List<Highlighting> instructionHilights = new ArrayList<>();
|
||||
public HighlightingList instructionHilights = new HighlightingList();
|
||||
|
||||
public List<Highlighting> specialHilights = new ArrayList<>();
|
||||
public HighlightingList specialHilights = new HighlightingList();
|
||||
|
||||
public void finishHilights() {
|
||||
traitHilights.finish();
|
||||
classHilights.finish();
|
||||
methodHilights.finish();
|
||||
instructionHilights.finish();
|
||||
specialHilights.finish();
|
||||
}
|
||||
|
||||
public HighlightedTextWriter(CodeFormatting formatting, boolean hilight) {
|
||||
super(formatting);
|
||||
this.hilight = hilight;
|
||||
|
||||
+128
@@ -0,0 +1,128 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2023 JPEXS, All rights reserved.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 3.0 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.helpers.hilight;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.function.UnaryOperator;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class HighlightingList extends ArrayList<Highlighting> {
|
||||
|
||||
private boolean finished = false;
|
||||
|
||||
public void finish() {
|
||||
this.finished = true;
|
||||
}
|
||||
|
||||
public boolean isFinished() {
|
||||
return finished;
|
||||
}
|
||||
|
||||
|
||||
private void checkWriteAccess() {
|
||||
if (finished) {
|
||||
throw new RuntimeException("Cannot add to readonly list");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean add(Highlighting e) {
|
||||
checkWriteAccess();
|
||||
return super.add(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void add(int index, Highlighting element) {
|
||||
checkWriteAccess();
|
||||
super.add(index, element);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addAll(Collection<? extends Highlighting> c) {
|
||||
checkWriteAccess();
|
||||
return super.addAll(c);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addAll(int index, Collection<? extends Highlighting> c) {
|
||||
checkWriteAccess();
|
||||
return super.addAll(index, c);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean remove(Object o) {
|
||||
checkWriteAccess();
|
||||
return super.remove(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Highlighting remove(int index) {
|
||||
checkWriteAccess();
|
||||
return super.remove(index);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean removeAll(Collection<?> c) {
|
||||
checkWriteAccess();
|
||||
return super.removeAll(c);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean removeIf(Predicate<? super Highlighting> filter) {
|
||||
checkWriteAccess();
|
||||
return super.removeIf(filter);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void replaceAll(UnaryOperator<Highlighting> operator) {
|
||||
checkWriteAccess();
|
||||
super.replaceAll(operator);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void removeRange(int fromIndex, int toIndex) {
|
||||
checkWriteAccess();
|
||||
super.removeRange(fromIndex, toIndex);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean retainAll(Collection<?> c) {
|
||||
checkWriteAccess();
|
||||
return super.retainAll(c);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clear() {
|
||||
checkWriteAccess();
|
||||
super.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return System.identityHashCode(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
return o == this;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user