eclipse-rcp

Platform specific code in Eclipse

試著忘記壹切 提交于 2020-01-03 19:01:53
问题 We're developing a java desktop/Eclipse RCP application with a graph-layout component. We faced issues with the GUI scaling on newer(8, 8.1, 10) versions on windows, it appeared that one can only retrieve the scaling factor through win32 api calls, so we added a little DLL that does this and call it through JNI. Works fine on windows, works fine in maven on linux/osx since the class is never instantiated there. The problem is that to get the scaling factor, we need the window handle, which we

Reuse Project Explorer' view for your custom plugin project

蓝咒 提交于 2020-01-03 03:48:08
问题 I am working on a eclipse plugin and reusing the 'Project Explorer' view to display the tree content. I have few questions to make it best possible reuse: How can I disable the sort - currently 'Project Explorer' view sort tree nodes which I dont want. Is thr a single place where i can change the flags or something? Or I will have to implement a View Sorter ? How can I save the expanded state of projects the way it does for a java project , i want the same to implemented for custom plugin

eclipse rcp :how to select a single cell in tableviewer?

杀马特。学长 韩版系。学妹 提交于 2020-01-03 02:55:29
问题 hwo can I change the default selection behaviour of tables, I want to make a cell selected when user click it and make it editable when user double click it. with @nonty 's help, I get what I want. here is my cell highlighter implemention: package com.amarsoft.rcputil; import org.eclipse.jface.viewers.ColumnViewer; import org.eclipse.jface.viewers.FocusCellOwnerDrawHighlighter; import org.eclipse.jface.viewers.ViewerCell; import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.Color;

Eclispe does not show progress bar of user threads

浪尽此生 提交于 2020-01-03 02:33:05
问题 I created some user jobs on start-up of eclipse, but after launching the workbench I am not able to see the progress bar. Is there anywhere I have to mention these threads other than making them user threads? protected IStatus run(IProgressMonitor monitor) { monitor.beginTask("Download", -1); for (ProxyBean network : ProxyBean.get()) { // do something } monitor.done(); return Status.OK_STATUS; } I initialize it in this way: job = new MyJob(); job.setUser(true); job.schedule();` 回答1: Check

Add headless capability to existing eclipse plugin

≯℡__Kan透↙ 提交于 2020-01-02 07:57:08
问题 I have an existing Eclipse plugin which run as a regular IDE plugin, receiving commands from the GUI and returning output in custom views. I want to add an ability to also be able to run that plugin in headless mode, with the input received from the command-line and the output going to some file. Is there some way of modifying the existing plugin to support that mode of execution in addition to the existing regular execution , or do I have to create a new headless plugin and just use code

Set the window of an eclipse e4 application to have the whole screen size

谁都会走 提交于 2020-01-02 03:49:04
问题 How do I define in the Application.e4xmi that I want my window to have as size the whole available screen? What values should we add to the Bounds(x,y,w,h) of the Trimmed Window ? I tried -1,-1,-1,-1 but it does not work. Any ideas? 回答1: Add the tag shellMaximized to the supplementary tab of your TrimmedWindow like this: See the Eclipse 4 RCP - Tutorial by Lars Vogel for more information. 来源: https://stackoverflow.com/questions/12543858/set-the-window-of-an-eclipse-e4-application-to-have-the

How to add @Override, @Deprecate and static modifiers to methods automatically for all project Java classes where necessary?

二次信任 提交于 2020-01-02 01:35:08
问题 I need to insert @Override / @Deprecated annotations and static modifiers automatically where necessary to all Java files of concrete project is opened in Eclipse IDE. Eclipse has a great ability to insert @Override / @Deprecate annotations and add static modifiers on Java files saving ( Preferences -> Java -> Editor -> Save actions -> Additional actions ). But Eclipse can apply these actions only on edited java file and only when saving it. Sure, I can insert a tab or space into the each

Eclipse RCP: org.eclipse.ui.views.showView Parameters

…衆ロ難τιáo~ 提交于 2020-01-01 15:34:14
问题 I want to show a specific view in my RCP application using a command. Using showView opens a dialog to select view. Is there any way to do without selection dialog? I tried parameters but didn't help. Related part of plugin.xml is below. com.dbtek.hyperbola.views.contactsView is my view ID 回答1: You need to add a command parameter with the id of the view to show. E.g. <extension point="org.eclipse.ui.menus"> <menuContribution locationURI="menu:org.eclipse.ui.main.menu"> <menu id="window" label

SWT Shell resize depending on children

半腔热情 提交于 2020-01-01 10:57:48
问题 I'm working on this Composite canvas on which other Composite s may be added and removed. My understanding of how the whole laying-out concept is still in the fog. When children are added to the container, given the fact that the container has a GridData which fills in the parent, shouldn't the parent also know that the child resized? Children remain hidden after their container has been laid out, because of the shell (top parent). If the question is too vague, do not hesitate to ask for more

eclipse RCP 2018-09 + OpenJDK 11 + tycho: how to package an application with the JRE?

瘦欲@ 提交于 2020-01-01 09:50:50
问题 Currently I'm using tycho to build and package my eclipse RCP app with java 8 and eclipse 4.8, (JMSToolBox) For windows distributions, the tycho build process "copies" the JRE v8 (Oracle) into the distribution package in the "jre" directory via an ant task I'm in the process of upgrading to eclipse RCP 2018-09 and Java 11 (OpenJDK) 2 problems arise: OpenJDK 11 does not provide a JRE OOTB. As I do not want to bundle the 300MB of the full JDK in the distribution, is there a way to embed only