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 Type
    Method
    Description
    @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.
  • 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 be null.
      sourceLangProject - the source language project, cannot be null.
      targetLangProject - the target language project, cannot be null.
      monitor - the progress monitor for tracking the conversion progress, cannot be null.
      Returns:
      the status of the conversion process, indicating success or providing an error message in case of failure, cannot be null