mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-27 02:40:43 +00:00
Fixed code style
This commit is contained in:
@@ -251,7 +251,7 @@ public abstract class GraphTextWriter {
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public GraphTextWriter addCurrentMethodData(HighlightData data) {
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ public class HighlightedTextWriter extends GraphTextWriter {
|
||||
instructionHilights.finish();
|
||||
specialHilights.finish();
|
||||
}
|
||||
|
||||
|
||||
public HighlightedTextWriter(CodeFormatting formatting, boolean hilight) {
|
||||
super(formatting);
|
||||
this.hilight = hilight;
|
||||
@@ -193,7 +193,7 @@ public class HighlightedTextWriter extends GraphTextWriter {
|
||||
appendNoHilight(text);
|
||||
return end(HighlightType.SPECIAL);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public HighlightedTextWriter appendWithData(String str, HighlightData data) {
|
||||
Highlighting h = null;
|
||||
@@ -310,7 +310,7 @@ public class HighlightedTextWriter extends GraphTextWriter {
|
||||
private HighlightedTextWriter start(HighlightData data, HighlightType type) {
|
||||
if (hilight) {
|
||||
Highlighting h = new Highlighting(sb.length() - newLineCount, data, type, null);
|
||||
hilightStack.add(h);
|
||||
hilightStack.add(h);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
@@ -378,7 +378,7 @@ public class HighlightedTextWriter extends GraphTextWriter {
|
||||
appendNoHilight(formatting.indentString);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public GraphTextWriter addCurrentMethodData(HighlightData data) {
|
||||
for (int i = hilightStack.size() - 1; i >= 0; i--) {
|
||||
|
||||
@@ -99,7 +99,7 @@ public class NulWriter extends GraphTextWriter {
|
||||
public NulWriter hilightSpecial(String text, HighlightSpecialType type, String specialValue, HighlightData data) {
|
||||
stringAdded = true;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public GraphTextWriter appendWithData(String str, HighlightData data) {
|
||||
@@ -130,7 +130,7 @@ public class NulWriter extends GraphTextWriter {
|
||||
stringAdded = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public NulWriter append(String str, long offset, long fileOffset) {
|
||||
stringAdded = true;
|
||||
|
||||
@@ -50,7 +50,7 @@ public class StreamTextWriter extends GraphTextWriter implements AutoCloseable {
|
||||
public GraphTextWriter hilightSpecial(String text, HighlightSpecialType type, String specialValue, HighlightData data) {
|
||||
writeToOutputStream(text);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public GraphTextWriter appendWithData(String str, HighlightData data) {
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ public class StringBuilderTextWriter extends GraphTextWriter {
|
||||
public GraphTextWriter hilightSpecial(String text, HighlightSpecialType type, String specialValue, HighlightData data) {
|
||||
writeToOutputStream(text);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public GraphTextWriter appendWithData(String str, HighlightData data) {
|
||||
|
||||
@@ -46,7 +46,7 @@ public class HighlightData implements Cloneable, Serializable {
|
||||
public int regIndex = -1;
|
||||
|
||||
public int namespaceIndex = -1;
|
||||
|
||||
|
||||
public int activationRegIndex = -1;
|
||||
|
||||
public boolean isStatic = false;
|
||||
|
||||
@@ -88,12 +88,12 @@ public class Highlighting implements Serializable {
|
||||
public static Highlighting searchPos(HighlightingList list, long pos) {
|
||||
return searchPos(list, pos, -1, -1);
|
||||
}
|
||||
|
||||
public static Highlighting searchPos(HighlightingList list, long pos, long from, long to) {
|
||||
|
||||
public static Highlighting searchPos(HighlightingList list, long pos, long from, long to) {
|
||||
return searchPosNew(list, pos, from, to);
|
||||
}
|
||||
|
||||
public static Highlighting searchPosNew(HighlightingList list, long pos, long from, long to) {
|
||||
public static Highlighting searchPosNew(HighlightingList list, long pos, long from, long to) {
|
||||
Highlighting[] hmap = posToHighlightMap(list);
|
||||
if (pos > -1) {
|
||||
if (pos >= hmap.length) {
|
||||
@@ -115,9 +115,7 @@ public class Highlighting implements Serializable {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*public static Highlighting searchPosOld(HighlightingList list, long pos, long from, long to) {
|
||||
|
||||
Highlighting ret = null;
|
||||
@@ -145,9 +143,8 @@ public class Highlighting implements Serializable {
|
||||
|
||||
return ret;
|
||||
}*/
|
||||
|
||||
private static final Map<HighlightingList, Highlighting[]> listToPosMap = new WeakHashMap<>();
|
||||
|
||||
|
||||
private static Highlighting[] posToHighlightMap(HighlightingList list) {
|
||||
if (list.isEmpty()) {
|
||||
return new Highlighting[0];
|
||||
|
||||
+5
-6
@@ -35,15 +35,14 @@ public class HighlightingList extends ArrayList<Highlighting> {
|
||||
|
||||
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();
|
||||
@@ -114,8 +113,8 @@ public class HighlightingList extends ArrayList<Highlighting> {
|
||||
public void clear() {
|
||||
checkWriteAccess();
|
||||
super.clear();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return System.identityHashCode(this);
|
||||
@@ -124,5 +123,5 @@ public class HighlightingList extends ArrayList<Highlighting> {
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
return o == this;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user