|
Re: EMFClient and RAP [message #1219347 is a reply to message #1219147] |
Tue, 03 December 2013 13:30 |
Jonas Helming Messages: 699 Registered: July 2009 |
Senior Member |
|
|
Hi,
the combination RAP and ECP is definitly possible and we have several
industrial projects using it.
I have a raw version of a set-up documentation, which I could bring into
shape. Can you tell me a little more about your use case? Which Provider
are you using (File, EMFStore, CDO or a custom one)? Are you interested
in EMF Forms only (the form-based UI) or also into the model explorer
and the repository abstraction?
Best Regards
Jonas
Am 02.12.2013 15:06, schrieb Neil Mackenzie:
> Hello,
> I am trying to create a web based RAP GUI with EMFClient.
> Previously I have autogenerated an RAP GUI for my EMF model using EMF
> and RAP integration (i.e. not using EMFClient)
> I have seen screenshots on slides, and references to RAP with EMFClient,
> and some RAP stuff in github for emfclient, but I have never seen
> instructions on how to create an RAP GUI.
> Any help greatly appreciated. EMFClient is an awesome project btw, I
> love the way it allows rapid evolution of a model without having to
> spend a long time changing UI code with each evolution.
> Thanks,
> Neil
|
|
|
|
Re: EMFClient and RAP [message #1219726 is a reply to message #1219356] |
Thu, 05 December 2013 15:07 |
Jonas Helming Messages: 699 Registered: July 2009 |
Senior Member |
|
|
Hi Neil,
OK, so you need all components of ECP, not only the editor. Most
projects we know of, do not use the demo application itself on RAP.
Instead, they maintain there own applications and just embedd parts of
ECP, mostly the editor (EMF Forms). However, there is nothing wrong with
using the demo application as a productive application if it fits your
needs.
We have a beta-version of a RAP demo application in our repository, it
is not yet part of the release, we plan that for 1.2.0.
However, it would be great if you could check it out and report any
issues to us, so we can bring it into shape. I do not expect any major
issues just minor gaps in the UI (e.g. an image is not correctly loaded)
You find the demo application in our source repository
The name of the bundle is
org.eclipse.emf.ecp.rap
from this repo:
git://git.eclipse.org/gitroot/emfclient/org.eclipse.emf.ecp.core.git
It should work with the 1.1.x release.
Additionally you need a RAP target...
Please let us know any issues you face.
Best Regards
Jonas
Am 03.12.2013 15:06, schrieb Neil Mackenzie:
> Hi Jonas,
> thanks for your reply.
> I am using EMFStore. I currently have things working with the thick
> client and the default forms for editing instances are ok for now
> although I hope to create custom UI forms later.
>
> When you mention the model explorer and repository absraction, do you
> mean the left hand side navigation panel and the repository version
> control commit/checkout etc)provided by emfstore ..if so then I do use
> this.
>
> I have put below a very simple description of the program I am writing
> in case other people are tackling the same problems, especially
> integrating edapt with EMFCLient (not just EMFStore):
>
> I have 2 ecore models that together represents a simple domain specific
> language (one model represents processes, the other entities)
> All test cases for a program represented with the model are represented
> by instances of my entity ecore model.
> As the entity structure changes over time (as I sometimes need to add
> attribute to my entity model) I want to automatically migrate all the
> the old test cases using edapt.
>
> So I would like to use RAP EMFClient to display my ecore entity model (
> it is of course a model instance itself) and my testcases (which are
> instances of the entity ecore model) , and would love to put the effort
> in to have a simple web integration with edapt (otherwise I will need to
> keep the migration definitions using edapt in the thick client only).
|
|
|
|
|
|
Re: EMFClient and RAP [message #1220945 is a reply to message #1220858] |
Mon, 16 December 2013 10:08 |
Dennis Melzer Messages: 244 Registered: July 2009 |
Senior Member |
|
|
Do I need a Data Provider(EMFStore or CDO) for EMF Forms?
I want only to show the form in rap and store the data maybe in xmi, if the user click a save button.
This the RAP EntryPoint
public class BasicEntryPoint extends AbstractEntryPoint {
@Override
protected void createContents(final Composite parent) {
Realm realm = SWTObservables.getRealm( Display.getCurrent() );
Realm.runWithDefault(realm, new Runnable() {
@Override
public void run() {
Person createPerson = StudioFactory.eINSTANCE.createPerson();
try {
ECPSWTViewRenderer.INSTANCE.render(parent, createPerson);
} catch (ECPRendererException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
});
}
}
[Updated on: Mon, 16 December 2013 10:09] Report message to a moderator
|
|
|
|
|
|
Re: EMFClient and RAP [message #1225343 is a reply to message #1220980] |
Sun, 29 December 2013 14:08 |
Eugen Neufeld Messages: 63 Registered: March 2012 |
Member |
|
|
Hi,
in order to create a ResourceSet with a valid EditingDomain you have to
change the code which creates your ResourceSet:
ResourceSet resourceSet = new ResourceSetImpl();
AdapterFactoryEditingDomain domain = new
AdapterFactoryEditingDomain(
new
ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE),
new BasicCommandStack(), resourceSet);
resourceSet.eAdapters().add(new
AdapterFactoryEditingDomain.EditingDomainProvider(domain));
return resourceSet;
Now you can create the Resource and start ecp.
Cheers,
Eugen
Am 16.12.2013 14:15, schrieb Sir Wayne:
> I added a resource
>
>
> public class BasicEntryPoint extends AbstractEntryPoint {
>
> @Override
> protected void createContents(final Composite parent) {
> Realm realm = SWTObservables.getRealm( Display.getCurrent() );
> Realm.runWithDefault(realm, new Runnable() {
>
> @Override
> public void run() {
> ResourceSet resSet = new ResourceSetImpl();
> Resource resource = resSet.createResource(URI
> .createURI("test.xmi"));
> Person createPerson =
> StudioFactory.eINSTANCE.createPerson();
> resource.getContents().add(createPerson);
>
> System.out.println(createPerson.eResource());
>
>
> try {
> ECPSWTViewRenderer.INSTANCE.render(parent,
> createPerson);
> } catch (ECPRendererException e) {
> // TODO Auto-generated catch block
> e.printStackTrace();
> }
>
> }
> });
> }
>
>
> Now i get a NPE here: The editingDomainProvider is null.
>
>
> static public EditingDomain getEditingDomainFor(EObject object)
> {
> if (object != null)
> {
> Resource resource = object.eResource();
> if (resource != null)
> {
> IEditingDomainProvider editingDomainProvider =
> (IEditingDomainProvider)EcoreUtil.getExistingAdapter(resource,
> IEditingDomainProvider.class);
> if (editingDomainProvider != null)
>
>
>
> Is there a launch config for a RAP Application, that i know which
> plugins are needed?
--
Eugen Neufeld
Get Professional Eclipse Support: http://eclipsesource.com/munich
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04993 seconds