Bug 529947 - Strange behavior of the sirius diagramm tabbar when contributing to it
Summary: Strange behavior of the sirius diagramm tabbar when contributing to it
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Diagram (show other bugs)
Version: 5.1.0   Edit
Hardware: PC Windows 10
: P4 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard: backport
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2018-01-17 11:28 EST by Guillaume Coutable CLA
Modified: 2018-05-14 08:44 EDT (History)
4 users (show)

See Also:


Attachments
The plugin.xml of the tabbar contribution which make the tabbar becoming odd (40.88 KB, image/png)
2018-01-17 11:28 EST, Guillaume Coutable CLA
no flags Details
Short video to describe the bug (7.63 MB, video/x-flv)
2018-01-17 11:30 EST, Guillaume Coutable CLA
no flags Details
The project that declare the tabbar contribution (10.76 KB, application/x-zip-compressed)
2018-01-17 12:27 EST, Guillaume Coutable CLA
no flags Details
The project that use the contribution (2.27 KB, application/x-zip-compressed)
2018-01-17 12:27 EST, Guillaume Coutable CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Guillaume Coutable CLA 2018-01-17 11:28:45 EST
Created attachment 272300 [details]
The plugin.xml of the tabbar contribution which make the tabbar becoming odd

As I tried to follow the example "Provide tab-bar extensions" in the sirius documentation, I unfortunately remove the icon path (cf. attachment), start a runtime. When I selected a diagram element the tabbar icons became biggers then I selected the background and the tabbar disappear (cf. video attachment).
Comment 1 Guillaume Coutable CLA 2018-01-17 11:30:05 EST
Created attachment 272301 [details]
Short video to describe the bug
Comment 2 Julien Dupont CLA 2018-01-17 11:36:25 EST
Guillaume, 

Could you add the project with the extension and the modeling project used in the runtime.

Thanks.

Regards,
Comment 3 Guillaume Coutable CLA 2018-01-17 12:27:24 EST
Created attachment 272307 [details]
The project that declare the tabbar contribution
Comment 4 Guillaume Coutable CLA 2018-01-17 12:27:55 EST
Created attachment 272308 [details]
The project that use the contribution
Comment 5 Guillaume Coutable CLA 2018-01-17 12:34:36 EST
Step to reproduce: 
1) In an OD10.1.1 import the attachment 272307 [details] then launch a runtime.
2) Import the attachment 272308 [details] then open the diagram
3) Select the element => tabbar icons should become bigger
4) Select the diagram background => all the tabbar icons desappear but the zoom combo box.
Comment 6 Pierre Guilet CLA 2018-02-05 11:08:15 EST
When we check how the update/refresh is done, it seems to me it is out of control of Sirius:

Thread [main] (Suspended (breakpoint at line 718 in ToolItem))	
	owns: SelectionAggregator$7  (id=1417)	
	owns: RunnableLock  (id=1418)	
	ToolItem.setImage(Image) line: 718	
	HandledContributionItem(AbstractContributionItem).updateIcons() line: 175	
	HandledContributionItem(AbstractContributionItem).update(String) line: 124	
	HandledContributionItem(AbstractContributionItem).fill(ToolBar, int) line: 314	
	TabbarToolBarManager(ToolBarManager).update(boolean) line: 343	
	TabbarToolBarManager.update(boolean) line: 92	
	ToolBarManagerRenderer.subscribeTopicUpdateToBeRendered(Event) line: 212	
	GeneratedMethodAccessor6.invoke(Object, Object[]) line: not available	
	DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43	
	Method.invoke(Object, Object...) line: 498	
	MethodRequestor.execute() line: 55	
	UIEventObjectSupplier$UIEventHandler$1.run() line: 64	
	UISynchronizer(Synchronizer).syncExec(Runnable) line: 233	
	UISynchronizer.syncExec(Runnable) line: 144	
	Display.syncExec(Runnable) line: 4889	
	E4Application$1.syncExec(Runnable) line: 212	
	UIEventObjectSupplier$UIEventHandler.handleEvent(Event) line: 61	
	EventHandlerWrapper.handleEvent(Event, Permission) line: 201	
	EventHandlerTracker.dispatchEvent(EventHandlerWrapper, Permission, int, Event) line: 197	
	EventHandlerTracker.dispatchEvent(Object, Object, int, Object) line: 1	
	EventManager.dispatchEvent(Set<Entry<K,V>>, EventDispatcher<K,V,E>, int, E) line: 230	
	ListenerQueue<K,V,E>.dispatchEventSynchronous(int, E) line: 148	
	EventAdminImpl.dispatchEvent(Event, boolean) line: 135	
	EventAdminImpl.sendEvent(Event) line: 78	
	EventComponent.sendEvent(Event) line: 39	
	EventBroker.send(String, Object) line: 52	
	UIEventPublisher.notifyChanged(Notification) line: 60	
	HandledToolItemImpl(BasicNotifierImpl).eNotify(Notification) line: 374	
	HandledToolItemImpl(UIElementImpl).setVisible(boolean) line: 345	
	ToolBarContributionRecord.updateVisibility(IEclipseContext) line: 70	
	ToolBarManagerRenderer$2.changed(IEclipseContext) line: 478	
	TrackableComputationExt.update(ContextChangeEvent) line: 114	
	EclipseContext.processScheduled(Set<Scheduled>) line: 355	
	EclipseContext.set(String, Object) line: 370	
	SelectionService.handleSelectionChanged(MPart, Object, boolean) line: 74	
	SelectionService.lambda$0(MPart, Object) line: 64	
	1072606019.selectionChanged(MPart, Object) line: not available	
	SelectionAggregator$2.run() line: 126	
	SafeRunner.run(ISafeRunnable) line: 42	
	SelectionAggregator.notifyListeners(MPart, Object) line: 123	
	SelectionAggregator.access$6(SelectionAggregator, MPart, Object) line: 121	
	SelectionAggregator$7$1.run() line: 231	
	SelectionAggregator$7(RunAndTrack).runExternalCode(Runnable) line: 56	
	SelectionAggregator$7.changed(IEclipseContext) line: 228	
	TrackableComputationExt.update(ContextChangeEvent) line: 114	
	EclipseContext.processScheduled(Set<Scheduled>) line: 355	
	EclipseContext.set(String, Object) line: 370	
	SelectionServiceImpl.setSelection(Object) line: 31	
	CompatibilityEditor(CompatibilityPart).selectionChanged(SelectionChangedEvent) line: 461	
	SiriusDiagramGraphicalViewer(DiagramGraphicalViewer).flushSelectionEvents(ISelection) line: 256	

I don't see an obvious solution
Comment 7 Pierre Guilet CLA 2018-02-05 11:15:18 EST
It could be related to the org.eclipse.sirius.diagram.ui.tools.internal.editor.tabbar.Tabbar graphic construction but it is difficult to say
Comment 8 Pierre Guilet CLA 2018-02-05 11:45:03 EST
The following stack is paused when the Toolbar size increasing incorrectly to 3000+ width. 

Thread [main] (Suspended (breakpoint at line 229 in ToolBar))	
	owns: SelectionAggregator$7  (id=3710)	
	owns: RunnableLock  (id=3711)	
	ToolBar.computeSizeInPixels(int, int, boolean) line: 229	
	ToolBar(Control).computeSize(int, int, boolean) line: 663	
	ToolBar(Control).pack(boolean) line: 2214	
	TabbarToolBarManager(ToolBarManager).relayout(ToolBar, int, int) line: 210	
	TabbarToolBarManager(ToolBarManager).update(boolean) line: 379	
	TabbarToolBarManager.update(boolean) line: 92	
	TabbarFillerWithContributions.update(ISelection) line: 111	
	Tabbar.reinitToolBar(ISelection) line: 161	
	Tabbar.selectionChanged(IWorkbenchPart, ISelection) line: 137	
	DDiagramEditorImpl.selectionChanged(IWorkbenchPart, ISelection) line: 1051	
	SelectionService.notifyListeners(IWorkbenchPart, ISelection, ListenerList<ISelectionListener>) line: 239