Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » [mwe2] Resolving platform:/plugin
[mwe2] Resolving platform:/plugin [message #714686] Thu, 11 August 2011 08:59 Go to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7098
Registered: July 2009
Senior Member
Hi

I need to resolve

platform:/plugin/org.eclipse.xtext.common.types/model/JavaVMTypes.genmodel

within my workflow.

When using CVS, I made do with a URI mapping to a relative path that
required org.eclipse.xtext.common.types to be imported as a project into
the workspace.

Since moving to GIT the relative path collapses; unless I put
org.eclipse.xtext.common.types into my GIT.

---------------

The following appears to solve the problem by allowing access to the
true plugin:

Launch with an additional parameter: --param eclipse_home=${eclipse_home}

In the workflow:

var eclipse_home

Workflow {
bean = ResourceSetImpl : resourceSet {}
bean = StandaloneSetup { resourceSet = resourceSet
platformUri = ".."
platformUri = "${eclipse_home}"
registerGeneratedEPackage =
"org.eclipse.xtext.common.types.TypesPackage"
uriMap = Mapping {
from = "platform:/plugin/org.eclipse.xtext.common.types/"
to = "platform:/resource/org.eclipse.xtext.common.types/"
}
}

-------------

Is there a better way?

Since eclipse_home is rather useful, shouldn't the MWE launcher provide
it automatically?

Perhaps StandaloneSetup should have an "eclipseHome" Property to
configure EcorePlugin's plugin map correctly.

The MWE2 documentation seems to overlook this useful parameter passing
ability.

Is it a bug that platformUri can be set twice?

Regards

Ed Willink
Re: [mwe2] Resolving platform:/plugin [message #714849 is a reply to message #714686] Thu, 11 August 2011 15:27 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3109
Registered: July 2009
Senior Member
Hi Ed,

please try to set StandaloneSetup#scanClassPath to true.
That should take care of most of the other configuration that you did.

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com


On 11.08.11 10:59, Ed Willink wrote:
> Hi
>
> I need to resolve
>
> platform:/plugin/org.eclipse.xtext.common.types/model/JavaVMTypes.genmodel
>
> within my workflow.
>
> When using CVS, I made do with a URI mapping to a relative path that
> required org.eclipse.xtext.common.types to be imported as a project into
> the workspace.
>
> Since moving to GIT the relative path collapses; unless I put
> org.eclipse.xtext.common.types into my GIT.
>
> ---------------
>
> The following appears to solve the problem by allowing access to the
> true plugin:
>
> Launch with an additional parameter: --param eclipse_home=${eclipse_home}
>
> In the workflow:
>
> var eclipse_home
>
> Workflow {
> bean = ResourceSetImpl : resourceSet {}
> bean = StandaloneSetup { resourceSet = resourceSet
> platformUri = ".."
> platformUri = "${eclipse_home}"
> registerGeneratedEPackage = "org.eclipse.xtext.common.types.TypesPackage"
> uriMap = Mapping {
> from = "platform:/plugin/org.eclipse.xtext.common.types/"
> to = "platform:/resource/org.eclipse.xtext.common.types/"
> }
> }
>
> -------------
>
> Is there a better way?
>
> Since eclipse_home is rather useful, shouldn't the MWE launcher provide
> it automatically?
>
> Perhaps StandaloneSetup should have an "eclipseHome" Property to
> configure EcorePlugin's plugin map correctly.
>
> The MWE2 documentation seems to overlook this useful parameter passing
> ability.
>
> Is it a bug that platformUri can be set twice?
>
> Regards
>
> Ed Willink
Re: [mwe2] Resolving platform:/plugin [message #714941 is a reply to message #714849] Thu, 11 August 2011 19:57 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7098
Registered: July 2009
Senior Member
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Hi Sebastian<br>
<br>
Thanks. Yes, scanClassPath solves the need to mess around with an
eclipse_home, but it is still necessary to have<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uriMap = Mapping {
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from = "platform:<i class="moz-txt-slash"><span
class="moz-txt-tag">/</span>plugin/org.eclipse.xtext.common.types<span
class="moz-txt-tag">/</span></i>"
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; to = "platform:<i class="moz-txt-slash"><span
class="moz-txt-tag">/</span>resource/org.eclipse.xtext.common.types<span
class="moz-txt-tag">/</span></i>"
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }
<br>
<br>
which seems a little redundant if scanClasspath has found all the
plugin resources.<br>
<br>
&nbsp;&nbsp;&nbsp; Regards<br>
<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Ed Willink<br>
<br>
On 11/08/2011 16:27, Sebastian Zarnekow wrote:
<blockquote cite="mid:j20roc$f9u$2@news.eclipse.org" type="cite">Hi
Ed,
<br>
<br>
please try to set StandaloneSetup#scanClassPath to true.
<br>
That should take care of most of the other configuration that you
did.
<br>
<br>
Regards,
<br>
Sebastian
<br>
</blockquote>
<br>
</body>
</html>
Re: [mwe2] Resolving platform:/plugin [message #714942 is a reply to message #714941] Thu, 11 August 2011 20:21 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3109
Registered: July 2009
Senior Member
Hi Ed,

your are right.
Could you please file a ticket and describe your usecase, especially why
you had to use platform:/plugin instead of platform:/resource uris.

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

On 11.08.11 21:57, Ed Willink wrote:
> Hi Sebastian
>
> Thanks. Yes, scanClassPath solves the need to mess around with an
> eclipse_home, but it is still necessary to have
>
> uriMap = Mapping {
> from = "platform:/plugin/org.eclipse.xtext.common.types/"
> to = "platform:/resource/org.eclipse.xtext.common.types/"
> }
>
> which seems a little redundant if scanClasspath has found all the plugin
> resources.
>
> Regards
>
> Ed Willink
>
> On 11/08/2011 16:27, Sebastian Zarnekow wrote:
>> Hi Ed,
>>
>> please try to set StandaloneSetup#scanClassPath to true.
>> That should take care of most of the other configuration that you did.
>>
>> Regards,
>> Sebastian
>
Re: [mwe2] Resolving platform:/plugin [message #715014 is a reply to message #714942] Fri, 12 August 2011 05:15 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7098
Registered: July 2009
Senior Member
https://bugs.eclipse.org/bugs/show_bug.cgi?id=354575

On 11/08/2011 21:21, Sebastian Zarnekow wrote:
> Hi Ed,
>
> your are right.
> Could you please file a ticket and describe your usecase, especially
> why you had to use platform:/plugin instead of platform:/resource uris.
>
> Regards,
> Sebastian
Previous Topic:Template proposals despite "Too many constants"
Next Topic:Ctrl+hover does not show hyperlink
Goto Forum:
  


Current Time: Fri Apr 16 12:43:29 GMT 2021

Powered by FUDForum. Page generated in 0.01746 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top