eclipse-rcp

How to get the logs of platform plugins in eclipse

只愿长相守 提交于 2019-12-02 09:02:06
I am new to eclipse plugin development. I would like to customise some of the eclipse functionalities in my plugin. So I would like to know, what happens in the background when I do some operation in eclipse. For e.g., File->New->Project. I need the logs/Trace of which plugin/Class/Function is called? You can use the -debug <path to options file> argument when you start Eclipse to specify the path of a debug options file which is used to enable various debug tracing options. You may also want to use the -consoleLog argument. A example options file would be: # Turn on debugging for the org

How do I get the XML Dom node of where my cursor is in Eclipse?

喜你入骨 提交于 2019-12-02 08:54:28
How do I get the xml dom node and xpath to where my cursor is in an Eclipse custom XML editor that I am building. It is a textEditor. I am implementing IContentAssistProcessor thus far. You can get the position of the cursor in the text editor and you can implement an XML reader that stores the locations of the XML nodes using the SAX Locator . For a mouse event, you could then scan the document and find the best matching node. I am not sure how performant this is but this is where I would start. 来源: https://stackoverflow.com/questions/44742478/how-do-i-get-the-xml-dom-node-of-where-my-cursor

JFreeChart: Add and sync a srollbar when zooming a chart (Eclipse plugin / SWT)

拟墨画扇 提交于 2019-12-02 07:28:09
I am using JFreeChart library to plot something in an Eclipse view and currently my code for view initialization looks as follows: @Override public void createPartControl(Composite parent) { JFreeChart chart = null; // Created via different object chart = graph.createLineChart("Test Graph", "x", "y"); ChartComposite frame = new ChartComposite(parent, SWT.NONE, chart, true); frame.setRangeZoomable(false); parent.layout(true); } I wanted to add scrolling to my graph when the user zooms in, but so far all the examples that I found (in the demo package, here , and other sources) are based on Swing

How to make something on startup in Eclipse E4 application?

好久不见. 提交于 2019-12-02 06:09:42
问题 I want to run something exactly after E4 RCP application starts. How to do that? 回答1: You can do this with a LifeCycle class. You specify this in the lifeCyceURI property of your product: <extension id="product" point="org.eclipse.core.runtime.products"> <product name="%product.name" application="org.eclipse.e4.ui.workbench.swt.E4Application"> <property name="lifeCycleURI" value="bundleclass://plugin-id/package.LifeCycle"> </property> .... The PostContextCreate annotation runs very early in

“link with editor” for FormEditor

可紊 提交于 2019-12-02 06:00:08
问题 I am looking for a solution of "link with editor" but for FormEditor instead of ViewPart as described in http://murygin.wordpress.com/2012/06/13/link-eclipse-view-to-editor/ I try to do similar. But the "link with editor" does not fire any action. Thanks for help! 回答1: I found out that I could use "Navigator Link Helper": http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fextension-points%2Forg_eclipse_ui_navigator_linkHelper.html Hier is my code in

Toggle Button in Eclipse Forms Section Toolbar

最后都变了- 提交于 2019-12-02 04:43:11
问题 How do I implement a toggle button, as pictured below, in the section toolbar of Eclipse UI Forms? I only find examples for adding actions to the section toolbar. 回答1: I think the key is: IAction.AS_CHECK_BOX toggleBotton = new Action(Messages.toolTipMessage, IAction.AS_CHECK_BOX) { @Override public void run() { } }; toggleBotton.setImageDescriptor(...); toggleBotton.setEnabled(...); getManagedForm().getForm().getToolBarManager().add(toggleBotton); 来源: https://stackoverflow.com/questions

How to use an IResourceChangeListener to detect a file rename and set the EditorPart name dynamically?

◇◆丶佛笑我妖孽 提交于 2019-12-02 04:13:38
IResourceChangeListener listens to changes in project workspace for example if the editor part file name has changed. I want to know how to access that particular EditorPart and change its title name accordingly (e.g. with .setPartName ), or maybe the refresh the editor so that it shows the new name automatically. Ideal would be if the IResourceChangeListener has a Rename event type but does not seem to be the case . Reference question . The IResourceChangeListener does fire for rename/move events using a combination of the REMOVED kind and a MOVED_TO flag). You can test for that in the

Eclipse Kepler RCP Main Toolbar Actions

 ̄綄美尐妖づ 提交于 2019-12-02 04:06:44
问题 Google is my best friend, but the information I'm getting is too scattered and very unclear. There isn't a concise tutorial describing my needs. I want to add actions to my RCP app's main toolbar, but I need every way of doing this explained thoroughly. But since this is StackOverflow, I will write down the questions off the top of my head, and hope the answers will do. Which is the new and old way of adding actions? Via ActionBarAdvisor or via plugin.xml ? Can actions be added to the main

Add Package explorer in RCP-Application result in loosing some icon

我只是一个虾纸丫 提交于 2019-12-02 03:10:21
In my eclispe rcp application I added a package explorer adding org.eclipse.jdt.ui When I use my rcp-app, as I create a new Project by "New Project Wizard" to add a "General Project", the project is correctely created, but the corresponding icon in package explorer view is not loaded. What is the plugin I have to add to my application to see that all the (platform) Icons correctly ? Thanks a lot This is a known issue in Eclipse RCP applications. https://bugs.eclipse.org/bugs/show_bug.cgi?id=234252 The work around is to add some code to your ApplicationWorkbenchAdvisor.java Here's some more

Set/Get values for RadioGroupFieldEditor in SWT

家住魔仙堡 提交于 2019-12-02 01:50:56
问题 I'm trying to add a RadioGroupFieldEditor in an Eclipse RCP application I'm developing, but seem unable to do two key things: set the value for the radio button (i.e. when the dialog/window is opened, I'd like to for example set the default to "button1") get the current value of the selected radio button (i.e. what has been selected by the user, or if nothing has been set, the default value set above). The code I'm using is as follows: String[][] radioButtonOptions = new String[][] { {