use of org.talend.core.repository.model.repositoryObject.TdViewRepositoryObject in project tdq-studio-se by Talend.
the class CreateColumnAnalysis method init.
@Override
public void init(ICommonActionExtensionSite site) {
if (site.getViewSite() instanceof ICommonViewerWorkbenchSite) {
StructuredSelection selection = (StructuredSelection) site.getStructuredViewer().getSelection();
Object fe = selection.getFirstElement();
if (fe instanceof IRepositoryNode) {
IRepositoryViewObject object = ((IRepositoryNode) fe).getObject();
if (object instanceof TdTableRepositoryObject) {
TdTableRepositoryObject tableObject = (TdTableRepositoryObject) object;
modelElement = tableObject.getTdTable();
} else if (object instanceof TdViewRepositoryObject) {
TdViewRepositoryObject viewObject = (TdViewRepositoryObject) object;
modelElement = viewObject.getTdView();
}
}
}
super.init(site);
}
Aggregations