use of org.talend.mdm.repository.ui.dialogs.ViewInputDialog2 in project tmdm-studio-se by Talend.
the class NewViewAction method doRun.
@Override
protected void doRun() {
updateParentItem();
int type = getType();
IWorkbenchPartSite site = commonViewer.getCommonNavigator().getSite();
ViewInputDialog2 vid = new ViewInputDialog2(site, getShell(), getDialogTitle(), Messages.Common_inputName, getInputValidator(), false, type);
vid.setBtnShow(true);
vid.create();
vid.getShell().setSize(new Point(500, 320));
vid.setBlockOnOpen(true);
if (vid.open() == Window.CANCEL) {
return;
}
String key = vid.getEntityName();
String filterName = vid.getFilterName();
Item item = null;
if (filterName == null) {
item = createServerObject(key);
} else {
// $NON-NLS-1$
String filterPart = "";
if (!filterName.isEmpty()) {
// $NON-NLS-1$
filterPart = "#" + filterName;
}
item = createServerObject(PREFIX_VIEW_UPPER + key + filterPart);
}
commonViewer.refresh(selectObj);
commonViewer.expandToLevel(selectObj, 1);
openEditor(item);
}
Aggregations