eclipse-rcp

Starting working with Eclipse RCP [closed]

房东的猫 提交于 2019-11-30 10:51:02
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . I'm going to start maintaining an Eclipse RCP application for my current employer soon. What are your experiences with this platform? What are the pros, what are the cons, what are the caveats that I should be aware of? Also, what reading materials (books, tutorials) can you recommend? Most of the tutorials I

Eclipse RCP: How to order perspective buttons belonging to different plugins?

余生长醉 提交于 2019-11-30 10:24:05
My application has 5 plugins. Each plugin has a perspective of it's own and hence each perspective extension definition is under individual plugin's plugin.xml. Now, I want to control the order in which these perspectives appear in my application. How to do it? There is one main plugin that holds "ApplicationWorkBenchAdvisor.java". This has initialize() method in which I am iterating through the perspective registry using PlatformUI.getWorkbench().getPerspectiveRegistry().getPerspectives(); and then appending perspective ids in a comma separated fashion to a String variable (pbar) which is

How to Inject EPartService

限于喜欢 提交于 2019-11-30 10:15:50
I am developing e4 application. I want to inject EPartService outside the Part and Handler when i am injecting EPartService then i will get null pointer error public class DisplayRuntimePart { @Inject EPartService partService; private void displayPart(){ MPart part=partService.findPart("com.rcpe4.myproject.part.datapart"); mpart.setVisible(true); partService.showPart(mpart, PartState.CREATE); } } I am also read this question but till not solve my problem E4 EPartService findPart() throwing java.lang.Null Pointer Exception Edit I am inject EPartService in Part class. Class URI in Application

hotkey/shortcut for: “Which plugin is this?”

别等时光非礼了梦想. 提交于 2019-11-30 08:51:16
Please forgive such a simple question, I've been away from RCP for about a year: What shortcut/hot-key combination can I use in Eclipse to discover the plugin that contributed/owns the current view? I remember it bringing up the plugin.xml of the plugin currently under the mouse. I should be very grateful for your clues .. M. Andrew Niefer The Plug-in Spy is mapped to Shift+Alt+F1 ( Shift+Option+F1 on Mac) by default. It shows information for whatever is currently selected. Mark Storer Best keyboard shortcut ever: Ctrl + Shift + L : it displays all current keyboard shortcuts. 来源: https:/

How to use log4j in an Eclipse RCP?

半世苍凉 提交于 2019-11-30 08:36:49
问题 How to use log4j logging API in an Eclipse RCP project? As a workaround U tried to create a new OSGI Bundle which has a log4j jars, below is the bundle structure: I've crated a basic RCP application with a view (template) named loggingtest .I've included the bundle log4j in the dependencies tab of loggingtest project.In the Activator start method i placed the following code Logger logger = Logger.getLogger(Activator.class); logger.info("Info starting"); logger.warn("Warning starting"); logger

Difference between syncExec() and asyncExec() of Display class

这一生的挚爱 提交于 2019-11-30 08:02:31
问题 I'm working on a plugin project in which I'm using Eclipse background processing. What's the difference between the syncExec() and asyncExec() methods of the Display class? In which situations are they applicable? Any example could be helpful. 回答1: from Q: Why do I get the error "org.eclipse.swt.SWTException: Invalid thread access"? To allow background threads to perform operations on objects belonging to the UI-thread, the methods syncExec(Runnable runnable) and asyncExec(Runnable runnable)

Global variables in Eclipse RCP

≡放荡痞女 提交于 2019-11-30 07:58:37
how do i solve this: I have usercredential informtion in my main RCP plugin. All other plugins should have that information as well. Preference Store is not possible, because also the presference store needs a nodename which needs to be globally available. Are there any possibilities to realize global variables? Thanks! There are a few options. The quick and dirty approach is to put a getter for your global variable into the activator of one of your plug-ins. Then you just get your global like: SomePluginActivator.getDefault().getGlobalData() This has the downside of making your plug-ins

How to add a pulldown button in a view's toolbar?

余生颓废 提交于 2019-11-30 07:27:41
I need to add a pulldown button to a view's toolbar in an Eclipse plugin. Actually buttons in the toolbar are added like that : <extension point="org.eclipse.ui.viewActions"> <viewContribution id="..." targetId="$MyViewId$"> <action id="..." toolbarPath="action1" class="Class extending Action and implementing IViewActionDelegate"> </action> </viewContribution> </extension> Julien Hoarau I've figured it out. Two ways: one using org.eclipse.ui.viewActions extension, the other with org.eclipse.ui.menus Using org.eclipse.ui.viewActions extension (eclipse >= 3.5) action's style must set to pulldown

Contributing to the Status Bar/Trim in Eclipse RCP

元气小坏坏 提交于 2019-11-30 05:01:16
问题 I have a requirement to show a status indicator in the status bar of an Eclipse application. I can't contribute through the ApplicationWindowAdviser (another team owns the core product), but I feel sure that I should be able to contribute through an extension point. Despite much googling, I can't find anything describing how to do this. 回答1: In the org.eclipse.ui.menuContributions extensions, use "toolbar:org.eclipse.ui.trim.status" as the locationURI. You can contribute commands/custom

Launch an action in Eclipse RCP at startup

六眼飞鱼酱① 提交于 2019-11-30 04:11:21
问题 I have an RCP plug-in and I have configured the help system to run within this plug-in. I can access it from the Help menu. Now I want to launch the "Dynamic Help" action by default at startup. How do I do this? 回答1: Solved this by using the WorkbenchAdvisor implementation: @Override public void postStartup() { IWorkbenchHelpSystem help = PlatformUI.getWorkbench().getHelpSystem(); help.displayDynamicHelp(); } The Startup extension proved futile. 回答2: You could use the org.eclipse.ui.startup