Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Problem saving representations in Sirius 4.0.0 using Xbase(Works in Sirius 3.1.1 on Mars 4.5.1 but not in Sirius 4.0.0 on Neon 4.6.0)
Problem saving representations in Sirius 4.0.0 using Xbase [message #1736903] Mon, 04 July 2016 10:09 Go to next message
Eirik  Grønsund is currently offline Eirik GrønsundFriend
Messages: 6
Registered: August 2011
Junior Member
As opposed to Sirius 3.1.1 on Mars, saving a representation based on Xbase with Sirius 4.0.0 on Neon, an unsupported operation exception is generated. I'm using the same source project in both Sirius versions.

Installed the Eclipse Modeling Tools package for Neon and assured that the "Xtext Complete SDK" and the necessary Sirius components were installed from the Eclipse Neon Modeling Package Updates.

Save fails when referencing Jvm Types.

I noticed the following modification in the release notes of Sirius 4.0.0:

"The dependency from org.eclipse.sirius.common.xtext to the JDT plug-in org.eclipse.jdt.core is now optional. If you need the JDT Core in your environment, you will need to add the dependency explicitly. The Sirius specification environment ( org.eclipse.sirius.editor) still depends on PDE (and thus indirectly the JDT too)."

I'm uncertain if this may be the cause of the attached exception

Any suggestions are appreciated

Regards,
Eirik
Re: Problem saving representations in Sirius 4.0.0 using Xbase [message #1737096 is a reply to message #1736903] Tue, 05 July 2016 15:55 Go to previous messageGo to next message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 703
Registered: July 2009
Senior Member
Le 05/07/2016 16:41, Eirik Grønsund a écrit :
> As opposed to Sirius 3.1.1 on Mars, saving a representation based on Xbase with Sirius 4.0.0 on Neon, an unsupported operation exception is generated. I'm using the same source project in both Sirius versions.
>
> Installed the Eclipse Modeling Tools package for Neon and assured that the "Xtext Complete SDK" and the necessary Sirius components were installed from the Eclipse Neon Modeling Package Updates.
>
> Save fails when referencing Jvm Types.
>
> I noticed the following modification in the release notes of Sirius 4.0.0:
>
> "The dependency from org.eclipse.sirius.common.xtext to the JDT plug-in org.eclipse.jdt.core is now optional. If you need the JDT Core in your environment, you will need to add the dependency explicitly. The Sirius specification environment ( org.eclipse.sirius.editor) still depends on PDE (and thus indirectly the JDT too)."
>
> I'm uncertain if this may be the cause of the attached exception

At first glance I'd say it's unrelated. It looks like Sirius is trying
to save an EMF resource which comes from Xtext but which does not
implement the full contract of a Resource.

I have org.eclipse.xtext v2.10.0.v201605250459 in my context, which
provides an org.eclipse.xtext.common package, but I don't see the
org.eclipse.xtext.common.types subpackage or the TypeResource class
anywhere.

Can you tell which JAR (and which version) the TypeResource class comes
from? There *might* be some Xtext-specific test we can do on our side to
avoid saving unsaveable resources, but I'll need to find the actual code
before.

Regards,
Pierre-Charles

--
Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius


Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Problem saving representations in Sirius 4.0.0 using Xbase [message #1737125 is a reply to message #1737096] Tue, 05 July 2016 23:57 Go to previous messageGo to next message
Eirik  Grønsund is currently offline Eirik GrønsundFriend
Messages: 6
Registered: August 2011
Junior Member
Thanks for answering

I'm using the same version of org.eclipse.xtext (2.10.0.v201605250459) as you.

The TypeResource class resides in the org.eclipse.xtext.common.types (2.10.0.v201605250459) bundle in package org.eclipse.xtext.common.types.access

FYI, I'm successfully saving the same Xbase model representation with Sirius 3.1.1 in the Mars version.

Regards,
Eirik
Re: Problem saving representations in Sirius 4.0.0 using Xbase [message #1737351 is a reply to message #1737125] Thu, 07 July 2016 13:51 Go to previous messageGo to next message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 703
Registered: July 2009
Senior Member
Le 06/07/2016 01:57, Eirik Grønsund a écrit :
> Thanks for answering
>
> I'm using the same version of org.eclipse.xtext (2.10.0.v201605250459)
> as you.
>
> The TypeResource class resides in the org.eclipse.xtext.common.types
> (2.10.0.v201605250459) bundle in package
> org.eclipse.xtext.common.types.access
>
> FYI, I'm successfully saving the same Xbase model representation with
> Sirius 3.1.1 in the Mars version.

It looks like this change:

https://git.eclipse.org/r/#/c/64483/

could be the culprit. It assumes resources which are modified but should
not be saved will have the URIConverter.ATTRIBUTE_READ_ONLY attribute set.

Are you in a context where you can easily confirm by reverting the
single-line change in IsModifiedSavingPolicy and re-testing your
scenario? If so, and if indeed this is the changed that caused the
regression, please open a bugzilla.

Thanks.

--
Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius


Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Problem saving representations in Sirius 4.0.0 using Xbase [message #1737366 is a reply to message #1737351] Thu, 07 July 2016 15:09 Go to previous messageGo to next message
Eirik  Grønsund is currently offline Eirik GrønsundFriend
Messages: 6
Registered: August 2011
Junior Member
Thanks again

I will make it a try,
Where is the best place to download the Sirius source?
Obeo Designer 9.0 or github?

Regards,
Eirik
Re: Problem saving representations in Sirius 4.0.0 using Xbase [message #1737372 is a reply to message #1737366] Thu, 07 July 2016 15:33 Go to previous messageGo to next message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 703
Registered: July 2009
Senior Member
Le 07/07/2016 17:09, Eirik Grønsund a écrit :
> Thanks again
>
> I will make it a try,
> Where is the best place to download the Sirius source?
> Obeo Designer 9.0 or github?

The official source repository is available at
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git, but there is a
simpler solution: if you have in your workspace a plug-in which depends
on org.eclipse.sirius (where IsModifiedSavingPolicy is defined), find
the org.eclipse.sirius JAR in your project's "Plug-In Dependencies" in
the Package Explorer, and from the context menu choose "Import from
Repository...". It will start a wizard which will automatically clone
from the official sources and import the sources for that plug-in in
your workspace.

--
Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius


Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Problem saving representations in Sirius 4.0.0 using Xbase [message #1737447 is a reply to message #1737372] Fri, 08 July 2016 10:35 Go to previous messageGo to next message
Eirik  Grønsund is currently offline Eirik GrønsundFriend
Messages: 6
Registered: August 2011
Junior Member
Hi,

You were right in your assumption. I filed the following bug:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=497559

Regards, Eirik
Re: Problem saving representations in Sirius 4.0.0 using Xbase [message #1737455 is a reply to message #1737447] Fri, 08 July 2016 11:50 Go to previous message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 703
Registered: July 2009
Senior Member
Le 08/07/2016 12:35, Eirik Grønsund a écrit :
> Hi,
>
> You were right in your assumption. I filed the following bug:
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=497559

Thanks for taking the time to confirm and report the bugzilla.

--
Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius


Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Creating the edge relation between different editor pages
Next Topic:On double click opening the properties view
Goto Forum:
  


Current Time: Thu Apr 25 07:00:32 GMT 2024

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

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

Back to the top