Bug 566310

Summary: InfiniteCanvasViewer: Extraction of the creation of the InfiniteCanvas class instance in a separate method.
Product: [Tools] GEF Reporter: Markus Muehlbrandt <markus.muehlbrandt>
Component: GEF MVCAssignee: gef-inbox <gef-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3    
Version: 5.3.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 10   
Whiteboard:

Description Markus Muehlbrandt CLA 2020-08-24 04:05:03 EDT
The 'getCanvas()' method of the InfiniteCanvasViewer class creates an instance of the InfiniteCanvas and assigns it directly to a private field. It would be nice if the creation of the InfiniteCanvas instance could be moved to a separate factory method (e.g. createCanvas). I want to override a method of the InfiniteCanvas class and let the InfiniteViewer use my customized InfiniteCanvas. Due to the current implementation in the InfiniteCanvasViewer, this is unfortunately a bit cumbersome.

Alternatively, the specific InfiniteCanvas implementation could be registered via an additional binding in the MvcFXModule similar to the viewer. That would be more "GEF-Like". To do this, the InfiniteCanvas instance would have to be created in the viewer via injection.