score:0

see http://www.ant4eclipse.org/ for a project which allows you to work inside eclipse projects.

i used it for a bit some years back, and found that this is too brittle for long term usage and build scripts. i would recommend against relying on internal eclipse things. they break! typically when mixing releases.

instead i would suggest you move to maven. this is a bit more work, but allows you to use the whole maven infrastructure and api's to do things. what you want to achieve here, may be possible already using a maven plugin.

score:1

yes, and can all be done through clear and stable api. org.eclipse.jdt.core is a plug-in, just like org.eclipse.core.resources (which is where you would get an iworkspace instance), and they both expect to be running within an eclipse runtime, which can be headless if that's how you write your eclipse application. jdt uses the .classpath file to record where sources, libraries, and build output are, and what abstracted references to libraries to use, while the .project file is what records what kind of project it is in general--java, php, web, some combination of those or others--and a little more information about what builders to execute.

so make yourself a headless eclipse application, or package your end-goal functionality inside of one.

https://wiki.eclipse.org/faq_what_is_an_eclipse_application%3f https://wiki.eclipse.org/faq_what_are_extensions_and_extension_points%3f http://help.eclipse.org/mars/topic/org.eclipse.platform.doc.isv/reference/extension-points/org_eclipse_core_runtime_applications.html?cp=2_1_1_27

http://help.eclipse.org/mars/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/resources/resourcesplugin.html#getworkspace-- http://help.eclipse.org/mars/topic/org.eclipse.jdt.doc.isv/reference/api/org/eclipse/jdt/core/javacore.html#getjavacore-- http://help.eclipse.org/mars/topic/org.eclipse.jdt.doc.isv/reference/api/org/eclipse/jdt/core/ijavaproject.html#getresolvedclasspath-boolean-


Related Query

More Query from same tag