eclipse-rcp

How to use groovy inside a Eclipse RCP project?

拟墨画扇 提交于 2019-12-05 12:45:24
I have a Eclipse RCP project, and I want to use Groovy inside it. what I try to do is : 1) add "Groovy Nature" 2) create Groovy files under the "src" folder 3) call the groovy class from the "View"'s createPartControl() method. But I got the “java.lang.ClassNotFoundException: fly.island.jface.Test”, and the "fly.island.jface.Test" is a groovy class. What should I do to use groovy inside the Eclipse RCP project? Use the latest version of Groovy-Eclipse 2.1.0 (or one of the dev builds). Update site is here: http://dist.codehaus.org/groovy/distributions/greclipse/snapshot/e3.6/ Additionally,

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

怎甘沉沦 提交于 2019-12-05 11:52:47
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: 'JavaSE-11' -> [Help 1] org.apache.maven.InternalErrorException: Internal error: org.eclipse.tycho.core

Eclipse RCP 4 use bundle via declarative service

纵然是瞬间 提交于 2019-12-05 11:44:55
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. I created a component definition in my bundle to provide my service: <?xml version="1.0" encoding="UTF

Developing Eclipse plugins without Java

岁酱吖の 提交于 2019-12-05 10:58:35
Is it possible to create Eclipse plugins/program Eclipse RCP apps without Java? (preferably in Jython) This will be possible in the next Eclipse major release e4: One of the goals of e4 is to provide support for writing plugins in other languages. The quote is from http://wiki.eclipse.org/E4/JavaScript which summarizes the current state of using javascript to implement eclipse plug-ins in e4. This issue in eclipse's bugzilla issue #227058 also has some discussion on that, but I believe it is outdated. I am currently not aware of activity regarding other languages. No. An Eclipse plugin is an

Positioning Toolbars in Eclipse/RCP

偶尔善良 提交于 2019-12-05 10:48:11
I was working on my tiny RCP app, which needs a custom perspective switcher to control which views the user can access. So here I am, trying to add a toolbar with a couple of buttons to switch perspectives. I figured the best way to have some control over the stuff would be to add a second toolbar in ApplicationActionBarAdvisor which would call my thee actions/commands to switch perspectives. So let's say I create a second ToolBarContributionItem in the fillCoolBar method, which would look like this: protected void fillCoolBar(ICoolBarManager coolBar) { IToolBarManager toolbar = new

Eclipse StatusManager do not show detail

て烟熏妆下的殇ゞ 提交于 2019-12-05 10:38:09
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(); return Status.OK_STATUS; } }; How can I make it display the exception's stack trace when user click

How to efficiently JUnit test Eclipse RCP Plugins

廉价感情. 提交于 2019-12-05 10:36:15
We have a rather larger Eclipse RCP application and are not sure how to properly test it's plugins. For each plugin, there is a test fragment that contains Unit tests. For smaller tests, that do not require the RCP Platform running, we simply invoke the "standard" JUnit test runner. For tests, that require the RCP Platform, there is the possibility to test it using the JUnit plugin test runner. For the JUnit plugin tests, it is possible to define which plugins are loaded when the RCP Platform starts up. Problem : Running JUnit Plugin Tests takes a lot of time (seconds instead of millicseconds

Contributed control to the status bar not visible

蹲街弑〆低调 提交于 2019-12-05 10:17:27
I would like to place a control in the status bar of the workbench window. The whole process should be straight-forward, but whatever I try, the status bar contribution does not become visible. Because I do not own the application but just contrinbute a plug-in to the IDE, WorkbenchWindowAdvisor and friends are not an option. The extension point is this: <extension point="org.eclipse.ui.menus"> <menuContribution locationURI="toolbar:org.eclipse.ui.trim.status" allPopups="false"> <control class="MyContributionItem" id="myContributionItem" /> </menuContribution> </extension> and the

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

一世执手 提交于 2019-12-05 07:50:52
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? 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-whole-screen-size

How can I add the external jar to the eclipse rcp application?

拜拜、爱过 提交于 2019-12-05 07:14:00
I tried to add the apache vfs jar file as the runtime dependency. Even though it throws the below error: java.lang.ClassNotFoundException: org.apache.commons.vfs.VFS at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:489) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:405) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:393) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader