mirror of
https://github.com/AppleCommander/AppleCommander.git
synced 2024-12-22 23:29:34 +00:00
Added canCompile metod to all FileEntry objects.
This commit is contained in:
parent
0cb572b961
commit
991b574427
@ -449,4 +449,11 @@ public class DosFileEntry implements FileEntry {
|
||||
public void setAddress(int address) {
|
||||
// FIXME - need to implement
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates that this filetype can be compiled.
|
||||
*/
|
||||
public boolean canCompile() {
|
||||
return isApplesoftBasicFile();
|
||||
}
|
||||
}
|
||||
|
@ -130,4 +130,14 @@ public interface FileEntry {
|
||||
* Set the address that this file loads at.
|
||||
*/
|
||||
public abstract void setAddress(int address);
|
||||
|
||||
/**
|
||||
* Indicates that this filetype can be compiled.
|
||||
* Compile is a somewhat arbitrary term, as the code may be
|
||||
* assembled.
|
||||
* NOTE: The current assumption is that the filetype is
|
||||
* AppleSoft. This should be updated to include Integer BASIC,
|
||||
* assembly, and potentially other languages.
|
||||
*/
|
||||
public abstract boolean canCompile();
|
||||
}
|
||||
|
@ -268,4 +268,11 @@ public class PascalFileEntry implements FileEntry {
|
||||
public void setAddress(int address) {
|
||||
// Does not apply.
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates that this filetype can be compiled.
|
||||
*/
|
||||
public boolean canCompile() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
@ -486,4 +486,11 @@ public class ProdosFileEntry extends ProdosCommonEntry implements FileEntry {
|
||||
setAuxiliaryType(fileEntry, address);
|
||||
writeFileEntry(fileEntry);
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates that this filetype can be compiled.
|
||||
*/
|
||||
public boolean canCompile() {
|
||||
return getDisk().canCompile(getFiletype());
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
@ -307,4 +307,13 @@ public class RdosFileEntry implements FileEntry {
|
||||
public void setAddress(int address) {
|
||||
// FIXME - need to implement
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates that this filetype can be compiled.
|
||||
* WARNING: RDOS programs most likely will not have the
|
||||
* DOS routines handled by the compiler.
|
||||
*/
|
||||
public boolean canCompile() {
|
||||
return isApplesoftBasicFile();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user