DevBoost / JaMoPP

JaMoPP can parse Java source and byte code into EMF-based models and vice versa. It preserves source formatting and can be used for code analysis and refactoring.
17 stars 18 forks source link

Add support for Java7 constructs #3

Open DennisGrewe opened 11 years ago

DennisGrewe commented 11 years ago

Hi again,

i have another problem. If i initialize a Map or a List using the new-operator in a source file i got no template of my file. It doesn´t matter if i initialize this in a method taged by @CommentTamplate nor another method or in the top of my source-class.

regards

Dennis

jjohannes commented 11 years ago

That's a strange behavior... Could you attached an example that reproduces the problem?

DennisGrewe commented 11 years ago

Hi,

i´m sorry. I found out, that commentTemplate does not support Java 7 syntax for generic type inference. For example List exampleList = new ArrayList<>(); is valid syntax in Java 7 but commentTemplate do not create a template of a source class.

perhabs this could be observed in a new release of commentTemplate.

jjohannes commented 11 years ago

Sorry, Java7 syntax is not yet supported by JaMoPP (and consequently not by CommentTemplate either).

I will look into this. For now, I am afraid you will have to limit the classes that use CommentTemplate constructs to Java6 syntax.