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

Extend main template identification #5

Open
Diusrex opened this issue Apr 7, 2016 · 0 comments
Open

Extend main template identification #5

Diusrex opened this issue Apr 7, 2016 · 0 comments

Comments

@Diusrex
Copy link
Collaborator

Diusrex commented Apr 7, 2016

Like the README states, a main template is one which is expected to be compiled into a Java class which will be used. Therefore, a non-main template is one which is just used in other templates.

In the Umple project, all main templates were identified by .jumpjet, while all the regular templates were .jet. So the converter assumes that a file with the extension .jumpjet is a main template, while every other valid jet template is a regular template. However, other projects would likely use other ways to identify main templates.

Rather than force other project authors to adjust their templates, they should be allowed to pass different arguments to identify which templates may be main templates.

Some possible additions would include:

  • All templates
  • No templates (unlikely, but possible if there are multiple directories)
  • Templates that start with a given prefix
  • Templates that have a given suffix (not in their extension)
  • Templates that contain the given substring
  • Templates with a given extension (generalization of the current system)
  • Templates with a given package in their directive

As a further, probably unnecessary extension, it may be possible to use some heuristics to determine if a template is a main or standard template. Some ways to guess that a template is a regular template would be if there are multiple with the same package and class name (in their directive), templates with "Ignore" in their package or class name, etc.

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

No branches or pull requests

1 participant