Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Why does Composite have no actual value?
icon5.gif  Why does Composite have no actual value? [message #1015404] Thu, 28 February 2013 13:51 Go to next message
Stephen Wootten is currently offline Stephen WoottenFriend
Messages: 5
Registered: February 2013
Junior Member
I have an Eclipse RCP application with 2 `Parts` (Main Menu and New Macro) in a `Part Stack`.

I've attached an image of what the UI looks like because I can't post images yet!

When the application starts it calls the `CreateMainUI` contributing class below which constructs the UI and populates some things.

 public class CreateMainUI {

	//Text area for the variables
	static Text variableArea;

	//Create a tree to populate with variables when executing the file walk
	static Tree variableTree;
	//Create TreeItems; One to act as the parent (the class name) and one to act as sub items (the variables)
	static TreeItem classNameForVariables;
	static TreeItem variableOfClass;

	//Create a tree to populate with methods when executing the file walk
	static Tree methodTree;
	//Create TreeItems; One to act as the parent (the class name) and one to act as sub items (the methods)
	static TreeItem classNameForMethods;
	static TreeItem methodOfClass;

	@PostConstruct
	public void createInterface(Composite parent){
		...(lots of code)
	  }
	  
      ...(lots more code)
    }


It does this fine as you can see in the picture but when I change `Parts` by clicking on the New Macro tab it executes the below code which gives me an error, saying "no actual value was found for the argument "Composite"."

public class CreateNewMacroUI {
	
	  @PostConstruct
	  public void createInterface(Composite parent){
		  System.out.println("Macro UI");

	  }
    }


Can anyone explain to me why `Composite` has no value in this `Part` but does in the Main Menu `Part`?

Below is the Console Output for the Error:

!SESSION 2013-02-26 18:18:00.052 -----------------------------------------------
    eclipse.buildId=unknown
    java.version=1.7.0_13
    java.vendor=Oracle Corporation
    BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_GB
    Framework arguments:  -product ste.wootten.honoursproject.product -clearPersistedState
    Command-line arguments:  -product ste.wootten.honoursproject.product -data D:\Users\Ste\Documents\Uni Year 3\Project\Implementation/../runtime-honoursproject.product -dev file:D:/Users/Ste/Documents/Uni Year 3/Project/Implementation/.metadata/.plugins/org.eclipse.pde.core/honoursproject.product/dev.properties -os win32 -ws win32 -arch x86_64 -consoleLog -clearPersistedState
    
    !ENTRY org.eclipse.e4.ui.workbench 4 0 2013-02-26 18:18:21.205
    !MESSAGE Unable to create class 'ste.wootten.honoursproject.macropart.CreateNewMacroUI' from bundle '65'
    !STACK 0
    org.eclipse.e4.core.di.InjectionException: Unable to process "CreateNewMacroUI#createInterface()": no actual value was found for the argument "Composite".
    	at org.eclipse.e4.core.internal.di.InjectorImpl.reportUnresolvedArgument(InjectorImpl.java:394)
    	at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:856)
    	at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:111)
    	at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:319)
    	at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:240)
    	at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:161)
    	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:102)
    	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:71)
    	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:53)
    	at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:141)
    	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:896)
    	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:630)
    	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:732)
    	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:703)
    	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:697)
    	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:682)
    	at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.showTab(StackRenderer.java:1114)
    	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer$1.handleEvent(LazyStackRenderer.java:67)
    	at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:41)
    	at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180)
    	at org.eclipse.swt.widgets.Display.syncExec(Display.java:4687)
    	at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:187)
    	at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:38)
    	at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:197)
    	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197)
    	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
    	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
    	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
    	at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135)
    	at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78)
    	at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39)
    	at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:81)
    	at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:58)
    	at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374)
    	at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElement(ElementContainerImpl.java:171)
    	at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer$8.widgetSelected(StackRenderer.java:910)
    	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
    	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
    	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
    	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
    	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:774)
    	at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:3023)
    	at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:1730)
    	at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:270)
    	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
    	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
    	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
    	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1029)
    	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:923)
    	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
    	at org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:150)
    	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:353)
    	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:601)
    	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
    	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
    	at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
    	at org.eclipse.equinox.launcher.Main.main(Main.java:1414)





  • Attachment: 3IP1O4V.png
    (Size: 95.63KB, Downloaded 273 times)
Re: Why does Composite have no actual value? [message #1475641 is a reply to message #1015404] Sun, 16 November 2014 12:14 Go to previous message
Krzysztof Kot is currently offline Krzysztof KotFriend
Messages: 1
Registered: November 2014
Junior Member
I had similar problem because accidentally imported java.awt.Composite instead of org.eclipse.swt.widgets.Composite Razz
Previous Topic:Auto cast "macro" for method's actual parameters?
Next Topic:Can a Java program contain its own debugger?
Goto Forum:
  


Current Time: Sat Apr 20 02:47:28 GMT 2024

Powered by FUDForum. Page generated in 0.03039 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top