Home » Modeling » EMF » Setting up Eclipse for Reflective API
| | |
Re: Setting up Eclipse for Reflective API [message #414844 is a reply to message #414843] |
Sun, 25 November 2007 20:07 |
Ed Merks Messages: 33218 Registered: July 2009 |
Senior Member |
|
|
Mark,
Comments below.
Mark Melia wrote:
> Hi Ed,
>
> Thanks for the quick reply! I have done what you have said and have an
> empty EMF project - this works perfectly as I can create ecore models,
> but I now want to add a java class to use the reflective api (i think)
> but I cant seem to do this as the project is not a java project.
Certainly the project EMF creates for you will always be a Java
project. Only if it's a project with a Java nature will you be able to
build Java files effectively. How did you create the project you are using?
> Also, if I wanted to use this on a web server - is there some way of
> figuring out what EMF jars are being used so I can put them in the
> classpath at runtime?
If you look in the plugins folder of your Eclipse installation, you'll
see that each EMF plugin is a jar, i.e., org.eclipse.emf.common_*.jar.
So exactly the plugins you'd normally depend on when build your own
plugin (which you can see listed in the "Plug-in Dependencies" "folder"
in the Package Explorere) you can add their corresponding jars to the
classpath.
>
> Again, thanks for your help, much appreciated.
>
> Mark
>
>
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: Setting up Eclipse for Reflective API [message #414845 is a reply to message #414844] |
Sun, 25 November 2007 21:36 |
Mark Melia Messages: 142 Registered: July 2009 |
Senior Member |
|
|
Hi Ed,
Thanks again, I created the project by
File -> New -> Project
Empty EMF Project .
Can you point me to where I can find out more information about where to
set the project as "Java Nature".
Mark
Ed Merks wrote:
> Mark,
> Comments below.
> Mark Melia wrote:
>> Hi Ed,
>>
>> Thanks for the quick reply! I have done what you have said and have an
>> empty EMF project - this works perfectly as I can create ecore models,
>> but I now want to add a java class to use the reflective api (i think)
>> but I cant seem to do this as the project is not a java project.
> Certainly the project EMF creates for you will always be a Java
> project. Only if it's a project with a Java nature will you be able to
> build Java files effectively. How did you create the project you are using?
>> Also, if I wanted to use this on a web server - is there some way of
>> figuring out what EMF jars are being used so I can put them in the
>> classpath at runtime?
> If you look in the plugins folder of your Eclipse installation, you'll
> see that each EMF plugin is a jar, i.e., org.eclipse.emf.common_*.jar.
> So exactly the plugins you'd normally depend on when build your own
> plugin (which you can see listed in the "Plug-in Dependencies" "folder"
> in the Package Explorere) you can add their corresponding jars to the
> classpath.
>>
>> Again, thanks for your help, much appreciated.
>>
>> Mark
>>
>>
>>
|
|
|
Re: Setting up Eclipse for Reflective API [message #414848 is a reply to message #414845] |
Mon, 26 November 2007 11:12 |
Ed Merks Messages: 33218 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
--------------040709040700060705000108
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
Mark,
If in the Package Explorer you use the little drop down arrow button in
the upper corner to bring up the "Filters..." menu and make sure the .*
resource filter is not check marked, you'll be able to see the files
that start with . like the .project that's in the root of every
project. In there is were the natures are specified, including the
*javanature*.
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>library</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>*
<nature>org.eclipse.jdt.core.javanature</nature>*
<nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>
I don't think there's a way via the IDE to just set the Java nature. I
think you have to create the right type of project to begin with.
There's lots of online help within the IDE for JDT, so that's a good
place to find out more about everything (Help->Help Contents).
Mark Melia wrote:
> Hi Ed,
>
> Thanks again, I created the project by File -> New -> Project
> Empty EMF Project .
>
> Can you point me to where I can find out more information about where
> to set the project as "Java Nature".
>
> Mark
>
> Ed Merks wrote:
>
>> Mark,
>
>> Comments below.
>
>> Mark Melia wrote:
>>> Hi Ed,
>>>
>>> Thanks for the quick reply! I have done what you have said and have
>>> an empty EMF project - this works perfectly as I can create ecore
>>> models, but I now want to add a java class to use the reflective api
>>> (i think) but I cant seem to do this as the project is not a java
>>> project.
>> Certainly the project EMF creates for you will always be a Java
>> project. Only if it's a project with a Java nature will you be able
>> to build Java files effectively. How did you create the project you
>> are using?
>>> Also, if I wanted to use this on a web server - is there some way of
>>> figuring out what EMF jars are being used so I can put them in the
>>> classpath at runtime?
>> If you look in the plugins folder of your Eclipse installation,
>> you'll see that each EMF plugin is a jar, i.e.,
>> org.eclipse.emf.common_*.jar. So exactly the plugins you'd normally
>> depend on when build your own plugin (which you can see listed in the
>> "Plug-in Dependencies" "folder" in the Package Explorere) you can add
>> their corresponding jars to the classpath.
>>>
>>> Again, thanks for your help, much appreciated.
>>>
>>> Mark
>>>
>>>
>>>
>
>
--------------040709040700060705000108
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">
Mark,<br>
<br>
If in the Package Explorer you use the little drop down arrow button in
the upper corner to bring up the "Filters..." menu and make sure the .*
resource filter is not check marked, you'll be able to see the files
that start with . like the .project that's in the root of every
project.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Goto Forum:
Current Time: Thu Sep 26 20:48:38 GMT 2024
Powered by FUDForum. Page generated in 0.04435 seconds
|