eclipse-rcp

Images are not appearing in RCP application after exporting as a product

谁说胖子不能爱 提交于 2019-12-23 05:40:17
问题 I have a RCP application, in which I have added some images as icons. The below method is the method for adding icons on the buttons: public static void setIconForButton(Button button, Display d, Bundle bundle, String path) { InputStream is = null; try { is = FileLocator.openStream(bundle, new Path(path), false); Image image = new Image(d, is); button.setImage(image); } catch (IOException e1) { e1.printStackTrace(); } finally { try { if (is != null) { is.close(); } } catch (Exception e1) { e1

How to debug start of eclipse plugin?

末鹿安然 提交于 2019-12-23 04:43:42
问题 I try to migrate an eclipse plugin from Java8 to Java9. If I start a debug session (Run as Eclipse Application...) all works fine. However, after installing my plugin I am not able to use it. If I use ss in the OSGI console I get following status for my plugin: 1102 STARTING org.treez.core_1.0.0.201712191435 and if I manually try to start it I get osgi> start 1102 gogo: BundleException: Error loading bundle activator. I tried to start a remote debug session, as suggested here: Debugging

Cannot connect MySQL in Eclipse RCP IDE

一曲冷凌霜 提交于 2019-12-23 03:56:08
问题 All, I am getting the com.mysql.jdbc.Driver exception when trying to load the Driver class using Class.forName("com.mysql.jdbc.Driver") . I have written a custom Eclipse plugin and wanted to access the database in my custom Eclipse plugin. I have tried following 2 options, both obviously failed: 1 > Adding the mysql connection JAR file to the Eclipse plugin build path 2 > Adding the connector JAR file as library and adding to the plugin's runtime classpath Can anyone please help me out on

How do I easily query a running Eclipse for its installed Features?

我是研究僧i 提交于 2019-12-23 03:42:36
问题 I'm building an Eclipse Feature that has a requirement that amounts to this... The Feature must be able to be uninstalled automatically if the user has his license revoked. If you want more background information about that, Here is another question that I've asked on this topic. Thanks to the answers on that question, I've been trying to learn the Eclipse p2 director api. I've found some classes that look useful here I've been trying to instantiate one of these classes in my code, but with

automatic update of graphiti diagrams in case of changes in the datamodel

♀尐吖头ヾ 提交于 2019-12-23 03:19:10
问题 I have an EMF Datamodel and represent it with the framework "Graphiti". In case of changes in the datamodel the method "updateNeeded()" in my UpdateFeature is randomly called or not. Therefor I have a listener. This listener calls the method "update()" in case of changes. In the method update I can define the differences between datamodel and diagram. But if I want to add or change anything to the diagram an exception is thrown. Has anyone an idea how I could autoupdate the diagram? Here is

Load native libraries in an Eclipse RCP application on Linux

狂风中的少年 提交于 2019-12-23 01:15:56
问题 I have an Eclipse RCP application that uses some native libraries via JNI. These are shared libraries that dynamically link to each other. On Windows I put these libraries (as *.dll files) next to the RCP launcher executable ( *.exe ) file and load them via System.load("<absolute file path>") . This works great, as the location of the launcher seems to be added to the java.library.path so that dynamic linking between the libraries works. On Linux, I get an UnsatisfiedLinkError . The location

Printing with an Eclipse RCP program

别等时光非礼了梦想. 提交于 2019-12-23 01:05:37
问题 I am looking for a good, standard way to generate "output" in my RCP programm and print it. This should work as it works on Windows, Mac OS and Linux with the standard print dialog. I am aware of the Birt project, but I could not find any hints about how to implement it within a RCP programm and how to invoke the standard print dialog and how to pass the Birt generated report to the printer. Happy for all hints. 回答1: I believe the Birt project used to use IText. (now ITextPDF) The other

Force Eclipse (Helios) to use a newer version of SWT at application runtime

老子叫甜甜 提交于 2019-12-22 12:57:25
问题 I'm developing an RCP project using Eclipse-Helios. The version of SWT that is installed (in the plugins directory) is [org.eclipse.swt-win32-3.6.2, & org.eclipse.swt.jar] I require new API functionality that is only available from swt-3.8. (specifically, I wish to set the custom colours, for an SWT color dialog before opening.) I have downloaded 3.8.1 from the SWT/Eclipse downloads site [ http://download.eclipse.org/eclipse/downloads/drops/R-3.8-201206081200/#SWT ] The SWT download is NOT a

Howto restart an e4 RCP application

安稳与你 提交于 2019-12-22 09:58:11
问题 A 3.* based RCP application will be restarted if IApplication.start returns IApplication.EXIT_RESTART. The class E4Application seems to always return EXIT_OK. org.eclipse.ui.IWorkbench also has a restart method, org.eclipse.e4.ui.workbench.IWorkbench does not. So how can I restart an e4 RCP application? 回答1: The current implementation in Eclipse 4.2 leads to a command with id org.eclipse.ui.file.restartWorkbench which ultimately leads to the handler class RestartWorkbenchHandler. This class

Configure a p2 update repository programmatically

时光毁灭记忆、已成空白 提交于 2019-12-22 09:57:26
问题 There is an article in the Eclipse wiki how to configure user's p2 default repositories of an RCP application by adding a static conf file to your product: Equinox/p2/Adding Self-Update to an RCP Application - Configuring the user's default repositories I want to do the same programmatically in a Java class when the user changes some configuration details. I could not find appropriate p2 API documentation for that. 回答1: Use this solution for Eclipse 3.7 based applications: final