Bug 340508 NPE in BindingCopies.isUserBinding
We are not properly intializing the BindingSystem in a pure e4 application: org.eclipse.e4.core.di.InjectionException: java.lang.NullPointerException at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:63) at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:828) at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:108) at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:310) at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:237) at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:153) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:90) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:64) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:53) at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:231) at org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:120) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577) at org.eclipse.equinox.launcher.Main.run(Main.java:1410) at org.eclipse.equinox.launcher.Main.main(Main.java:1386) Caused by: java.lang.NullPointerException at org.eclipse.e4.ui.bindings.internal.BindingCopies.isUserBinding(BindingCopies.java:64) at org.eclipse.e4.ui.workbench.swt.util.BindingProcessingAddon.createBinding(BindingProcessingAddon.java:247) at org.eclipse.e4.ui.workbench.swt.util.BindingProcessingAddon.defineBinding(BindingProcessingAddon.java:212) at org.eclipse.e4.ui.workbench.swt.util.BindingProcessingAddon.defineBindingTable(BindingProcessingAddon.java:202) at org.eclipse.e4.ui.workbench.swt.util.BindingProcessingAddon.defineBindingTables(BindingProcessingAddon.java:185) at org.eclipse.e4.ui.workbench.swt.util.BindingProcessingAddon.init(BindingProcessingAddon.java:86) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56) ... 23 more
bundles/org.eclipse.e4.ui.bindings/src/org/eclipse/e4/ui/bindings/internal/BindingCopies.java
private static Collection<Binding> sysBindings;
	private static Collection<Binding> inactiveSystemBindings;
	private static Collection<Binding> userBindings;
	public static void init() {
		inactiveSystemBindings = new ArrayList<Binding>();
		userBindings = new ArrayList<Binding>();
	}
	public static void setDefaultSysBindings(Collection<Binding> newSysBindings) {
		sysBindings = newSysBindings;
	}
	public static Collection<Binding> getSystemBindings() {
		return sysBindings;
	}
	public static void addInactiveSysBinding(Binding binding) {
		inactiveSystemBindings.add(binding);
	}