Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Toolbars in parts not shown (RAP 2.3, Eclipse Luna)(Toolbars defined for parts in the application model are not shown.)
Toolbars in parts not shown (RAP 2.3, Eclipse Luna) [message #1371888] Wed, 21 May 2014 15:31 Go to next message
Thorsten Hilker is currently offline Thorsten HilkerFriend
Messages: 31
Registered: March 2014
Member
Hi!

I defined a toolbar for a part in the application model via the editor.
The toolbar is not shown up in the app.

When I did exacly the same in RCP the toolbar is shown.

Is this feature still under construction, or did I mess up something?

BTW: Toolbars for windows are working in RAP 2.3 as expected.

Greetings!

Thorsten

PS Exact RAP Version: 2.3.0.2014.0124-1321
Re: Toolbars in parts not shown (RAP 2.3, Eclipse Luna) [message #1373410 is a reply to message #1371888] Thu, 22 May 2014 06:44 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6523
Registered: July 2009
Senior Member
Same question here - are we talking about RAP in e4?

Tom

On 21.05.14 17:31, Thorsten Hilker wrote:
> Hi!
>
> I defined a toolbar for a part in the application model via the editor.
> The toolbar is not shown up in the app.
>
> When I did exacly the same in RCP the toolbar is shown.
>
> Is this feature still under construction, or did I mess up something?
>
> BTW: Toolbars for windows are working in RAP 2.3 as expected.
>
> Greetings!
>
> Thorsten
>
> PS Exact RAP Version: 2.3.0.2014.0124-1321
Re: Toolbars in parts not shown (RAP 2.3, Eclipse Luna) [message #1373510 is a reply to message #1373410] Thu, 22 May 2014 07:45 Go to previous messageGo to next message
Thorsten Hilker is currently offline Thorsten HilkerFriend
Messages: 31
Registered: March 2014
Member
Yes it's e4 (Luna 4.4, RAP 2.3.0.2014.0124-1321)
Re: Toolbars in parts not shown (RAP 2.3, Eclipse Luna) [message #1373579 is a reply to message #1373510] Thu, 22 May 2014 08:23 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6523
Registered: July 2009
Senior Member
Sounds like a bug, file a bugzilla against
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=RAP&component=Incubator&short_desc=[e4]

Tom

On 22.05.14 09:45, Thorsten Hilker wrote:
> Yes it's e4 (Luna 4.4, RAP 2.3.0.2014.0124-1321)
Re: Toolbars in parts not shown (RAP 2.3, Eclipse Luna) [message #1373606 is a reply to message #1373579] Thu, 22 May 2014 08:37 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6523
Registered: July 2009
Senior Member
Hi,

I've just been running the demo application which is part of the
git-repo and a Toolbar shows up. Is it possible that you are have not
cleared the workspace after the initial run?

Tom

On 22.05.14 10:23, Tom Schindl wrote:
> Sounds like a bug, file a bugzilla against
> https://bugs.eclipse.org/bugs/enter_bug.cgi?product=RAP&component=Incubator&short_desc=[e4]
>
> Tom
>
> On 22.05.14 09:45, Thorsten Hilker wrote:
>> Yes it's e4 (Luna 4.4, RAP 2.3.0.2014.0124-1321)
>
Re: Toolbars in parts not shown (RAP 2.3, Eclipse Luna) [message #1373624 is a reply to message #1373606] Thu, 22 May 2014 08:49 Go to previous messageGo to next message
Thorsten Hilker is currently offline Thorsten HilkerFriend
Messages: 31
Registered: March 2014
Member
Good to hear that it works in principle.
With clearing the workspace you mean checking the checkbox in the run configuration
"Clear the instance area before launching" ?
It is checked.

Maybe I'm running a different version here.
Do you use RAP 2.3.0.2014.0124-1321 too?
Or is there a newer one.

Greetings,
Thorsten

PS Haven't filed a bug yet, seems to be a problem with my installation.
Re: Toolbars in parts not shown (RAP 2.3, Eclipse Luna) [message #1373633 is a reply to message #1373624] Thu, 22 May 2014 08:53 Go to previous messageGo to next message
Thorsten Hilker is currently offline Thorsten HilkerFriend
Messages: 31
Registered: March 2014
Member
Or maybe you can try to launch my application model.
Shouldn't be that much work.

Thanx in advance.

Thorsten

PS Fileupload is not working somehow. Here the file:

<?xml version="1.0" encoding="ASCII"?>
<application:Application xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:application="http://www.eclipse.org/ui/2010/UIModel/application" xmlns:basic="http://www.eclipse.org/ui/2010/UIModel/application/ui/basic" xmlns:menu="http://www.eclipse.org/ui/2010/UIModel/application/ui/menu" xmi:id="_XqkCQKknEeObFrG_clJBYA" elementId="">
<children xsi:type="basic:TrimmedWindow" xmi:id="_Zdy6cKknEeObFrG_clJBYA" elementId="rap4.trimmedwindow.0" label="%trimmedwindow.label.1" iconURI="platform:/plugin/com.imilia.test.gui/resources/com/imilia/test/gui/timerbee.png" x="10" y="10" width="500" height="500">
<tags>shellMaximized</tags>
<children xsi:type="basic:PartSashContainer" xmi:id="_Ys7k0OC3EeOvFtVYSX9Jqw" elementId="com.imilia.test.gui.partsashcontainer.0" horizontal="true">
<children xsi:type="basic:PartSashContainer" xmi:id="_bp8vkOC3EeOvFtVYSX9Jqw" elementId="com.imilia.test.gui.partsashcontainer.1" containerData="3000">
<children xsi:type="basic:PartStack" xmi:id="_fDXSsODIEeOlOOK9-2juYg" elementId="com.imilia.test.gui.partstack.0" containerData="5000">
<children xsi:type="basic:Part" xmi:id="_cpfhAOC3EeOvFtVYSX9Jqw" elementId="com.imilia.test.gui.part.0" containerData="5000" contributionURI="bundleclass://com.imilia.test.gui/com.imilia.test.gui.MainPart" label="Personen 1">
<toolbar xmi:id="_4AEdQOGLEeOlOOK9-2juYg" elementId="com.imilia.test.gui.toolbar.0">
<children xsi:type="menu:HandledToolItem" xmi:id="_58bcQOGLEeOlOOK9-2juYg" elementId="com.imilia.test.gui.handledtoolitem.0" label="Test1"/>
<children xsi:type="menu:DirectToolItem" xmi:id="_9RSfQOGLEeOlOOK9-2juYg" elementId="com.imilia.test.gui.directtoolitem.0" label="Test2"/>
</toolbar>
</children>
</children>
<children xsi:type="basic:PartStack" xmi:id="_-5UAUOC3EeOvFtVYSX9Jqw" elementId="com.imilia.test.gui.partstack.1" containerData="5000">
<children xsi:type="basic:Part" xmi:id="_pFRFMOC3EeOvFtVYSX9Jqw" elementId="com.imilia.test.gui.part.0" containerData="5000" contributionURI="bundleclass://com.imilia.test.gui/com.imilia.test.gui.MainPart" label="Person 2"/>
</children>
</children>
<children xsi:type="basic:PartStack" xmi:id="_e3IyYOC5EeOlOOK9-2juYg" elementId="com.imilia.test.gui.partstack.2" containerData="7000">
<children xsi:type="basic:Part" xmi:id="_rfiIMOC3EeOvFtVYSX9Jqw" elementId="com.imilia.test.gui.part.0" containerData="7000" contributionURI="bundleclass://com.imilia.test.gui/com.imilia.test.gui.MainPart2" label="Person 3"/>
</children>
</children>
</children>
<addons xmi:id="_XqkCQaknEeObFrG_clJBYA" elementId="org.eclipse.e4.core.commands.service" contributionURI="bundleclass://org.eclipse.e4.core.commands/org.eclipse.e4.core.commands.CommandServiceAddon"/>
<addons xmi:id="_XqkCQqknEeObFrG_clJBYA" elementId="org.eclipse.e4.ui.contexts.service" contributionURI="bundleclass://org.eclipse.e4.ui.services/org.eclipse.e4.ui.services.ContextServiceAddon"/>
<addons xmi:id="_XqkCQ6knEeObFrG_clJBYA" elementId="org.eclipse.e4.ui.bindings.service" contributionURI="bundleclass://org.eclipse.e4.ui.bindings/org.eclipse.e4.ui.bindings.BindingServiceAddon"/>
<addons xmi:id="_XqkCRKknEeObFrG_clJBYA" elementId="org.eclipse.e4.ui.workbench.commands.model" contributionURI="bundleclass://org.eclipse.e4.ui.workbench/org.eclipse.e4.ui.internal.workbench.addons.CommandProcessingAddon"/>
<addons xmi:id="_XqkCRaknEeObFrG_clJBYA" elementId="org.eclipse.e4.ui.workbench.contexts.model" contributionURI="bundleclass://org.eclipse.e4.ui.workbench/org.eclipse.e4.ui.internal.workbench.addons.ContextProcessingAddon"/>
<addons xmi:id="_XqkCRqknEeObFrG_clJBYA" elementId="org.eclipse.e4.ui.workbench.bindings.model" contributionURI="bundleclass://org.eclipse.e4.ui.workbench.swt/org.eclipse.e4.ui.workbench.swt.util.BindingProcessingAddon"/>
<addons xmi:id="_XqkCR6knEeObFrG_clJBYA" elementId="org.eclipse.e4.ui.workbench.handler.model" contributionURI="bundleclass://org.eclipse.e4.ui.workbench/org.eclipse.e4.ui.internal.workbench.addons.HandlerProcessingAddon"/>
<addons xmi:id="_dE0TsOAKEeOvFtVYSX9Jqw" elementId="com.imilia.test.gui.domainmodel.service" contributionURI="bundleclass://com.imilia.test.gui/com.imilia.test.gui.DomainModelServiceAddon"/>
</application:Application>
Re: Toolbars in parts not shown (RAP 2.3, Eclipse Luna) [message #1373650 is a reply to message #1373624] Thu, 22 May 2014 09:02 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6523
Registered: July 2009
Senior Member
I'm running in my workspace with the RAP nightly (and naturally the
sources checked out) - the version you cite is the one for rwt.osgi
which is not the really important one more important one is
org.eclipse.rap.rwt_2.3.0.20140520-1615.jar but I don't think the
problem is the rap/rwt but the e4 implementation.

What's the version of org.eclipse.rap.e4.target.feature?

Tom

On 22.05.14 10:49, Thorsten Hilker wrote:
> Good to hear that it works in principle.
> With clearing the workspace you mean checking the checkbox in the run
> configuration
> "Clear the instance area before launching" ?
> It is checked.
>
> Maybe I'm running a different version here. Do you use RAP
> 2.3.0.2014.0124-1321 too?
> Or is there a newer one.
>
> Greetings,
> Thorsten
>
> PS Haven't filed a bug yet, seems to be a problem with my installation.
Re: Toolbars in parts not shown (RAP 2.3, Eclipse Luna) [message #1373651 is a reply to message #1373633] Thu, 22 May 2014 09:04 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6523
Registered: July 2009
Senior Member
Oh f... - looks like I have not really read your post! We are talking
about Toolbars in the Part!

Right they have not yet been implemented - please file a bugreport!

Tom

On 22.05.14 10:53, Thorsten Hilker wrote:
> <?xml version="1.0" encoding="ASCII"?>
> <application:Application xmi:version="2.0"
> xmlns:xmi="http://www.omg.org/XMI"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:application="http://www.eclipse.org/ui/2010/UIModel/application"
> xmlns:basic="http://www.eclipse.org/ui/2010/UIModel/application/ui/basic" xmlns:menu="http://www.eclipse.org/ui/2010/UIModel/application/ui/menu"
> xmi:id="_XqkCQKknEeObFrG_clJBYA" elementId="">
> <children xsi:type="basic:TrimmedWindow"
> xmi:id="_Zdy6cKknEeObFrG_clJBYA" elementId="rap4.trimmedwindow.0"
> label="%trimmedwindow.label.1"
> iconURI="platform:/plugin/com.imilia.test.gui/resources/com/imilia/test/gui/timerbee.png"
> x="10" y="10" width="500" height="500">
> <tags>shellMaximized</tags>
> <children xsi:type="basic:PartSashContainer"
> xmi:id="_Ys7k0OC3EeOvFtVYSX9Jqw"
> elementId="com.imilia.test.gui.partsashcontainer.0" horizontal="true">
> <children xsi:type="basic:PartSashContainer"
> xmi:id="_bp8vkOC3EeOvFtVYSX9Jqw"
> elementId="com.imilia.test.gui.partsashcontainer.1" containerData="3000">
> <children xsi:type="basic:PartStack"
> xmi:id="_fDXSsODIEeOlOOK9-2juYg"
> elementId="com.imilia.test.gui.partstack.0" containerData="5000">
> <children xsi:type="basic:Part"
> xmi:id="_cpfhAOC3EeOvFtVYSX9Jqw" elementId="com.imilia.test.gui.part.0"
> containerData="5000"
> contributionURI="bundleclass://com.imilia.test.gui/com.imilia.test.gui.MainPart"
> label="Personen 1">
> <toolbar xmi:id="_4AEdQOGLEeOlOOK9-2juYg"
> elementId="com.imilia.test.gui.toolbar.0">
> <children xsi:type="menu:HandledToolItem"
> xmi:id="_58bcQOGLEeOlOOK9-2juYg"
> elementId="com.imilia.test.gui.handledtoolitem.0" label="Test1"/>
> <children xsi:type="menu:DirectToolItem"
> xmi:id="_9RSfQOGLEeOlOOK9-2juYg"
> elementId="com.imilia.test.gui.directtoolitem.0" label="Test2"/>
> </toolbar>
> </children>
> </children>
> <children xsi:type="basic:PartStack"
> xmi:id="_-5UAUOC3EeOvFtVYSX9Jqw"
> elementId="com.imilia.test.gui.partstack.1" containerData="5000">
> <children xsi:type="basic:Part"
> xmi:id="_pFRFMOC3EeOvFtVYSX9Jqw" elementId="com.imilia.test.gui.part.0"
> containerData="5000"
> contributionURI="bundleclass://com.imilia.test.gui/com.imilia.test.gui.MainPart"
> label="Person 2"/>
> </children>
> </children>
> <children xsi:type="basic:PartStack"
> xmi:id="_e3IyYOC5EeOlOOK9-2juYg"
> elementId="com.imilia.test.gui.partstack.2" containerData="7000">
> <children xsi:type="basic:Part" xmi:id="_rfiIMOC3EeOvFtVYSX9Jqw"
> elementId="com.imilia.test.gui.part.0" containerData="7000"
> contributionURI="bundleclass://com.imilia.test.gui/com.imilia.test.gui.MainPart2"
> label="Person 3"/>
> </children>
> </children>
> </children>
> <addons xmi:id="_XqkCQaknEeObFrG_clJBYA"
> elementId="org.eclipse.e4.core.commands.service"
> contributionURI="bundleclass://org.eclipse.e4.core.commands/org.eclipse.e4.core.commands.CommandServiceAddon"/>
>
> <addons xmi:id="_XqkCQqknEeObFrG_clJBYA"
> elementId="org.eclipse.e4.ui.contexts.service"
> contributionURI="bundleclass://org.eclipse.e4.ui.services/org.eclipse.e4.ui.services.ContextServiceAddon"/>
>
> <addons xmi:id="_XqkCQ6knEeObFrG_clJBYA"
> elementId="org.eclipse.e4.ui.bindings.service"
> contributionURI="bundleclass://org.eclipse.e4.ui.bindings/org.eclipse.e4.ui.bindings.BindingServiceAddon"/>
>
> <addons xmi:id="_XqkCRKknEeObFrG_clJBYA"
> elementId="org.eclipse.e4.ui.workbench.commands.model"
> contributionURI="bundleclass://org.eclipse.e4.ui.workbench/org.eclipse.e4.ui.internal.workbench.addons.CommandProcessingAddon"/>
>
> <addons xmi:id="_XqkCRaknEeObFrG_clJBYA"
> elementId="org.eclipse.e4.ui.workbench.contexts.model"
> contributionURI="bundleclass://org.eclipse.e4.ui.workbench/org.eclipse.e4.ui.internal.workbench.addons.ContextProcessingAddon"/>
>
> <addons xmi:id="_XqkCRqknEeObFrG_clJBYA"
> elementId="org.eclipse.e4.ui.workbench.bindings.model"
> contributionURI="bundleclass://org.eclipse.e4.ui.workbench.swt/org.eclipse.e4.ui.workbench.swt.util.BindingProcessingAddon"/>
>
> <addons xmi:id="_XqkCR6knEeObFrG_clJBYA"
> elementId="org.eclipse.e4.ui.workbench.handler.model"
> contributionURI="bundleclass://org.eclipse.e4.ui.workbench/org.eclipse.e4.ui.internal.workbench.addons.HandlerProcessingAddon"/>
>
> <addons xmi:id="_dE0TsOAKEeOvFtVYSX9Jqw"
> elementId="com.imilia.test.gui.domainmodel.service"
> contributionURI="bundleclass://com.imilia.test.gui/com.imilia.test.gui.DomainModelServiceAddon"/>
>
> </application:Application>
Re: Toolbars in parts not shown (RAP 2.3, Eclipse Luna) [message #1373661 is a reply to message #1373651] Thu, 22 May 2014 09:08 Go to previous messageGo to next message
Thorsten Hilker is currently offline Thorsten HilkerFriend
Messages: 31
Registered: March 2014
Member
No prob.

Thanx for your help.

BTW: Wonderful work. A GUI framework I was always looking for.

Greetings from Berlin!

Thorsten
Re: Toolbars in parts not shown (RAP 2.3, Eclipse Luna) [message #1373758 is a reply to message #1373661] Thu, 22 May 2014 10:01 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6523
Registered: July 2009
Senior Member
I've looked into adding support for Toolbar & ViewMenu like they work in
RCP but because RAP currently does not support SWT.WRAP on CTabFolder
[1] I think we should implement Part-Toolbar & ViewMenu in a different
way on RAP.

The only currently feasable option I see is to put them into the content
area directly below the tabs!

Tom

[1]https://bugs.eclipse.org/bugs/show_bug.cgi?id=435486

On 22.05.14 11:08, Thorsten Hilker wrote:
> No prob.
>
> Thanx for your help.
>
> BTW: Wonderful work. A GUI framework I was always looking for.
>
> Greetings from Berlin!
>
> Thorsten
Re: Toolbars in parts not shown (RAP 2.3, Eclipse Luna) [message #1373787 is a reply to message #1373758] Thu, 22 May 2014 10:20 Go to previous messageGo to next message
Thorsten Hilker is currently offline Thorsten HilkerFriend
Messages: 31
Registered: March 2014
Member
If I understood correcly you have to implement this option.
And it's not allready there?

I think the toolbars are really a "must have".
Otherwise it would be difficuld to code decent application,
because the alternative would be to use buttons.
And I think that's not what we want.

Greetings!

Thorsten
Re: Toolbars in parts not shown (RAP 2.3, Eclipse Luna) [message #1373820 is a reply to message #1373787] Thu, 22 May 2014 10:36 Go to previous messageGo to next message
Thorsten Hilker is currently offline Thorsten HilkerFriend
Messages: 31
Registered: March 2014
Member
Ups,

now I understand, you mean to add the toolbar programmatically.
Ok, that's an option.
Not that ellegant, but should work.

I'm wondering if it's possible to use handlers with programmatically added controls?

Will have to figure that out.

Greetings!

Thorsten
Re: Toolbars in parts not shown (RAP 2.3, Eclipse Luna) [message #1373846 is a reply to message #1373820] Thu, 22 May 2014 10:52 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6523
Registered: July 2009
Senior Member
a) I can implement the default behavior you see on RCP but there are
multi small quirks on RAP
- SWT.WRAP is not support so the tool-items will not move down below
the tabs when there's not enough space in the TabBar [1]
- it looks like there are layout problems in the TabBar [2]

I've now pushed ToolBar support to the rap-e4 repo but you'll notice
those problems!

b) My suggestion is to render the toolbar inside below the TabArea by
default because of the missing SWT.WRAP support in RAP - I'll try to
add this option in the afternoon.

c) You can naturally implement a toolbar inside your Part-Class and
then using the ECommand & EHandlerService to execute commands and
handlers but this requires you to also handle the enable/disable
stuff your own

Tom

[1]https://bugs.eclipse.org/bugs/show_bug.cgi?id=435486
[2]https://bugs.eclipse.org/bugs/show_bug.cgi?id=435499

On 22.05.14 12:36, Thorsten Hilker wrote:
> Ups,
>
> now I understand, you mean to add the toolbar programmatically.
> Ok, that's an option.
> Not that ellegant, but should work.
>
> I'm wondering if it's possible to use handlers with programmatically
> added controls?
>
> Will have to figure that out.
>
> Greetings!
>
> Thorsten
Re: Toolbars in parts not shown (RAP 2.3, Eclipse Luna) [message #1373890 is a reply to message #1373846] Thu, 22 May 2014 11:17 Go to previous messageGo to next message
Thorsten Hilker is currently offline Thorsten HilkerFriend
Messages: 31
Registered: March 2014
Member
@b) Would be great.

@c) Never tried to connect programmatically created controls to handlers or commands. Will figure that out. Or is there an example?

Greetings

Thorsten
Re: Toolbars in parts not shown (RAP 2.3, Eclipse Luna) [message #1373967 is a reply to message #1373890] Thu, 22 May 2014 12:01 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6523
Registered: July 2009
Senior Member
b) is implemented now - if you add ContentArea as a tag to the ToolBar-
Element in the model, the toolbar will be rendered as part of the
content of the tab

c) I don't know but it should not be hard to get that working - untested
I would write

MPart p = ...
ECommandService ecmds = ...
EHandlerService ehs = ...

ParameterizedCommand cmd = emds.createCommand("my.simply.command",
Collections.emptyMap())
ehs.executeHandler(cmd,p.getContext());



On 22.05.14 13:17, Thorsten Hilker wrote:
> @b) Would be great.
>
> @c) Never tried to connect programmatically created controls to handlers
> or commands. Will figure that out. Or is there an example?
>
> Greetings
> Thorsten
Re: Toolbars in parts not shown (RAP 2.3, Eclipse Luna) [message #1374457 is a reply to message #1373967] Thu, 22 May 2014 16:54 Go to previous messageGo to next message
Thorsten Hilker is currently offline Thorsten HilkerFriend
Messages: 31
Registered: March 2014
Member
Hi!

It works!
Great job. Thanx!
The Tag "ContentArea" is not nessecary. (Or did I miss something?)

BTW:
Is there a standard mechnism to enable/disable the Icon/Text of the Tool Item?
Even if the @CanExecute method returns false the Icon is enabled.
You can click on it and nothing happens, that is OK. But wouldn't it be great to provide an "disabled icon" which is choosen if the @CanExecute method returns false?

Greetings and many thanks!

Thorsten
Re: Toolbars in parts not shown (RAP 2.3, Eclipse Luna) [message #1374476 is a reply to message #1374457] Thu, 22 May 2014 17:00 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6523
Registered: July 2009
Senior Member
On 22.05.14 18:54, Thorsten Hilker wrote:
> Hi!
>
> It works!
> Great job. Thanx!
> The Tag "ContentArea" is not nessecary. (Or did I miss something?)

If there's not ContentArea tag the ToolBar is placed into the TabHeaderArea

>
> BTW:
> Is there a standard mechnism to enable/disable the Icon/Text of the Tool
> Item?
> Even if the @CanExecute method returns false the Icon is enabled.
> You can click on it and nothing happens, that is OK. But wouldn't it be
> great to provide an "disabled icon" which is choosen if the @CanExecute
> method returns false?
>

Well this should work already! IIRC enablement only works correctly if
you are using a HandledItem.

Tom
Re: Toolbars in parts not shown (RAP 2.3, Eclipse Luna) [message #1374660 is a reply to message #1374476] Thu, 22 May 2014 18:52 Go to previous messageGo to next message
Thorsten Hilker is currently offline Thorsten HilkerFriend
Messages: 31
Registered: March 2014
Member
Hi!

May I disturb you for a last time today? Smile

a) The ContentArea-Tag is working perfectly!

b) But if I use HandledItems I experience a strange effect.

The @CanExecute-method works.
The HandledItem only executes when the method returns true.

But the look of the Icon shows another behaviour.
It seems that it keeps the initial look and is not changing.

For example (is an inner Class, I tested with "normal classes" as well):
	static public class Previous {
		@Execute
		void execute( @Named(IModelService.PERSONMODEL_MAINPART) IPersonModel personModel) {
			personModel.previous();
		}
		
		@CanExecute
		boolean canexcute(@Named(IModelService.PERSONMODEL_MAINPART) IPersonModel personModel) {
			if (personModel.getPerson().getOid() > 0) {
				return true;
			}
			return false;
		}
	}

Initially the Oid is 0, so the icons look is disabled.

When I scroll with this handler:
	static public class Next {
		@Execute
		void execute( @Named(IModelService.PERSONMODEL_MAINPART) IPersonModel personModel) {
			personModel.next();
		}
		@CanExecute
		boolean canexcute(@Named(IModelService.PERSONMODEL_MAINPART) IPersonModel personModel) {
			if (personModel.getPerson().getOid() < 2) {
				return true;
			}
			return false;
		}
        }

The Oid becomes 1. But the previous-icon is not changing and stays disabled.

If I reach the Oid 2. The next-icon stays enabled.
But when I press the next-icon nothing happens, which is correct.

Did I forget to configure something? I created handlers and commands. After that I connected them. Is there more to do?

c) The Appliction Model Editor does not recognize inner classes correctly.
For my inner classes it shows: bundleclass://com.imilia.test.gui/com.imilia.test.gui.Next
Correct is: bundleclass://com.imilia.test.gui/com.imilia.test.gui.Handler$Next
I think it would be convienied to "bundle" serveral handlers in one class.

Many thanks for your effort and the great work!

Greetings from Berlin!

Thorsten

Re: Toolbars in parts not shown (RAP 2.3, Eclipse Luna) [message #1374901 is a reply to message #1374660] Thu, 22 May 2014 21:10 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6523
Registered: July 2009
Senior Member
Well you need to tell the system to reexam the canexecute!

Pre Luna the system was running an infinte loop call @CanExecute every
400ms with Luna this has changed and if you modify something that could
result into a state change on commands you need to send out an event
through the event broker.

broker.send(UIEvents.REQUEST_ENABLEMENT_UPDATE_TOPIC,UIEvents.ALL_ELEMENT_ID);

Tom

On 22.05.14 20:52, Thorsten Hilker wrote:
> Hi!
>
> May I disturb you for a last time today? :)
>
> a) The ContentArea-Tag is working perfectly!
>
> b) But if I use HandledItems I experience a strange effect.
>
> The @CanExecute-method works.
> The HandledItem only executes when the method returns true.
>
> But the look of the Icon shows another behaviour.
> It seems that it keeps the initial look and is not changing.
>
> For example (is an inner Class, I tested with "normal classes" as well):
>
> static public class Previous {
> @Execute
> void execute( @Named(IModelService.PERSONMODEL_MAINPART)
> IPersonModel personModel) {
> personModel.previous();
> }
>
> @CanExecute
> boolean canexcute(@Named(IModelService.PERSONMODEL_MAINPART)
> IPersonModel personModel) {
> if (personModel.getPerson().getOid() > 0) {
> return true;
> }
> return false;
> }
> }
>
> Initially the Oid is 0, so the icons look is disabled.
>
> When I scroll with this handler:
>
> static public class Next {
> @Execute
> void execute( @Named(IModelService.PERSONMODEL_MAINPART)
> IPersonModel personModel) {
> personModel.next();
> }
> @CanExecute
> boolean canexcute(@Named(IModelService.PERSONMODEL_MAINPART)
> IPersonModel personModel) {
> if (personModel.getPerson().getOid() < 2) {
> return true;
> }
> return false;
> }
> }
>
> The Oid becomes 1. But the previous-icon is not changing and stays
> disabled.
>
> If I reach the Oid 2. The next-icon stays enabled.
> But when I press the next-icon nothing happens, which is correct.
>
> Did I forget to configure something? I created handlers and commands.
> After that I connected them. Is there more to do?
>
> c) The Appliction Model Editor does not recognize inner classes correctly.
> For my inner classes it shows:
> bundleclass://com.imilia.test.gui/com.imilia.test.gui.Next Correct is:
> bundleclass://com.imilia.test.gui/com.imilia.test.gui.Handler$Next
> I think it would be convienied to "bundle" serveral handlers in one class.
>
> Many thanks for your effort and the great work!
>
> Greetings from Berlin!
>
> Thorsten
>
Re: Toolbars in parts not shown (RAP 2.3, Eclipse Luna) [message #1375986 is a reply to message #1374901] Fri, 23 May 2014 07:56 Go to previous messageGo to next message
Thorsten Hilker is currently offline Thorsten HilkerFriend
Messages: 31
Registered: March 2014
Member
Hi!

Thank you again.
It works.

Do I have the chance to figure out such things on my own in the future?
Is there a documentation yet?

Greetings!
Thorsten
Re: Toolbars in parts not shown (RAP 2.3, Eclipse Luna) [message #1376042 is a reply to message #1375986] Fri, 23 May 2014 08:29 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6523
Registered: July 2009
Senior Member
Best bet would be one of Lars' Vogels e4 tutorial, but because this is
quite new I'm uncertain it is documented.

Tom

On 23.05.14 09:56, Thorsten Hilker wrote:
> Hi!
>
> Thank you again.
> It works.
>
> Do I have the chance to figure out such things on my own in the future?
> Is there a documentation yet?
>
> Greetings!
> Thorsten
Re: Toolbars in parts not shown (RAP 2.3, Eclipse Luna) [message #1376214 is a reply to message #1376042] Fri, 23 May 2014 10:03 Go to previous message
Thorsten Hilker is currently offline Thorsten HilkerFriend
Messages: 31
Registered: March 2014
Member
Yes I bought Vogels book and tried to learn RAP for 2 weeks now.
Quite impressiv. Really a new world.
We used Echo3 before. But we want to switch, because the support is poor and the technologie comes into ages.

What can I say, after evaluating RAP e4? I'm really excited of the framework and the support.

Greetings!

Thorsten
Previous Topic:Nebula CompositeTable support
Next Topic:Localization RAP 2.3 is not working for the application model
Goto Forum:
  


Current Time: Tue Feb 18 09:35:17 GMT 2020

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

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

Back to the top