Book a Demo

Author Topic: EclipseLink error: switch eclipse workspace  (Read 3725 times)

Thomas Mayr

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
EclipseLink error: switch eclipse workspace
« on: August 22, 2008, 08:33:37 pm »
Hello,

when I try to generate code of a single class I get the error message "Please use eclipse to switch to the following workspace: C:\users\mayr\JavaEntwicklung".

I connected an eclipse and EA project and reverse engineered the java code to an EA model. Now I modified a class in the model and want to generate the code. The error occurs when I try this from the eclipse plugin or from EA directly. The error also occurs when I select "View source code..." in EA from the context menu of the class. However the source code is displayed afterward. When I do the same from the eclipse plugin ("View Code") it works without error message.

I'm also able to synchronize the EA model with this class (forward engineerieng). I modified the Java code and the modifications are reflected in the model.

I never had an eclipse workspace under the requested path; so I don't know why EA has the idea I should switch to this workspace?

Any ideas how to solve this problem?

Thanks Thomas

Thomas Mayr

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: EclipseLink error: switch eclipse workspace
« Reply #1 on: August 26, 2008, 05:09:28 pm »
BTW: I have the latest version of EA: 7.1 Build 832 and the version of the eclipse plugin is  6.1.8144.

Regards Thomas

Thomas Mayr

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: EclipseLink error: switch eclipse workspace
« Reply #2 on: August 26, 2008, 11:27:42 pm »
Hi,

at least I found the solution. I forgot to press the "Connect" button on the eclipse connection dialog to "really" connect the projects. The EA package appears to be connected (was decorated with eclipse icon), but was not really connected.

Thomas

Thomas Mayr

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: EclipseLink error: switch eclipse workspace
« Reply #3 on: August 28, 2008, 04:49:32 pm »
Now I know why this happened: When you create the link to an eclipse project in the project explorer of the eclipse plugin (context menu of the package ->Current Package->Link this Package to an Eclipse Project) the package is not correctly connected and you get this problem. So the link should always be made from EA.

Thomas

Thomas Mayr

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: EclipseLink error: switch eclipse workspace
« Reply #4 on: August 28, 2008, 04:56:54 pm »
One add on: When you link a package in EA to  an eclipse project, the link is not visible in the project explorer of the eclipse plugin. So the context menu entry "Code Services" doesn't appear. You have to link the package in the project explorer again (after you have linked it in EA), than it works.

I really don't know if this is the intended behaviour; at least it is not well documented.

Thomas