Community
Participate
Working Groups
Build Identifier: 20100617-1415 The template use the deprecate method. Reproducible: Always
Created attachment 179250 [details] Patch using the new API Use the new API to avoid Memory leak. The patch is applied to the file org.eclipse.gmf.codegen/template/xpt/editor/ValidateAction.xpt
Created attachment 179294 [details] A working patched
I looked at your patch and wonder why you are not using this call: DiagramEditPart diagramEditPart = OffscreenEditPartFactory .getInstance().createDiagramEditPart(view.getDiagram(), PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell()); but do instead create a new shell.
Because the PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell() might not be available. And also, I'm not sure, it was some times ago but there was some memory issues with objects kept in Shell memory and so with a new Shell we can dispose it.