eclipse-rcp

multiple slf4j bindings in Eclipse RCP Plugin

拈花ヽ惹草 提交于 2019-12-13 12:03:43
问题 I have a simple Eclipse Plugin which gives me following error on activation: SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [bundleresource://103.fwk8918249:1/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [bundleresource://103.fwk8918249:4/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. both URLs resolve to the exact same jar in the bundle libs/slf4j-log4j12.jar!/org/slf4j

How to run a Junit Plugin Test using Ant from eclipse

非 Y 不嫁゛ 提交于 2019-12-13 10:54:01
问题 How can we run a junit plugin test using ant from eclipse, also from command prompt? I'm using Junit4.4. 回答1: The org.eclipse.test plugin provides a library.xml file that contains ant tasks for running plugin tests both in UI ( ui-test target) and headless ( core-test target) modes. Example of invoking the task below, you'll need to provide a few properties to suite your own environment and check the org.eclipse.test plugin version: <property name="library-file" value="${eclipse-home}/plugins

Rename resource file does not change editor part title

痞子三分冷 提交于 2019-12-13 07:43:50
问题 In my plugin project, I have a project explorer view where I can rename a config file which in shown in another editor part. The file can be renamed in the explorer with the rename resource dialog but the corresponding the editor tab title does not change. The same problem is described here and also here. Is there a standard way to get the rename functionality working without the creating a custom listener? 回答1: Editors based on AbstractTextEditor (or one of its subclasses such as TextEditor

Eclipse4: Unable to access STW widget of a PART if PART is retrieved with EPartService

不打扰是莪最后的温柔 提交于 2019-12-13 06:01:30
问题 So I declared my own part like that: import javax.annotation.PostConstruct; import javax.inject.Inject; import org.eclipse.e4.ui.di.Focus; import org.eclipse.swt.SWT; import org.eclipse.swt.browser.Browser; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.widgets.Composite; public class MyPart { private Browser browser; @Inject public MyPart() { } @PostConstruct public void createComposite(Composite parent) { parent.setLayout(new FillLayout()); Browser browser = new Browser

RCP exportWizard remove unnecessary items

夙愿已清 提交于 2019-12-13 05:41:15
问题 I've add an Standart EXPORT action on my FileMenu: addToMenuAndRegister(menu, ActionFactory.EXPORT.create(window)); And created a contribution wizard: <extension id="exportSQL" point="org.eclipse.ui.exportWizards" name="SQL скрипты создания документа СУФД"> <wizard category="ru.otr.cactuss.model.editor.wizard2" icon="icons/database.png" class="ru.otr.cactuss.wizard.sqlexport.SQLExportWizard" id="ru.otr.cactuss.wizard.sqlexport.SQLExportWizard" name="SQL скрипты создания документа СУФД"> <

How to make HandledMenuItem unselected when the application is started

℡╲_俬逩灬. 提交于 2019-12-13 05:37:32
问题 I have HandledMenuItem in my Application.e4xmi. But if I check this item, close my application and start it again, this item stay selected. I can suspect that this item should be tagged or something like this, but I can't find any information about tags for MenuItems. Thanks in advance. 回答1: The e4 RCP normally persists the state of the application model when the app terminates. If you don't want to restore the persisted state of the application use the -clearPersistedState flag. You can also

Using log4j in eclipse RCP doesn't work

心已入冬 提交于 2019-12-13 04:45:25
问题 I want to use the log4j API in my eclipse4 RCP (Kepler). Created a new Project "Plug-in from Existing JAR Archives". I added the log4j.jar with the help of the wizard. In the Manifest of the new plugin under runtime I made sure that the 3 packages "com.ibm.log4j", "com.ibm.log4j.helpers" and "com.ibm.log4j.net" are exported. In the plugin where I want to use the login functionallity I added the new plugin as dependency. When I try to use one of the classes e. g. the Logger class the only

Eclipse RCP: Stopping a thread/job that freezes

我们两清 提交于 2019-12-13 04:44:02
问题 I have a method: TraceData.getTraceData(true); This trace method takes very long or freezes if the external interface is not configured properly. So it does not even return a null. It just hangs. In this case I want to implement a pop up dialog box with a button "Cancel" to stop this method. So I created a Job to run this method: final Job job = new Job("Trace Job") { @Override protected IStatus run(IProgressMonitor monitor) { TraceData.getTraceData(true); Display.getDefault().asyncExec(new

How to add menu Items to toolbar in Eclipse E4

老子叫甜甜 提交于 2019-12-13 04:41:17
问题 I have an Eclipse RCP application and have added a tollbar via TrimBar->Window Trim->Toolbar->Tool Control. I have tried to add menu/ menu items using SWT Menu but it is not visible in the toolbar. Other components like buttons,labels,combo boxes are added without any problem. Is it possible to add Menu Items to toolbar? File Edit View Tools Window Help Here-The-Combobox-To-Be-Added File/Edit/View/Tools/Window/Help are the menu items in the toolbar. And after that a combobox is to be added.

Nattable add row command

主宰稳场 提交于 2019-12-13 03:45:59
问题 An E4 RCP application consists on several nattables. Material nattable allows to create new user defined materials. Material nattable includes filter columns. EventList<AncolabMaterial> eventList = GlazedLists.eventList(input_values_list); TransformedList<?, ?> rowObjectsGlazedList = GlazedLists.threadSafeList(eventList); SortedList<?> sortedList = new SortedList<>(rowObjectsGlazedList, null); this.filterList = new FilterList<AncolabMaterial>((EventList<AncolabMaterial>) sortedList); this