Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing anonymous class #4

Open
wants to merge 8 commits into
base: v5
Choose a base branch
from
Open

Fixing anonymous class #4

wants to merge 8 commits into from

Conversation

badetitou
Copy link
Member

Made by @alkalinan
Move this issue to check on v5 for future integration

Exporting file structure like source anchor

This change allows the java files to retain the folder structure that they have according to the model source anchor. Previously, when exporting a class A with with its source anchor set has C:/myproject/src/packageA/A.java (assuming the exporting root path was C:/output/) the output file path was C:/output/packageA/A.java, loosing the srcfolder in the process. And for java project with mulitple sub project, all sub project files were exported in the same project folder, loosing the initial hierachical file structure.

My change set the export path of any file to mimic the initial path found in the source anchor. Therefore, Java class, enum and interface use a generateExportFileFor: method that return the output file ensuring it exists.

Potential bug : no source anchor of the FamixEntity.

new experiemental Feature : submodel exporter

The submodel exporter allows you to only retains selected methods when visiting the model and mocking all the other methods. When exported, the only selected methods will retains their body, while others methods are transformed into mock method (only returning null or nothing if void). This enables us the generate sub part of the application without changing the rest. The feature is found in the subclass Famix2JavaFiltered and does not impact the behavior of the initial Famix2Java exporter.

minoir fixes

  • add visitor of interface and enum files
  • add visitor of inner classes
  • fix the export of annonymous classes
  • a isVoid method extension for FamixJavaMethod (unfound in Famix API).
  • correct visibility

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant