Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » EMF in RAP project
EMF in RAP project [message #505246] Mon, 28 December 2009 22:25 Go to next message
Eclipse UserFriend
Originally posted by: fxulusoy.yahoo.com

This is a multi-part message in MIME format.
--------------040401080900050004000403
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Hi,

We have a RCP project which uses EMF framework and we have different
types of model elements on EMF eobjects. We want to develop lightweight
web user-interface with RAP. We don't want to use model editors. We only
would like to see some of our model elements on table or tree view in
our RAP application.

I setup my target platform which includes RAP runtime SDK, EMF plugins
and also Eclipse core plugins.

I try to use AdapterFactoryLabelProvider and
AdapterFactoryContentProvider classes. But, they don't work.

Before that, I made similar thing for some of our model elements with
using ITreeContentProvider interface and LabelProvider class. It worked
in spite of some bundle exceptions.But, I need to use emf label and
content providers.

How should I use RAP and EMF together? and how should I setup my target
platform? Creating target platform is also problematic but let's leave
it now.

I saw some bug reports and experimantal works to be able to use EMF
plugins in RAP projects. There are not many detailed explanations about
this issue. This is the bug report which I have already known:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=213988

I got the source code of the Ed Merk's experimantal work and tried to
use his classes and they didn't work for me too.

I searched also newsgroup and I found a mail from Ralf Sternberg. He
said that "Adding EMF runtime support to your RAP application should
work without any problems. " I am not sure exactly this is what I do or
he mentioned something different. Actually, I am not so experienced with
EMF and RAP. This makes the things more difficult :)

I attached one of my classes where I try to use content and label
providers. It is in createPartControl() method. Commented lines are
experiments which don't work.

After long tries and searches I couldn't solve my problem. I will be
grateful for any help any hint.

Thanks in advance.

Thanks.


--------------040401080900050004000403
Content-Type: text/plain;
name="NavigationView.java"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="NavigationView.java"

cGFja2FnZSBvcmcudW5pY2FzZS5yYXBjbGllbnQ7CgppbXBvcnQgamF2YS51 dGlsLkFycmF5
TGlzdDsKaW1wb3J0IGphdmEudXRpbC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kpOwoJCQoJCS8vLy8vLy8vLy8vLy8vLy8vLy8vLy8v Ly8vLy8vLy8v
Ly8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8KCQkKCQl2 aWV3ZXIuc2V0
SW5wdXQoV29ya3NwYWNlTWFuYWdlci5nZXRJbnN0YW5jZSgpLmdldEN1cnJl bnRXb3Jrc3Bh
Y2UoKSk7Cgl9CgoJLyoqCgkgKiBQYXNzaW5nIHRoZSBmb2N1cyByZXF1ZXN0 IHRvIHRoZSB2
aWV3ZXIncyBjb250cm9sLgoJICovCglwdWJsaWMgdm9pZCBzZXRGb2N1cygp IHsKCQl2aWV3
ZXIuZ2V0Q29udHJvbCgpLnNldEZvY3VzKCk7Cgl9CgoJcHVibGljIHZvaWQg c2VsZWN0aW9u
Q2hhbmdlZChTZWxlY3Rpb25DaGFuZ2VkRXZlbnQgZXZlbnQpIHsKCQlJU2Vs ZWN0aW9uIHNl
bCA9IGV2ZW50LmdldFNlbGVjdGlvbigpOwoJCVRyZWVTZWxlY3Rpb24gdHJl ZVNlbGVjdGlv
biA9IChUcmVlU2VsZWN0aW9uKSBzZWw7CgkJZmluYWwgT2JqZWN0IG8gPSB0 cmVlU2VsZWN0
aW9uLmdldEZpcnN0RWxlbWVudCgpOwoJCWlmIChvIGluc3RhbmNlb2YgV29y a0l0ZW0pIHsK
CQkJLy8gVE9ETwoJCQlEaXNwbGF5LmdldERlZmF1bHQoKS5hc3luY0V4ZWMo bmV3IFJ1bm5h
YmxlKCkgewoJCQkJcHVibGljIHZvaWQgcnVuKCkgewoJCQkJCQoJCQkJfX0p OzsgCgkJfQoJ
fQp9
--------------040401080900050004000403--
Re: EMF in RAP project [message #505557 is a reply to message #505246] Fri, 01 January 2010 16:55 Go to previous messageGo to next message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 581
Registered: July 2009
Senior Member
if you rely on EMF label providers and such you are probably using more than what Ralf meant by "EMF runtime". I am not an EMF expert but I would assume that EMF label providers have a dependency on UI bundles (e.g. org.eclipse.ui in the end). And this is what is currently not supported out of the box but the bug that you mentioned is about.

To assemble a target platform, I would start with the RAP target platform and then add the EMF bundles. For further information about target platform see here [1] and here [2].

BTW are you aware of this [3] other introdution to RAP and EMF?

HTH
Rüdiger

[1] http://eclipse.org/rap/documentation.php#resources
[2] http://help.eclipse.org/galileo/topic/org.eclipse.pde.doc.us er/concepts/target.htm
[3] http://wiki.eclipse.org/EMF_Editor_goes_RAP
Re: EMF in RAP project [message #505572 is a reply to message #505557] Fri, 01 January 2010 14:26 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fxulusoy.yahoo.com

I have already seen the article in the third link that you said to me.
But, there is nothing related with RAP or am I missing something? I
think, the title of the article is wrong.

I read introduction documentations about RAP and EMF.

I can setup RAP target platform. This is not problem at all. But, I try
to use some RCP plugins from my RAP plugin. The RCP plugins use emf and
variety of other bundles. Therefore, I try to create cross/hybrid target
platform.

RAP has some bundles specific to it and also same bundles which our
normal target platform has too. For example, org.eclipse.core.jobs,
org.eclipse.core.runtime, org.eclipse.equinox... But, there are some
problems. These common bundles are different versions in RAP target and
our normal target. Firstly, I added all required bundles to our target
platform and try to build and run my RAP plugin. It works with
exceptions. Here is the sample exception:

!ENTRY org.eclipse.core.jobs 4 0 2009-12-15 14:04:17.140
!MESSAGE
!STACK 0
org.osgi.framework.BundleException: The bundle could not be resolved.
Reason: Another singleton version selected:
org.eclipse.core.jobs_3.4.200.v20090921

This bundle was already in our target platform. At the same time,
org.eclipse.core.jobs_3.6 bundle is also in our target platform. When I
remove org.eclipse.core.jobs_3.4 bundle, and try it to run. In that
case, I get similar exceptions which says

org.osgi.framework.BundleException: The bundle could not be resolved.
Reason: Another singleton version selected: org.eclipse.core.jobs_3.6

How can I organize these bundle versions?

I can't figure out these problems.

If the issue is related with only RAP or EMF, the way which I should go
is clear and the documentation exists. There are not too much docs
about RAP and EMF.


By the way, thanks for your reply.


Rüdiger Herrmann wrote:
> if you rely on EMF label providers and such you are probably using more
> than what Ralf meant by "EMF runtime". I am not an EMF expert but I
> would assume that EMF label providers have a dependency on UI bundles
> (e.g. org.eclipse.ui in the end). And this is what is currently not
> supported out of the box but the bug that you mentioned is about.
>
> To assemble a target platform, I would start with the RAP target
> platform and then add the EMF bundles. For further information about
> target platform see here [1] and here [2].
>
> BTW are you aware of this [3] other introdution to RAP and EMF?
>
> HTH
> Rüdiger
>
> [1] http://eclipse.org/rap/documentation.php#resources
> [2]
> http://help.eclipse.org/galileo/topic/org.eclipse.pde.doc.us er/concepts/target.htm
>
> [3] http://wiki.eclipse.org/EMF_Editor_goes_RAP
Re: EMF in RAP project [message #506226 is a reply to message #505572] Wed, 06 January 2010 10:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fxulusoy.yahoo.com

Isn't there anybody who is experienced with EMF in RAP??



Fatih Ulusoy wrote:
> I have already seen the article in the third link that you said to me.
> But, there is nothing related with RAP or am I missing something? I
> think, the title of the article is wrong.
>
> I read introduction documentations about RAP and EMF.
>
> I can setup RAP target platform. This is not problem at all. But, I try
> to use some RCP plugins from my RAP plugin. The RCP plugins use emf and
> variety of other bundles. Therefore, I try to create cross/hybrid target
> platform.
>
> RAP has some bundles specific to it and also same bundles which our
> normal target platform has too. For example, org.eclipse.core.jobs,
> org.eclipse.core.runtime, org.eclipse.equinox... But, there are some
> problems. These common bundles are different versions in RAP target and
> our normal target. Firstly, I added all required bundles to our target
> platform and try to build and run my RAP plugin. It works with
> exceptions. Here is the sample exception:
>
> !ENTRY org.eclipse.core.jobs 4 0 2009-12-15 14:04:17.140
> !MESSAGE
> !STACK 0
> org.osgi.framework.BundleException: The bundle could not be resolved.
> Reason: Another singleton version selected:
> org.eclipse.core.jobs_3.4.200.v20090921
>
> This bundle was already in our target platform. At the same time,
> org.eclipse.core.jobs_3.6 bundle is also in our target platform. When I
> remove org.eclipse.core.jobs_3.4 bundle, and try it to run. In that
> case, I get similar exceptions which says
>
> org.osgi.framework.BundleException: The bundle could not be resolved.
> Reason: Another singleton version selected: org.eclipse.core.jobs_3.6
>
> How can I organize these bundle versions?
>
> I can't figure out these problems.
>
> If the issue is related with only RAP or EMF, the way which I should go
> is clear and the documentation exists. There are not too much docs
> about RAP and EMF.
>
>
> By the way, thanks for your reply.
>
>
> Rüdiger Herrmann wrote:
>> if you rely on EMF label providers and such you are probably using
>> more than what Ralf meant by "EMF runtime". I am not an EMF expert but
>> I would assume that EMF label providers have a dependency on UI
>> bundles (e.g. org.eclipse.ui in the end). And this is what is
>> currently not supported out of the box but the bug that you mentioned
>> is about.
>>
>> To assemble a target platform, I would start with the RAP target
>> platform and then add the EMF bundles. For further information about
>> target platform see here [1] and here [2].
>>
>> BTW are you aware of this [3] other introdution to RAP and EMF?
>>
>> HTH
>> Rüdiger
>>
>> [1] http://eclipse.org/rap/documentation.php#resources
>> [2]
>> http://help.eclipse.org/galileo/topic/org.eclipse.pde.doc.us er/concepts/target.htm
>>
>> [3] http://wiki.eclipse.org/EMF_Editor_goes_RAP
Re: EMF in RAP project [message #506235 is a reply to message #506226] Wed, 06 January 2010 16:16 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
I only used EMF-Core with custom EMF-Databinding-Editors in RAP env and
hand no troubles.

Tom

Am 06.01.10 16:38, schrieb Fatih Ulusoy:
> Isn't there anybody who is experienced with EMF in RAP??
>
>
>
> Fatih Ulusoy wrote:
>> I have already seen the article in the third link that you said to me.
>> But, there is nothing related with RAP or am I missing something? I
>> think, the title of the article is wrong.
>>
>> I read introduction documentations about RAP and EMF.
>>
>> I can setup RAP target platform. This is not problem at all. But, I
>> try to use some RCP plugins from my RAP plugin. The RCP plugins use
>> emf and variety of other bundles. Therefore, I try to create
>> cross/hybrid target platform.
>>
>> RAP has some bundles specific to it and also same bundles which our
>> normal target platform has too. For example, org.eclipse.core.jobs,
>> org.eclipse.core.runtime, org.eclipse.equinox... But, there are some
>> problems. These common bundles are different versions in RAP target
>> and our normal target. Firstly, I added all required bundles to our
>> target platform and try to build and run my RAP plugin. It works with
>> exceptions. Here is the sample exception:
>>
>> !ENTRY org.eclipse.core.jobs 4 0 2009-12-15 14:04:17.140
>> !MESSAGE
>> !STACK 0
>> org.osgi.framework.BundleException: The bundle could not be resolved.
>> Reason: Another singleton version selected:
>> org.eclipse.core.jobs_3.4.200.v20090921
>>
>> This bundle was already in our target platform. At the same time,
>> org.eclipse.core.jobs_3.6 bundle is also in our target platform. When
>> I remove org.eclipse.core.jobs_3.4 bundle, and try it to run. In that
>> case, I get similar exceptions which says
>>
>> org.osgi.framework.BundleException: The bundle could not be resolved.
>> Reason: Another singleton version selected: org.eclipse.core.jobs_3.6
>>
>> How can I organize these bundle versions?
>>
>> I can't figure out these problems.
>>
>> If the issue is related with only RAP or EMF, the way which I should
>> go is clear and the documentation exists. There are not too much docs
>> about RAP and EMF.
>>
>>
>> By the way, thanks for your reply.
>>
>>
>> Rüdiger Herrmann wrote:
>>> if you rely on EMF label providers and such you are probably using
>>> more than what Ralf meant by "EMF runtime". I am not an EMF expert
>>> but I would assume that EMF label providers have a dependency on UI
>>> bundles (e.g. org.eclipse.ui in the end). And this is what is
>>> currently not supported out of the box but the bug that you mentioned
>>> is about.
>>>
>>> To assemble a target platform, I would start with the RAP target
>>> platform and then add the EMF bundles. For further information about
>>> target platform see here [1] and here [2].
>>>
>>> BTW are you aware of this [3] other introdution to RAP and EMF?
>>>
>>> HTH
>>> Rüdiger
>>>
>>> [1] http://eclipse.org/rap/documentation.php#resources
>>> [2]
>>> http://help.eclipse.org/galileo/topic/org.eclipse.pde.doc.us er/concepts/target.htm
>>>
>>> [3] http://wiki.eclipse.org/EMF_Editor_goes_RAP
Previous Topic:RAP for multi-user IDE-like application
Next Topic:Textbox height in a small browser window
Goto Forum:
  


Current Time: Fri Apr 26 17:28:00 GMT 2024

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

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

Back to the top