Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » ExpressionLanguage in RAP
ExpressionLanguage in RAP [message #48811] Fri, 21 September 2007 15:34 Go to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Maybe I'm missing something obvious but I can't use expression for
hander activation/deactivation.

I'm using the build from M6 and when I try to add something like this in my

---------------8<---------------
<handler
class="at.bestsolution.webcat.admin.core.OpenPieceHandler"
commandId="at.bestsolution.webcat.admin.openPiece">
<enabledWhen>
<with
variable="activePartId">
<equals
value="test.MyView">
</equals>
</with>
</enabledWhen>
</handler>
---------------8<---------------

When opening the handler.exsd one notice that the dependency to
schema://org.eclipse.core.expressions/schema/expressionLangu age.exsd fails.

This leads me to think that expressions are not implemented in RAP, right?

Tom

--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Re: ExpressionLanguage in RAP [message #48871 is a reply to message #48811] Fri, 21 September 2007 19:21 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
In the same light it also seems that the
getViewSite().setSelectionProvider(TableViewer) is not working :-(

This two problems make the commands-framework useless in RAP.

Tom

Tom Schindl schrieb:
> Maybe I'm missing something obvious but I can't use expression for
> hander activation/deactivation.
>
> I'm using the build from M6 and when I try to add something like this in my
>
> ---------------8<---------------
> <handler
> class="at.bestsolution.webcat.admin.core.OpenPieceHandler"
> commandId="at.bestsolution.webcat.admin.openPiece">
> <enabledWhen>
> <with
> variable="activePartId">
> <equals
> value="test.MyView">
> </equals>
> </with>
> </enabledWhen>
> </handler>
> ---------------8<---------------
>
> When opening the handler.exsd one notice that the dependency to
> schema://org.eclipse.core.expressions/schema/expressionLangu age.exsd fails.
>
> This leads me to think that expressions are not implemented in RAP, right?
>
> Tom
>


--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Re: ExpressionLanguage in RAP [message #48901 is a reply to message #48871] Fri, 21 September 2007 22:05 Go to previous messageGo to next message
Benjamin Muskalla is currently offline Benjamin MuskallaFriend
Messages: 237
Registered: July 2009
Senior Member
Hi Tom,

nice you found the way to RAP ;-)

See inline comments.

Tom Schindl wrote:
> In the same light it also seems that the
> getViewSite().setSelectionProvider(TableViewer) is not working :-(
Whats not working? We do the same in the demo application in the
DemoTableViewPart.

>
> This two problems make the commands-framework useless in RAP.
>
> Tom
>
> Tom Schindl schrieb:
>> Maybe I'm missing something obvious but I can't use expression for
>> hander activation/deactivation.
>>
>> I'm using the build from M6 and when I try to add something like this
>> in my
>>
>> ---------------8<---------------
>> <handler
>> class="at.bestsolution.webcat.admin.core.OpenPieceHandler"
>> commandId="at.bestsolution.webcat.admin.openPiece">
>> <enabledWhen>
>> <with
>> variable="activePartId">
>> <equals
>> value="test.MyView">
>> </equals>
>> </with>
>> </enabledWhen>
>> </handler>
>> ---------------8<---------------
>>
>> When opening the handler.exsd one notice that the dependency to
>> schema://org.eclipse.core.expressions/schema/expressionLangu age.exsd
>> fails.
Ouch...curios that nobody else saw this before. But you're completely
right - the did not yet provide the source (and the schemas) of the core
plugins with our target. See bug 201805. Hope to get this fixed asap.
>>
>> This leads me to think that expressions are not implemented in RAP,
>> right?
No, we support expressions. But additional there seems to be a problem
with the enableWhen expressions. Have to figure that out this weekend ;)
Would you please file a bug report to track it? Thanks!

>>
>> Tom
>>
>
>
Greets
Benny
Re: ExpressionLanguage in RAP [message #49097 is a reply to message #48901] Sun, 23 September 2007 11:35 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Ben,

Benjamin Muskalla schrieb:
> Hi Tom,
>
> nice you found the way to RAP ;-)

Yeah, I'm doing a prototype implementation for a big company who may use
RAP in an upcoming project (which we are going to develop for them :-).
I'm trying to create a prototype to show them what is possible and how
fast it is possible with RAP.

We may deploy the project as an RCP (for power-users) and as a RAP
application if I can't figure out. I've already integrated EMF into my
prototype and it works out really great :-) and when I will show them
what I've created within 2 days of work they will be astonished (I could
remember having said so often 'Is' des geil' when exploring new
technologies and so will my hopefully my customers).

The more I'll dive into the whole thing the more bug reports, ... you'll
get from my side and I know how much you love bug reports to hack on :-)

>
> See inline comments.
>
> Tom Schindl wrote:
>> In the same light it also seems that the
>> getViewSite().setSelectionProvider(TableViewer) is not working :-(
> Whats not working? We do the same in the demo application in the
> DemoTableViewPart.
>

Need to take a look but eventually I think I'm doing all things correct:
1. Setup a table viewer
2. getViewSite().setSelectionProvider(viewer);
3. Test the selection in my handler with:
----------------8<----------------
System.err.println(ctx.getVariable(ISources.ACTIVE_CURRENT_S ELECTION_NAME));
----------------8<----------------


>>
>> This two problems make the commands-framework useless in RAP.
>>
>> Tom
>>
>> Tom Schindl schrieb:
>>> Maybe I'm missing something obvious but I can't use expression for
>>> hander activation/deactivation.
>>>
>>> I'm using the build from M6 and when I try to add something like this
>>> in my
>>>
>>> ---------------8<---------------
>>> <handler
>>> class="at.bestsolution.webcat.admin.core.OpenPieceHandler"
>>> commandId="at.bestsolution.webcat.admin.openPiece">
>>> <enabledWhen>
>>> <with
>>> variable="activePartId">
>>> <equals
>>> value="test.MyView">
>>> </equals>
>>> </with>
>>> </enabledWhen>
>>> </handler>
>>> ---------------8<---------------
>>>
>>> When opening the handler.exsd one notice that the dependency to
>>> schema://org.eclipse.core.expressions/schema/expressionLangu age.exsd
>>> fails.
> Ouch...curios that nobody else saw this before. But you're completely
> right - the did not yet provide the source (and the schemas) of the core
> plugins with our target. See bug 201805. Hope to get this fixed asap.
>>>
>>> This leads me to think that expressions are not implemented in RAP,
>>> right?
> No, we support expressions. But additional there seems to be a problem
> with the enableWhen expressions. Have to figure that out this weekend ;)
> Would you please file a bug report to track it? Thanks!

Ok good. Not having a working expression framework would be a show
stopper for the real implementation and we would have to use write
things our own.

I've logged: https://bugs.eclipse.org/bugs/show_bug.cgi?id=204377

And I hope this can be resolved for the 1.0-release.

Tom

--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Re: ExpressionLanguage in RAP [message #49371 is a reply to message #49097] Mon, 24 September 2007 10:09 Go to previous messageGo to next message
Benjamin Muskalla is currently offline Benjamin MuskallaFriend
Messages: 237
Registered: July 2009
Senior Member
Hi,

Tom Schindl wrote:
> Ben,
>
> Benjamin Muskalla schrieb:
>> Hi Tom,
>>
>> nice you found the way to RAP ;-)
>
> Yeah, I'm doing a prototype implementation for a big company who may use
> RAP in an upcoming project (which we are going to develop for them :-).
> I'm trying to create a prototype to show them what is possible and how
> fast it is possible with RAP.
>
> We may deploy the project as an RCP (for power-users) and as a RAP
> application if I can't figure out. I've already integrated EMF into my
> prototype and it works out really great :-) and when I will show them
> what I've created within 2 days of work they will be astonished (I could
> remember having said so often 'Is' des geil' when exploring new
> technologies and so will my hopefully my customers).
Hehe, nice to hear ;)
>
> The more I'll dive into the whole thing the more bug reports, ... you'll
> get from my side and I know how much you love bug reports to hack on :-)
Oh yes :)

>
>>
>> See inline comments.
>>
>> Tom Schindl wrote:
>>> In the same light it also seems that the
>>> getViewSite().setSelectionProvider(TableViewer) is not working :-(
>> Whats not working? We do the same in the demo application in the
>> DemoTableViewPart.
>>
>
> Need to take a look but eventually I think I'm doing all things correct:
> 1. Setup a table viewer
> 2. getViewSite().setSelectionProvider(viewer);
> 3. Test the selection in my handler with:
> ----------------8<----------------
> System.err.println(ctx.getVariable(ISources.ACTIVE_CURRENT_S ELECTION_NAME));
The problem is not the selection provider but the selection source
provider of the workbench which is not yet available in RAP (not that it
would be a problem we just forgot to add it :). I recommend to use
selectionservice of the workbench in the meantime. It's too late in the
release cycle to add that stuff but it's a good candidate for a service
release. If there are reasons why you don't want to use the selection
service directly, i could tell you how to do a little hack to have the
selection source provider in place.
>
> ----------------8<----------------
>
>
>>>
>>> <snip>
>>>> ---------------8<---------------
>>>> <handler
>>>> class="at.bestsolution.webcat.admin.core.OpenPieceHandler"
>>>> commandId="at.bestsolution.webcat.admin.openPiece">
>>>> <enabledWhen>
>>>> <with
>>>> variable="activePartId">
>>>> <equals
>>>> value="test.MyView">
>>>> </equals>
>>>> </with>
>>>> </enabledWhen>
>>>> </handler>
>>>> ---------------8<---------------
>>>>
>>>> <snip>
>
> I've logged: https://bugs.eclipse.org/bugs/show_bug.cgi?id=204377

This is a little but confusing as it is working with RAP m6 and CVS
HEAD. I just added the sample command to the demo (with the pde
templates) and added an enabledWhen expression for a part and it is
working. Would you take a look if this is really a problem on our side
or did you just use the wrong id or something similar? I know that the
manifest editor will not help you to create the expression (see bug i
mentioned before) but it's working correctly.

Greets
Benny

>
> Tom
>
Re: ExpressionLanguage in RAP [message #49401 is a reply to message #49371] Mon, 24 September 2007 10:22 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
[...]
>>>>
>>>> <snip>
>>>>> ---------------8<---------------
>>>>> <handler
>>>>> class="at.bestsolution.webcat.admin.core.OpenPieceHandler"
>>>>> commandId="at.bestsolution.webcat.admin.openPiece">
>>>>> <enabledWhen>
>>>>> <with
>>>>> variable="activePartId">
>>>>> <equals
>>>>> value="test.MyView">
>>>>> </equals>
>>>>> </with>
>>>>> </enabledWhen>
>>>>> </handler>
>>>>> ---------------8<---------------
>>>>>
>>>>> <snip>
>>
>> I've logged: https://bugs.eclipse.org/bugs/show_bug.cgi?id=204377
>
> This is a little but confusing as it is working with RAP m6 and CVS
> HEAD. I just added the sample command to the demo (with the pde
> templates) and added an enabledWhen expression for a part and it is
> working. Would you take a look if this is really a problem on our side
> or did you just use the wrong id or something similar? I know that the
> manifest editor will not help you to create the expression (see bug i
> mentioned before) but it's working correctly.
>

I'll take a look later today but the main problem is that I need to use
the selection because an open-command can only be available when there's
really a selection. So I'll appreciate any insight how to attach the
SelectionSourceProvider you mentionned before :-)

Tom


--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Re: ExpressionLanguage in RAP [message #49431 is a reply to message #49401] Mon, 24 September 2007 11:16 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
[...]

> I'll take a look later today but the main problem is that I need to use
> the selection because an open-command can only be available when there's
> really a selection. So I'll appreciate any insight how to attach the
> SelectionSourceProvider you mentionned before :-)
>

You are right I am wrong I really used the wrong part-id. Shame one me :-)

Tom

--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Re: ExpressionLanguage in RAP [message #49461 is a reply to message #49431] Mon, 24 September 2007 12:49 Go to previous messageGo to next message
Benjamin Muskalla is currently offline Benjamin MuskallaFriend
Messages: 237
Registered: July 2009
Senior Member
Tom Schindl wrote:
> [...]
>
>> I'll take a look later today but the main problem is that I need to
>> use the selection because an open-command can only be available when
>> there's really a selection. So I'll appreciate any insight how to
>> attach the SelectionSourceProvider you mentionned before :-)
>>
>
> You are right I am wrong I really used the wrong part-id. Shame one me :-)

Shame on you ;)

Hope that RAP fits your needs. If you have any additional ideas,
questions, etc don't hesitate to ask them here or on the dev mailing list.

Greets
Benny

>
> Tom
>
Re: ExpressionLanguage in RAP [message #49490 is a reply to message #49461] Mon, 24 September 2007 13:27 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Just filed another bug (204443) which might be a tricky one but I have a
work around it.

Tom

Benjamin Muskalla schrieb:
> Tom Schindl wrote:
>> [...]
>>
>>> I'll take a look later today but the main problem is that I need to
>>> use the selection because an open-command can only be available when
>>> there's really a selection. So I'll appreciate any insight how to
>>> attach the SelectionSourceProvider you mentionned before :-)
>>>
>>
>> You are right I am wrong I really used the wrong part-id. Shame one me
>> :-)
>
> Shame on you ;)
>
> Hope that RAP fits your needs. If you have any additional ideas,
> questions, etc don't hesitate to ask them here or on the dev mailing list.
>
> Greets
> Benny
>
>>
>> Tom
>>


--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Previous Topic:Drag and Drop
Next Topic:2 Projects in the same workspace
Goto Forum:
  


Current Time: Fri Apr 19 03:42:56 GMT 2024

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

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

Back to the top