public String getEditorId(IEditorInput input, Object element)
	{
		if (element instanceof ILineBreakpoint)
		{
			ILineBreakpoint breakpoint = (ILineBreakpoint) element;
			element = breakpoint.getMarker().getResource();
		}

		if (element instanceof IFile)
		{
			IFile file = (IFile) element;
			try
			{
				String contentTypeId = file.getContentDescription().getContentType().getId();
				if (SourceViewerEditorManager.getInstance().getContentTypeIds().contains(contentTypeId))
				{
					return SourceViewerEditorManager.getInstance().getEditorId(contentTypeId);
				} else
				// TODO: it fixes the source lookup for wordDocs - not sure if this has other implications
				{
					return SourceViewerEditorManager.getInstance().getEditorId("org.overture.ide.vdm.external.content-type");
				}
			} catch (CoreException e)
			{
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			// return "org.overture.ide.vdmpp.ui.editor";
		}
		return null;
	}
public String getEditorId ( IEditorInput input , Object element ) { if ( element instanceof ILineBreakpoint ) { ILineBreakpoint breakpoint = ( ILineBreakpoint ) element ; element = breakpoint . getMarker ( ) . getResource ( ) ; } if ( element instanceof IFile ) { IFile file = ( IFile ) element ; try { String contentTypeId = file . getContentDescription ( ) . getContentType ( ) . getId ( ) ; if ( SourceViewerEditorManager . getInstance ( ) . getContentTypeIds ( ) . contains ( contentTypeId ) ) { return SourceViewerEditorManager . getInstance ( ) . getEditorId ( contentTypeId ) ; } else { return SourceViewerEditorManager . getInstance ( ) . getEditorId ( "org.overture.ide.vdm.external.content-type" ) ; } } catch ( CoreException e ) { e . printStackTrace ( ) ; } } return null ; }
/*
(non-Javadoc)
@see org.eclipse.debug.ui.ISourcePresentation#getEditorId(org.eclipse.ui.IEditorInput, java.lang.Object)