Thanks a lot Ed! Regards, Nedelcho
From: <[email protected]<mailto:[email protected]>> on behalf of Ed Merks <[email protected]<mailto:[email protected]>> Reply-To: Eclipse Modelling Framework <[email protected]<mailto:[email protected]>> Date: Wednesday, December 28, 2016 at 15:50 To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Subject: Re: [emf-dev] FW: About Web Editors Please use the forum to ask questions. https://www.eclipse.org/forums/index.php?t=thread&frm_id=108 Make sure the FAQ doesn't already answer your question, e.g., https://wiki.eclipse.org/EMF/FAQ#How_do_I_map_between_an_EMF_Resource_and_an_Eclipse_IFile.3F To integrate with some other RESTful resource back-end, you could use a specialized URIHandlerImpl that you could add to your resource set's URI converter; you can look at the various existing subclasses for design ideas. Please don't post follow-up questions on the mailing list but rather start a thread on the forum. On 28.12.2016 14:39, Delchev, Nedelcho wrote: Hi EMF Developers, Can you please help with an idea how to handle the issue below? In general can we initialise EMF from an abstract resource (not from the local file system)? Do you have some examples on how to do this? Thanks in advance! Regards, Nedelcho From: SAP SAP <[email protected]<mailto:[email protected]>> Date: Friday, November 25, 2016 at 17:14 To: Amine Lajmi <[email protected]<mailto:[email protected]>> Cc: "Pavlov, Georgi" <[email protected]<mailto:[email protected]>>, "Pavlov, Yordan" <[email protected]<mailto:[email protected]>>, Dimitar Panayotov <[email protected]<mailto:[email protected]>>, "Atanasov, Momchil" <[email protected]<mailto:[email protected]>>, Markus Knauer <[email protected]<mailto:[email protected]>> Subject: Re: About Web Editors Hi Amine, Wow!!! It looks really veeery nice! :) For the EMF in the past we hacked something which @Momchil probably can recall. The major problem is as you described that EMF relies on the file system directly instead of the Resource API. I hope that this has been changed meanwhile, but I am not sure. In general in Eclipse Dirigible you can use either Resource API (hacked version by us) or Repository API (own implementation) to access resources. The Repository itself could be Local (file-system based), DB (RDBMS implementation), Git (read-only as of now), etc. The Resource API in Dirigible is connected as a layer on top of the Repository API, hence follow the same channel for accessing the actual resources. We have to see what have to be done in EMF to allow this. Once we make it, we can open Dirigible for the whole world of EMF based plugins available. @Markus, do you know somebody from EMF team that can jump in and help here? Btw. Just an idea - can we provide a custom protocol handler for the URIs that we can use? Similar thing we had in the integration of the Groovy engine: https://github.com/eclipselabs/dirigible-groovy/blob/master/org.eclipse.dirigible/org.eclipse.dirigible.parent/runtime/io.dirigible.runtime.groovy/OSGi-INF/groovy-protocol.xml Regards, Nedelcho From: Amine Lajmi <[email protected]<mailto:[email protected]>> Date: Friday, November 25, 2016 at 14:00 To: SAP SAP <[email protected]<mailto:[email protected]>> Cc: "Pavlov, Georgi" <[email protected]<mailto:[email protected]>>, "Pavlov, Yordan" <[email protected]<mailto:[email protected]>>, Dimitar Panayotov <[email protected]<mailto:[email protected]>> Subject: Re: About Web Editors Hi Nedelcho, First attempt, looks nice right ? :-) [Images intégrées 1] I have however some issues with EMF integration: s there a way to access the local repository location ? I need it to be ble to create an URI as the EMF API needs to check if the file exists in the file system when the resource is created otherwise it throws an exception. For now, I hacked it this way: IFile file = ((SourceFileEditorInput) editorInput).getFile(); IWorkspace workspace = WorkspaceLocator.getWorkspace(); IWorkspaceRoot root = workspace.getRoot(); IPath locationRoot = root.getLocation(); String ROOT = "D:/dev/sap/eclipse/dirigible_local/root"; IPath total = new Path(ROOT).append(locationRoot).append(file.getFullPath()); URI x = URI.createFileURI(total.toString()); ResourceSet resourceSet = getDefaultResourceSet(); XtextResource result = (XtextResource) resourceSet.getResource(x, true); Is there a better way to do it ? Thanks, Amine _______________________________________________ emf-dev mailing list [email protected]<mailto:[email protected]> To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/emf-dev
_______________________________________________ emf-dev mailing list [email protected] To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/emf-dev
