diff --git a/src/com/webcodepro/applecommander/storage/ProdosFormatDisk.java b/src/com/webcodepro/applecommander/storage/ProdosFormatDisk.java index c7b1ecb..5c34b62 100644 --- a/src/com/webcodepro/applecommander/storage/ProdosFormatDisk.java +++ b/src/com/webcodepro/applecommander/storage/ProdosFormatDisk.java @@ -1,6 +1,6 @@ /* * AppleCommander - An Apple ][ image utility. - * Copyright (C) 2002 by Robert Greene + * Copyright (C) 2002-3 by Robert Greene * robgreene at users.sourceforge.net * * This program is free software; you can redistribute it and/or modify it @@ -74,10 +74,12 @@ public class ProdosFormatDisk extends FormattedDisk { private byte type; private String string; private boolean addressRequired; - public ProdosFileType(byte type, String string, boolean addressRequired) { + private boolean canCompile; + public ProdosFileType(byte type, String string, boolean addressRequired, boolean canCompile) { this.type = type; this.string = string; this.addressRequired = addressRequired; + this.canCompile = canCompile; } public byte getType() { return type; @@ -88,6 +90,9 @@ public class ProdosFormatDisk extends FormattedDisk { public boolean needsAddress() { return addressRequired; } + public boolean canCompile() { + return canCompile; + } } /** @@ -151,7 +156,9 @@ public class ProdosFormatDisk extends FormattedDisk { } boolean addressRequired = Boolean.valueOf((String) properties.get( "filetype." + byt + ".address")).booleanValue(); - fileTypes[i] = new ProdosFileType((byte)i, string, addressRequired); + boolean canCompile = Boolean.valueOf((String) properties.get( + "filetype." + byt + ".compile")).booleanValue(); + fileTypes[i] = new ProdosFileType((byte)i, string, addressRequired, canCompile); } } catch (IOException ignored) { } @@ -908,4 +915,15 @@ public class ProdosFormatDisk extends FormattedDisk { } return false; } + + /** + * Indicates if this filetype can be compiled. + */ + public boolean canCompile(String filetype) { + ProdosFileType fileType = findFileType(filetype); + if (fileType != null) { + return fileType.canCompile(); + } + return false; + } }