|
|
|
|
|
Re: [EMFForms] Embedding EMFForms to my own RAP App [message #1279245 is a reply to message #1278632] |
Fri, 28 March 2014 12:59 |
Jonas Helming Messages: 699 Registered: July 2009 |
Senior Member |
|
|
Hi Phil,
in general, if you use the provider layer, you will not need to
implement a reference service. There is a bridge, an implementation of
the reference service, which accesses an ECPProject
Another comment: If you run ECP on RAP, there are open issues (at least
for the EMFStore provider):
https://bugs.eclipse.org/bugs/show_bug.cgi?id=428912
I would guess, that some of them also apply for the CDO Provider
(especially https://bugs.eclipse.org/bugs/show_bug.cgi?id=429222), so
please test at least the multi-user case.
Regards
Jonas
Am 27.03.2014 17:12, schrieb Phil Wim:
> Hi Eugen,
>
> it was the missing bundle. Thx!
>
> In "Getting started with EMFForms" Jonas mentioned that referencing
> features are not working out of the box. Which API do I have to use to
> get it running? Would it work if I use ECP related Provider (in my case
> CDOProvider)? If so, is there any manual next to Javadoc which explains
> the ecp api. E.g. What I need to retrieve an EObject of an DataProvider?
>
> Cheers
> Philippe
>
|
|
|
|
|
Re: [EMFForms] Embedding EMFForms to my own RAP App [message #1310363 is a reply to message #1277201] |
Wed, 23 April 2014 06:26 |
Phil Wim Messages: 89 Registered: October 2013 |
Member |
|
|
Hi Jonas,
yes, that is my intention. I need an online CDO Provider. I thought it is enough to create my own ReferenceServiceImpl. Therefor I adapted the methods to work with my CDOSession and added it as an extension point. Then, the trouble started.
I can add the container to my parent editor. I see a minor formatted ecp-form (no margins, no title bar, etc). With my adaption of "openInNewContext" (see following listing) I'm able to open a reference eObject (I used the method EditorModelElementOpener .openModelElement of the bridge) . Than it looks like a real ecp-form. But there's no validation and the ReferenceService which is used for the real looking ecp-form is switched back to ECPReferenceServiceImpl. That's probably because I'm using the MEEditorInput.
public void openInNewContext(EObject eObject) {
System.out.println("MyReferenceService: openInNewContext");
final MEEditorInput input = new MEEditorInput(new EditorContext((EObject) eObject,null));
try {
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
.openEditor(input, "org.eclipse.emf.ecp.editor", true);
} catch (final PartInitException e) {
Activator.logException(e);
}
ECPHandlerHelper.openModelElement(eObject, null);
}
I really want to integrate it into my own application. But I have no idea how to proceed or to write my own EMFForms ReferenceService without ECP related artifacts (ECPProject, ECPRepository).
Can you provide a simple example of how to implement it?
Are you guys planning an online CDOProvider?
Thanks Philippe
|
|
|
Re: [EMFForms] Embedding EMFForms to my own RAP App [message #1310637 is a reply to message #1310363] |
Wed, 23 April 2014 09:51 |
Jonas Helming Messages: 699 Registered: July 2009 |
Senior Member |
|
|
Hi Phil,
to avoid any misunderstandings. There are two options for you:
1. You implement a CDO online provider. We had plans to do this since
quite some time, so we will be happy to accept this contribution. The
Provider SPI is provided and offered by EMF Client Platform. It is not
directly related to EMF Forms.
If you implement a Provider, you will be able to use the model explorer,
the repositories view and the editor. To implement a CDO provider, you
should look at the bundles
- org.eclipse.emf.ecp.cdo.core
- org.eclipse.emf.ecp.cdo.ui
These implement the current offline CDO provider.
I also expect you need a customized implementation for the reference
service, even if you implement the online provider. As an example, the
select reference dialog, should probably not load all availabel objects,
but allow to query.
2. You only implement the reference service. This interface is provided
by EMF Forms and has nothing to do with ECP. It is the abstraction of
the backend, which is required by the reference controls in EMF Forms.
In this case, you should avoid all dependencies to ECPProject and ecp
core bundles.
About your question: How do you opened the editor in the first place?
Best regards
Jonas
Am 23.04.2014 08:26, schrieb Phil Wim:
> Hi Jonas,
>
> yes, that is my intention. I need an online CDO Provider. I thought it
> is enough to create my own ReferenceServiceImpl. Therefor I adapted the
> methods to work with my CDOSession and added it as an extension point.
> Then, the trouble started. :)
> I can add the container to my parent editor. I see a minor formatted
> ecp-form (no margins, no title bar, etc). With my adaption of
> "openInNewContext" (see following listing) I'm able to open a reference
> eObject (I used the method EditorModelElementOpener .openModelElement of
> the bridge) . Than it looks like a real ecp-form. But there's no
> validation and the ReferenceService which is used for the real looking
> ecp-form is switched back to ECPReferenceServiceImpl. That's probably
> because I'm using the MEEditorInput.
>
> public void openInNewContext(EObject eObject) {
> System.out.println("MyReferenceService: openInNewContext");
> final MEEditorInput input = new MEEditorInput(new
> EditorConecptext((EObject) eObject,null));
>
> try {
>
> PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
> .openEditor(input, "org.eclipse.emf.ecp.editor", true);
> } catch (final PartInitException e) {
> Activator.logException(e);
> }
>
> ECPHandlerHelper.openModelElement(eObject, null);
> }
>
>
> I really want to integrate it into my own application. But I have no
> idea how to proceed or to write my own EMFForms ReferenceService without
> ECP related artifacts (ECPProject, ECPRepository).
> Can you provide a simple example of how to implement it?
> Are you guys planning an online CDOProvider?
> Thanks Philippe
>
|
|
|
Powered by
FUDForum. Page generated in 0.05351 seconds