Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » How to create a IJavaProject from the existing project in the Eclipse workspace
How to create a IJavaProject from the existing project in the Eclipse workspace [message #646671] Wed, 29 December 2010 13:55 Go to next message
Eclipse UserFriend
As the topic, how can I create a IJavaProject from the existing project in the Eclipse workspace?
Re: How to create a IJavaProject from the existing project in the Eclipse workspace [message #646679 is a reply to message #646671] Wed, 29 December 2010 14:48 Go to previous messageGo to next message
Eclipse UserFriend
Taken from Eclipse Corner Articles: Abstract Syntax Tree:

IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
IProject project = root.getProject("someJavaProject");
project.open(null /* IProgressMonitor */);
		
IJavaProject javaProject = JavaCore.create(project);
Re: How to create a IJavaProject from the existing project in the Eclipse workspace [message #646764 is a reply to message #646679] Thu, 30 December 2010 14:25 Go to previous messageGo to next message
Eclipse UserFriend
Thank you for your help.

I got a problem when I was using the code. The error message is:

java.lang.IllegalStateException: Workspace is closed.
at org.eclipse.core.resources.ResourcesPlugin.getWorkspace(Reso urcesPlugin.java:367)
at testIJavaProject.main(testIJavaProject.java:16)


I have tried to google it, someone said that's the dependence problem, but I cannot find any dependence area in the eclipse. How can I fix it?

[Updated on: Thu, 30 December 2010 14:27] by Moderator

Re: How to create a IJavaProject from the existing project in the Eclipse workspace [message #646941 is a reply to message #646764] Mon, 03 January 2011 05:27 Go to previous messageGo to next message
Eclipse UserFriend
This probably has to be an eclipse process - RCP or Headless!
Re: How to create a IJavaProject from the existing project in the Eclipse workspace [message #646966 is a reply to message #646941] Mon, 03 January 2011 11:13 Go to previous messageGo to next message
Eclipse UserFriend
How can I fix it?
Re: How to create a IJavaProject from the existing project in the Eclipse workspace [message #647036 is a reply to message #646966] Tue, 04 January 2011 04:01 Go to previous message
Eclipse UserFriend
It essentially means you should create an Eclipse plugin rather than a simple java project. They are lot of articles about Eclipse plugin development which you could go through.
Previous Topic:Run all unittests of current workspace?
Next Topic:Comment lines in eclipse.ini? Change from Eclipse GUI possible?
Goto Forum:
  


Current Time: Wed Jul 02 03:19:06 EDT 2025

Powered by FUDForum. Page generated in 0.29003 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top