Sparx Systems Forum

Enterprise Architect => Suggestions and Requests => Topic started by: ralph_redseal on November 22, 2005, 11:53:58 am

Title: Unable to import java file w/qualified annotations
Post by: ralph_redseal on November 22, 2005, 11:53:58 am
I am unable to import (reverse engineer) a java source file into an Enterprise Architect diagram when I use Java annotations that include the fully qualified annotation name.  That is, if the annotation includes a period (“.”) then Enterprise Architect is unable to parse the java code and outputs an error.

For example, the following file:

@org.hibernate.annotations.Proxy(lazy = false)
public class TestClass {
   public TestClass() {
   }
}

Results in the following error:

There was an error parsing C:\TestClass.java on line 1.  Unexpected symbol: .


This next version, without the fully qualified annotation name (using an import statement instead) does get imported correctly, however:

import org.hibernate.annotations.Proxy;
@Proxy(lazy = false)
public class TestClass {
   public TestClass() {
   }
}

We have a lot of code that we’d like to import and we don’t want to have to replace all the fully qualified annotation names.
Title: Re: Unable to import java file w/qualified annotat
Post by: bksteele on July 05, 2006, 07:36:51 am
I am unable to reverse engineer annotations.
Were you able to resolve this?
If so, please let me know.
Thanks in advance.
--Ben
Title: Re: Unable to import java file w/qualified annotat
Post by: Eve on July 05, 2006, 02:56:36 pm
The problem with qualified annotations was fixed not long after the original post.  If annotations don't come in (as tagged values) for you, make sure you have the latest build.