e4

Eclipse 4 RCP Application (standalone!): Add “show view” in menu

有些话、适合烂在心里 提交于 2019-12-07 03:06:30
In my standalone RCP Application (which I start using a product configuration) I would like to add a menu entry "show view" that lists all views I have defined in my persistent application model (an application.e4xmi file) being closed . Currently I do not have any Advisor Classes in use. What I did was to manually add HandledMenuItems for each view and added a CoreExpression as Visible-When Expression . This expression tests for a special key value pair in the application context . The problem here is that I would need a special expression for each view. What would be a good pattern to solve

Update Eclipse E4 application using p2

落花浮王杯 提交于 2019-12-07 02:07:26
I'm adding an update feature in my Eclipse E4 application. Herefor I used the source code and tutorial from Lars Vogel. When I test my application the provisioningJob is always null. It should only be null when it run into Eclipse. But when I try to update my exported application the provisioningJob is still null. What I'm doing wrong? public class UpdateHandler { private static final String REPOSITORY_LOC = System.getProperty("UpdateHandler.Repo", "file:////updateServer/repository"); @Execute public void execute(final IProvisioningAgent agent, final Shell shell, final UISynchronize sync,

Eclipse RCP 4 draggable Toolbar

半世苍凉 提交于 2019-12-06 16:49:20
Is it possible to create a pure Eclipse RCP 4 application, that uses the nice toolbar from the Eclipse IDE with Drag and Drop functionality? Starting with a fresh installation of Eclipse for RCP 4.5.1 , I created a pure e4 application with sample content using the wizrad. It contains two toolbars, but D&D functionality is missing. So what to do next? There was Drag and Drop functionality in Eclipse 3.x (locking / unlocking toolbar) But with Eclipse 4.x its not working. You can see bug : https://bugs.eclipse.org/bugs/show_bug.cgi?id=409633 There is change in CoolBarToTrimManager.java which is

How to use Eclipse 3.x views in E4?

六眼飞鱼酱① 提交于 2019-12-06 11:59:40
I am experienced with Eclipse 3.x development and now want to develop an E4 application. Therefor I tested a simple example in order to get started with the new things. I was following this tutorial step by step but it results in the same error. However, he is not getting those errors. I'm using Eclipse Luna (4.4.2) and installed the E4 Tools (0.17) . I've created a new Eclipse 4 Application and added to the Application.e4xmi the Common Resource Navigator (Project Explorer) as Shared Part using Import 3x -> View as CompatibilityView. I then added a Placeholder which references the shared part.

Open Editor Part in E4

我只是一个虾纸丫 提交于 2019-12-06 10:01:12
In E3 this was one of the basic use cases: we want to open an editor (or view or part, whatever you want to call it) based on some model object, back then wrapped in IEditorInput . In E4 this seems to be one of the features that got removed without replacement. However you can reinvent the wheel: public static final String DATA_MODEL = "model"; @Inject private EPartService partService; @Inject private EPartService partService; @Inject private MApplication application; public void open(String editorId, Object editorInput) { MPart part = this.partService.createPart(editorId); part

Eclipse e3 to e4 migration/adaption(preferred) - recommendations

北城以北 提交于 2019-12-06 07:18:29
问题 What I got I got a nearly finished e3 application, but need the dependency injection feature from e4, therefore I moved to Kepler. Now in e4, the e3 plugins are working, if I run my application as an e3 App. But if I change to Application.e4xmi the system fails. (somehow expected this) Problems How can I move my e3 plugins to e4 so my perspectives and views are working (I got plenty of em! And I cannot remove them - I need them to be extended if an plugin gets added!) also Menu contributions,

Host plug-in JavaSE has not been found in RCP application with Java 10

拜拜、爱过 提交于 2019-12-06 06:33:05
I moved my RCP application from Eclipse Oxygen to Photon, and also from Java 8 to Java 10. The code compiles and the application works fine if I start it from Eclipse. However, when I try to build my application, I get an error: plug-in JavaSE_0.0.0 has not been found Missing Constraint: Bundle-RequiredExecutionEnvironment: JavaSE-10 Host plug-in JavaSE_0.0.0 has not been found. I can't find any useful solution on Google. Maybe some of you can help me. My manifest file contains this header: Bundle-RequiredExecutionEnvironment: JavaSE-10 This seems to be an Eclipse bug. Eclipse seems not to

Howto restart an e4 RCP application

泄露秘密 提交于 2019-12-06 03:22:43
A 3.* based RCP application will be restarted if IApplication.start returns IApplication.EXIT_RESTART. The class E4Application seems to always return EXIT_OK. org.eclipse.ui.IWorkbench also has a restart method, org.eclipse.e4.ui.workbench.IWorkbench does not. So how can I restart an e4 RCP application? The current implementation in Eclipse 4.2 leads to a command with id org.eclipse.ui.file.restartWorkbench which ultimately leads to the handler class RestartWorkbenchHandler. This class is implemented as follows public Object execute(ExecutionEvent event){ PlatformUI.getWorkbench().restart();

eclipse rcp keybindings don't work

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-06 03:19:37
问题 I am trying to make eclipse keybindings work. I tried to make the rename command work. I looked at some tutorials and experimented. I enabled command and key binding trace in console (http://eclipsesource.com/blogs/2009/07/08/tip-tracing-keybindings-in-rcp/). I have created a custom command: com.mycompany.myproduct.command.rename This is what I got so far: 1) I tried to follow this tutorial,http://www.vogella.com/tutorials/EclipseCommandsKeybindings/article.html, but I came to the conclusion

How to inject parameter with ParameterizedCommand in Eclipse 4.3?

天大地大妈咪最大 提交于 2019-12-05 16:01:41
I am currently implementing an Eclipse 4.3 application and running into a problem. I try to parametrize a command to delete specific files. My approach is corresponding to Getting parameter of parameterized command in Eclipse RCP 4.2 , but i somehow don't get it working right. In my Application.e4xmi I have added a command with a parameter: <commands xmi:id="_K1MVgDGKEeOO8o2ChqdHMA" elementId="first.application.command.deleteproject" commandName="deleteProjectCommand"> <parameters xmi:id="_Hr4FEDGTEeOO8o2ChqdHMA" elementId="cmd0" name="cmd0" typeId="" optional="false"/> </commands> At one