Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » SimpleIDE Menus and Navigator Control(too many of them)
SimpleIDE Menus and Navigator Control [message #893547] Wed, 04 July 2012 10:03 Go to next message
Marek Jasovsky is currently offline Marek Jasovsky
Messages: 23
Registered: July 2012
Junior Member
Hi

after finally getting SimpleIDE working, I discovered, that on each start of IDE, new "Themes" menu gets created, and new Navigator Control. those get persisted into workbench.xmi and on next start, first instance of menu is loaded from xmi file, next one will be created manually. if you start IDE 10 times, you get 10 Menu items "Themes"

with Menu I was able to solve it with simple patch in ThemeMenuProcessor.java

List<MMenuElement> items = menu.getChildren();
boolean found = false;
for (MMenuElement mMenuElement : items) {
if ("Themes".equals(mMenuElement.getLabel())) {
found = true;
break;
}
}

if(found == false) {
menu.getChildren().add(themesMenu);
}

now the question, more general. what is correct way of doing this? some kind of control, if the menu is already instantiated? or how?

is there in API some easier way to find Menu Item according to Text / ID ?

thanks a lot in advance

Marek

Addendum:

I found out, that those things are propagated to the UI using fragments, but still there remains the question, why are those parts (Navigator, Outline, ...) displayed many times, or why are they actually always newly instantiated.

[Updated on: Wed, 04 July 2012 10:49]

Report message to a moderator

Re: SimpleIDE Menus and Navigator Control [message #893574 is a reply to message #893547] Wed, 04 July 2012 12:09 Go to previous messageGo to next message
Oliver Koch is currently offline Oliver Koch
Messages: 40
Registered: June 2012
Member
Hi,

somehow the term ressource deltas appears in my mind.

This means, if you start with the -clean argument that problem should be
done

Am 04.07.2012 16:03, schrieb Marek Jasovsky:
> Hi
>
> after finally getting SimpleIDE working, I discovered, that on each
> start of IDE, new "Themes" menu gets created, and new Navigator Control.
> those get persisted into workbench.xmi and on next start, first instance
> of menu is loaded from xmi file, next one will be created manually. if
> you start IDE 10 times, you get 10 Menu items "Themes"
>
> with Menu I was able to solve it with simple patch in
> ThemeMenuProcessor.java
>
> List<MMenuElement> items = menu.getChildren();
> boolean found = false;
> for (MMenuElement mMenuElement : items) {
> if ("Themes".equals(mMenuElement.getLabel())) {
> found = true;
> break;
> }
> }
>
> if(found == false) {
> menu.getChildren().add(themesMenu);
> }
Re: SimpleIDE Menus and Navigator Control [message #893933 is a reply to message #893574] Fri, 06 July 2012 02:41 Go to previous messageGo to next message
Marek Jasovsky is currently offline Marek Jasovsky
Messages: 23
Registered: July 2012
Junior Member
Moin Oliver

yes, -clearPersistedState solves it partially, but it solves only the result, not the cause. Tutorial from the Eclipse 4 RCP book by Lars Vogel does not show such results, and it should be possible to persist state of the UI, without such multiple additions. Themes Menu is added through code.

but Navigator and Outline views are added through fragments, and something must be wrong there, if the platform behaves like this.

Marek
Re: SimpleIDE Menus and Navigator Control [message #893937 is a reply to message #893933] Fri, 06 July 2012 02:53 Go to previous messageGo to next message
Marek Jasovsky is currently offline Marek Jasovsky
Messages: 23
Registered: July 2012
Junior Member
I have found the cause, and it is not in the framework.

in fragment.e4xmi within Part node, there was no ID specified, this caused multiple instances to be created.

attached patch of fragments.e4xmi for navigator and outline.

regards

Marek
Re: SimpleIDE Menus and Navigator Control [message #894001 is a reply to message #893937] Fri, 06 July 2012 07:31 Go to previous messageGo to next message
Sopot Cela is currently offline Sopot Cela
Messages: 597
Registered: December 2010
Senior Member

Hi Marek,

your contriubtion is welcome but please open a bug here https://bugs.eclipse.org/bugs/enter_bug.cgi?product=E4&component=UI and attach your patch so it is reviewed there.
Re: SimpleIDE Menus and Navigator Control [message #894041 is a reply to message #893574] Fri, 06 July 2012 09:22 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5280
Registered: July 2009
Senior Member
Yes when the SimpleIDE stuff was developed there was no need to check if
a contribution was there already because we used deltas for restoring
the state. This was changed but the SimpleIDE code was not updated to it.

Tom

Am 04.07.12 18:09, schrieb Oliver Koch:
> Hi,
>
> somehow the term ressource deltas appears in my mind.
>
> This means, if you start with the -clean argument that problem should be
> done
>
> Am 04.07.2012 16:03, schrieb Marek Jasovsky:
>> Hi
>>
>> after finally getting SimpleIDE working, I discovered, that on each
>> start of IDE, new "Themes" menu gets created, and new Navigator Control.
>> those get persisted into workbench.xmi and on next start, first instance
>> of menu is loaded from xmi file, next one will be created manually. if
>> you start IDE 10 times, you get 10 Menu items "Themes"
>>
>> with Menu I was able to solve it with simple patch in
>> ThemeMenuProcessor.java
>>
>> List<MMenuElement> items = menu.getChildren();
>> boolean found = false;
>> for (MMenuElement mMenuElement : items) {
>> if ("Themes".equals(mMenuElement.getLabel())) {
>> found = true;
>> break;
>> }
>> }
>>
>> if(found == false) {
>> menu.getChildren().add(themesMenu);
>> }
>
>
Re: SimpleIDE Menus and Navigator Control [message #894044 is a reply to message #894041] Fri, 06 July 2012 09:30 Go to previous messageGo to next message
Marek Jasovsky is currently offline Marek Jasovsky
Messages: 23
Registered: July 2012
Junior Member
Thanks a lot for the answer.

Is actually SimpleIDE as a project still active, or not anymore? I like the idea in general, but there seems to be long time passed since last changes

regards

Marek
Re: SimpleIDE Menus and Navigator Control [message #894045 is a reply to message #894001] Fri, 06 July 2012 09:35 Go to previous messageGo to next message
Marek Jasovsky is currently offline Marek Jasovsky
Messages: 23
Registered: July 2012
Junior Member
HI

Bugreport has been created, I will attach the patches there

Marek

Sopot Cela wrote on Fri, 06 July 2012 07:31
Hi Marek,

your contriubtion is welcome but please open a bug here https://bugs.eclipse.org/bugs/enter_bug.cgi?product=E4&component=UI and attach your patch so it is reviewed there.

Re: SimpleIDE Menus and Navigator Control [message #894053 is a reply to message #894045] Fri, 06 July 2012 09:48 Go to previous messageGo to next message
Sopot Cela is currently offline Sopot Cela
Messages: 597
Registered: December 2010
Senior Member

Usually you also post the bug number as a refence. Thanks.
Re: SimpleIDE Menus and Navigator Control [message #894054 is a reply to message #894053] Fri, 06 July 2012 09:50 Go to previous messageGo to next message
Marek Jasovsky is currently offline Marek Jasovsky
Messages: 23
Registered: July 2012
Junior Member
Sorry for that

here a link

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

Marek

Sopot Cela wrote on Fri, 06 July 2012 09:48
Usually you also post the bug number as a refence. Thanks.
Re: SimpleIDE Menus and Navigator Control [message #894064 is a reply to message #894044] Fri, 06 July 2012 10:17 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5280
Registered: July 2009
Senior Member
It is more of a test/sample what we still miss to allow users to create
an simple IDE with pure e4 technologies. One of the missing pieces in e4
is the native concept of an editor in this world which we should address
in 4.3.

Tom

Am 06.07.12 15:30, schrieb Marek Jasovsky:
> Thanks a lot for the answer.
>
> Is actually SimpleIDE as a project still active, or not anymore? I like
> the idea in general, but there seems to be long time passed since last
> changes
>
> regards
>
> Marek
Re: SimpleIDE Menus and Navigator Control [message #894067 is a reply to message #894064] Fri, 06 July 2012 10:23 Go to previous messageGo to next message
Marek Jasovsky is currently offline Marek Jasovsky
Messages: 23
Registered: July 2012
Junior Member
Hi

That's why I am so interested in it, because writing pure e4 rcp app seems to be very nice and effective.

good news, that it is still kind of active.

by the editor stuff you mean native support for editors (of various types) within eclipse 4.x platform? yes, this would be definitely welcome.

Regards

Marek
Re: SimpleIDE Menus and Navigator Control [message #894171 is a reply to message #894067] Sat, 07 July 2012 05:19 Go to previous messageGo to next message
Marek Jasovsky is currently offline Marek Jasovsky
Messages: 23
Registered: July 2012
Junior Member
Hi Tom

Couldn't you please navigate me or explain what exactly you mean by native editor in eclipse 4 .what is its counterpart in 3.x? Who within eclipse is in charge of decisions regarding this and how could I contribute? Thanks a lot.

Marek
Re: SimpleIDE Menus and Navigator Control [message #895277 is a reply to message #894171] Thu, 12 July 2012 07:12 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5280
Registered: July 2009
Senior Member
Sorry that it took longer to reply but I was busy doing other things.

I've just sent a mail to e4-dev where I outline areas I'm going to work
in the 4.3 timeframe
(http://dev.eclipse.org/mhonarc/lists/e4-dev/msg06685.html).

You should not wait for someone to implement a feature though but if you
want something to happen. File a bugzilla and start working on it.

If you are not subscribed to e4-dev I suggest you subscribe yourself and
monitor the mailing list.

Tom

Am 07.07.12 11:19, schrieb Marek Jasovsky:
> Hi Tom
> Couldn't you please navigate me or explain what exactly you mean by
> native editor in eclipse 4 .what is its counterpart in 3.x? Who within
> eclipse is in charge of decisions regarding this and how could I
> contribute? Thanks a lot.
> Marek
Re: SimpleIDE Menus and Navigator Control [message #895278 is a reply to message #895277] Thu, 12 July 2012 07:22 Go to previous message
Sopot Cela is currently offline Sopot Cela
Messages: 597
Registered: December 2010
Senior Member

Also if you pass by #eclipse-e4 on irc.freenode.net we'd be happy to help.
Previous Topic:Model Image Management
Next Topic:Deadlock/starvation handling
Goto Forum:
  


Current Time: Thu Aug 21 14:16:55 EDT 2014

Powered by FUDForum. Page generated in 0.02372 seconds