eclipse-rcp

eclipse-rcp problem : context menu added by viewerContribution not work

ぃ、小莉子 提交于 2019-12-12 04:59:44
问题 <extension point="org.eclipse.ui.popupMenus"> <viewerContribution id="com.amarsoft.sysconfig.plugin.ConnectionsViewPopupContribution" targetID="com.amarsoft.sysconfig.plugin.views.ConnectionsView"> <action class="com.amarsoft.sysconfig.plugin.actions.OpenConnectionAction" id="com.amarsoft.sysconfig.plugin.actions.OpenConnectionAction" label="打开" menubarPath="additions"> </action> </viewerContribution> </extension> but when I open the com.amarsoft.sysconfig.plugin.views.ConnectionsView view

Custom errors in Eclipse RCP application

不羁的心 提交于 2019-12-12 04:59:02
问题 I was looking for a way to provide users of an RCP application customized errors that will help them understand what causes some runtime errors. I created a custom Problems view and I create a marker each time an error occur. I'm showing in this view only markers of a custom marker type that are related to an annotation. My questions: 1-Is there a better approach then this one ? 2-How to handle the errors that occur in a core plugin ? Is there a way to be notified in a ui plugin when an

Storing persistent resource properties in Version Control

一世执手 提交于 2019-12-12 04:54:06
问题 I have a plugin that adds arbitary information to resources of projects through the persistent property mechanism of eclipse. Now these projects are stored in version control systems like SVN and GIT. The persistent properties will not get checked in because they are stored in the metadata of the workspace and not inside the project itsself. %workspace%\.metadata\.plugins\org.eclipse.core.resources\.projects\%projectname%\.indexes Is there a way to save these properties to the project and

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

config.ini file is overriden by update where and how to keep user defined variables

无人久伴 提交于 2019-12-12 04:43:06
问题 We get the path of a file from user and keep it in config.ini to start eclipse. But when we update we see that config.ini file is overriden and we loose the information we got and saved in config.ini File. Where should I use to keep user parameters. Is it possbile to keep a configuration parameter not overriden in config.ini file after an update ? (For example I want to keep a certain key-value pair.) If not how do you prefer to keep user parameters and where ? 回答1: If not how do you prefer

Eclipse - how to setup plugin run configuration to run it inside custom Eclipse RCP?

醉酒当歌 提交于 2019-12-12 04:34:43
问题 When you create new Plug-in project inside Eclipse, you can run it as Eclipse Application (eg. new Eclipse instance will start with that plugin included by default). I need start that plugin but in instance of my own Eclipse RCP app (which i have as other project in my workspace). Is it possible? 回答1: Open 'Run > Run Configurations' and find the configuration for your RCP application (under 'Eclipse Application') Look at the 'Plug-ins' tab. If the 'Launch with:' is set to 'all workspace and

Caused by: org.eclipse.swt.SWTException: Invalid thread access

冷暖自知 提交于 2019-12-12 04:20:59
问题 I get "Invalid thread access" in below code. I am not sure where I have written wrong code. My main intention to write the code is to just display subtask (what is happening behind the scene) so I have added subtask before method called. @Override public void handleEvent(Event event) { if((event.keyCode == SWT.CR || event.keyCode == 13 || event.type == SWT.Selection) && btnAdd.isEnabled()) { final PreferencesMO permo = new PreferencesMO(); permo.updatePreferences(); permo.updateDocumentNumber

is it possible to have vertical SWT controls?

故事扮演 提交于 2019-12-12 04:00:31
问题 I would like to have some of the controls in an app - Button s and Label s - vertically oriented - . However i could not find a possibilty to do this. Even the non-public setOrientation method tackles only the left-to-right orientation. Is it possible without implementing a custom Button or deriving from Canvas ? 回答1: As far as I know vertical orientation for Button and Label is not possible. You will need to provide custom implementation for same. Check this link http://dev.eclipse.org

RCP application menus in Mac OS

匆匆过客 提交于 2019-12-12 03:40:02
问题 I am struggling to figure out how RCP applications on Mac OS work with "About" and "Preferences" actions. I create them with ActionFactory and place them to relevant file menus. Works fine everywhere. However, on Mac OS those actions get placed into application menu by something which knows better where to put other peoples good actions. But of course they don't work.. Any idea why? (eclipse target platform 3.7, OSX - the latest El Capitan) 回答1: For the 3.x style action bar advisor add the

Custom Perspective Switcher Toolbar: How can I dynamically update it?

*爱你&永不变心* 提交于 2019-12-12 03:36:21
问题 I'm trying to implement a custom perspective switcher toolbar to replace eclipse's built-in one. I couldn't get the toolbar to display, and it was shown to me that due to a bug with the dynamic element in a menu contribution, I have to use a control element instead, as described in the workaround to the dynamic bug. I have a toolbar displaying following that approach, but I cannot figure out how to update it dynamically. The workaround instruction is to call ContributionItem#fill(CoolBar, int