mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-24 22:40:47 +00:00
#816 P-code not shown after selecting "class initializer" trait fixed
This commit is contained in:
@@ -138,8 +138,13 @@ public class ScriptPack extends AS3ClassTreeItem {
|
||||
}
|
||||
}
|
||||
|
||||
public void appendTo(GraphTextWriter writer, List<Trait> traits, ScriptExportMode exportMode, boolean parallel) throws InterruptedException {
|
||||
private void appendTo(GraphTextWriter writer, List<Trait> traits, ScriptExportMode exportMode, boolean parallel) throws InterruptedException {
|
||||
boolean first = true;
|
||||
for (int t : traitIndices) {
|
||||
if (!first) {
|
||||
writer.newLine();
|
||||
}
|
||||
|
||||
Trait trait = traits.get(t);
|
||||
Multiname name = trait.getName(abc);
|
||||
Namespace ns = name.getNamespace(abc.constants);
|
||||
@@ -148,6 +153,8 @@ public class ScriptPack extends AS3ClassTreeItem {
|
||||
} else {
|
||||
trait.toString(null, "", abc, false, exportMode, scriptIndex, -1, writer, new ArrayList<String>(), parallel);
|
||||
}
|
||||
|
||||
first = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -208,9 +208,9 @@ public final class MethodBody implements Cloneable {
|
||||
throw ex;
|
||||
} catch (Exception | OutOfMemoryError | StackOverflowError ex) {
|
||||
if (ex instanceof TimeoutException) {
|
||||
Logger.getLogger(MethodBody.class.getName()).log(Level.SEVERE, "Decompilation error in " + path, ex);
|
||||
} else {
|
||||
Logger.getLogger(MethodBody.class.getName()).log(Level.SEVERE, "Decompilation timeout in " + path, ex);
|
||||
} else {
|
||||
Logger.getLogger(MethodBody.class.getName()).log(Level.SEVERE, "Decompilation error in " + path, ex);
|
||||
}
|
||||
convertException = ex;
|
||||
Throwable cause = ex.getCause();
|
||||
|
||||
@@ -361,7 +361,6 @@ public class TraitClass extends Trait implements TraitWithSlot {
|
||||
@Override
|
||||
public GraphTextWriter toString(Trait parent, String path, ABC abc, boolean isStatic, ScriptExportMode exportMode, int scriptIndex, int classIndex, GraphTextWriter writer, List<String> fullyQualifiedNames, boolean parallel) throws InterruptedException {
|
||||
|
||||
writer.startClass(class_info);
|
||||
String packageName = abc.instance_info.get(class_info).getName(abc.constants).getNamespace(abc.constants).getName(abc.constants, false); //assume not null name
|
||||
List<String> namesInThisPackage = new ArrayList<>();
|
||||
for (ABCContainerTag tag : abc.getAbcTags()) {
|
||||
@@ -448,6 +447,8 @@ public class TraitClass extends Trait implements TraitWithSlot {
|
||||
writer.newLine();
|
||||
}
|
||||
|
||||
writer.startClass(class_info);
|
||||
|
||||
//class header
|
||||
abc.instance_info.get(class_info).getClassHeaderStr(writer, abc, fullyQualifiedNames, false);
|
||||
writer.startBlock();
|
||||
|
||||
+3
-3
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 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.
|
||||
*/
|
||||
|
||||
+3
-3
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 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.
|
||||
*/
|
||||
|
||||
@@ -720,9 +720,9 @@ public abstract class Action implements GraphSourceItem {
|
||||
throw ex;
|
||||
} catch (Exception | OutOfMemoryError | StackOverflowError ex) {
|
||||
if (ex instanceof TimeoutException) {
|
||||
logger.log(Level.SEVERE, "Decompilation error in: " + path, ex);
|
||||
} else {
|
||||
logger.log(Level.SEVERE, "Decompilation timeout in: " + path, ex);
|
||||
} else {
|
||||
logger.log(Level.SEVERE, "Decompilation error in: " + path, ex);
|
||||
}
|
||||
convertException = ex;
|
||||
Throwable cause = ex.getCause();
|
||||
|
||||
Reference in New Issue
Block a user