Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EEF] Converting EEF to standalone
[EEF] Converting EEF to standalone [message #516083] Mon, 22 February 2010 12:54 Go to next message
Herb Miller is currently offline Herb Miller
Messages: 139
Registered: January 2010
Senior Member
When I added the EEF tutorial to my project, my project already had a standalone product that worked. Now that I have the EEF stuff working, I re-synchronized my product and launched an Eclipse application from the Overview tab of the product page.

My old product ran instead of the EEF changes. I assume there are some changes that need to be made to the product. Maybe the application needs to change.

Does anyone know what changes I need to make to my product in order to get the EEF code to run in my product?

Thanks.

Re: [EEF] Converting EEF to standalone [message #516223 is a reply to message #516083] Tue, 23 February 2010 04:29 Go to previous messageGo to next message
Stephane Bouchet is currently offline Stephane Bouchet
Messages: 239
Registered: July 2009
Senior Member
hi herb,

comments below :

Herb Miller a écrit :
> When I added the EEF tutorial to my project, my project already had a
> standalone product that worked. Now that I have the EEF stuff working,
> I re-synchronized my product and launched an Eclipse application from
> the Overview tab of the product page.
>
> My old product ran instead of the EEF changes. I assume there are some
> changes that need to be made to the product. Maybe the application
> needs to change.
>
> Does anyone know what changes I need to make to my product in order to
> get the EEF code to run in my product?
>
> Thanks.
>
>

As i understand, you want to add the EEF generated code in your product
? If so, you need to add the plugin that contains EEF generates code and
eef runtime dependencies to your product.

you may also modify the plugins dependencies in the "plugins" tab in the
launch configuration of the product .

--
Cheers,

Stéphane Bouchet, OBEO
Re: [EEF] Converting EEF to standalone [message #516366 is a reply to message #516223] Tue, 23 February 2010 13:13 Go to previous messageGo to next message
Herb Miller is currently offline Herb Miller
Messages: 139
Registered: January 2010
Senior Member
Well, maybe I did not explain it too clearly.

I started with an EMF model named Myapp. I made the genmodel. Then I generated Myapp.edit, Myapp.editor and Myapp.tests (standard EMF stuff).

In the Myapp.editor I added a product based on the editor. I built the product and deployed it and it ran fine.

In this same workspace, I added the EEF code to the Myapp.edit project, and I continued until the EEF code worked all the way through the Myapp.editor. The Myapp.editor works fine with the EEF code added as long as I run it as an Eclipse Application.

Then I tried to rebuild my product. When I rebuild the product, I get this error (and boy is it a long one):

C:\Users\hmiller\workspace_rcp2\.metadata\.plugins\org.eclip se.pde.core\temp\org.eclipse.pde.container.feature\assemble. org.eclipse.pde.container.feature.p2.xml:33: The following error occurred while executing this line:
Target "gather.sources" does not exist in the project "Publish p2 metadata".

Is there something in the EEF code that breaks the product build?

Since the code in the product used the Myapp.editor project, the Dependencies in the product are the same as the Myapp.editor. In other words, the EEF runtime, and the Myapp.edit projects are already dependencies. But the product still will not build.

Should I delete the current product and try to build a new one? Maybe there were so many changes that the old product will not build?

Thanks,
Herb



Re: [EEF] Converting EEF to standalone [message #516448 is a reply to message #516083] Tue, 23 February 2010 19:02 Go to previous messageGo to next message
Miles Parker is currently offline Miles Parker
Messages: 1266
Registered: July 2009
Senior Member

Hi Herb,

FWIW, I have been testing a product using EEF and I haven't seen any particular issues. It does sort of sound like this is outside of scope of EEF. It would probably be useful for you to get an overview of product packaging / etc.. to get a sense for how this all fits together. There is quite a bit there to grok. Here's a good place to start:

http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .pde.doc.user/guide/tools/editors/product_editor/dependencie s.htm

hth!

Miles
Re: [EEF] Converting EEF to standalone [message #516613 is a reply to message #516366] Wed, 24 February 2010 05:18 Go to previous messageGo to next message
Stephane Bouchet is currently offline Stephane Bouchet
Messages: 239
Registered: July 2009
Senior Member
Herb,

As mikes says, i supect too there is somethnig missing on your product
configuration.

If EEF is working well in a runtime, it might work as well in RCP.

did you try to export the 3 projects alone and install them in a fresh
eclipse to simulates the product build ?

Herb Miller a écrit :
> Well, maybe I did not explain it too clearly.
>
> I started with an EMF model named Myapp. I made the genmodel. Then I
> generated Myapp.edit, Myapp.editor and Myapp.tests (standard EMF stuff).
>
> In the Myapp.editor I added a product based on the editor. I built the
> product and deployed it and it ran fine.
>
> In this same workspace, I added the EEF code to the Myapp.edit project,
> and I continued until the EEF code worked all the way through the
> Myapp.editor. The Myapp.editor works fine with the EEF code added as
> long as I run it as an Eclipse Application.
>
> Then I tried to rebuild my product. When I rebuild the product, I get
> this error (and boy is it a long one):
>
> C:\Users\hmiller\workspace_rcp2\.metadata\.plugins\org.eclip
> se.pde.core\temp\org.eclipse.pde.container.feature\assemble.
> org.eclipse.pde.container.feature.p2.xml:33: The following error
> occurred while executing this line:
> Target "gather.sources" does not exist in the project "Publish p2
> metadata".
> Is there something in the EEF code that breaks the product build?
>
> Since the code in the product used the Myapp.editor project, the
> Dependencies in the product are the same as the Myapp.editor. In other
> words, the EEF runtime, and the Myapp.edit projects are already
> dependencies. But the product still will not build.
>
> Should I delete the current product and try to build a new one? Maybe
> there were so many changes that the old product will not build?
>
> Thanks,
> Herb
>
>
>
>


--
Cheers,

Stéphane Bouchet, OBEO
Re: [EEF] Converting EEF to standalone [message #516654 is a reply to message #516083] Wed, 24 February 2010 11:56 Go to previous messageGo to next message
Herb Miller is currently offline Herb Miller
Messages: 139
Registered: January 2010
Senior Member
Miles and Stéphane,
Thanks.

Let me do some "grok"ing, and I will reply again.

If I can figure how to export the model, edit and editor projects, I will try that approach. In the meantime, I will try to get smarter before I ask the next question.

Thanks.
Re: [EEF] Converting EEF to standalone [message #516759 is a reply to message #516654] Wed, 24 February 2010 20:04 Go to previous messageGo to next message
Miles Parker is currently offline Miles Parker
Messages: 1266
Registered: July 2009
Senior Member
Herb Miller wrote on Wed, 24 February 2010 11:56
In the meantime, I will try to get smarter before I ask the next question.



I think you mean "more indoctrinated" Very Happy. We've all been on various branches of the Eclipse learning path so my advice is really meant to be helpful and not discouraging of questions -- personally I found that with Eclipse plumbing that my default style of "learning by doing" didn't work so well, and I did need to spend some time reading up in order to get up to speed on various things. Also, if you find yourself really puzzled by something general, the newcomer forum is really helpful even for those of us who aren't so new to Eclipse.

[Updated on: Wed, 24 February 2010 20:06]

Report message to a moderator

Re: [EEF] Converting EEF to standalone [message #517028 is a reply to message #516759] Thu, 25 February 2010 14:31 Go to previous messageGo to next message
Herb Miller is currently offline Herb Miller
Messages: 139
Registered: January 2010
Senior Member
Thanks for the advice.

I won't get discouraged. I was just commenting on the use of the word "gork". I had not seen it in a while.

Okay, I finally deleted the old product file from my editor project. I built a brand new product file. This works a lot better.

Before running the export wizard to build a standalone product, I went to the product overview tab. I selected synchronize, and then I launched the eclipse application from the product overview page.

It worked perfectly - nothing like the old product. All indications were good for using the export wizard.

I ran the export wizard and deployed the product. The deployment worked great.

The problem showed up when I ran the standalone app. It opened up and appeared normal. I loaded a model and selected a non-root node. The EEF forms opened up in the properties area, but the form was blank. The forms had no labels and no field widgets. The only thing showing was the outline and the tab that says Base.

The product ran great when launched from inside eclipse as a product. The EEF form widgets did not show up when I ran the standalone app outside of eclipse.

Any ideas?

Thanks.


Re: [EEF] Converting EEF to standalone [message #517036 is a reply to message #517028] Thu, 25 February 2010 15:09 Go to previous messageGo to next message
Miles Parker is currently offline Miles Parker
Messages: 1266
Registered: July 2009
Senior Member

Herb, please see below..

Herb Miller wrote on Thu, 25 February 2010 14:31

The problem showed up when I ran the standalone app. It opened up and appeared normal. I loaded a model and selected a non-root node. The EEF forms opened up in the properties area, but the form was blank. The forms had no labels and no field widgets. The only thing showing was the outline and the tab that says Base.

The product ran great when launched from inside eclipse as a product. The EEF form widgets did not show up when I ran the standalone app outside of eclipse.



Hmm..that's difficult to diagnose. One of the confusing aspects I've noticed about testing this stuff is that there are somethings that work fine when working in self-hosted mode, but not when using the results of the PDE build. The biggest issue where this comes up is in plugin packaging. For example, you can get away with leaving out an artifact from the build.properties in self-hosted but it won't show up under PDE build. Just one thing that has bitten me that might be useful to share. So one thing to look at is the actual packagin of the RCP app. Go into the plugins and make sure that everything that is there should be there. YOu might even uncompress the plugins and check the contents. Sorry I can't give you too much to go on there.

There might also simply be something in the build definition that isn't including everything in your target platform for some reason. Are you seeing any markers for dependnecies? Anything in your error log?
Re: [EEF] Converting EEF to standalone [message #517050 is a reply to message #516083] Thu, 25 February 2010 16:58 Go to previous messageGo to next message
Herb Miller is currently offline Herb Miller
Messages: 139
Registered: January 2010
Senior Member
I don't get any errors when I generate the standalone app, and I don't get any errors when I run it.

I did a comparison of the dependencies between the plugin that is used to build the app and the app itself. I did find some discrepancies, but I don't know if they are significant or not.

The plugin seemed to have a few more dependencies than the standalone app, like:
com.instantiations.designer.jdt.fragment and a few other jdt related dependencies.

I wonder if this is something that should be posted on the RCP forum?

Thanks.



Re: [EEF] Converting EEF to standalone [message #517052 is a reply to message #517050] Thu, 25 February 2010 17:14 Go to previous messageGo to next message
Miles Parker is currently offline Miles Parker
Messages: 1266
Registered: July 2009
Senior Member

See below. Smile

Herb Miller wrote on Thu, 25 February 2010 16:58
I don't get any errors when I generate the standalone app, and I don't get any errors when I run it.

I did a comparison of the dependencies between the plugin that is used to build the app and the app itself. I did find some discrepancies, but I don't know if they are significant or not.

The plugin seemed to have a few more dependencies than the standalone app, like:
com.instantiations.designer.jdt.fragment and a few other jdt related dependencies.

I wonder if this is something that should be posted on the RCP forum?



Yah, or perhaps PDE. My approach to this stuff is "if in doubt throw it in". One issue with the product definition is that I'm not sure that the add dependencies works in the same way. One thing to try is to create a runtime Eclipse application with your plugins, add dependencies, and then see if there are any descripencies. And actually -- yeah try this -- if you get the Runtime App working, you can create a product from that and then compare the two of those...

hope it helps,

Miles
Re: [EEF] Converting EEF to standalone [message #517060 is a reply to message #517052] Thu, 25 February 2010 18:21 Go to previous messageGo to next message
Herb Miller is currently offline Herb Miller
Messages: 139
Registered: January 2010
Senior Member
Unless I am missing something, that is what I did first and it works great.

I started by running my plugin as an eclipse application by doing a "Run As" - "Eclipse Application" (worked great!).

Then I created a new product configuration, and I tested it from the Overview tab by synchronizing it and launching an eclipse application (again, worked great!).

Then I generated the standalone app with the new configuration overview tab export wizard. The generation worked with no errors. The standalone app would not display the EEF forms properly.

I think I will ask a question about this in the PDE forum.

Thanks.


Re: [EEF] Converting EEF to standalone [message #517110 is a reply to message #517060] Fri, 26 February 2010 04:45 Go to previous messageGo to next message
Stephane Bouchet is currently offline Stephane Bouchet
Messages: 239
Registered: July 2009
Senior Member
Herb,

As miles said, it could simply be a missing file in the build.properties
of one of your plugin. It happened to me lots of time :)

you can also verify the 'error' view in your product is its available,
or the .log file that resides in the .metadata folder in your product
workspace.


Herb Miller a écrit :
> Unless I am missing something, that is what I did first and it works great.
>
> I started by running my plugin as an eclipse application by doing a "Run
> As" - "Eclipse Application" (worked great!).
>
> Then I created a new product configuration, and I tested it from the
> Overview tab by synchronizing it and launching an eclipse application
> (again, worked great!).
>
> Then I generated the standalone app with the new configuration overview
> tab export wizard. The generation worked with no errors. The
> standalone app would not display the EEF forms properly.
>
> I think I will ask a question about this in the PDE forum.
>
> Thanks.
>
>
>


--
Cheers,

Stéphane Bouchet, OBEO
Re: [EEF] Converting EEF to standalone [message #517264 is a reply to message #516083] Fri, 26 February 2010 12:52 Go to previous messageGo to next message
Herb Miller is currently offline Herb Miller
Messages: 139
Registered: January 2010
Senior Member
I do not get a .log file in the .metadata directory of my standalone application. The only thing there is a directory named .plugins.

I definitely do not get any errors when I launch the app from eclipse. It works great in that case.

This is what is in my build.properties file:
bin.includes = .,\
icons/,\
META-INF/,\
plugin.xml,\
plugin.properties,\
build.properties,\
com.cfi.emfrcp1.editor.product2.product
jars.compile.order = .
source.. = src/
output.. = bin/

I do not know what to try next.

It is real close. Only the GUI widgets are not displaying in the form in the properties view.

One other thing. When I run from the workbench and I double-click on a tree node, a pop-up dialog appears. This does not happen when I run the app as standalone. Nothing pops up, bit I do not get an error indication either.

No one has answered me from the PDE forum.

Any ideas?

Thanks.
Re: [EEF] Converting EEF to standalone [message #517337 is a reply to message #517264] Fri, 26 February 2010 19:41 Go to previous messageGo to next message
Miles Parker is currently offline Miles Parker
Messages: 1266
Registered: July 2009
Senior Member
Herb,

Are you sure that you have the eef.runtime in the product definition and in the rcp product? Check your RCP installation details and make sure that plugin is there.
Re: [EEF] Converting EEF to standalone [message #517681 is a reply to message #516083] Mon, 01 March 2010 11:50 Go to previous messageGo to next message
Herb Miller is currently offline Herb Miller
Messages: 139
Registered: January 2010
Senior Member
It appears to be there.

I went to my editor project in the workspace and selected the product file (double-clicked it). Then I selected the Dependencies tab. About half-way down the list is this entry:
org.eclipse.emf.eef.runtime

I am thinking now that I should try your other suggestion. Maybe I should try to move the 1st 2 projects of this workspace to another "clean" workspace. Then I could try re-generating everything. Maybe there is some workspace artifact that is preventing the GUI widgets from displaying.

If you have other ideas, please let me know. I will post again when I have tried to re-generate in a clean workspace.

Thanks.


Re: [EEF] Converting EEF to standalone [message #518072 is a reply to message #517681] Tue, 02 March 2010 17:29 Go to previous messageGo to next message
Herb Miller is currently offline Herb Miller
Messages: 139
Registered: January 2010
Senior Member
It took a while, but I rebuilt everything in a clean workspace, and I still have the same problem.

I generated the model, edit and editor code. I added the EEF changes (initialize, generate, src-gen, dependencies, plug-in edit, code changes).

The editor ran perfectly when launched from the workbench as an Eclipse application. The window popped up. I loaded a model file. I expanded and selected a node and the EEF generated form opened up in the properties view with all GUI widgets visible and filled with data.

I created a product in the editor project, synchronized and launched it from the product overview tab as an Eclipse application - this also worked great.

Then I deployed the application. The deployment worked great. Then I ran the application as a standalone deployed product. The window popped up, I loaded a model file, I expanded the tree and selected a node and the EEF generated form opened up in the properties view but NO WIDGETS WERE VISIBLE.

The outline of the form, and the tab that says Base were visible, but no labels or text boxes, etc.

I was able to accidentally duplicate this behavior when running as an Eclipse application in the workbench. This same behavior occurred if I did not export the "providers" (note plural) package from the edit project. The "provider" class was already exported.

Any more ideas?

Thanks.
Re: [EEF] Converting EEF to standalone [message #518091 is a reply to message #518072] Tue, 02 March 2010 19:56 Go to previous messageGo to next message
Miles Parker is currently offline Miles Parker
Messages: 1266
Registered: July 2009
Senior Member
Herb Miller wrote on Tue, 02 March 2010 17:29
I
I was able to accidentally duplicate this behavior when running as an Eclipse application in the workbench. This same behavior occurred if I did not export the "providers" (note plural) package from the edit project. The "provider" class was already exported.



Something odd is certainly going on here. But this is progress! My guess is that your extensions are not being registered or they aren't being picked up. Perhaps there is something going on on on the EFF side. In your RCP app, open the "Plugin Registry" view (you'd need include the relevant PDE stuff in your RCP build if it isn't already there). You should be able to see the EEF registered providers there. If not then that narrows it down.

I haven't actually tried to do an EEF standalone app yet, but I'll let you know if I run into any issues there. Curious if you've tried to run the tarot example projects..
Re: [EEF] Converting EEF to standalone [message #518144 is a reply to message #518091] Wed, 03 March 2010 04:22 Go to previous messageGo to next message
Stephane Bouchet is currently offline Stephane Bouchet
Messages: 239
Registered: July 2009
Senior Member
Hi guys,

i am curious too to know what's going on on this issue.

Miles Parker a écrit :
> Herb Miller wrote on Tue, 02 March 2010 17:29
>> I
>> I was able to accidentally duplicate this behavior when running as an
>> Eclipse application in the workbench. This same behavior occurred if
>> I did not export the "providers" (note plural) package from the edit
>> project. The "provider" class was already exported.
>

HUmmm, this may cause the problem. the "providers" package is used by
the EEF extension points to provide forms view, and is indeed necessary
to make EEF working :)

Try to export every packages in the .edit project and re-create your
application.


>
> Something odd is certainly going on here. But this is progress! My guess
> is that your extensions are not being registered or they aren't being
> picked up. Perhaps there is something going on on on the EFF side. In
> your RCP app, open the "Plugin Registry" view (you'd need include the
> relevant PDE stuff in your RCP build if it isn't already there). You
> should be able to see the EEF registered providers there. If not then
> that narrows it down.
>
> I haven't actually tried to do an EEF standalone app yet, but I'll let
> you know if I run into any issues there. Curious if you've tried to run
> the tarot example projects..


--
Cheers,

Stéphane Bouchet, OBEO
Re: [EEF] Converting EEF to standalone [message #518305 is a reply to message #516083] Wed, 03 March 2010 12:36 Go to previous messageGo to next message
Herb Miller is currently offline Herb Miller
Messages: 139
Registered: January 2010
Senior Member
I hope this isn't a re-post. I thought I sent this message yesterday. Maybe my browser is not working correctly. The EMF forum says 18 replies, but I only count 16. Is there some way to see more pages? Please email me here if that is the case:
hmiller@cohesionforce.com

I recreated everything in a clean workspace and the same problem occurred. All the widgets show perfectly when I launch from the workbench as an Eclipse application. It also works great when I create a product and launch from the Overview tab of the Product page.

When I deploy, the deployment goes well, but when I launch the deployed standalone version and load a model and click on a node, the form that comes up in the properties view has no widgets. You can tell the form tries to display. You can see the form outline and the tab at the upper left that says Base - but no widgets are displayed. They do display in the other cases (i.e. launch from workbench).

I was able to duplicate this condition accidentally when I forgot to export the "providers" package (note plural) from the edit project. The "provider" package was automatically exported.

Any ideas?

Thanks.

Re: [EEF] Converting EEF to standalone [message #518311 is a reply to message #518305] Wed, 03 March 2010 12:54 Go to previous messageGo to next message
Herb Miller is currently offline Herb Miller
Messages: 139
Registered: January 2010
Senior Member
After my last post, I checked the standalone app that was deployed. It has a repository directory with plugin files and it has an application directory with plugin files. In both places the edit project jar file was delivered without the "providers" .class files. The "provider" .class files were there. I am in the process of hand building a jar file with both provider and providers. I will post again if this fixes the problem.

Thanks.

Re: [EEF] Converting EEF to standalone [message #518321 is a reply to message #518144] Wed, 03 March 2010 14:01 Go to previous messageGo to next message
Herb Miller is currently offline Herb Miller
Messages: 139
Registered: January 2010
Senior Member
Stephane,
I finally discovered the tree view in the forum. For some reason, I could not see your last post until I went to the tree view.

As you can see, I am pursuing the "providers" problem. I will try what you said to see if I can get the "providers" to export from the edit project. I will let you know how it goes.

Thanks.


Re: [EEF] Converting EEF to standalone [message #518342 is a reply to message #518311] Wed, 03 March 2010 15:35 Go to previous messageGo to next message
Herb Miller is currently offline Herb Miller
Messages: 139
Registered: January 2010
Senior Member
I found the problem.

The build.properties file in the edit project had to be modified.

Old:
source.. = src/

New:
source.. = src/, \
src-gen

When I originally added the src-gen folder to the edit project, I selected the edit project and used the right-mouse button to select New->Source folder. One would think that this would have updated the src entry in the build.properties file.

I also used the right-mouse button on the src-gen folder and used Build Path-> Configure Build Path to bring up the "Java Build Path" view in order to check the src-gen folder. The src-gen folder showed up in the "Source" tab and the "Order and Export" tab.

For some reason, it was not in the build.properties file. As soon as I added the src-gen in the build.properties file, everything started working.

I checked the tutorial. It suggested using the Build Path->Use as a source folder option. I could not find that option.

Thanks Miles and Stephane for your help.



Re: [EEF] Converting EEF to standalone [message #518370 is a reply to message #518342] Wed, 03 March 2010 17:12 Go to previous messageGo to next message
Miles Parker is currently offline Miles Parker
Messages: 1266
Registered: July 2009
Senior Member
Herb, that's good news. Configuration hassles alas are par for the course. As I think I mentioned, there is a big mismatch between what you get from hosted runtime application and PDE build. I'm not surprised that there is a mismatch between the build path stuff and what is actually going on.

The best single advice I can give on that is to pretend the "Build Path" item and any of the rest of the standard project UI is just not there. You should always be referring to and editing the PDE / plugin build information, i.e. the editor that shows up when you open one of the project resources such as build.properties.

cheers,

Miles

Herb Miller wrote on Wed, 03 March 2010 15:35
I found the problem.

The build.properties file in the edit project had to be modified.

Old:
source.. = src/

New:
source.. = src/, \
src-gen

When I originally added the src-gen folder to the edit project, I selected the edit project and used the right-mouse button to select New->Source folder. One would think that this would have updated the src entry in the build.properties file.

I also used the right-mouse button on the src-gen folder and used Build Path-> Configure Build Path to bring up the "Java Build Path" view in order to check the src-gen folder. The src-gen folder showed up in the "Source" tab and the "Order and Export" tab.

For some reason, it was not in the build.properties file. As soon as I added the src-gen in the build.properties file, everything started working.

I checked the tutorial. It suggested using the Build Path->Use as a source folder option. I could not find that option.

Thanks Miles and Stephane for your help.





Re: [EEF] Converting EEF to standalone [message #518601 is a reply to message #516083] Thu, 04 March 2010 10:30 Go to previous message
Stephane Bouchet is currently offline Stephane Bouchet
Messages: 239
Registered: July 2009
Senior Member
Hi Herb,

congrats to finally make it :)
Just 2 things :

first, i am using the forums the old-style-way, using it via nntp ( AKA
news.eclipse.org / newsgroup ) so i get all your messages.

Second, when you export product or plugin, PDE will base it's build on
the build.properties files to know which sources files to compile and
what to include in the jar. this is totally different from the runtime
process that is based on the .classpath file.
this is a common mistake made by all of us ( and me first :D )

anyway, i will update the tutorial with this tip.


Herb Miller a écrit :
> When I added the EEF tutorial to my project, my project already had a
> standalone product that worked. Now that I have the EEF stuff working,
> I re-synchronized my product and launched an Eclipse application from
> the Overview tab of the product page.
>
> My old product ran instead of the EEF changes. I assume there are some
> changes that need to be made to the product. Maybe the application
> needs to change.
>
> Does anyone know what changes I need to make to my product in order to
> get the EEF code to run in my product?
>
> Thanks.
>
>


--
Cheers,

Stéphane Bouchet, OBEO
Re: [EEF] Converting EEF to standalone [message #622201 is a reply to message #516223] Tue, 23 February 2010 13:13 Go to previous message
Herb Miller is currently offline Herb Miller
Messages: 139
Registered: January 2010
Senior Member
Well, maybe I did not explain it too clearly.

I started with an EMF model named Myapp. I made the genmodel. Then I generated Myapp.edit, Myapp.editor and Myapp.tests (standard EMF stuff).

In the Myapp.editor I added a product based on the editor. I built the product and deployed it and it ran fine.

In this same workspace, I added the EEF code to the Myapp.edit project, and I continued until the EEF code worked all the way through the Myapp.editor. The Myapp.editor works fine with the EEF code added as long as I run it as an Eclipse Application.

Then I tried to rebuild my product. When I rebuild the product, I get this error (and boy is it a long one):

C:\Users\hmiller\workspace_rcp2\.metadata\.plugins\org.eclip se.pde.core\temp\org.eclipse.pde.container.feature\assemble. org.eclipse.pde.container.feature.p2.xml:33: The following error occurred while executing this line:
Target "gather.sources" does not exist in the project "Publish p2 metadata".

Is there something in the EEF code that breaks the product build?

Since the code in the product used the Myapp.editor project, the Dependencies in the product are the same as the Myapp.editor. In other words, the EEF runtime, and the Myapp.edit projects are already dependencies. But the product still will not build.

Should I delete the current product and try to build a new one? Maybe there were so many changes that the old product will not build?

Thanks,
Herb
Re: [EEF] Converting EEF to standalone [message #622216 is a reply to message #622201] Wed, 24 February 2010 10:14 Go to previous message
Stephane Bouchet is currently offline Stephane Bouchet
Messages: 239
Registered: July 2009
Senior Member
Herb,

As mikes says, i supect too there is somethnig missing on your product
configuration.

If EEF is working well in a runtime, it might work as well in RCP.

did you try to export the 3 projects alone and install them in a fresh
eclipse to simulates the product build ?

Herb Miller a écrit :
> Well, maybe I did not explain it too clearly.
>
> I started with an EMF model named Myapp. I made the genmodel. Then I
> generated Myapp.edit, Myapp.editor and Myapp.tests (standard EMF stuff).
>
> In the Myapp.editor I added a product based on the editor. I built the
> product and deployed it and it ran fine.
>
> In this same workspace, I added the EEF code to the Myapp.edit project,
> and I continued until the EEF code worked all the way through the
> Myapp.editor. The Myapp.editor works fine with the EEF code added as
> long as I run it as an Eclipse Application.
>
> Then I tried to rebuild my product. When I rebuild the product, I get
> this error (and boy is it a long one):
>
> C:\Users\hmiller\workspace_rcp2\.metadata\.plugins\org.eclip
> se.pde.core\temp\org.eclipse.pde.container.feature\assemble.
> org.eclipse.pde.container.feature.p2.xml:33: The following error
> occurred while executing this line:
> Target "gather.sources" does not exist in the project "Publish p2
> metadata".
> Is there something in the EEF code that breaks the product build?
>
> Since the code in the product used the Myapp.editor project, the
> Dependencies in the product are the same as the Myapp.editor. In other
> words, the EEF runtime, and the Myapp.edit projects are already
> dependencies. But the product still will not build.
>
> Should I delete the current product and try to build a new one? Maybe
> there were so many changes that the old product will not build?
>
> Thanks,
> Herb
>
>
>
>


--
Cheers,

Stéphane Bouchet, OBEO
Re: [EEF] Converting EEF to standalone [message #622257 is a reply to message #517681] Tue, 02 March 2010 17:29 Go to previous message
Herb Miller is currently offline Herb Miller
Messages: 139
Registered: January 2010
Senior Member
It took a while, but I rebuilt everything in a clean workspace, and I still have the same problem.

I generated the model, edit and editor code. I added the EEF changes (initialize, generate, src-gen, dependencies, plug-in edit, code changes).

The editor ran perfectly when launched from the workbench as an Eclipse application. The window popped up. I loaded a model file. I expanded and selected a node and the EEF generated form opened up in the properties view with all GUI widgets visible and filled with data.

I created a product in the editor project, synchronized and launched it from the product overview tab as an Eclipse application - this also worked great.

Then I deployed the application. The deployment worked great. Then I ran the application as a standalone deployed product. The window popped up, I loaded a model file, I expanded the tree and selected a node and the EEF generated form opened up in the properties view but NO WIDGETS WERE VISIBLE.

The outline of the form, and the tab that says Base were visible, but no labels or text boxes, etc.

I was able to accidentally duplicate this behavior when running as an Eclipse application in the workbench. This same behavior occurred if I did not export the "providers" (note plural) package from the edit project. The "provider" class was already exported.

Any more ideas?

Thanks.
Re: [EEF] Converting EEF to standalone [message #622258 is a reply to message #622257] Tue, 02 March 2010 19:56 Go to previous message
Miles Parker is currently offline Miles Parker
Messages: 1266
Registered: July 2009
Senior Member
Herb Miller wrote on Tue, 02 March 2010 17:29
> I
> I was able to accidentally duplicate this behavior when running as an Eclipse application in the workbench. This same behavior occurred if I did not export the "providers" (note plural) package from the edit project. The "provider" class was already exported.


Something odd is certainly going on here. But this is progress! My guess is that your extensions are not being registered or they aren't being picked up. Perhaps there is something going on on on the EFF side. In your RCP app, open the "Plugin Registry" view (you'd need include the relevant PDE stuff in your RCP build if it isn't already there). You should be able to see the EEF registered providers there. If not then that narrows it down.

I haven't actually tried to do an EEF standalone app yet, but I'll let you know if I run into any issues there. Curious if you've tried to run the tarot example projects..
Re: [EEF] Converting EEF to standalone [message #622259 is a reply to message #622258] Wed, 03 March 2010 04:22 Go to previous message
Stephane Bouchet is currently offline Stephane Bouchet
Messages: 239
Registered: July 2009
Senior Member
Hi guys,

i am curious too to know what's going on on this issue.

Miles Parker a écrit :
> Herb Miller wrote on Tue, 02 March 2010 17:29
>> I
>> I was able to accidentally duplicate this behavior when running as an
>> Eclipse application in the workbench. This same behavior occurred if
>> I did not export the "providers" (note plural) package from the edit
>> project. The "provider" class was already exported.
>

HUmmm, this may cause the problem. the "providers" package is used by
the EEF extension points to provide forms view, and is indeed necessary
to make EEF working :)

Try to export every packages in the .edit project and re-create your
application.


>
> Something odd is certainly going on here. But this is progress! My guess
> is that your extensions are not being registered or they aren't being
> picked up. Perhaps there is something going on on on the EFF side. In
> your RCP app, open the "Plugin Registry" view (you'd need include the
> relevant PDE stuff in your RCP build if it isn't already there). You
> should be able to see the EEF registered providers there. If not then
> that narrows it down.
>
> I haven't actually tried to do an EEF standalone app yet, but I'll let
> you know if I run into any issues there. Curious if you've tried to run
> the tarot example projects..


--
Cheers,

Stéphane Bouchet, OBEO
Re: [EEF] Converting EEF to standalone [message #622264 is a reply to message #518305] Wed, 03 March 2010 12:54 Go to previous message
Herb Miller is currently offline Herb Miller
Messages: 139
Registered: January 2010
Senior Member
After my last post, I checked the standalone app that was deployed. It has a repository directory with plugin files and it has an application directory with plugin files. In both places the edit project jar file was delivered without the "providers" .class files. The "provider" .class files were there. I am in the process of hand building a jar file with both provider and providers. I will post again if this fixes the problem.

Thanks.
Re: [EEF] Converting EEF to standalone [message #622265 is a reply to message #518144] Wed, 03 March 2010 14:01 Go to previous message
Herb Miller is currently offline Herb Miller
Messages: 139
Registered: January 2010
Senior Member
Stephane,
I finally discovered the tree view in the forum. For some reason, I could not see your last post until I went to the tree view.

As you can see, I am pursuing the "providers" problem. I will try what you said to see if I can get the "providers" to export from the edit project. I will let you know how it goes.

Thanks.
Re: [EEF] Converting EEF to standalone [message #622266 is a reply to message #622264] Wed, 03 March 2010 15:35 Go to previous message
Herb Miller is currently offline Herb Miller
Messages: 139
Registered: January 2010
Senior Member
I found the problem.

The build.properties file in the edit project had to be modified.

Old:
source.. = src/

New:
source.. = src/, \
src-gen

When I originally added the src-gen folder to the edit project, I selected the edit project and used the right-mouse button to select New->Source folder. One would think that this would have updated the src entry in the build.properties file.

I also used the right-mouse button on the src-gen folder and used Build Path-> Configure Build Path to bring up the "Java Build Path" view in order to check the src-gen folder. The src-gen folder showed up in the "Source" tab and the "Order and Export" tab.

For some reason, it was not in the build.properties file. As soon as I added the src-gen in the build.properties file, everything started working.

I checked the tutorial. It suggested using the Build Path->Use as a source folder option. I could not find that option.

Thanks Miles and Stephane for your help.
Re: [EEF] Converting EEF to standalone [message #622267 is a reply to message #622266] Wed, 03 March 2010 17:12 Go to previous message
Miles Parker is currently offline Miles Parker
Messages: 1266
Registered: July 2009
Senior Member
Herb, that's good news. Configuration hassles alas are par for the course. As I think I mentioned, there is a big mismatch between what you get from hosted runtime application and PDE build. I'm not surprised that there is a mismatch between the build path stuff and what is actually going on.

The best single advice I can give on that is to pretend the "Build Path" item and any of the rest of the standard project UI is just not there. You should always be referring to and editing the PDE / plugin build information, i.e. the editor that shows up when you open one of the project resources such as build.properties.

cheers,

Miles

Herb Miller wrote on Wed, 03 March 2010 15:35
> I found the problem.
>
> The build.properties file in the edit project had to be modified.
>
> Old:
> source.. = src/
>
> New:
> source.. = src/, \
> src-gen
>
> When I originally added the src-gen folder to the edit project, I selected the edit project and used the right-mouse button to select New->Source folder. One would think that this would have updated the src entry in the build.properties file.
>
> I also used the right-mouse button on the src-gen folder and used Build Path-> Configure Build Path to bring up the "Java Build Path" view in order to check the src-gen folder. The src-gen folder showed up in the "Source" tab and the "Order and Export" tab.
>
> For some reason, it was not in the build.properties file. As soon as I added the src-gen in the build.properties file, everything started working.
>
> I checked the tutorial. It suggested using the Build Path->Use as a source folder option. I could not find that option.
>
> Thanks Miles and Stephane for your help.
Previous Topic:Shift-tab does not work in compare
Next Topic:[EEF] Converting EEF to standalone
Goto Forum:
  


Current Time: Wed May 22 23:49:29 EDT 2013

Powered by FUDForum. Page generated in 0.03376 seconds