eclipse-rcp

JFace ColumnWeigthData causes parent to grow

空扰寡人 提交于 2019-12-22 09:45:42
问题 I got an Eclipse RCP app and want to use dynamic column size in a TableViewer using ColumnWeigthData as ColumnLayoutData . Problem is that the parent form ( ScrolledForm in example code) grows a few pixels whenever I layout the table. To reproduce you can run the example and open/close the Section a few times. On every close the section gets wider. Why does it do this and how can I make it stop? package com.test; import org.eclipse.jface.layout.TableColumnLayout; import org.eclipse.jface

Is it possible to use Groovy to override a method in a Java class, when that Java class is not instantiated in my code?

不问归期 提交于 2019-12-22 08:56:13
问题 I am developing an Eclipse RCP application and I recently started to use Groovy in it. So 99% of my code is still Java. I read that it is possible to use Groovy to override and add methods to Java classes and I was able to test this by adding a method to the java.lang.String. But this only works when I use the string in a Groovy class. The overridden method is not considered as being overridden in a Java class. Here's some code: /* * This is a Java class */ public class CTabItem { ... private

Eclipse RCP 4 use bundle via declarative service

断了今生、忘了曾经 提交于 2019-12-22 06:55:33
问题 I have written an OSGi bundle to use it in my eclipse 4 rcp application. The usage of the service works fine if I add the dependencies, register these service in my activator and inject it in my class. In activator IUserService service = new TestUserService(); context.registerService(IUserService.class.getName(), service, null); In my class @Inject IUserService service; service.getSth(); I read that using bundles via declarative services should be the better way. So changed my implementation.

Eclipse StatusManager do not show detail

柔情痞子 提交于 2019-12-22 06:47:04
问题 Code: Job job = new Job("Connect to Database") { @Override protected IStatus run(IProgressMonitor monitor) { // 即使是在正常的情况下,某些版本的DB2的连接建立时间也比较长。。。 monitor.beginTask("正在建立到数据库的连接 ...", 100); try { Thread.sleep(3000); database = new Database(cp.getName(), cp.getConnection()); } catch (Exception e) { e.printStackTrace(); IStatus sqlErrorStatus = new Status(IStatus.ERROR, "amarsoft.dbmp", e.getMessage(), null); StatusManager.getManager().handle(sqlErrorStatus, StatusManager.SHOW); } monitor.done()

eclipse tycho + java 11 = Unknown OSGi execution environment: 'JavaSE-11'

心不动则不痛 提交于 2019-12-22 06:45:07
问题 How to build an eclipse RCP app based on Java 11 with tycho? I'm using eclipse 2018-09 RCP + the Java 11 plugin + OpenJDK 11 My application is plugin-based and in all the plugins, the MANIFEST.MF file contains: Bundle-RequiredExecutionEnvironment: JavaSE-11 The tycho build fails with the following exception: [ERROR] Internal error: org.eclipse.tycho.core.osgitools.OsgiManifestParserException: Exception parsing OSGi MANIFEST {...}\META-INF\MANIFEST.MF: Unknown OSGi execution environment:

Eclipse RCP - relative field of view perspective extension not working

帅比萌擦擦* 提交于 2019-12-22 00:47:32
问题 Greetings fellow Stackoverflownians, Currently developing an Eclipse RCP app. I'm trying to make a view appear in the right place when the perspective is reset. In my plugin.xml: <perspectiveExtension targetID="the.perspective.id"> <view id="the.first.view.id" relationship="stack" relative="org.eclipse.ui.navigator.ProjectExplorer" visible="false"> </view> <view id="the.second.view.id" relationship="left" relative="org.eclipse.ui.navigator.ProjectExplorer" visible="true"> </view> <

how to open the find type dialog programmatically in eclipse

夙愿已清 提交于 2019-12-21 23:16:56
问题 I want to open the "Ctrl-Shift-T" dialog (find a type) programmatically in eclipse plug-in. I tried the FilteredItemsSelectionDialog and ResourceListSelectionDialog, but how do I get all the types in the workspace? Thank you, Ido. 回答1: Look at org.eclipse.jdt.internal.ui.actions.OpenTypeAction for how its handled by Eclipse. The key part is this: SelectionDialog dialog= new OpenTypeSelectionDialog(parent, true, PlatformUI.getWorkbench().getProgressService(), null, IJavaSearchConstants.TYPE);

Add plugins with auto start to eclipse RCP application

徘徊边缘 提交于 2019-12-21 20:58:06
问题 I have an Eclipse RCP application, and I am trying with no luck to install a plugin I have created that should be deployed separately to the aforementioned application. To do so, I start the application as ./App -console , and when it has stopped loading, I type: install file://URLTOjAR/plugin.jar It returns me a plugin ID (lets say 288 ), so I type afterwards: start 288 After this, the plugin is working fine, but when I restart the application, by using ss I only can see that the plugin is

Eclipse RCP - add a Listener right after a View has been created

こ雲淡風輕ζ 提交于 2019-12-21 20:44:03
问题 Greetings fellow Stackoverflowians, I am developing an Eclipse RCP application, and must add a SelectionListener to the Project Explorer view the moment after it's created. I've realized that I cannot do this in the Activator of my contributing plug-in, whereas in order to get the SelectionService via PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService() I must have an active workbench window (which is null when the Activator start() is called) So my question: When can I

how to build eclipse rcp application from .product with ant on jenkins

北战南征 提交于 2019-12-21 17:52:26
问题 I'd like to build an Eclipse RCP application. I have a Product configuration file and a target platform with lots of third party plugins. The export from the Eclipse IDE works flawlessly. But that is hardly professional. So I'd like to get it to work on Jenkins, too. The build server gets the files from SVN, doesn't have Eclipse and should do it all headlessly anyway. I do not want to use Maven/Tycho or Buckminster. I'd like to do it a simple as possible. Since I know a bit about ant already,