Generating an Eclipse workspace [message #246236] |
Mon, 21 January 2008 20:28  |
Eclipse User |
|
|
|
Originally posted by: erictetz.gmail.com
Greetings! :)
I support a firmware build process. We support various editors/IDEs by
programmatically generating workspace/project files. The resulting
workspaces include source files for particular product (references, not
copies) and menu entries to launch our external build process.
Doing this for tools like Slick Edit and Code Wright is trivial: generate
one or two files and launch the editor. The project files are plain text,
and the executables have rich command line interfaces.
Doing this for MetaWare's IDE (Eclipse) is proving a lot more challenging.
I've tried just adding a single file to an empty workspace, then doing a
before/after diff to see what file(s) I need to modify. However, adding a
single file seems to require editing multiple workspace files, some of the
binary. :/
I've googled around for solutions -- most of the answers seem to be terms
of a Java API (i.e. WizardProjectsImportPage, IResource, etc.), but that
presumes that Eclipse is already running, right? Is it possible to create
a workspace and add projects/files without running Eclipse? If not, how
should I go about solving my problem?
Thanks in advance for pointing me in the right direction!
Cheers,
Eric
|
|
|
Re: Generating an Eclipse workspace [message #246311 is a reply to message #246236] |
Tue, 22 January 2008 07:07   |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
This is a multi-part message in MIME format.
--------------090609000904040006080500
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
Eric,
I think by far your best bet is to run Eclipse as a headless application
and to use the same types of APIs as are normally uses when running
within the IDE avoiding of course any that depend specifically on the UI
itself. For EMF, for example, we have all kinds of command line
utilities that run a headless Eclipse application. You'll want to learn
how to use this type of extension point:
<extension id="Generator"
point="org.eclipse.core.runtime.applications">
<application>
<run
class="org.eclipse.emf.codegen.ecore.Generator$PlatformRunnable " />
</application>
</extension>
Eric Tetz wrote:
> Greetings! :)
>
> I support a firmware build process. We support various editors/IDEs by
> programmatically generating workspace/project files. The resulting
> workspaces include source files for particular product (references,
> not copies) and menu entries to launch our external build process.
>
> Doing this for tools like Slick Edit and Code Wright is trivial:
> generate one or two files and launch the editor. The project files are
> plain text, and the executables have rich command line interfaces.
>
> Doing this for MetaWare's IDE (Eclipse) is proving a lot more
> challenging. I've tried just adding a single file to an empty
> workspace, then doing a before/after diff to see what file(s) I need
> to modify. However, adding a single file seems to require editing
> multiple workspace files, some of the binary. :/
>
> I've googled around for solutions -- most of the answers seem to be
> terms of a Java API (i.e. WizardProjectsImportPage, IResource, etc.),
> but that presumes that Eclipse is already running, right? Is it
> possible to create a workspace and add projects/files without running
> Eclipse? If not, how should I go about solving my problem?
>
> Thanks in advance for pointing me in the right direction!
>
> Cheers,
> Eric
>
>
--------------090609000904040006080500
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Eric,<br>
<br>
I think by far your best bet is to run Eclipse as a headless
application and to use the same types of APIs as are normally uses when
running within the IDE avoiding of course any that depend specifically
on the UI itself.
|
|
|
|
Re: Generating an Eclipse workspace [message #246439 is a reply to message #246420] |
Tue, 22 January 2008 14:23  |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Eric,
It's a little out of date. IApplication is the preferred API to replace
the deprecated IPlatformRunnable. But this should help get you started...
Eric Tetz wrote:
> Ed Merks wrote:
>> For EMF, for example, we have all kinds of command line utilities
>> that run a
>> headless Eclipse application. You'll want to learn how to use this
>> type of
>> extension point:
>>
>> <extension id="Generator"
>> point="org.eclipse.core.runtime.applications">
>> <application>
>> <run
>> class="org.eclipse.emf.codegen.ecore.Generator$PlatformRunnable " />
>> </application>
>> </extension>
>
> Sweet. This sounds like what I need. The problem is, I have no idea
> what a 'headless Eclipse application' or 'extension point' is --
> basically, I don't know where my entry point into this system is.
>
> I just Googled up this link:
>
> http://www.developertesting.com/archives/month200508/2005082 3-HeadlessHelloWorldInEclipse.html
>
>
> I think I'll start there. If I'm barking up the wrong tree, let me
> know now! Otherwise, I guess I'll see you guys later (with further
> questions). :)
>
> Cheers,
> Eric
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.07648 seconds