Compare commits
9 Commits
master
...
release/5.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e00e41f316 | ||
|
|
254895372b | ||
|
|
7f8caad2f4 | ||
|
|
f2126a53e2 | ||
|
|
4cde6cfcb0 | ||
|
|
a0f5761bb9 | ||
|
|
c61fe42ef8 | ||
|
|
e078a0e6b5 | ||
|
|
b3e6fcda1d |
@@ -24,9 +24,11 @@
|
||||
<dbType type="BIGINT" ignorePre="true" />
|
||||
<dbType type="BLOB" ignorePre="true" />
|
||||
<dbType type="BOOLEAN" ignorePre="true" />
|
||||
<dbType type="TEXT" ignorePre="true" />
|
||||
<dbType type="UUID" ignorePre="true" />
|
||||
<dbType type="TIMEUUID" ignorePre="true" />
|
||||
<dbType type="VARINT" ignorePre="true" />
|
||||
<dbType type="INT" ignorePre="true" />
|
||||
<dbType type="FLOAT" defaultLength="20" defaultPrecision="10" />
|
||||
<dbType type="DOUBLE" defaultLength="20" defaultPrecision="10" />
|
||||
<dbType type="DECIMAL" defaultLength="20" defaultPrecision="10" />
|
||||
@@ -60,7 +62,9 @@
|
||||
</talendType>
|
||||
<talendType type="id_Integer">
|
||||
<dbType type="Int32Type" default="true" />
|
||||
<dbType type="IntegerType"/>
|
||||
<dbType type="VARINT" />
|
||||
<dbType type="INT" />
|
||||
</talendType>
|
||||
<talendType type="id_Long">
|
||||
<dbType type="LongType" default="true" />
|
||||
@@ -70,7 +74,6 @@
|
||||
</talendType>
|
||||
<talendType type="id_Object">
|
||||
<dbType type="ObjectType" default="true" />
|
||||
<dbType type="IntegerType" />
|
||||
<dbType type="BLOB" />
|
||||
</talendType>
|
||||
<talendType type="id_Short" />
|
||||
@@ -80,6 +83,7 @@
|
||||
<dbType type="UUIDType" />
|
||||
<dbType type="TimeUUIDType" />
|
||||
<dbType type="ASCII" />
|
||||
<dbType type="TEXT" />
|
||||
<dbType type="UUID" />
|
||||
<dbType type="TIMEUUID" />
|
||||
</talendType>
|
||||
@@ -91,11 +95,14 @@
|
||||
<dbType type="AsciiType">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TEXT">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="UTF8Type">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="IntegerType">
|
||||
<talendType type="id_Object" default="true" />
|
||||
<talendType type="id_Integer" default="true" />
|
||||
</dbType>
|
||||
<dbType type="Int32Type">
|
||||
<talendType type="id_Integer" default="true" />
|
||||
@@ -152,6 +159,9 @@
|
||||
<dbType type="VARINT">
|
||||
<talendType type="id_Integer" default="true" />
|
||||
</dbType>
|
||||
<dbType type="INT">
|
||||
<talendType type="id_Integer" default="true" />
|
||||
</dbType>
|
||||
<dbType type="FLOAT">
|
||||
<talendType type="id_Float" default="true" />
|
||||
</dbType>
|
||||
|
||||
@@ -300,9 +300,14 @@ public class RepositoryNodeUtilities {
|
||||
|
||||
for (IRepositoryNode childNode : children) {
|
||||
RepositoryNode node = (RepositoryNode) childNode;
|
||||
if (isRepositoryFolder(node) || node.getType() == ENodeType.REFERENCED_PROJECT
|
||||
|| (hadoopClusterService != null && hadoopClusterService.isHadoopClusterNode(node))) {
|
||||
if (isRepositoryFolder(node) || node.getType() == ENodeType.REFERENCED_PROJECT) {
|
||||
folderChild.add(node);
|
||||
} else if (hadoopClusterService != null && hadoopClusterService.isHadoopClusterNode(node)) {
|
||||
if (node.getId().equals(curNode.getId()) && node.getObjectType() == curNode.getRepositoryObjectType()) {
|
||||
return node;
|
||||
} else {
|
||||
folderChild.add(node);
|
||||
}
|
||||
} else if (node.getId().equals(curNode.getId()) && node.getObjectType() == curNode.getRepositoryObjectType()) {
|
||||
return node;
|
||||
}
|
||||
|
||||
@@ -60,10 +60,10 @@ public class ContextValuesNatText extends Composite {
|
||||
|
||||
private NatTableCellEditorFactory cellFactory;
|
||||
|
||||
/**
|
||||
* Flag to determine whether the text is on focus or lost.
|
||||
*/
|
||||
private boolean focusLostActive = false;
|
||||
// /**
|
||||
// * Flag to determine whether the text is on focus or lost.
|
||||
// */
|
||||
// private boolean focusLostActive = false;
|
||||
|
||||
private List<FocusListener> focusListener = new ArrayList<FocusListener>();
|
||||
|
||||
@@ -203,24 +203,24 @@ public class ContextValuesNatText extends Composite {
|
||||
*
|
||||
* @see org.eclipse.swt.widgets.Control#removeFocusListener(org.eclipse.swt.events.FocusListener)
|
||||
*/
|
||||
@Override
|
||||
public void removeFocusListener(final FocusListener listener) {
|
||||
if (focusLostActive) {
|
||||
try {
|
||||
new Thread() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
focusListener.remove(listener);
|
||||
};
|
||||
}.join();
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else {
|
||||
focusListener.remove(listener);
|
||||
}
|
||||
}
|
||||
// @Override
|
||||
// public void removeFocusListener(final FocusListener listener) {
|
||||
// if (focusLostActive) {
|
||||
// try {
|
||||
// new Thread() {
|
||||
//
|
||||
// @Override
|
||||
// public void run() {
|
||||
// focusListener.remove(listener);
|
||||
// };
|
||||
// }.join();
|
||||
// } catch (InterruptedException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// } else {
|
||||
// focusListener.remove(listener);
|
||||
// }
|
||||
// }
|
||||
|
||||
/**
|
||||
* Transforms the subDialog's result.
|
||||
@@ -248,4 +248,22 @@ public class ContextValuesNatText extends Composite {
|
||||
result = getTransformedSelection(focusOnText);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for text.
|
||||
*
|
||||
* @return the text
|
||||
*/
|
||||
public Text getText() {
|
||||
return this.text;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for button.
|
||||
*
|
||||
* @return the button
|
||||
*/
|
||||
public Button getButton() {
|
||||
return this.button;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,14 +17,11 @@ import org.eclipse.nebula.widgets.nattable.selection.SelectionLayer.MoveDirectio
|
||||
import org.eclipse.nebula.widgets.nattable.style.IStyle;
|
||||
import org.eclipse.nebula.widgets.nattable.widget.EditModeEnum;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.FocusAdapter;
|
||||
import org.eclipse.swt.events.FocusEvent;
|
||||
import org.eclipse.swt.events.KeyAdapter;
|
||||
import org.eclipse.swt.events.KeyEvent;
|
||||
import org.eclipse.swt.graphics.Cursor;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Control;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.eclipse.swt.widgets.Text;
|
||||
import org.talend.commons.utils.PasswordEncryptUtil;
|
||||
import org.talend.core.model.process.IContextParameter;
|
||||
|
||||
@@ -78,8 +75,6 @@ public class CustomTextCellEditor extends AbstractCellEditor {
|
||||
}
|
||||
final ContextValuesNatText text = new ContextValuesNatText(parentComp, cellStyle, realPara, style);
|
||||
|
||||
text.setCursor(new Cursor(Display.getDefault(), SWT.CURSOR_IBEAM));
|
||||
|
||||
addTextListener(text);
|
||||
return text;
|
||||
|
||||
@@ -114,13 +109,13 @@ public class CustomTextCellEditor extends AbstractCellEditor {
|
||||
|
||||
});
|
||||
|
||||
text.addFocusListener(new FocusAdapter() {
|
||||
|
||||
@Override
|
||||
public void focusLost(FocusEvent e) {
|
||||
commit(MoveDirectionEnum.NONE, editMode == EditModeEnum.INLINE);
|
||||
}
|
||||
});
|
||||
// text.addFocusListener(new FocusAdapter() {
|
||||
//
|
||||
// @Override
|
||||
// public void focusLost(FocusEvent e) {
|
||||
// commit(MoveDirectionEnum.NONE, editMode == EditModeEnum.INLINE);
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -172,6 +167,12 @@ public class CustomTextCellEditor extends AbstractCellEditor {
|
||||
// use the real value.
|
||||
setCanonicalValue(this.recordOriginalCanonicalValue);
|
||||
|
||||
Text text = buttonText.getText();
|
||||
if (buttonText.getButton() == null) {
|
||||
text.forceFocus();
|
||||
}
|
||||
text.setSelection(0, text.getText().length());
|
||||
|
||||
return this.buttonText;
|
||||
}
|
||||
|
||||
|
||||
@@ -347,7 +347,7 @@ public class ExtendedContextColumnPropertyAccessor<R> implements IColumnProperty
|
||||
param.setPromptNeeded((Boolean) newValue);
|
||||
modified = true;
|
||||
} else if (property.equals(ContextTableConstants.COLUMN_PROMPT_PROPERTY)) {
|
||||
if (param.getPrompt().equals(newValue)) {
|
||||
if (param.getPrompt() != null && param.getPrompt().equals(newValue)) {
|
||||
return;
|
||||
}
|
||||
oldValue = param.getPrompt();
|
||||
@@ -358,10 +358,10 @@ public class ExtendedContextColumnPropertyAccessor<R> implements IColumnProperty
|
||||
return;
|
||||
}
|
||||
oldValue = param.getValue();
|
||||
if (newValue != null) {
|
||||
param.setValue((String) newValue);
|
||||
modified = true;
|
||||
}
|
||||
// if (newValue != null) {
|
||||
param.setValue(newValue == null ? "" : (String) newValue);
|
||||
modified = true;
|
||||
// }
|
||||
}
|
||||
if (modified) {
|
||||
updateRelation();
|
||||
|
||||
@@ -23,6 +23,7 @@ import org.eclipse.nebula.widgets.nattable.edit.editor.ComboBoxCellEditor;
|
||||
import org.eclipse.nebula.widgets.nattable.edit.editor.ICellEditor;
|
||||
import org.eclipse.nebula.widgets.nattable.extension.glazedlists.GlazedListsDataProvider;
|
||||
import org.eclipse.nebula.widgets.nattable.group.ColumnGroupModel;
|
||||
import org.eclipse.nebula.widgets.nattable.selection.SelectionLayer.MoveDirectionEnum;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Control;
|
||||
import org.talend.core.model.process.IContextManager;
|
||||
@@ -144,4 +145,19 @@ public class ProxyDynamicCellEditor extends AbstractCellEditor {
|
||||
return null;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.nebula.widgets.nattable.edit.editor.AbstractCellEditor#commit(org.eclipse.nebula.widgets.nattable
|
||||
* .selection.SelectionLayer.MoveDirectionEnum, boolean, boolean)
|
||||
*/
|
||||
@Override
|
||||
public boolean commit(MoveDirectionEnum direction, boolean closeAfterCommit, boolean skipValidation) {
|
||||
if (dynamicEditor != null) {
|
||||
return dynamicEditor.commit(direction, closeAfterCommit, skipValidation);
|
||||
}
|
||||
return super.commit(direction, closeAfterCommit, skipValidation);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -506,8 +506,9 @@ public class SchemaCellEditor extends DialogCellEditor {
|
||||
if (tableToEdit != null) {
|
||||
if (isHL7OutputNode(node) && node.getIncomingConnections().size() > 0) {
|
||||
copyHL7OutputMetadata(node, tableToEdit);
|
||||
} else if (isSAPNode(node) && type.toString().equals(TABLE) && node.getIncomingConnections().size() > 0
|
||||
&& hasParentRow && (parent_row != null && !parent_row.equals("") && !(parent_row instanceof Integer))) {
|
||||
} else if (isSAPNode(node) && type != null && type.toString().equals(TABLE)
|
||||
&& node.getIncomingConnections().size() > 0 && hasParentRow
|
||||
&& (parent_row != null && !parent_row.equals("") && !(parent_row instanceof Integer))) {
|
||||
copySAPOutputMetadata(node, tableToEdit);
|
||||
} else {
|
||||
MetadataDialog dialog = new MetadataDialog(cellEditorWindow.getShell(), tableToEdit.clone(), node, null);
|
||||
|
||||
@@ -106,6 +106,8 @@ public class ProcessorUtilities {
|
||||
|
||||
private static Map<String, Integer> lastGeneratedWithStatsOrTrace = new HashMap<String, Integer>();
|
||||
|
||||
private static Date exportTimeStamp;// time stamp create when exporting a job and reset when export ends.
|
||||
|
||||
private static final int GENERATED_WITH_STATS = 1;
|
||||
|
||||
private static final int GENERATED_WITH_TRACES = 2;
|
||||
@@ -145,6 +147,11 @@ public class ProcessorUtilities {
|
||||
codeLocation = exportCodeLocation;
|
||||
libraryPath = exportLibraryPath;
|
||||
exportConfig = true;
|
||||
exportTimeStamp = new Date();
|
||||
}
|
||||
|
||||
public static Date getExportTimestamp() {
|
||||
return exportTimeStamp;
|
||||
}
|
||||
|
||||
public static boolean isExportConfig() {
|
||||
@@ -156,6 +163,7 @@ public class ProcessorUtilities {
|
||||
codeLocation = null;
|
||||
libraryPath = null;
|
||||
exportConfig = false;
|
||||
exportTimeStamp = null;
|
||||
}
|
||||
|
||||
public static String getInterpreter() {
|
||||
|
||||
@@ -440,7 +440,7 @@ public class TreeUtil {
|
||||
|
||||
public static List<FOXTreeNode> getFoxTreeNodes(String filePath) {
|
||||
List<FOXTreeNode> list = new ArrayList<FOXTreeNode>();
|
||||
if (filePath == null) {
|
||||
if (filePath == null || filePath.length() <= 0) {
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
@@ -631,8 +631,8 @@ public class DBConnectionFillerImpl extends MetadataFillerImpl<DatabaseConnectio
|
||||
filterList.addAll(postFillCatalog(metaConnection, catalogList, filterList,
|
||||
TalendCWMService.getReadableName(dbConn, catalogName), dbConn));
|
||||
List<Catalog> newCatalogList = new ArrayList<Catalog>();
|
||||
List<Schema> schemaList = new ArrayList<Schema>();
|
||||
for (Catalog catalog : catalogList) {
|
||||
List<Schema> schemaList = new ArrayList<Schema>();
|
||||
try {
|
||||
schemaList = fillSchemaToCatalog(dbConn, dbJDBCMetadata, catalog, filterList);
|
||||
if (!schemaList.isEmpty() && schemaList.size() > 0) {
|
||||
@@ -642,9 +642,83 @@ public class DBConnectionFillerImpl extends MetadataFillerImpl<DatabaseConnectio
|
||||
log.info(e);
|
||||
}
|
||||
newCatalogList.add(catalog);
|
||||
// ConnectionHelper.addCatalog(catalog, dbConn);
|
||||
}
|
||||
ConnectionHelper.addCatalogs(newCatalogList, dbConn);
|
||||
|
||||
Set<MetadataTable> tableSet = ConnectionHelper.getTables(dbConn);
|
||||
// replaceCatalogs is use for record tables when click finish, then set to current connection.
|
||||
List<Catalog> replaceCatalogs = new ArrayList<Catalog>();
|
||||
List<String> catalogNames = new ArrayList<String>();
|
||||
for (MetadataTable table : tableSet) {
|
||||
EObject eContainer = table.eContainer();
|
||||
if (eContainer != null) {
|
||||
if (eContainer instanceof Catalog) {
|
||||
Catalog c = (Catalog) eContainer;
|
||||
String name = c.getName();
|
||||
if (!catalogNames.contains(name)) {
|
||||
replaceCatalogs.add(c);
|
||||
catalogNames.add(name);
|
||||
}
|
||||
} else if (eContainer instanceof Schema) {
|
||||
EObject parent = eContainer.eContainer();
|
||||
if (parent != null && parent instanceof Catalog) {
|
||||
Catalog c = (Catalog) parent;
|
||||
String name = c.getName();
|
||||
if (!catalogNames.contains(name)) {
|
||||
List<Schema> filterSchemas = new ArrayList<Schema>();
|
||||
List<String> schemaName = new ArrayList<String>();
|
||||
List<Schema> schemas = CatalogHelper.getSchemas(c);
|
||||
for (Schema schema : schemas) {
|
||||
if (filterList != null) {
|
||||
if (filterList.contains(schema.getName())) {
|
||||
filterSchemas.add(schema);
|
||||
schemaName.add(schema.getName());
|
||||
} else if (schema.getOwnedElement() != null && !schema.getOwnedElement().isEmpty()) {
|
||||
filterSchemas.add(schema);
|
||||
schemaName.add(schema.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
// get schema in current connection
|
||||
for (Catalog catalog : catalogList) {
|
||||
if (catalog.getName().equals(name)) {
|
||||
boolean added = false;
|
||||
for (Schema schema : CatalogHelper.getSchemas(catalog)) {
|
||||
if (!schemaName.contains(schema.getName())) {
|
||||
filterSchemas.add(schema);
|
||||
added = true;
|
||||
}
|
||||
}
|
||||
if (added) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
c.getOwnedElement().clear();
|
||||
CatalogHelper.addSchemas(filterSchemas, c);
|
||||
replaceCatalogs.add(c);
|
||||
catalogNames.add(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.isLinked() && !catalogList.isEmpty()) {
|
||||
ConnectionHelper.addCatalogs(catalogList, dbConn);
|
||||
}
|
||||
// if have same schema in current connection,need to fill tables.
|
||||
for (Catalog catalog : replaceCatalogs) {
|
||||
List<Catalog> list = new ArrayList<Catalog>();
|
||||
String name = catalog.getName();
|
||||
Catalog c = (Catalog) ConnectionHelper.getPackage(name, dbConn, Catalog.class);
|
||||
if (c != null) {
|
||||
list.add(c);
|
||||
ConnectionHelper.removeCatalogs(list, dbConn);
|
||||
ConnectionHelper.addCatalog(catalog, dbConn);
|
||||
} else {
|
||||
ConnectionHelper.addCatalog(catalog, dbConn);
|
||||
}
|
||||
}
|
||||
}
|
||||
return catalogList;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user