COVESA / franca_ara_tools

Translation between Franca Interface Description Language and AUTOSAR XML interface description language
Eclipse Public License 2.0
41 stars 12 forks source link

Feature/aspects on imports #92

Closed MLanghammer closed 4 years ago

MLanghammer commented 4 years ago

The PR introduces handling of Franca Imports if multiple Franca files are created from multiple ARXML files. Also checks whether the provideds ARXML models is complete in the sense that all References can be resolved.

The PR also fixes Issue #90 , because it was easy to fix during the refactoring

MLanghammer commented 4 years ago

I implemented all suggestion except the following

OutputFileHelper.xtend:

* It is not necessary to call 'trimFileExtension' as the full segment is removed with 'trimSegments' anyway.

ConverterCliCommand.java:

* Why is the order of calling 'convertARAFiles' and 'convertFrancaFiles' exchanged?
  • not on purpose, but it should not matter.

    • As the implementation of 'convertARAFiles' and 'convertFrancaFiles' has been extracted these methods should be completely eliminated here.
  • Not as the source code is structured right now. The methods are used from the command line tool and from the Eclipse UI as well. In order to do what you suggested, we would need to perform some refactoring to the CommandLineCLI class.

    • The additional command line option "-ca" for "check ARXML files only" should not be handled within the conversion command but realized as an own command.

I guess you are right, I implemented that to check whether the checking of ARXML works. So, I guess, we can also remove the "-ca", as it is not part of the use case of the tool.

Ara2FrancaConverter:

* What is the purpose of the step 'putAllFrancaModelsInOneResource'? The resource set that is created here is not used in the following step 'saveAllFrancaModels'!
  • it is used implicitly during the save of the models.

    • The method 'getFrancaFilePath' does not preserve the relative paths of the input files in case of scanning input folders recursivly.
  • As we discuseed offline, I created a ticket for that: see #102

FaraconTestsInjectorProvider.java:

* Why has the local varibale 'faraconInjector' been introduced?

FaraconTestsStandaloneSetup.java:

* What is the purpose of 'DirtyStateManager' which is bound here?

ARA2FrancaTestBase.xtend:

tests/aspects_on_import/a2f/*

* Partially weired indentation in the test input and expected output files. The Franca and AUTOSAR model files should be pretty printed.