Author Topic: Unable to import java file w/qualified annotations  (Read 2638 times)

ralph_redseal

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Unable to import java file w/qualified annotations
« 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.

bksteele

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Unable to import java file w/qualified annotat
« Reply #1 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

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8085
  • Karma: +118/-20
    • View Profile
Re: Unable to import java file w/qualified annotat
« Reply #2 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.