Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Can EMFText be used inside Papyrus?
Can EMFText be used inside Papyrus? [message #470246] Wed, 03 June 2009 14:39 Go to next message
Osmar Marchi dos Santos is currently offline Osmar Marchi dos SantosFriend
Messages: 8
Registered: July 2009
Junior Member
Hi,

I know that in Papyrus it is possible to define certain "Effects" for a
given transition as an "OpaqueBehavior". When I define the body of this
"OpaqueBehavior", it can be added as a "Natural language".
I would like to know if it is possible to associate another type of
"Body" (defined by the user), e.g. an xUML-based action language, to the
list of possible bodies (besides "Natural language"). Moreover, would it
be possible to associate another Eclipse plugin, like EMFText
(http://st.inf.tu-dresden.de/reuseware/index.php/EMFText), to the box
containing the language "Body"? So that some automatic analysis of the
code being inserted can be done on the fly.
In other words, is it possible to extend the Papyrus tool this way? If
yes, what steps should I follow. Otherwise, can the tool be modified to
allow these extensions?
I think this approach would be very interesting because: (a) it allows
anyone to define a grammar for their desired (action) language; (b)
checking errors in this language would be detected on the fly (by
EMFText); (c) it would easily parse the language, generating the model for
the language (based on the meta-model of the language), making later
transformations easier.

Thanks in advance,
Osmar
Re: Can EMFText be used inside Papyrus? [message #470256 is a reply to message #470246] Wed, 24 June 2009 16:47 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jendrik.johannes.tu-dresden.de

Hi Osmar,

I did some experimental integration of UML and Java using the EMFText
Java metamodel and syntax (JaMoPP). I never tested it in Papyrus, but
it's implemented in a generic way depending only on the UML and Java
metamodel. So it should work fine from Papyrus as well.
You can find it here:
http://emftext.org/index.php/EMFText_JaMoPP_Applications_jav aBehavior4UML

What I basically did was to define a new metamodel that imports UML and
the other language's metamodel (in my case Java). The metamodel contains
a class JavaMethodBehavior that inherits from UML Behavior. This way I
added a new behavior type.

I think what you want to achieve is similar. Only that you would use
another language instead of Java.

Cheers,
Jendrik


Osmar Marchi dos Santos wrote:
> Hi,
>
> I know that in Papyrus it is possible to define certain "Effects" for a
> given transition as an "OpaqueBehavior". When I define the body of this
> "OpaqueBehavior", it can be added as a "Natural language".
> I would like to know if it is possible to associate another type of
> "Body" (defined by the user), e.g. an xUML-based action language, to the
> list of possible bodies (besides "Natural language"). Moreover, would it
> be possible to associate another Eclipse plugin, like EMFText
> (http://st.inf.tu-dresden.de/reuseware/index.php/EMFText), to the box
> containing the language "Body"? So that some automatic analysis of the
> code being inserted can be done on the fly.
> In other words, is it possible to extend the Papyrus tool this way? If
> yes, what steps should I follow. Otherwise, can the tool be modified to
> allow these extensions?
> I think this approach would be very interesting because: (a) it allows
> anyone to define a grammar for their desired (action) language; (b)
> checking errors in this language would be detected on the fly (by
> EMFText); (c) it would easily parse the language, generating the model
> for the language (based on the meta-model of the language), making later
> transformations easier.
>
> Thanks in advance,
> Osmar
>
>
Re: Can EMFText be used inside Papyrus? [message #470261 is a reply to message #470256] Wed, 15 July 2009 14:41 Go to previous messageGo to next message
Osmar Marchi dos Santos is currently offline Osmar Marchi dos SantosFriend
Messages: 8
Registered: July 2009
Junior Member
Hi Jendrik,

Thanks a lot for your answer. It did help, specially in understanding
how I could possibly integrate Papyrus with EMFText.
But, maybe you can help me with another question. Specifically in
Papyrus, the "OpaqueBehavior" is edited using a "SourceViewer". By any
chance, would it be possible to associate an EMFText generated grammar
and its corresponding file to a SourceViewer, instead of a Workbench
Editor? That would certainly make things a lot easier.
Otherwise, I suppose, in order to integrate EMFText with Papyrus, one
would have to follow your idea. Nevertheless, Papyrus is built as a
MultiPage Editor. Therefore, by following what you said in the previous
post creates a new editor outside the Papyrus environment. In this case,
perhaps the Papyrus team could describe the possible steps needed to
create a new editing environment in Papyrus? This would then be
triggered by the user when one would like to edit an OpaqueBehavior.
Unfortunately, I haven't found any documentation about Papyrus'
source-code structure.

Best,
Osmar

Jendrik Johannes wrote:
> Hi Osmar,
>
> I did some experimental integration of UML and Java using the EMFText
> Java metamodel and syntax (JaMoPP). I never tested it in Papyrus, but
> it's implemented in a generic way depending only on the UML and Java
> metamodel. So it should work fine from Papyrus as well.
> You can find it here:
> http://emftext.org/index.php/EMFText_JaMoPP_Applications_jav aBehavior4UML
>
> What I basically did was to define a new metamodel that imports UML and
> the other language's metamodel (in my case Java). The metamodel contains
> a class JavaMethodBehavior that inherits from UML Behavior. This way I
> added a new behavior type.
>
> I think what you want to achieve is similar. Only that you would use
> another language instead of Java.
>
> Cheers,
> Jendrik
>
>
> Osmar Marchi dos Santos wrote:
>> Hi,
>>
>> I know that in Papyrus it is possible to define certain "Effects" for
>> a given transition as an "OpaqueBehavior". When I define the body of
>> this "OpaqueBehavior", it can be added as a "Natural language".
>> I would like to know if it is possible to associate another type of
>> "Body" (defined by the user), e.g. an xUML-based action language, to
>> the list of possible bodies (besides "Natural language"). Moreover,
>> would it be possible to associate another Eclipse plugin, like EMFText
>> (http://st.inf.tu-dresden.de/reuseware/index.php/EMFText), to the box
>> containing the language "Body"? So that some automatic analysis of the
>> code being inserted can be done on the fly.
>> In other words, is it possible to extend the Papyrus tool this way?
>> If yes, what steps should I follow. Otherwise, can the tool be
>> modified to allow these extensions?
>> I think this approach would be very interesting because: (a) it
>> allows anyone to define a grammar for their desired (action) language;
>> (b) checking errors in this language would be detected on the fly (by
>> EMFText); (c) it would easily parse the language, generating the model
>> for the language (based on the meta-model of the language), making
>> later transformations easier.
>>
>> Thanks in advance,
>> Osmar
>>
>>
Re: Can EMFText be used inside Papyrus? [message #470263 is a reply to message #470261] Mon, 20 July 2009 13:03 Go to previous message
Eclipse UserFriend
Originally posted by: jendrik.johannes.tu-dresden.de

Hi Osmar,

The code that is generated by EMFText is independent of the UI tooling.
The EMFText editor is currently generic and not generated independently
for each language. I think a SourceViewer or a tab for a multi-page
editor could be implemented in a similar fashion. Although you might
loose some funktionality we currently inherit from Eclipse's TextEditor
implementation.

If you want to give it a try you should have a look at the Editor src:
http://svn-st.inf.tu-dresden.de/svn/reuseware/branches/emfte xt-1.1-jamopp-1.0-reuseware-0.9/EMFText/org.emftext.runtime. ui/src/org/emftext/runtime/ui/editor/EMFTextEditor.java

Jendrik

Osmar Marchi dos Santos wrote:
> Hi Jendrik,
>
> Thanks a lot for your answer. It did help, specially in understanding
> how I could possibly integrate Papyrus with EMFText.
> But, maybe you can help me with another question. Specifically in
> Papyrus, the "OpaqueBehavior" is edited using a "SourceViewer". By any
> chance, would it be possible to associate an EMFText generated grammar
> and its corresponding file to a SourceViewer, instead of a Workbench
> Editor? That would certainly make things a lot easier.
> Otherwise, I suppose, in order to integrate EMFText with Papyrus, one
> would have to follow your idea. Nevertheless, Papyrus is built as a
> MultiPage Editor. Therefore, by following what you said in the previous
> post creates a new editor outside the Papyrus environment. In this case,
> perhaps the Papyrus team could describe the possible steps needed to
> create a new editing environment in Papyrus? This would then be
> triggered by the user when one would like to edit an OpaqueBehavior.
> Unfortunately, I haven't found any documentation about Papyrus'
> source-code structure.
>
> Best,
> Osmar
>
> Jendrik Johannes wrote:
>> Hi Osmar,
>>
>> I did some experimental integration of UML and Java using the EMFText
>> Java metamodel and syntax (JaMoPP). I never tested it in Papyrus, but
>> it's implemented in a generic way depending only on the UML and Java
>> metamodel. So it should work fine from Papyrus as well.
>> You can find it here:
>> http://emftext.org/index.php/EMFText_JaMoPP_Applications_jav aBehavior4UML
>>
>> What I basically did was to define a new metamodel that imports UML
>> and the other language's metamodel (in my case Java). The metamodel
>> contains a class JavaMethodBehavior that inherits from UML Behavior.
>> This way I added a new behavior type.
>>
>> I think what you want to achieve is similar. Only that you would use
>> another language instead of Java.
>>
>> Cheers,
>> Jendrik
>>
>>
>> Osmar Marchi dos Santos wrote:
>>> Hi,
>>>
>>> I know that in Papyrus it is possible to define certain "Effects"
>>> for a given transition as an "OpaqueBehavior". When I define the body
>>> of this "OpaqueBehavior", it can be added as a "Natural language".
>>> I would like to know if it is possible to associate another type of
>>> "Body" (defined by the user), e.g. an xUML-based action language, to
>>> the list of possible bodies (besides "Natural language"). Moreover,
>>> would it be possible to associate another Eclipse plugin, like
>>> EMFText (http://st.inf.tu-dresden.de/reuseware/index.php/EMFText), to
>>> the box containing the language "Body"? So that some automatic
>>> analysis of the code being inserted can be done on the fly.
>>> In other words, is it possible to extend the Papyrus tool this way?
>>> If yes, what steps should I follow. Otherwise, can the tool be
>>> modified to allow these extensions?
>>> I think this approach would be very interesting because: (a) it
>>> allows anyone to define a grammar for their desired (action)
>>> language; (b) checking errors in this language would be detected on
>>> the fly (by EMFText); (c) it would easily parse the language,
>>> generating the model for the language (based on the meta-model of the
>>> language), making later transformations easier.
>>>
>>> Thanks in advance,
>>> Osmar
>>>
>>>
Re: Can EMFText be used inside Papyrus? [message #586447 is a reply to message #470246] Wed, 24 June 2009 16:47 Go to previous message
Eclipse UserFriend
Originally posted by: jendrik.johannes.tu-dresden.de

Hi Osmar,

I did some experimental integration of UML and Java using the EMFText
Java metamodel and syntax (JaMoPP). I never tested it in Papyrus, but
it's implemented in a generic way depending only on the UML and Java
metamodel. So it should work fine from Papyrus as well.
You can find it here:
http://emftext.org/index.php/EMFText_JaMoPP_Applications_jav aBehavior4UML

What I basically did was to define a new metamodel that imports UML and
the other language's metamodel (in my case Java). The metamodel contains
a class JavaMethodBehavior that inherits from UML Behavior. This way I
added a new behavior type.

I think what you want to achieve is similar. Only that you would use
another language instead of Java.

Cheers,
Jendrik


Osmar Marchi dos Santos wrote:
> Hi,
>
> I know that in Papyrus it is possible to define certain "Effects" for a
> given transition as an "OpaqueBehavior". When I define the body of this
> "OpaqueBehavior", it can be added as a "Natural language".
> I would like to know if it is possible to associate another type of
> "Body" (defined by the user), e.g. an xUML-based action language, to the
> list of possible bodies (besides "Natural language"). Moreover, would it
> be possible to associate another Eclipse plugin, like EMFText
> (http://st.inf.tu-dresden.de/reuseware/index.php/EMFText), to the box
> containing the language "Body"? So that some automatic analysis of the
> code being inserted can be done on the fly.
> In other words, is it possible to extend the Papyrus tool this way? If
> yes, what steps should I follow. Otherwise, can the tool be modified to
> allow these extensions?
> I think this approach would be very interesting because: (a) it allows
> anyone to define a grammar for their desired (action) language; (b)
> checking errors in this language would be detected on the fly (by
> EMFText); (c) it would easily parse the language, generating the model
> for the language (based on the meta-model of the language), making later
> transformations easier.
>
> Thanks in advance,
> Osmar
>
>
Re: Can EMFText be used inside Papyrus? [message #586513 is a reply to message #470256] Wed, 15 July 2009 14:41 Go to previous message
Osmar Marchi dos Santos is currently offline Osmar Marchi dos SantosFriend
Messages: 8
Registered: July 2009
Junior Member
Hi Jendrik,

Thanks a lot for your answer. It did help, specially in understanding
how I could possibly integrate Papyrus with EMFText.
But, maybe you can help me with another question. Specifically in
Papyrus, the "OpaqueBehavior" is edited using a "SourceViewer". By any
chance, would it be possible to associate an EMFText generated grammar
and its corresponding file to a SourceViewer, instead of a Workbench
Editor? That would certainly make things a lot easier.
Otherwise, I suppose, in order to integrate EMFText with Papyrus, one
would have to follow your idea. Nevertheless, Papyrus is built as a
MultiPage Editor. Therefore, by following what you said in the previous
post creates a new editor outside the Papyrus environment. In this case,
perhaps the Papyrus team could describe the possible steps needed to
create a new editing environment in Papyrus? This would then be
triggered by the user when one would like to edit an OpaqueBehavior.
Unfortunately, I haven't found any documentation about Papyrus'
source-code structure.

Best,
Osmar

Jendrik Johannes wrote:
> Hi Osmar,
>
> I did some experimental integration of UML and Java using the EMFText
> Java metamodel and syntax (JaMoPP). I never tested it in Papyrus, but
> it's implemented in a generic way depending only on the UML and Java
> metamodel. So it should work fine from Papyrus as well.
> You can find it here:
> http://emftext.org/index.php/EMFText_JaMoPP_Applications_jav aBehavior4UML
>
> What I basically did was to define a new metamodel that imports UML and
> the other language's metamodel (in my case Java). The metamodel contains
> a class JavaMethodBehavior that inherits from UML Behavior. This way I
> added a new behavior type.
>
> I think what you want to achieve is similar. Only that you would use
> another language instead of Java.
>
> Cheers,
> Jendrik
>
>
> Osmar Marchi dos Santos wrote:
>> Hi,
>>
>> I know that in Papyrus it is possible to define certain "Effects" for
>> a given transition as an "OpaqueBehavior". When I define the body of
>> this "OpaqueBehavior", it can be added as a "Natural language".
>> I would like to know if it is possible to associate another type of
>> "Body" (defined by the user), e.g. an xUML-based action language, to
>> the list of possible bodies (besides "Natural language"). Moreover,
>> would it be possible to associate another Eclipse plugin, like EMFText
>> (http://st.inf.tu-dresden.de/reuseware/index.php/EMFText), to the box
>> containing the language "Body"? So that some automatic analysis of the
>> code being inserted can be done on the fly.
>> In other words, is it possible to extend the Papyrus tool this way?
>> If yes, what steps should I follow. Otherwise, can the tool be
>> modified to allow these extensions?
>> I think this approach would be very interesting because: (a) it
>> allows anyone to define a grammar for their desired (action) language;
>> (b) checking errors in this language would be detected on the fly (by
>> EMFText); (c) it would easily parse the language, generating the model
>> for the language (based on the meta-model of the language), making
>> later transformations easier.
>>
>> Thanks in advance,
>> Osmar
>>
>>
Re: Can EMFText be used inside Papyrus? [message #586555 is a reply to message #470261] Mon, 20 July 2009 13:03 Go to previous message
Eclipse UserFriend
Originally posted by: jendrik.johannes.tu-dresden.de

Hi Osmar,

The code that is generated by EMFText is independent of the UI tooling.
The EMFText editor is currently generic and not generated independently
for each language. I think a SourceViewer or a tab for a multi-page
editor could be implemented in a similar fashion. Although you might
loose some funktionality we currently inherit from Eclipse's TextEditor
implementation.

If you want to give it a try you should have a look at the Editor src:
http://svn-st.inf.tu-dresden.de/svn/reuseware/branches/emfte xt-1.1-jamopp-1.0-reuseware-0.9/EMFText/org.emftext.runtime. ui/src/org/emftext/runtime/ui/editor/EMFTextEditor.java

Jendrik

Osmar Marchi dos Santos wrote:
> Hi Jendrik,
>
> Thanks a lot for your answer. It did help, specially in understanding
> how I could possibly integrate Papyrus with EMFText.
> But, maybe you can help me with another question. Specifically in
> Papyrus, the "OpaqueBehavior" is edited using a "SourceViewer". By any
> chance, would it be possible to associate an EMFText generated grammar
> and its corresponding file to a SourceViewer, instead of a Workbench
> Editor? That would certainly make things a lot easier.
> Otherwise, I suppose, in order to integrate EMFText with Papyrus, one
> would have to follow your idea. Nevertheless, Papyrus is built as a
> MultiPage Editor. Therefore, by following what you said in the previous
> post creates a new editor outside the Papyrus environment. In this case,
> perhaps the Papyrus team could describe the possible steps needed to
> create a new editing environment in Papyrus? This would then be
> triggered by the user when one would like to edit an OpaqueBehavior.
> Unfortunately, I haven't found any documentation about Papyrus'
> source-code structure.
>
> Best,
> Osmar
>
> Jendrik Johannes wrote:
>> Hi Osmar,
>>
>> I did some experimental integration of UML and Java using the EMFText
>> Java metamodel and syntax (JaMoPP). I never tested it in Papyrus, but
>> it's implemented in a generic way depending only on the UML and Java
>> metamodel. So it should work fine from Papyrus as well.
>> You can find it here:
>> http://emftext.org/index.php/EMFText_JaMoPP_Applications_jav aBehavior4UML
>>
>> What I basically did was to define a new metamodel that imports UML
>> and the other language's metamodel (in my case Java). The metamodel
>> contains a class JavaMethodBehavior that inherits from UML Behavior.
>> This way I added a new behavior type.
>>
>> I think what you want to achieve is similar. Only that you would use
>> another language instead of Java.
>>
>> Cheers,
>> Jendrik
>>
>>
>> Osmar Marchi dos Santos wrote:
>>> Hi,
>>>
>>> I know that in Papyrus it is possible to define certain "Effects"
>>> for a given transition as an "OpaqueBehavior". When I define the body
>>> of this "OpaqueBehavior", it can be added as a "Natural language".
>>> I would like to know if it is possible to associate another type of
>>> "Body" (defined by the user), e.g. an xUML-based action language, to
>>> the list of possible bodies (besides "Natural language"). Moreover,
>>> would it be possible to associate another Eclipse plugin, like
>>> EMFText (http://st.inf.tu-dresden.de/reuseware/index.php/EMFText), to
>>> the box containing the language "Body"? So that some automatic
>>> analysis of the code being inserted can be done on the fly.
>>> In other words, is it possible to extend the Papyrus tool this way?
>>> If yes, what steps should I follow. Otherwise, can the tool be
>>> modified to allow these extensions?
>>> I think this approach would be very interesting because: (a) it
>>> allows anyone to define a grammar for their desired (action)
>>> language; (b) checking errors in this language would be detected on
>>> the fly (by EMFText); (c) it would easily parse the language,
>>> generating the model for the language (based on the meta-model of the
>>> language), making later transformations easier.
>>>
>>> Thanks in advance,
>>> Osmar
>>>
>>>
Previous Topic:How to evaluate Eclipse Papyrus?
Next Topic:How to set the 'object' field of AddStructuralFeatureValueAction
Goto Forum:
  


Current Time: Mon Dec 22 11:30:12 GMT 2014

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

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