e4

Trigger evaluation of PropertyTester

断了今生、忘了曾经 提交于 2019-12-01 00:44:07
The code from two years back had to be upgraded to E4, and now a bunch of stuff does not work anymore. One of these is the IEvaluationService if used like this: <handler class="org.acme.PrintHandler" commandId="org.eclipse.ui.file.print"> <activeWhen> <with variable="activePart"> <test property="org.acme.printable" /> </with> </activeWhen> </handler> IEvaluationService service = (IEvaluationService) PlatformUI.getWorkbench().getService(IEvaluationService.class); service.requestEvaluation("org.acme.printable"); How do I (re)trigger the evaluation of a PropertyTester ? Since E4 is really not

How to Inject EPartService

限于喜欢 提交于 2019-11-30 10:15:50
I am developing e4 application. I want to inject EPartService outside the Part and Handler when i am injecting EPartService then i will get null pointer error public class DisplayRuntimePart { @Inject EPartService partService; private void displayPart(){ MPart part=partService.findPart("com.rcpe4.myproject.part.datapart"); mpart.setVisible(true); partService.showPart(mpart, PartState.CREATE); } } I am also read this question but till not solve my problem E4 EPartService findPart() throwing java.lang.Null Pointer Exception Edit I am inject EPartService in Part class. Class URI in Application

Trigger evaluation of PropertyTester

一曲冷凌霜 提交于 2019-11-29 18:02:16
The code from two years back had to be upgraded to E4, and now a bunch of stuff does not work anymore. One of these is the IEvaluationService if used like this: <handler class="org.acme.PrintHandler" commandId="org.eclipse.ui.file.print"> <activeWhen> <with variable="activePart"> <test property="org.acme.printable" /> </with> </activeWhen> </handler> IEvaluationService service = (IEvaluationService) PlatformUI.getWorkbench().getService(IEvaluationService.class); service.requestEvaluation("org.acme.printable"); How do I (re)trigger the evaluation of a PropertyTester ? Since E4 is really not

How to add Perspective Bar Switcher to pure eclipse 4 rcp application

柔情痞子 提交于 2019-11-29 15:45:17
I have created a pure Eclipse e4 rich client platform application application model. I created multiple perspectives using perspective stack, but I am unable to switch other perspective because there is no default perspective bar or switcher icon present in Eclipse e4. How to implement a perspective switcher in pure Eclipse e4? EPartService.switchPerspective will do the actual switch, but you will have to design and implement the UI. You could use a ToolBar in the window Trim Bar with buttons for each perspective. Alternatively a Combo as a Tool Control with a list of the perspectives, it is

How to add Perspective Bar Switcher to pure eclipse 4 rcp application

安稳与你 提交于 2019-11-28 08:56:37
问题 I have created a pure Eclipse e4 rich client platform application application model. I created multiple perspectives using perspective stack, but I am unable to switch other perspective because there is no default perspective bar or switcher icon present in Eclipse e4. How to implement a perspective switcher in pure Eclipse e4? 回答1: EPartService.switchPerspective will do the actual switch, but you will have to design and implement the UI. You could use a ToolBar in the window Trim Bar with

I cannot change the font size of package explorer in Eclipse

♀尐吖头ヾ 提交于 2019-11-27 11:41:40
I try to change the font size of package explorer in Eclipse from menu Window → Preferences → General → Appearance , and I fail to change the font size. How can I do that? I use Eclipse v4.2 (Juno) on Windows 7. Eclipse is using native Windows widgets and their settings can only be changed from Display Properties / Settings / Advanced / General properties tab. There you can change your screen DPI to alter font sizes. On Juno and up you can adjust that font by CSS. Lookup the files in eclipse\plugins\org.eclipse.platform_4.2.x.y\css for your current style sheet (probably e4_default_win7.css ),

How do I reset perspective for Eclipse e4 RCP application?

允我心安 提交于 2019-11-27 03:00:36
问题 After building a perspective in application.e4xmi file, I am unable to reset perspective by calling IWorkbenchPage.resetPerspective(). 回答1: I thought this may save others some time, as well as document it for myself. The trick to being able to reset an e4 perspective is as follows (assumes a basic application.e4xmi with PerspectiveStack element): In your application.e4xmi file, locate your PerspectiveStack under your Application/TrimmedWindow node. Record/set its ID. In Eclipse 4 Model Editor