joergreichert / spray

Automatically exported from code.google.com/p/spray
1 stars 2 forks source link

Duplicate entries in generated properties view #216

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
see the appended screenshot for an example. The name feature appears twice. I 
guess this is because the direct properties as well as the inherited properties 
of the current class are merged with the properties within its superclass 
hierarchy.

Original issue reported on code.google.com by de.abg.r...@gmail.com on 1 Dec 2012 at 9:00

Attachments:

GoogleCodeExporter commented 9 years ago
I have been suffering from the same symptoms.

I have been use the following duplicate class definition of EClass in Spray 
Core DSL (xx.spray) using the alias.

class SomeEClass alias SomeEClassAlias {
...
}

class SomeEClass alias AnotherSomeEClassAlias {
...
}

And, so I saw that the property was duplicated.

I want to solve this problem.

Do you have a plan to fix this?

Or, Anyone help me ?

Original comment by visual...@prever.co.kr on 12 Jun 2013 at 6:08

GoogleCodeExporter commented 9 years ago
You can adapt the generated plugin.xml where are defined several
<propertySection> which reference each a *.property.*Section class.

I tried to fix the issue in the generator (

SprayGraphitiGenerator.xtend:

def generatePropertySectionForEClassAttributes(Diagram diagram, JavaGenFile
java, EClass eClass, PropertySection ps) {
val keyed = eClass.EAllAttributes.map(att|(att.name -> att.EType.name) ->
att)
val keys = keyed.map[key].toSet
for( attribute : keys.map(key|keyed.filter(entry|entry.key ==
key)).flatten.map[value]) {
generatePropertySectionForAttribute(diagram, java, eClass, attribute, ps)
}
}

), but the fix seems not to work, so the work around above the only way.

Original comment by de.abg.r...@gmail.com on 12 Jun 2013 at 10:12

GoogleCodeExporter commented 9 years ago
Thanks for your response.

Original comment by visual...@prever.co.kr on 13 Jun 2013 at 12:14