this.layout();
} catch (Exception e) {
TextRulerPlugin.error(e);
}
DropTarget dt = new DropTarget(inputDirectoryText, DND.DROP_DEFAULT | DND.DROP_MOVE);
dt.setTransfer(new Transfer[] { FileTransfer.getInstance() });
dt.addDropListener(new DropTargetAdapter() {
@Override
public void drop(DropTargetEvent event) {
String fileList[] = null;
FileTransfer ft = FileTransfer.getInstance();
if (ft.isSupportedType(event.currentDataType)) {
fileList = (String[]) event.data;
}
if (fileList.length > 0)
inputDirectoryText.setText(fileList[0]);
}
});
DropTarget dt3 = new DropTarget(additionalDirectoryText, DND.DROP_DEFAULT | DND.DROP_MOVE);
dt3.setTransfer(new Transfer[] { FileTransfer.getInstance() });
dt3.addDropListener(new DropTargetAdapter() {
@Override
public void drop(DropTargetEvent event) {
String fileList[] = null;
FileTransfer ft = FileTransfer.getInstance();
if (ft.isSupportedType(event.currentDataType)) {
fileList = (String[]) event.data;
}
if (fileList.length > 0)
additionalDirectoryText.setText(fileList[0]);
}
});
DropTarget dt4 = new DropTarget(testDirectoryText, DND.DROP_DEFAULT | DND.DROP_MOVE);
dt4.setTransfer(new Transfer[] { FileTransfer.getInstance() });
dt4.addDropListener(new DropTargetAdapter() {
@Override
public void drop(DropTargetEvent event) {
String fileList[] = null;
FileTransfer ft = FileTransfer.getInstance();
if (ft.isSupportedType(event.currentDataType)) {
fileList = (String[]) event.data;
}
if (fileList.length > 0)
testDirectoryText.setText(fileList[0]);
}
});
DropTarget dt2 = new DropTarget(preFileText, DND.DROP_DEFAULT | DND.DROP_MOVE);
dt2.setTransfer(new Transfer[] { FileTransfer.getInstance() });
dt2.addDropListener(new DropTargetAdapter() {
@Override
public void drop(DropTargetEvent event) {
String fileList[] = null;
FileTransfer ft = FileTransfer.getInstance();
if (ft.isSupportedType(event.currentDataType)) {