mirror of
https://github.com/AppleCommander/AppleCommander.git
synced 2024-12-22 23:29:34 +00:00
Added detection of Merlin assembly files.
This commit is contained in:
parent
66a3f52faf
commit
163dd10769
@ -29,6 +29,7 @@ import com.webcodepro.applecommander.storage.FileEntry;
|
|||||||
import com.webcodepro.applecommander.storage.FileFilter;
|
import com.webcodepro.applecommander.storage.FileFilter;
|
||||||
import com.webcodepro.applecommander.storage.FormattedDisk;
|
import com.webcodepro.applecommander.storage.FormattedDisk;
|
||||||
import com.webcodepro.applecommander.storage.filters.ApplesoftFileFilter;
|
import com.webcodepro.applecommander.storage.filters.ApplesoftFileFilter;
|
||||||
|
import com.webcodepro.applecommander.storage.filters.AssemblySourceFileFilter;
|
||||||
import com.webcodepro.applecommander.storage.filters.BinaryFileFilter;
|
import com.webcodepro.applecommander.storage.filters.BinaryFileFilter;
|
||||||
import com.webcodepro.applecommander.storage.filters.GraphicsFileFilter;
|
import com.webcodepro.applecommander.storage.filters.GraphicsFileFilter;
|
||||||
import com.webcodepro.applecommander.storage.filters.IntegerBasicFileFilter;
|
import com.webcodepro.applecommander.storage.filters.IntegerBasicFileFilter;
|
||||||
@ -388,6 +389,8 @@ public class DosFileEntry implements FileEntry {
|
|||||||
return new ApplesoftFileFilter();
|
return new ApplesoftFileFilter();
|
||||||
} else if (isIntegerBasicFile()) {
|
} else if (isIntegerBasicFile()) {
|
||||||
return new IntegerBasicFileFilter();
|
return new IntegerBasicFileFilter();
|
||||||
|
} else if (isAssemblySourceFile()) {
|
||||||
|
return new AssemblySourceFileFilter();
|
||||||
} else if (isTextFile()) {
|
} else if (isTextFile()) {
|
||||||
return new TextFileFilter();
|
return new TextFileFilter();
|
||||||
} else if (isBinaryFile()) {
|
} else if (isBinaryFile()) {
|
||||||
@ -406,6 +409,16 @@ public class DosFileEntry implements FileEntry {
|
|||||||
}
|
}
|
||||||
return new BinaryFileFilter();
|
return new BinaryFileFilter();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine if this is an assembly source code file.
|
||||||
|
*/
|
||||||
|
public boolean isAssemblySourceFile() {
|
||||||
|
boolean rightFiletype = isTextFile() || isBinaryFile();
|
||||||
|
if (rightFiletype && getFilename().endsWith(".S")) return true;
|
||||||
|
if (rightFiletype && getFilename().startsWith("T.")) return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine if this is a text file.
|
* Determine if this is a text file.
|
||||||
|
@ -33,6 +33,7 @@ import com.webcodepro.applecommander.storage.filters.AppleWorksDataBaseFileFilte
|
|||||||
import com.webcodepro.applecommander.storage.filters.AppleWorksSpreadSheetFileFilter;
|
import com.webcodepro.applecommander.storage.filters.AppleWorksSpreadSheetFileFilter;
|
||||||
import com.webcodepro.applecommander.storage.filters.AppleWorksWordProcessorFileFilter;
|
import com.webcodepro.applecommander.storage.filters.AppleWorksWordProcessorFileFilter;
|
||||||
import com.webcodepro.applecommander.storage.filters.ApplesoftFileFilter;
|
import com.webcodepro.applecommander.storage.filters.ApplesoftFileFilter;
|
||||||
|
import com.webcodepro.applecommander.storage.filters.AssemblySourceFileFilter;
|
||||||
import com.webcodepro.applecommander.storage.filters.BinaryFileFilter;
|
import com.webcodepro.applecommander.storage.filters.BinaryFileFilter;
|
||||||
import com.webcodepro.applecommander.storage.filters.GraphicsFileFilter;
|
import com.webcodepro.applecommander.storage.filters.GraphicsFileFilter;
|
||||||
import com.webcodepro.applecommander.storage.filters.IntegerBasicFileFilter;
|
import com.webcodepro.applecommander.storage.filters.IntegerBasicFileFilter;
|
||||||
@ -456,6 +457,10 @@ public class ProdosFileEntry extends ProdosCommonEntry implements FileEntry {
|
|||||||
|
|
||||||
switch (filetype) {
|
switch (filetype) {
|
||||||
case 0x04: // TXT
|
case 0x04: // TXT
|
||||||
|
if (getFilename().endsWith(".S")) {
|
||||||
|
return new AssemblySourceFileFilter();
|
||||||
|
}
|
||||||
|
return new TextFileFilter();
|
||||||
case 0xb0: // SRC
|
case 0xb0: // SRC
|
||||||
return new TextFileFilter();
|
return new TextFileFilter();
|
||||||
case 0x19: // ADB
|
case 0x19: // ADB
|
||||||
|
Loading…
Reference in New Issue
Block a user