#676: extended logging for text import, imorpt logic moved to separated class, allow to ignore errors duting import

This commit is contained in:
2014-11-23 22:54:19 +01:00
parent abb3ec9dc7
commit 1cf0c28c74
61 changed files with 573 additions and 472 deletions
@@ -65,12 +65,12 @@ public class BMPFile extends Component {
public static void saveBitmap(Image image, File file) throws IOException {
BMPFile b = new BMPFile();
b.fo = new FileOutputStream(file);
try{
try {
b.save(image, image.getWidth(null), image.getHeight(null));
}finally{
try{
} finally {
try {
b.fo.close();
}catch(Exception ex){
} catch (Exception ex) {
//ignore
}
}
@@ -23,7 +23,7 @@ import java.io.Serializable;
* @author JPEXS
*/
public class HighlightData implements Cloneable, Serializable {
public boolean declaration;
public String declaredType;
@@ -37,13 +37,13 @@ public class HighlightData implements Cloneable, Serializable {
public long index;
public long offset;
public boolean isEmpty() {
return !declaration && declaredType == null && localName == null &&
subtype == null && specialValue == null &&
index == 0 && offset == 0;
return !declaration && declaredType == null && localName == null
&& subtype == null && specialValue == null
&& index == 0 && offset == 0;
}
public void merge(HighlightData data) {
if (data.declaration) {
declaration = data.declaration;
@@ -21,8 +21,8 @@ package com.jpexs.decompiler.flash.helpers.hilight;
* @author JPEXS
*/
public enum HighlightSpecialType {
PARAM_NAME, PARAM, OPTIONAL, RETURNS,
PARAM_NAME, PARAM, OPTIONAL, RETURNS,
TYPE_NAME, CLASS_NAME, METHOD_NAME,
TRAIT_TYPE, TRAIT_NAME, TRAIT_TYPE_NAME, TRAIT_VALUE,
SLOT_ID, DISP_ID,
@@ -112,7 +112,7 @@ public class Highlighting implements Serializable {
public static Highlighting searchOffset(List<Highlighting> list, long offset) {
return searchOffset(list, offset, -1, -1);
}
public static Highlighting searchOffset(List<Highlighting> list, long offset, long from, long to) {
looph:
for (Highlighting h : list) {
@@ -139,7 +139,7 @@ public class Highlighting implements Serializable {
public static Highlighting searchIndex(List<Highlighting> list, long index) {
return searchIndex(list, index, -1, -1);
}
public static Highlighting searchIndex(List<Highlighting> list, long index, long from, long to) {
looph:
for (Highlighting h : list) {