Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 361882

Summary: Cannot work with annotation for attribute with undefined stereotype
Product: [Technology] Tigerstripe Reporter: Maria Kolchinskaja <mshulgina>
Component: AnnotationsAssignee: Project Inbox <tigerstripe.annotations-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: valentin
Version: unspecified   
Target Milestone: 0.5M0   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Maria Kolchinskaja CLA 2011-10-25 01:08:56 EDT
Build Identifier: 

Create Tigerstripe project with Entity
Add attribute for the Entity
Create profile and add stereotype for the Entity attributes
Apply profile
Add stereotype for the attribute
Reset profile - see that stereotype becomes undefined
Select attribute in TS Explorer - see that error log opens. Switch to Annotation view - annotations are not displayed
See errors in error log:

org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException)
	at org.eclipse.swt.SWT.error(SWT.java:4083)
	at org.eclipse.swt.SWT.error(SWT.java:3998)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:137)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4041)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
	at org.eclipse.ui.internal.Workbench.runUI_aroundBody0(Workbench.java:2604)
	at org.eclipse.ui.internal.Workbench$AjcClosure1.run(Workbench.java:1)
	at com.xored.tesla.recording.aspects.WorkbenchRecordingAspect.ajc$around$com_xored_tesla_recording_aspects_WorkbenchRecordingAspect$2$a7b5a621proceed(WorkbenchRecordingAspect.aj:1)
	at com.xored.tesla.recording.aspects.WorkbenchRecordingAspect.ajc$around$com_xored_tesla_recording_aspects_WorkbenchRecordingAspect$2$a7b5a621(WorkbenchRecordingAspect.aj:31)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2439)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
	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:369)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1384)
Caused by: java.lang.NullPointerException
	at org.eclipse.tigerstripe.workbench.ui.internal.views.stereotypes.StereotypeConverter.createEClass(StereotypeConverter.java:154)
	at org.eclipse.tigerstripe.workbench.ui.internal.views.stereotypes.StereotypeConverter.createObject(StereotypeConverter.java:139)
	at org.eclipse.tigerstripe.workbench.ui.internal.views.stereotypes.StereotypeNote.initEObject(StereotypeNote.java:81)
	at org.eclipse.tigerstripe.workbench.ui.internal.views.stereotypes.StereotypeNote.getContent(StereotypeNote.java:74)
	at org.eclipse.tigerstripe.annotation.ui.core.view.EObjectBasedNote.addChangeListener(EObjectBasedNote.java:42)
	at org.eclipse.tigerstripe.annotation.ui.internal.view.property.DirtyListener.<init>(DirtyListener.java:24)
	at org.eclipse.tigerstripe.annotation.ui.internal.view.property.PropertiesBrowserPage$UIDirtyAdapter.<init>(PropertiesBrowserPage.java:663)
	at org.eclipse.tigerstripe.annotation.ui.internal.view.property.PropertiesBrowserPage.adapt(PropertiesBrowserPage.java:579)
	at org.eclipse.tigerstripe.annotation.ui.internal.view.property.PropertiesBrowserPage.updatePage(PropertiesBrowserPage.java:592)
	at org.eclipse.tigerstripe.annotation.ui.internal.view.property.PropertiesBrowserPage$13.run(PropertiesBrowserPage.java:742)
	at org.eclipse.tigerstripe.annotation.ui.util.AsyncExecUtil$1.run(AsyncExecUtil.java:38)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
	... 27 more

Reproducible: Always
Comment 1 Valentin Yerastov CLA 2011-10-27 07:28:34 EDT
fixed
Comment 2 Valentin Yerastov CLA 2011-11-01 07:48:56 EDT
fixed
Comment 3 Maria Kolchinskaja CLA 2011-11-08 06:33:03 EST
Verified