RCP issues (view titles, toolbar, quick access) [message #893532] |
Wed, 04 July 2012 13:17 |
|
I just installed 4.2 and found 3 issues (see attached pic) with my simple RCP application:
1. toolbar is right aligned
2. viewpart titles are missed
3. new 'quick access' field which is useless for me
On #3 seems like it is hard-coded somewhere and can't be removed, correct?
Any ideas about #1 & #2?
Thanks.
|
|
|
|
Re: RCP issues (view titles, toolbar, quick access) [message #893666 is a reply to message #893582] |
Thu, 05 July 2012 07:59 |
|
Brian de Alwis wrote on Wed, 04 July 2012 13:11Are there any errors in your log? Are you using the old themes support?
There are no error in the log. I didn't change anything in my app developed using 3.7, and frankly say, I have no ideas about themes support.
Quote:Can you reproduce with the RCP Mail example?
No, but mail example has another issue:
|
|
|
|
|
|
Re: RCP issues (view titles, toolbar, quick access) [message #1007090 is a reply to message #893743] |
Mon, 04 February 2013 12:12 |
|
Hello All,
1. toolbar is right aligned facing the same issue.
This occurs when we try to add tool bar actions using plugin.xml
<extension
point="org.eclipse.ui.menus">
<menuContribution
allPopups="false"
locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions">
<command
commandId="SampleMail.category"
icon="icons/sample2.gif"
label="Test"
style="push">
</command>
</menuContribution>
</extension>
But doesn't occur when add in ..ActionBar advisor.
protected void fillCoolBar(ICoolBarManager coolBar) {
IToolBarManager toolbar = new ToolBarManager(SWT.FLAT | SWT.LEFT);
coolBar.add(new ToolBarContributionItem(toolbar, "main"));
toolbar.add(openViewAction);
toolbar.add(messagePopupAction);
}
Just WorkAround.
Just override ActionBaradvisor
protected void fillCoolBar(ICoolBarManager coolBar) {
IToolBarManager toolbar = new ToolBarManager(SWT.FLAT | SWT.LEFT);
coolBar.add(new ToolBarContributionItem(toolbar, "main")); <-- is id the
}
Then add the actions
<extension
point="org.eclipse.ui.menus">
<menuContribution
allPopups="false"
locationURI="toolbar:main?after=additions"> <!-- main id-->
<command
commandId="SampleMail.category"
icon="icons/sample2.gif"
label="Test"
style="push">
</command>
</menuContribution>
</extension>
This fixes the issues..
|
|
|
|
|
|
Re: RCP issues (view titles, toolbar, quick access) [message #1175456 is a reply to message #893532] |
Thu, 07 November 2013 19:28 |
|
>The strange thing is that the toolbar is properly aligned the first time I start my application (when
> there's no .metadata folder). However, after that the toolbar is not aligned properly anymore.
I got the same thing and it turns out that the problem is caused by the entries written to <workspace>/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi when the application exits after the first launch.
In the workbench.xmi the entries for "SearchField" and "Search-PS Glue" appears and at the subsequent launch the toolbar entries are right aligned.
Launching with the argument "-clearPersistedState" ensures that the workbench.xmi is deleted when launching and then I get the "good" behavior with correct alignment of the actions to the left.
Still just a workaround, but it helps while waiting for the real solution...
|
|
|
|
|
|
|
|
|
|
|
|
Re: RCP issues (view titles, toolbar, quick access) [message #1455330 is a reply to message #1273065] |
Wed, 29 October 2014 08:50 |
Stefan Zugal Messages: 7 Registered: October 2014 |
Junior Member |
|
|
Another solution, at least working in my case (removing the search field and aligning the toolbar elements left):
MWindow mWindow = ((WorkbenchWindow) PlatformUI.getWorkbench().getActiveWorkbenchWindow()).getModel();
EModelService modelService = (EModelService) PlatformUI.getWorkbench().getService(EModelService.class);
MToolControl searchField = (MToolControl) modelService.find("SearchField", mWindow);
searchField.getParent().getChildren().clear();
[Updated on: Wed, 29 October 2014 16:35] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.07234 seconds