rcp

How can I add xText editor to Eclipse (e4) RCP Application?

喜欢而已 提交于 2019-12-07 17:16:56
问题 I've already made a xtext editor (2.5). I try to use this editor in a part in my RCP application. I use this code: Injector injector = MyDslActivator.getInstance().getInjector(MyDslActivator.XTEXT_DSL_MYDSL); EmbeddedEditorFactory factory = injector.getInstance(EmbeddedEditorFactory.class); editor = factory.newEditor(resourceProvider).showErrorAndWarningAnnotations().withParent(container); But I got an error java.lang.LinkageError: loader constraint violation: loader (instance of org/eclipse

How to add the Project Explorer view to an Eclipse RCP application

本小妞迷上赌 提交于 2019-12-07 16:07:16
问题 Can someone tell me in detail how to implement the project explorer view in my RCP? 回答1: Use this great tutorial to show any view in your perspective. The rest it to find out the id of Project Explorer View. You will need to add a dependency to the plugin containing Project Explorer View and probably some user plugins required subsequently. Check dependencies with plugin dependencies page. To find out the id of the view you can search in jar files in the plugin directory of Eclipse

How to keep SWT menu open after user clicks menu item?

你离开我真会死。 提交于 2019-12-07 12:25:46
问题 I have an Eclipse RCP / SWT application with a Menu of Check Box Menu Items. I would like to be able to check/uncheck multiple items before clicking elsewhere to close the menu. However, the default SWT behavior is to close the menu after a single click. I have implemented the following very hacked solution which works, but is certainly not elegant and probably won't work properly on all platforms or under all circumstances. So I'm very interested in a simpler technique if one exists. The

Plugin.xml file is not found /generated for eclipse plugin project

醉酒当歌 提交于 2019-12-07 10:40:49
问题 I am developing one maven plugin which will be used to override default maven lifecycle.To resolve dependencies (eclipse and other) , I want to use tycho. So I cofigured maven project to convert it into eclipse-plugin-project. Heres my POM <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.test

Eclipse RCP Toolbar buttons with the Eclipse Look

我怕爱的太早我们不能终老 提交于 2019-12-07 08:18:29
In Eclipse, its easy to specify buttons for your toolbar using the ActionSets extension point. However, when I need to specify some items programmatically, I can't get the same look. I don't believe that the framework is using native buttons for these, but so far, I can't find the right recipe to match the Eclipse look. I wanted to see if anyone has found the right snippet to duplicate this functionality in code. It's difficult to tell from your question, but it sounds like you may be attempting to add a ControlContribution to the toolbar and returning a Button. This would make the button on

how to print jasper report in Eclipse RCP using its print option?

本小妞迷上赌 提交于 2019-12-07 07:31:10
问题 My question : I have a ViewerComposite in Eclipse RCP application which displays Jasper Report (*.jrxml) integrated into it. The report displayed in this ViewerComposite can be exported as PDF,RTF,XML,jrxml,HTML,CSV, etc. Everything is fine except I can not print this report by using the print option provided at top of ViewerComposite in GUI. How can I print the reports by using my default printer by using print option of the report viewer. Rem: I can print jasper report by using the print

Handle the closing of the workbench window in Java RCP application

我是研究僧i 提交于 2019-12-07 01:58:31
问题 I'm writing an Eclipse RCP and I want to ask the user whether to backup the database when the application is closed. Doing it from the File>Exit menu was easy as I defined a command exit: public class ExitCommand extends AbstractHandler implements IHandler { @Override public Object execute(ExecutionEvent event) throws ExecutionException { final IWorkbench workbench = PlatformUI.getWorkbench(); if (workbench == null) return null; // Ask whether the user wants to back up the information Shell

Dynamic language switching in an Eclipse RCP application

心不动则不痛 提交于 2019-12-07 01:40:37
问题 I am working on an Eclipse RCP application with localization. A user should be able to change the language used in the application on the fly. A restart of the application should not take place during this language switch. It should also be possible to switch between languages written from left to right and languages written from right to left. Is there a (good) way to solve this problem? 回答1: According to this thread: Most of the eclipse libraries load up their language info on widget

Eclispe does not show progress bar of user threads

家住魔仙堡 提交于 2019-12-06 16:57:04
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();` Check whether you are applying it on correct shell, or the execution time of job is too low so that you can not see

eclipse rcp change icon for xml configuration file

白昼怎懂夜的黑 提交于 2019-12-06 15:42:23
I built an Eclipse RCP application that uses the configuration.xml in the root of the project for some project configurations. I would like to customize the icon and keep default xml editor. I found one blog post , that does exactly what I'm looking for a property file. I extracted it: <extension point="org.eclipse.core.contenttype.contentTypes"> <content-type base-type="org.eclipse.core.runtime.properties" file-extensions="config" id="in.cypal.eclipse.myConfig" name="My Config File" priority="normal"> </content-type> </extension> <extension point="org.eclipse.ui.editors"> <editor class="org