e4

Eclipse E4 - Menu contribution and PersistedState

本秂侑毒 提交于 2019-12-13 20:35:03
问题 I have got ditched in a problem with Menu Contribution and PersistedState. I had no problem before removing the -clearPersistedState flag from the VM args. Now, the app has a weird behaviour, the menu contribution starts to pile up a menu entry every time the code is executed. Here it's the guilty snippet enclosed in a Processor: MDirectMenuItem menuItem = MMenuFactory.INSTANCE.createDirectMenuItem(); menuItem.setLabel("Another Exit"); menuItem.setContributionURI("bundleclass://" + "com

RCP e4 buttons group D&D

∥☆過路亽.° 提交于 2019-12-13 19:33:32
问题 I want to implement the Drag and Drop that you can do with the buttons group on eclipse (positioned on the toolbar). The purpose is allowing to drag them to the sides of the main window. it's possible? 来源: https://stackoverflow.com/questions/31385417/rcp-e4-buttons-group-dd

Resize Eclipse RCP Part

人走茶凉 提交于 2019-12-13 15:25:42
问题 I'm creating an application using eclipse RCP, I have many Part and I want to resize them. Some of these parts don't need many space. I've checked in Application.4xmi but I didn't found anything helpful. Any ideas? 回答1: You can set the size of a Trimmed Window in the Application.e4xmi by setting the Bounds width and height values. Usually you then use PartSashContainer to divide up the window. You specify a percentage used for each child in the Container Data for the child. 来源: https:/

How to make HandledMenuItem unselected when the application is started

℡╲_俬逩灬. 提交于 2019-12-13 05:37:32
问题 I have HandledMenuItem in my Application.e4xmi. But if I check this item, close my application and start it again, this item stay selected. I can suspect that this item should be tagged or something like this, but I can't find any information about tags for MenuItems. Thanks in advance. 回答1: The e4 RCP normally persists the state of the application model when the app terminates. If you don't want to restore the persisted state of the application use the -clearPersistedState flag. You can also

How to add menu Items to toolbar in Eclipse E4

老子叫甜甜 提交于 2019-12-13 04:41:17
问题 I have an Eclipse RCP application and have added a tollbar via TrimBar->Window Trim->Toolbar->Tool Control. I have tried to add menu/ menu items using SWT Menu but it is not visible in the toolbar. Other components like buttons,labels,combo boxes are added without any problem. Is it possible to add Menu Items to toolbar? File Edit View Tools Window Help Here-The-Combobox-To-Be-Added File/Edit/View/Tools/Window/Help are the menu items in the toolbar. And after that a combobox is to be added.

Add System Tray and Active Workbech Shell reference in E4 application

寵の児 提交于 2019-12-13 01:29:34
问题 I am new in E4 application development. I add System tray icon in RCP 3.7.x successfully. to add a system tray icon in e4 application. I am using the e4 application life cycle to add a system tray icon in this way: public class LifeCycleManager { @PostContextCreate void postContextCreate(IApplicationContext appContext, Display display) { SystemNotifier icon= new SystemNotifier(shell); SystemNotifier.trayItem = icon.initTaskItem(shell); if (SystemNotifier.trayItem != null) { icon.hookPopupMenu

Mix E3 and E4 In one Application

≡放荡痞女 提交于 2019-12-12 09:23:43
问题 It doesn't seem E4 is usable for a productive environment yet, but the compatibility layer has many bugs as well. Can I mix both in one application, to choose the one with less bugs for each use case? I assume that's not possible, because the plugin.xml has to look like this: <extension id="product" point="org.eclipse.core.runtime.products"> <product name="Application" <!-- this application ID is used for E3 applications --> application="org.acme.application" <!-- this application ID is used

Open Perspective programmatically

耗尽温柔 提交于 2019-12-12 05:25:59
问题 I am trying to provide a command/ handler to switch to a specific Perspective. I came up with the following class: public class OpenPerspectiveHandler { private static final Logger logger = Logger.getLogger(OpenPerspectiveHandler.class); @Inject private MApplication application; @Inject private EModelService modelService; @Inject private EPartService partService; private final String perspectiveId; public OpenPerspectiveHandler(String perspectiveId) { super(); this.perspectiveId =

Eclipse Kepler Dependency Injection in 3.x

徘徊边缘 提交于 2019-12-12 05:23:44
问题 I have a working plugin in Eclipse 3.7 with Views and a Perspective . Now I try to move this to Eclipse Kepler 4.3 therefore i follow the Tutorial from Jonas Helming All my Views are based on a TemplateView in another Plugin. This TemplateView was transformed to an e4 style POJO View. My Plugin extends this TemplateView and adds the wrapper class (as described in the Tutorial). Iff i run my application in e3 style (means TemplateView is extending ViewPart ) everything is fine and the

Intercepting Eclipse e4 platform exceptions

爱⌒轻易说出口 提交于 2019-12-12 04:48:47
问题 Using Eclipse RCP 3.x, it is possible to create a custom AbstractStatusHandler to intercept platform exceptions. One way to do this, is to override the getWorkbenchErrorHandler() method in the ApplicationWorkbenchAdvisor class like this: @Override public synchronized AbstractStatusHandler getWorkbenchErrorHandler() { if (m_errorHandler == null) { m_errorHandler = new MyWorkbenchErrorHandler(this); } return m_errorHandler; } After doing a lot of research in Eclipse forums, stackoverflow and in