1
Suggestions and Requests / 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.
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.