Source:
<code>public void testDragAndDropModelFile() { final UIResource sessionAirdResource = new UIResource(designerProject, FILE_DIR, SESSION_FILE); RunnableWithResult<IEditorPart> result = new RunnableWithResult<IEditorPart>() { private IEditorPart resultEditor; @Override public void run() { <START> @SuppressWarnings("deprecation") <END> URI uri = URI.createPlatformResourceURI(sessionAirdResource.getFullPath().toString()); try { resultEditor = PlatformUI.getWorkbench() .getActiveWorkbenchWindow().getActivePage().openEditor(new FileEditorInput(ResourcesPlugin .getWorkspace().getRoot().getFile(new Path(uri.toPlatformString(true)))), SessionEditor.EDITOR_ID); } catch (PartInitException e) { throw new RuntimeException(e); } } @Override public IEditorPart getResult() { return resultEditor; } @Override public void setStatus(IStatus status) { } @Override public IStatus getStatus() { return null; } }; PlatformUI.getWorkbench().getDisplay().syncExec(result); SWTBotTree semanticAirdTree = bot.editorById(SessionEditor.EDITOR_ID).bot().tree(0); SWTBotTree modelExplorerTree = bot.viewByTitle("Model Explorer").bot().tree(); SWTBotTreeItem sampleFile = modelExplorerTree.expandNode(designerProject.getName()) .expandNode(SAMPLE_MODEL_FILE); DndUtil util = new DndUtil(bot.getDisplay()); bot.getDisplay().asyncExec(new Runnable() { @Override public void run() { Rectangle bounds = semanticAirdTree.widget.getBounds(); Point dropPoint = new Point(modelExplorerTree.widget.getBounds().width + bounds.width / 2, bounds.height); util.dragAndDrop(sampleFile, dropPoint); } }); boolean isDragAndDropOk = false; for (SWTBotTreeItem swtBotTreeItem : semanticAirdTree.getAllItems()) { String text = swtBotTreeItem.getText(); if (text.contains(SAMPLE_MODEL_FILE)) { isDragAndDropOk = true; } } assertTrue("Model file file.ecore must be added to semantic model tree.", isDragAndDropOk); }</code><technical_language>remove</technical_language>

Target:
public void testDragAndDropModelFile() { final UIResource sessionAirdResource = new UIResource(designerProject, FILE_DIR, SESSION_FILE); RunnableWithResult<IEditorPart> result = new RunnableWithResult<IEditorPart>() { private IEditorPart resultEditor; @Override public void run() { URI uri = URI.createPlatformResourceURI(sessionAirdResource.getFullPath().toString(), true); try { resultEditor = PlatformUI.getWorkbench() .getActiveWorkbenchWindow().getActivePage().openEditor(new FileEditorInput(ResourcesPlugin .getWorkspace().getRoot().getFile(new Path(uri.toPlatformString(true)))), SessionEditor.EDITOR_ID); } catch (PartInitException e) { throw new RuntimeException(e); } } @Override public IEditorPart getResult() { return resultEditor; } @Override public void setStatus(IStatus status) { } @Override public IStatus getStatus() { return null; } }; PlatformUI.getWorkbench().getDisplay().syncExec(result); SWTBotTree semanticAirdTree = bot.editorById(SessionEditor.EDITOR_ID).bot().tree(0); SWTBotTree modelExplorerTree = bot.viewByTitle("Model Explorer").bot().tree(); SWTBotTreeItem sampleFile = modelExplorerTree.expandNode(designerProject.getName()) .expandNode(SAMPLE_MODEL_FILE); bot.getDisplay().asyncExec(() -> { Rectangle bounds = semanticAirdTree.widget.getBounds(); Point dropPoint = new Point(modelExplorerTree.widget.getBounds().width + bounds.width / 2, bounds.height); sampleFile.select(); DndUtil util = new DndUtil(bot.getDisplay()); util.dragAndDrop(sampleFile, dropPoint); }); SWTBotUtils.waitAllUiEvents(); boolean isDragAndDropOk = false; for (SWTBotTreeItem swtBotTreeItem : semanticAirdTree.getAllItems()) { String text = swtBotTreeItem.getText(); if (text.contains(SAMPLE_MODEL_FILE)) { isDragAndDropOk = true; } } assertTrue("Model file file.ecore must be added to semantic model tree.", isDragAndDropOk); }