*/
private void closeRemoteContextEditor() {
if (getLaunch() == null || getLaunch().getLaunchConfiguration() == null) return;
CamelDebugRegistryEntry entry = CamelDebugRegistry.getInstance().getEntry(getLaunch().getLaunchConfiguration());
if (entry == null) return;
CamelDebugContextEditorInput input = entry.getEditorInput();
CamelDebugRegistry.getInstance().removeEntry(getLaunch().getLaunchConfiguration());
IWorkbench wb = PlatformUI.getWorkbench();
if (wb != null) {
IWorkbenchWindow[] wbw = wb.getWorkbenchWindows();
if (wbw.length > 0) {
final IWorkbenchPage page = wbw[0].getActivePage();
if (page != null) {
final IEditorPart ep = page.getActiveEditor();
if (ep != null && ep.getEditorInput() instanceof CamelDebugContextEditorInput) {
CamelDebugContextEditorInput ip = (CamelDebugContextEditorInput)ep.getEditorInput();
IFile f = (IFile)input.getAdapter(IFile.class);
IFile fIp = (IFile)ip.getAdapter(IFile.class);
if (fIp.getFullPath().toFile().getPath().equals(f.getFullPath().toFile().getPath())) {
Display.getDefault().asyncExec(new Runnable() {
@Override
public void run() {
page.closeEditor(ep, false);