0

I have a question: my tool generates some migrated project src files and other files, and I want to open this project in Eclipse. I came to know that I need to add .project and .classpath files to this generated project, to open it in Eclipse. How to generate this files programmatically? Any suggestions, pointers. Thanks

syed99
  • 332
  • 1
  • 5
  • 20
  • The .project file is created when you use the Eclipse APIs to create a project - see http://stackoverflow.com/a/22280214/2670892 – greg-449 Aug 08 '14 at 07:32
  • @greg-449:ok, but i am not sure where to write the code given for that i am creating a class, but could not find import for "org.eclipse.core.resources" which is having "IWorkspace", "IProject " and "IProjectDescription" interfaces or you want me to write the code in plugin-develpment guide as in [link](http://help.eclipse.org/luna/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fmisc%2Fproject_description_file.html) and i am also looking at [this](http://www.eclipse.org/forums/index.php/t/457988/) – syed99 Aug 08 '14 at 07:53
  • The code must be written as an Eclipse plugin or an Eclipse headless application in order to use this API. – greg-449 Aug 08 '14 at 08:46
  • Thanks,yes u r right the project should be created as eclipse plugin and we must add dependencies for the imports in plugin.xml and specifically the code must be written in predefined "run()" method of the generated class.These links might be helpful for future visitors...[link1](https://sdqweb.ipd.kit.edu/wiki/JDT_Tutorial:_Creating_Eclipse_Java_Projects_Programmatically) [link2](http://www.eclipse.org/forums/index.php/t/457988/) – syed99 Aug 13 '14 at 10:04

0 Answers0