mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-26 15:10:51 +00:00
AS3 p-code - Docs for all levels of path
blue highlighted path
This commit is contained in:
@@ -8,6 +8,7 @@ import com.jpexs.helpers.utf8.Utf8Helper;
|
||||
import java.io.InputStream;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
import java.util.ResourceBundle;
|
||||
@@ -37,14 +38,10 @@ public class As3PCodeOtherDocs extends AbstractDocs {
|
||||
return v;
|
||||
}
|
||||
|
||||
String docStr = "";
|
||||
String pathNoTrait = path;
|
||||
if (path.startsWith("trait.method")) {
|
||||
pathNoTrait = path.substring("trait.".length());
|
||||
}
|
||||
if (prop.containsKey(pathNoTrait)) {
|
||||
docStr = prop.getString(pathNoTrait);
|
||||
}
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (standalone) {
|
||||
@@ -56,7 +53,32 @@ public class As3PCodeOtherDocs extends AbstractDocs {
|
||||
sb.append(" class=\"otherdoc\"");
|
||||
sb.append(">");
|
||||
|
||||
sb.append(docStr);
|
||||
String pathParts[] = new String[]{path};
|
||||
if (path.contains(".")) {
|
||||
pathParts = path.split("\\.");
|
||||
}
|
||||
for (int i = 0; i < pathParts.length; i++) {
|
||||
String curPath = String.join(".", Arrays.copyOf(pathParts, i + 1));
|
||||
if (curPath.startsWith("trait.method")) {
|
||||
curPath = path.substring("trait.".length());
|
||||
}
|
||||
if (prop.containsKey(curPath)) {
|
||||
String docStr = prop.getString(curPath);
|
||||
sb.append("<div class=\"path-block\">");
|
||||
for (int j = 0; j < i; j++) {
|
||||
sb.append(" ");
|
||||
sb.append(" ");
|
||||
}
|
||||
sb.append("<span class=\"path\">");
|
||||
sb.append(pathParts[i]);
|
||||
sb.append("</span>");
|
||||
sb.append(" ");
|
||||
sb.append("<span class=\"path-docs\">");
|
||||
sb.append(docStr);
|
||||
sb.append("</span>");
|
||||
sb.append("</div>");
|
||||
}
|
||||
}
|
||||
|
||||
sb.append("</");
|
||||
sb.append(standalone ? "body" : "div"); //.instruction
|
||||
|
||||
@@ -14,3 +14,6 @@ body {font-family: serif;}
|
||||
h1, h2, h3, h4, h5 {font-family: sans-serif;}
|
||||
.instruction-signature {font-family: "Courier New", monospace; font-size: 1.05em;}
|
||||
.filter {font-family: sans-serif; }
|
||||
.path {font-weight: bold; color: blue;}
|
||||
.path-block {}
|
||||
.path-docs {}
|
||||
Reference in New Issue
Block a user