use of org.talend.designer.rowgenerator.managers.UIManager in project tdi-studio-se by Talend.
the class TabFolderEditors method getItemsByRunJob.
/**
* qzhang Comment method "getItemsByRunJob".
*/
public List<List<String>> getItemsByRunJob(String number) {
List<List<String>> items = new ArrayList<List<String>>();
UIManager uiManager = generatorUI.getGeneratorManager().getUiManager();
FunParaTableView2 editor = uiManager.getGeneratorUI().getTabFolderEditors().getParameterEditor();
editor.notifyOkPressed();
items = generatorUI.getGeneratorManager().getRowGeneratorComponent().getCodeGenMain().run(refreshButton, number);
return items;
}
use of org.talend.designer.rowgenerator.managers.UIManager in project tdi-studio-se by Talend.
the class RowGeneratorDialog method cancelPressed.
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.dialogs.Dialog#cancelPressed()
*/
@Override
protected void cancelPressed() {
UIManager uiManager = rowGenMain.getRowGenManager().getUiManager();
uiManager.closeRowGenerator(SWT.CANCEL, true);
if (uiManager.getRowGenResponse() == SWT.CANCEL) {
rowGenMain.buildExternalData();
super.cancelPressed();
}
}
use of org.talend.designer.rowgenerator.managers.UIManager in project tdi-studio-se by Talend.
the class FooterComposite method createComponents.
/**
* amaumont Comment method "createComponents".
*/
private void createComponents() {
final UIManager uiManager = generatorManager.getUiManager();
GridData footerCompositeGridData = new GridData(GridData.FILL_HORIZONTAL);
this.setLayoutData(footerCompositeGridData);
FormLayout formLayout = new FormLayout();
this.setLayout(formLayout);
Button okButton = new Button(this, SWT.NONE);
//$NON-NLS-1$
okButton.setText(Messages.getString("FooterComposite.OkButton.Text"));
FormData okFormData = new FormData();
Point minSize = okButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
okFormData.width = Math.max(IDialogConstants.BUTTON_WIDTH, minSize.x);
okButton.setLayoutData(okFormData);
okButton.addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
}
public void widgetSelected(SelectionEvent e) {
FunParaTableView2 editor = uiManager.getGeneratorUI().getTabFolderEditors().getParameterEditor();
editor.notifyOkPressed();
uiManager.closeRowGenerator(SWT.OK, false);
}
});
Button cancelButton = new Button(this, SWT.NONE);
//$NON-NLS-1$
cancelButton.setText(Messages.getString("FooterComposite.CancelButton.Text"));
cancelButton.addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
}
public void widgetSelected(SelectionEvent e) {
uiManager.closeRowGenerator(SWT.CANCEL, false);
}
});
FormData cancelFormData = new FormData();
minSize = cancelButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
cancelFormData.width = Math.max(IDialogConstants.BUTTON_WIDTH, minSize.x);
cancelButton.setLayoutData(cancelFormData);
cancelFormData.right = new FormAttachment(100, -5);
okFormData.right = new FormAttachment(cancelButton, -5);
}
use of org.talend.designer.rowgenerator.managers.UIManager in project tdi-studio-se by Talend.
the class RowGeneratorDialog method okPressed.
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.dialogs.Dialog#okPressed()
*/
@Override
protected void okPressed() {
UIManager uiManager = rowGenMain.getRowGenManager().getUiManager();
FunParaTableView2 editor = uiManager.getGeneratorUI().getTabFolderEditors().getParameterEditor();
editor.notifyOkPressed();
uiManager.closeRowGenerator(SWT.OK, true);
rowGenMain.buildExternalData();
super.okPressed();
// bug 20749
String componentName = "";
IComponent iComponent = rowGenMain.getRowGenManager().getRowGeneratorComponent().getComponent();
if (iComponent != null && iComponent instanceof IComponent) {
componentName = iComponent.getName();
}
if (!"tRowGenerator".equals(componentName)) {
// see bug 7471
List<? extends IConnection> connection = rowGenMain.getRowGenManager().getRowGeneratorComponent().getOutgoingConnections();
IConnection curConnection = null;
for (IConnection conn : connection) {
IMetadataTable metadataTable = conn.getMetadataTable();
if (metadataTable != null) {
String tabName = metadataTable.getTableName();
if (tabName.equals(metadataTable.getTableName())) {
curConnection = conn;
}
}
}
if (curConnection != null) {
Set<String> addedColumns = new HashSet<String>();
changedNameColumns = rowGenMain.getGeneratorUI().getChangedNameColumns();
for (String changedColName : changedNameColumns.keySet()) {
String columnName = changedNameColumns.get(changedColName);
if (preOutputColumnSet.contains(columnName)) {
preOutputColumnSet.remove(columnName);
preOutputColumnSet.add(changedColName);
}
}
for (IMetadataColumn curColumn : metadataTable.getListColumns()) {
if (!(preOutputColumnSet.contains(curColumn.getLabel()))) {
addedColumns.add(curColumn.getLabel());
}
}
CorePlugin.getDefault().getDesignerCoreService().updateTraceColumnValues(curConnection, changedNameColumns, addedColumns);
}
}
}
use of org.talend.designer.rowgenerator.managers.UIManager in project tdi-studio-se by Talend.
the class RowGeneratorDialog method close.
@Override
public boolean close() {
UIManager uiManager = rowGenMain.getRowGenManager().getUiManager();
if (uiManager.getRowGenResponse() == SWT.NONE) {
uiManager.closeRowGenerator(SWT.CANCEL, true);
if (uiManager.getRowGenResponse() == SWT.NONE) {
return false;
}
rowGenMain.buildExternalData();
}
boolean returnValue = super.close();
return returnValue;
}
Aggregations