Drag and Drop


This chapter is composed of :

  1. Introduction
  2. Drag and Drop

1. Introduction

The Drag and Drop mechanism lets you transfer an existing Database Connection from the DatabaseExplorer to an existing Project inside your Eclipse Workspace.

This Project could be a Simple Project, a Java Project or another kind of Project supported by your Eclipse Platform.

With the Drag and Drop feature you will transfer two or three files inside your workspace :

 

2. Drag and Drop

You should drop a Database Connection in the Navigator View.

Due to a restriction in the Eclipse Platform, see Eclipse Bugzilla Bug 71065, you cannot drop a Database Connection in the Package Explorer View.

If you are targeting a Java Project, do not drop a Database Connection into a Default output folder.

 

 

This folder hosts all the compilation results.

If you create a Database Connection in a Java Source folder, this Connection will be copied into this folder.

EclipseDatabase knows how to deal with such situations but we do not recommend this way of working.

Select a Database Connection in your DatabaseExplorer.

Keep your finger on the button.

Drag over a target in the Navigator View.

This could be a folder, a linked folder or a project root.

When the mouse button is released, the Database Connection has moved from the DatabaseExplorer to the Navigator window.

The following example shows how to move the Employee Database using the mouse :

 



The DatabaseConsole shows a report of what happened during this move.



 

Occasionally Drag and Drop can fail.

In this case a dialog box is opened with an explanatory message.