small fixes

This commit is contained in:
honfika@gmail.com
2014-12-01 00:13:48 +01:00
parent 9125a5abd4
commit 77b8ef808a
10 changed files with 31 additions and 22 deletions

View File

@@ -169,7 +169,7 @@ public final class MethodBody implements Cloneable {
getCode().toASMSource(constants, trait, method_info.get(this.method_info), this, exportMode, writer);
} else {
if (!Configuration.decompile.get()) {
writer.appendNoHilight("//" + AppResources.translate("decompilation.skipped")).newLine();
writer.appendNoHilight(Helper.getDecompilationSkippedComment()).newLine();
return;
}
int timeout = Configuration.decompilationTimeoutSingleMethod.get();
@@ -209,7 +209,7 @@ public final class MethodBody implements Cloneable {
} else {
if (!Configuration.decompile.get()) {
//writer.startMethod(this.method_info);
writer.appendNoHilight("//" + AppResources.translate("decompilation.skipped")).newLine();
writer.appendNoHilight(Helper.getDecompilationSkippedComment()).newLine();
//writer.endMethod();
return writer;
}

View File

@@ -32,7 +32,7 @@ public class UnsupportedActionItem extends ActionItem {
@Override
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) {
return writer.append("//" + AppResources.translate("decompilation.unsupported") + ":" + value);
return writer.append("// " + AppResources.translate("decompilation.unsupported") + ":" + value);
}
@Override

View File

@@ -16,6 +16,7 @@
*/
package com.jpexs.decompiler.flash.tags.base;
import com.jpexs.decompiler.flash.treeitems.TreeItem;
import com.jpexs.decompiler.flash.types.sound.SoundFormat;
import java.io.InputStream;
import java.util.List;
@@ -24,7 +25,7 @@ import java.util.List;
*
* @author JPEXS
*/
public interface SoundTag {
public interface SoundTag extends TreeItem {
public String getExportFormat();

View File

@@ -35,7 +35,7 @@ public class MarkItem extends GraphTargetItem {
@Override
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) {
return writer.append("//" + AppResources.translate("decompilerMark") + ":" + mark);
return writer.append("// " + AppResources.translate("decompilerMark") + ":" + mark);
}
public String getMark() {

View File

@@ -12,7 +12,8 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
* License along with this library.
*/
package com.jpexs.helpers;
import java.util.ArrayList;
@@ -40,13 +41,12 @@ public abstract class CancellableWorker<T> implements RunnableFuture<T> {
public CancellableWorker() {
super();
super();
Callable<T> callable
= new Callable<T>() {
@Override
public T call() throws Exception {
return doInBackground();
}
Callable<T> callable = new Callable<T>() {
@Override
public T call() throws Exception {
return doInBackground();
}
};
future = new FutureTask<T>(callable) {
@Override

View File

@@ -794,6 +794,10 @@ public class Helper {
}
}
public static String getDecompilationSkippedComment() {
return "// " + AppResources.translate("decompilation.skipped");
}
public static void appendTimeoutComment(GraphTextWriter writer, int timeout) {
writer.appendNoHilight("/*").newLine();
writer.appendNoHilight(" * ").appendNoHilight(AppResources.translate("decompilationError")).newLine();