e4

How to create my own shell to replace the shell created in the MTrimmedWindow in e4 RCP?

被刻印的时光 ゝ 提交于 2019-12-03 08:23:16
Is there a way to replace the shell generated by Eclipse RCP for the MTrimmedWindow by a user defined window? Eclipse creates a shell with a particular style type, which can only be provided while creating. I want to remove maximize and resize from the shell element created for the MTrimmedWindow. If any one has a solution for the above problem please reply. The style for the shell cannot be changed after creation, and the shell itself cannot be exchanged after it has been created by the renderer. But the situation is not hopeless. Eclipse 4 uses renderers to generate UI elements from the

Eclipse 4 RCP (aka E4) documentation

痞子三分冷 提交于 2019-12-03 01:40:35
Is there at least anything other than Vogella's tutorials and his book , which is completely based on those tuts? Examples from his repo are often either incomplete/unfinished/won't run and those examples even don't match the book actually.. I'd like to find at least some javadoc for this, because any step to a side and I'm completely lost on how to accomplish different tasks and what functionality is available. Lars Vogel's Tutorials are the most complete and up-to-date documentation on Eclipse 4 development. Second to this is asking questions in Eclipse 4 Community Forum . Last option is to

Type mismatch: cannot convert from element type Object to Parent

淺唱寂寞╮ 提交于 2019-12-02 22:47:02
问题 i'm trying to develop an e4 application but i have an error : in this part "error:Type mismatch: cannot convert from element type Object to Parent" any help please thanks in advance :) @Creatable @Singleton public class TreeControl { ParentsHolder parentholder = new ParentsHolder(); public Parent parentExists(String str) { for (Parent p : parentholder.getParents()) if (p.getTag().equals(str)) return p; return null; } public Child childExists(String p, String c) { Parent parent = parentExists

Eclipse Luna: Handlers' @CanExecute methods not called due to wrong context

点点圈 提交于 2019-12-02 15:23:30
问题 I upgraded my eclipse RCP application from Juno to Luna. This caused my application toolbar to be permenantly disabled. I found a solution in this thread: Eclipse Luna: Handlers' @CanExecute methods not called (Solution: generate event manually). But alas, the cure didn't work :-(. I drilled down with the debugger to find the root cause of failure. I found that in HandlerServiceHandler.class the method setEnabled(Object evaluationContext) fails. This is due to the extraction of the wrong

Type mismatch: cannot convert from element type Object to Parent

橙三吉。 提交于 2019-12-02 13:04:12
i'm trying to develop an e4 application but i have an error : in this part "error:Type mismatch: cannot convert from element type Object to Parent" any help please thanks in advance :) @Creatable @Singleton public class TreeControl { ParentsHolder parentholder = new ParentsHolder(); public Parent parentExists(String str) { for (Parent p : parentholder.getParents()) if (p.getTag().equals(str)) return p; return null; } public Child childExists(String p, String c) { Parent parent = parentExists(p); if (parent != null) for (Child child : parent.getChildren()) if (child.getTag().equals(c)) return

How to make something on startup in Eclipse E4 application?

好久不见. 提交于 2019-12-02 06:09:42
问题 I want to run something exactly after E4 RCP application starts. How to do that? 回答1: You can do this with a LifeCycle class. You specify this in the lifeCyceURI property of your product: <extension id="product" point="org.eclipse.core.runtime.products"> <product name="%product.name" application="org.eclipse.e4.ui.workbench.swt.E4Application"> <property name="lifeCycleURI" value="bundleclass://plugin-id/package.LifeCycle"> </property> .... The PostContextCreate annotation runs very early in

How to position a Handled Tool Item to the right

你离开我真会死。 提交于 2019-12-02 00:44:11
I've an application built on eclipse e4 framework. I want to position a Handled Tool Item to the far right end. How can I achieve it? You need to use two 'Toolbar' entries with a 'Tool Control' between them: so something like: In the Tags for the Tool Control add the word stretch this will make the trim bar manager stretch out the control to use all available space pushing everything after it to the right: The class for the control can something simple like: public class SpacerControl { @PostConstruct public void postConstruct(Composite parent) { Composite body = new Composite(parent, SWT.NONE

How to make an eclipse partstack not disappear when the last part is closed?

不打扰是莪最后的温柔 提交于 2019-12-01 08:10:30
I'm working on a project with a main window consisting of a mpartstack where I add parts dynamically from another part. The problem is that when the last part gets closed the mpartstack disappears and the other part takes up all the space. When I try to add new parts nothing happens. I've tried fiddling around with the preDestroy function in the parts that are added to the stack by trying to add a new part. The preDestroy works occasionally but far from satisfactory. I've looked far and wide to try to find any clue on what to do but I've found nothing except for some bug reports on the matter.

How to get the IEclipseContext in an activator

烈酒焚心 提交于 2019-12-01 04:51:24
I got stuck on one problem with an Eclipse 4 RCP application. I need to log some events. I need obtain somehow a reference to the logger. I know, how to do that using IEclipseContext , but I've nowhere found, how to obtain IEclipseContext without the dependency injection, which I cannot use in the activator. Do you anybody know, how to sort it out this problem, please? Thanks a lot You can get a specialized IEclipseContext by calling EclipseContextFactory.getServiceContext(bundleContext) which will allow access to OSGi services. Tomáš K. It seems regretably, that there is no way to obtain

How to get the IEclipseContext in an activator

自闭症网瘾萝莉.ら 提交于 2019-12-01 02:25:48
问题 I got stuck on one problem with an Eclipse 4 RCP application. I need to log some events. I need obtain somehow a reference to the logger. I know, how to do that using IEclipseContext , but I've nowhere found, how to obtain IEclipseContext without the dependency injection, which I cannot use in the activator. Do you anybody know, how to sort it out this problem, please? Thanks a lot 回答1: You can get a specialized IEclipseContext by calling EclipseContextFactory.getServiceContext(bundleContext)