Hi Lali,

Can you try following code snippet for getEditingDomain() method ?

/**
 * @generated NOT
 */
public TransactionalEditingDomain getEditingDomain() {
IDocument document = null;
if (getDocumentProvider() != null) {
document = getEditorInput() != null ? getDocumentProvider().getDocument(
getEditorInput()) : null;
} else {
document = getEditorInput() != null ? getDocumentProvider(getEditorInput())
.getDocument(getEditorInput()) : null;
}
if (document instanceof IDiagramDocument) {
return ((IDiagramDocument) document).getEditingDomain();
}
return super.getEditingDomain();
}


Thanks,
Viraj.


On Tue, Apr 22, 2014 at 11:59 PM, Lali Devamanthri <[email protected]> wrote:

> Hi,
> Following exception throw when close the eclipse after run as eclipse
> application.
>
> org.eclipse.swt.SWTException: Failed to execute runnable
> (java.lang.NullPointerException)
>  at org.eclipse.swt.SWT.error(SWT.java:4397)
> at org.eclipse.swt.SWT.error(SWT.java:4312)
>         ...
>
> Caused by: java.lang.NullPointerException
>  at
> dataMapper.diagram.part.DataMapperDiagramEditor.getEditingDomain(DataMapperDiagramEditor.java:144)
> at
> org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor$1.getEditingDomain(DiagramEditor.java:396)
>  at
> org.eclipse.gmf.runtime.diagram.ui.actions.AbstractDeleteFromAction.getEditingDomain(AbstractDeleteFromAction.java:117)
>  at
> org.eclipse.gmf.runtime.diagram.ui.actions.AbstractDeleteFromAction.updateTargetRequest(AbstractDeleteFromAction.java:85)
>  at
> org.eclipse.gmf.runtime.diagram.ui.actions.DiagramAction.refresh(DiagramAction.java:113)
>
>
> But DataMapperDiagramEditor class is generated.
> /**
>  * @generated
>  */
> public TransactionalEditingDomain getEditingDomain() {
>  IDocument document = getEditorInput() != null ?
> getDocumentProvider().getDocument(   //line 144
> getEditorInput()) : null;
>  if (document instanceof IDiagramDocument) {
> return ((IDiagramDocument) document).getEditingDomain();
>  }
> return super.getEditingDomain();
>  }
>
> Is this exception occurs due to modified methods of generated class ?
>
>
> Thanks,
> Lali
>
> --
> *Lali Sudaththa Devamanthri*
> Software Engineer
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middleware
>
> mobile: +94 71 895 4922
> <http://www.wso2.com>
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Viraj Rajaguru
Software Engineer
WSO2 Inc. : http://wso2.com

Mobile: +94 77 3683068
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to