use of org.talend.mdm.repository.core.dnd.RepositoryDropAssistant in project tmdm-studio-se by Talend.
the class PasteAction method getDropAssistant.
private RepositoryDropAssistant getDropAssistant() {
INavigatorDnDService dndService = commonViewer.getNavigatorContentService().getDnDService();
CommonDropAdapterAssistant[] dropAssistants = dndService.findCommonDropAdapterAssistants(getSelectedDropViewObj(), getStructuredSelection());
for (CommonDropAdapterAssistant assistant : dropAssistants) {
if (assistant instanceof RepositoryDropAssistant) {
return (RepositoryDropAssistant) assistant;
}
}
return null;
}
use of org.talend.mdm.repository.core.dnd.RepositoryDropAssistant in project tmdm-studio-se by Talend.
the class PasteAction method isVisible.
public boolean isVisible(IRepositoryViewObject viewObj) {
RepositoryDropAssistant dropAssistant = getDropAssistant();
if (dropAssistant != null) {
IRepositoryViewObject dragViewObj = getSelectedDragViewObj();
IRepositoryViewObject dropViewObj = (IRepositoryViewObject) getSelectedObject().get(0);
return dropAssistant.validate(DND.DROP_COPY, dragViewObj, dropViewObj);
}
return super.isVisible(viewObj);
}
use of org.talend.mdm.repository.core.dnd.RepositoryDropAssistant in project tmdm-studio-se by Talend.
the class DuplicateAction method doRun.
protected void doRun() {
RepositoryDropAssistant dropAssistant = getDropAssistant();
if (dropAssistant != null) {
IRepositoryViewObject viewObj = getSelectedViewObj();
boolean result = dropAssistant.copyViewObj(viewObj, viewObj);
if (result) {
refreshContainer(dropAssistant, viewObj);
}
}
}
use of org.talend.mdm.repository.core.dnd.RepositoryDropAssistant in project tmdm-studio-se by Talend.
the class PasteAction method doRun.
protected void doRun() {
RepositoryDropAssistant dropAssistant = getDropAssistant();
if (dropAssistant != null) {
IRepositoryViewObject dropViewObj = getSelectedDropViewObj();
boolean result = dropAssistant.copyViewObj(getSelectedDragViewObj(), dropViewObj);
if (result) {
refreshContainer(dropAssistant, dropViewObj);
}
}
}
use of org.talend.mdm.repository.core.dnd.RepositoryDropAssistant in project tmdm-studio-se by Talend.
the class DuplicateAction method getDropAssistant.
private RepositoryDropAssistant getDropAssistant() {
INavigatorDnDService dndService = commonViewer.getNavigatorContentService().getDnDService();
CommonDropAdapterAssistant[] dropAssistants = dndService.findCommonDropAdapterAssistants(getSelectedViewObj(), getStructuredSelection());
for (CommonDropAdapterAssistant assistant : dropAssistants) {
if (assistant instanceof RepositoryDropAssistant) {
return (RepositoryDropAssistant) assistant;
}
}
return null;
}
Aggregations