Package com.e1c.langtool.converter
Interface IConverterEngine
- All Known Implementing Classes:
ConverterEngineImpl
public interface IConverterEngine
Interface representing a converter engine responsible for converting source language projects to target language projects.
Implementations of this interface should provide the convert method to perform the conversion process.
Usage example:
// Obtain a IConverterEngine instance
IConverterEngine converterEngine = ...; // Implement or obtain the instance through dependency injection
// Specify the projects for conversion
IProject translatedProject = ...; // Specify the translated project
IProject sourceLangProject = ...; // Specify the source language project
IProject targetLangProject = ...; // Specify the target language project
// Perform the conversion
IProgressMonitor monitor = ...; // Specify the progress monitor
IStatus conversionStatus = converterEngine.convert(translatedProject, sourceLangProject, targetLangProject, monitor);
// Check the conversion status
if (conversionStatus.isOK()) {
System.out.println("Conversion completed successfully.");
} else {
System.err.println("Conversion failed: " + conversionStatus.getMessage());
}
-
Method Summary
Modifier and TypeMethodDescription@NonNull org.eclipse.core.runtime.IStatusconvert(@NonNull org.eclipse.core.resources.IProject project, @NonNull org.eclipse.core.resources.IProject sourceLangProject, @NonNull org.eclipse.core.resources.IProject targetLangProject, @NonNull org.eclipse.core.runtime.IProgressMonitor monitor) Converts the source language project to the target language project for the specified translated project.
-
Method Details
-
convert
@NonNull org.eclipse.core.runtime.IStatus convert(@NonNull org.eclipse.core.resources.IProject project, @NonNull org.eclipse.core.resources.IProject sourceLangProject, @NonNull org.eclipse.core.resources.IProject targetLangProject, @NonNull org.eclipse.core.runtime.IProgressMonitor monitor) Converts the source language project to the target language project for the specified translated project.- Parameters:
project- the translated project for which to perform the conversion, cannot benull.sourceLangProject- the source language project, cannot benull.targetLangProject- the target language project, cannot benull.monitor- the progress monitor for tracking the conversion progress, cannot benull.- Returns:
- the status of the conversion process, indicating success
or providing an error message in case of failure, cannot be
null
-