eclipse-rcp

How can I use java.lang.instrument in an Eclipse RCP application?

孤者浪人 提交于 2019-12-29 07:52:12
问题 In order to use the instrumentation features introduced in JDK 5, you can use the -javaagent flag passed to the JVM. This will inject an instance of an Instrumentation class into the static premain method. For example in a class like this: public class MyClass { public static Instrumentation inst; public static void premain(String options, Instrumentation inst) { MyClass.inst = inst; } } With an appropriate manifest file, you can run this as follows: java -javaagent:myfiles.jar SomeClass This

Cannot load 64-bit SWT libraries on 32-bit JVM ( replacing SWT file )

六月ゝ 毕业季﹏ 提交于 2019-12-28 02:06:19
问题 I'm trying to debug this problem but not sure where exactly i need to replace SWT jar file for Eclipse. Current System Config: Eclipse Helios 3.6 - 32 Bit JDK 1.6 JVM - 32 Bit Windows 7 - 64 Bit Error Message: java.lang.UnsatisfiedLinkError: Cannot load 64-bit SWT libraries on 32-bit JVM at org.eclipse.swt.internal.Library.loadLibrary(Library.java:194) at org.eclipse.swt.internal.Library.loadLibrary(Library.java:174) at org.eclipse.swt.internal.C.<clinit>(C.java:21) at org.eclipse.swt.widgets

How to switch between tab using shortcut key in RCP application

亡梦爱人 提交于 2019-12-26 07:19:13
问题 In my RCP application, there are multiple ViewParts and EditorParts open. I want to define a shortcut key to switching between these parts. Is there a way to implement this? 回答1: Custom KeyBinding sequence example : CTRL + TAB to switch between visilble Modules or Editors Forward direction using Eclipse RCP. you press CTRL + TAB second time to open another editor and close previous editor using RCP Eclipse. package rcp_demo.Toolbar; import org.eclipse.core.commands.AbstractHandler; import org

How to switch between tab using shortcut key in RCP application

孤街浪徒 提交于 2019-12-26 07:19:03
问题 In my RCP application, there are multiple ViewParts and EditorParts open. I want to define a shortcut key to switching between these parts. Is there a way to implement this? 回答1: Custom KeyBinding sequence example : CTRL + TAB to switch between visilble Modules or Editors Forward direction using Eclipse RCP. you press CTRL + TAB second time to open another editor and close previous editor using RCP Eclipse. package rcp_demo.Toolbar; import org.eclipse.core.commands.AbstractHandler; import org

Enabling/Disabling Toolbar-Command based on selection in ViewPart, not Perspective

≡放荡痞女 提交于 2019-12-25 11:14:12
问题 I have a perspective consisting of multiple ViewPart s. One of these ViewPart s has a command assigned using a menuContribution with locationURI="toolbar:..." . The ViewPart with the Toolbar-Command only contains one Child (a TreeView ) and does this.getSite().setSelectionProvider(child) in it's createPartControl(Composite) -Method. The problem is, that when i click one of the other ViewPart s in my Perspective the Command gets disabled, but the selection does resist in the TreeView

Enabling/Disabling Toolbar-Command based on selection in ViewPart, not Perspective

不羁的心 提交于 2019-12-25 11:10:00
问题 I have a perspective consisting of multiple ViewPart s. One of these ViewPart s has a command assigned using a menuContribution with locationURI="toolbar:..." . The ViewPart with the Toolbar-Command only contains one Child (a TreeView ) and does this.getSite().setSelectionProvider(child) in it's createPartControl(Composite) -Method. The problem is, that when i click one of the other ViewPart s in my Perspective the Command gets disabled, but the selection does resist in the TreeView

Questions on Nebula NatTable sorting and filtering

喜欢而已 提交于 2019-12-25 09:02:44
问题 I have been using Nebula NatTable for quite sometime in my project and is familiar with the basics. I Have 2 questions on sorting and filtering. There are separate examples given for sorting and filtering filter example, sort example . My question is , can I include both these features in one instance of NatTable? Can I remove the filterheader control after the NatTable instance is created? If yes, how can that be done ? 回答1: Yes and there are several examples showing that. Some of them are

Eclipse RCP open view programmatically the e4 way

六眼飞鱼酱① 提交于 2019-12-25 08:28:04
问题 I would like to programmatically (from a context menu) open a certain view How can I do so? I can show a view using e3 compatibility layer like this: PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView("viewId"); What is the e4 way to do so? 回答1: In e4 you open any part using EPartService : @Inject EPartService partService; partService.showPart("part id", PartState.ACTIVATE); The part should be in the Application.e4xmi in the place you want it to show but should have

CheckboxTreeviewer previously set checked elements after reload

时光怂恿深爱的人放手 提交于 2019-12-25 08:13:39
问题 I have used JFace CheckboxTreeviewer and added ICheckStateListener to get result of checked elements. Code is as follows private HashSet<Object> checkElement=new HashSet<Object>(); checkboxTreeViewer.addCheckStateListener(new ICheckStateListener() { @Override public void checkStateChanged(CheckStateChangedEvent event) { String childNode=null; String rootNode=null; Object changed = event.getElement(); if(changed instanceof ChildFacetNodeVo){ checkElement.add(changed); ChildFacetNodeVo

Eclipse RCP: How can I bold a folder in Project Explorer?

喜欢而已 提交于 2019-12-25 06:47:47
问题 How can I (programmatically) bold a folder\file in Project Explorer in Eclipse? Just like Visual Studio, which bolds the start-up project: 回答1: Use Resource Decorator Plug-in. You can control the foreground and background color of resources but cannot make them bold . Also Check these posts How can I configure the font size for the tree item in the package explorer in Eclipse? and I cannot change the font size of package explorer in Eclipse choose whichever solution you need. 来源: https:/