Class AutoImporter
Program imports automatically (without requiring user interaction)-
Method Summary
Modifier and TypeMethodDescriptionimportAsBinary(ByteProvider bytes, Project project, String projectFolderPath, Language language, CompilerSpec compilerSpec, Object consumer, MessageLog messageLog, TaskMonitor monitor) Deprecated, for removal: This API element is subject to removal in a future version.UseProgramLoaderimportAsBinary(File file, Project project, String projectFolderPath, Language language, CompilerSpec compilerSpec, Object consumer, MessageLog messageLog, TaskMonitor monitor) Deprecated, for removal: This API element is subject to removal in a future version.UseProgramLoaderstatic LoadResults<Program> importByLookingForLcs(FSRL fsrl, Project project, String projectFolderPath, Language language, CompilerSpec compilerSpec, Object consumer, MessageLog messageLog, TaskMonitor monitor) Deprecated, for removal: This API element is subject to removal in a future version.UseProgramLoaderstatic LoadResults<Program> importByLookingForLcs(File file, Project project, String projectFolderPath, Language language, CompilerSpec compilerSpec, Object consumer, MessageLog messageLog, TaskMonitor monitor) Deprecated, for removal: This API element is subject to removal in a future version.UseProgramLoaderstatic LoadResults<Program> importByUsingBestGuess(ByteProvider provider, Project project, String projectFolderPath, Object consumer, MessageLog messageLog, TaskMonitor monitor) Deprecated, for removal: This API element is subject to removal in a future version.UseProgramLoaderstatic LoadResults<Program> importByUsingBestGuess(FSRL fsrl, Project project, String projectFolderPath, Object consumer, MessageLog messageLog, TaskMonitor monitor) Deprecated, for removal: This API element is subject to removal in a future version.UseProgramLoaderstatic LoadResults<Program> importByUsingBestGuess(File file, Project project, String projectFolderPath, Object consumer, MessageLog messageLog, TaskMonitor monitor) Deprecated, for removal: This API element is subject to removal in a future version.UseProgramLoaderstatic LoadResults<Program> importByUsingSpecificLoaderClass(FSRL fsrl, Project project, String projectFolderPath, Class<? extends Loader> loaderClass, List<Pair<String, String>> loaderArgs, Object consumer, MessageLog messageLog, TaskMonitor monitor) Deprecated, for removal: This API element is subject to removal in a future version.UseProgramLoaderstatic LoadResults<Program> importByUsingSpecificLoaderClass(File file, Project project, String projectFolderPath, Class<? extends Loader> loaderClass, List<Pair<String, String>> loaderArgs, Object consumer, MessageLog messageLog, TaskMonitor monitor) Deprecated, for removal: This API element is subject to removal in a future version.UseProgramLoaderstatic LoadResults<Program> importByUsingSpecificLoaderClassAndLcs(FSRL fsrl, Project project, String projectFolderPath, Class<? extends Loader> loaderClass, List<Pair<String, String>> loaderArgs, Language language, CompilerSpec compilerSpec, Object consumer, MessageLog messageLog, TaskMonitor monitor) Deprecated, for removal: This API element is subject to removal in a future version.UseProgramLoaderstatic LoadResults<Program> importByUsingSpecificLoaderClassAndLcs(File file, Project project, String projectFolderPath, Class<? extends Loader> loaderClass, List<Pair<String, String>> loaderArgs, Language language, CompilerSpec compilerSpec, Object consumer, MessageLog messageLog, TaskMonitor monitor) Deprecated, for removal: This API element is subject to removal in a future version.UseProgramLoaderstatic LoadResults<Program> importFresh(ByteProvider provider, Project project, String projectFolderPath, Object consumer, MessageLog messageLog, TaskMonitor monitor, Predicate<Loader> loaderFilter, LoadSpecChooser loadSpecChooser, String importNameOverride, OptionChooser optionChooser) Deprecated, for removal: This API element is subject to removal in a future version.UseProgramLoaderstatic LoadResults<Program> importFresh(FSRL fsrl, Project project, String projectFolderPath, Object consumer, MessageLog messageLog, TaskMonitor monitor, Predicate<Loader> loaderFilter, LoadSpecChooser loadSpecChooser, String importNameOverride, OptionChooser optionChooser) Deprecated, for removal: This API element is subject to removal in a future version.UseProgramLoaderstatic LoadResults<Program> importFresh(File file, Project project, String projectFolderPath, Object consumer, MessageLog messageLog, TaskMonitor monitor, Predicate<Loader> loaderFilter, LoadSpecChooser loadSpecChooser, String importNameOverride, OptionChooser optionChooser) Deprecated, for removal: This API element is subject to removal in a future version.UseProgramLoader
-
Method Details
-
importByUsingBestGuess
@Deprecated(since="12.0", forRemoval=true) public static LoadResults<Program> importByUsingBestGuess(File file, Project project, String projectFolderPath, Object consumer, MessageLog messageLog, TaskMonitor monitor) throws IOException, CancelledException, DuplicateNameException, InvalidNameException, VersionException, LoadException Deprecated, for removal: This API element is subject to removal in a future version.UseProgramLoaderAutomatically imports the givenFilewith the best matchingLoaderfor theFile's format.Note that when the import completes, the returned
LoadedPrograms are not saved to a project. That is the responsibility of the caller (seeLoadResults.save(TaskMonitor)).It is also the responsibility of the caller to close the returned
LoadedPrograms withLoadResults.close()when they are no longer needed.- Parameters:
file- TheFileto importproject- TheProject. Loaders can use this to take advantage of existingDomainFolders andDomainFiles to do custom behaviors such as loading libraries. Could be null if there is no project.projectFolderPath- A suggested project folder path for theLoadedPrograms. This is just a suggestion, and aLoaderimplementation reserves the right to change it for eachLoadedresult. TheLoadedresults should be queried for their true project folder paths usingLoaded.getProjectFolderPath().consumer- A reference to the object "consuming" the returnedLoadResults, used to ensure the underlyingPrograms are only closed when every consumer is done with it (seeLoadResults.close()).messageLog- The logmonitor- A task monitor- Returns:
- The
LoadResultswhich contains one or moreLoadedPrograms (created but not saved) - Throws:
IOException- if there was an IO-related problem loadingCancelledException- if the operation was cancelledDuplicateNameException- if the load resulted in aProgramnaming conflictInvalidNameException- if an invalidProgramname was used during loadVersionException- if there was an issue with database versions, probably due to a failed language upgradeLoadException- if nothing was loaded
-
importByUsingBestGuess
@Deprecated(since="12.0", forRemoval=true) public static LoadResults<Program> importByUsingBestGuess(FSRL fsrl, Project project, String projectFolderPath, Object consumer, MessageLog messageLog, TaskMonitor monitor) throws IOException, CancelledException, DuplicateNameException, InvalidNameException, VersionException, LoadException Deprecated, for removal: This API element is subject to removal in a future version.UseProgramLoaderAutomatically imports the givenFSRLwith the best matchingLoaderfor theFile's format.Note that when the import completes, the returned
LoadedPrograms are not saved to a project. That is the responsibility of the caller (seeLoadResults.save(TaskMonitor)).It is also the responsibility of the caller to close the returned
LoadedPrograms withLoadResults.close()when they are no longer needed.- Parameters:
fsrl- TheFSRLto importproject- TheProject. Loaders can use this to take advantage of existingDomainFolders andDomainFiles to do custom behaviors such as loading libraries. Could be null if there is no project.projectFolderPath- A suggested project folder path for theLoadedPrograms. This is just a suggestion, and aLoaderimplementation reserves the right to change it for eachLoadedresult. TheLoadedresults should be queried for their true project folder paths usingLoaded.getProjectFolderPath().consumer- A reference to the object "consuming" the returnedLoadResults, used to ensure the underlyingPrograms are only closed when every consumer is done with it (seeLoadResults.close()).messageLog- The logmonitor- A task monitor- Returns:
- The
LoadResultswhich contains one or moreLoadedPrograms (created but not saved) - Throws:
IOException- if there was an IO-related problem loadingCancelledException- if the operation was cancelledDuplicateNameException- if the load resulted in aProgramnaming conflictInvalidNameException- if an invalidProgramname was used during loadVersionException- if there was an issue with database versions, probably due to a failed language upgradeLoadException- if nothing was loaded
-
importByUsingBestGuess
@Deprecated(since="12.0", forRemoval=true) public static LoadResults<Program> importByUsingBestGuess(ByteProvider provider, Project project, String projectFolderPath, Object consumer, MessageLog messageLog, TaskMonitor monitor) throws IOException, CancelledException, DuplicateNameException, InvalidNameException, VersionException, LoadException Deprecated, for removal: This API element is subject to removal in a future version.UseProgramLoaderAutomatically imports the givebyteswith the best matchingLoaderfor theByteProvider's format.Note that when the import completes, the returned
LoadedPrograms are not saved to a project. That is the responsibility of the caller (seeLoadResults.save(TaskMonitor)).It is also the responsibility of the caller to close the returned
LoadedPrograms withLoadResults.close()when they are no longer needed.- Parameters:
provider- The bytes to importproject- TheProject. Loaders can use this to take advantage of existingDomainFolders andDomainFiles to do custom behaviors such as loading libraries. Could be null if there is no project.projectFolderPath- A suggested project folder path for theLoadedPrograms. This is just a suggestion, and aLoaderimplementation reserves the right to change it for eachLoadedresult. TheLoadedresults should be queried for their true project folder paths usingLoaded.getProjectFolderPath().consumer- A reference to the object "consuming" the returnedLoadResults, used to ensure the underlyingPrograms are only closed when every consumer is done with it (seeLoadResults.close()).messageLog- The logmonitor- A task monitor- Returns:
- The
LoadResultswhich contains one or moreLoadedPrograms (created but not saved) - Throws:
IOException- if there was an IO-related problem loadingCancelledException- if the operation was cancelledDuplicateNameException- if the load resulted in aProgramnaming conflictInvalidNameException- if an invalidProgramname was used during loadVersionException- if there was an issue with database versions, probably due to a failed language upgradeLoadException- if nothing was loaded
-
importByUsingSpecificLoaderClass
@Deprecated(since="12.0", forRemoval=true) public static LoadResults<Program> importByUsingSpecificLoaderClass(File file, Project project, String projectFolderPath, Class<? extends Loader> loaderClass, List<Pair<String, String>> loaderArgs, Object consumer, MessageLog messageLog, TaskMonitor monitor) throws IOException, CancelledException, DuplicateNameException, InvalidNameException, VersionException, LoadExceptionDeprecated, for removal: This API element is subject to removal in a future version.UseProgramLoaderAutomatically imports the givenFilewith the given type ofLoader.Note that when the import completes, the returned
LoadedPrograms are not saved to a project. That is the responsibility of the caller (seeLoadResults.save(TaskMonitor)).It is also the responsibility of the caller to close the returned
LoadedPrograms withLoadResults.close()when they are no longer needed.- Parameters:
file- TheFileto importproject- TheProject. Loaders can use this to take advantage of existingDomainFolders andDomainFiles to do custom behaviors such as loading libraries. Could be null if there is no project.projectFolderPath- A suggested project folder path for theLoadedPrograms. This is just a suggestion, and aLoaderimplementation reserves the right to change it for eachLoadedresult. TheLoadedresults should be queried for their true project folder paths usingLoaded.getProjectFolderPath().loaderClass- TheLoaderclass to useloaderArgs- AListof optionalLoader-specific argumentsconsumer- A reference to the object "consuming" the returnedLoadResults, used to ensure the underlyingPrograms are only closed when every consumer is done with it (seeLoadResults.close()).messageLog- The logmonitor- A task monitor- Returns:
- The
LoadResultswhich contains one or moreLoadedPrograms (created but not saved) - Throws:
IOException- if there was an IO-related problem loadingCancelledException- if the operation was cancelledDuplicateNameException- if the load resulted in aProgramnaming conflictInvalidNameException- if an invalidProgramname was used during loadVersionException- if there was an issue with database versions, probably due to a failed language upgradeLoadException- if nothing was loaded
-
importByUsingSpecificLoaderClass
@Deprecated(since="12.0", forRemoval=true) public static LoadResults<Program> importByUsingSpecificLoaderClass(FSRL fsrl, Project project, String projectFolderPath, Class<? extends Loader> loaderClass, List<Pair<String, String>> loaderArgs, Object consumer, MessageLog messageLog, TaskMonitor monitor) throws IOException, CancelledException, DuplicateNameException, InvalidNameException, VersionException, LoadExceptionDeprecated, for removal: This API element is subject to removal in a future version.UseProgramLoaderAutomatically imports the givenFSRLwith the given type ofLoader.Note that when the import completes, the returned
LoadedPrograms are not saved to a project. That is the responsibility of the caller (seeLoadResults.save(TaskMonitor)).It is also the responsibility of the caller to close the returned
LoadedPrograms withLoadResults.close()when they are no longer needed.- Parameters:
fsrl- TheFSRLto importproject- TheProject. Loaders can use this to take advantage of existingDomainFolders andDomainFiles to do custom behaviors such as loading libraries. Could be null if there is no project.projectFolderPath- A suggested project folder path for theLoadedPrograms. This is just a suggestion, and aLoaderimplementation reserves the right to change it for eachLoadedresult. TheLoadedresults should be queried for their true project folder paths usingLoaded.getProjectFolderPath().loaderClass- TheLoaderclass to useloaderArgs- AListof optionalLoader-specific argumentsconsumer- A reference to the object "consuming" the returnedLoadResults, used to ensure the underlyingPrograms are only closed when every consumer is done with it (seeLoadResults.close()).messageLog- The logmonitor- A task monitor- Returns:
- The
LoadResultswhich contains one or moreLoadedPrograms (created but not saved) - Throws:
IOException- if there was an IO-related problem loadingCancelledException- if the operation was cancelledDuplicateNameException- if the load resulted in aProgramnaming conflictInvalidNameException- if an invalidProgramname was used during loadVersionException- if there was an issue with database versions, probably due to a failed language upgradeLoadException- if nothing was loaded
-
importByLookingForLcs
@Deprecated(since="12.0", forRemoval=true) public static LoadResults<Program> importByLookingForLcs(File file, Project project, String projectFolderPath, Language language, CompilerSpec compilerSpec, Object consumer, MessageLog messageLog, TaskMonitor monitor) throws IOException, CancelledException, DuplicateNameException, InvalidNameException, VersionException, LoadException Deprecated, for removal: This API element is subject to removal in a future version.UseProgramLoaderAutomatically imports the givenFilewith the best matchingLoaderthat supports the given language and compiler specification.Note that when the import completes, the returned
LoadedPrograms are not saved to a project. That is the responsibility of the caller (seeLoadResults.save(TaskMonitor)).It is also the responsibility of the caller to close the returned
LoadedPrograms withLoadResults.close()when they are no longer needed.- Parameters:
file- TheFileto importproject- TheProject. Loaders can use this to take advantage of existingDomainFolders andDomainFiles to do custom behaviors such as loading libraries. Could be null if there is no project.projectFolderPath- A suggested project folder path for theLoadedPrograms. This is just a suggestion, and aLoaderimplementation reserves the right to change it for eachLoadedresult. TheLoadedresults should be queried for their true project folder paths usingLoaded.getProjectFolderPath().language- The desiredLanguagecompilerSpec- The desiredcompiler specificationconsumer- A reference to the object "consuming" the returnedLoadResults, used to ensure the underlyingPrograms are only closed when every consumer is done with it (seeLoadResults.close()).messageLog- The logmonitor- A task monitor- Returns:
- The
LoadResultswhich contains one or moreLoadedPrograms (created but not saved) - Throws:
IOException- if there was an IO-related problem loadingCancelledException- if the operation was cancelledDuplicateNameException- if the load resulted in aProgramnaming conflictInvalidNameException- if an invalidProgramname was used during loadVersionException- if there was an issue with database versions, probably due to a failed language upgradeLoadException- if nothing was loaded
-
importByLookingForLcs
@Deprecated(since="12.0", forRemoval=true) public static LoadResults<Program> importByLookingForLcs(FSRL fsrl, Project project, String projectFolderPath, Language language, CompilerSpec compilerSpec, Object consumer, MessageLog messageLog, TaskMonitor monitor) throws IOException, CancelledException, DuplicateNameException, InvalidNameException, VersionException, LoadException Deprecated, for removal: This API element is subject to removal in a future version.UseProgramLoaderAutomatically imports the givenFSRLwith the best matchingLoaderthat supports the given language and compiler specification.Note that when the import completes, the returned
LoadedPrograms are not saved to a project. That is the responsibility of the caller (seeLoadResults.save(TaskMonitor)).It is also the responsibility of the caller to close the returned
LoadedPrograms withLoadResults.close()when they are no longer needed.- Parameters:
fsrl- TheFSRLto importproject- TheProject. Loaders can use this to take advantage of existingDomainFolders andDomainFiles to do custom behaviors such as loading libraries. Could be null if there is no project.projectFolderPath- A suggested project folder path for theLoadedPrograms. This is just a suggestion, and aLoaderimplementation reserves the right to change it for eachLoadedresult. TheLoadedresults should be queried for their true project folder paths usingLoaded.getProjectFolderPath().language- The desiredLanguagecompilerSpec- The desiredcompiler specificationconsumer- A reference to the object "consuming" the returnedLoadResults, used to ensure the underlyingPrograms are only closed when every consumer is done with it (seeLoadResults.close()).messageLog- The logmonitor- A task monitor- Returns:
- The
LoadResultswhich contains one or moreLoadedPrograms (created but not saved) - Throws:
IOException- if there was an IO-related problem loadingCancelledException- if the operation was cancelledDuplicateNameException- if the load resulted in aProgramnaming conflictInvalidNameException- if an invalidProgramname was used during loadVersionException- if there was an issue with database versions, probably due to a failed language upgradeLoadException- if nothing was loaded
-
importByUsingSpecificLoaderClassAndLcs
@Deprecated(since="12.0", forRemoval=true) public static LoadResults<Program> importByUsingSpecificLoaderClassAndLcs(File file, Project project, String projectFolderPath, Class<? extends Loader> loaderClass, List<Pair<String, String>> loaderArgs, Language language, CompilerSpec compilerSpec, Object consumer, MessageLog messageLog, TaskMonitor monitor) throws IOException, CancelledException, DuplicateNameException, InvalidNameException, VersionExceptionDeprecated, for removal: This API element is subject to removal in a future version.UseProgramLoaderAutomatically imports the givenFilewith the given type ofLoader, language, and compiler specification.Note that when the import completes, the returned
LoadedPrograms are not saved to a project. That is the responsibility of the caller (seeLoadResults.save(TaskMonitor)).It is also the responsibility of the caller to close the returned
LoadedPrograms withLoadResults.close()when they are no longer needed.- Parameters:
file- TheFileto importproject- TheProject. Loaders can use this to take advantage of existingDomainFolders andDomainFiles to do custom behaviors such as loading libraries. Could be null if there is no project.projectFolderPath- A suggested project folder path for theLoadedPrograms. This is just a suggestion, and aLoaderimplementation reserves the right to change it for eachLoadedresult. TheLoadedresults should be queried for their true project folder paths usingLoaded.getProjectFolderPath().loaderClass- TheLoaderclass to useloaderArgs- AListof optionalLoader-specific argumentslanguage- The desiredLanguagecompilerSpec- The desiredcompiler specificationconsumer- A reference to the object "consuming" the returnedLoadResults, used to ensure the underlyingPrograms are only closed when every consumer is done with it (seeLoadResults.close()).messageLog- The logmonitor- A task monitor- Returns:
- The
LoadResultswhich contains one or moreLoadedPrograms (created but not saved) - Throws:
IOException- if there was an IO-related problem loadingCancelledException- if the operation was cancelledDuplicateNameException- if the load resulted in aProgramnaming conflictInvalidNameException- if an invalidProgramname was used during loadVersionException- if there was an issue with database versions, probably due to a failed language upgrade
-
importByUsingSpecificLoaderClassAndLcs
@Deprecated(since="12.0", forRemoval=true) public static LoadResults<Program> importByUsingSpecificLoaderClassAndLcs(FSRL fsrl, Project project, String projectFolderPath, Class<? extends Loader> loaderClass, List<Pair<String, String>> loaderArgs, Language language, CompilerSpec compilerSpec, Object consumer, MessageLog messageLog, TaskMonitor monitor) throws IOException, CancelledException, DuplicateNameException, InvalidNameException, VersionExceptionDeprecated, for removal: This API element is subject to removal in a future version.UseProgramLoaderAutomatically imports the givenFSRLwith the given type ofLoader, language, and compiler specification.Note that when the import completes, the returned
LoadedPrograms are not saved to a project. That is the responsibility of the caller (seeLoadResults.save(TaskMonitor)).It is also the responsibility of the caller to close the returned
LoadedPrograms withLoadResults.close()when they are no longer needed.- Parameters:
fsrl- TheFSRLto importproject- TheProject. Loaders can use this to take advantage of existingDomainFolders andDomainFiles to do custom behaviors such as loading libraries. Could be null if there is no project.projectFolderPath- A suggested project folder path for theLoadedPrograms. This is just a suggestion, and aLoaderimplementation reserves the right to change it for eachLoadedresult. TheLoadedresults should be queried for their true project folder paths usingLoaded.getProjectFolderPath().loaderClass- TheLoaderclass to useloaderArgs- AListof optionalLoader-specific argumentslanguage- The desiredLanguagecompilerSpec- The desiredcompiler specificationconsumer- A reference to the object "consuming" the returnedLoadResults, used to ensure the underlyingPrograms are only closed when every consumer is done with it (seeLoadResults.close()).messageLog- The logmonitor- A task monitor- Returns:
- The
LoadResultswhich contains one or moreLoadedPrograms (created but not saved) - Throws:
IOException- if there was an IO-related problem loadingCancelledException- if the operation was cancelledDuplicateNameException- if the load resulted in aProgramnaming conflictInvalidNameException- if an invalidProgramname was used during loadVersionException- if there was an issue with database versions, probably due to a failed language upgrade
-
importAsBinary
@Deprecated(since="12.0", forRemoval=true) public static Loaded<Program> importAsBinary(File file, Project project, String projectFolderPath, Language language, CompilerSpec compilerSpec, Object consumer, MessageLog messageLog, TaskMonitor monitor) throws IOException, CancelledException, DuplicateNameException, InvalidNameException, VersionException, LoadException Deprecated, for removal: This API element is subject to removal in a future version.UseProgramLoaderAutomatically imports the givenFilewith theBinaryLoader, using the given language and compiler specification.Note that when the import completes, the returned
LoadedProgramis not saved to a project. That is the responsibility of the caller (seeLoaded.save(TaskMonitor)).It is also the responsibility of the caller to close the returned
LoadedProgramwithLoaded.close()when it is no longer needed.- Parameters:
file- TheFileto importproject- TheProject. Loaders can use this to take advantage of existingDomainFolders andDomainFiles to do custom behaviors such as loading libraries. Could be null if there is no project.projectFolderPath- A suggested project folder path for theLoadedProgram. This is just a suggestion, and aLoaderimplementation reserves the right to change it for theLoadedresult. TheLoadedresult should be queried for its true project folder paths usingLoaded.getProjectFolderPath().language- The desiredLanguagecompilerSpec- The desiredcompiler specificationconsumer- A reference to the object "consuming" the returnedLoadedProgram, used to ensure the underlyingProgramis only closed when every consumer is done with it (seeLoaded.close()).messageLog- The logmonitor- A task monitor- Returns:
- The
LoadedProgram(created but not saved) - Throws:
IOException- if there was an IO-related problem loadingCancelledException- if the operation was cancelledDuplicateNameException- if the load resulted in aProgramnaming conflictInvalidNameException- if an invalidProgramname was used during loadVersionException- if there was an issue with database versions, probably due to a failed language upgradeLoadException- if nothing was loaded
-
importAsBinary
@Deprecated(since="12.0", forRemoval=true) public static Loaded<Program> importAsBinary(ByteProvider bytes, Project project, String projectFolderPath, Language language, CompilerSpec compilerSpec, Object consumer, MessageLog messageLog, TaskMonitor monitor) throws IOException, CancelledException, DuplicateNameException, InvalidNameException, VersionException, LoadException Deprecated, for removal: This API element is subject to removal in a future version.UseProgramLoaderAutomatically imports the givenByteProviderbytes with theBinaryLoader, using the given language and compiler specification.Note that when the import completes, the returned
LoadedProgramis not saved to a project. That is the responsibility of the caller (seeLoaded.save(TaskMonitor)).It is also the responsibility of the caller to close the returned
LoadedProgramwithLoaded.close()when it is no longer needed.- Parameters:
bytes- The bytes to importproject- TheProject. Loaders can use this to take advantage of existingDomainFolders andDomainFiles to do custom behaviors such as loading libraries. Could be null if there is no project.projectFolderPath- A suggested project folder path for theLoadedProgram. This is just a suggestion, and aLoaderimplementation reserves the right to change it theLoadedresult. TheLoadedresult should be queried for its true project folder paths usingLoaded.getProjectFolderPath().language- The desiredLanguagecompilerSpec- The desiredcompiler specificationconsumer- A reference to the object "consuming" the returnedLoadedProgram, used to ensure the underlyingProgramis only closed when every consumer is done with it (seeLoaded.close()).messageLog- The logmonitor- A task monitor- Returns:
- The
LoadedProgram(created but not saved) - Throws:
IOException- if there was an IO-related problem loadingCancelledException- if the operation was cancelledDuplicateNameException- if the load resulted in aProgramnaming conflictInvalidNameException- if an invalidProgramname was used during loadVersionException- if there was an issue with database versions, probably due to a failed language upgradeLoadException- if nothing was loaded
-
importFresh
@Deprecated(since="12.0", forRemoval=true) public static LoadResults<Program> importFresh(File file, Project project, String projectFolderPath, Object consumer, MessageLog messageLog, TaskMonitor monitor, Predicate<Loader> loaderFilter, LoadSpecChooser loadSpecChooser, String importNameOverride, OptionChooser optionChooser) throws IOException, CancelledException, DuplicateNameException, InvalidNameException, VersionException, LoadException Deprecated, for removal: This API element is subject to removal in a future version.UseProgramLoaderAutomatically imports the givenFilewith advanced options.Note that when the import completes, the returned
LoadedPrograms are not saved to a project. That is the responsibility of the caller (seeLoadResults.save(TaskMonitor)).It is also the responsibility of the caller to release the returned
LoadedPrograms withLoadResults.close()when they are no longer needed.- Parameters:
file- TheFileto importproject- TheProject. Loaders can use this to take advantage of existingDomainFolders andDomainFiles to do custom behaviors such as loading libraries. Could be null if there is no project.projectFolderPath- A suggested project folder path for theLoadedPrograms. This is just a suggestion, and aLoaderimplementation reserves the right to change it for eachLoadedresult. TheLoadedresults should be queried for their true project folder paths usingLoaded.getProjectFolderPath().consumer- A reference to the object "consuming" the returnedLoadResults, used to ensure the underlyingPrograms are only closed when every consumer is done with it (seeLoadResults.close()).messageLog- The logmonitor- A task monitorloaderFilter- APredicateused to choose whatLoader(s) get usedloadSpecChooser- ALoadSpecChooserused to choose whatLoadSpec(s) get usedimportNameOverride- The name to use for the imported thing. Null to use theLoader's preferred name.optionChooser- AOptionChooserused to choose whatLoaderoptions get used- Returns:
- The
LoadResultswhich contains one or moreLoadedPrograms (created but not saved) - Throws:
IOException- if there was an IO-related problem loadingCancelledException- if the operation was cancelledDuplicateNameException- if the load resulted in aProgramnaming conflictInvalidNameException- if an invalidProgramname was used during loadVersionException- if there was an issue with database versions, probably due to a failed language upgradeLoadException- if nothing was loaded
-
importFresh
@Deprecated(since="12.0", forRemoval=true) public static LoadResults<Program> importFresh(FSRL fsrl, Project project, String projectFolderPath, Object consumer, MessageLog messageLog, TaskMonitor monitor, Predicate<Loader> loaderFilter, LoadSpecChooser loadSpecChooser, String importNameOverride, OptionChooser optionChooser) throws IOException, CancelledException, DuplicateNameException, InvalidNameException, VersionException, LoadException Deprecated, for removal: This API element is subject to removal in a future version.UseProgramLoaderAutomatically imports the givenFSRLwith advanced options.Note that when the import completes, the returned
LoadedPrograms are not saved to a project. That is the responsibility of the caller (seeLoadResults.save(TaskMonitor)).It is also the responsibility of the caller to release the returned
LoadedPrograms withLoadResults.close()when they are no longer needed.- Parameters:
fsrl- TheFSRLto importproject- TheProject. Loaders can use this to take advantage of existingDomainFolders andDomainFiles to do custom behaviors such as loading libraries. Could be null if there is no project.projectFolderPath- A suggested project folder path for theLoadedPrograms. This is just a suggestion, and aLoaderimplementation reserves the right to change it for eachLoadedresult. TheLoadedresults should be queried for their true project folder paths usingLoaded.getProjectFolderPath().consumer- A reference to the object "consuming" the returnedLoadResults, used to ensure the underlyingPrograms are only closed when every consumer is done with it (seeLoadResults.close()).messageLog- The logmonitor- A task monitorloaderFilter- APredicateused to choose whatLoader(s) get usedloadSpecChooser- ALoadSpecChooserused to choose whatLoadSpec(s) get usedimportNameOverride- The name to use for the imported thing. Null to use theLoader's preferred name.optionChooser- AOptionChooserused to choose whatLoaderoptions get used- Returns:
- The
LoadResultswhich contains one or moreLoadedPrograms (created but not saved) - Throws:
IOException- if there was an IO-related problem loadingCancelledException- if the operation was cancelledDuplicateNameException- if the load resulted in aProgramnaming conflictInvalidNameException- if an invalidProgramname was used during loadVersionException- if there was an issue with database versions, probably due to a failed language upgradeLoadException- if nothing was loaded
-
importFresh
@Deprecated(since="12.0", forRemoval=true) public static LoadResults<Program> importFresh(ByteProvider provider, Project project, String projectFolderPath, Object consumer, MessageLog messageLog, TaskMonitor monitor, Predicate<Loader> loaderFilter, LoadSpecChooser loadSpecChooser, String importNameOverride, OptionChooser optionChooser) throws IOException, CancelledException, DuplicateNameException, InvalidNameException, VersionException, LoadException Deprecated, for removal: This API element is subject to removal in a future version.UseProgramLoaderAutomatically imports the givenbyteswith advanced options.Note that when the import completes, the returned
LoadedPrograms are not saved to a project. That is the responsibility of the caller (seeLoadResults.save(TaskMonitor)).It is also the responsibility of the caller to release the returned
LoadedPrograms withLoadResults.close()when they are no longer needed.- Parameters:
provider- The bytes to importproject- TheProject. Loaders can use this to take advantage of existingDomainFolders andDomainFiles to do custom behaviors such as loading libraries. Could be null if there is no project.projectFolderPath- A suggested project folder path for theLoadedPrograms. This is just a suggestion, and aLoaderimplementation reserves the right to change it for eachLoadedresult. TheLoadedresults should be queried for their true project folder paths usingLoaded.getProjectFolderPath().consumer- A reference to the object "consuming" the returnedLoadResults, used to ensure the underlyingPrograms are only closed when every consumer is done with it (seeLoadResults.close()).messageLog- The logmonitor- A task monitorloaderFilter- APredicateused to choose whatLoader(s) get usedloadSpecChooser- ALoadSpecChooserused to choose whatLoadSpec(s) get usedimportNameOverride- The name to use for the imported thing. Null to use theLoader's preferred name.optionChooser- AOptionChooserused to choose whatLoaderoptions get used- Returns:
- The
LoadResultswhich contains one or moreLoadedPrograms (created but not saved) - Throws:
IOException- if there was an IO-related problem loadingCancelledException- if the operation was cancelledDuplicateNameException- if the load resulted in aProgramnaming conflictInvalidNameException- if an invalidProgramname was used during loadVersionException- if there was an issue with database versions, probably due to a failed language upgradeLoadException- if nothing was loaded
-
ProgramLoader