diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/treemodel/CommentTreeItem.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/treemodel/CommentTreeItem.java deleted file mode 100644 index 2c84c0ace..000000000 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/treemodel/CommentTreeItem.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2010-2013 JPEXS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.jpexs.decompiler.flash.abc.avm2.treemodel; - -import com.jpexs.decompiler.flash.abc.avm2.ConstantPool; -import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import java.util.HashMap; -import java.util.List; - -/** - * - * @author JPEXS - */ -public class CommentTreeItem extends TreeItem { - - public String comment; - - public CommentTreeItem(AVM2Instruction instruction, String comment) { - super(instruction, NOPRECEDENCE); - this.comment = comment; - } - - @Override - public String toString(ConstantPool constants, HashMap localRegNames, List fullyQualifiedNames) { - return "//" + comment; - } - - @Override - public boolean needsSemicolon() { - return false; - } -} diff --git a/trunk/src/com/jpexs/decompiler/flash/graph/Graph.java b/trunk/src/com/jpexs/decompiler/flash/graph/Graph.java index e4a27966d..1e162cf9d 100644 --- a/trunk/src/com/jpexs/decompiler/flash/graph/Graph.java +++ b/trunk/src/com/jpexs/decompiler/flash/graph/Graph.java @@ -16,7 +16,6 @@ */ package com.jpexs.decompiler.flash.graph; -import com.jpexs.decompiler.flash.abc.avm2.treemodel.CommentTreeItem; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.graph.cfg.BBType; import com.jpexs.decompiler.flash.graph.cfg.BasicBlock; @@ -473,7 +472,7 @@ public class Graph { return ret; } catch (StackOverflowError soe) { List ret =new ArrayList<>(); - ret.add(new CommentTreeItem(null, "StackOverflowError")); + ret.add(new CommentItem("StackOverflowError")); Logger.getLogger(Graph.class.getName()).log(Level.SEVERE, "error during printGraph", soe); return ret; } @@ -1932,8 +1931,12 @@ public class Graph { public static String graphToString(List tree, Object... localData) { StringBuilder ret = new StringBuilder(); List localDataList = new ArrayList<>(); - for (Object o : localData) { - localDataList.add(o); + if((localData.length==1)&&(localData[0] instanceof List)){ + localDataList=(List)localData[0]; + }else{ + for (Object o : localData) { + localDataList.add(o); + } } for (GraphTargetItem ti : tree) { if (!ti.isEmpty()) {