eclipse-rcp

Eclipse plugin with external third party jar

▼魔方 西西 提交于 2019-12-07 21:30:40
问题 I have an RCP application which includes different plugins. In one of the plugin I am using an external third party jar. Due to copyrights reasons I cannot bundle that jar into my product. So I try to include the jar as external jar at runtime. what I have done is as follows In the Plugin manifest.mf I have Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: EaCom-plugin;singleton:=true Bundle-Version: 2.1.0 Require-Bundle: org.eclipse.core.runtime

How do I stop an Eclipse Feature from starting after it's been installed

青春壹個敷衍的年華 提交于 2019-12-07 20:33:16
问题 I'm developing several Eclipse Features (groups of Eclipse plugins that form an Installable Unit), and I've been given the requirement that each Feature must have the ability to be deactivated, or in other words, made to not start when Eclipse is started. I have a plugin that makes contributions to the UI (Perspective, Wizards, Menu items, etc), and I've tried to just intercept the call to the start method of the plugin like so... Please note that the class PluginVerification is running in

How to check access level of user on any system

前提是你 提交于 2019-12-07 20:19:27
In our RCP application we have newly added a menu as command under menu contributions. Now that we want to enable or disable this new menu depending the user who has logged on to the system. Basically we want to enable the menu only for the Administrator login and not for any other user. How can this be accomplished? Thanks in advance !! gtiwari333 You can retrieve the logged in user's name as : String user=System.getProperty("user.name"); You can retrieve the logged in user detail as described in java-forums.org : public static void ntSystemDetails() { com.sun.security.auth.module.NTSystem

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

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

前提是你 提交于 2019-12-07 15:57:26
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; public class DefaultCellFocusHighlighter extends FocusCellOwnerDrawHighlighter { public

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

How to embed JavaFX into eclipse rcp view

℡╲_俬逩灬. 提交于 2019-12-07 11:14:44
问题 I am trying to use JavaFX 2 from a simple eclipse view, but I am getting an java.lang.UnsatisfiedLinkError: Invalid URL for class: bundleresource://435.fwk1827795025/com/sun/glass/utils/NativeLibLoader.class After some investigation with JAD I have found out that NativeLibLoader has very interesting check: if(!classUrlString.startsWith("jar:file:") || classUrlString.indexOf("!") == -1) throw new UnsatisfiedLinkError((new StringBuilder()).append("Invalid URL for class: ").append(classUrlString

“Add Required Plug-ins” button in Eclipse RCP product configuration?

会有一股神秘感。 提交于 2019-12-07 09:30:37
问题 I don't quite understand what plug-ins constitue the list Dependencies when I make a product configuration in Eclipse RCP and what does the button "Add Required Plug-ins" exactly do? Why the Dependencies list is not full from the very beginning and why I have to use that button? Thank you. 回答1: When you develop your RCP application, you specify: not enough plugins (i.e. only the one you need to compile, but not their runtime dependencies) and/or too many plugins (i.e. you depends on some

How can I report progress from a background task?

£可爱£侵袭症+ 提交于 2019-12-07 08:45:58
问题 I have a long running task that is executing in the background on an ExecutorService thread pool. What are some best practices in terms of this task returning progress or intermediate results? Are there any libraries that provide this functionality? EDIT: To clarify, I'm talking about reporting progress to other code, not to the user. Normally I would use SwingWorker, but I'm working with a Java/Groovy backend for a Grails app, and I'm unsure how that would behave in a headless server

In Eclipse RCP, how do I disable a save toolbar button according to the “dirty” property in editor

徘徊边缘 提交于 2019-12-07 08:45:45
问题 In my eclipse RCP 3.3 application, I would like to enable or disable a 'save' toolbar button according to current editor dirty flag. I'm trying to use the <enabledWhen> tag but I can't make it work. Here's the portion of code in plugin.xml : <command commandId="org.acme.command.save" icon="icons/save.png" id="org.acme.command.save" style="push"> <enabledWhen> <instanceof value="activeEditor"/> <test property="dirty" value="true"/> </enabledWhen> </command> Do you have any idea how that is