e4

NPE in HandledContributionItem.canExecuteItem

為{幸葍}努か 提交于 2020-01-24 21:17:58
问题 I have this little editor with a toolbar contributed by the plugin.xml : public class MyEditor extends EditorPart { public static final String ID = "org.acme.project.MyEditor"; @Override public void init(IEditorSite site, IEditorInput input) throws PartInitException { setSite(site); setInput(input); } @Override public void createPartControl(Composite parent) { final ToolBarManager localToolBarmanager = new ToolBarManager(); final IMenuService menuService = PlatformUI.getWorkbench().getService

NPE in HandledContributionItem.canExecuteItem

丶灬走出姿态 提交于 2020-01-24 21:17:26
问题 I have this little editor with a toolbar contributed by the plugin.xml : public class MyEditor extends EditorPart { public static final String ID = "org.acme.project.MyEditor"; @Override public void init(IEditorSite site, IEditorInput input) throws PartInitException { setSite(site); setInput(input); } @Override public void createPartControl(Composite parent) { final ToolBarManager localToolBarmanager = new ToolBarManager(); final IMenuService menuService = PlatformUI.getWorkbench().getService

How to inject parameter with ParameterizedCommand in Eclipse 4.3?

久未见 提交于 2020-01-13 12:10:17
问题 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="

How to inject parameter with ParameterizedCommand in Eclipse 4.3?

大憨熊 提交于 2020-01-13 12:06:57
问题 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="

How can I create a view using the E4 programming model to be a plug-in for Eclipse 4.2 or above?

五迷三道 提交于 2020-01-11 13:10:07
问题 Most of the existing Eclipse plug-ins use the extension registry and subclasses of ViewPart , coupled with the compatibility layer. As a result, writing a new view (especially using the new plug-in wizard in PDE) results in plug-ins that look like: <plugin> <extension point="org.eclipse.ui.views"> <view name="Example View" class="org.example.ExampleView"/> </extension> </plugin> public class ExampleView extends ViewPart { public void createPartControl(Composite parent) { ... } } Is it

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

爱⌒轻易说出口 提交于 2020-01-11 06:24:14
问题 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

when reset perspective is done on E4 error occurs

自作多情 提交于 2020-01-07 03:27:17
问题 When reset Perspective code is done as in the given link https://www.eclipse.org/forums/index.php/m/1209165/srch=reset+perspective+in+e4#msg_1209165 and code called is The code is as follows public class ResetPerspective { // private static final String MAIN_PERSPECTIVE_STACK_ID = "MainPerspectiveStack"; @Execute public void execute(@Named(IServiceConstants.ACTIVE_SHELL) Shell shell, EModelService modelService, MApplication app, EPartService partService) { MWindow window = (MWindow)

Eclipse RCP e4 + Tycho Maven + separate Target Platform

房东的猫 提交于 2020-01-07 03:08:14
问题 I have an e4 RCP project, built with Tycho My projects consist of: aggregator, parent, product, rcp, and target - as learnt in the vogella tutorials The target platform points to eclipse update sites, and it's also loaded into eclipse as the default platform. The app is PLUGIN BASED. I don't really want to add a feature for nothing. The catch is, the build of product fails because multi-platform plugins like org.eclipse.core.filesystem.hpux.ia64_32 org.eclipse.swt.carbon.macosx org.eclipse

Custom message when closing a part in Eclipse RCP 4

时光怂恿深爱的人放手 提交于 2020-01-05 08:57:32
问题 we have the following problem: In our Eclipse RCP 4 application there are multiple parts and the parts are closable. When the user is closing a part there should be a custom pop-up (depending on some internal part state) which is asking the user if he really wants to close the part or not. It seems to be not that easy to implement in Eclipse RCP 4 or we have just totally overseen something. I'll just give you a short brieifing about the things we tried: Use dirtable with a @persist method in

Eclipse 4 RCP Deployment applicationXMI argument missing

。_饼干妹妹 提交于 2020-01-04 11:08:49
问题 I'm trying to export an Eclipse 4 RCP application that works when I run it through Eclipse but breaks when I try and deploy it. I found a solution to the problem here but when I look at the build.properties file it does not show what is included in the export. It shows Binary Build and Source Build. I checked the Application.e4xmi file for both and it doesn't seem to have an effect. My build.properties file looks like this: output.. = bin/ bin.includes = META-INF/,\ .,\ plugin.xml,\