Compare commits
350 Commits
release/8.
...
jzhang/80/
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d5869ff204 | ||
|
|
7ed11666dd | ||
|
|
441a27dbbd | ||
|
|
24c7e20234 | ||
|
|
394d74ff56 | ||
|
|
1bc51409c4 | ||
|
|
c319fa2b6e | ||
|
|
0075eeedb1 | ||
|
|
21955ee445 | ||
|
|
fe81245083 | ||
|
|
94bfffa01d | ||
|
|
0162ddf86f | ||
|
|
4be615ad4c | ||
|
|
77ee619152 | ||
|
|
feb8e81628 | ||
|
|
472b999612 | ||
|
|
f924a19f7d | ||
|
|
8ca4df75ea | ||
|
|
9e04aa1fd4 | ||
|
|
ed7375ea82 | ||
|
|
5ce7b0d702 | ||
|
|
127573adc5 | ||
|
|
96abfedf4c | ||
|
|
b19d7c550d | ||
|
|
6eec1e24d1 | ||
|
|
7a5fb399ec | ||
|
|
f7bebc1efe | ||
|
|
4e50edcff1 | ||
|
|
4cf6b6277f | ||
|
|
f964d20a63 | ||
|
|
8225e6fa05 | ||
|
|
9e918597a3 | ||
|
|
825a4634d5 | ||
|
|
e0b36d539d | ||
|
|
2f7fcb839c | ||
|
|
4810bd8cda | ||
|
|
b2173b2707 | ||
|
|
30643242a4 | ||
|
|
eea308c852 | ||
|
|
482dab62dc | ||
|
|
e9fb0a7d70 | ||
|
|
962800e16b | ||
|
|
c605b5cf6e | ||
|
|
50facdd03d | ||
|
|
0d3ad601ab | ||
|
|
4851f670d6 | ||
|
|
afc3c0c57e | ||
|
|
5cc4ddbcf2 | ||
|
|
646c80fec6 | ||
|
|
7f5e7c70b3 | ||
|
|
3a196a0095 | ||
|
|
b571bef976 | ||
|
|
67ef82fede | ||
|
|
9adc6b7634 | ||
|
|
214f47d0d1 | ||
|
|
835f89e891 | ||
|
|
4bdc3703c3 | ||
|
|
ebfa988a4f | ||
|
|
2019954122 | ||
|
|
7c75d23ae8 | ||
|
|
6d12874f4d | ||
|
|
24ea68ce97 | ||
|
|
5aabff0e3d | ||
|
|
6172fe622c | ||
|
|
4b678206df | ||
|
|
d3c9eff9c5 | ||
|
|
b91ac54c40 | ||
|
|
ff3cee4aab | ||
|
|
7798616c46 | ||
|
|
63f2485928 | ||
|
|
b34075c36a | ||
|
|
2d59042cfe | ||
|
|
60022731f3 | ||
|
|
501e024c54 | ||
|
|
accb4dc40c | ||
|
|
8b0dafab1d | ||
|
|
b557195264 | ||
|
|
9ff1bdb734 | ||
|
|
3dc2d267d2 | ||
|
|
c2ed2d30d3 | ||
|
|
6cc1fa47aa | ||
|
|
5b0fd33df5 | ||
|
|
74d2ba6332 | ||
|
|
e680a31762 | ||
|
|
6a2da84be3 | ||
|
|
affaf0e4bc | ||
|
|
0edc21cac3 | ||
|
|
1d27501e60 | ||
|
|
d1af724543 | ||
|
|
491bb9652c | ||
|
|
48fbc6588b | ||
|
|
659a089bef | ||
|
|
312299fc2d | ||
|
|
76c1b6f942 | ||
|
|
3c29998973 | ||
|
|
9af6a950ba | ||
|
|
46f5337dca | ||
|
|
33a207ceaa | ||
|
|
26ab3f97a4 | ||
|
|
f6ea29ec76 | ||
|
|
51a436b552 | ||
|
|
0ab9b617f5 | ||
|
|
51f3e07528 | ||
|
|
1af34cb93f | ||
|
|
d575088589 | ||
|
|
cbd9486931 | ||
|
|
c2511328fd | ||
|
|
5c629d27b8 | ||
|
|
b63ff6f17f | ||
|
|
e6d3e2b37a | ||
|
|
d5716b9d63 | ||
|
|
aa3e090f18 | ||
|
|
6e31236ae2 | ||
|
|
ae5f950a78 | ||
|
|
23b5df5c4f | ||
|
|
98ee4f4ba1 | ||
|
|
ffc70af105 | ||
|
|
5e59f89dea | ||
|
|
0e697d0ef6 | ||
|
|
9a2e7c2381 | ||
|
|
8b4f177efc | ||
|
|
4ff907bf75 | ||
|
|
abfd3b7c1b | ||
|
|
4ef6f6a95e | ||
|
|
0ae7943cf2 | ||
|
|
a2ce928d6a | ||
|
|
85f2664512 | ||
|
|
452ef9896a | ||
|
|
81da114430 | ||
|
|
8b34d91c2a | ||
|
|
14673efa17 | ||
|
|
efd8c964b8 | ||
|
|
fc0aa30340 | ||
|
|
3c056baeb7 | ||
|
|
e0d5352efa | ||
|
|
440effae2d | ||
|
|
0e399e778f | ||
|
|
5e798295ea | ||
|
|
177287eebf | ||
|
|
c4ee889b3e | ||
|
|
26ead1e043 | ||
|
|
5553ce8694 | ||
|
|
caa99b5658 | ||
|
|
057580aa9e | ||
|
|
d66aa2af38 | ||
|
|
95f7b845b3 | ||
|
|
21d1ea7f84 | ||
|
|
d3a6096bc0 | ||
|
|
5705ca4789 | ||
|
|
4a7a831c77 | ||
|
|
e169b49a01 | ||
|
|
d302023eea | ||
|
|
2256de6b73 | ||
|
|
c2162b4074 | ||
|
|
2ee30fecd0 | ||
|
|
340a06876c | ||
|
|
f3c39d14d5 | ||
|
|
9c2e26bcab | ||
|
|
65e7cfb71e | ||
|
|
b338afee4c | ||
|
|
87d7a849ac | ||
|
|
73a2ac7971 | ||
|
|
e22dfb1215 | ||
|
|
9781e2fe08 | ||
|
|
60cc7742ad | ||
|
|
5369ee2142 | ||
|
|
4406d35a69 | ||
|
|
33d797e16c | ||
|
|
c282d32a80 | ||
|
|
543c5a29f8 | ||
|
|
f91f791c24 | ||
|
|
be96adb142 | ||
|
|
33d1276627 | ||
|
|
f6d544c5e3 | ||
|
|
2b8777269d | ||
|
|
fb360093a8 | ||
|
|
38fdc62738 | ||
|
|
8f1cc68be3 | ||
|
|
f34bb8520c | ||
|
|
888c3281f6 | ||
|
|
db614cc415 | ||
|
|
5210b033d0 | ||
|
|
e91b347450 | ||
|
|
ea459b8710 | ||
|
|
2ee58ac9d0 | ||
|
|
0e668b3239 | ||
|
|
1fe8bec5cf | ||
|
|
74d5eb4d90 | ||
|
|
12a842a565 | ||
|
|
9419f94c07 | ||
|
|
0beef6b531 | ||
|
|
d19f0dbce7 | ||
|
|
6ff18c0449 | ||
|
|
4c93a1bed0 | ||
|
|
2462a7a792 | ||
|
|
e18ffe5f0f | ||
|
|
b22b9decce | ||
|
|
9a3307bace | ||
|
|
dd5400af61 | ||
|
|
505609aa4b | ||
|
|
99da8e2286 | ||
|
|
239ece2966 | ||
|
|
ce4740ce83 | ||
|
|
7c795f724c | ||
|
|
67784188df | ||
|
|
248a7d74dc | ||
|
|
c09c406c32 | ||
|
|
bd5b8b0f51 | ||
|
|
eb7c195d3e | ||
|
|
33162c8be4 | ||
|
|
7169a3101a | ||
|
|
192e47b6a3 | ||
|
|
28eda4c880 | ||
|
|
309c2ac056 | ||
|
|
64c530b6b4 | ||
|
|
71f93b5165 | ||
|
|
41b50e16c1 | ||
|
|
b7711e1dd5 | ||
|
|
8ed759c0d8 | ||
|
|
3ff40da876 | ||
|
|
da6a983f29 | ||
|
|
2913c80aef | ||
|
|
fa2abaf8f3 | ||
|
|
81e63ecab0 | ||
|
|
3b647c2316 | ||
|
|
4ff0184a49 | ||
|
|
0e37b9632e | ||
|
|
f2a4328037 | ||
|
|
771a1bf810 | ||
|
|
3f7d1a83d9 | ||
|
|
c20078c3d1 | ||
|
|
d13ae7e637 | ||
|
|
6b094dd4fd | ||
|
|
1ebdb18d27 | ||
|
|
98930c8c96 | ||
|
|
a7ab220672 | ||
|
|
553b2770c9 | ||
|
|
dd851d3202 | ||
|
|
f47f991977 | ||
|
|
a2e44cb5c2 | ||
|
|
e36f0690f0 | ||
|
|
9c4a9c1589 | ||
|
|
da4ba3f1a0 | ||
|
|
087dac391d | ||
|
|
ab843f7a55 | ||
|
|
5949ce647d | ||
|
|
f9e7be104e | ||
|
|
774e6dea26 | ||
|
|
3eccad0352 | ||
|
|
ada4bcf7e3 | ||
|
|
7c72d190de | ||
|
|
025cec4828 | ||
|
|
91df21afcd | ||
|
|
a3af2de13a | ||
|
|
5c6fd374f1 | ||
|
|
c11aa42cee | ||
|
|
5506094ec3 | ||
|
|
a0a7b7cc52 | ||
|
|
0a7eb0653f | ||
|
|
baabcf9167 | ||
|
|
d24160aaf7 | ||
|
|
ff42b63947 | ||
|
|
bc536f772e | ||
|
|
6e88e334a3 | ||
|
|
5b86f87d99 | ||
|
|
11ff6ac63d | ||
|
|
a4679a906a | ||
|
|
a4a0bc0649 | ||
|
|
0709202ae3 | ||
|
|
899c5a03f6 | ||
|
|
5e1bca282f | ||
|
|
61a8ed2b73 | ||
|
|
ab88eda019 | ||
|
|
c4942af4b0 | ||
|
|
80ccccb407 | ||
|
|
4063e6888b | ||
|
|
54d1a85c1f | ||
|
|
a2c23dd110 | ||
|
|
9e56acd4e5 | ||
|
|
a9f5e42f6d | ||
|
|
e4250d1120 | ||
|
|
7225c51654 | ||
|
|
11bf826613 | ||
|
|
2039df6058 | ||
|
|
59147d2bf3 | ||
|
|
a272ce7fe3 | ||
|
|
d32d4c1c2c | ||
|
|
51ca13e2ee | ||
|
|
3d697f472c | ||
|
|
0dcd60f44b | ||
|
|
8f59c857d8 | ||
|
|
442631c61b | ||
|
|
31303fa608 | ||
|
|
fea26cbefa | ||
|
|
21254ffaca | ||
|
|
caa4b51cc4 | ||
|
|
b2fdccc3e7 | ||
|
|
da208c72f6 | ||
|
|
bd6a271805 | ||
|
|
cd5af34395 | ||
|
|
ba71689fac | ||
|
|
f6a123ad2b | ||
|
|
14d9caec2e | ||
|
|
96f177cb95 | ||
|
|
4a34141e6f | ||
|
|
9bf06c26bb | ||
|
|
51010064c7 | ||
|
|
d0a5c76459 | ||
|
|
4b308e1d34 | ||
|
|
b39332b706 | ||
|
|
556ab359d9 | ||
|
|
55f8537c15 | ||
|
|
98f0a248dc | ||
|
|
360c36b6bb | ||
|
|
c5e48b7e97 | ||
|
|
8b3040a4f6 | ||
|
|
fac09dcc63 | ||
|
|
f97757fa8e | ||
|
|
3a557a7658 | ||
|
|
00a777d477 | ||
|
|
eb661b81c5 | ||
|
|
557afc2b02 | ||
|
|
965a4d5a3b | ||
|
|
bde2e73cfa | ||
|
|
421dde4b8e | ||
|
|
037502c43c | ||
|
|
12345b5216 | ||
|
|
850a8cbdf6 | ||
|
|
fe6ed85b34 | ||
|
|
46a2aac8c1 | ||
|
|
424266a771 | ||
|
|
d2751b3e59 | ||
|
|
90aeb07148 | ||
|
|
ef76386e26 | ||
|
|
a76d9081dc | ||
|
|
6d10555da1 | ||
|
|
6aec89ed62 | ||
|
|
4d5c0aba06 | ||
|
|
156a67b79a | ||
|
|
0de0c82b35 | ||
|
|
83d720a6df | ||
|
|
bba3a2a7ff | ||
|
|
33e9a9bf7c | ||
|
|
865d4317ea | ||
|
|
8949a8291a | ||
|
|
620a43e169 | ||
|
|
6143714a75 | ||
|
|
613ec4e1ae | ||
|
|
c2f33ca3c7 | ||
|
|
ee7e8a0a32 |
41
main/features/org.talend.m2e.feature/feature_ja.properties
Normal file
41
main/features/org.talend.m2e.feature/feature_ja.properties
Normal file
File diff suppressed because one or more lines are too long
@@ -5,7 +5,6 @@
|
||||
<copyright url="http://www.example.com/copyright">[Enter Copyright Description here.]</copyright>
|
||||
<license url="http://www.example.com/license">[Enter License Description here.]</license>
|
||||
<requires>
|
||||
<import plugin="org.bouncycastle.bcprov" version="1.70.0" match="greaterOrEqual"/>
|
||||
<import plugin="com.cedarsoftware.json-io" version="0.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="com.fasterxml.jackson.core.jackson-annotations" version="2.9.0" match="greaterOrEqual"/>
|
||||
<import plugin="com.fasterxml.jackson.core.jackson-core" version="2.9.8" match="greaterOrEqual"/>
|
||||
@@ -17,7 +16,7 @@
|
||||
<import plugin="org.apache.commons.lang" version="0.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.apache.commons.lang3" version="0.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.apache.log4j" version="0.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.apache.servicemix.bundles.avro" version="0.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="avro" version="0.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.junit" version="4.13.2" match="greaterOrEqual"/>
|
||||
<import plugin="org.slf4j.api" version="0.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.slf4j.binding.log4j12" version="0.0.0" match="greaterOrEqual"/>
|
||||
|
||||
@@ -9,4 +9,7 @@
|
||||
</parent>
|
||||
<artifactId>org.talend.utils.feature</artifactId>
|
||||
<packaging>eclipse-feature</packaging>
|
||||
<properties>
|
||||
<tycho.buildtimestamp.format>${timestamp}</tycho.buildtimestamp.format>
|
||||
</properties>
|
||||
</project>
|
||||
|
||||
@@ -4,4 +4,6 @@ bin.includes = META-INF/,\
|
||||
plugin.xml,\
|
||||
icons/,\
|
||||
icons1/,\
|
||||
.
|
||||
.,\
|
||||
resources/
|
||||
|
||||
|
||||
BIN
main/plugins/org.talend.common.ui.runtime/icons/moreInfo.png
Normal file
BIN
main/plugins/org.talend.common.ui.runtime/icons/moreInfo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 288 B |
BIN
main/plugins/org.talend.common.ui.runtime/icons/wrap.png
Normal file
BIN
main/plugins/org.talend.common.ui.runtime/icons/wrap.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 229 B |
Binary file not shown.
|
After Width: | Height: | Size: 627 B |
@@ -1,5 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?eclipse version="3.4"?>
|
||||
<plugin>
|
||||
|
||||
<extension
|
||||
point="org.eclipse.e4.ui.css.swt.theme">
|
||||
<stylesheet
|
||||
uri="resources/theme/light_preferencestyle.css">
|
||||
<themeid
|
||||
refid="org.talend.themes.css.talend.default"></themeid>
|
||||
</stylesheet>
|
||||
<stylesheet
|
||||
uri="resources/theme/dark_preferencestyle.css">
|
||||
<themeid
|
||||
refid="org.eclipse.e4.ui.css.theme.e4_dark"></themeid>
|
||||
</stylesheet>
|
||||
</extension>
|
||||
</plugin>
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
/* ############################## Eclipse UI properties ############################## */
|
||||
|
||||
IEclipsePreferences#org-talend-common-ui-runtime:org-talend-common-ui-runtime { /* pseudo attribute added to allow contributions without replacing this node, see Bug 466075 */
|
||||
preferences:
|
||||
'table.background=#org-eclipse-ui-workbench-DARK_BACKGROUND'
|
||||
'table.foreground=#org-eclipse-ui-workbench-DARK_FOREGROUND'
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
/* ############################## Eclipse UI properties ############################## */
|
||||
|
||||
|
||||
IEclipsePreferences#org-talend-common-ui-runtime:org-talend-common-ui-runtime { /* pseudo attribute added to allow contributions without replacing this node, see Bug 466075 */
|
||||
preferences:
|
||||
'table.background=COLOR-LIST-BACKGROUND'
|
||||
'table.foreground=COLOR_LIST_FOREGROUND'
|
||||
}
|
||||
@@ -12,14 +12,22 @@
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.runtime;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.graphics.RGB;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
|
||||
/**
|
||||
* DOC cmeng class global comment. Detailled comment
|
||||
*/
|
||||
public interface ColorConstants {
|
||||
|
||||
static final String BUNDLE_ID_COMMON_UI_RUNTIME = "org.talend.common.ui.runtime";
|
||||
|
||||
static final String KEY_TABLE_BACKGROUND = "table.background";
|
||||
|
||||
static final String KEY_TABLE_FOREGROUND = "table.foreground";
|
||||
|
||||
static final Color WHITE_COLOR = new Color(null, 255, 255, 255);
|
||||
|
||||
static final Color GREY_COLOR = new Color(null, 215, 215, 215);
|
||||
@@ -29,6 +37,8 @@ public interface ColorConstants {
|
||||
static final Color YELLOW_COLOR = new Color(null, 255, 173, 37);// 254, 182, 84
|
||||
|
||||
static final Color RED_COLOR = new Color(null, new RGB(204, 87, 89));// 255
|
||||
|
||||
static final Color ERROR_FONT_COLOR = new Color(null, new RGB(255, 0, 0));// 255
|
||||
|
||||
static final Color VERTICAL_SEPERATOR_LINE_COLOR = new Color(null, 162, 179, 195);
|
||||
|
||||
@@ -45,4 +55,19 @@ public interface ColorConstants {
|
||||
|
||||
static final Color SUCCEED_COLOR = new Color(null, 221, 242, 217);
|
||||
|
||||
static Color getTableBackgroundColor() {
|
||||
return ITalendThemeService.getColor(ColorConstants.BUNDLE_ID_COMMON_UI_RUNTIME, ColorConstants.KEY_TABLE_BACKGROUND)
|
||||
.orElse(Display.getDefault().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
|
||||
}
|
||||
|
||||
static Color getTableForegroundColor() {
|
||||
return ITalendThemeService.getColor(ColorConstants.BUNDLE_ID_COMMON_UI_RUNTIME, ColorConstants.KEY_TABLE_FOREGROUND)
|
||||
.orElse(Display.getDefault().getSystemColor(SWT.COLOR_LIST_FOREGROUND));
|
||||
}
|
||||
|
||||
static Color getTableReadOnlyForegroundColor() {
|
||||
return ITalendThemeService.getColor("CONTEXT_TABLE_READONLY_FOREGROUND")
|
||||
.orElse(Display.getDefault().getSystemColor(SWT.COLOR_WIDGET_DARK_SHADOW));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -23,6 +23,8 @@ import org.talend.commons.ui.runtime.exception.ExceptionServiceImpl;
|
||||
|
||||
public class CommonUIPlugin implements BundleActivator {
|
||||
|
||||
public static String BUNDLE_ID = "org.talend.common.ui.runtime";
|
||||
|
||||
private static Boolean fullyHeadless = null;
|
||||
|
||||
/*
|
||||
|
||||
@@ -0,0 +1,154 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.runtime;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
import org.eclipse.jface.util.IPropertyChangeListener;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.osgi.framework.BundleContext;
|
||||
import org.osgi.framework.FrameworkUtil;
|
||||
import org.osgi.framework.ServiceReference;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
|
||||
/**
|
||||
* DOC cmeng class global comment. Detailled comment
|
||||
*/
|
||||
public interface ITalendThemeService {
|
||||
|
||||
public static String DEFAULT_PREFERENCE_ID = "org.eclipse.ui.workbench";
|
||||
|
||||
public static String THEME_PREFERENCE_ID = "org.eclipse.e4.ui.css.swt.theme";
|
||||
|
||||
/**
|
||||
* Get color from instance scope preference of default bundleId, which managed by theme; the standard way eclipse
|
||||
* uses
|
||||
*
|
||||
* @param prop
|
||||
* @return the Color, <font color="red">please <b>DON'T</b> dispose it, it is managed by JFaceResources</font>
|
||||
*/
|
||||
static Optional<Color> getColor(String prop) {
|
||||
return getColor(DEFAULT_PREFERENCE_ID, prop);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get color from instance scope preference of bundleId, which managed by theme; the standard way eclipse uses
|
||||
*
|
||||
* @param bundleId the instance scope preference which stores the prop
|
||||
* @param prop
|
||||
* @return the Color, <font color="red">please <b>DON'T</b> dispose it, it is managed by JFaceResources</font>
|
||||
*/
|
||||
static Optional<Color> getColor(String bundleId, String prop) {
|
||||
ITalendThemeService theme = get();
|
||||
if (theme != null) {
|
||||
return Optional.ofNullable(theme.getColorForTheme(bundleId, prop));
|
||||
}
|
||||
return Optional.ofNullable(null);
|
||||
}
|
||||
|
||||
Color getColorForTheme(String bundleId, String prop);
|
||||
|
||||
/**
|
||||
* Get property from instance scope preference of default bundleId, which managed by theme; the standard way eclipse
|
||||
* uses
|
||||
*
|
||||
* @param key
|
||||
* @return
|
||||
*/
|
||||
static Optional<String> getProperty(String key) {
|
||||
return getProperty(DEFAULT_PREFERENCE_ID, key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get property from instance scope preference of bundleId, which managed by theme; the standard way eclipse uses
|
||||
*
|
||||
* @param bundleId the instance scope preference which stores the key
|
||||
* @param key
|
||||
* @return
|
||||
*/
|
||||
static Optional<String> getProperty(String bundleId, String key) {
|
||||
ITalendThemeService theme = get();
|
||||
String value = null;
|
||||
if (theme != null) {
|
||||
value = theme.getPropertyForTheme(bundleId, key);
|
||||
}
|
||||
if (StringUtils.isBlank(value)) {
|
||||
return Optional.ofNullable(null);
|
||||
} else {
|
||||
return Optional.ofNullable(value);
|
||||
}
|
||||
}
|
||||
|
||||
String getPropertyForTheme(String bundleId, String key);
|
||||
|
||||
static void addPropertyChangeListener(IPropertyChangeListener listener) {
|
||||
ITalendThemeService theme = get();
|
||||
if (theme != null) {
|
||||
theme.addPropertyChangeListenerFor(DEFAULT_PREFERENCE_ID, listener);
|
||||
}
|
||||
}
|
||||
|
||||
static void addPropertyChangeListener(String bundleId, IPropertyChangeListener listener) {
|
||||
ITalendThemeService theme = get();
|
||||
if (theme != null) {
|
||||
theme.addPropertyChangeListenerFor(bundleId, listener);
|
||||
}
|
||||
}
|
||||
|
||||
void addPropertyChangeListenerFor(String bundleId, IPropertyChangeListener listener);
|
||||
|
||||
static boolean containsPropertyChangeListener(String bundleId, IPropertyChangeListener listener) {
|
||||
ITalendThemeService theme = get();
|
||||
if (theme != null) {
|
||||
return theme.containsPropertyChangeListenerFor(bundleId, listener);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean containsPropertyChangeListenerFor(String bundleId, IPropertyChangeListener listener);
|
||||
|
||||
static void removePropertyChangeListener(IPropertyChangeListener listener) {
|
||||
ITalendThemeService theme = get();
|
||||
if (theme != null) {
|
||||
theme.removePropertyChangeListenerFor(DEFAULT_PREFERENCE_ID, listener);
|
||||
}
|
||||
}
|
||||
|
||||
static void removePropertyChangeListener(String bundleId, IPropertyChangeListener listener) {
|
||||
ITalendThemeService theme = get();
|
||||
if (theme != null) {
|
||||
theme.removePropertyChangeListenerFor(bundleId, listener);
|
||||
}
|
||||
}
|
||||
|
||||
void removePropertyChangeListenerFor(String bundleId, IPropertyChangeListener listener);
|
||||
|
||||
IPreferenceStore getThemePreferenceStore();
|
||||
|
||||
static ITalendThemeService get() {
|
||||
try {
|
||||
BundleContext bc = FrameworkUtil.getBundle(ITalendThemeService.class).getBundleContext();
|
||||
ServiceReference<ITalendThemeService> serviceReference = bc.getServiceReference(ITalendThemeService.class);
|
||||
if (serviceReference == null) {
|
||||
return null;
|
||||
}
|
||||
return bc.getService(serviceReference);
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -40,6 +40,8 @@ public class ExceptionMessageDialog extends MessageDialog {
|
||||
private String exceptionString = null;
|
||||
|
||||
private int[] diabledButtonIndex = new int[] {};
|
||||
|
||||
private boolean expandedOnOpen = false;
|
||||
|
||||
public ExceptionMessageDialog(Shell parentShell, String dialogTitle, Image dialogTitleImage, String dialogMessage,
|
||||
int dialogImageType, String[] dialogButtonLabels, int defaultIndex, Throwable ex) {
|
||||
@@ -85,6 +87,8 @@ public class ExceptionMessageDialog extends MessageDialog {
|
||||
text.setText(exceptionString);
|
||||
text.setEditable(false);
|
||||
errorComposite.setClient(text);
|
||||
|
||||
errorComposite.setExpanded(expandedOnOpen);
|
||||
|
||||
return errorComposite;
|
||||
}
|
||||
@@ -150,6 +154,22 @@ public class ExceptionMessageDialog extends MessageDialog {
|
||||
this.exceptionString = exceptionString;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return the expandedOnOpen
|
||||
*/
|
||||
public boolean isExpandedOnOpen() {
|
||||
return expandedOnOpen;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param expandedOnOpen the expandedOnOpen to set
|
||||
*/
|
||||
public void setExpandedOnOpen(boolean expandedOnOpen) {
|
||||
this.expandedOnOpen = expandedOnOpen;
|
||||
}
|
||||
|
||||
public void setDisabledButtons(int[] index) {
|
||||
this.diabledButtonIndex = index;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ ColorStyledText.SelectAllItem.Text=\u3059\u3079\u3066\u9078\u629E
|
||||
ContentProposalAdapterExtended.close=\u9589\u3058\u308B
|
||||
ContentProposalAdapterExtended.closeFocusout=\u30D5\u30A9\u30FC\u30AB\u30B9\u30A2\u30A6\u30C8\u3092\u9589\u3058\u308B
|
||||
ControlUtils.Unsupported1=\u3053\u306E\u30B3\u30F3\u30C8\u30ED\u30FC\u30EB({0})\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u5FC5\u8981\u3067\u3042\u308C\u3070\u3001\u30B1\u30FC\u30B9\u3092\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044...
|
||||
CopyPushButton.CopyButton.Tip=\u9078\u629E\u3057\u305F\u30A2\u30A4\u30C6\u30E0\u3092\u30B3\u30D4\u30FC
|
||||
CopyPushButton.CopyButton.Tip=\u9078\u629E\u9805\u76EE\u3092\u30B3\u30D4\u30FC
|
||||
Curve2D.MaxNum.Be0=maximumSegments\u306F\u6B63\u6570\u304B0\u306B\u3057\u3066\u304F\u3060\u3055\u3044
|
||||
Curve2D.MinNum.Be0=minimumSegments\u306F\u6B63\u6570\u307E\u305F\u306F0\u306B\u3057\u3066\u304F\u3060\u3055\u3044
|
||||
DateDialog.textContent=\u65E5\u6642\u3092\u9078\u629E
|
||||
@@ -96,7 +96,7 @@ ProposalUtils.CtrlProposal.ErrorMsg=\u3053\u306E\u30BF\u30A4\u30D7\u306E\u5236\u
|
||||
RemovePushButton.RemoveButton.Tip=\u9078\u629E\u3057\u305F\u30A2\u30A4\u30C6\u30E0\u3092\u524A\u9664
|
||||
ResetDBTypesButton.ResetDBTypesButton.Tip=DB\u30BF\u30A4\u30D7\u3092\u30EA\u30BB\u30C3\u30C8
|
||||
Rule.rule=\u30EB\u30FC\u30EB[{0}]
|
||||
SaveAsGenericSchemaPushButton.saveAsSchema=\u6C4E\u7528\u30B9\u30AD\u30FC\u30DE\u3068\u3057\u3066\u4FDD\u5B58
|
||||
SaveAsGenericSchemaPushButton.saveAsSchema=\u30B8\u30A7\u30CD\u30EA\u30C3\u30AF\u30B9\u30AD\u30FC\u30DE\u3068\u3057\u3066\u4FDD\u5B58
|
||||
SelectContextVariablesPushButton.Label=\u30B3\u30F3\u30C6\u30AF\u30B9\u30C8\u5909\u6570\u3092\u9078\u629E
|
||||
SWTCalendarWithTime.contentEvening=\u5915\u65B9
|
||||
SWTCalendarWithTime.contentHr=\u6642:
|
||||
|
||||
@@ -115,6 +115,8 @@ public enum ECoreImage implements IImage {
|
||||
|
||||
METADATA_SAPCONNECTION_ICON("/icons1/sapconnection.png"), //$NON-NLS-1$
|
||||
METADATA_SAPCONNECTION_WIZ("/icons1/connection_wiz.gif"), //$NON-NLS-1$
|
||||
|
||||
METADATA_BIGQUERYCONNECTION_ICON("/icons1/bigqueryconnection.png"), //$NON-NLS-1$
|
||||
|
||||
METADATA_HEADERFOOTER_ICON("/icons1/headerfooter_icon32.png"), //$NON-NLS-1$
|
||||
|
||||
|
||||
@@ -39,9 +39,10 @@ public enum EImage implements IImage {
|
||||
EDIT_ICON("/icons/write_obj.gif"), //$NON-NLS-1$
|
||||
READ_ICON("/icons/read_obj.gif"), //$NON-NLS-1$
|
||||
|
||||
WRAP_ICON("/icons/wrap.png"), //$NON-NLS-1$
|
||||
QUESTION_ICON("/icons/question.gif"), //$NON-NLS-1$
|
||||
|
||||
HELP_ICON("/icons/help.png"), //$NON-NLS-1$
|
||||
MOREINFO_ICON("/icons/moreInfo.png"), //$NON-NLS-1$
|
||||
|
||||
CREATE_CONNECTION_ICON("/icons/connection.gif"), //$NON-NLS-1$
|
||||
|
||||
|
||||
@@ -57,6 +57,8 @@ import org.eclipse.swt.widgets.Listener;
|
||||
import org.eclipse.swt.widgets.Table;
|
||||
import org.eclipse.swt.widgets.TableColumn;
|
||||
import org.eclipse.swt.widgets.TableItem;
|
||||
import org.talend.commons.ui.runtime.ColorConstants;
|
||||
import org.talend.commons.ui.runtime.ITalendThemeService;
|
||||
import org.talend.commons.ui.runtime.i18n.Messages;
|
||||
import org.talend.commons.ui.runtime.swt.proposal.IShowInvisibleCellEditorMethods;
|
||||
import org.talend.commons.ui.runtime.swt.tableviewer.behavior.DefaultHeaderColumnSelectionListener;
|
||||
@@ -291,7 +293,8 @@ public class TableViewerCreatorNotModifiable<B> {
|
||||
public TableViewerCreatorNotModifiable(Composite compositeParent) {
|
||||
super();
|
||||
this.compositeParent = compositeParent;
|
||||
this.emptyZoneColor = compositeParent.getDisplay().getSystemColor(SWT.COLOR_WHITE);
|
||||
this.emptyZoneColor = ITalendThemeService.getColor("org.talend.commons.ui.BgColorForEmptyArea")
|
||||
.orElse(compositeParent.getDisplay().getSystemColor(SWT.COLOR_WHITE));
|
||||
|
||||
}
|
||||
|
||||
@@ -669,8 +672,22 @@ public class TableViewerCreatorNotModifiable<B> {
|
||||
table.addListener(SWTFacade.Paint, paintListener);
|
||||
}
|
||||
|
||||
setBackgroundColor(backgroundColor != null ? backgroundColor : table.getDisplay().getSystemColor(SWT.COLOR_WHITE));
|
||||
setForegroundColor(foregroundColor != null ? foregroundColor : table.getDisplay().getSystemColor(SWT.COLOR_BLACK));
|
||||
Color prefBackgroundColor = backgroundColor;
|
||||
if (prefBackgroundColor == null) {
|
||||
prefBackgroundColor = ColorConstants.getTableBackgroundColor();
|
||||
if (prefBackgroundColor == null) {
|
||||
prefBackgroundColor = table.getDisplay().getSystemColor(SWT.COLOR_WHITE);
|
||||
}
|
||||
}
|
||||
Color prefForegroundColor = foregroundColor;
|
||||
if (prefForegroundColor == null) {
|
||||
prefForegroundColor = ColorConstants.getTableForegroundColor();
|
||||
if (prefForegroundColor == null) {
|
||||
prefForegroundColor = table.getDisplay().getSystemColor(SWT.COLOR_BLACK);
|
||||
}
|
||||
}
|
||||
setBackgroundColor(prefBackgroundColor);
|
||||
setForegroundColor(prefForegroundColor);
|
||||
|
||||
if (useCustomItemColoring) {
|
||||
setUseCustomItemColoring(true);
|
||||
|
||||
@@ -69,6 +69,10 @@ public class DefaultTableLabelProvider implements ITableLabelProvider, ITableCol
|
||||
returnValue = defaultValue;
|
||||
}
|
||||
} else {
|
||||
if ("ID_COLUMN_ROW_NUM".equals(column.getId())) {
|
||||
int indexOf = this.tableViewerCreator.getInputList().indexOf(element);
|
||||
AccessorUtils.set(column, element, indexOf + 1);
|
||||
}
|
||||
Object value = AccessorUtils.get(element, column);
|
||||
CellEditor cellEditor = column.getCellEditor();
|
||||
CellEditorValueAdapter retrieverValue = column.getCellEditorValueAdapter();
|
||||
|
||||
@@ -12,9 +12,14 @@
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.runtime.utils;
|
||||
|
||||
import org.eclipse.jface.resource.ColorRegistry;
|
||||
import org.eclipse.jface.resource.DataFormatException;
|
||||
import org.eclipse.jface.resource.JFaceResources;
|
||||
import org.eclipse.jface.resource.StringConverter;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.graphics.Device;
|
||||
import org.eclipse.swt.graphics.RGB;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
|
||||
/**
|
||||
@@ -102,4 +107,16 @@ public class TalendColorPalette {
|
||||
public static final java.awt.Color TERTIARY_ORANGE_AWT = new java.awt.Color(244, 175, 128);
|
||||
|
||||
public static final java.awt.Color TERTIARY_YELLOW_AWT = new java.awt.Color(255, 217, 143);
|
||||
|
||||
public static Color convertToColor(String rgbStr) throws DataFormatException {
|
||||
ColorRegistry colorRegistry = JFaceResources.getColorRegistry();
|
||||
Color color = colorRegistry.get(rgbStr);
|
||||
if (color != null) {
|
||||
return color;
|
||||
}
|
||||
RGB rgb = StringConverter.asRGB(rgbStr);
|
||||
colorRegistry.put(rgbStr, rgb);
|
||||
return colorRegistry.get(rgbStr);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -283,6 +283,7 @@
|
||||
<KEYWORD1>smallint</KEYWORD1>
|
||||
<KEYWORD1>smallmoney</KEYWORD1>
|
||||
<KEYWORD1>text</KEYWORD1>
|
||||
<KEYWORD1>TIME</KEYWORD1>
|
||||
<KEYWORD1>timestamp</KEYWORD1>
|
||||
<KEYWORD1>tinyint</KEYWORD1>
|
||||
<KEYWORD1>uniqueidentifier</KEYWORD1>
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
<dependency>
|
||||
<groupId>xerces</groupId>
|
||||
<artifactId>xercesImpl</artifactId>
|
||||
<version>2.12.0</version>
|
||||
<version>2.12.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ch.qos.reload4j</groupId>
|
||||
@@ -125,7 +125,7 @@
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
<version>30.0-jre</version>
|
||||
<version>32.0.1-jre</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<configuration>
|
||||
|
||||
@@ -36,6 +36,11 @@ public final class CommonExceptionHandler {
|
||||
Priority priority = getPriority(ex);
|
||||
process(ex, priority);
|
||||
}
|
||||
|
||||
public static void process(Throwable ex, String msg) {
|
||||
Priority priority = getPriority(ex);
|
||||
process(ex, msg, priority);
|
||||
}
|
||||
|
||||
public static void process(Throwable ex, Priority priority) {
|
||||
String message = ex.getMessage();
|
||||
@@ -43,6 +48,13 @@ public final class CommonExceptionHandler {
|
||||
log.log(priority, message, ex);
|
||||
|
||||
}
|
||||
|
||||
public static void process(Throwable ex, String msg, Priority priority) {
|
||||
String message = ex.getMessage() + ": " + msg;
|
||||
|
||||
log.log(priority, message, ex);
|
||||
|
||||
}
|
||||
|
||||
public static void log(String message) {
|
||||
log.log(Level.INFO, message);
|
||||
|
||||
@@ -23,10 +23,19 @@ public class FatalException extends RuntimeException {
|
||||
@SuppressWarnings("unused")//$NON-NLS-1$
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public static final int CODE_INCOMPATIBLE_UPDATE = 10;
|
||||
|
||||
private int code;
|
||||
|
||||
public FatalException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
|
||||
public FatalException(int code, String message) {
|
||||
super(message);
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public FatalException(String message) {
|
||||
super(message);
|
||||
}
|
||||
@@ -34,4 +43,9 @@ public class FatalException extends RuntimeException {
|
||||
public FatalException(Throwable cause) {
|
||||
super(cause);
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2023 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.runtime.model.emf;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.StringJoiner;
|
||||
|
||||
import org.eclipse.emf.common.util.URI;
|
||||
import org.eclipse.emf.ecore.xmi.XMLHelper;
|
||||
import org.eclipse.emf.ecore.xmi.XMLResource;
|
||||
import org.eclipse.emf.ecore.xmi.XMLSave;
|
||||
import org.eclipse.emf.ecore.xmi.impl.XMISaveImpl;
|
||||
import org.eclipse.emf.ecore.xmi.impl.XMLString;
|
||||
|
||||
/**
|
||||
* DOC jding class global comment. Detailled comment
|
||||
*/
|
||||
public class CustomXMIResource extends TalendXMIResource {
|
||||
|
||||
public static final String ENCODING = "UTF-8"; //$NON-NLS-1$
|
||||
|
||||
CustomXMISave xmiSave;
|
||||
|
||||
public CustomXMIResource() {
|
||||
super();
|
||||
}
|
||||
|
||||
public CustomXMIResource(URI uri) {
|
||||
super(uri);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void init() {
|
||||
super.init();
|
||||
encoding = ENCODING;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected XMLSave createXMLSave() {
|
||||
xmiSave = new CustomXMISave(createXMLHelper());
|
||||
return xmiSave;
|
||||
}
|
||||
|
||||
public String getResourceContent(Map<?, ?> options) {
|
||||
if (xmiSave == null) {
|
||||
createXMLSave();
|
||||
}
|
||||
return xmiSave.getXMLContent(this, options);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class CustomXMISave extends XMISaveImpl {
|
||||
|
||||
public CustomXMISave(XMLHelper helper) {
|
||||
super(helper);
|
||||
}
|
||||
|
||||
public String getXMLContent(XMLResource resource, Map<?, ?> options) {
|
||||
StringJoiner strJoin = new StringJoiner("");
|
||||
super.init(resource, options);
|
||||
super.traverse(resource.getContents());
|
||||
XMLString xmlString = this.doc;
|
||||
Iterator<String> iterator = xmlString.stringIterator();
|
||||
while (iterator.hasNext()) {
|
||||
String string = (String) iterator.next();
|
||||
if (string != null) {
|
||||
strJoin.add(string);
|
||||
}
|
||||
}
|
||||
return strJoin.toString();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -16,6 +16,7 @@ import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
@@ -263,4 +264,12 @@ public class EmfHelper {
|
||||
return result;
|
||||
}
|
||||
|
||||
public static String getEmfModelContent(EObject model) throws Exception {
|
||||
String content = "";
|
||||
CustomXMIResource xmiResource = new CustomXMIResource();
|
||||
xmiResource.getContents().add(model);
|
||||
content = xmiResource.getResourceContent(Collections.EMPTY_MAP);
|
||||
return content;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ package org.talend.commons.runtime.service;
|
||||
import java.io.File;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
@@ -45,6 +46,10 @@ public interface ITaCoKitService {
|
||||
boolean isNeedMigration(String componentName, Map<String, String> properties);
|
||||
|
||||
boolean isTaCoKitType(Object repoType);
|
||||
|
||||
boolean isTaCoKitRepositoryNode(Object node);
|
||||
|
||||
boolean isTaCoKitConnection(Object conn);
|
||||
|
||||
Object getDatastoreFromDataset(Object repositoryViewObject);
|
||||
|
||||
@@ -52,6 +57,12 @@ public interface ITaCoKitService {
|
||||
|
||||
boolean isValueSelectionParameter(Object parameter);
|
||||
|
||||
List<Map<String, Object>> convertToTable(String value);
|
||||
|
||||
List<String> getValuesFromTableParameter(Object parameter, String... keys);
|
||||
|
||||
List<String> getValuesFromTableParameterValue(String value, String ...keys);
|
||||
|
||||
public static ITaCoKitService getInstance() {
|
||||
BundleContext bc = FrameworkUtil.getBundle(ITaCoKitService.class).getBundleContext();
|
||||
Collection<ServiceReference<ITaCoKitService>> tacokitServices = Collections.emptyList();
|
||||
|
||||
@@ -31,7 +31,9 @@ import javax.xml.transform.stream.StreamResult;
|
||||
|
||||
import org.talend.utils.xml.XmlUtils;
|
||||
import org.w3c.dom.Document;
|
||||
import org.xml.sax.ErrorHandler;
|
||||
import org.xml.sax.SAXException;
|
||||
import org.xml.sax.SAXParseException;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -50,6 +52,23 @@ public final class XMLFileUtil {
|
||||
public static Document loadDoc(InputStream stream) throws ParserConfigurationException, SAXException, IOException {
|
||||
try {
|
||||
DocumentBuilder db = DOCBUILDER_FACTORY.newDocumentBuilder();
|
||||
db.setErrorHandler(new ErrorHandler() {
|
||||
|
||||
@Override
|
||||
public void warning(SAXParseException exception) throws SAXException {
|
||||
throw exception;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fatalError(SAXParseException exception) throws SAXException {
|
||||
throw exception;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void error(SAXParseException exception) throws SAXException {
|
||||
throw exception;
|
||||
}
|
||||
});
|
||||
return db.parse(stream);
|
||||
} finally {
|
||||
try {
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
package org.talend.commons.utils;
|
||||
|
||||
import java.security.SecureRandom;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import javax.crypto.BadPaddingException;
|
||||
import javax.crypto.Cipher;
|
||||
@@ -34,6 +35,8 @@ public class PasswordEncryptUtil {
|
||||
|
||||
private static final SecureRandom SECURERANDOM = new SecureRandom();
|
||||
|
||||
private static final Pattern REG_ENCRYPTED_DATA = Pattern.compile("^enc\\:system\\.encryption\\.key\\.v\\d\\:\\p{Print}+");
|
||||
|
||||
private static SecretKey getSecretKey() throws Exception {
|
||||
if (key == null) {
|
||||
byte rawKeyData[] = StudioEncryption
|
||||
|
||||
@@ -145,7 +145,30 @@ public class DB2ForZosDataBaseMetadata extends PackageFakeDatabaseMetadata {
|
||||
*/
|
||||
@Override
|
||||
public ResultSet getPrimaryKeys(String catalog, String schema, String table) throws SQLException {
|
||||
return new DB2ForZosResultSet();
|
||||
ResultSet rs = super.getPrimaryKeys(catalog, schema, table);
|
||||
if (rs == null) {
|
||||
rs = new DB2ForZosResultSet();
|
||||
}
|
||||
return rs;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.talend.commons.utils.database.FakeDatabaseMetaData#getExportedKeys(java.lang.String, java.lang.String,
|
||||
* java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public ResultSet getExportedKeys(String catalog, String schema, String table) throws SQLException {
|
||||
ResultSet rs = super.getExportedKeys(catalog, schema, table);
|
||||
if (rs == null) {
|
||||
if (this.metaData != null) {
|
||||
rs = this.metaData.getExportedKeys(catalog, schema, table);
|
||||
} else {
|
||||
rs = new DB2ForZosResultSet();
|
||||
}
|
||||
}
|
||||
return rs;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -174,17 +197,6 @@ public class DB2ForZosDataBaseMetadata extends PackageFakeDatabaseMetadata {
|
||||
return tableResultSet;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.talend.commons.utils.database.FakeDatabaseMetaData#getExportedKeys(java.lang.String, java.lang.String,
|
||||
* java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public ResultSet getExportedKeys(String catalog, String schema, String table) throws SQLException {
|
||||
return new DB2ForZosResultSet();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
|
||||
@@ -24,6 +24,7 @@ import java.net.URI;
|
||||
import java.net.URL;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Enumeration;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
@@ -31,8 +32,13 @@ import java.util.Set;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.eclipse.core.internal.net.ProxyManager;
|
||||
import org.eclipse.core.net.proxy.IProxyData;
|
||||
import org.eclipse.core.net.proxy.IProxyService;
|
||||
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
|
||||
import org.eclipse.core.runtime.preferences.InstanceScope;
|
||||
import org.talend.commons.exception.CommonExceptionHandler;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.runtime.utils.io.FileCopyUtils;
|
||||
|
||||
@@ -41,6 +47,8 @@ import org.talend.commons.runtime.utils.io.FileCopyUtils;
|
||||
*/
|
||||
public class NetworkUtil {
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(NetworkUtil.class);
|
||||
|
||||
private static final String[] windowsCommand = { "ipconfig", "/all" }; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
|
||||
private static final String[] linuxCommand = { "/sbin/ifconfig", "-a" }; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
@@ -71,6 +79,136 @@ public class NetworkUtil {
|
||||
|
||||
private static final String PROP_NETWORK_STATUS = "network.status"; //$NON-NLS-1$
|
||||
|
||||
private static final String SYSTEM_PROXY_ENABLED = "talend.studio.proxy.enableSystemProxyByDefault";
|
||||
|
||||
public static void applyProxyFromSystemProperties() throws Exception {
|
||||
if (!Boolean.valueOf(System.getProperty("talend.studio.proxy.applySystemProps", Boolean.FALSE.toString()))) {
|
||||
return;
|
||||
}
|
||||
final String passwordMask = "***";
|
||||
String httpProxyHost = System.getProperty("http.proxyHost");
|
||||
String httpProxyPort = System.getProperty("http.proxyPort");
|
||||
String httpUser = System.getProperty("http.proxyUser");
|
||||
String httpPassword = System.getProperty("http.proxyPassword");
|
||||
if (StringUtils.isNotBlank(httpPassword)) {
|
||||
System.setProperty("http.proxyPassword", passwordMask);
|
||||
}
|
||||
String httpNonProxyHosts = System.getProperty("http.nonProxyHosts");
|
||||
String httpsProxyHost = System.getProperty("https.proxyHost");
|
||||
String httpsProxyPort = System.getProperty("https.proxyPort");
|
||||
String httpsUser = System.getProperty("https.proxyUser");
|
||||
String httpsPassword = System.getProperty("https.proxyPassword");
|
||||
if (StringUtils.isNotBlank(httpsPassword)) {
|
||||
System.setProperty("https.proxyPassword", passwordMask);
|
||||
}
|
||||
String httpsNonProxyHosts = System.getProperty("https.nonProxyHosts");
|
||||
String socksProxyHost = System.getProperty("socksProxyHost");
|
||||
String socksProxyPort = System.getProperty("socksProxyPort");
|
||||
String socksProxyUser = System.getProperty("socksProxyUser");
|
||||
if (socksProxyUser == null) {
|
||||
socksProxyUser = System.getProperty("java.net.socks.username");
|
||||
}
|
||||
String socksProxyPassword = System.getProperty("socksProxyPassword");
|
||||
if (StringUtils.isNotBlank(socksProxyPassword)) {
|
||||
System.setProperty("socksProxyPassword", passwordMask);
|
||||
}
|
||||
if (socksProxyPassword == null) {
|
||||
socksProxyPassword = System.getProperty("java.net.socks.password");
|
||||
}
|
||||
IProxyService proxyService = ProxyManager.getProxyManager();
|
||||
boolean isHttpProxyEnabled = StringUtils.isNotBlank(httpProxyHost) && StringUtils.isNotBlank(httpProxyPort);
|
||||
boolean isHttpsProxyEnabled = StringUtils.isNotBlank(httpsProxyHost) && StringUtils.isNotBlank(httpsProxyPort);
|
||||
boolean isSocksProxyEnabled = StringUtils.isNotBlank(socksProxyHost) && StringUtils.isNotBlank(socksProxyPort);
|
||||
if (!isHttpProxyEnabled && !isHttpsProxyEnabled && !isSocksProxyEnabled) {
|
||||
proxyService
|
||||
.setSystemProxiesEnabled(Boolean.valueOf(System.getProperty(SYSTEM_PROXY_ENABLED, Boolean.TRUE.toString())));
|
||||
proxyService.setProxiesEnabled(false);
|
||||
LOGGER.info("No proxy specified, disabled.");
|
||||
} else {
|
||||
proxyService.setSystemProxiesEnabled(false);
|
||||
proxyService.setProxiesEnabled(true);
|
||||
List<IProxyData> proxies = new ArrayList<>();
|
||||
String initedProxyTypes = "";
|
||||
if (isHttpProxyEnabled) {
|
||||
try {
|
||||
IProxyData httpProxy = proxyService.getProxyData(IProxyData.HTTP_PROXY_TYPE);
|
||||
httpProxy.setHost(httpProxyHost);
|
||||
httpProxy.setPort(Integer.valueOf(httpProxyPort));
|
||||
if (StringUtils.isNotBlank(httpUser)) {
|
||||
httpProxy.setUserid(httpUser);
|
||||
if (httpPassword == null) {
|
||||
httpPassword = "";
|
||||
}
|
||||
httpProxy.setPassword(httpPassword);
|
||||
}
|
||||
proxies.add(httpProxy);
|
||||
initedProxyTypes += IProxyData.HTTP_PROXY_TYPE + " ";
|
||||
} catch (Throwable e) {
|
||||
LOGGER.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
if (isHttpsProxyEnabled) {
|
||||
try {
|
||||
IProxyData httpsProxy = proxyService.getProxyData(IProxyData.HTTPS_PROXY_TYPE);
|
||||
httpsProxy.setHost(httpsProxyHost);
|
||||
httpsProxy.setPort(Integer.valueOf(httpsProxyPort));
|
||||
if (StringUtils.isNotBlank(httpsUser)) {
|
||||
httpsProxy.setUserid(httpsUser);
|
||||
if (httpsPassword == null) {
|
||||
httpsPassword = "";
|
||||
}
|
||||
httpsProxy.setPassword(httpsPassword);
|
||||
}
|
||||
proxies.add(httpsProxy);
|
||||
initedProxyTypes += IProxyData.HTTPS_PROXY_TYPE + " ";
|
||||
} catch (Throwable e) {
|
||||
LOGGER.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
if (isSocksProxyEnabled) {
|
||||
try {
|
||||
IProxyData socksProxy = proxyService.getProxyData(IProxyData.SOCKS_PROXY_TYPE);
|
||||
socksProxy.setHost(socksProxyHost);
|
||||
socksProxy.setPort(Integer.valueOf(socksProxyPort));
|
||||
if (StringUtils.isNotBlank(socksProxyUser)) {
|
||||
socksProxy.setUserid(socksProxyUser);
|
||||
if (socksProxyPassword == null) {
|
||||
socksProxyPassword = "";
|
||||
}
|
||||
socksProxy.setPassword(socksProxyPassword);
|
||||
}
|
||||
proxies.add(socksProxy);
|
||||
initedProxyTypes += IProxyData.SOCKS_PROXY_TYPE;
|
||||
} catch (Throwable e) {
|
||||
LOGGER.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
proxyService.setProxyData(proxies.toArray(new IProxyData[0]));
|
||||
List<String> nonProxyHosts = new ArrayList<>();
|
||||
if (StringUtils.isNotBlank(httpNonProxyHosts)) {
|
||||
String[] split = httpNonProxyHosts.split("|");
|
||||
nonProxyHosts.addAll(Arrays.asList(split));
|
||||
}
|
||||
if (StringUtils.isNotBlank(httpsNonProxyHosts)) {
|
||||
String[] split = httpsNonProxyHosts.split("|");
|
||||
nonProxyHosts.addAll(Arrays.asList(split));
|
||||
}
|
||||
proxyService.setNonProxiedHosts(nonProxyHosts.toArray(new String[0]));
|
||||
|
||||
if (passwordMask.equals(System.getProperty("http.proxyPassword"))) {
|
||||
System.setProperty("http.proxyPassword", httpPassword);
|
||||
}
|
||||
if (passwordMask.equals(System.getProperty("https.proxyPassword"))) {
|
||||
System.setProperty("https.proxyPassword", httpsPassword);
|
||||
}
|
||||
if (passwordMask.equals(System.getProperty("socksProxyPassword"))) {
|
||||
System.setProperty("socksProxyPassword", socksProxyPassword);
|
||||
}
|
||||
|
||||
LOGGER.info("Succeed to init proxy: " + initedProxyTypes);
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isNetworkValid() {
|
||||
return isNetworkValid(DEFAULT_TIMEOUT);
|
||||
}
|
||||
@@ -108,6 +246,7 @@ public class NetworkUtil {
|
||||
return true;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
CommonExceptionHandler.process(e, getCheckUrl());
|
||||
return false;
|
||||
} finally {
|
||||
conn.disconnect();
|
||||
@@ -120,7 +259,7 @@ public class NetworkUtil {
|
||||
if (StringUtils.isNotBlank(customUrl)) {
|
||||
return customUrl;
|
||||
} else {
|
||||
return "https://talend-update.talend.com/nexus/content/repositories/libraries/";
|
||||
return "https://talend-update.talend.com/nexus/content/groups/studio-libraries/";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,6 +283,7 @@ public class NetworkUtil {
|
||||
conn.setRequestMethod("HEAD"); //$NON-NLS-1$
|
||||
conn.getResponseMessage();
|
||||
} catch (Exception e) {
|
||||
CommonExceptionHandler.process(e, urlString);
|
||||
// if not reachable , will throw exception(time out/unknown host) .So if catched exception, make it a
|
||||
// invalid server
|
||||
return false;
|
||||
|
||||
@@ -20,7 +20,8 @@ Require-Bundle: org.eclipse.core.runtime,
|
||||
org.talend.commons.runtime,
|
||||
org.talend.common.ui.runtime;visibility:=reexport,
|
||||
org.talend.libraries.ui;visibility:=reexport,
|
||||
org.eclipse.ui.workbench
|
||||
org.eclipse.ui.workbench,
|
||||
org.eclipse.jface.notifications
|
||||
Eclipse-LazyStart: true
|
||||
Bundle-Vendor: .Talend SA.
|
||||
Export-Package: org.talend.commons.ui.command,
|
||||
@@ -28,6 +29,7 @@ Export-Package: org.talend.commons.ui.command,
|
||||
org.talend.commons.ui.gmf.util,
|
||||
org.talend.commons.ui.html,
|
||||
org.talend.commons.ui.i18n,
|
||||
org.talend.commons.ui.nofitication,
|
||||
org.talend.commons.ui.swt.actions,
|
||||
org.talend.commons.ui.swt.advanced.composite,
|
||||
org.talend.commons.ui.swt.advanced.dataeditor,
|
||||
|
||||
@@ -15,7 +15,7 @@ ColorStyledText.SelectAllItem.Text=\u3059\u3079\u3066\u9078\u629E
|
||||
ContentProposalAdapterExtended.close=\u9589\u3058\u308B
|
||||
ContentProposalAdapterExtended.closeFocusout=\u30D5\u30A9\u30FC\u30AB\u30B9\u30A2\u30A6\u30C8\u3092\u9589\u3058\u308B
|
||||
ControlUtils.Unsupported1=\u3053\u306E\u30B3\u30F3\u30C8\u30ED\u30FC\u30EB({0})\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u5FC5\u8981\u3067\u3042\u308C\u3070\u3001\u30B1\u30FC\u30B9\u3092\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044...
|
||||
CopyPushButton.CopyButton.Tip=\u9078\u629E\u3057\u305F\u30A2\u30A4\u30C6\u30E0\u3092\u30B3\u30D4\u30FC
|
||||
CopyPushButton.CopyButton.Tip=\u9078\u629E\u9805\u76EE\u3092\u30B3\u30D4\u30FC
|
||||
Curve2D.MaxNum.Be0=maximumSegments\u306F\u6B63\u6570\u304B0\u306B\u3057\u3066\u304F\u3060\u3055\u3044
|
||||
Curve2D.MinNum.Be0=minimumSegments\u306F\u6B63\u307E\u305F\u306F0\u306B\u3057\u3066\u304F\u3060\u3055\u3044
|
||||
DateDialog.textContent=\u65E5\u6642\u3092\u9078\u629E
|
||||
@@ -92,7 +92,7 @@ ProposalUtils.CtrlProposal.ErrorMsg=\u3053\u306E\u30BF\u30A4\u30D7\u306E\u5236\u
|
||||
RemovePushButton.RemoveButton.Tip=\u9078\u629E\u3057\u305F\u30A2\u30A4\u30C6\u30E0\u3092\u524A\u9664
|
||||
ResetDBTypesButton.ResetDBTypesButton.Tip=DB\u30BF\u30A4\u30D7\u3092\u30EA\u30BB\u30C3\u30C8
|
||||
Rule.rule=\u30EB\u30FC\u30EB[{0}]
|
||||
SaveAsGenericSchemaPushButton.saveAsSchema=\u6C4E\u7528\u30B9\u30AD\u30FC\u30DE\u3068\u3057\u3066\u4FDD\u5B58
|
||||
SaveAsGenericSchemaPushButton.saveAsSchema=\u30B8\u30A7\u30CD\u30EA\u30C3\u30AF\u30B9\u30AD\u30FC\u30DE\u3068\u3057\u3066\u4FDD\u5B58
|
||||
SelectContextVariablesPushButton.Label=\u30B3\u30F3\u30C6\u30AF\u30B9\u30C8\u5909\u6570\u3092\u9078\u629E
|
||||
SWTCalendarWithTime.contentEvening=\u5915\u65B9
|
||||
SWTCalendarWithTime.contentHr=\u6642:
|
||||
|
||||
@@ -0,0 +1,133 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.nofitication;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.jface.notifications.AbstractNotificationPopup;
|
||||
import org.eclipse.jface.window.Window;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.graphics.Point;
|
||||
import org.eclipse.swt.graphics.Rectangle;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.eclipse.swt.widgets.Monitor;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
|
||||
public abstract class ArrangedNotificationPopup extends AbstractNotificationPopup {
|
||||
|
||||
protected static final int MAX_WIDTH = 400;
|
||||
|
||||
protected static final int MIN_HEIGHT = 100;
|
||||
|
||||
protected static final int PADDING_EDGE = 5;
|
||||
|
||||
private static NotificationManager manager;
|
||||
|
||||
public ArrangedNotificationPopup(Display display) {
|
||||
super(display);
|
||||
}
|
||||
|
||||
public ArrangedNotificationPopup(Display display, int style) {
|
||||
super(display, style);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void createContentArea(Composite parent) {
|
||||
createControl(parent);
|
||||
afterCreate();
|
||||
}
|
||||
|
||||
protected abstract void createControl(Composite parent);
|
||||
|
||||
@Override
|
||||
protected Shell getParentShell() {
|
||||
return getNotificationManager().getParentShell();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initializeBounds() {
|
||||
Rectangle clArea = getPrimaryClientArea();
|
||||
Point initialSize = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT);
|
||||
int height = Math.max(initialSize.y, MIN_HEIGHT);
|
||||
int width = Math.min(initialSize.x, MAX_WIDTH);
|
||||
|
||||
Point size = new Point(width, height);
|
||||
getShell().setLocation(clArea.width + clArea.x - size.x - PADDING_EDGE, clArea.height + clArea.y - size.y - PADDING_EDGE);
|
||||
getShell().setSize(size);
|
||||
}
|
||||
|
||||
private Rectangle getPrimaryClientArea() {
|
||||
Shell parentShell = getParentShell();
|
||||
if (parentShell != null) {
|
||||
// calculate client area in display-relative coordinates
|
||||
// (i.e. without window border / decorations)
|
||||
Rectangle bounds = parentShell.getBounds();
|
||||
Rectangle trim = parentShell.computeTrim(0, 0, 0, 0);
|
||||
List<Window> toasts = getNotificationManager().getWindows();
|
||||
Rectangle rect = new Rectangle(bounds.x - trim.x, bounds.y - trim.y, bounds.width - trim.width,
|
||||
bounds.height - trim.height);
|
||||
if (!toasts.isEmpty()) {
|
||||
int index = 0;
|
||||
if (toasts.contains(this)) {
|
||||
// parent shell resize or move
|
||||
index = toasts.indexOf(this);
|
||||
if (index == 0) {
|
||||
// return parent shell rectangle if it's the first one at bottom
|
||||
return rect;
|
||||
}
|
||||
// the one under current toast
|
||||
index -= 1;
|
||||
} else {
|
||||
// toast creation
|
||||
// the one on the top
|
||||
index = toasts.size() - 1;
|
||||
}
|
||||
Rectangle toastRect = toasts.get(index).getShell().getBounds();
|
||||
rect = new Rectangle(rect.x, rect.y, rect.width, toastRect.y - rect.y);
|
||||
}
|
||||
return rect;
|
||||
}
|
||||
// else display on primary monitor
|
||||
Monitor primaryMonitor = this.getShell().getDisplay().getPrimaryMonitor();
|
||||
return (primaryMonitor != null) ? primaryMonitor.getClientArea() : this.getShell().getDisplay().getClientArea();
|
||||
}
|
||||
|
||||
protected void afterCreate() {
|
||||
//
|
||||
}
|
||||
|
||||
@Override
|
||||
public int open() {
|
||||
int open = super.open();
|
||||
// add after open
|
||||
getNotificationManager().add(this);
|
||||
return open;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean close() {
|
||||
boolean close = super.close();
|
||||
getNotificationManager().remove(this);
|
||||
getNotificationManager().refresh();
|
||||
return close;
|
||||
}
|
||||
|
||||
private NotificationManager getNotificationManager() {
|
||||
if (manager == null) {
|
||||
manager = NotificationManager.getInstance();
|
||||
}
|
||||
return manager;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2023 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.nofitication;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import org.eclipse.jface.window.Window;
|
||||
import org.eclipse.jface.window.WindowManager;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.widgets.Event;
|
||||
import org.eclipse.swt.widgets.Listener;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.ui.PlatformUI;
|
||||
|
||||
public class NotificationManager implements Listener {
|
||||
|
||||
private static NotificationManager notificationManager;
|
||||
|
||||
private WindowManager windowManager = new WindowManager();
|
||||
|
||||
private NotificationManager() {
|
||||
Shell shell = getParentShell();
|
||||
if (shell != null) {
|
||||
shell.addListener(SWT.Resize, this);
|
||||
shell.addListener(SWT.Move, this);
|
||||
}
|
||||
}
|
||||
|
||||
public static NotificationManager getInstance() {
|
||||
if (notificationManager == null) {
|
||||
notificationManager = new NotificationManager();
|
||||
}
|
||||
return notificationManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleEvent(Event event) {
|
||||
refresh();
|
||||
}
|
||||
|
||||
public void refresh() {
|
||||
Stream.of(windowManager.getWindows()).map(ArrangedNotificationPopup.class::cast)
|
||||
.forEach(ArrangedNotificationPopup::initializeBounds);
|
||||
}
|
||||
|
||||
public List<Window> getWindows() {
|
||||
return Stream.of(windowManager.getWindows()).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public void add(Window window) {
|
||||
windowManager.add(window);
|
||||
}
|
||||
|
||||
public void remove(Window window) {
|
||||
windowManager.remove(window);
|
||||
}
|
||||
|
||||
public Shell getParentShell() {
|
||||
Shell shell = null;
|
||||
if (PlatformUI.getWorkbench().getActiveWorkbenchWindow() != null) {
|
||||
shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
|
||||
if (shell == null) {
|
||||
shell = PlatformUI.getWorkbench().getDisplay().getActiveShell();
|
||||
}
|
||||
}
|
||||
return shell;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -130,11 +130,10 @@ public abstract class ExportPushButtonForExtendedTable extends ExportPushButton
|
||||
AbstractExtendedTableViewer extendedTableViewer = (AbstractExtendedTableViewer) extendedControlViewer;
|
||||
ExtendedTableModel extendedTableModel = extendedTableViewer.getExtendedTableModel();
|
||||
boolean enabled = false;
|
||||
if (extendedTableModel != null && extendedTableModel.isDataRegistered()
|
||||
&& extendedTableModel.getBeansList().size() > 0) {
|
||||
if (extendedTableModel != null && extendedTableModel.isDataRegistered() && extendedTableModel.getBeansList().size() > 0) {
|
||||
enabled = true;
|
||||
}
|
||||
return super.getEnabledState() && enabled;
|
||||
return extendedTableModel != null || enabled;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ import org.talend.commons.ui.runtime.image.EImage;
|
||||
import org.talend.commons.ui.runtime.image.ImageProvider;
|
||||
import org.talend.commons.ui.swt.advanced.dataeditor.control.ExtendedPushButton;
|
||||
import org.talend.commons.ui.swt.extended.table.AbstractExtendedTableViewer;
|
||||
import org.talend.commons.ui.swt.extended.table.ExtendedTableModel;
|
||||
|
||||
/**
|
||||
* DOC Administrator class global comment. Detailled comment <br/>
|
||||
@@ -33,4 +34,11 @@ public abstract class SaveAsGenericSchemaPushButton extends ExtendedPushButton {
|
||||
|
||||
@Override
|
||||
protected abstract Command getCommandToExecute();
|
||||
|
||||
@Override
|
||||
public boolean getEnabledState() {
|
||||
AbstractExtendedTableViewer extendedTableViewer = (AbstractExtendedTableViewer) extendedControlViewer;
|
||||
ExtendedTableModel extendedTableModel = extendedTableViewer.getExtendedTableModel();
|
||||
return extendedTableModel != null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ import java.util.List;
|
||||
|
||||
import org.eclipse.gef.commands.Command;
|
||||
import org.talend.commons.ui.runtime.i18n.Messages;
|
||||
import org.talend.commons.ui.runtime.swt.tableviewer.TableViewerCreatorNotModifiable;
|
||||
import org.talend.commons.ui.swt.extended.table.ExtendedTableModel;
|
||||
|
||||
/**
|
||||
@@ -88,6 +89,11 @@ public class ExtendedTableAddCommand extends Command implements IExtendedTableCo
|
||||
// }
|
||||
|
||||
extendedTable.addAll(indexStartAdd, beansToAdd);
|
||||
// when not lazy load need to do refresh to refresh the row number
|
||||
if (!TableViewerCreatorNotModifiable.getRecommandLazyLoad()
|
||||
&& !TableViewerCreatorNotModifiable.isLazyLoadingEnabled()) {
|
||||
extendedTable.getTableViewer().refresh();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ public abstract class ExtendedTableCaseCommand extends Command implements IExten
|
||||
@Override
|
||||
public void execute() {
|
||||
convertCase(extendedTable, beansToCovertCase, selectionIndices, isUpperCase);
|
||||
|
||||
extendedTable.getTableViewer().refresh();
|
||||
}
|
||||
|
||||
public abstract void convertCase(ExtendedTableModel extendedTable, List copiedObjectsList, int[] selectionIndices, boolean isUpperCase);
|
||||
|
||||
@@ -17,6 +17,7 @@ import java.util.List;
|
||||
|
||||
import org.eclipse.gef.commands.Command;
|
||||
import org.talend.commons.ui.runtime.i18n.Messages;
|
||||
import org.talend.commons.ui.runtime.swt.tableviewer.TableViewerCreatorNotModifiable;
|
||||
import org.talend.commons.ui.swt.extended.table.ExtendedTableModel;
|
||||
import org.talend.commons.ui.utils.SimpleClipboard;
|
||||
import org.talend.commons.utils.data.list.UniqueStringGenerator;
|
||||
@@ -65,6 +66,11 @@ public abstract class ExtendedTablePasteCommand extends Command implements IExte
|
||||
List list = new ArrayList((List) data);
|
||||
list = createPastableBeansList(extendedTable, list);
|
||||
extendedTable.addAll(indexStart, list);
|
||||
// when not lazy load need to do refresh to refresh the row number
|
||||
if (!TableViewerCreatorNotModifiable.getRecommandLazyLoad()
|
||||
&& !TableViewerCreatorNotModifiable.isLazyLoadingEnabled()) {
|
||||
extendedTable.getTableViewer().refresh();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ package org.talend.commons.ui.swt.advanced.dataeditor.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.gef.commands.Command;
|
||||
import org.talend.commons.ui.runtime.i18n.Messages;
|
||||
import org.talend.commons.ui.swt.extended.table.ExtendedTableModel;
|
||||
@@ -54,7 +55,7 @@ public abstract class ExtendedTableQuoteCommand extends Command implements IExte
|
||||
@Override
|
||||
public void execute() {
|
||||
toQuote(extendedTable, beansToQuote, selectionIndices, quote, isAddingQuote);
|
||||
|
||||
extendedTable.getTableViewer().refresh();
|
||||
}
|
||||
|
||||
public abstract void toQuote(ExtendedTableModel extendedTable, List copiedObjectsList, int[] selectionIndices, String quote, boolean isAddingQuote);
|
||||
|
||||
@@ -20,6 +20,7 @@ import java.util.List;
|
||||
import org.apache.commons.lang.ArrayUtils;
|
||||
import org.eclipse.gef.commands.Command;
|
||||
import org.talend.commons.ui.runtime.i18n.Messages;
|
||||
import org.talend.commons.ui.runtime.swt.tableviewer.TableViewerCreatorNotModifiable;
|
||||
import org.talend.commons.ui.swt.extended.table.ExtendedTableModel;
|
||||
|
||||
/**
|
||||
@@ -130,6 +131,11 @@ public class ExtendedTableRemoveCommand extends Command implements IExtendedTabl
|
||||
removedBeansIndices.add(index);
|
||||
}
|
||||
}
|
||||
// when not lazy load need to do refresh to refresh the row number
|
||||
if (!TableViewerCreatorNotModifiable.getRecommandLazyLoad()
|
||||
&& !TableViewerCreatorNotModifiable.isLazyLoadingEnabled()) {
|
||||
extendedTable.getTableViewer().refresh();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -18,12 +18,12 @@ import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
import org.eclipse.jface.preference.PreferenceConverter;
|
||||
import org.eclipse.jface.resource.StringConverter;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.graphics.RGB;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.talend.commons.ui.runtime.ITalendThemeService;
|
||||
import org.talend.commons.ui.swt.colorstyledtext.scanner.ColoringScanner;
|
||||
|
||||
/**
|
||||
@@ -33,7 +33,7 @@ import org.talend.commons.ui.swt.colorstyledtext.scanner.ColoringScanner;
|
||||
*
|
||||
*/
|
||||
public class ColorManager {
|
||||
|
||||
|
||||
public static final RGB DEFAULT_STRING_COLOR = new RGB(0, 0, 0);
|
||||
|
||||
public static final RGB DEFAULT_KEYWORD1_COLOR = new RGB(50, 32, 160);
|
||||
@@ -106,15 +106,19 @@ public class ColorManager {
|
||||
}
|
||||
|
||||
public Color getColor(String colorName) {
|
||||
RGB prefColor = PreferenceConverter.getColor(store, colorName);
|
||||
Color color = null;
|
||||
if (colorMap.containsKey(colorName) && (colorMap.get(colorName)).getRGB().equals(prefColor)) {
|
||||
color = (Color) colorMap.get(colorName);
|
||||
Color prefColor = getThemeColor(colorName);
|
||||
if (colorMap.containsKey(colorName) && (colorMap.get(colorName)).equals(prefColor)) {
|
||||
return colorMap.get(colorName);
|
||||
} else {
|
||||
color = new Color(Display.getDefault(), prefColor);
|
||||
colorMap.put(colorName, color);
|
||||
colorMap.put(colorName, prefColor);
|
||||
}
|
||||
return color;
|
||||
return prefColor;
|
||||
}
|
||||
|
||||
private static Color getThemeColor(String colorName) {
|
||||
Color c = ITalendThemeService.getColor(colorName)
|
||||
.orElse(Display.getDefault().getSystemColor(SWT.COLOR_INFO_FOREGROUND));
|
||||
return c;
|
||||
}
|
||||
|
||||
public void dispose() {
|
||||
@@ -164,20 +168,20 @@ public class ColorManager {
|
||||
}
|
||||
|
||||
public static void initDefaultColors(IPreferenceStore store) {
|
||||
store.setDefault(NULL_COLOR, StringConverter.asString(DEFAULT_STRING_COLOR));
|
||||
store.setDefault(COMMENT1_COLOR, StringConverter.asString(DEFAULT_COMMENT1_COLOR));
|
||||
store.setDefault(COMMENT2_COLOR, StringConverter.asString(DEFAULT_COMMENT2_COLOR));
|
||||
store.setDefault(LITERAL1_COLOR, StringConverter.asString(DEFAULT_LITERAL1_COLOR));
|
||||
store.setDefault(LITERAL2_COLOR, StringConverter.asString(DEFAULT_LITERAL2_COLOR));
|
||||
store.setDefault(LABEL_COLOR, StringConverter.asString(DEFAULT_LABEL_COLOR));
|
||||
store.setDefault(KEYWORD1_COLOR, StringConverter.asString(DEFAULT_KEYWORD1_COLOR));
|
||||
store.setDefault(KEYWORD2_COLOR, StringConverter.asString(DEFAULT_KEYWORD2_COLOR));
|
||||
store.setDefault(KEYWORD3_COLOR, StringConverter.asString(DEFAULT_KEYWORD3_COLOR));
|
||||
store.setDefault(FUNCTION_COLOR, StringConverter.asString(DEFAULT_FUNCTION_COLOR));
|
||||
store.setDefault(MARKUP_COLOR, StringConverter.asString(DEFAULT_MARKUP_COLOR));
|
||||
store.setDefault(OPERATOR_COLOR, StringConverter.asString(DEFAULT_OPERATOR_COLOR));
|
||||
store.setDefault(DIGIT_COLOR, StringConverter.asString(DEFAULT_DIGIT_COLOR));
|
||||
store.setDefault(INVALID_COLOR, StringConverter.asString(DEFAULT_INVALID_COLOR));
|
||||
store.setDefault(NULL_COLOR, StringConverter.asString(getThemeColor(NULL_COLOR).getRGB()));
|
||||
store.setDefault(COMMENT1_COLOR, StringConverter.asString(getThemeColor(COMMENT1_COLOR).getRGB()));
|
||||
store.setDefault(COMMENT2_COLOR, StringConverter.asString(getThemeColor(COMMENT2_COLOR).getRGB()));
|
||||
store.setDefault(LITERAL1_COLOR, StringConverter.asString(getThemeColor(LITERAL1_COLOR).getRGB()));
|
||||
store.setDefault(LITERAL2_COLOR, StringConverter.asString(getThemeColor(LITERAL2_COLOR).getRGB()));
|
||||
store.setDefault(LABEL_COLOR, StringConverter.asString(getThemeColor(LABEL_COLOR).getRGB()));
|
||||
store.setDefault(KEYWORD1_COLOR, StringConverter.asString(getThemeColor(KEYWORD1_COLOR).getRGB()));
|
||||
store.setDefault(KEYWORD2_COLOR, StringConverter.asString(getThemeColor(KEYWORD2_COLOR).getRGB()));
|
||||
store.setDefault(KEYWORD3_COLOR, StringConverter.asString(getThemeColor(KEYWORD3_COLOR).getRGB()));
|
||||
store.setDefault(FUNCTION_COLOR, StringConverter.asString(getThemeColor(FUNCTION_COLOR).getRGB()));
|
||||
store.setDefault(MARKUP_COLOR, StringConverter.asString(getThemeColor(MARKUP_COLOR).getRGB()));
|
||||
store.setDefault(OPERATOR_COLOR, StringConverter.asString(getThemeColor(OPERATOR_COLOR).getRGB()));
|
||||
store.setDefault(DIGIT_COLOR, StringConverter.asString(getThemeColor(DIGIT_COLOR).getRGB()));
|
||||
store.setDefault(INVALID_COLOR, StringConverter.asString(getThemeColor(INVALID_COLOR).getRGB()));
|
||||
|
||||
String bold = BOLD_SUFFIX;
|
||||
store.setDefault(COMMENT1_COLOR + bold, false);
|
||||
|
||||
@@ -1,368 +1,384 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2021 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.swt.colorstyledtext;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
import org.eclipse.jface.text.rules.IToken;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.custom.ExtendedModifyEvent;
|
||||
import org.eclipse.swt.custom.ExtendedModifyListener;
|
||||
import org.eclipse.swt.custom.StyleRange;
|
||||
import org.eclipse.swt.custom.StyledText;
|
||||
import org.eclipse.swt.graphics.Image;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Event;
|
||||
import org.eclipse.swt.widgets.Listener;
|
||||
import org.eclipse.swt.widgets.Menu;
|
||||
import org.eclipse.swt.widgets.MenuItem;
|
||||
import org.eclipse.ui.ISharedImages;
|
||||
import org.eclipse.ui.PlatformUI;
|
||||
import org.talend.commons.runtime.xml.XmlUtil;
|
||||
import org.talend.commons.ui.runtime.i18n.Messages;
|
||||
import org.talend.commons.ui.runtime.image.ImageProvider;
|
||||
import org.talend.commons.ui.swt.colorstyledtext.jedit.Mode;
|
||||
import org.talend.commons.ui.swt.colorstyledtext.jedit.Modes;
|
||||
import org.talend.commons.ui.swt.colorstyledtext.rules.CToken;
|
||||
import org.talend.commons.ui.swt.colorstyledtext.scanner.ColoringScanner;
|
||||
import org.talend.commons.utils.threading.ExecutionLimiter;
|
||||
|
||||
/**
|
||||
* This component is an adaptation of a Color Editor for a StyledText.
|
||||
*
|
||||
* The original editor can be found on http://www.gstaff.org/colorEditor/ <br/>
|
||||
*
|
||||
* <b>How to use it, example :</b> <br/>
|
||||
* ColorStyledText text = new ColorStyledText(parent, SWT.H_SCROLL | SWT.V_SCROLL,
|
||||
* CorePlugin.getDefault().getPreferenceStore(), ECodeLanguage.PERL.getName());</i> <br/>
|
||||
* <br/>
|
||||
*
|
||||
* $Id: ColorStyledText.java 7183 2007-11-23 11:03:36Z amaumont $
|
||||
*
|
||||
*/
|
||||
public class ColorStyledText extends StyledText {
|
||||
|
||||
private final static int MAXIMUM_CHARACTERS_BEFORE_USE_TIMER = 1000;
|
||||
|
||||
private final ColorManager colorManager;
|
||||
|
||||
private final ColoringScanner scanner;
|
||||
|
||||
private final String languageMode;
|
||||
|
||||
private final MenuItem pasteItem;
|
||||
|
||||
private boolean coloring = true;
|
||||
|
||||
private UndoRedoManager undoRedoManager;
|
||||
|
||||
public ColorStyledText(Composite parent, int style, IPreferenceStore store, String languageMode) {
|
||||
super(parent, style);
|
||||
this.languageMode = languageMode;
|
||||
this.colorManager = new ColorManager(store);
|
||||
|
||||
/*
|
||||
* set the Shortcuts of the undo/redo
|
||||
*/
|
||||
this.setKeyBinding('Z' | SWT.CTRL, ActionCode.UNDO);
|
||||
this.setKeyBinding('Y' | SWT.CTRL, ActionCode.REDO);
|
||||
UndoRedoManager undoManager = new UndoRedoManager(50);
|
||||
undoManager.connect(this);
|
||||
this.setUndoManager(undoManager);
|
||||
|
||||
ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages();
|
||||
Menu popupMenu = new Menu(this);
|
||||
|
||||
MenuItem redoItem = new MenuItem(popupMenu, SWT.PUSH);
|
||||
redoItem.setText(Messages.getString("ColorStyledText.RedoItem.Text")); //$NON-NLS-1$
|
||||
redoItem.addListener(SWT.Selection, new Listener() {
|
||||
|
||||
public void handleEvent(Event event) {
|
||||
redo();
|
||||
}
|
||||
});
|
||||
|
||||
MenuItem undoItem = new MenuItem(popupMenu, SWT.PUSH);
|
||||
undoItem.setText(Messages.getString("ColorStyledText.UndoItem.Text")); //$NON-NLS-1$
|
||||
undoItem.addListener(SWT.Selection, new Listener() {
|
||||
|
||||
public void handleEvent(Event event) {
|
||||
undo();
|
||||
}
|
||||
});
|
||||
|
||||
Image image = ImageProvider.getImage(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_COPY));
|
||||
MenuItem copyItem = new MenuItem(popupMenu, SWT.PUSH);
|
||||
copyItem.setText(Messages.getString("ColorStyledText.CopyItem.Text")); //$NON-NLS-1$
|
||||
copyItem.setImage(image);
|
||||
copyItem.addListener(SWT.Selection, new Listener() {
|
||||
|
||||
public void handleEvent(Event event) {
|
||||
copy();
|
||||
}
|
||||
});
|
||||
|
||||
image = ImageProvider.getImage(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE));
|
||||
pasteItem = new MenuItem(popupMenu, SWT.PUSH);
|
||||
pasteItem.setText(Messages.getString("ColorStyledText.PasteItem.Text")); //$NON-NLS-1$
|
||||
pasteItem.setData(this);
|
||||
pasteItem.setImage(image);
|
||||
pasteItem.addListener(SWT.Selection, new Listener() {
|
||||
|
||||
public void handleEvent(Event event) {
|
||||
paste();
|
||||
}
|
||||
});
|
||||
pasteItem.setEnabled(getEditable());
|
||||
|
||||
this.setMenu(popupMenu);
|
||||
MenuItem selectAllItem = new MenuItem(popupMenu, SWT.PUSH);
|
||||
selectAllItem.setText(Messages.getString("ColorStyledText.SelectAllItem.Text")); //$NON-NLS-1$
|
||||
selectAllItem.addListener(SWT.Selection, new Listener() {
|
||||
|
||||
public void handleEvent(Event event) {
|
||||
selectAll();
|
||||
}
|
||||
});
|
||||
this.setMenu(popupMenu);
|
||||
|
||||
Listener selectAllListener = new Listener() {
|
||||
|
||||
public void handleEvent(Event event) {
|
||||
if (event.character == '\u0001') { // CTRL + A
|
||||
selectAll();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
addListener(SWT.KeyDown, selectAllListener);
|
||||
|
||||
Mode mode = Modes.getMode(languageMode + XmlUtil.FILE_XML_SUFFIX);
|
||||
scanner = new ColoringScanner(mode, colorManager);
|
||||
|
||||
addExtendedModifyListener(modifyListener);
|
||||
}
|
||||
|
||||
/**
|
||||
* DOC qli Comment method "invokeAction".
|
||||
*
|
||||
* @param action
|
||||
*
|
||||
* */
|
||||
public void invokeAction(int action) {
|
||||
super.invokeAction(action);
|
||||
|
||||
switch (action) {
|
||||
case ActionCode.UNDO:
|
||||
undo(); // ctrl+Z
|
||||
break;
|
||||
case ActionCode.REDO:
|
||||
redo(); // ctrl+Y
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for undoRedoManager.
|
||||
*
|
||||
* @return the undoRedoManager
|
||||
*/
|
||||
public UndoRedoManager getUndoManager() {
|
||||
return this.undoRedoManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the undoRedoManager.
|
||||
*
|
||||
* @param undoRedoManager the undoRedoManager to set
|
||||
*/
|
||||
public void setUndoManager(UndoRedoManager undoRedoManager) {
|
||||
this.undoRedoManager = undoRedoManager;
|
||||
}
|
||||
|
||||
public static class ActionCode {
|
||||
|
||||
public static final int UNDO = Integer.MAX_VALUE;
|
||||
|
||||
public static final int REDO = UNDO - 1;
|
||||
|
||||
}
|
||||
|
||||
private void undo() {
|
||||
if (undoRedoManager != null) {
|
||||
undoRedoManager.undo();
|
||||
}
|
||||
}
|
||||
|
||||
private void redo() {
|
||||
if (undoRedoManager != null) {
|
||||
undoRedoManager.redo();
|
||||
}
|
||||
}
|
||||
|
||||
protected void colorize(final ColoringScanner scanner) {
|
||||
final ArrayList<StyleRange> styles = new ArrayList<StyleRange>();
|
||||
if (this.coloring) {
|
||||
IToken token;
|
||||
if (this.isDisposed()) {
|
||||
return;
|
||||
}
|
||||
|
||||
scanner.parse(this.getText().replaceAll("\"", " ").replaceAll("'", " ")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
||||
|
||||
do {
|
||||
token = scanner.nextToken();
|
||||
if (!token.isEOF()) {
|
||||
if (token instanceof CToken) {
|
||||
CToken ctoken = (CToken) token;
|
||||
StyleRange styleRange;
|
||||
styleRange = new StyleRange();
|
||||
styleRange.start = scanner.getTokenOffset();
|
||||
styleRange.length = scanner.getTokenLength();
|
||||
if (ctoken.getType() == null) {
|
||||
styleRange.fontStyle = colorManager.getStyleFor(ctoken.getColor());
|
||||
styleRange.foreground = colorManager.getColor(ctoken.getColor());
|
||||
} else {
|
||||
styleRange.fontStyle = colorManager.getStyleForType(ctoken.getColor());
|
||||
styleRange.foreground = colorManager.getColorForType(ctoken.getColor());
|
||||
}
|
||||
styles.add(styleRange);
|
||||
}
|
||||
}
|
||||
} while (!token.isEOF());
|
||||
setStyles(styles);
|
||||
} else {
|
||||
StyleRange styleRange = new StyleRange();
|
||||
styles.add(styleRange);
|
||||
styleRange.start = 0;
|
||||
styleRange.length = this.getText().getBytes().length;
|
||||
styleRange.foreground = null;
|
||||
setStyles(styles);
|
||||
}
|
||||
}
|
||||
|
||||
public void setStyles(final ArrayList<StyleRange> styles) {
|
||||
if (ColorStyledText.this.isDisposed()) {
|
||||
return;
|
||||
}
|
||||
int countChars = getCharCount();
|
||||
|
||||
for (int i = 0; i < styles.size(); i++) {
|
||||
StyleRange styleRange = styles.get(i);
|
||||
// System.out.println("styleRange.start=" + styleRange.start);
|
||||
// System.out.println("styleRange.length=" + styleRange.length);
|
||||
if (!(0 <= styleRange.start && styleRange.start + styleRange.length <= countChars)) {
|
||||
continue;
|
||||
}
|
||||
setStyleRange(styleRange);
|
||||
}
|
||||
}
|
||||
|
||||
ExtendedModifyListener modifyListener = new ExtendedModifyListener() {
|
||||
|
||||
public void modifyText(ExtendedModifyEvent event) {
|
||||
if (ColorStyledText.this.getCharCount() > MAXIMUM_CHARACTERS_BEFORE_USE_TIMER) {
|
||||
colorizeLimiter.resetTimer();
|
||||
colorizeLimiter.startIfExecutable(true, null);
|
||||
} else {
|
||||
getDisplay().asyncExec(new Runnable() {
|
||||
|
||||
public void run() {
|
||||
colorize(scanner);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
public ColorManager getColorManager() {
|
||||
return this.colorManager;
|
||||
}
|
||||
|
||||
public String getLanguageMode() {
|
||||
return this.languageMode;
|
||||
}
|
||||
|
||||
public ColoringScanner getScanner() {
|
||||
return this.scanner;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.swt.custom.StyledText#setEditable(boolean)
|
||||
*/
|
||||
@Override
|
||||
public void setEditable(boolean editable) {
|
||||
super.setEditable(editable);
|
||||
if (pasteItem != null) {
|
||||
pasteItem.setEnabled(editable);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for coloring.
|
||||
*
|
||||
* @return the coloring
|
||||
*/
|
||||
public boolean isColoring() {
|
||||
return this.coloring;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the coloring.
|
||||
*
|
||||
* @param coloring the coloring to set
|
||||
*/
|
||||
public void setColoring(boolean coloring) {
|
||||
boolean wasDifferent = this.coloring != coloring;
|
||||
this.coloring = coloring;
|
||||
if (!coloring) {
|
||||
removeExtendedModifyListener(modifyListener);
|
||||
} else if (wasDifferent) {
|
||||
colorizeLimiter.resetTimer();
|
||||
colorizeLimiter.startIfExecutable(true, null);
|
||||
addExtendedModifyListener(modifyListener);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.swt.widgets.Widget#dispose()
|
||||
*/
|
||||
@Override
|
||||
public void dispose() {
|
||||
super.dispose();
|
||||
colorManager.dispose();
|
||||
}
|
||||
|
||||
private final ExecutionLimiter colorizeLimiter = new ExecutionLimiter(1000, true) {
|
||||
|
||||
@Override
|
||||
public void execute(final boolean isFinalExecution, Object data) {
|
||||
if (!isDisposed()) {
|
||||
getDisplay().asyncExec(new Runnable() {
|
||||
|
||||
public void run() {
|
||||
colorize(scanner);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2021 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.swt.colorstyledtext;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
import org.eclipse.jface.text.rules.IToken;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.custom.ExtendedModifyEvent;
|
||||
import org.eclipse.swt.custom.ExtendedModifyListener;
|
||||
import org.eclipse.swt.custom.StyleRange;
|
||||
import org.eclipse.swt.custom.StyledText;
|
||||
import org.eclipse.swt.graphics.Image;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Event;
|
||||
import org.eclipse.swt.widgets.Listener;
|
||||
import org.eclipse.swt.widgets.Menu;
|
||||
import org.eclipse.swt.widgets.MenuItem;
|
||||
import org.eclipse.ui.ISharedImages;
|
||||
import org.eclipse.ui.PlatformUI;
|
||||
import org.talend.commons.runtime.xml.XmlUtil;
|
||||
import org.talend.commons.ui.runtime.ITalendThemeService;
|
||||
import org.talend.commons.ui.runtime.i18n.Messages;
|
||||
import org.talend.commons.ui.runtime.image.ImageProvider;
|
||||
import org.talend.commons.ui.swt.colorstyledtext.jedit.Mode;
|
||||
import org.talend.commons.ui.swt.colorstyledtext.jedit.Modes;
|
||||
import org.talend.commons.ui.swt.colorstyledtext.rules.CToken;
|
||||
import org.talend.commons.ui.swt.colorstyledtext.scanner.ColoringScanner;
|
||||
import org.talend.commons.utils.threading.ExecutionLimiter;
|
||||
|
||||
/**
|
||||
* This component is an adaptation of a Color Editor for a StyledText.
|
||||
*
|
||||
* The original editor can be found on http://www.gstaff.org/colorEditor/ <br/>
|
||||
*
|
||||
* <b>How to use it, example :</b> <br/>
|
||||
* ColorStyledText text = new ColorStyledText(parent, SWT.H_SCROLL | SWT.V_SCROLL,
|
||||
* CorePlugin.getDefault().getPreferenceStore(), ECodeLanguage.PERL.getName());</i> <br/>
|
||||
* <br/>
|
||||
*
|
||||
* $Id: ColorStyledText.java 7183 2007-11-23 11:03:36Z amaumont $
|
||||
*
|
||||
*/
|
||||
public class ColorStyledText extends StyledText {
|
||||
|
||||
|
||||
public static final String PREFERENCE_COLOR_FOREGROUND= "ColorStyledText.Color.Foreground"; //$NON-NLS-1$
|
||||
public static final String PREFERENCE_COLOR_BACKGROUND= "ColorStyledText.Color.Background"; //$NON-NLS-1$
|
||||
public static final String PREFERENCE_COLOR_SELECTION_FOREGROUND= "ColorStyledText.Color.SelectionForeground"; //$NON-NLS-1$
|
||||
public static final String PREFERENCE_COLOR_SELECTION_BACKGROUND= "ColorStyledText.Color.SelectionBackground"; //$NON-NLS-1$
|
||||
|
||||
private final static int MAXIMUM_CHARACTERS_BEFORE_USE_TIMER = 1000;
|
||||
|
||||
private final ColorManager colorManager;
|
||||
|
||||
private final ColoringScanner scanner;
|
||||
|
||||
private final String languageMode;
|
||||
|
||||
private final MenuItem pasteItem;
|
||||
|
||||
private boolean coloring = true;
|
||||
|
||||
private UndoRedoManager undoRedoManager;
|
||||
|
||||
public ColorStyledText(Composite parent, int style, IPreferenceStore store, String languageMode) {
|
||||
super(parent, style);
|
||||
this.languageMode = languageMode;
|
||||
this.colorManager = new ColorManager(store);
|
||||
|
||||
/*
|
||||
* set the Shortcuts of the undo/redo
|
||||
*/
|
||||
this.setKeyBinding('Z' | SWT.CTRL, ActionCode.UNDO);
|
||||
this.setKeyBinding('Y' | SWT.CTRL, ActionCode.REDO);
|
||||
UndoRedoManager undoManager = new UndoRedoManager(50);
|
||||
undoManager.connect(this);
|
||||
this.setUndoManager(undoManager);
|
||||
|
||||
ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages();
|
||||
Menu popupMenu = new Menu(this);
|
||||
|
||||
MenuItem redoItem = new MenuItem(popupMenu, SWT.PUSH);
|
||||
redoItem.setText(Messages.getString("ColorStyledText.RedoItem.Text")); //$NON-NLS-1$
|
||||
redoItem.addListener(SWT.Selection, new Listener() {
|
||||
|
||||
public void handleEvent(Event event) {
|
||||
redo();
|
||||
}
|
||||
});
|
||||
|
||||
MenuItem undoItem = new MenuItem(popupMenu, SWT.PUSH);
|
||||
undoItem.setText(Messages.getString("ColorStyledText.UndoItem.Text")); //$NON-NLS-1$
|
||||
undoItem.addListener(SWT.Selection, new Listener() {
|
||||
|
||||
public void handleEvent(Event event) {
|
||||
undo();
|
||||
}
|
||||
});
|
||||
|
||||
Image image = ImageProvider.getImage(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_COPY));
|
||||
MenuItem copyItem = new MenuItem(popupMenu, SWT.PUSH);
|
||||
copyItem.setText(Messages.getString("ColorStyledText.CopyItem.Text")); //$NON-NLS-1$
|
||||
copyItem.setImage(image);
|
||||
copyItem.addListener(SWT.Selection, new Listener() {
|
||||
|
||||
public void handleEvent(Event event) {
|
||||
copy();
|
||||
}
|
||||
});
|
||||
|
||||
image = ImageProvider.getImage(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE));
|
||||
pasteItem = new MenuItem(popupMenu, SWT.PUSH);
|
||||
pasteItem.setText(Messages.getString("ColorStyledText.PasteItem.Text")); //$NON-NLS-1$
|
||||
pasteItem.setData(this);
|
||||
pasteItem.setImage(image);
|
||||
pasteItem.addListener(SWT.Selection, new Listener() {
|
||||
|
||||
public void handleEvent(Event event) {
|
||||
paste();
|
||||
}
|
||||
});
|
||||
pasteItem.setEnabled(getEditable());
|
||||
|
||||
this.setMenu(popupMenu);
|
||||
MenuItem selectAllItem = new MenuItem(popupMenu, SWT.PUSH);
|
||||
selectAllItem.setText(Messages.getString("ColorStyledText.SelectAllItem.Text")); //$NON-NLS-1$
|
||||
selectAllItem.addListener(SWT.Selection, new Listener() {
|
||||
|
||||
public void handleEvent(Event event) {
|
||||
selectAll();
|
||||
}
|
||||
});
|
||||
this.setMenu(popupMenu);
|
||||
|
||||
Listener selectAllListener = new Listener() {
|
||||
|
||||
public void handleEvent(Event event) {
|
||||
if (event.character == '\u0001') { // CTRL + A
|
||||
selectAll();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
addListener(SWT.KeyDown, selectAllListener);
|
||||
|
||||
Mode mode = Modes.getMode(languageMode + XmlUtil.FILE_XML_SUFFIX);
|
||||
scanner = new ColoringScanner(mode, colorManager);
|
||||
|
||||
addExtendedModifyListener(modifyListener);
|
||||
initColorSetting();
|
||||
}
|
||||
|
||||
|
||||
protected void initColorSetting() {
|
||||
this.setForeground(ITalendThemeService.getColor(PREFERENCE_COLOR_FOREGROUND).orElse(null));
|
||||
this.setBackground(ITalendThemeService.getColor(PREFERENCE_COLOR_BACKGROUND).orElse(null));
|
||||
this.setSelectionBackground(ITalendThemeService.getColor(PREFERENCE_COLOR_SELECTION_BACKGROUND).orElse(null));
|
||||
this.setSelectionForeground(ITalendThemeService.getColor(PREFERENCE_COLOR_SELECTION_FOREGROUND).orElse(null));
|
||||
}
|
||||
|
||||
/**
|
||||
* DOC qli Comment method "invokeAction".
|
||||
*
|
||||
* @param action
|
||||
*
|
||||
* */
|
||||
public void invokeAction(int action) {
|
||||
super.invokeAction(action);
|
||||
|
||||
switch (action) {
|
||||
case ActionCode.UNDO:
|
||||
undo(); // ctrl+Z
|
||||
break;
|
||||
case ActionCode.REDO:
|
||||
redo(); // ctrl+Y
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for undoRedoManager.
|
||||
*
|
||||
* @return the undoRedoManager
|
||||
*/
|
||||
public UndoRedoManager getUndoManager() {
|
||||
return this.undoRedoManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the undoRedoManager.
|
||||
*
|
||||
* @param undoRedoManager the undoRedoManager to set
|
||||
*/
|
||||
public void setUndoManager(UndoRedoManager undoRedoManager) {
|
||||
this.undoRedoManager = undoRedoManager;
|
||||
}
|
||||
|
||||
public static class ActionCode {
|
||||
|
||||
public static final int UNDO = Integer.MAX_VALUE;
|
||||
|
||||
public static final int REDO = UNDO - 1;
|
||||
|
||||
}
|
||||
|
||||
private void undo() {
|
||||
if (undoRedoManager != null) {
|
||||
undoRedoManager.undo();
|
||||
}
|
||||
}
|
||||
|
||||
private void redo() {
|
||||
if (undoRedoManager != null) {
|
||||
undoRedoManager.redo();
|
||||
}
|
||||
}
|
||||
|
||||
protected void colorize(final ColoringScanner scanner) {
|
||||
final ArrayList<StyleRange> styles = new ArrayList<StyleRange>();
|
||||
if (this.coloring) {
|
||||
IToken token;
|
||||
if (this.isDisposed()) {
|
||||
return;
|
||||
}
|
||||
|
||||
scanner.parse(this.getText().replaceAll("\"", " ").replaceAll("'", " ")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
||||
|
||||
do {
|
||||
token = scanner.nextToken();
|
||||
if (!token.isEOF()) {
|
||||
if (token instanceof CToken) {
|
||||
CToken ctoken = (CToken) token;
|
||||
StyleRange styleRange;
|
||||
styleRange = new StyleRange();
|
||||
styleRange.start = scanner.getTokenOffset();
|
||||
styleRange.length = scanner.getTokenLength();
|
||||
if (ctoken.getType() == null) {
|
||||
styleRange.fontStyle = colorManager.getStyleFor(ctoken.getColor());
|
||||
styleRange.foreground = colorManager.getColor(ctoken.getColor());
|
||||
} else {
|
||||
styleRange.fontStyle = colorManager.getStyleForType(ctoken.getColor());
|
||||
styleRange.foreground = colorManager.getColorForType(ctoken.getColor());
|
||||
}
|
||||
styles.add(styleRange);
|
||||
}
|
||||
}
|
||||
} while (!token.isEOF());
|
||||
setStyles(styles);
|
||||
} else {
|
||||
StyleRange styleRange = new StyleRange();
|
||||
styles.add(styleRange);
|
||||
styleRange.start = 0;
|
||||
styleRange.length = this.getText().getBytes().length;
|
||||
styleRange.foreground = null;
|
||||
setStyles(styles);
|
||||
}
|
||||
}
|
||||
|
||||
public void setStyles(final ArrayList<StyleRange> styles) {
|
||||
if (ColorStyledText.this.isDisposed()) {
|
||||
return;
|
||||
}
|
||||
int countChars = getCharCount();
|
||||
|
||||
for (int i = 0; i < styles.size(); i++) {
|
||||
StyleRange styleRange = styles.get(i);
|
||||
// System.out.println("styleRange.start=" + styleRange.start);
|
||||
// System.out.println("styleRange.length=" + styleRange.length);
|
||||
if (!(0 <= styleRange.start && styleRange.start + styleRange.length <= countChars)) {
|
||||
continue;
|
||||
}
|
||||
setStyleRange(styleRange);
|
||||
}
|
||||
}
|
||||
|
||||
ExtendedModifyListener modifyListener = new ExtendedModifyListener() {
|
||||
|
||||
public void modifyText(ExtendedModifyEvent event) {
|
||||
if (ColorStyledText.this.getCharCount() > MAXIMUM_CHARACTERS_BEFORE_USE_TIMER) {
|
||||
colorizeLimiter.resetTimer();
|
||||
colorizeLimiter.startIfExecutable(true, null);
|
||||
} else {
|
||||
getDisplay().asyncExec(new Runnable() {
|
||||
|
||||
public void run() {
|
||||
colorize(scanner);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
public ColorManager getColorManager() {
|
||||
return this.colorManager;
|
||||
}
|
||||
|
||||
public String getLanguageMode() {
|
||||
return this.languageMode;
|
||||
}
|
||||
|
||||
public ColoringScanner getScanner() {
|
||||
return this.scanner;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.swt.custom.StyledText#setEditable(boolean)
|
||||
*/
|
||||
@Override
|
||||
public void setEditable(boolean editable) {
|
||||
super.setEditable(editable);
|
||||
if (pasteItem != null) {
|
||||
pasteItem.setEnabled(editable);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for coloring.
|
||||
*
|
||||
* @return the coloring
|
||||
*/
|
||||
public boolean isColoring() {
|
||||
return this.coloring;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the coloring.
|
||||
*
|
||||
* @param coloring the coloring to set
|
||||
*/
|
||||
public void setColoring(boolean coloring) {
|
||||
boolean wasDifferent = this.coloring != coloring;
|
||||
this.coloring = coloring;
|
||||
if (!coloring) {
|
||||
removeExtendedModifyListener(modifyListener);
|
||||
} else if (wasDifferent) {
|
||||
colorizeLimiter.resetTimer();
|
||||
colorizeLimiter.startIfExecutable(true, null);
|
||||
addExtendedModifyListener(modifyListener);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.swt.widgets.Widget#dispose()
|
||||
*/
|
||||
@Override
|
||||
public void dispose() {
|
||||
super.dispose();
|
||||
colorManager.dispose();
|
||||
}
|
||||
|
||||
private final ExecutionLimiter colorizeLimiter = new ExecutionLimiter(1000, true) {
|
||||
|
||||
@Override
|
||||
public void execute(final boolean isFinalExecution, Object data) {
|
||||
if (!isDisposed()) {
|
||||
getDisplay().asyncExec(new Runnable() {
|
||||
|
||||
public void run() {
|
||||
colorize(scanner);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -20,12 +20,14 @@ import org.eclipse.jface.viewers.TableViewer;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.DisposeEvent;
|
||||
import org.eclipse.swt.events.DisposeListener;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.layout.GridData;
|
||||
import org.eclipse.swt.layout.RowLayout;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Event;
|
||||
import org.eclipse.swt.widgets.Listener;
|
||||
import org.eclipse.swt.widgets.Table;
|
||||
import org.talend.commons.ui.runtime.ITalendThemeService;
|
||||
import org.talend.commons.ui.runtime.swt.tableviewer.TableViewerCreatorNotModifiable.LAYOUT_MODE;
|
||||
import org.talend.commons.ui.runtime.swt.tableviewer.selection.ILineSelectionListener;
|
||||
import org.talend.commons.ui.runtime.swt.tableviewer.selection.LineSelectionEvent;
|
||||
@@ -156,6 +158,7 @@ public abstract class AbstractExtendedTableViewer<B> extends AbstractExtendedCon
|
||||
final Table table = getTableViewerCreator().getTable();
|
||||
final ILineSelectionListener beforeLineSelectionListener = new ILineSelectionListener() {
|
||||
|
||||
@Override
|
||||
public void handle(LineSelectionEvent e) {
|
||||
if (e.selectionByMethod && !selectionHelper.isMouseSelectionning() && !forceExecuteSelectionEvent) {
|
||||
executeSelectionEvent = false;
|
||||
@@ -166,6 +169,7 @@ public abstract class AbstractExtendedTableViewer<B> extends AbstractExtendedCon
|
||||
};
|
||||
final ILineSelectionListener afterLineSelectionListener = new ILineSelectionListener() {
|
||||
|
||||
@Override
|
||||
public void handle(LineSelectionEvent e) {
|
||||
executeSelectionEvent = true;
|
||||
}
|
||||
@@ -175,6 +179,7 @@ public abstract class AbstractExtendedTableViewer<B> extends AbstractExtendedCon
|
||||
|
||||
DisposeListener disposeListener = new DisposeListener() {
|
||||
|
||||
@Override
|
||||
public void widgetDisposed(DisposeEvent e) {
|
||||
selectionHelper.removeBeforeSelectionListener(beforeLineSelectionListener);
|
||||
selectionHelper.removeAfterSelectionListener(afterLineSelectionListener);
|
||||
@@ -185,6 +190,7 @@ public abstract class AbstractExtendedTableViewer<B> extends AbstractExtendedCon
|
||||
|
||||
table.addListener(SWT.KeyUp, new Listener() {
|
||||
|
||||
@Override
|
||||
public void handleEvent(Event event) {
|
||||
|
||||
if (event.character == '\u0001') { // CTRL + A
|
||||
@@ -251,7 +257,9 @@ public abstract class AbstractExtendedTableViewer<B> extends AbstractExtendedCon
|
||||
newTableViewerCreator.setLazyLoad(TableViewerCreator.getRecommandLazyLoad());
|
||||
newTableViewerCreator.setFirstVisibleColumnIsSelection(false);
|
||||
newTableViewerCreator.setCheckboxInFirstColumn(false);
|
||||
newTableViewerCreator.setBgColorForEmptyArea(getParentComposite().getDisplay().getSystemColor(SWT.COLOR_WHITE));
|
||||
Color bgColorForEmptyArea = ITalendThemeService.getColor("org.talend.commons.ui.BgColorForEmptyArea")
|
||||
.orElse(getParentComposite().getDisplay().getSystemColor(SWT.COLOR_WHITE));
|
||||
newTableViewerCreator.setBgColorForEmptyArea(bgColorForEmptyArea);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -271,6 +279,7 @@ public abstract class AbstractExtendedTableViewer<B> extends AbstractExtendedCon
|
||||
|
||||
getExtendedTableModel().addBeforeOperationListListener(1, new IListenableListListener() {
|
||||
|
||||
@Override
|
||||
public void handleEvent(ListenableListEvent event) {
|
||||
handleBeforeListenableListOperationEvent(event);
|
||||
}
|
||||
@@ -279,6 +288,7 @@ public abstract class AbstractExtendedTableViewer<B> extends AbstractExtendedCon
|
||||
|
||||
getExtendedTableModel().addAfterOperationListListener(1, new IListenableListListener() {
|
||||
|
||||
@Override
|
||||
public void handleEvent(ListenableListEvent event) {
|
||||
handleAfterListenableListOperationEvent(event);
|
||||
}
|
||||
@@ -287,6 +297,7 @@ public abstract class AbstractExtendedTableViewer<B> extends AbstractExtendedCon
|
||||
|
||||
getExtendedTableModel().addAfterOperationListListener(100, new IListenableListListener<B>() {
|
||||
|
||||
@Override
|
||||
public void handleEvent(ListenableListEvent<B> event) {
|
||||
if (tableViewerCreator.getTable() != null && !tableViewerCreator.getTable().isDisposed()) {
|
||||
// tableViewerCreator.getTable().forceFocus();
|
||||
@@ -368,6 +379,7 @@ public abstract class AbstractExtendedTableViewer<B> extends AbstractExtendedCon
|
||||
tableViewerCreator.setInputList(getBeansList());
|
||||
new AsynchronousThreading(100, true, tableViewerCreator.getTable().getDisplay(), new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
tableViewerCreator.layout();
|
||||
}
|
||||
|
||||
@@ -16,8 +16,10 @@ import org.eclipse.jface.dialogs.MessageDialog;
|
||||
import org.eclipse.jface.viewers.ICellEditorListener;
|
||||
import org.eclipse.jface.viewers.TextCellEditor;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.graphics.Point;
|
||||
import org.eclipse.swt.widgets.Text;
|
||||
import org.talend.commons.ui.runtime.ColorConstants;
|
||||
import org.talend.commons.ui.runtime.i18n.Messages;
|
||||
import org.talend.commons.ui.runtime.swt.tableviewer.data.ModifiedObjectInfo;
|
||||
import org.talend.commons.ui.runtime.thread.AsynchronousThreading;
|
||||
@@ -39,6 +41,8 @@ public abstract class DialogErrorForCellEditorListener implements ICellEditorLis
|
||||
protected TableViewerCreatorColumn column;
|
||||
|
||||
protected TableViewerCreator tableViewerCreator;
|
||||
|
||||
private Color tableBackground = ColorConstants.getTableBackgroundColor();
|
||||
|
||||
/**
|
||||
* DOC amaumont CellEditorListener constructor comment.
|
||||
@@ -89,7 +93,7 @@ public abstract class DialogErrorForCellEditorListener implements ICellEditorLis
|
||||
final String errorMessage = validateValue(newValue, beanPosition);
|
||||
if (errorMessage == null) {
|
||||
newValidValueTyped(beanPosition, lastValidValue, newValue, state);
|
||||
text.setBackground(text.getDisplay().getSystemColor(SWT.COLOR_WHITE));
|
||||
text.setBackground(tableBackground);
|
||||
lastValidValue = newValue;
|
||||
} else {
|
||||
text.setBackground(text.getDisplay().getSystemColor(SWT.COLOR_RED));
|
||||
|
||||
@@ -1,178 +1,178 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2021 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.utils.loader;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipFile;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
|
||||
|
||||
/**
|
||||
* ggu class global comment. Detailled comment
|
||||
*/
|
||||
public class MyURLClassLoader extends URLClassLoader {
|
||||
|
||||
public static interface IAssignableClassFilter {
|
||||
|
||||
public boolean filter(URL[] urls);
|
||||
|
||||
public boolean filter(Class clazz);
|
||||
|
||||
public boolean filter(String clazzName);
|
||||
}
|
||||
|
||||
private static Logger log = Logger.getLogger(MyURLClassLoader.class);
|
||||
|
||||
private Map pclasses = new HashMap();
|
||||
|
||||
public MyURLClassLoader(String fileName) throws IOException {
|
||||
this(new File(fileName).toURL());
|
||||
}
|
||||
|
||||
public MyURLClassLoader(URL url) {
|
||||
this(new URL[] { url });
|
||||
}
|
||||
|
||||
public MyURLClassLoader(URL[] urls) {
|
||||
super(urls, Class.class.getClassLoader());
|
||||
}
|
||||
|
||||
public MyURLClassLoader(URL[] urls, ClassLoader parentLoader) {
|
||||
super(urls, parentLoader);
|
||||
}
|
||||
|
||||
public Class[] getAssignableClasses(Class type) throws IOException {
|
||||
return getAssignableClasses(type, null);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Class[] getAssignableClasses(Class type, IAssignableClassFilter filter) throws IOException {
|
||||
List classes = new ArrayList();
|
||||
URL[] urls = getURLs();
|
||||
for (URL url : urls) {
|
||||
if (filter != null && filter.filter(new URL[] { url })) {
|
||||
continue;
|
||||
}
|
||||
File file = new File(url.getFile());
|
||||
if (!file.isDirectory() && file.exists() && file.canRead()) {
|
||||
ZipFile zipFile = null;
|
||||
try {
|
||||
zipFile = new ZipFile(file);
|
||||
} catch (IOException ex) {
|
||||
ExceptionHandler.process(ex);
|
||||
}
|
||||
Enumeration<? extends ZipEntry> entries = zipFile.entries();
|
||||
while (entries.hasMoreElements()) {
|
||||
Class cls = null;
|
||||
String entryName = entries.nextElement().getName();
|
||||
String className = changeFileNameToClassName(entryName);
|
||||
if (className != null) {
|
||||
if (filter != null && filter.filter(className)) {
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
cls = loadClass(className);
|
||||
} catch (Throwable th) {
|
||||
log.warn(th);
|
||||
}
|
||||
if (cls != null) {
|
||||
if (filter != null && filter.filter(cls)) {
|
||||
continue;
|
||||
}
|
||||
if (isAssignableType(type, cls)) {
|
||||
classes.add(cls);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return (Class[]) classes.toArray(new Class[classes.size()]);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private boolean isAssignableType(Class type, Class current) {
|
||||
if (type == null || current == null || current.equals(Object.class)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (type.isAssignableFrom(current)) {
|
||||
return true;
|
||||
} else
|
||||
// sometimes can not assign the java generic, use the class url
|
||||
if (type.getName() != null && type.getName().equals(current.getName())) {
|
||||
return true;
|
||||
} else {
|
||||
//
|
||||
if (type.isInterface()) {//
|
||||
for (Class interfaceClazz : current.getInterfaces()) {
|
||||
if (interfaceClazz.equals(type)) {
|
||||
return true;
|
||||
} else {
|
||||
if (isAssignableType(type, interfaceClazz)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isAssignableType(type, current.getSuperclass())) {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
return isAssignableType(type, current.getSuperclass());
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see java.net.URLClassLoader#findClass(java.lang.String)
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
protected synchronized Class findCslass(String className) throws ClassNotFoundException {
|
||||
Class cls = (Class) pclasses.get(className);
|
||||
if (cls == null) {
|
||||
cls = super.findClass(className);
|
||||
pclasses.put(className, cls);
|
||||
}
|
||||
return cls;
|
||||
}
|
||||
|
||||
public static String changeFileNameToClassName(String name) {
|
||||
if (name == null) {
|
||||
throw new IllegalArgumentException("File Name == null");
|
||||
}
|
||||
String className = null;
|
||||
if (name.toLowerCase().endsWith(".class")) {
|
||||
className = name.replace('/', '.');
|
||||
className = className.replace('\\', '.');
|
||||
className = className.substring(0, className.length() - 6);
|
||||
}
|
||||
return className;
|
||||
}
|
||||
|
||||
protected void classHasBeenLoaded(Class cls) {
|
||||
}
|
||||
|
||||
}
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2021 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.utils.loader;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipFile;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
|
||||
|
||||
/**
|
||||
* ggu class global comment. Detailled comment
|
||||
*/
|
||||
public class MyURLClassLoader extends URLClassLoader {
|
||||
|
||||
public static interface IAssignableClassFilter {
|
||||
|
||||
public boolean filter(URL[] urls);
|
||||
|
||||
public boolean filter(Class clazz);
|
||||
|
||||
public boolean filter(String clazzName);
|
||||
}
|
||||
|
||||
private static Logger log = Logger.getLogger(MyURLClassLoader.class);
|
||||
|
||||
private Map pclasses = new HashMap();
|
||||
|
||||
public MyURLClassLoader(String fileName) throws IOException {
|
||||
this(new File(fileName).toURI().toURL());
|
||||
}
|
||||
|
||||
public MyURLClassLoader(URL url) {
|
||||
this(new URL[] { url });
|
||||
}
|
||||
|
||||
public MyURLClassLoader(URL[] urls) {
|
||||
super(urls, Class.class.getClassLoader());
|
||||
}
|
||||
|
||||
public MyURLClassLoader(URL[] urls, ClassLoader parentLoader) {
|
||||
super(urls, parentLoader);
|
||||
}
|
||||
|
||||
public Class[] getAssignableClasses(Class type) throws IOException {
|
||||
return getAssignableClasses(type, null);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Class[] getAssignableClasses(Class type, IAssignableClassFilter filter) throws IOException {
|
||||
List classes = new ArrayList();
|
||||
URL[] urls = getURLs();
|
||||
for (URL url : urls) {
|
||||
if (filter != null && filter.filter(new URL[] { url })) {
|
||||
continue;
|
||||
}
|
||||
File file = new File(url.getFile());
|
||||
if (!file.isDirectory() && file.exists() && file.canRead()) {
|
||||
ZipFile zipFile = null;
|
||||
try {
|
||||
zipFile = new ZipFile(file);
|
||||
} catch (IOException ex) {
|
||||
ExceptionHandler.process(ex);
|
||||
}
|
||||
Enumeration<? extends ZipEntry> entries = zipFile.entries();
|
||||
while (entries.hasMoreElements()) {
|
||||
Class cls = null;
|
||||
String entryName = entries.nextElement().getName();
|
||||
String className = changeFileNameToClassName(entryName);
|
||||
if (className != null) {
|
||||
if (filter != null && filter.filter(className)) {
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
cls = loadClass(className);
|
||||
} catch (Throwable th) {
|
||||
log.warn(th);
|
||||
}
|
||||
if (cls != null) {
|
||||
if (filter != null && filter.filter(cls)) {
|
||||
continue;
|
||||
}
|
||||
if (isAssignableType(type, cls)) {
|
||||
classes.add(cls);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return (Class[]) classes.toArray(new Class[classes.size()]);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private boolean isAssignableType(Class type, Class current) {
|
||||
if (type == null || current == null || current.equals(Object.class)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (type.isAssignableFrom(current)) {
|
||||
return true;
|
||||
} else
|
||||
// sometimes can not assign the java generic, use the class url
|
||||
if (type.getName() != null && type.getName().equals(current.getName())) {
|
||||
return true;
|
||||
} else {
|
||||
//
|
||||
if (type.isInterface()) {//
|
||||
for (Class interfaceClazz : current.getInterfaces()) {
|
||||
if (interfaceClazz.equals(type)) {
|
||||
return true;
|
||||
} else {
|
||||
if (isAssignableType(type, interfaceClazz)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isAssignableType(type, current.getSuperclass())) {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
return isAssignableType(type, current.getSuperclass());
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see java.net.URLClassLoader#findClass(java.lang.String)
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
protected synchronized Class findCslass(String className) throws ClassNotFoundException {
|
||||
Class cls = (Class) pclasses.get(className);
|
||||
if (cls == null) {
|
||||
cls = super.findClass(className);
|
||||
pclasses.put(className, cls);
|
||||
}
|
||||
return cls;
|
||||
}
|
||||
|
||||
public static String changeFileNameToClassName(String name) {
|
||||
if (name == null) {
|
||||
throw new IllegalArgumentException("File Name == null");
|
||||
}
|
||||
String className = null;
|
||||
if (name.toLowerCase().endsWith(".class")) {
|
||||
className = name.replace('/', '.');
|
||||
className = className.replace('\\', '.');
|
||||
className = className.substring(0, className.length() - 6);
|
||||
}
|
||||
return className;
|
||||
}
|
||||
|
||||
protected void classHasBeenLoaded(Class cls) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ import org.eclipse.swt.graphics.GC;
|
||||
import org.eclipse.swt.graphics.RGB;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.talend.commons.ui.gmf.util.DisplayUtils;
|
||||
import org.talend.commons.ui.runtime.ITalendThemeService;
|
||||
|
||||
/**
|
||||
* Figure managing some simple HTML styles. <br/>
|
||||
@@ -77,6 +78,8 @@ public class SimpleHtmlFigure extends Figure {
|
||||
private static Font boldFont = null;
|
||||
|
||||
private static Font boldItalicFont = null;
|
||||
|
||||
private static final Color DEFAULT_LABEL_COLOR = ITalendThemeService.getColor("NODE_FIGURE_LABEL_FORCEGROUND").orElse(Display.getDefault().getSystemColor(SWT.COLOR_BLACK));
|
||||
|
||||
/**
|
||||
* Constructs a new SimpleHtmlFigure.
|
||||
@@ -262,6 +265,8 @@ public class SimpleHtmlFigure extends Figure {
|
||||
label.setFont(fontToUse);
|
||||
if (colorStack.size() > 0) {
|
||||
label.setForegroundColor(colorStack.get(colorStack.size() - 1));
|
||||
} else {
|
||||
label.setForegroundColor(DEFAULT_LABEL_COLOR); // Set label default foreground color
|
||||
}
|
||||
horizContainer.add(label);
|
||||
}
|
||||
|
||||
@@ -187,10 +187,10 @@
|
||||
<RepositoryComponent
|
||||
name="GENERAL_JDBC"
|
||||
withSchema="true"
|
||||
input="tJDBCInput"
|
||||
output="tJDBCOutput">
|
||||
input="JDBCInput"
|
||||
output="JDBCOutput">
|
||||
<Item
|
||||
clazz="org.talend.core.model.properties.DatabaseConnectionItem">
|
||||
clazz="org.talend.core.model.properties.TacokitDatabaseConnectionItem">
|
||||
</Item>
|
||||
<DBType
|
||||
type="GENERAL_JDBC">
|
||||
@@ -285,6 +285,30 @@
|
||||
type="INFORMIX">
|
||||
</DBType>
|
||||
</RepositoryComponent>
|
||||
<RepositoryComponent
|
||||
name="INGRES"
|
||||
withSchema="true"
|
||||
input="tIngresInput"
|
||||
output="tIngresOutput">
|
||||
<Item
|
||||
clazz="org.talend.core.model.properties.DatabaseConnectionItem">
|
||||
</Item>
|
||||
<DBType
|
||||
type="INGRES">
|
||||
</DBType>
|
||||
</RepositoryComponent>
|
||||
<RepositoryComponent
|
||||
name="VECTORWISE"
|
||||
withSchema="true"
|
||||
input="tVectorWiseInput"
|
||||
output="tVectorWiseOutput">
|
||||
<Item
|
||||
clazz="org.talend.core.model.properties.DatabaseConnectionItem">
|
||||
</Item>
|
||||
<DBType
|
||||
type="VECTORWISE">
|
||||
</DBType>
|
||||
</RepositoryComponent>
|
||||
<RepositoryComponent
|
||||
name="JAVADB"
|
||||
withSchema="true"
|
||||
@@ -396,18 +420,7 @@
|
||||
type="ORACLESN">
|
||||
</DBType>
|
||||
</RepositoryComponent>
|
||||
<RepositoryComponent
|
||||
name="PLUSPSQL"
|
||||
withSchema="true"
|
||||
input="tPostgresPlusInput"
|
||||
output="tPostgresPlusOutput">
|
||||
<Item
|
||||
clazz="org.talend.core.model.properties.DatabaseConnectionItem">
|
||||
</Item>
|
||||
<DBType
|
||||
type="PLUSPSQL">
|
||||
</DBType>
|
||||
</RepositoryComponent>
|
||||
|
||||
<RepositoryComponent
|
||||
name="PSQL"
|
||||
withSchema="true"
|
||||
|
||||
@@ -127,14 +127,13 @@ JobletReferenceDialog.NodeTotalsTip=The totals of node reference
|
||||
JobletReferenceDialog.project=Project
|
||||
JobletReferenceDialog.ReferenceJob=Reference Job
|
||||
JobletReferenceDialog.Title=Delete the joblet failure
|
||||
ContextReferenceDialog.Title=Delete Context Group
|
||||
ContextReferenceDialog.DeleteContext.Title=Delete Context
|
||||
ContextReferenceDialog.Recycle=in Recycle Bin
|
||||
ContextReferenceDialog.ReferenceJob=Reference Objects
|
||||
ContextReferenceDialog.Types=Type
|
||||
ContextReferenceDialog.NodeTypeTip=The type of node reference
|
||||
ContextReferenceDialog.Messages=Context({0} {1}) is referenced from\:\n
|
||||
ContextReferenceDialog.kindMessages=The context group of {0} {1} is referred by the following list, if you really want to delete it, the context group is used in job will be changed to built-in when job is opened again. Would you still like to delete it?
|
||||
ContextReferenceDialog.kindMessages1=The context group of {0} {1} is referred by the following list, Would you still like to delete it?
|
||||
ContextReferenceDialog.kindMessages2=The context of {0} {1} is referred by the following list, would you still like to delete it?
|
||||
CopyToGenericSchemaHelper.cannotGenarateItem=Cannot generate pasted item label.
|
||||
ProxyRepositoryFactory.ReplaceJobHazardDescription=\nDependence on the original connection may be lost\!
|
||||
ItemReferenceDialog.title=Items which cannot be deleted
|
||||
@@ -175,6 +174,7 @@ ProjectRepositoryNode.sapBWDataStoreObject=SAP DSO
|
||||
ProjectRepositoryNode.sapBWInfoCube=SAP InfoCube
|
||||
ProjectRepositoryNode.sapBWInfoObject=SAP InfoObject
|
||||
ProjectRepositoryNode.sapContentExtractor=SAP BI Content Extractor
|
||||
ProjectRepositoryNode.sapCDSView=SAP CDS View
|
||||
RepositoryDropAdapter_copyingItems=Copying items...
|
||||
RepositoryDropAdapter_errorMsg=This directory contains the locked item,it can not be moved now
|
||||
RepositoryDropAdapter_lockedByOthers=This item is locked by other users, it can not be moved now.
|
||||
@@ -204,3 +204,4 @@ RenameFolderAction.warning.cannotFind.title=Action not available
|
||||
ConvertJobsUtil.warning.title=Warning
|
||||
ConvertJobsUtil.warning.message=The target framework is not fully supported for this release.
|
||||
SyncLibrariesLoginTask.createStatsLogAndImplicitParamter=Create stats log and implicit parameters
|
||||
WizardPageAPIDefinition_operationIdMissing=API is missing operationIds. operationIds are used to initialize tRESTRequest/cRest output flows. See tRESTRequest/cRest online help.
|
||||
|
||||
@@ -127,14 +127,13 @@ JobletReferenceDialog.NodeTotalsTip=Total des r\u00E9f\u00E9rences des noeuds
|
||||
JobletReferenceDialog.project=Projet
|
||||
JobletReferenceDialog.ReferenceJob=Job de r\u00E9f\u00E9rence
|
||||
JobletReferenceDialog.Title=Supprimer l'\u00E9chec du Joblet
|
||||
ContextReferenceDialog.Title=Supprimer le groupe de contextes
|
||||
ContextReferenceDialog.DeleteContext.Title=Supprimer le contexte
|
||||
ContextReferenceDialog.Recycle=dans la Corbeille
|
||||
ContextReferenceDialog.ReferenceJob=Objets de r\u00E9f\u00E9rence
|
||||
ContextReferenceDialog.Types=Type
|
||||
ContextReferenceDialog.NodeTypeTip=Type de r\u00E9f\u00E9rences du n\u0153ud
|
||||
ContextReferenceDialog.Messages=Le contexte({0} {1}) est r\u00E9f\u00E9renc\u00E9 dans :\n
|
||||
ContextReferenceDialog.kindMessages=Le groupe de contextes de {0} {1} est r\u00E9f\u00E9renc\u00E9 par la liste suivante. Si vous souhaitez le supprimer, le groupe de contextes du Job sera chang\u00E9 en Built-In \u00E0 la prochaine ouverture du Job. Le supprimer malgr\u00E9 tout ?
|
||||
ContextReferenceDialog.kindMessages1=Le groupe de contextes {0} {1} est r\u00E9f\u00E9renc\u00E9 par la liste suivante. Le supprimer malgr\u00E9 tout ?
|
||||
ContextReferenceDialog.kindMessages2=Les \u00E9l\u00E9ments de la liste suivante font r\u00E9f\u00E9rence au contexte de {0} {1} . Souhaitez-vous quand m\u00EAme le supprimer\u00A0?
|
||||
CopyToGenericSchemaHelper.cannotGenarateItem=Impossible de g\u00E9n\u00E9rer le libell\u00E9 de l'\u00E9l\u00E9ment coll\u00E9.
|
||||
ProxyRepositoryFactory.ReplaceJobHazardDescription=\nLes d\u00E9pendances envers la connexion originale peuvent \u00EAtre perdues.
|
||||
ItemReferenceDialog.title=\u00C9lements ne pouvant \u00EAtre supprim\u00E9s
|
||||
@@ -156,6 +155,7 @@ ProjectRepositoryNode.invalidItem=\u00C9l\u00E9ment invalide
|
||||
ProjectRepositoryNode.columns=Colonnes
|
||||
ProjectRepositoryNode.validationRules=R\u00E8gles de validation
|
||||
ProjectRepositoryNode.cdcFoundation=Fondation CDC
|
||||
ProjectRepositoryNode.cdcFoundation.deprecated=Fondation CDC (d\u00E9pr\u00E9ci\u00E9)
|
||||
ProjectRepositoryNode.genericSchema=Sch\u00E9mas g\u00E9n\u00E9riques
|
||||
ProjectRepositoryNode.queries=Requ\u00EAtes
|
||||
ProjectRepositoryNode.synonymSchemas=Sch\u00E9mas synonymes
|
||||
@@ -175,6 +175,7 @@ ProjectRepositoryNode.sapBWDataStoreObject=Objet Data Store SAP
|
||||
ProjectRepositoryNode.sapBWInfoCube=InfoCube SAP
|
||||
ProjectRepositoryNode.sapBWInfoObject=InfoObject SAP
|
||||
ProjectRepositoryNode.sapContentExtractor=Extracteur SAP BI Content
|
||||
ProjectRepositoryNode.sapCDSView=Vue SAP CDS
|
||||
RepositoryDropAdapter_copyingItems=Copie des \u00E9l\u00E9ments...
|
||||
RepositoryDropAdapter_errorMsg=Ce r\u00E9pertoire contient l'\u00E9l\u00E9ment verrouill\u00E9, il ne peut \u00EAtre d\u00E9plac\u00E9
|
||||
RepositoryDropAdapter_lockedByOthers=Cet \u00E9l\u00E9ment est verrouill\u00E9 par d'autres utilisateurs, impossible de le d\u00E9placer.
|
||||
@@ -204,3 +205,4 @@ RenameFolderAction.warning.cannotFind.title=Action non disponible
|
||||
ConvertJobsUtil.warning.title=Avertissement
|
||||
ConvertJobsUtil.warning.message=Le framework cible n'est pas totalement support\u00E9 dans cette version.
|
||||
SyncLibrariesLoginTask.createStatsLogAndImplicitParamter=Cr\u00E9er des logs de stat et des param\u00E8tres implicites.
|
||||
WizardPageAPIDefinition_operationIdMissing=Des operationIds manquent dans l'API. Ces operationIds sont utilis\u00E9s pour initialiser les flux de sortie du tRESTRequest/cRest. Consultez l'aide en ligne des composants tRESTRequest/cRest.
|
||||
|
||||
@@ -56,7 +56,7 @@ PropertiesWizardPage.Locker=\u30ED\u30C3\u30AF\u4FDD\u6301\u8005
|
||||
PropertiesWizardPage.Description=\u8AAC\u660E
|
||||
PropertiesWizardPage.EmptyDescWarning=\u8AAC\u660E\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u5165\u529B\u3092\u63A8\u5968\u3057\u307E\u3059\u3002
|
||||
PropertiesWizardPage.EmptyPurposeWarning=\u76EE\u7684\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u5165\u529B\u3092\u63A8\u5968\u3057\u307E\u3059
|
||||
PropertiesWizardPage.ItemExistsError=\u30A2\u30A4\u30C6\u30E0\u304C\u5B58\u5728\u3057\u307E\u3059\u3002\u3054\u307F\u7BB1\u3092\u78BA\u8A8D\u3057\u3066\u7A7A\u306B\u3057\u3066\u304F\u3060\u3055\u3044\u3002
|
||||
PropertiesWizardPage.ItemExistsError=\u9805\u76EE\u304C\u5B58\u5728\u3057\u307E\u3059\u3002\u3054\u307F\u7BB1\u3092\u78BA\u8A8D\u3057\u3066\u7A7A\u306B\u3057\u3066\u304F\u3060\u3055\u3044\u3002
|
||||
PropertiesWizardPage.KeywordsError=\u540D\u524D\u304C\u6709\u52B9\u306AID\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
|
||||
PropertiesWizardPage.Name=\u540D\u524D
|
||||
PropertiesWizardPage.NameEmptyError=\u540D\u524D\u304C\u7A7A\u3067\u3059\u3002
|
||||
@@ -127,14 +127,13 @@ JobletReferenceDialog.NodeTotalsTip=\u30CE\u30FC\u30C9\u53C2\u7167\u306E\u5408\u
|
||||
JobletReferenceDialog.project=\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8
|
||||
JobletReferenceDialog.ReferenceJob=\u53C2\u7167\u30B8\u30E7\u30D6
|
||||
JobletReferenceDialog.Title=\u30B8\u30E7\u30D6\u30EC\u30C3\u30C8\u306E\u5931\u6557\u3092\u524A\u9664
|
||||
ContextReferenceDialog.Title=\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30B0\u30EB\u30FC\u30D7\u3092\u524A\u9664
|
||||
ContextReferenceDialog.DeleteContext.Title=\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306E\u524A\u9664
|
||||
ContextReferenceDialog.Recycle=\u3054\u307F\u7BB1\u5185
|
||||
ContextReferenceDialog.ReferenceJob=\u53C2\u7167\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8
|
||||
ContextReferenceDialog.Types=\u30BF\u30A4\u30D7
|
||||
ContextReferenceDialog.NodeTypeTip=\u30CE\u30FC\u30C9\u53C2\u7167\u306E\u30BF\u30A4\u30D7
|
||||
ContextReferenceDialog.Messages=\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8({0} {1})\u306E\u53C2\u7167\u5143:\n
|
||||
ContextReferenceDialog.kindMessages={0} {1}\u306E\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30B0\u30EB\u30FC\u30D7\u306F\u6B21\u306E\u30EA\u30B9\u30C8\u306B\u53C2\u7167\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u524A\u9664\u3057\u305F\u3044\u5834\u5408\u306F\u3001\u30B8\u30E7\u30D6\u304C\u3082\u3046\u4E00\u5EA6\u958B\u304B\u308C\u305F\u6642\u306B\u3001\u30B8\u30E7\u30D6\u3067\u4F7F\u7528\u3055\u308C\u308B\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30B0\u30EB\u30FC\u30D7\u306F\u7D44\u307F\u8FBC\u307F\u306B\u5909\u63DB\u3055\u308C\u307E\u3059\u3002\u524A\u9664\u3057\u307E\u3059\u304B?
|
||||
ContextReferenceDialog.kindMessages1={0} {1}\u306E\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30B0\u30EB\u30FC\u30D7\u304C\u4EE5\u4E0B\u306E\u30EA\u30B9\u30C8\u306B\u53C2\u7167\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u524A\u9664\u3057\u307E\u3059\u304B?
|
||||
ContextReferenceDialog.kindMessages2={0}{1}\u306E\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304C\u6B21\u306E\u30EA\u30B9\u30C8\u306B\u53C2\u7167\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u524A\u9664\u3057\u307E\u3059\u304B?
|
||||
CopyToGenericSchemaHelper.cannotGenarateItem=\u8CBC\u4ED8\u3051\u3055\u308C\u305F\u30A2\u30A4\u30C6\u30E0\u30E9\u30D9\u30EB\u3092\u751F\u6210\u3067\u304D\u307E\u305B\u3093\u3002
|
||||
ProxyRepositoryFactory.ReplaceJobHazardDescription=\n\u5143\u306E\u63A5\u7D9A\u3078\u306E\u4F9D\u5B58\u304C\u5931\u308F\u308C\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059!
|
||||
ItemReferenceDialog.title=\u524A\u9664\u3067\u304D\u306A\u3044\u30A2\u30A4\u30C6\u30E0
|
||||
@@ -156,7 +155,7 @@ ProjectRepositoryNode.invalidItem=\u7121\u52B9\u306A\u30A2\u30A4\u30C6\u30E0
|
||||
ProjectRepositoryNode.columns=\u30AB\u30E9\u30E0
|
||||
ProjectRepositoryNode.validationRules=\u691C\u8A3C\u30EB\u30FC\u30EB
|
||||
ProjectRepositoryNode.cdcFoundation=CDC Foundation
|
||||
ProjectRepositoryNode.genericSchema=\u6C4E\u7528\u30B9\u30AD\u30FC\u30DE
|
||||
ProjectRepositoryNode.genericSchema=\u30B8\u30A7\u30CD\u30EA\u30C3\u30AF\u30B9\u30AD\u30FC\u30DE
|
||||
ProjectRepositoryNode.queries=\u30AF\u30A8\u30EA\u30FC
|
||||
ProjectRepositoryNode.synonymSchemas=\u30B7\u30CE\u30CB\u30E0\u30B9\u30AD\u30FC\u30DE
|
||||
ProjectRepositoryNode.calculationViewSchemas=\u8A08\u7B97\u30D3\u30E5\u30FC\u30B9\u30AD\u30FC\u30DE
|
||||
@@ -175,6 +174,7 @@ ProjectRepositoryNode.sapBWDataStoreObject=SAP DSO
|
||||
ProjectRepositoryNode.sapBWInfoCube=SAP InfoCube
|
||||
ProjectRepositoryNode.sapBWInfoObject=SAP InfoObject
|
||||
ProjectRepositoryNode.sapContentExtractor=SAP BI\u30B3\u30F3\u30C6\u30F3\u30C4\u30A8\u30AF\u30B9\u30C8\u30E9\u30AF\u30BF\u30FC
|
||||
ProjectRepositoryNode.sapCDSView=SAP CDS\u30D3\u30E5\u30FC
|
||||
RepositoryDropAdapter_copyingItems=\u30A2\u30A4\u30C6\u30E0\u3092\u30B3\u30D4\u30FC\u4E2D...
|
||||
RepositoryDropAdapter_errorMsg=\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u30FC\u306B\u30ED\u30C3\u30AF\u3055\u308C\u305F\u30A2\u30A4\u30C6\u30E0\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059\u3002\u73FE\u5728\u3001\u79FB\u52D5\u3067\u304D\u307E\u305B\u3093,
|
||||
RepositoryDropAdapter_lockedByOthers=\u3053\u306E\u30A2\u30A4\u30C6\u30E0\u304C\u4ED6\u306E\u30E6\u30FC\u30B6\u30FC\u306B\u3088\u3063\u3066\u30ED\u30C3\u30AF\u3055\u308C\u307E\u3057\u305F\u3002\u73FE\u5728\u3001\u79FB\u52D5\u3067\u304D\u307E\u305B\u3093\u3002
|
||||
@@ -204,3 +204,4 @@ RenameFolderAction.warning.cannotFind.title=\u4F7F\u7528\u3067\u304D\u306A\u3044
|
||||
ConvertJobsUtil.warning.title=\u8B66\u544A
|
||||
ConvertJobsUtil.warning.message=\u3053\u306E\u30EA\u30EA\u30FC\u30B9\u3067\u306F\u3001\u30BF\u30FC\u30B2\u30C3\u30C8\u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF\u304C\u5B8C\u5168\u306B\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
|
||||
SyncLibrariesLoginTask.createStatsLogAndImplicitParamter=\u7D71\u8A08\u30ED\u30B0\u3068\u6697\u9ED9\u7684\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u3092\u4F5C\u6210
|
||||
WizardPageAPIDefinition_operationIdMissing=API\u3067operationIds\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002operationIds\u306F\u3001tRESTRequest/cRest\u51FA\u529B\u30D5\u30ED\u30FC\u3092\u521D\u671F\u5316\u3059\u308B\u305F\u3081\u306B\u4F7F\u308F\u308C\u307E\u3059\u3002tRESTRequest/cRest\u306E\u30AA\u30F3\u30E9\u30A4\u30F3\u30D8\u30EB\u30D7\u3092\u3054\u89A7\u304F\u3060\u3055\u3044\u3002
|
||||
|
||||
@@ -127,14 +127,13 @@ JobletReferenceDialog.NodeTotalsTip=\u8282\u70B9\u5F15\u7528\u603B\u6570
|
||||
JobletReferenceDialog.project=\u5DE5\u7A0B
|
||||
JobletReferenceDialog.ReferenceJob=\u5F15\u7528\u4F5C\u4E1A
|
||||
JobletReferenceDialog.Title=\u5220\u9664\u5C0F\u4F5C\u4E1A\u5931\u8D25
|
||||
ContextReferenceDialog.Title=\u5220\u9664\u73AF\u5883\u7EC4
|
||||
ContextReferenceDialog.DeleteContext.Title=\u5220\u9664\u4E0A\u4E0B\u6587
|
||||
ContextReferenceDialog.Recycle=\u5728\u56DE\u6536\u7AD9
|
||||
ContextReferenceDialog.ReferenceJob=\u5F15\u7528\u5BF9\u8C61
|
||||
ContextReferenceDialog.Types=\u7C7B\u578B
|
||||
ContextReferenceDialog.NodeTypeTip=\u8282\u70B9\u5F15\u7528\u7684\u7C7B\u578B
|
||||
ContextReferenceDialog.Messages=\u4E0A\u4E0B\u6587 ({0} {1}) \u5F15\u7528\u81EA\uFF1A\n
|
||||
ContextReferenceDialog.kindMessages={0} {1} \u7684\u4E0A\u4E0B\u6587\u7EC4\u88AB\u4EE5\u4E0B\u5217\u8868\u5F15\u7528\uFF0C\u5982\u679C\u786E\u5B9E\u60F3\u8981\u5C06\u5176\u5220\u9664\uFF0C\u518D\u6B21\u6253\u5F00\u4F5C\u4E1A\u65F6\uFF0C\u4F5C\u4E1A\u4E2D\u6240\u7528\u7684\u4E0A\u4E0B\u6587\u7EC4\u5C06\u6539\u4E3A\u5185\u7F6E\u3002\u662F\u5426\u4ECD\u60F3\u5C06\u5176\u5220\u9664\uFF1F
|
||||
ContextReferenceDialog.kindMessages1={0} {1} \u7684\u4E0A\u4E0B\u6587\u7EC4\u88AB\u4EE5\u4E0B\u5217\u8868\u5F15\u7528\uFF0C\u662F\u5426\u4ECD\u60F3\u5C06\u5176\u5220\u9664\uFF1F
|
||||
ContextReferenceDialog.kindMessages2={0} {1} \u7684\u4E0A\u4E0B\u6587\u7EC4\u4EE5\u4E0B\u5217\u8868\u5F15\u7528\uFF0C\u662F\u5426\u4ECD\u60F3\u5C06\u5176\u5220\u9664\uFF1F
|
||||
CopyToGenericSchemaHelper.cannotGenarateItem=\u65E0\u6CD5\u751F\u6210\u7C98\u8D34\u9879\u76EE\u6807\u7B7E\u3002
|
||||
ProxyRepositoryFactory.ReplaceJobHazardDescription=\n\u5BF9\u539F\u59CB\u8FDE\u63A5\u7684\u4F9D\u8D56\u53EF\u80FD\u4F1A\u4E22\u5931\uFF01
|
||||
ItemReferenceDialog.title=\u65E0\u6CD5\u5220\u9664\u7684\u9879\u76EE
|
||||
@@ -156,6 +155,7 @@ ProjectRepositoryNode.invalidItem=\u65E0\u6548\u9879\u76EE
|
||||
ProjectRepositoryNode.columns=\u5217
|
||||
ProjectRepositoryNode.validationRules=\u9A8C\u8BC1\u89C4\u5219
|
||||
ProjectRepositoryNode.cdcFoundation=CDC Foundation
|
||||
ProjectRepositoryNode.cdcFoundation.deprecated=CDC Foundation (\u5DF2\u5F03\u7528)
|
||||
ProjectRepositoryNode.genericSchema=\u901A\u7528 schema
|
||||
ProjectRepositoryNode.queries=\u67E5\u8BE2
|
||||
ProjectRepositoryNode.synonymSchemas=\u540C\u4E49\u5B57 schema
|
||||
@@ -175,6 +175,7 @@ ProjectRepositoryNode.sapBWDataStoreObject=SAP DSO
|
||||
ProjectRepositoryNode.sapBWInfoCube=SAP InfoCube
|
||||
ProjectRepositoryNode.sapBWInfoObject=SAP InfoObject
|
||||
ProjectRepositoryNode.sapContentExtractor=SAP BI \u5185\u5BB9\u63D0\u53D6\u5668
|
||||
ProjectRepositoryNode.sapCDSView=SAP CDS \u89C6\u56FE
|
||||
RepositoryDropAdapter_copyingItems=\u6B63\u5728\u590D\u5236\u9879\u76EE...
|
||||
RepositoryDropAdapter_errorMsg=\u6B64\u76EE\u5F55\u5305\u542B\u9501\u5B9A\u7684\u9879\u76EE\uFF0C\u73B0\u5728\u65E0\u6CD5\u79FB\u52A8
|
||||
RepositoryDropAdapter_lockedByOthers=\u6B64\u9879\u76EE\u88AB\u5176\u4ED6\u7528\u6237\u9501\u5B9A\uFF0C\u73B0\u5728\u65E0\u6CD5\u79FB\u52A8\u3002
|
||||
@@ -204,3 +205,4 @@ RenameFolderAction.warning.cannotFind.title=\u64CD\u4F5C\u4E0D\u53EF\u7528
|
||||
ConvertJobsUtil.warning.title=\u8B66\u544A
|
||||
ConvertJobsUtil.warning.message=\u6B64\u7248\u672C\u4E0D\u5B8C\u5168\u652F\u6301\u76EE\u6807\u6846\u67B6.
|
||||
SyncLibrariesLoginTask.createStatsLogAndImplicitParamter=\u521B\u5EFA\u7EDF\u8BA1\u65E5\u5FD7\u548C\u9690\u5F0F\u53C2\u6570
|
||||
WizardPageAPIDefinition_operationIdMissing=API \u7F3A\u5931 operationId \u53C2\u6570\uFF0C\u8FD9\u4E9B operationId \u53C2\u6570\u7528\u6765\u521D\u59CB\u5316 tRESTRequest \u6216 cRest \u8F93\u51FA\u6D41\u3002\u8BF7\u53C2\u89C1 tRESTRequest \u6216 cRest \u5728\u7EBF\u5E2E\u52A9\u6587\u6863\u3002
|
||||
|
||||
@@ -130,7 +130,7 @@ public abstract class AbstractEMFRepositoryFactory extends AbstractRepositoryFac
|
||||
ERepositoryObjectType.METADATA_FILE_RULES, ERepositoryObjectType.METADATA_FILE_HL7,
|
||||
ERepositoryObjectType.METADATA_FILE_FTP, ERepositoryObjectType.METADATA_FILE_BRMS,
|
||||
ERepositoryObjectType.METADATA_MDMCONNECTION, ERepositoryObjectType.METADATA_HEADER_FOOTER,
|
||||
ERepositoryObjectType.JOB_SCRIPT };
|
||||
ERepositoryObjectType.JOB_SCRIPT, ERepositoryObjectType.METADATA_BIGQUERYCONNECTIONS };
|
||||
|
||||
List<IRepositoryViewObject> deletedItems = new ArrayList<IRepositoryViewObject>();
|
||||
for (ERepositoryObjectType type : types) {
|
||||
@@ -260,6 +260,7 @@ public abstract class AbstractEMFRepositoryFactory extends AbstractRepositoryFac
|
||||
if (type == ERepositoryObjectType.METADATA_CON_TABLE) {
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean isAllowMultipleName = (type == ERepositoryObjectType.SQLPATTERNS || type == ERepositoryObjectType.METADATA_FILE_XML);
|
||||
String path = "";
|
||||
if (item.getState() != null) {
|
||||
@@ -872,25 +873,38 @@ public abstract class AbstractEMFRepositoryFactory extends AbstractRepositoryFac
|
||||
@Override
|
||||
public IRepositoryViewObject getLastVersion(Project project, String id, String relativeFolder, ERepositoryObjectType type)
|
||||
throws PersistenceException {
|
||||
List<IRepositoryViewObject> serializableAllVersion = null;
|
||||
Object fullFolder = getFullFolder(project, type, relativeFolder);
|
||||
serializableAllVersion = getSerializableFromFolder(project, fullFolder, id, type, false, false, true, true);
|
||||
List<IRepositoryViewObject> serializableAllVersion = new ArrayList<>();
|
||||
if (lastFolderForItemMap.containsKey(id)) {
|
||||
ERepositoryObjectType itemType = lastRepositoryTypeForItemMap.get(id);
|
||||
String currentPath = lastFolderForItemMap.get(id);
|
||||
Object fullFolder = getFullFolder(project, itemType, currentPath);
|
||||
try {
|
||||
if (fullFolder != null && (fullFolder instanceof FolderItem || ((IFolder) fullFolder).exists())) {
|
||||
serializableAllVersion.addAll(getSerializableFromFolder(project, fullFolder, id, itemType, false, false, true, true));
|
||||
}
|
||||
} catch (PersistenceException e) {
|
||||
// do nothing.
|
||||
// if any exception happen or can't find the item, just try to look for it everywhere.
|
||||
}
|
||||
}
|
||||
if (serializableAllVersion.isEmpty()) {
|
||||
// look in all folders for this item type
|
||||
serializableAllVersion = getSerializableFromFolder(project, fullFolder, id, type, false, true, true, true, true);
|
||||
Object fullFolder = getFullFolder(project, type, relativeFolder);
|
||||
serializableAllVersion = getSerializableFromFolder(project, fullFolder, id, type, false, false, true, true);
|
||||
if (serializableAllVersion.isEmpty()) {
|
||||
// look in all folders for this item type
|
||||
serializableAllVersion = getSerializableFromFolder(project, fullFolder, id, type, false, true, true, true, true);
|
||||
}
|
||||
}
|
||||
int size = serializableAllVersion.size();
|
||||
|
||||
if (size > 1) {
|
||||
String message = getItemsMessages(serializableAllVersion, size);
|
||||
|
||||
throw new PersistenceException(Messages.getString(
|
||||
"AbstractEMFRepositoryFactory.presistenceException.OnlyOneOccurenceMustbeFound", message)); //$NON-NLS-1$
|
||||
} else if (size == 1) {
|
||||
return serializableAllVersion.get(0);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
if (size == 1) {
|
||||
return serializableAllVersion.get(0);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
protected void computePropertyMaxInformationLevel(Property property) {
|
||||
|
||||
@@ -184,6 +184,7 @@ public abstract class AbstractRepositoryFactory implements IRepositoryFactory {
|
||||
collect(getMetadata(project, ERepositoryObjectType.METADATA_FILE_LDIF), result);
|
||||
collect(getMetadata(project, ERepositoryObjectType.METADATA_CONNECTIONS), result);
|
||||
collect(getMetadata(project, ERepositoryObjectType.METADATA_SAPCONNECTIONS), result);
|
||||
collect(getMetadata(project, ERepositoryObjectType.METADATA_BIGQUERYCONNECTIONS), result);
|
||||
collect(getMetadata(project, ERepositoryObjectType.METADATA_HEADER_FOOTER), result);
|
||||
collect(getMetadata(project, ERepositoryObjectType.METADATA_LDAP_SCHEMA), result);
|
||||
collect(getMetadata(project, ERepositoryObjectType.METADATA_GENERIC_SCHEMA), result);
|
||||
|
||||
@@ -35,6 +35,7 @@ import org.eclipse.jface.preference.IPreferenceStore;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.commons.runtime.model.repository.ERepositoryStatus;
|
||||
import org.talend.commons.runtime.service.ITaCoKitService;
|
||||
import org.talend.commons.ui.runtime.exception.RuntimeExceptionHandler;
|
||||
import org.talend.commons.ui.runtime.image.ECoreImage;
|
||||
import org.talend.commons.ui.runtime.repository.IExtendRepositoryNode;
|
||||
@@ -92,9 +93,11 @@ import org.talend.core.repository.model.repositoryObject.SAPIDocRepositoryObject
|
||||
import org.talend.core.repository.model.repositoryObject.SalesforceModuleRepositoryObject;
|
||||
import org.talend.core.repository.recyclebin.RecycleBinManager;
|
||||
import org.talend.core.repository.ui.utils.ProjectRepositoryNodeCache;
|
||||
import org.talend.core.repository.utils.RepositoryNodeManager;
|
||||
import org.talend.core.runtime.services.IGenericDBService;
|
||||
import org.talend.core.runtime.services.IGenericService;
|
||||
import org.talend.core.runtime.services.IGenericWizardService;
|
||||
import org.talend.core.service.ITCKUIService;
|
||||
import org.talend.core.ui.ICDCProviderService;
|
||||
import org.talend.core.ui.ITestContainerProviderService;
|
||||
import org.talend.core.ui.branding.IBrandingService;
|
||||
@@ -102,6 +105,7 @@ import org.talend.cwm.helper.ConnectionHelper;
|
||||
import org.talend.cwm.helper.SAPBWTableHelper;
|
||||
import org.talend.cwm.helper.SubItemHelper;
|
||||
import org.talend.cwm.helper.TableHelper;
|
||||
import org.talend.cwm.helper.TaggedValueHelper;
|
||||
import org.talend.designer.core.IDesignerCoreService;
|
||||
import org.talend.repository.ProjectManager;
|
||||
import org.talend.repository.model.BinRepositoryNode;
|
||||
@@ -645,7 +649,9 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (RepositoryNodeManager.isSnowflake(currentType)) {
|
||||
continue;
|
||||
}
|
||||
if (currentType != null) {
|
||||
buildFolders(rootNode, currentType, folderPath, rootNode);
|
||||
}
|
||||
@@ -818,7 +824,8 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
|
||||
* @return
|
||||
*/
|
||||
private RepositoryNode getFolder(ERepositoryObjectType currentType, String path, List<IRepositoryNode> rootNodes) {
|
||||
if (RepositoryNodeUtilities.isGenericDBExtraType(currentType)) {
|
||||
if (RepositoryNodeUtilities.isGenericDBExtraType(currentType) || RepositoryNodeManager.isSnowflake(currentType)
|
||||
|| (ITaCoKitService.getInstance() != null && ITaCoKitService.getInstance().isTaCoKitType(currentType))) {
|
||||
currentType = ERepositoryObjectType.METADATA_CONNECTIONS;
|
||||
}
|
||||
if (path == null || path.isEmpty()) {
|
||||
@@ -1329,7 +1336,7 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
|
||||
|
||||
}
|
||||
|
||||
private void addNode(RepositoryNode parent, ERepositoryObjectType type, IRepositoryViewObject repositoryObject,
|
||||
public void addNode(RepositoryNode parent, ERepositoryObjectType type, IRepositoryViewObject repositoryObject,
|
||||
List<IRepositoryViewObject> validationRules) {
|
||||
|
||||
boolean isAvaliableInTOS = true; // this flag filter the databaseconnections which didn't supported by TOS but
|
||||
@@ -1339,16 +1346,22 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
|
||||
Connection conn = ((ConnectionItem) repositoryObject.getProperty().getItem()).getConnection();
|
||||
if(conn instanceof DatabaseConnection){
|
||||
dbMetadataConnection = (DatabaseConnection) conn;
|
||||
isAvaliableInTOS = EDatabaseTypeName.getTypeFromDbType(dbMetadataConnection.getDatabaseType(), false) == null ? false
|
||||
: true;
|
||||
if (ERepositoryObjectType.JDBC == repositoryObject.getRepositoryObjectType()
|
||||
&& ERepositoryObjectType.JDBC.getType().equals(dbMetadataConnection.getProductId())) {
|
||||
// hide tcompv0 jdbc node
|
||||
// remove the 2nd condition if later we need to migrate Delta Lake and SingleStore
|
||||
return;
|
||||
}
|
||||
isAvaliableInTOS = EDatabaseTypeName.getTypeFromDbType(dbMetadataConnection.getDatabaseType(), false) != null;
|
||||
}
|
||||
}
|
||||
|
||||
Connection connection = null;
|
||||
if (type == ERepositoryObjectType.METADATA_CONNECTIONS && isAvaliableInTOS) {
|
||||
connection = dbMetadataConnection;
|
||||
} else if (type == ERepositoryObjectType.METADATA_SAPCONNECTIONS) {
|
||||
connection = ((ConnectionItem) repositoryObject.getProperty().getItem()).getConnection();
|
||||
} else if (type == ERepositoryObjectType.METADATA_BIGQUERYCONNECTIONS) {
|
||||
connection = ((ConnectionItem) repositoryObject.getProperty().getItem()).getConnection();
|
||||
} else if (type == ERepositoryObjectType.METADATA_FILE_DELIMITED) {
|
||||
connection = ((ConnectionItem) repositoryObject.getProperty().getItem()).getConnection();
|
||||
} else if (type == ERepositoryObjectType.METADATA_FILE_POSITIONAL) {
|
||||
@@ -1407,22 +1420,32 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isAvaliableInTOS) {
|
||||
if (isAvaliableInTOS && node != null) {
|
||||
parent.getChildren().add(node);
|
||||
}
|
||||
}
|
||||
|
||||
if (null != connection) {
|
||||
if (null != connection && node != null) {
|
||||
createTables(node, repositoryObject, connection, validationRules);
|
||||
}
|
||||
|
||||
for (IRepositoryContentHandler handler : RepositoryContentManager.getHandlers()) {
|
||||
handler.addNode(type, recBinNode, repositoryObject, node);
|
||||
if (node != null) {
|
||||
for (IRepositoryContentHandler handler : RepositoryContentManager.getHandlers()) {
|
||||
handler.addNode(type, recBinNode, repositoryObject, node);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private RepositoryNode createRepositoryNode(RepositoryNode parent, ERepositoryObjectType repObjType,
|
||||
IRepositoryViewObject repositoryObject, Connection connection) {
|
||||
if (ERepositoryObjectType.METADATA_TACOKIT_JDBC.equals(repositoryObject.getRepositoryObjectType()) && ITCKUIService.get() != null) {
|
||||
try {
|
||||
return ITCKUIService.get().createTaCoKitRepositoryNode(parent, repObjType, repositoryObject, connection);
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
RepositoryNode node = new RepositoryNode(repositoryObject, parent, ENodeType.REPOSITORY_ELEMENT);
|
||||
|
||||
node.setProperties(EProperties.CONTENT_TYPE, repObjType);
|
||||
@@ -1589,7 +1612,7 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
|
||||
return objs;
|
||||
}
|
||||
|
||||
private void createTables(RepositoryNode node, final IRepositoryViewObject repObj, Connection metadataConnection,
|
||||
public void createTables(RepositoryNode node, final IRepositoryViewObject repObj, Connection metadataConnection,
|
||||
List<IRepositoryViewObject> validationRules) {
|
||||
|
||||
// // 5.GENERIC SCHEMAS
|
||||
@@ -1751,6 +1774,9 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
|
||||
|
||||
// 10. BW Business Content Extractor:
|
||||
createSAPContentExtractorNodes(repObj, metadataConnection, node, validationRules);
|
||||
|
||||
// 11. CDS views:
|
||||
createSAPCDSViewNodes(repObj, metadataConnection, node, validationRules);
|
||||
} else if (metadataConnection instanceof SalesforceSchemaConnection) {
|
||||
createSalesforceModuleNodes(repObj, metadataConnection, node, validationRules);
|
||||
} else {
|
||||
@@ -1784,7 +1810,9 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
|
||||
for (MetadataTable tablesWithOrder : tablesWithOrders) {
|
||||
EMap<String, String> properties = tablesWithOrder.getAdditionalProperties();
|
||||
String partitionKey = properties.get(EProperties.CONTENT_TYPE.name());
|
||||
if (!ERepositoryObjectType.METADATA_SAP_CONTENT_EXTRACTOR.name().equals(partitionKey)) {
|
||||
String cdsType = TaggedValueHelper.getValueString(EProperties.CONTENT_TYPE.name(), tablesWithOrder);
|
||||
if (!ERepositoryObjectType.METADATA_SAP_CONTENT_EXTRACTOR.name().equals(partitionKey)
|
||||
&& !ERepositoryObjectType.METADATA_SAP_CDS_VIEW.name().equals(cdsType)) {
|
||||
tables.add(tablesWithOrder);
|
||||
}
|
||||
}
|
||||
@@ -1967,6 +1995,32 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
|
||||
createTables(tableContainer, repObj, tables, ERepositoryObjectType.METADATA_CON_TABLE, validationRules);
|
||||
}
|
||||
|
||||
private void createSAPCDSViewNodes(IRepositoryViewObject repObj, Connection metadataConnection, RepositoryNode node,
|
||||
List<IRepositoryViewObject> validationRules) {
|
||||
StableRepositoryNode tableContainer = new StableRepositoryNode(node,
|
||||
Messages.getString("ProjectRepositoryNode.sapCDSView"), ECoreImage.FOLDER_CLOSE_ICON); //$NON-NLS-1$
|
||||
tableContainer.setChildrenObjectType(ERepositoryObjectType.METADATA_CON_TABLE);
|
||||
tableContainer.setProperties(EProperties.CONTENT_TYPE, ERepositoryObjectType.METADATA_SAP_CDS_VIEW);
|
||||
IRepositoryNode cacheNode = nodeCache.getCache(tableContainer);
|
||||
if (cacheNode != null && cacheNode instanceof StableRepositoryNode) {
|
||||
tableContainer = (StableRepositoryNode) cacheNode;
|
||||
tableContainer.getChildren().clear();
|
||||
} else {
|
||||
nodeCache.addCache(tableContainer, true);
|
||||
}
|
||||
|
||||
node.getChildren().add(tableContainer);
|
||||
List<MetadataTable> tablesWithOrders = ConnectionHelper.getTablesWithOrders(metadataConnection);
|
||||
EList<MetadataTable> tables = new BasicEList<>();
|
||||
for (MetadataTable tablesWithOrder : tablesWithOrders) {
|
||||
String cdsType = TaggedValueHelper.getValueString(EProperties.CONTENT_TYPE.name(), tablesWithOrder);
|
||||
if (ERepositoryObjectType.METADATA_SAP_CDS_VIEW.name().equals(cdsType)) {
|
||||
tables.add(tablesWithOrder);
|
||||
}
|
||||
}
|
||||
createTables(tableContainer, repObj, tables, ERepositoryObjectType.METADATA_CON_TABLE, validationRules);
|
||||
}
|
||||
|
||||
private void createSalesforceModuleNodes(IRepositoryViewObject rebObj, Connection metadataConnection,
|
||||
RepositoryNode connectionNode, List<IRepositoryViewObject> validationRules) {
|
||||
EList modules = ((SalesforceSchemaConnection) metadataConnection).getModules();
|
||||
|
||||
@@ -54,9 +54,7 @@ import org.eclipse.jface.dialogs.InputDialog;
|
||||
import org.eclipse.jface.dialogs.MessageDialog;
|
||||
import org.eclipse.osgi.internal.serviceregistry.ServiceReferenceImpl;
|
||||
import org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.eclipse.swt.widgets.MessageBox;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.ui.navigator.CommonNavigator;
|
||||
import org.eclipse.ui.navigator.CommonViewer;
|
||||
@@ -153,6 +151,7 @@ import org.talend.core.runtime.services.IMavenUIService;
|
||||
import org.talend.core.runtime.util.ItemDateParser;
|
||||
import org.talend.core.runtime.util.JavaHomeUtil;
|
||||
import org.talend.core.runtime.util.SharedStudioUtils;
|
||||
import org.talend.core.service.IComponentJsonformGeneratorService;
|
||||
import org.talend.core.service.ICoreUIService;
|
||||
import org.talend.core.service.IDetectCVEService;
|
||||
import org.talend.core.utils.CodesJarResourceCache;
|
||||
@@ -239,14 +238,14 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
return singleton;
|
||||
}
|
||||
|
||||
private ICoreService getCoreService() {
|
||||
public ICoreService getCoreService() {
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(ICoreService.class)) {
|
||||
return GlobalServiceRegister.getDefault().getService(ICoreService.class);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private IRunProcessService getRunProcessService() {
|
||||
public IRunProcessService getRunProcessService() {
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IRunProcessService.class)) {
|
||||
return GlobalServiceRegister.getDefault().getService(IRunProcessService.class);
|
||||
}
|
||||
@@ -351,7 +350,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
* @param project
|
||||
* @throws LoginException
|
||||
*/
|
||||
private void checkProjectCompatibility(Project project) throws LoginException {
|
||||
public void checkProjectCompatibility(Project project) throws LoginException {
|
||||
IMigrationToolService migrationToolService = GlobalServiceRegister.getDefault().getService(
|
||||
IMigrationToolService.class);
|
||||
// update migration system.
|
||||
@@ -446,12 +445,10 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
if (currentShell == null) {
|
||||
currentShell = DisplayUtils.getDefaultShell(false);
|
||||
}
|
||||
MessageBox box = new MessageBox(currentShell, SWT.ICON_WARNING | SWT.OK | SWT.CANCEL);
|
||||
box.setText(Messages.getString("ProxyRepositoryFactory.JobNameErroe")); //$NON-NLS-1$
|
||||
box.setMessage(Messages.getString("ProxyRepositoryFactory.Label") + " " + name + " " + Messages.getString("ProxyRepositoryFactory.ReplaceJob")); //$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$
|
||||
|
||||
if (box.open() == SWT.OK) {
|
||||
|
||||
if (MessageDialog.openQuestion(currentShell,
|
||||
Messages.getString("ProxyRepositoryFactory.JobNameErroe"), //$NON-NLS-1$
|
||||
Messages.getString("ProxyRepositoryFactory.Label") + " " + name + " " //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
+ Messages.getString("ProxyRepositoryFactory.ReplaceJob"))) { //$NON-NLS-1$
|
||||
ok[0] = true;
|
||||
}
|
||||
}
|
||||
@@ -1848,7 +1845,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
* @param project
|
||||
* @throws PersistenceException
|
||||
*/
|
||||
private void emptyTempFolder(Project project) throws PersistenceException {
|
||||
public void emptyTempFolder(Project project) throws PersistenceException {
|
||||
try {
|
||||
String str = SharedStudioUtils.getTempFolderPath().toPortableString();
|
||||
FilesUtils.deleteFolder(new File(str), false);
|
||||
@@ -2210,6 +2207,13 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
|
||||
if (IHadoopDistributionService.get() != null) {
|
||||
try {
|
||||
IHadoopDistributionService.get().checkAndMigrateDistributionProxyCredential(project);
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
// init dynamic distirbution after `beforeLogon`, before loading libraries.
|
||||
initDynamicDistribution(monitor);
|
||||
|
||||
@@ -2379,11 +2383,22 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
}
|
||||
String str[] = new String[] { getRepositoryContext().getUser() + "", projectManager.getCurrentProject() + "" }; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
log.info(Messages.getString("ProxyRepositoryFactory.log.loggedOn", str)); //$NON-NLS-1$
|
||||
|
||||
// no performance impact for studio or commandline
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IComponentJsonformGeneratorService.class)) {
|
||||
IComponentJsonformGeneratorService jsonformSvc = GlobalServiceRegister.getDefault().getService(IComponentJsonformGeneratorService.class);
|
||||
if (jsonformSvc != null && IComponentJsonformGeneratorService.isEnabled()) {
|
||||
jsonformSvc.generate(null);
|
||||
}
|
||||
}
|
||||
|
||||
} catch (LoginException e) {
|
||||
try {
|
||||
logOffProject();
|
||||
} catch (Exception e1) {
|
||||
ExceptionHandler.process(e1);
|
||||
if (!LoginException.RESTART.equals(e.getKey())) {
|
||||
try {
|
||||
logOffProject();
|
||||
} catch (Exception e1) {
|
||||
ExceptionHandler.process(e1);
|
||||
}
|
||||
}
|
||||
throw e;
|
||||
} catch (PersistenceException e) {
|
||||
@@ -2516,7 +2531,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
}
|
||||
}
|
||||
|
||||
private void checkReferenceProjectsProblems(Project project) throws BusinessException, PersistenceException {
|
||||
public void checkReferenceProjectsProblems(Project project) throws BusinessException, PersistenceException {
|
||||
if (ReferenceProjectProblemManager.getInstance().getAllInvalidProjectReferenceSet().size() > 0) {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
for (String technicalLabel : ReferenceProjectProblemManager.getInstance().getAllInvalidProjectReferenceSet()) {
|
||||
@@ -2561,7 +2576,6 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
|
||||
public void logOffProject() {
|
||||
// getRepositoryContext().setProject(null);
|
||||
repositoryFactoryFromProvider.logOffProject();
|
||||
if (!CommonsPlugin.isHeadless()) {
|
||||
ProjectRepositoryNode root = ProjectRepositoryNode.getInstance();
|
||||
if (root != null) {
|
||||
@@ -2617,6 +2631,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
|
||||
ReferenceProjectProvider.clearTacReferenceList();
|
||||
ReferenceProjectProblemManager.getInstance().clearAll();
|
||||
repositoryFactoryFromProvider.logOffProject();
|
||||
fullLogonFinished = false;
|
||||
}
|
||||
|
||||
@@ -3014,4 +3029,11 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
this.repositoryFactoryFromProvider.saveProject(project);
|
||||
}
|
||||
|
||||
public void setCancelled(boolean cancelled) {
|
||||
this.isCancelled = cancelled;
|
||||
}
|
||||
|
||||
public boolean isCancelled() {
|
||||
return this.isCancelled;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,7 +147,11 @@ public class LDAPCATruster implements X509TrustManager {
|
||||
} catch (IOException ex) {
|
||||
}
|
||||
try {
|
||||
ks.load(in, certStorePwd);
|
||||
if (in != null) {
|
||||
ks.load(in, certStorePwd);
|
||||
} else {
|
||||
ks = null;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error(Messages.getString("LDAPCATruster.failedLoadCert") + e.getMessage()); //$NON-NLS-1$
|
||||
return;
|
||||
|
||||
@@ -52,6 +52,8 @@ public interface IGitInfoService extends IService {
|
||||
public Map<String, String> getGitInfo(Property property) throws Exception;
|
||||
|
||||
public boolean isPushedToRemote(Property property) throws Exception;
|
||||
|
||||
public String getProjectBranch(Project project)throws Exception;
|
||||
|
||||
public static IGitInfoService get() {
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IGitInfoService.class)) {
|
||||
|
||||
@@ -21,7 +21,9 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.collections.map.MultiKeyMap;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.eclipse.core.resources.IFolder;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IWorkspace;
|
||||
import org.eclipse.core.resources.IWorkspaceRunnable;
|
||||
import org.eclipse.core.resources.ResourcesPlugin;
|
||||
@@ -79,6 +81,7 @@ import org.talend.core.model.properties.ProcessItem;
|
||||
import org.talend.core.model.properties.ProjectReference;
|
||||
import org.talend.core.model.properties.Property;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
import org.talend.core.model.repository.Folder;
|
||||
import org.talend.core.model.repository.IRepositoryContentHandler;
|
||||
import org.talend.core.model.repository.IRepositoryViewObject;
|
||||
import org.talend.core.model.repository.ISubRepositoryObject;
|
||||
@@ -97,6 +100,7 @@ import org.talend.core.repository.ui.dialog.ContextReferenceDialog;
|
||||
import org.talend.core.repository.ui.dialog.ItemReferenceDialog;
|
||||
import org.talend.core.repository.utils.AbstractResourceChangesService;
|
||||
import org.talend.core.repository.utils.RepositoryNodeDeleteManager;
|
||||
import org.talend.core.repository.utils.RepositoryNodeManager;
|
||||
import org.talend.core.repository.utils.RepositoryReferenceBeanUtils;
|
||||
import org.talend.core.repository.utils.TDQServiceRegister;
|
||||
import org.talend.core.runtime.CoreRuntimePlugin;
|
||||
@@ -338,6 +342,25 @@ public class DeleteAction extends AContextualAction {
|
||||
deletedFolder.add(node);
|
||||
List<IRepositoryViewObject> deleteObjectList = new ArrayList<IRepositoryViewObject>();
|
||||
deleteFolder(node, factory, deleteActionCache, deleteObjectList);
|
||||
if (ERepositoryObjectType.SNOWFLAKE != null) {
|
||||
IPath sfPath = RepositoryNodeUtilities.getPath(node);
|
||||
String fullPath = ERepositoryObjectType.SNOWFLAKE.getFolder() + IPath.SEPARATOR
|
||||
+ sfPath.toString();
|
||||
IProject rsProject = ResourceUtils.getProject(ProjectManager.getInstance().getCurrentProject());
|
||||
IFolder sfFolder = ResourceUtils.getFolder(rsProject, fullPath, false);
|
||||
if (sfFolder.exists()) {
|
||||
RepositoryNode sfRootNode = ProjectRepositoryNode.getInstance()
|
||||
.getRootRepositoryNode(ERepositoryObjectType.SNOWFLAKE);
|
||||
FolderItem item = factory.getFolderItem(ProjectManager.getInstance().getCurrentProject(),
|
||||
ERepositoryObjectType.SNOWFLAKE, sfPath);
|
||||
Folder folder = new Folder(item.getProperty(), ERepositoryObjectType.SNOWFLAKE);
|
||||
RepositoryNode sfFolderNode = new RepositoryNode(folder, sfRootNode,
|
||||
ENodeType.REPOSITORY_ELEMENT);
|
||||
sfFolderNode.setProperties(EProperties.LABEL, folder.getLabel());
|
||||
sfFolderNode.setProperties(EProperties.CONTENT_TYPE, ERepositoryObjectType.SNOWFLAKE);
|
||||
deleteFolder(sfFolderNode, factory, deleteActionCache, deleteObjectList);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (PersistenceException e) {
|
||||
MessageBoxExceptionHandler.process(e);
|
||||
@@ -477,6 +500,13 @@ public class DeleteAction extends AContextualAction {
|
||||
}
|
||||
IPath path = RepositoryNodeUtilities.getPath(node);
|
||||
ERepositoryObjectType objectType = (ERepositoryObjectType) node.getProperties(EProperties.CONTENT_TYPE);
|
||||
if (RepositoryNodeManager.isSnowflake(objectType)) {
|
||||
String pathStr = node.getObject().getLabel();
|
||||
if (StringUtils.isNotBlank(node.getObject().getPath())) {
|
||||
pathStr = node.getObject().getPath() + IPath.SEPARATOR + pathStr;
|
||||
}
|
||||
path = new Path(pathStr);
|
||||
}
|
||||
List<IRepositoryNode> repositoryList = node.getChildren();
|
||||
boolean success = true;
|
||||
Exception bex = null;
|
||||
|
||||
@@ -606,6 +606,8 @@ public class DuplicateAction extends AContextualAction {
|
||||
item = PropertiesFactory.eINSTANCE.createSalesforceSchemaConnectionItem();
|
||||
} else if (repositoryType == ERepositoryObjectType.METADATA_SAPCONNECTIONS) {
|
||||
item = PropertiesFactory.eINSTANCE.createSAPConnectionItem();
|
||||
} else if (repositoryType == ERepositoryObjectType.METADATA_BIGQUERYCONNECTIONS) {
|
||||
item = PropertiesFactory.eINSTANCE.createBigQueryConnectionItem();
|
||||
} else if (repositoryType == ERepositoryObjectType.METADATA_WSDL_SCHEMA) {
|
||||
item = PropertiesFactory.eINSTANCE.createWSDLSchemaConnectionItem();
|
||||
} else if (repositoryType == ERepositoryObjectType.PROCESS) {
|
||||
|
||||
@@ -18,6 +18,8 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.eclipse.core.resources.IFolder;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
import org.eclipse.ui.PlatformUI;
|
||||
@@ -30,12 +32,15 @@ import org.talend.core.model.repository.IRepositoryViewObject;
|
||||
import org.talend.core.model.repository.RepositoryManager;
|
||||
import org.talend.core.repository.i18n.Messages;
|
||||
import org.talend.core.repository.model.JobletReferenceBean;
|
||||
import org.talend.core.repository.model.ProjectRepositoryNode;
|
||||
import org.talend.core.repository.model.ProxyRepositoryFactory;
|
||||
import org.talend.core.repository.model.repositoryObject.MetadataTableRepositoryObject;
|
||||
import org.talend.core.repository.ui.actions.metadata.CopyToGenericSchemaHelper;
|
||||
import org.talend.core.repository.ui.dialog.JobletReferenceDialog;
|
||||
import org.talend.core.repository.utils.AbstractResourceChangesService;
|
||||
import org.talend.core.repository.utils.RepositoryNodeManager;
|
||||
import org.talend.core.repository.utils.TDQServiceRegister;
|
||||
import org.talend.repository.ProjectManager;
|
||||
import org.talend.repository.model.IProxyRepositoryFactory;
|
||||
import org.talend.repository.model.IRepositoryNode;
|
||||
import org.talend.repository.model.IRepositoryNode.ENodeType;
|
||||
@@ -155,8 +160,11 @@ public class MoveObjectAction {
|
||||
switch (targetNode.getType()) {
|
||||
case SYSTEM_FOLDER:
|
||||
case SIMPLE_FOLDER:
|
||||
boolean booleanValue = ((ERepositoryObjectType) targetNode.getProperties(EProperties.CONTENT_TYPE))
|
||||
.equals(sourceNode.getProperties(EProperties.CONTENT_TYPE));
|
||||
ERepositoryObjectType sourceType = (ERepositoryObjectType) sourceNode.getProperties(EProperties.CONTENT_TYPE);
|
||||
ERepositoryObjectType targetType = (ERepositoryObjectType) targetNode.getProperties(EProperties.CONTENT_TYPE);
|
||||
boolean booleanValue = sourceType == targetType || (ERepositoryObjectType.METADATA_CONNECTIONS == targetType
|
||||
&& (ERepositoryObjectType.METADATA_TACOKIT_JDBC == sourceType
|
||||
|| RepositoryNodeManager.isSnowflake(sourceType)));
|
||||
if (isGenericSchema) {
|
||||
return true;
|
||||
} else {
|
||||
@@ -274,7 +282,9 @@ public class MoveObjectAction {
|
||||
targetPath = (targetNode == null ? new Path("") : RepositoryNodeUtilities.getPath(targetNode)); //$NON-NLS-1$
|
||||
}
|
||||
List<IRepositoryViewObject> objectToMoves = new ArrayList<IRepositoryViewObject>();
|
||||
List<IRepositoryViewObject> snowflakeToMove = new ArrayList<>();
|
||||
Map<IRepositoryViewObject, IPath> map = new HashMap<IRepositoryViewObject, IPath>();
|
||||
Map<IRepositoryViewObject, IPath> snowflakeMap = new HashMap<>();
|
||||
IProxyRepositoryFactory factory = ProxyRepositoryFactory.getInstance();
|
||||
for (RepositoryNode sourceNode : nodeList) {
|
||||
IPath sourcePath = RepositoryNodeUtilities.getPath(sourceNode);
|
||||
@@ -298,6 +308,18 @@ public class MoveObjectAction {
|
||||
// Move :
|
||||
if (isGenericSchema) {
|
||||
CopyToGenericSchemaHelper.copyToGenericSchema(factory, objectToMove, targetPath);
|
||||
} else if (RepositoryNodeManager.isSnowflake(sourceNode.getObjectType())
|
||||
&& ERepositoryObjectType.METADATA_CONNECTIONS == targetNode.getContentType()
|
||||
&& (ENodeType.SYSTEM_FOLDER == targetNode.getType()
|
||||
|| ENodeType.SIMPLE_FOLDER == targetNode.getType())) {
|
||||
if (!ProjectRepositoryNode.class.isInstance(targetNode.getParent())
|
||||
&& targetNode.getObject() != null) {
|
||||
factory.createFolder(ERepositoryObjectType.SNOWFLAKE,
|
||||
RepositoryNodeUtilities.getPath(targetNode.getParent()),
|
||||
targetNode.getObject().getProperty().getLabel());
|
||||
}
|
||||
snowflakeToMove.add(objectToMove);
|
||||
snowflakeMap.put(objectToMove, sourcePath);
|
||||
} else {
|
||||
// MOD gdbu 2011-9-29 TDQ-3546
|
||||
ERepositoryObjectType repositoryObjectType = objectToMove.getRepositoryObjectType();
|
||||
@@ -325,6 +347,18 @@ public class MoveObjectAction {
|
||||
// Source is a folder :
|
||||
ERepositoryObjectType sourceType = (ERepositoryObjectType) sourceNode.getProperties(EProperties.CONTENT_TYPE);
|
||||
factory.moveFolder(sourceType, sourcePath, targetPath);
|
||||
|
||||
if (ERepositoryObjectType.SNOWFLAKE != null) {
|
||||
String snowflakePath = ERepositoryObjectType.getFolderName(ERepositoryObjectType.SNOWFLAKE);
|
||||
if (!sourcePath.isEmpty()) {
|
||||
snowflakePath += IPath.SEPARATOR + sourcePath.toString();
|
||||
}
|
||||
IProject project = ResourceUtils.getProject(ProjectManager.getInstance().getCurrentProject());
|
||||
IFolder folder = ResourceUtils.getFolder(project, snowflakePath, false);
|
||||
if (folder.exists() && folder.members().length > 0) {
|
||||
factory.moveFolder(ERepositoryObjectType.SNOWFLAKE, sourcePath, targetPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (objectToMoves.size() > 0) {
|
||||
@@ -335,6 +369,10 @@ public class MoveObjectAction {
|
||||
}
|
||||
factory.moveObjectMulti(objectArray, targetPath, map);
|
||||
}
|
||||
if (!snowflakeToMove.isEmpty()) {
|
||||
factory.moveObjectMulti(snowflakeToMove.toArray(new IRepositoryViewObject[] {}),
|
||||
RepositoryNodeUtilities.getPath(targetNode), snowflakeMap);
|
||||
}
|
||||
}
|
||||
|
||||
public void execute(RepositoryNode sourceNode, RepositoryNode targetNode, boolean isDnd) throws Exception {
|
||||
|
||||
@@ -18,6 +18,8 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.core.resources.IFolder;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IWorkspace;
|
||||
import org.eclipse.core.resources.IWorkspaceRunnable;
|
||||
import org.eclipse.core.resources.ResourcesPlugin;
|
||||
@@ -37,6 +39,7 @@ import org.talend.commons.runtime.model.repository.ERepositoryStatus;
|
||||
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
|
||||
import org.talend.commons.ui.runtime.image.EImage;
|
||||
import org.talend.commons.ui.runtime.image.ImageProvider;
|
||||
import org.talend.commons.utils.workbench.resources.ResourceUtils;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.ITDQRepositoryService;
|
||||
import org.talend.core.model.metadata.builder.connection.AbstractMetadataObject;
|
||||
@@ -49,6 +52,7 @@ import org.talend.core.model.repository.IRepositoryViewObject;
|
||||
import org.talend.core.model.repository.ISubRepositoryObject;
|
||||
import org.talend.core.repository.i18n.Messages;
|
||||
import org.talend.core.repository.model.ProxyRepositoryFactory;
|
||||
import org.talend.core.repository.utils.RepositoryNodeManager;
|
||||
import org.talend.core.service.ICoreUIService;
|
||||
import org.talend.core.ui.ITestContainerProviderService;
|
||||
import org.talend.repository.ProjectManager;
|
||||
@@ -111,9 +115,42 @@ public class RestoreAction extends AContextualAction {
|
||||
Item item = node.getObject().getProperty().getItem();
|
||||
if (item instanceof FolderItem) {
|
||||
item.getState().setDeleted(false);
|
||||
if (nodeType == ERepositoryObjectType.METADATA_CONNECTIONS && ERepositoryObjectType.SNOWFLAKE != null) {
|
||||
IPath sfPath = new Path(node.getObject().getPath()).append(node.getObject().getLabel());
|
||||
String fullPath = ERepositoryObjectType.SNOWFLAKE.getFolder() + IPath.SEPARATOR + sfPath;
|
||||
IProject rsProject = ResourceUtils.getProject(ProjectManager.getInstance().getCurrentProject());
|
||||
IFolder sfFolder = ResourceUtils.getFolder(rsProject, fullPath, false);
|
||||
if (sfFolder.exists()) {
|
||||
FolderItem sfItem = ProxyRepositoryFactory.getInstance().getFolderItem(ProjectManager.getInstance().getCurrentProject(),
|
||||
ERepositoryObjectType.SNOWFLAKE, sfPath);
|
||||
sfItem.getState().setDeleted(false);
|
||||
while (sfPath.segmentCount() > 1) {
|
||||
sfPath = sfPath.removeLastSegments(1);
|
||||
FolderItem parentItem = ProxyRepositoryFactory.getInstance().getFolderItem(
|
||||
ProjectManager.getInstance().getCurrentProject(), ERepositoryObjectType.SNOWFLAKE,
|
||||
sfPath);
|
||||
if (ProxyRepositoryFactory.getInstance().getStatus(parentItem) == ERepositoryStatus.DELETED) {
|
||||
parentItem.getState().setDeleted(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
RestoreObjectAction restoreObjectAction = RestoreObjectAction.getInstance();
|
||||
restoreObjectAction.execute(node, null, path);
|
||||
|
||||
if (RepositoryNodeManager.isSnowflake(nodeType)) {
|
||||
IPath sfPath = new Path(node.getObject().getPath()).append(node.getObject().getLabel());
|
||||
while (sfPath.segmentCount() > 1) {
|
||||
sfPath = sfPath.removeLastSegments(1);
|
||||
FolderItem parentItem = ProxyRepositoryFactory.getInstance().getFolderItem(
|
||||
ProjectManager.getInstance().getCurrentProject(), ERepositoryObjectType.SNOWFLAKE, sfPath);
|
||||
if (ProxyRepositoryFactory.getInstance().getStatus(parentItem) == ERepositoryStatus.DELETED) {
|
||||
parentItem.getState().setDeleted(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MOD qiongli 2012-10-16 TDQ-6166 notify sql exploere when restore a connection.
|
||||
if (item instanceof DatabaseConnectionItem) {
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(ITDQRepositoryService.class)) {
|
||||
|
||||
@@ -129,7 +129,7 @@ public class ContextReferenceDialog extends SelectionDialog {
|
||||
Item item = objToDelete.getProperty().getItem();
|
||||
if (item != null) {
|
||||
setMessage(Messages.getString(
|
||||
"ContextReferenceDialog.kindMessages1", item.getProperty().getLabel(), item.getProperty().getVersion())); //$NON-NLS-1$
|
||||
"ContextReferenceDialog.kindMessages2", item.getProperty().getLabel(), item.getProperty().getVersion())); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
setHelpAvailable(false);
|
||||
@@ -138,7 +138,7 @@ public class ContextReferenceDialog extends SelectionDialog {
|
||||
@Override
|
||||
protected void configureShell(Shell newShell) {
|
||||
super.configureShell(newShell);
|
||||
newShell.setText(Messages.getString("ContextReferenceDialog.Title")); //$NON-NLS-1$
|
||||
newShell.setText(Messages.getString("ContextReferenceDialog.DeleteContext.Title")); //$NON-NLS-1$
|
||||
newShell.setSize(650, 250);
|
||||
}
|
||||
|
||||
|
||||
@@ -62,6 +62,7 @@ import org.talend.core.repository.ui.actions.CopyObjectAction;
|
||||
import org.talend.core.repository.ui.actions.MoveObjectAction;
|
||||
import org.talend.core.repository.utils.AbstractResourceChangesService;
|
||||
import org.talend.core.repository.utils.ConvertJobsUtil;
|
||||
import org.talend.core.repository.utils.RepositoryNodeManager;
|
||||
import org.talend.core.repository.utils.TDQServiceRegister;
|
||||
import org.talend.core.runtime.CoreRuntimePlugin;
|
||||
import org.talend.core.service.ITransformService;
|
||||
@@ -379,7 +380,7 @@ public class RepositoryDropAdapter extends PluginDropAdapter {
|
||||
if (target == null) {
|
||||
return false;
|
||||
}
|
||||
super.validateDrop(target, operation, transferType);
|
||||
// super.validateDrop(target, operation, transferType);
|
||||
boolean isValid = true;
|
||||
Set<IResource> parents = new HashSet<IResource>();
|
||||
for (Object obj : ((StructuredSelection) getViewer().getSelection()).toArray()) {
|
||||
@@ -459,6 +460,24 @@ public class RepositoryDropAdapter extends PluginDropAdapter {
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (object.getRepositoryObjectType() == ERepositoryObjectType.METADATA_TACOKIT_JDBC) {
|
||||
if (target instanceof RepositoryNode) {
|
||||
RepositoryNode targetRN = (RepositoryNode) target;
|
||||
if (ENodeType.SYSTEM_FOLDER == targetRN.getType() || ENodeType.SIMPLE_FOLDER == targetRN.getType()) {
|
||||
if (targetRN.getContentType() == ERepositoryObjectType.METADATA_CONNECTIONS) {
|
||||
return isValid = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (RepositoryNodeManager.isSnowflake(object.getRepositoryObjectType())) {
|
||||
if (target instanceof RepositoryNode) {
|
||||
RepositoryNode targetRN = (RepositoryNode) target;
|
||||
if (ENodeType.SYSTEM_FOLDER == targetRN.getType() || ENodeType.SIMPLE_FOLDER == targetRN.getType()) {
|
||||
if (targetRN.getContentType() == ERepositoryObjectType.METADATA_CONNECTIONS) {
|
||||
return isValid = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -17,14 +17,20 @@ import java.util.Map;
|
||||
|
||||
import org.eclipse.jface.resource.ImageDescriptor;
|
||||
import org.eclipse.jface.resource.JFaceResources;
|
||||
import org.eclipse.jface.util.IPropertyChangeListener;
|
||||
import org.eclipse.jface.util.PropertyChangeEvent;
|
||||
import org.eclipse.jface.viewers.IColorProvider;
|
||||
import org.eclipse.jface.viewers.IFontProvider;
|
||||
import org.eclipse.jface.viewers.LabelProvider;
|
||||
import org.eclipse.jface.viewers.TreeViewer;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.graphics.Font;
|
||||
import org.eclipse.swt.graphics.Image;
|
||||
import org.eclipse.swt.widgets.Control;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.talend.commons.runtime.model.repository.ECDCStatus;
|
||||
import org.talend.commons.runtime.model.repository.ERepositoryStatus;
|
||||
import org.talend.commons.ui.runtime.ITalendThemeService;
|
||||
import org.talend.commons.ui.runtime.image.ECoreImage;
|
||||
import org.talend.commons.ui.runtime.image.EImage;
|
||||
import org.talend.commons.ui.runtime.image.IImage;
|
||||
@@ -77,13 +83,19 @@ import org.talend.utils.string.DigestUtil;
|
||||
*/
|
||||
public class RepositoryLabelProvider extends LabelProvider implements IColorProvider, IFontProvider {
|
||||
|
||||
private static final Color STABLE_SECONDARY_ENTRY_COLOR = new Color(null, 100, 100, 100);
|
||||
private static final String MERGED_PREFERENCED_ITEMS = "org.talend.core.repository.REPO_MERGED_REFERENCED_ITEMS_COLOR";
|
||||
|
||||
private static final Color STABLE_PRIMARY_ENTRY_COLOR = new Color(null, 0, 0, 0);
|
||||
private static final String LOCKED_ENTRY = "org.talend.core.repository.REPO_LOCKED_ENTRY";
|
||||
|
||||
private static final String STABLE_PRIMARY_ENTRY = "org.talend.core.repository.REPO_STABLE_PRIMARY_ENTRY_COLOR";
|
||||
|
||||
private static final String STABLE_SECONDARY_ENTRY = "org.talend.core.repository.REPO_STABLE_SECONDARY_ENTRY_COLOR";
|
||||
|
||||
private static final Color STABLE_SECONDARY_ENTRY_COLOR = new Color(null, 100, 100, 100);
|
||||
|
||||
protected static final Color INACTIVE_ENTRY_COLOR = new Color(null, 200, 200, 200);
|
||||
|
||||
private static final Color LOCKED_ENTRY = new Color(null, 200, 0, 0);
|
||||
private static final Color LOCKED_ENTRY_COLOR = new Color(null, 200, 0, 0);
|
||||
|
||||
private static final Color MERGED_REFERENCED_ITEMS_COLOR = new Color(null, 120, 120, 120);
|
||||
|
||||
@@ -100,6 +112,18 @@ public class RepositoryLabelProvider extends LabelProvider implements IColorProv
|
||||
return view;
|
||||
}
|
||||
|
||||
private Color getStableSecondaryEntryColor() {
|
||||
return ITalendThemeService.getColor(STABLE_SECONDARY_ENTRY).orElse(STABLE_SECONDARY_ENTRY_COLOR);
|
||||
}
|
||||
|
||||
private Color getLockedEntryColor() {
|
||||
return ITalendThemeService.getColor(LOCKED_ENTRY).orElse(LOCKED_ENTRY_COLOR);
|
||||
}
|
||||
|
||||
private Color getMergedReferencedItemsColor() {
|
||||
return ITalendThemeService.getColor(MERGED_PREFERENCED_ITEMS).orElse(MERGED_REFERENCED_ITEMS_COLOR);
|
||||
}
|
||||
|
||||
public String getText(IRepositoryViewObject object) {
|
||||
StringBuffer string = new StringBuffer();
|
||||
string.append(object.getLabel());
|
||||
@@ -482,23 +506,13 @@ public class RepositoryLabelProvider extends LabelProvider implements IColorProv
|
||||
RepositoryNode node = (RepositoryNode) element;
|
||||
switch (node.getType()) {
|
||||
case REFERENCED_PROJECT:
|
||||
return STABLE_PRIMARY_ENTRY_COLOR;
|
||||
case STABLE_SYSTEM_FOLDER:
|
||||
if (node.getLabel().equals(ERepositoryObjectType.SNIPPETS.toString())) {
|
||||
return INACTIVE_ENTRY_COLOR;
|
||||
}
|
||||
if (node.getContentType() == ERepositoryObjectType.METADATA) {
|
||||
return STABLE_PRIMARY_ENTRY_COLOR;
|
||||
}
|
||||
case SYSTEM_FOLDER:
|
||||
if (node.getContentType() == ERepositoryObjectType.PROCESS) {
|
||||
return STABLE_PRIMARY_ENTRY_COLOR;
|
||||
}
|
||||
return STABLE_SECONDARY_ENTRY_COLOR;
|
||||
return getStableSecondaryEntryColor();
|
||||
default:
|
||||
ERepositoryStatus repositoryStatus = node.getObject().getRepositoryStatus();
|
||||
if (repositoryStatus == ERepositoryStatus.LOCK_BY_OTHER) {
|
||||
return LOCKED_ENTRY;
|
||||
return getLockedEntryColor();
|
||||
} else {
|
||||
if (PluginChecker.isRefProjectLoaded()) {
|
||||
IReferencedProjectService service = (IReferencedProjectService) GlobalServiceRegister.getDefault()
|
||||
@@ -510,7 +524,7 @@ public class RepositoryLabelProvider extends LabelProvider implements IColorProv
|
||||
.getCurrentProject().getEmfProject();
|
||||
String projectLabel = object.getProjectLabel();
|
||||
if (!mainProject.getLabel().equals(projectLabel)) {
|
||||
return MERGED_REFERENCED_ITEMS_COLOR;
|
||||
return getMergedReferencedItemsColor();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -536,4 +550,43 @@ public class RepositoryLabelProvider extends LabelProvider implements IColorProv
|
||||
refreshProperty = refresh;
|
||||
}
|
||||
|
||||
public static IPropertyChangeListener createPropertyChangeListener(TreeViewer treeViewer) {
|
||||
return new IPropertyChangeListener() {
|
||||
|
||||
@Override
|
||||
public void propertyChange(PropertyChangeEvent event) {
|
||||
String property = event.getProperty();
|
||||
if (property == null) {
|
||||
return;
|
||||
}
|
||||
boolean changed = false;
|
||||
switch (property) {
|
||||
case RepositoryLabelProvider.STABLE_PRIMARY_ENTRY:
|
||||
// case RepositoryLabelProvider.INACTIVE_ENTRY:
|
||||
// case RepositoryLabelProvider.LOCKED_ENTRY:
|
||||
// case RepositoryLabelProvider.MERGED_PREFERENCED_ITEMS:
|
||||
// case RepositoryLabelProvider.STABLE_SECONDARY_ENTRY:
|
||||
changed = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (changed) {
|
||||
Display.getDefault().asyncExec(new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
if (treeViewer != null) {
|
||||
Control control = treeViewer.getControl();
|
||||
if (!control.isDisposed()) {
|
||||
treeViewer.refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -155,4 +155,8 @@ public class RepositoryNodeManager {
|
||||
return isTacokit;
|
||||
}
|
||||
|
||||
public static boolean isSnowflake(ERepositoryObjectType type) {
|
||||
return ERepositoryObjectType.SNOWFLAKE != null && ERepositoryObjectType.SNOWFLAKE == type;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -40,6 +40,7 @@ import org.talend.core.model.utils.CloneConnectionUtils;
|
||||
import org.talend.core.model.utils.ContextParameterUtils;
|
||||
import org.talend.core.utils.TalendQuoteUtils;
|
||||
import org.talend.cwm.helper.ConnectionHelper;
|
||||
import org.talend.cwm.helper.StudioEncryptionHelper;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ContextType;
|
||||
import org.talend.model.bridge.ReponsitoryContextBridge;
|
||||
|
||||
@@ -67,6 +68,7 @@ public class StandaloneConnectionContextUtils {
|
||||
String server = getOriginalValue(contextProperties, dbConn.getServerName());
|
||||
String username = getOriginalValue(contextProperties, dbConn.getUsername());
|
||||
String password = getOriginalValue(contextProperties, dbConn.getRawPassword());
|
||||
String originEncryptedPassword = getOriginalValue(contextProperties, dbConn.getPassword());
|
||||
String port = getOriginalValue(contextProperties, dbConn.getPort());
|
||||
String sidOrDatabase = getOriginalValue(contextProperties, dbConn.getSID());
|
||||
String datasource = getOriginalValue(contextProperties, dbConn.getDatasourceName());
|
||||
@@ -87,6 +89,8 @@ public class StandaloneConnectionContextUtils {
|
||||
cloneConn.setDatasourceName(datasource);
|
||||
cloneConn.setDBRootPath(dbRootPath);
|
||||
cloneConn.setFileFieldName(filePath);
|
||||
//To avoid encrypt the same value
|
||||
cloneConn.setPassword(originEncryptedPassword);
|
||||
cloneConn.setRawPassword(password); // the password is raw.
|
||||
cloneConn.setPort(port);
|
||||
cloneConn.setUiSchema(schemaOracle);
|
||||
|
||||
@@ -856,13 +856,13 @@ public class XmiResourceManager {
|
||||
URI orgPropertyResourceURI = EcoreUtil.getURI(originalItem.getProperty());
|
||||
URI orgRelativePlateformDestUri = orgPropertyResourceURI.trimFileExtension().appendFileExtension(
|
||||
FileConstants.SCREENSHOT_EXTENSION);
|
||||
URL orgFileURL = FileLocator.toFileURL(new java.net.URL(
|
||||
URL orgFileURL = FileLocator.resolve(new java.net.URL(
|
||||
"platform:/resource" + orgRelativePlateformDestUri.toPlatformString(true))); //$NON-NLS-1$
|
||||
|
||||
URI newPropertyResourceURI = EcoreUtil.getURI(newItem.getProperty());
|
||||
URI newRelativePlateformDestUri = newPropertyResourceURI.trimFileExtension().appendFileExtension(
|
||||
FileConstants.SCREENSHOT_EXTENSION);
|
||||
URL newFileURL = FileLocator.toFileURL(new java.net.URL(
|
||||
URL newFileURL = FileLocator.resolve(new java.net.URL(
|
||||
"platform:/resource" + newRelativePlateformDestUri.toPlatformString(true))); //$NON-NLS-1$
|
||||
|
||||
os = new FileOutputStream(newFileURL.getFile());
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Manifest-Version: 1.0
|
||||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Core Runtime Plug-in
|
||||
Bundle-SymbolicName: org.talend.core.runtime;singleton:=true
|
||||
@@ -6,6 +6,7 @@ Bundle-Version: 8.0.1.qualifier
|
||||
Bundle-Localization: plugin
|
||||
Bundle-Vendor: .Talend SA.
|
||||
Export-Package: org.talend.analysistask,
|
||||
org.talend.commons.report,
|
||||
org.talend.commons.utils.generation,
|
||||
org.talend.commons.utils.io,
|
||||
org.talend.commons.utils.workbench.resources,
|
||||
@@ -125,12 +126,25 @@ Require-Bundle: org.eclipse.jdt.core,
|
||||
org.talend.commons.ui,
|
||||
org.ops4j.pax.url.mvn,
|
||||
org.talend.components.api,
|
||||
org.apache.servicemix.bundles.avro,
|
||||
jackson-core-asl,
|
||||
org.talend.libraries.jackson,
|
||||
org.eclipse.m2e.core,
|
||||
org.talend.libraries.apache.common,
|
||||
org.talend.signon.util
|
||||
org.talend.signon.util,
|
||||
org.eclipse.core.runtime,
|
||||
org.talend.studio.studio-utils,
|
||||
org.eclipse.emf.ecore,
|
||||
org.eclipse.core.resources,
|
||||
org.eclipse.emf.ecore.xmi,
|
||||
org.talend.common.ui.runtime,
|
||||
org.talend.cwm.mip,
|
||||
org.talend.daikon,
|
||||
org.talend.libraries.apache,
|
||||
org.apache.commons.lang3,
|
||||
com.fasterxml.jackson.core.jackson-annotations,
|
||||
com.fasterxml.jackson.core.jackson-databind,
|
||||
com.fasterxml.jackson.core.jackson-core,
|
||||
avro
|
||||
Bundle-Activator: org.talend.core.runtime.CoreRuntimePlugin
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-ClassPath: .,
|
||||
@@ -139,3 +153,5 @@ Bundle-ClassPath: .,
|
||||
lib/delight-rhino-sandbox-0.0.15.jar,
|
||||
lib/rhino-1.7.13.jar
|
||||
Eclipse-RegisterBuddy: org.talend.testutils
|
||||
Import-Package: org.eclipse.equinox.p2.repository,
|
||||
org.eclipse.equinox.security.storage
|
||||
|
||||
@@ -21,7 +21,8 @@ bin.includes = META-INF/,\
|
||||
plugin_ja.properties,\
|
||||
plugin_ru.properties,\
|
||||
plugin_swtbot.properties,\
|
||||
plugin_zh_CN.properties
|
||||
plugin_zh_CN.properties,\
|
||||
resources/
|
||||
src.includes = META-INF/,\
|
||||
mappingMetadataTypes.xml,\
|
||||
mappings/,\
|
||||
|
||||
216
main/plugins/org.talend.core.runtime/mappings/mapping_Ingres.xml
Normal file
216
main/plugins/org.talend.core.runtime/mappings/mapping_Ingres.xml
Normal file
@@ -0,0 +1,216 @@
|
||||
<?xml version="1.0"?>
|
||||
<mapping>
|
||||
<dbms product="INGRES" id="ingres_id" label="Mapping Ingres"
|
||||
default="true">
|
||||
<dbTypes>
|
||||
<dbType type="ANSIDATE" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="BOOLEAN" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="BIGINT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="BYTE" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="BYTE VARYING" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="C" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="CHAR" ignorePre="true" />
|
||||
<dbType type="DECIMAL" defaultLength="20" defaultPrecision="10" />
|
||||
<dbType type="DATE" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="FLOAT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="FLOAT4" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INTEGER" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INGRESDATE" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INTERVAL" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="LONG NVARCHAR" ignorePre="true" />
|
||||
<dbType type="LONG VARCHAR" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="MONEY" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="NCHAR" ignorePre="true" defaultLength="10"/>
|
||||
<dbType type="NVARCHAR" ignorePre="true" defaultLength="10"/>
|
||||
<dbType type="OBJECT_KEY" ignoreLen="true" ignorePre="true"/>
|
||||
<dbType type="SMALLINT" ignoreLen="true" ignorePre="true"/>
|
||||
<dbType type="TEXT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TINYINT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TIME" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TIMESTAMP" ignoreLen="true" ignorePre="true"/>
|
||||
<dbType type="TABLE_KEY" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="VARCHAR" default="true" defaultLength="1200" ignorePre="true"/>
|
||||
</dbTypes>
|
||||
|
||||
<language name="java">
|
||||
<talendToDbTypes><!-- Adviced mappings -->
|
||||
<talendType type="id_List"/>
|
||||
<talendType type="id_Boolean">
|
||||
<dbType type="BOOLEAN" default="true" />
|
||||
</talendType>
|
||||
<talendType type="id_Byte">
|
||||
<dbType type="BYTE" default="true" />
|
||||
<dbType type="BYTE VARYING" />
|
||||
</talendType>
|
||||
<talendType type="id_byte[]">
|
||||
</talendType>
|
||||
<talendType type="id_Character">
|
||||
<dbType type="CHAR" default="true" />
|
||||
<dbType type="VARCHAR"/>
|
||||
<dbType type="C"/>
|
||||
<dbType type="TEXT"/>
|
||||
<dbType type="LONG VARCHAR"/>
|
||||
<dbType type="NCHAR"/>
|
||||
<dbType type="NVARCHAR"/>
|
||||
<dbType type="LONG NVARCHAR"/>
|
||||
</talendType>
|
||||
<talendType type="id_Date">
|
||||
<dbType type="DATE" default="true" />
|
||||
<dbType type="ANSIDATE" />
|
||||
<dbType type="INGRESDATE" />
|
||||
<dbType type="TIME" />
|
||||
<dbType type="TIMESTAMP" />
|
||||
<dbType type="INTERVAL"/>
|
||||
</talendType>
|
||||
<talendType type="id_BigDecimal">
|
||||
<dbType type="DECIMAL" default="true" />
|
||||
<dbType type="FLOAT4" />
|
||||
<dbType type="FLOAT"/>
|
||||
<dbType type="MONEY"/>
|
||||
</talendType>
|
||||
<talendType type="id_Double">
|
||||
<dbType type="FLOAT" default="true" />
|
||||
<dbType type="FLOAT4" />
|
||||
<dbType type="DECIMAL"/>
|
||||
<dbType type="MONEY"/>
|
||||
</talendType>
|
||||
<talendType type="id_Float">
|
||||
<dbType type="FLOAT4" default="true" />
|
||||
<dbType type="FLOAT"/>
|
||||
<dbType type="DECIMAL" />
|
||||
<dbType type="MONEY"/>
|
||||
</talendType>
|
||||
<talendType type="id_Integer">
|
||||
<dbType type="INTEGER" default="true" />
|
||||
<dbType type="BIGINT" />
|
||||
<dbType type="SMALLINT"/>
|
||||
<dbType type="TINYINT"/>
|
||||
</talendType>
|
||||
<talendType type="id_Long">
|
||||
<dbType type="BIGINT" default="true" />
|
||||
<dbType type="INTEGER"/>
|
||||
<dbType type="SMALLINT"/>
|
||||
<dbType type="TINYINT"/>
|
||||
</talendType>
|
||||
<talendType type="id_Object">
|
||||
<dbType type="MONEY" default="true"/>
|
||||
<dbType type="OBJECT_KEY" />
|
||||
<dbType type="TABLE_KEY" />
|
||||
</talendType>
|
||||
<talendType type="id_Short">
|
||||
<dbType type="SMALLINT" default="true" />
|
||||
<dbType type="INTEGER" />
|
||||
<dbType type="BIGINT"/>
|
||||
<dbType type="TINYINT" />
|
||||
</talendType>
|
||||
<talendType type="id_String">
|
||||
<dbType type="VARCHAR" default="true" />
|
||||
<dbType type="LONG VARCHAR" />
|
||||
<dbType type="NCHAR"/>
|
||||
<dbType type="NVARCHAR" />
|
||||
<dbType type="LONG NVARCHAR" />
|
||||
<dbType type="TEXT" />
|
||||
<dbType type="C"/>
|
||||
<dbType type="CHAR"/>
|
||||
</talendType>
|
||||
</talendToDbTypes>
|
||||
<dbToTalendTypes>
|
||||
<dbType type="ANSIDATE">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BOOLEAN">
|
||||
<talendType type="id_Boolean" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BIGINT">
|
||||
<talendType type="id_Long" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BYTE">
|
||||
<talendType type="id_Byte" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BYTE VARYING">
|
||||
<talendType type="id_Byte" default="true" />
|
||||
</dbType>
|
||||
<dbType type="C">
|
||||
<talendType type="id_String" default="true" />
|
||||
<talendType type="id_Character"/>
|
||||
</dbType>
|
||||
<dbType type="CHAR">
|
||||
<talendType type="id_String" default="true" />
|
||||
<talendType type="id_Character"/>
|
||||
</dbType>
|
||||
<dbType type="DECIMAL">
|
||||
<talendType type="id_Float"/>
|
||||
<talendType type="id_BigDecimal" default="true"/>
|
||||
</dbType>
|
||||
<dbType type="DATE">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="FLOAT">
|
||||
<talendType type="id_Double" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="FLOAT4">
|
||||
<talendType type="id_Float" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="INTEGER">
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long"/>
|
||||
<talendType type="id_Short"/>
|
||||
</dbType>
|
||||
<dbType type="INGRESDATE">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="INTERVAL">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="LONG NVARCHAR">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="LONG VARCHAR">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="MONEY">
|
||||
<talendType type="id_Float" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="NCHAR">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="NVARCHAR">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="OBJECT_KEY">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="SMALLINT">
|
||||
<talendType type="id_Short" default="true" />
|
||||
<talendType type="id_Integer" />
|
||||
<talendType type="id_Long"/>
|
||||
</dbType>
|
||||
<dbType type="TEXT">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TINYINT">
|
||||
<talendType type="id_Byte" default="true" />
|
||||
<talendType type="id_Integer" />
|
||||
<talendType type="id_Short"/>
|
||||
<talendType type="id_Long" />
|
||||
</dbType>
|
||||
<dbType type="TIME">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TIMESTAMP">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TABLE_KEY">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="VARCHAR">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
</dbToTalendTypes>
|
||||
</language>
|
||||
</dbms>
|
||||
|
||||
</mapping>
|
||||
@@ -1,567 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<mapping>
|
||||
<dbms product="POSTGRESPLUS" id="postgresplus_id" label="Mapping PostgresPlus"
|
||||
default="true">
|
||||
<dbTypes>
|
||||
<dbType type="ABSTIME" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="ACLITEM" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="BIGSERIAL" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="BIT" ignorePre="true" />
|
||||
<dbType type="BOOL" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="BOX" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="BPCHAR" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="BYTEA" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="CHAR" defaultLength="50" ignorePre="true"/>
|
||||
<dbType type="CID" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="CIDR" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="CIRCLE" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="DATE" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="FLOAT4" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="FLOAT8" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INET" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INT2" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INT2VECTOR" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INT4" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INT8" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INTERVAL" ignorePre="true" />
|
||||
<dbType type="LINE" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="LSEG" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="MACADDR" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="MONEY" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="NAME" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="NUMERIC" defaultLength="20" defaultPrecision="10"/>
|
||||
<dbType type="OID" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="OIDVECTOR" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="PATH" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="POINT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="POLYGON" ignoreLen="true" ignorePre="true"/>
|
||||
<dbType type="REFCURSOR" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="RELTIME" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="REGCLASS" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="REGOPER" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="REGOPERATOR" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="REGPROC" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="REGPROCEDURE" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="REGTYPE" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="SERIAL" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="SMGR" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TEXT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TID" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TIME" ignorePre="true" />
|
||||
<dbType type="TINTERVAL" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TIMESTAMPTZ" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TIMESTAMP" ignorePre="true" />
|
||||
<dbType type="TIMETZ" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="VARBIT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="VARCHAR" defaultLength="200" ignorePre="true" />
|
||||
<dbType type="XID" ignoreLen="true" ignorePre="true" />
|
||||
|
||||
<dbType type="_ABSTIME" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_ACLITEM" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_BIT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_BOX" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_BOOL" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_BPCHAR" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_BYTEA" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_CHAR" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_CID" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_CIDR" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_CIRCLE" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_DATE" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_FLOAT4" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_FLOAT8" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_INET" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_INT2VECTOR" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_INT4" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_INT8" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_INTERVAL" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_LINE" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_LSEG" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_MACADDR" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_MONEY" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_NAME" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_NUMERIC" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_OID" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_OIDVECTOR" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_PATH" ignoreLen="true" ignorePre="true"/>
|
||||
<dbType type="_POINT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_POLYGON" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_REFCURSOR" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_REGCLASS" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_REGOPER" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_REGOPERATOR" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_REGPROC" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_REGPROCEDURE" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_REGTYPE" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_RELTIME" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_TEXT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_TID" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_TIME" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_TIMESTAMP" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_TIMESTAMPTZ" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_TIMETZ" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_TINTERVAL" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_VARBIT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_VARCHAR" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="_XID" ignoreLen="true" ignorePre="true" />
|
||||
</dbTypes>
|
||||
|
||||
<language name="java">
|
||||
<talendToDbTypes><!-- Adviced mappings -->
|
||||
<talendType type="id_List"/>
|
||||
<talendType type="id_Boolean">
|
||||
<dbType type="BOOL" default="true" />
|
||||
</talendType>
|
||||
<talendType type="id_Byte">
|
||||
</talendType>
|
||||
<talendType type="id_byte[]">
|
||||
<dbType type="BIT" default="true" />
|
||||
<dbType type="VARBIT" />
|
||||
</talendType>
|
||||
<talendType type="id_Character">
|
||||
<dbType type="CHAR" default="true" />
|
||||
<dbType type="BPCHAR" />
|
||||
<dbType type="VARCHAR" />
|
||||
<dbType type="TEXT" />
|
||||
</talendType>
|
||||
<talendType type="id_Date">
|
||||
<dbType type="DATE" default="true" />
|
||||
<dbType type="ABSTIME" />
|
||||
<dbType type="TIMETZ" />
|
||||
<dbType type="TIME" />
|
||||
<dbType type="TIMESTAMPTZ" />
|
||||
<dbType type="TIMESTAMP" />
|
||||
<dbType type="INTERVAL" />
|
||||
<dbType type="TINTERVAL" />
|
||||
<dbType type="RELTIME" />
|
||||
</talendType>
|
||||
<talendType type="id_BigDecimal">
|
||||
<dbType type="NUMERIC" default="true" />
|
||||
<dbType type="FLOAT4" />
|
||||
<dbType type="FLOAT8"/>
|
||||
</talendType>
|
||||
<talendType type="id_Double">
|
||||
<dbType type="FLOAT4" />
|
||||
<dbType type="FLOAT8" default="true" />
|
||||
<dbType type="NUMERIC" />
|
||||
</talendType>
|
||||
<talendType type="id_Float">
|
||||
<dbType type="FLOAT4" default="true" />
|
||||
<dbType type="FLOAT8" />
|
||||
<dbType type="NUMERIC" />
|
||||
</talendType>
|
||||
<talendType type="id_Integer">
|
||||
<dbType type="INT2" />
|
||||
<dbType type="INT4" default="true" />
|
||||
<dbType type="SERIAL" />
|
||||
<dbType type="INT8" />
|
||||
<dbType type="BIGSERIAL" />
|
||||
</talendType>
|
||||
<talendType type="id_Long">
|
||||
<dbType type="INT2" />
|
||||
<dbType type="INT4" />
|
||||
<dbType type="SERIAL" />
|
||||
<dbType type="INT8" default="true" />
|
||||
<dbType type="BIGSERIAL" />
|
||||
</talendType>
|
||||
<talendType type="id_Object">
|
||||
<dbType type="_POINT" />
|
||||
<dbType type="_POLYGON" />
|
||||
<dbType type="_FLOAT4" />
|
||||
<dbType type="_REFCURSOR" />
|
||||
<dbType type="_REGCLASS" />
|
||||
<dbType type="_REGOPER" />
|
||||
<dbType type="_REGOPERATOR" />
|
||||
<dbType type="_REGPROC" />
|
||||
<dbType type="_REGPROCEDURE" />
|
||||
<dbType type="_REGTYPE" />
|
||||
<dbType type="_RELTIME" />
|
||||
<dbType type="_TEXT" />
|
||||
<dbType type="_TID" />
|
||||
<dbType type="_TIMETZ" />
|
||||
<dbType type="_TIME" />
|
||||
<dbType type="_TIMESTAMPTZ" />
|
||||
<dbType type="_TIMESTAMP" />
|
||||
<dbType type="_TINTERVAL" />
|
||||
<dbType type="_XID" />
|
||||
<dbType type="ACLITEM" />
|
||||
<dbType type="BYTEA" />
|
||||
<dbType type="CID" />
|
||||
<dbType type="CIDR" />
|
||||
<dbType type="CIRCLE" />
|
||||
<dbType type="INET" />
|
||||
<dbType type="MACADDR" />
|
||||
<dbType type="MONEY" />
|
||||
<dbType type="OID" />
|
||||
<dbType type="PATH" />
|
||||
<dbType type="POLYGON" />
|
||||
<dbType type="REFCURSOR" />
|
||||
<dbType type="REGCLASS" />
|
||||
<dbType type="REGOPER" />
|
||||
<dbType type="REGOPERATOR" />
|
||||
<dbType type="REGPROC" />
|
||||
<dbType type="REGPROCEDURE" />
|
||||
<dbType type="REGTYPE" />
|
||||
<dbType type="SMGR" />
|
||||
<dbType type="TID" />
|
||||
<dbType type="XID" />
|
||||
<dbType type="_CHAR" />
|
||||
<dbType type="_ABSTIME" />
|
||||
<dbType type="_ACLITEM" />
|
||||
<dbType type="_INT8" />
|
||||
<dbType type="_VARBIT" />
|
||||
<dbType type="_BIT" />
|
||||
<dbType type="_BOOL" />
|
||||
<dbType type="BOX" />
|
||||
<dbType type="_BOX" />
|
||||
<dbType type="_BYTEA" />
|
||||
<dbType type="_VARCHAR" />
|
||||
<dbType type="_BPCHAR" />
|
||||
<dbType type="_CID" />
|
||||
<dbType type="_CIDR" />
|
||||
<dbType type="_CIRCLE" />
|
||||
<dbType type="_DATE" />
|
||||
<dbType type="_FLOAT8" />
|
||||
<dbType type="_INET" />
|
||||
<dbType type="INT2VECTOR" />
|
||||
<dbType type="_INT2VECTOR" />
|
||||
<dbType type="_INT4" />
|
||||
<dbType type="_INTERVAL" />
|
||||
<dbType type="LINE" />
|
||||
<dbType type="_LINE" />
|
||||
<dbType type="LSEG" />
|
||||
<dbType type="_LSEG" />
|
||||
<dbType type="_MACADDR" />
|
||||
<dbType type="_MONEY" />
|
||||
<dbType type="NAME" />
|
||||
<dbType type="_NAME" />
|
||||
<dbType type="_NUMERIC" />
|
||||
<dbType type="_OID" />
|
||||
<dbType type="OIDVECTOR" />
|
||||
<dbType type="_OIDVECTOR" />
|
||||
<dbType type="_PATH" />
|
||||
<dbType type="POINT" default="true" />
|
||||
</talendType>
|
||||
<talendType type="id_Short">
|
||||
<dbType type="INT2" default="true" />
|
||||
<dbType type="INT4" />
|
||||
<dbType type="SERIAL" />
|
||||
<dbType type="INT8" />
|
||||
<dbType type="BIGSERIAL" />
|
||||
</talendType>
|
||||
<talendType type="id_String">
|
||||
<dbType type="BPCHAR" />
|
||||
<dbType type="VARCHAR" default="true" />
|
||||
<dbType type="TEXT" />
|
||||
</talendType>
|
||||
</talendToDbTypes>
|
||||
<dbToTalendTypes>
|
||||
<dbType type="INT2" >
|
||||
<talendType type="id_Short" default="true" />
|
||||
</dbType>
|
||||
<dbType type="INT4" >
|
||||
<talendType type="id_Integer" default="true" />
|
||||
</dbType>
|
||||
<dbType type="SERIAL" >
|
||||
<talendType type="id_Integer" default="true" />
|
||||
</dbType>
|
||||
<dbType type="INT8" >
|
||||
<talendType type="id_Long" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BIGSERIAL" >
|
||||
<talendType type="id_Long" default="true" />
|
||||
</dbType>
|
||||
<dbType type="FLOAT4" >
|
||||
<talendType type="id_Float" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="FLOAT8" >
|
||||
<talendType type="id_Double" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="NUMERIC">
|
||||
<talendType type="id_Double"/>
|
||||
<talendType type="id_BigDecimal" default="true"/>
|
||||
</dbType>
|
||||
<dbType type="BOOL" >
|
||||
<talendType type="id_Boolean" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BIT" >
|
||||
<talendType type="id_byte[]" default="true" />
|
||||
</dbType>
|
||||
<dbType type="VARBIT" >
|
||||
<talendType type="id_byte[]" default="true" />
|
||||
</dbType>
|
||||
<dbType type="CHAR" >
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BPCHAR" >
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="VARCHAR" >
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TEXT" >
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="DATE" >
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="ABSTIME" >
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TIMETZ" >
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TIME" >
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TIMESTAMPTZ" >
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TIMESTAMP" >
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="INTERVAL" >
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TINTERVAL" >
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="RELTIME" >
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="ACLITEM" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BYTEA" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="CID" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="CIDR" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="CIRCLE" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="INET" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="MACADDR" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="MONEY" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="OID" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="PATH" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="POLYGON" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="REFCURSOR" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="REGCLASS" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="REGOPER" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="REGOPERATOR" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="REGPROC" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="REGPROCEDURE" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="REGTYPE" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="SMGR" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TID" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="XID" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BOX" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="INT2VECTOR" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="LINE" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="LSEG" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="NAME" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="OIDVECTOR" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="POINT" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<!-- object -->
|
||||
<dbType type="_OIDVECTOR" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_PATH" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_NAME" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_NUMERIC" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_OID" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_LSEG" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_MACADDR" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_MONEY" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_LINE" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_INT2VECTOR" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_INT4" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_INTERVAL" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_BOX" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_BYTEA" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_VARCHAR" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_BPCHAR" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_CID" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_CIDR" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_CIRCLE" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_DATE" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_FLOAT8" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_INET" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_CHAR" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_ABSTIME" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_ACLITEM" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_INT8" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_VARBIT" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_BIT" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_BOOL" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_POINT" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_POLYGON" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_FLOAT4" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_REFCURSOR" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_REGCLASS" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_REGOPER" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_REGOPERATOR" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_REGPROC" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_REGPROCEDURE" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_REGTYPE" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_RELTIME" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_TEXT" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_TID" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_TIMETZ" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_TIME" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_TIMESTAMPTZ" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_TIMESTAMP" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_TINTERVAL" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="_XID" >
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
</dbToTalendTypes>
|
||||
</language>
|
||||
</dbms>
|
||||
|
||||
</mapping>
|
||||
@@ -43,9 +43,9 @@
|
||||
<dbType type="BIT" default="true" />
|
||||
</talendType>
|
||||
<talendType type="id_Byte">
|
||||
<dbType type="TINYINT" default="true" />
|
||||
<dbType type="INT" default="true" />
|
||||
<dbType type="BIGINT" />
|
||||
<dbType type="INT" />
|
||||
<dbType type="TINYINT" />
|
||||
<dbType type="SMALLINT" />
|
||||
</talendType>
|
||||
<talendType type="id_byte[]">
|
||||
@@ -204,8 +204,8 @@
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TINYINT">
|
||||
<talendType type="id_Byte" default="true" />
|
||||
<talendType type="id_Integer"/>
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Byte"/>
|
||||
<talendType type="id_Long"/>
|
||||
<talendType type="id_Short"/>
|
||||
</dbType>
|
||||
|
||||
@@ -0,0 +1,211 @@
|
||||
<?xml version="1.0"?>
|
||||
<mapping>
|
||||
<dbms product="VECTORWISE" id="vectorwise_id" label="Mapping VectorWise"
|
||||
default="true">
|
||||
<dbTypes>
|
||||
<dbType type="ANSIDATE" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="BIGINT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="BYTE" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="BYTE VARYING" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="C" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="CHAR" ignorePre="true" />
|
||||
<dbType type="DECIMAL" defaultLength="20" defaultPrecision="10" />
|
||||
<dbType type="DATE" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="FLOAT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="FLOAT4" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INTEGER" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INGRESDATE" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INTERVAL" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="LONG NVARCHAR" ignorePre="true" />
|
||||
<dbType type="LONG VARCHAR" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="MONEY" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="NCHAR" ignorePre="true" defaultLength="10"/>
|
||||
<dbType type="NVARCHAR" ignorePre="true" defaultLength="10"/>
|
||||
<dbType type="OBJECT_KEY" ignoreLen="true" ignorePre="true"/>
|
||||
<dbType type="SMALLINT" ignoreLen="true" ignorePre="true"/>
|
||||
<dbType type="TEXT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TINYINT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TIME" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TIMESTAMP" ignoreLen="true" ignorePre="true"/>
|
||||
<dbType type="TABLE_KEY" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="VARCHAR" default="true" defaultLength="1200" ignorePre="true"/>
|
||||
</dbTypes>
|
||||
|
||||
<language name="java">
|
||||
<talendToDbTypes><!-- Adviced mappings -->
|
||||
<talendType type="id_List"/>
|
||||
<talendType type="id_Boolean">
|
||||
</talendType>
|
||||
<talendType type="id_Byte">
|
||||
<dbType type="BYTE" default="true" />
|
||||
<dbType type="BYTE VARYING" />
|
||||
</talendType>
|
||||
<talendType type="id_byte[]">
|
||||
</talendType>
|
||||
<talendType type="id_Character">
|
||||
<dbType type="CHAR" default="true" />
|
||||
<dbType type="VARCHAR"/>
|
||||
<dbType type="C"/>
|
||||
<dbType type="TEXT"/>
|
||||
<dbType type="LONG VARCHAR"/>
|
||||
<dbType type="NCHAR"/>
|
||||
<dbType type="NVARCHAR"/>
|
||||
<dbType type="LONG NVARCHAR"/>
|
||||
</talendType>
|
||||
<talendType type="id_Date">
|
||||
<dbType type="ANSIDATE" default="true"/>
|
||||
<dbType type="DATE"/>
|
||||
<dbType type="INGRESDATE" />
|
||||
<dbType type="TIME" />
|
||||
<dbType type="TIMESTAMP" />
|
||||
<dbType type="INTERVAL"/>
|
||||
</talendType>
|
||||
<talendType type="id_BigDecimal">
|
||||
<dbType type="DECIMAL" default="true" />
|
||||
<dbType type="FLOAT4" />
|
||||
<dbType type="FLOAT"/>
|
||||
<dbType type="MONEY"/>
|
||||
</talendType>
|
||||
<talendType type="id_Double">
|
||||
<dbType type="FLOAT" default="true" />
|
||||
<dbType type="FLOAT4" />
|
||||
<dbType type="DECIMAL"/>
|
||||
<dbType type="MONEY"/>
|
||||
</talendType>
|
||||
<talendType type="id_Float">
|
||||
<dbType type="FLOAT4" default="true" />
|
||||
<dbType type="FLOAT"/>
|
||||
<dbType type="DECIMAL" />
|
||||
<dbType type="MONEY"/>
|
||||
</talendType>
|
||||
<talendType type="id_Integer">
|
||||
<dbType type="INTEGER" default="true" />
|
||||
<dbType type="BIGINT" />
|
||||
<dbType type="SMALLINT"/>
|
||||
<dbType type="TINYINT"/>
|
||||
</talendType>
|
||||
<talendType type="id_Long">
|
||||
<dbType type="BIGINT" default="true" />
|
||||
<dbType type="INTEGER"/>
|
||||
<dbType type="SMALLINT"/>
|
||||
<dbType type="TINYINT"/>
|
||||
</talendType>
|
||||
<talendType type="id_Object">
|
||||
<dbType type="MONEY" default="true"/>
|
||||
<dbType type="OBJECT_KEY" />
|
||||
<dbType type="TABLE_KEY" />
|
||||
</talendType>
|
||||
<talendType type="id_Short">
|
||||
<dbType type="SMALLINT" default="true" />
|
||||
<dbType type="INTEGER" />
|
||||
<dbType type="BIGINT"/>
|
||||
<dbType type="TINYINT" />
|
||||
</talendType>
|
||||
<talendType type="id_String">
|
||||
<dbType type="VARCHAR" default="true" />
|
||||
<dbType type="LONG VARCHAR" />
|
||||
<dbType type="NCHAR"/>
|
||||
<dbType type="NVARCHAR" />
|
||||
<dbType type="LONG NVARCHAR" />
|
||||
<dbType type="TEXT" />
|
||||
<dbType type="C"/>
|
||||
<dbType type="CHAR"/>
|
||||
</talendType>
|
||||
</talendToDbTypes>
|
||||
<dbToTalendTypes>
|
||||
<dbType type="ANSIDATE">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BIGINT">
|
||||
<talendType type="id_Long" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BYTE">
|
||||
<talendType type="id_Byte" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BYTE VARYING">
|
||||
<talendType type="id_Byte" default="true" />
|
||||
</dbType>
|
||||
<dbType type="C">
|
||||
<talendType type="id_String" default="true" />
|
||||
<talendType type="id_Character"/>
|
||||
</dbType>
|
||||
<dbType type="CHAR">
|
||||
<talendType type="id_String" default="true" />
|
||||
<talendType type="id_Character"/>
|
||||
</dbType>
|
||||
<dbType type="DECIMAL">
|
||||
<talendType type="id_Float"/>
|
||||
<talendType type="id_BigDecimal" default="true"/>
|
||||
</dbType>
|
||||
<dbType type="DATE">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="FLOAT">
|
||||
<talendType type="id_Double" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="FLOAT4">
|
||||
<talendType type="id_Float" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="INTEGER">
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long"/>
|
||||
<talendType type="id_Short"/>
|
||||
</dbType>
|
||||
<dbType type="INGRESDATE">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="INTERVAL">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="LONG NVARCHAR">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="LONG VARCHAR">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="MONEY">
|
||||
<talendType type="id_Float" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="NCHAR">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="NVARCHAR">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="OBJECT_KEY">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="SMALLINT">
|
||||
<talendType type="id_Short" default="true" />
|
||||
<talendType type="id_Integer" />
|
||||
<talendType type="id_Long"/>
|
||||
</dbType>
|
||||
<dbType type="TEXT">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TINYINT">
|
||||
<talendType type="id_Byte" default="true" />
|
||||
<talendType type="id_Integer" />
|
||||
<talendType type="id_Short"/>
|
||||
<talendType type="id_Long" />
|
||||
</dbType>
|
||||
<dbType type="TIME">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TIMESTAMP">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TABLE_KEY">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="VARCHAR">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
</dbToTalendTypes>
|
||||
</language>
|
||||
</dbms>
|
||||
|
||||
</mapping>
|
||||
@@ -0,0 +1,63 @@
|
||||
|
||||
# Component
|
||||
tSnowflakeConnection=java.base/java.nio
|
||||
tSnowflakeClose=java.base/java.nio
|
||||
tSnowflakeCommit=java.base/java.nio
|
||||
tSnowflakeInput=java.base/java.nio
|
||||
tSnowflakeOutput=java.base/java.nio
|
||||
tSnowflakeOutputBulk=java.base/java.nio
|
||||
tSnowflakeOutputBulkExec=java.base/java.nio
|
||||
tSnowflakeRow=java.base/java.nio
|
||||
tSnowflakeBulkExec=java.base/java.nio
|
||||
tSnowflakeRollback=java.base/java.nio
|
||||
|
||||
tCouchbaseInput=java.base/java.lang.invoke
|
||||
tCouchbaseOutput=java.base/java.lang.invoke
|
||||
tCouchbaseDCPInput=java.base/java.lang.invoke
|
||||
tCouchbaseDCPOutput=java.base/java.lang.invoke
|
||||
|
||||
tWriteJSONField=java.xml/com.sun.org.apache.xerces.internal.parsers,java.xml/com.sun.org.apache.xerces.internal.util
|
||||
|
||||
tFTPClose=java.base/sun.security.ssl,java.base/sun.security.util
|
||||
tFTPConnection=java.base/sun.security.ssl,java.base/sun.security.util
|
||||
tFTPDelete=java.base/sun.security.ssl,java.base/sun.security.util
|
||||
tFTPFileExist=java.base/sun.security.ssl,java.base/sun.security.util
|
||||
tFTPFileList=java.base/sun.security.ssl,java.base/sun.security.util
|
||||
tFTPFileProperties=java.base/sun.security.ssl,java.base/sun.security.util
|
||||
tFTPGet=java.base/sun.security.ssl,java.base/sun.security.util
|
||||
tFTPPut=java.base/sun.security.ssl,java.base/sun.security.util
|
||||
tFTPRename=java.base/sun.security.ssl,java.base/sun.security.util
|
||||
tFTPTruncate=java.base/sun.security.ssl,java.base/sun.security.util
|
||||
|
||||
tNeo4jBatchOutput=java.base/java.lang,java.base/sun.nio.ch
|
||||
tNeo4jBatchOutputRelationship=java.base/java.lang,java.base/sun.nio.ch
|
||||
tNeo4jBatchSchema=java.base/java.lang,java.base/sun.nio.ch
|
||||
tNeo4jClose=java.base/java.lang,java.base/sun.nio.ch
|
||||
tNeo4jConnection=java.base/java.lang,java.base/sun.nio.ch
|
||||
tNeo4jImportTool=java.base/java.lang,java.base/sun.nio.ch
|
||||
tNeo4jInput=java.base/java.lang,java.base/sun.nio.ch
|
||||
tNeo4jRow=java.base/java.lang,java.base/sun.nio.ch
|
||||
|
||||
tMongoDBOutput=java.xml/com.sun.org.apache.xerces.internal.parsers,java.xml/com.sun.org.apache.xerces.internal.util
|
||||
tCosmosDBOutput=java.xml/com.sun.org.apache.xerces.internal.parsers,java.xml/com.sun.org.apache.xerces.internal.util
|
||||
|
||||
tMatchGroup=java.base/java.io
|
||||
tRuleSurvivorship=java.base/java.lang
|
||||
tRecordMatching=java.base/java.io
|
||||
tDqReportRun=java.base/java.lang,java.base/java.nio
|
||||
|
||||
tWebService=java.base/java.lang
|
||||
tWebServiceInput=java.base/java.lang
|
||||
|
||||
tRESTClient=java.base/sun.net.www.protocol.https,java.base/java.net
|
||||
|
||||
# TCK framework
|
||||
TCK_COMMON_ARGS=java.base/java.io,java.base/java.lang.invoke,java.base/java.lang.reflect,java.base/java.lang,java.base/java.net,java.base/java.nio,java.base/java.util,java.base/sun.nio.ch,java.base/sun.net.www.protocol.https
|
||||
|
||||
# BigData distribution
|
||||
SPARK_3_4_x=java.base/java.nio,java.base/sun.nio.ch,java.base/java.util,java.base/java.lang.invoke,java.base/sun.util.calendar
|
||||
SPARK_3_3_x=java.base/java.nio,java.base/sun.nio.ch,java.base/java.util,java.base/java.lang.invoke,java.base/sun.util.calendar
|
||||
SPARK_3_2_x=java.base/java.nio,java.base/sun.nio.ch,java.base/java.util,java.base/java.lang.invoke,java.base/sun.util.calendar
|
||||
SPARK_3_1_x=java.base/java.nio,java.base/sun.nio.ch,java.base/java.util,java.base/java.lang.invoke,java.base/sun.util.calendar
|
||||
SPARK_3_0_x=java.base/java.nio,java.base/sun.nio.ch,java.base/java.util,java.base/java.lang.invoke,java.base/sun.util.calendar
|
||||
SPARK_2_4_x=java.base/java.nio,java.base/sun.nio.ch,java.base/java.util,java.base/java.lang.invoke,java.base/sun.util.calendar
|
||||
@@ -26,26 +26,12 @@ import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.Status;
|
||||
import org.eclipse.core.runtime.jobs.Job;
|
||||
import org.eclipse.jface.dialogs.Dialog;
|
||||
import org.eclipse.jface.dialogs.IDialogConstants;
|
||||
import org.eclipse.jface.dialogs.MessageDialog;
|
||||
import org.eclipse.jface.widgets.WidgetFactory;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.SelectionAdapter;
|
||||
import org.eclipse.swt.events.SelectionEvent;
|
||||
import org.eclipse.swt.graphics.Point;
|
||||
import org.eclipse.swt.layout.GridData;
|
||||
import org.eclipse.swt.layout.GridLayout;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Control;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.eclipse.swt.widgets.Label;
|
||||
import org.eclipse.swt.widgets.Link;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.ui.PlatformUI;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.report.ItemsReportUtil;
|
||||
import org.talend.commons.utils.io.FilesUtils;
|
||||
import org.talend.commons.report.ReportAccessDialog;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.model.general.Project;
|
||||
import org.talend.core.model.properties.Item;
|
||||
@@ -175,8 +161,10 @@ public class ItemAnalysisReportManager {
|
||||
boolean generateSuccess = ItemsReportUtil.generateReportFile(reportFile, ANALYSIS_REPORT_HEAD, recordLines);
|
||||
if (generateSuccess) {
|
||||
Display.getDefault().asyncExec(() -> {
|
||||
AnalysisReportAccessDialog accessDialog = new AnalysisReportAccessDialog(
|
||||
ReportAccessDialog accessDialog = new ReportAccessDialog(
|
||||
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
|
||||
Messages.getString("AnalysisReportAccessDialog.shellTitle"),
|
||||
Messages.getString("AnalysisReportAccessDialog.generateSuccess"),
|
||||
reportFile.getAbsolutePath());
|
||||
accessDialog.open();
|
||||
});
|
||||
@@ -240,76 +228,3 @@ public class ItemAnalysisReportManager {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class AnalysisReportAccessDialog extends Dialog {
|
||||
|
||||
private String reportGeneratedFile;
|
||||
|
||||
protected AnalysisReportAccessDialog(Shell parentShell, String reportGeneratedFile) {
|
||||
super(parentShell);
|
||||
this.reportGeneratedFile = reportGeneratedFile;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureShell(Shell newShell) {
|
||||
super.configureShell(newShell);
|
||||
newShell.setText(Messages.getString("AnalysisReportAccessDialog.shellTitle"));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initializeBounds() {
|
||||
getShell().setSize(700, 190);
|
||||
Point location = getInitialLocation(getShell().getSize());
|
||||
getShell().setLocation(location.x, location.y);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Control createDialogArea(Composite parent) {
|
||||
GridLayout layout = new GridLayout();
|
||||
layout.marginWidth = 0;
|
||||
layout.marginHeight = 0;
|
||||
Composite container = WidgetFactory.composite(SWT.NONE).layout(layout).layoutData(new GridData(GridData.FILL_BOTH))
|
||||
.create(parent);
|
||||
applyDialogFont(container);
|
||||
|
||||
Composite composite = new Composite(container, SWT.NONE);
|
||||
GridLayout compositeLayout = new GridLayout();
|
||||
compositeLayout.numColumns = 1;
|
||||
compositeLayout.marginWidth = 0;
|
||||
compositeLayout.marginTop = 8;
|
||||
compositeLayout.marginLeft = 10;
|
||||
composite.setLayout(compositeLayout);
|
||||
Label successMsgLabel = new Label(composite, SWT.NONE);
|
||||
successMsgLabel.setText(Messages.getString("AnalysisReportAccessDialog.generateSuccess"));
|
||||
GridData gridData = new GridData(GridData.GRAB_HORIZONTAL | GridData.FILL_VERTICAL);
|
||||
successMsgLabel.setLayoutData(gridData);
|
||||
|
||||
Link accessLink = new Link(composite, SWT.NONE);
|
||||
accessLink.setText(Messages.getString("AnalysisReportAccessDialog.completeReportAvailable") + " <a>"
|
||||
+ Messages.getString("AnalysisReportAccessDialog.accessReport") + "</a> ");
|
||||
accessLink.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL | GridData.FILL_VERTICAL));
|
||||
accessLink.addSelectionListener(new SelectionAdapter() {
|
||||
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
File reportFile = new File(reportGeneratedFile);
|
||||
if (reportFile != null && reportFile.exists()) {
|
||||
try {
|
||||
FilesUtils.selectFileInSystemExplorer(reportFile);
|
||||
} catch (Exception excep) {
|
||||
ExceptionHandler.process(excep);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
return container;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void createButtonsForButtonBar(Composite parent) {
|
||||
createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2023 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.report;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import org.eclipse.jface.dialogs.Dialog;
|
||||
import org.eclipse.jface.dialogs.IDialogConstants;
|
||||
import org.eclipse.jface.widgets.WidgetFactory;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.SelectionAdapter;
|
||||
import org.eclipse.swt.events.SelectionEvent;
|
||||
import org.eclipse.swt.graphics.Point;
|
||||
import org.eclipse.swt.layout.FormAttachment;
|
||||
import org.eclipse.swt.layout.FormData;
|
||||
import org.eclipse.swt.layout.FormLayout;
|
||||
import org.eclipse.swt.layout.GridData;
|
||||
import org.eclipse.swt.layout.GridLayout;
|
||||
import org.eclipse.swt.widgets.Button;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Control;
|
||||
import org.eclipse.swt.widgets.Label;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.utils.io.FilesUtils;
|
||||
import org.talend.core.runtime.i18n.Messages;
|
||||
|
||||
/**
|
||||
* DOC jding class global comment. Detailled comment
|
||||
*/
|
||||
public class ReportAccessDialog extends Dialog {
|
||||
|
||||
private String shellTitle;
|
||||
|
||||
private String message;
|
||||
|
||||
private String reportGeneratedFile;
|
||||
|
||||
public ReportAccessDialog(Shell parentShell, String shellTitle, String message, String reportGeneratedFile) {
|
||||
super(parentShell);
|
||||
this.shellTitle = shellTitle;
|
||||
this.message = message;
|
||||
this.reportGeneratedFile = reportGeneratedFile;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureShell(Shell newShell) {
|
||||
super.configureShell(newShell);
|
||||
newShell.setText(shellTitle);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initializeBounds() {
|
||||
getShell().setSize(700, 190);
|
||||
Point location = getInitialLocation(getShell().getSize());
|
||||
getShell().setLocation(location.x, location.y);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Control createDialogArea(Composite parent) {
|
||||
GridLayout layout = new GridLayout();
|
||||
layout.marginWidth = 0;
|
||||
layout.marginHeight = 0;
|
||||
Composite container = WidgetFactory.composite(SWT.NONE).layout(layout).layoutData(new GridData(GridData.FILL_BOTH))
|
||||
.create(parent);
|
||||
applyDialogFont(container);
|
||||
|
||||
Composite composite = new Composite(container, SWT.NONE);
|
||||
GridLayout compositeLayout = new GridLayout();
|
||||
compositeLayout.numColumns = 1;
|
||||
compositeLayout.marginWidth = 0;
|
||||
compositeLayout.marginTop = 8;
|
||||
compositeLayout.marginLeft = 10;
|
||||
composite.setLayout(compositeLayout);
|
||||
Label successMsgLabel = new Label(composite, SWT.NONE);
|
||||
successMsgLabel.setText(message);
|
||||
GridData gridData = new GridData(GridData.GRAB_HORIZONTAL | GridData.FILL_VERTICAL);
|
||||
successMsgLabel.setLayoutData(gridData);
|
||||
|
||||
Composite noteComp = new Composite(composite, SWT.NONE);
|
||||
noteComp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
|
||||
noteComp.setLayout(new FormLayout());
|
||||
Label noteLabel = new Label(noteComp, SWT.NONE);
|
||||
noteLabel.setText(Messages.getString("AnalysisReportAccessDialog.completeReportAvailable"));
|
||||
FormData noteLabelFormData = new FormData();
|
||||
noteLabelFormData.bottom = new FormAttachment(100, -5);
|
||||
noteLabelFormData.left = new FormAttachment(0, 0);
|
||||
noteLabel.setLayoutData(noteLabelFormData);
|
||||
Button browseBtn = new Button(noteComp, SWT.NONE);
|
||||
browseBtn.setText(Messages.getString("AnalysisReportAccessDialog.accessBrowse"));
|
||||
FormData linkFormData = new FormData();
|
||||
linkFormData.top = new FormAttachment(0, 0);
|
||||
linkFormData.left = new FormAttachment(noteLabel, 5);
|
||||
browseBtn.setLayoutData(linkFormData);
|
||||
browseBtn.addSelectionListener(new SelectionAdapter() {
|
||||
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
File reportFile = new File(reportGeneratedFile);
|
||||
if (reportFile != null && reportFile.exists()) {
|
||||
try {
|
||||
FilesUtils.selectFileInSystemExplorer(reportFile);
|
||||
} catch (Exception excep) {
|
||||
ExceptionHandler.process(excep);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
return container;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void createButtonsForButtonBar(Composite parent) {
|
||||
createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -39,6 +39,9 @@ import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.runtime.CoreRuntimePlugin;
|
||||
import org.talend.core.runtime.projectsetting.ProjectPreferenceManager;
|
||||
import org.talend.designer.runprocess.IRunProcessService;
|
||||
import org.talend.utils.JavaVersion;
|
||||
import org.talend.utils.StudioKeysFileCheck;
|
||||
import org.talend.utils.VersionException;
|
||||
|
||||
/**
|
||||
* Utilities around perl stuff. <br/>
|
||||
@@ -58,6 +61,10 @@ public final class JavaUtils {
|
||||
|
||||
public static final List<String> AVAILABLE_VERSIONS = Arrays.asList(JavaCore.VERSION_1_8 );
|
||||
|
||||
public static final String ALLOW_JAVA_INTERNAL_ACCESS = "allow.java.internal.access"; //$NON-NLS-1$
|
||||
|
||||
public static final String CUSTOM_ACCESS_SETTINGS = "custom.access.settings"; //$NON-NLS-1$
|
||||
|
||||
public static final String PROCESSOR_TYPE = "javaProcessor"; //$NON-NLS-1$
|
||||
|
||||
public static final String PATH_SEPARATOR = "/"; //$NON-NLS-1$
|
||||
@@ -244,7 +251,7 @@ public final class JavaUtils {
|
||||
setProjectJavaVserion(javaVersion);
|
||||
applyCompilerCompliance(javaVersion);
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IRunProcessService.class)) {
|
||||
IRunProcessService service = (IRunProcessService) GlobalServiceRegister.getDefault().getService(IRunProcessService.class);
|
||||
IRunProcessService service = GlobalServiceRegister.getDefault().getService(IRunProcessService.class);
|
||||
service.updateProjectPomWithTemplate();
|
||||
}
|
||||
}
|
||||
@@ -280,6 +287,10 @@ public final class JavaUtils {
|
||||
if (version == null) {
|
||||
return defaultCompliance;
|
||||
}
|
||||
JavaVersion ver = new JavaVersion(version);
|
||||
if (ver.getMajor() > 8) {
|
||||
return String.valueOf(ver.getMajor());
|
||||
}
|
||||
if (version.startsWith(JavaCore.VERSION_1_8)) {
|
||||
return JavaCore.VERSION_1_8;
|
||||
}
|
||||
@@ -360,5 +371,39 @@ public final class JavaUtils {
|
||||
monitor.worked(1);
|
||||
}
|
||||
}
|
||||
|
||||
public static void validateJavaVersion() {
|
||||
try {
|
||||
// validate jvm which is used to start studio
|
||||
StudioKeysFileCheck.validateJavaVersion();
|
||||
|
||||
// validate default complier's compliance level
|
||||
IVMInstall install = JavaRuntime.getDefaultVMInstall();
|
||||
String ver = getCompilerCompliance((IVMInstall2) install, JavaCore.VERSION_1_8);
|
||||
if (new JavaVersion(ver).compareTo(new JavaVersion(StudioKeysFileCheck.JAVA_VERSION_MAXIMUM_STRING)) > 0) {
|
||||
VersionException e = new VersionException(VersionException.ERR_JAVA_VERSION_NOT_SUPPORTED,
|
||||
"The maximum Java version supported by Studio is " + StudioKeysFileCheck.JAVA_VERSION_MAXIMUM_STRING + ". Your compiler's compliance level is " + ver);
|
||||
throw e;
|
||||
}
|
||||
} catch (Exception e1) {
|
||||
if (e1 instanceof VersionException) {
|
||||
throw e1;
|
||||
}
|
||||
ExceptionHandler.process(e1);
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isJava17() {
|
||||
boolean isJava17 = false;
|
||||
String javaVersion = System.getProperty("java.version");
|
||||
String[] arr = javaVersion.split("[^\\d]+");
|
||||
try {
|
||||
isJava17 = Integer.parseInt(arr[0]) >= 17;
|
||||
} catch (NumberFormatException e) {
|
||||
ExceptionHandler.process(e);
|
||||
isJava17 = false;
|
||||
}
|
||||
return isJava17;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
@@ -157,7 +158,7 @@ public interface ILibraryManagerService extends IService {
|
||||
|
||||
public void clearCache(boolean cleanIndex);
|
||||
|
||||
public void deployLibsFromCustomComponents();
|
||||
public void deployLibsFromCustomComponents(File componentFolder, List<ModuleNeeded> modulesNeeded);
|
||||
|
||||
@Deprecated
|
||||
public Set<String> list(boolean withComponent, IProgressMonitor... monitorWrap);
|
||||
|
||||
@@ -54,4 +54,6 @@ public interface ILibraryManagerUIService extends IService {
|
||||
public boolean confirmDialog(String originalJarFileName);
|
||||
|
||||
public IConfigModuleDialog getConfigModuleDialog(Shell parentShell, String initValue, boolean allowDetectDependencies);
|
||||
|
||||
public String getLicenseUrlByName(String licenceName);
|
||||
}
|
||||
|
||||
@@ -60,8 +60,6 @@ public interface ITDQRepositoryService extends IService {
|
||||
*/
|
||||
public void notifySQLExplorer(Item... items);
|
||||
|
||||
public void fillMetadata(ConnectionItem connItem);
|
||||
|
||||
public void refresh();
|
||||
|
||||
// Added 20120503 yyin
|
||||
|
||||
@@ -43,6 +43,8 @@ public class PluginChecker {
|
||||
private static final String CDC_PLUGIN_ID = "org.talend.designer.cdc"; //$NON-NLS-1$
|
||||
|
||||
private static final String SAP_WZIARD_PLUGIN_ID = "org.talend.repository.sap"; //$NON-NLS-1$
|
||||
|
||||
private static final String BIGQUERY_WZIARD_PLUGIN_ID = "org.talend.repository.bigquery"; //$NON-NLS-1$
|
||||
|
||||
private static final String EBCDIC_PLUGIN_ID = "org.talend.repository.ebcdic"; //$NON-NLS-1$
|
||||
|
||||
@@ -246,6 +248,10 @@ public class PluginChecker {
|
||||
public static boolean isSAPWizardPluginLoaded() {
|
||||
return isPluginLoaded(SAP_WZIARD_PLUGIN_ID);
|
||||
}
|
||||
|
||||
public static boolean isBigQueryWizardPluginLoaded() {
|
||||
return isPluginLoaded(BIGQUERY_WZIARD_PLUGIN_ID);
|
||||
}
|
||||
|
||||
public static boolean isEBCDICPluginLoaded() {
|
||||
return isPluginLoaded(EBCDIC_PLUGIN_ID);
|
||||
@@ -267,10 +273,6 @@ public class PluginChecker {
|
||||
return isPluginLoaded(MDM_PLUGIN_ID);
|
||||
}
|
||||
|
||||
public static boolean isExchangeSystemLoaded() {
|
||||
return isPluginLoaded(EXCHANGE_SYSTEM_PLUGIN_ID);
|
||||
}
|
||||
|
||||
public static boolean isRulesPluginLoaded() { // added by hyWang
|
||||
return isPluginLoaded(RULES_PLUGIN_ID);
|
||||
}
|
||||
|
||||
@@ -34,6 +34,9 @@ public enum EDatabase4DriverClassName {
|
||||
|
||||
INFORMIX(EDatabaseTypeName.INFORMIX, "com.informix.jdbc.IfxDriver"), //$NON-NLS-1$
|
||||
|
||||
INGRES(EDatabaseTypeName.INGRES, "com.ingres.jdbc.IngresDriver"),
|
||||
VECTORWISE(EDatabaseTypeName.VECTORWISE, "com.ingres.jdbc.IngresDriver"),
|
||||
|
||||
JAVADB_DERBYCLIENT(EDatabaseTypeName.JAVADB_DERBYCLIENT, "org.apache.derby.jdbc.ClientDriver"), //$NON-NLS-1$
|
||||
JAVADB_EMBEDED(EDatabaseTypeName.JAVADB_EMBEDED, "org.apache.derby.jdbc.EmbeddedDriver"), //$NON-NLS-1$
|
||||
JAVADB_JCCJDBC(EDatabaseTypeName.JAVADB_JCCJDBC, "com.ibm.db2.jcc.DB2Driver"), //$NON-NLS-1$
|
||||
@@ -49,6 +52,7 @@ public enum EDatabase4DriverClassName {
|
||||
MYSQL8(EDatabaseTypeName.MYSQL, "com.mysql.cj.jdbc.Driver"), //$NON-NLS-1$
|
||||
MARIADB(EDatabaseTypeName.MYSQL, "org.mariadb.jdbc.Driver"), //$NON-NLS-1$
|
||||
AMAZON_AURORA(EDatabaseTypeName.AMAZON_AURORA, "org.gjt.mm.mysql.Driver"), //$NON-NLS-1$
|
||||
AMAZON_AURORA_3(EDatabaseTypeName.AMAZON_AURORA, "com.mysql.cj.jdbc.Driver"), //$NON-NLS-1$
|
||||
NETEZZA(EDatabaseTypeName.NETEZZA, "org.netezza.Driver"), //$NON-NLS-1$
|
||||
|
||||
ORACLEFORSID(EDatabaseTypeName.ORACLEFORSID, "oracle.jdbc.OracleDriver", "oracle.jdbc.driver.OracleDriver"), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
@@ -62,7 +66,6 @@ public enum EDatabase4DriverClassName {
|
||||
// Take care, PSQL is set as first here since actually the audit will take the first db with the postgresql driver
|
||||
// if change the order, it might break the audit for PSQL.
|
||||
PSQL(EDatabaseTypeName.PSQL, "org.postgresql.Driver"), //$NON-NLS-1$
|
||||
PLUSPSQL(EDatabaseTypeName.PLUSPSQL, "org.postgresql.Driver"), //$NON-NLS-1$
|
||||
GREENPLUM(EDatabaseTypeName.GREENPLUM, "com.pivotal.jdbc.GreenplumDriver"), //$NON-NLS-1$
|
||||
GREENPLUM_PSQL(EDatabaseTypeName.GREENPLUM, "org.postgresql.Driver"), //$NON-NLS-1$
|
||||
SAS(EDatabaseTypeName.SAS, "com.sas.rio.MVADriver"), //$NON-NLS-1$
|
||||
@@ -84,8 +87,8 @@ public enum EDatabase4DriverClassName {
|
||||
// MOD klliu 2010-06-04 bug 12819: upgrade jdbc driver class used in sql explorer
|
||||
TERADATA(EDatabaseTypeName.TERADATA, "com.teradata.jdbc.TeraDriver"), //$NON-NLS-1$
|
||||
|
||||
VERTICA(EDatabaseTypeName.VERTICA, "com.vertica.Driver"), //$NON-NLS-1$
|
||||
VERTICA2(EDatabaseTypeName.VERTICA, "com.vertica.jdbc.Driver"), //$NON-NLS-1$
|
||||
// VERTICA(EDatabaseTypeName.VERTICA, "com.vertica.Driver"), //$NON-NLS-1$
|
||||
VERTICA(EDatabaseTypeName.VERTICA, "com.vertica.jdbc.Driver"), //$NON-NLS-1$
|
||||
|
||||
HIVE(EDatabaseTypeName.HIVE, "org.apache.hadoop.hive.jdbc.HiveDriver"), //$NON-NLS-1$
|
||||
|
||||
|
||||
@@ -118,6 +118,7 @@ public enum EDatabaseTypeName {
|
||||
// General JDBC not support schema defalut
|
||||
GENERAL_JDBC(
|
||||
"General JDBC", "General JDBC", Boolean.FALSE, "JDBC", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
|
||||
EXASOL(
|
||||
"Exasol", "Exasol", Boolean.TRUE, "Exasol", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.None), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
|
||||
@@ -347,8 +348,7 @@ public enum EDatabaseTypeName {
|
||||
isSupport = isSupportODBC;
|
||||
} else if (EDatabaseTypeName.SAS == this) {
|
||||
isSupport = false;
|
||||
} else if (EDatabaseTypeName.INGRES == this || EDatabaseTypeName.INTERBASE == this || EDatabaseTypeName.VECTORWISE == this
|
||||
|| EDatabaseTypeName.PARACCEL == this) {
|
||||
} else if (EDatabaseTypeName.INTERBASE == this || EDatabaseTypeName.PARACCEL == this) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ import org.talend.core.database.conn.version.EDatabaseVersion4Drivers;
|
||||
*/
|
||||
public enum ERedshiftDriver {
|
||||
|
||||
DRIVER_V2("Driver v2", new String[] { "redshift-jdbc42-2.1.0.3.jar" }),
|
||||
DRIVER_V2("Driver v2", new String[] { "redshift-jdbc42-2.1.0.10.jar" }),
|
||||
DRIVER_V1("Driver v1", new String[] { "redshift-jdbc42-no-awssdk-1.2.55.1083.jar" });
|
||||
|
||||
private String displayName;
|
||||
|
||||
@@ -252,6 +252,8 @@ public class ConnParameterKeys {
|
||||
|
||||
public static final String CONN_PARA_KEY_EXECUTOR_MEMORY = "CONN_PARA_KEY_EXECUTOR_MEMORY"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_EXECUTOR_CORES = "CONN_PARA_KEY_EXECUTOR_CORES";
|
||||
|
||||
public static final String CONN_PARA_KEY_TUNING_PROPERTIES = "CONN_PARA_KEY_TUNING_PROPERTIES"; //$NON-NLS-1$
|
||||
|
||||
/******************************************/
|
||||
@@ -366,7 +368,57 @@ public class ConnParameterKeys {
|
||||
public static final String CONN_PARA_KEY_DATABRICKS_RUNTIME_VERSION="CONN_PARA_KEY_DATABRICKS_RUNTIME_VERSION";
|
||||
|
||||
public static final String CONN_PARA_KEY_DATABRICKS_DBFS_DEP_FOLDER="CONN_PARA_KEY_DATABRICKS_DBFS_DEP_FOLDER";
|
||||
|
||||
/**kubernetes*/
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_SUBMIT_MODE="CONN_PARA_KEY_K8S_SUBMIT_MODE";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_MASTER="CONN_PARA_KEY_K8S_MASTER";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_INSTANCES="CONN_PARA_KEY_K8S_INSTANCES";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_REGISTRYSECRET_CHECK="CONN_PARA_KEY_K8S_REGISTRYSECRET_CHECK";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_REGISTRYSECRET="CONN_PARA_KEY_K8S_REGISTRYSECRET";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_IMAGE="CONN_PARA_KEY_K8S_IMAGE";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_NAMESPACE="CONN_PARA_KEY_K8S_NAMESPACE";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_SERVICEACCOUNT="CONN_PARA_KEY_K8S_SERVICEACCOUNT";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_DISTUPLOAD="CONN_PARA_KEY_K8S_DISTUPLOAD";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_S3BUCKET="CONN_PARA_KEY_K8S_S3BUCKET";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_S3FOLDER="CONN_PARA_KEY_K8S_S3FOLDER";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_S3CREDENTIALS="CONN_PARA_KEY_K8S_S3CREDENTIALS";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_S3ACCESSKEY="CONN_PARA_KEY_K8S_S3ACCESSKEY";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_S3SECRETKEY="CONN_PARA_KEY_K8S_S3SECRETKEY";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_BLOBACCOUNT="CONN_PARA_KEY_K8S_BLOBACCOUNT";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_BLOBCONTAINER="CONN_PARA_KEY_K8S_BLOBCONTAINER";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_BLOBSECRETKEY="CONN_PARA_KEY_K8S_BLOBSECRETKEY";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_AZUREACCOUNT="CONN_PARA_KEY_K8S_AZUREACCOUNT";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_AZURECREDENTIALS="CONN_PARA_KEY_K8S_AZURECREDENTIALS";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_AZURECONTAINER="CONN_PARA_KEY_K8S_AZURECONTAINER";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_AZURESECRETKEY="CONN_PARA_KEY_K8S_AZURESECRETKEY";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_AZUREAADKEY="CONN_PARA_KEY_K8S_AZUREAADKEY";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_AZUREAADCLIENTID="CONN_PARA_KEY_K8S_AZUREAADCLIENTID";
|
||||
|
||||
public static final String CONN_PARA_KEY_K8S_AZUREAADDIRECTORYID="CONN_PARA_KEY_K8S_AZUREAADDIRECTORYID";
|
||||
|
||||
/**
|
||||
* Override hadoop configuration
|
||||
*/
|
||||
@@ -403,6 +455,9 @@ public class ConnParameterKeys {
|
||||
public static final String CONN_PARA_KEY_UNIV_STANDALONE_EXEC_MEMORY="CONN_PARA_KEY_UNIV_STANDALONE_EXEC_MEMORY";
|
||||
public static final String CONN_PARA_KEY_UNIV_STANDALONE_EXEC_CORE="CONN_PARA_KEY_UNIV_STANDALONE_EXEC_CORE";
|
||||
|
||||
|
||||
// Spark Submit Scripts
|
||||
public static final String CONN_PARA_KEY_UNIV_SPARK_SUBMIT_SCRIPT_HOME="CONN_PARA_KEY_UNIV_SPARK_SUBMIT_SCRIPT_HOME";
|
||||
/**
|
||||
* Redshift
|
||||
*/
|
||||
|
||||
@@ -49,10 +49,6 @@ public enum EDatabaseConnTemplate {
|
||||
"jdbc:postgresql://<host>:<port>/<sid>?<property>", //$NON-NLS-1$
|
||||
"5432")), //$NON-NLS-1$
|
||||
|
||||
PLUSPSQL(new DbConnStr(EDatabaseTypeName.PLUSPSQL, //
|
||||
"jdbc:postgresql://<host>:<port>/<sid>?<property>", //$NON-NLS-1$
|
||||
"5432")), //$NON-NLS-1$
|
||||
|
||||
GREENPLUM(new DbConnStr(EDatabaseTypeName.GREENPLUM, //
|
||||
"jdbc:pivotal:greenplum://<host>:<port>;;DatabaseName=<sid>;<property>", //$NON-NLS-1$
|
||||
"5432")), //$NON-NLS-1$
|
||||
@@ -112,6 +108,13 @@ public enum EDatabaseConnTemplate {
|
||||
SQLITE(new DbConnStr(EDatabaseTypeName.SQLITE, //
|
||||
"jdbc:sqlite:/<filename>")), //$NON-NLS-1$
|
||||
|
||||
INGRES(new DbConnStr(EDatabaseTypeName.INGRES, //
|
||||
"jdbc:ingres://<host>:<port>/<sid>;<property>", //$NON-NLS-1$
|
||||
"II7")), //$NON-NLS-1$
|
||||
VECTORWISE(new DbConnStr(EDatabaseTypeName.VECTORWISE, //
|
||||
"jdbc:ingres://<host>:<port>/<sid>;<property>", //$NON-NLS-1$
|
||||
"II7")),
|
||||
|
||||
FIREBIRD(new DbConnStr(EDatabaseTypeName.FIREBIRD, //
|
||||
"jdbc:firebirdsql:<host>/<port>:<filename>?<property>", //$NON-NLS-1$
|
||||
"3050")), //$NON-NLS-1$
|
||||
@@ -375,7 +378,6 @@ public enum EDatabaseConnTemplate {
|
||||
case ORACLE_OCI:
|
||||
case ORACLE_CUSTOM:
|
||||
case PSQL:
|
||||
case PLUSPSQL:
|
||||
case GREENPLUM:
|
||||
case REDSHIFT:
|
||||
case REDSHIFT_SSO:
|
||||
@@ -419,8 +421,9 @@ public enum EDatabaseConnTemplate {
|
||||
case REDSHIFT_SSO:
|
||||
case SAPHana:
|
||||
case PSQL:
|
||||
case PLUSPSQL:
|
||||
case GREENPLUM:
|
||||
case INGRES:
|
||||
case VECTORWISE:
|
||||
case FIREBIRD:
|
||||
case JAVADB_EMBEDED:
|
||||
case JAVADB_JCCJDBC:
|
||||
@@ -447,6 +450,8 @@ public enum EDatabaseConnTemplate {
|
||||
case SYBASEASE_16_SA:
|
||||
case IBMDB2:
|
||||
case IBMDB2_ZOS:
|
||||
case INGRES:
|
||||
case VECTORWISE:
|
||||
case MSSQL:
|
||||
case INFORMIX:
|
||||
case TERADATA:
|
||||
@@ -459,7 +464,6 @@ public enum EDatabaseConnTemplate {
|
||||
case HSQLDB_IN_PROGRESS:
|
||||
case MAXDB:
|
||||
case PSQL:
|
||||
case PLUSPSQL:
|
||||
return true;
|
||||
default:
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ import org.talend.core.database.EDatabaseTypeName;
|
||||
*/
|
||||
public class DbVersion4DriversForOracle11 extends DbVersion4Drivers {
|
||||
|
||||
public static final String DRIVER_1_6 = "ojdbc6.jar"; //$NON-NLS-1$
|
||||
public static final String DRIVER_1_6 = "ojdbc6-11.2.0.4.jar"; //$NON-NLS-1$
|
||||
|
||||
public static final String DRIVER_1_5 = "ojdbc5.jar"; //$NON-NLS-1$
|
||||
|
||||
|
||||
@@ -33,19 +33,14 @@ public enum EDatabaseVersion4Drivers {
|
||||
ACCESS_2007(new DbVersion4Drivers(EDatabaseTypeName.ACCESS, "Access 2007", "Access_2007")), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
// oracle
|
||||
ORACLE_18(new DbVersion4Drivers(new EDatabaseTypeName[] { EDatabaseTypeName.ORACLEFORSID, EDatabaseTypeName.ORACLESN,
|
||||
EDatabaseTypeName.ORACLE_OCI, EDatabaseTypeName.ORACLE_CUSTOM }, "Oracle 18 and above", "ORACLE_18", "ojdbc8-19.3.0.0.jar")),
|
||||
EDatabaseTypeName.ORACLE_OCI, EDatabaseTypeName.ORACLE_CUSTOM }, "Oracle 18 and above", "ORACLE_18", "ojdbc8-19.19.0.0.jar")),
|
||||
ORACLE_12(new DbVersion4Drivers(new EDatabaseTypeName[] { EDatabaseTypeName.ORACLEFORSID, EDatabaseTypeName.ORACLESN,
|
||||
EDatabaseTypeName.ORACLE_OCI, EDatabaseTypeName.ORACLE_CUSTOM }, "Oracle 12", "ORACLE_12", "ojdbc7.jar")),
|
||||
EDatabaseTypeName.ORACLE_OCI, EDatabaseTypeName.ORACLE_CUSTOM }, "Oracle 12 (Deprecated)", "ORACLE_12",
|
||||
"ojdbc7.jar")),
|
||||
ORACLE_11(new DbVersion4DriversForOracle11(new EDatabaseTypeName[] { EDatabaseTypeName.ORACLEFORSID,
|
||||
EDatabaseTypeName.ORACLESN, EDatabaseTypeName.ORACLE_OCI, EDatabaseTypeName.ORACLE_CUSTOM },
|
||||
"Oracle 11", "ORACLE_11", new String[] { DbVersion4DriversForOracle11.DRIVER_1_5, //$NON-NLS-1$ //$NON-NLS-2$
|
||||
"Oracle 11 (Deprecated)", "ORACLE_11", new String[] { DbVersion4DriversForOracle11.DRIVER_1_5, //$NON-NLS-1$ //$NON-NLS-2$
|
||||
DbVersion4DriversForOracle11.DRIVER_1_6 })),
|
||||
ORACLE_10(new DbVersion4Drivers(new EDatabaseTypeName[] { EDatabaseTypeName.ORACLEFORSID, EDatabaseTypeName.ORACLESN,
|
||||
EDatabaseTypeName.ORACLE_OCI, EDatabaseTypeName.ORACLE_CUSTOM }, "Oracle 10", "ORACLE_10", "ojdbc14.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
ORACLE_9(new DbVersion4Drivers(new EDatabaseTypeName[] { EDatabaseTypeName.ORACLEFORSID, EDatabaseTypeName.ORACLESN,
|
||||
EDatabaseTypeName.ORACLE_OCI, EDatabaseTypeName.ORACLE_CUSTOM }, "Oracle 9", "ORACLE_9", "ojdbc14-9i.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
ORACLE_8(new DbVersion4Drivers(new EDatabaseTypeName[] { EDatabaseTypeName.ORACLEFORSID, EDatabaseTypeName.ORACLESN,
|
||||
EDatabaseTypeName.ORACLE_OCI, EDatabaseTypeName.ORACLE_CUSTOM }, "Oracle 8", "ORACLE_8", "ojdbc12.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
// AS400
|
||||
AS400_V7R1_V7R3(new DbVersion4Drivers(EDatabaseTypeName.AS400, "V7R1 to V7R3", "AS400_V7R1_V7R3", "jt400-9.8.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
AS400_V6R1_V7R2(new DbVersion4Drivers(EDatabaseTypeName.AS400, "V6R1 to V7R2", "AS400_V6R1_V7R2", "jt400_V6R1.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
@@ -59,12 +54,12 @@ public enum EDatabaseVersion4Drivers {
|
||||
H2(new DbVersion4Drivers(EDatabaseTypeName.H2, "h2-2.1.214.jar")), //$NON-NLS-1$
|
||||
|
||||
//
|
||||
JAVADB_EMBEDED(new DbVersion4Drivers(EDatabaseTypeName.JAVADB_EMBEDED, "derby.jar")), //$NON-NLS-1$
|
||||
SQLITE(new DbVersion4Drivers(EDatabaseTypeName.SQLITE, "sqlitejdbc-v056.jar")), //$NON-NLS-1$
|
||||
FIREBIRD(new DbVersion4Drivers(EDatabaseTypeName.FIREBIRD, "jaybird-full-2.1.1.jar")), //$NON-NLS-1$
|
||||
JAVADB_EMBEDED(new DbVersion4Drivers(EDatabaseTypeName.JAVADB_EMBEDED, "derby-10.14.2.0.jar")), //$NON-NLS-1$
|
||||
SQLITE(new DbVersion4Drivers(EDatabaseTypeName.SQLITE, new String[] { "slf4j-api-1.7.34.jar", "sqlite-jdbc-3.44.1.0.jar" })), //$NON-NLS-1$
|
||||
FIREBIRD(new DbVersion4Drivers(EDatabaseTypeName.FIREBIRD, "jaybird-2.1.1.jar")), //$NON-NLS-1$
|
||||
TERADATA(new DbVersion4Drivers(EDatabaseTypeName.TERADATA,
|
||||
new String[] { "terajdbc4-17.10.00.27.jar" })), //$NON-NLS-1$
|
||||
JAVADB_DERBYCLIENT(new DbVersion4Drivers(EDatabaseTypeName.JAVADB_DERBYCLIENT, "derbyclient.jar")), //$NON-NLS-1$
|
||||
JAVADB_DERBYCLIENT(new DbVersion4Drivers(EDatabaseTypeName.JAVADB_DERBYCLIENT, "derbyclient-10.14.2.0.jar")), //$NON-NLS-1$
|
||||
NETEZZA(new DbVersion4Drivers(EDatabaseTypeName.NETEZZA, "nzjdbc.jar")), //$NON-NLS-1$
|
||||
INFORMIX(new DbVersion4Drivers(EDatabaseTypeName.INFORMIX, "ifxjdbc.jar")), //$NON-NLS-1$
|
||||
|
||||
@@ -74,33 +69,33 @@ public enum EDatabaseVersion4Drivers {
|
||||
"SAS 9.2", "SAS_9.2", new String[] { "sas.core.jar", "sas.security.sspi.jar", "sas.svc.connection.jar", "reload4j-1.2.22.jar" })), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
SAPHana(new DbVersion4Drivers(EDatabaseTypeName.SAPHana, "HDB 1.0", "HDB_1_0", "ngdbc.jar")), //$NON-NLS-1$
|
||||
// MYSQL, add for 9594
|
||||
MYSQL_8(new DbVersion4Drivers(EDatabaseTypeName.MYSQL, "MySQL 8", "MYSQL_8", "mysql-connector-java-8.0.18.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
MYSQL_8(new DbVersion4Drivers(EDatabaseTypeName.MYSQL, "MySQL 8", "MYSQL_8", "mysql-connector-j-8.0.33.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
MYSQL_5(new DbVersion4Drivers(EDatabaseTypeName.MYSQL, "MySQL 5", "MYSQL_5", "mysql-connector-java-5.1.49.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
MARIADB(new DbVersion4Drivers(EDatabaseTypeName.MYSQL, "MariaDB", "MARIADB", "mariadb-java-client-2.5.3.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
MARIADB(new DbVersion4Drivers(EDatabaseTypeName.MYSQL, "MariaDB", "MARIADB", "mariadb-java-client-3.1.4.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
// add for 9594
|
||||
MSSQL(new DbVersion4Drivers(EDatabaseTypeName.MSSQL,"Open source JTDS", "JTDS", "jtds-1.3.1-patch-20190523.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
MSSQL_2012(new DbVersion4Drivers(EDatabaseTypeName.MSSQL,
|
||||
"Microsoft SQL Server 2012", "Microsoft SQL Server 2012", "jtds-1.3.1-patch-20190523.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
MSSQL_PROP(new DbVersion4Drivers(EDatabaseTypeName.MSSQL,
|
||||
"Microsoft", "MSSQL_PROP", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
new String[] { "mssql-jdbc.jar", "slf4j-api-1.7.29.jar", "slf4j-log4j12-1.7.29.jar", "msal4j-1.11.0.jar", //$NON-NLS-1$
|
||||
"oauth2-oidc-sdk-9.7.jar", "reload4j-1.2.22.jar", "jackson-core-2.13.4.jar",
|
||||
"jackson-databind-2.13.4.2.jar", "jackson-annotations-2.13.4.jar", "jcip-annotations-1.0-1.jar",
|
||||
"json-smart-2.4.7.jar", "nimbus-jose-jwt-9.22.jar", "accessors-smart-2.4.7.jar", "asm-9.1.jar",
|
||||
new String[] { "mssql-jdbc.jar", "slf4j-api-1.7.34.jar", "slf4j-reload4j-1.7.34.jar", "msal4j-1.11.0.jar", //$NON-NLS-1$
|
||||
"oauth2-oidc-sdk-9.7.jar", "reload4j-1.2.22.jar", "jackson-core-2.14.3.jar",
|
||||
"jackson-databind-2.14.3.jar", "jackson-annotations-2.14.3.jar", "jcip-annotations-1.0-1.jar",
|
||||
"json-smart-2.4.11.jar", "nimbus-jose-jwt-9.22.jar", "accessors-smart-2.4.11.jar", "asm-9.5.jar",
|
||||
"content-type-2.1.jar", "lang-tag-1.5.jar" })),
|
||||
|
||||
VERTICA_9(new DbVersion4Drivers(EDatabaseTypeName.VERTICA, "VERTICA 9.X", "VERTICA_9_0", "vertica-jdbc-9.3.1-0.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
// VERTICA_9(new DbVersion4Drivers(EDatabaseTypeName.VERTICA, "VERTICA 9.X (Deprecated)", "VERTICA_9_0", "vertica-jdbc-9.3.1-0.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
|
||||
//https://mvnrepository.com/artifact/com.vertica.jdbc/vertica-jdbc/12.0.4-0
|
||||
VERTICA_12(new DbVersion4Drivers(EDatabaseTypeName.VERTICA, "VERTICA 12.X", "VERTICA_12_0", "vertica-jdbc-12.0.4-0.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
|
||||
// for bug 0017930
|
||||
GREENPLUM_PSQL(new DbVersion4Drivers(EDatabaseTypeName.GREENPLUM,"PostgreSQL", "POSTGRESQL", "postgresql-8.4-703.jdbc4.jar")), //$NON-NLS-1$
|
||||
GREENPLUM(new DbVersion4Drivers(EDatabaseTypeName.GREENPLUM,"Greenplum", "GREENPLUM", "greenplum-5.1.4.000275.jar")), //$NON-NLS-1$
|
||||
// PSQL_V10(new DbVersion4Drivers(EDatabaseTypeName.PSQL, "v10", "V10", "postgresql-42.2.5.jar")),
|
||||
PSQL_V9_X(new DbVersion4Drivers(EDatabaseTypeName.PSQL, "v9 and later", "V9_X", "postgresql-42.2.26.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
PSQL_PRIOR_TO_V9(new DbVersion4Drivers(EDatabaseTypeName.PSQL, "Prior to v9", "PRIOR_TO_V9", "postgresql-8.4-703.jdbc4.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
PSQL_V9_X(new DbVersion4Drivers(EDatabaseTypeName.PSQL, "v12 and later", "V9_X", "postgresql-42.6.0.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
PSQL_PRIOR_TO_V9(new DbVersion4Drivers(EDatabaseTypeName.PSQL, " ", "PRIOR_TO_V9", "postgresql-8.4-703.jdbc4.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
|
||||
PLUSPSQL_PRIOR_TO_V9(new DbVersion4Drivers(EDatabaseTypeName.PLUSPSQL,
|
||||
"Prior to v9", "PRIOR_TO_V9", "postgresql-8.4-703.jdbc4.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
PLUSPSQL_V9_X(new DbVersion4Drivers(EDatabaseTypeName.PLUSPSQL, "v9 and later", "V9_X", "postgresql-42.2.26.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
IBMDB2(new DbVersion4Drivers(EDatabaseTypeName.IBMDB2, new String[] { "db2jcc4.jar", "db2jcc_license_cu.jar", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
"db2jcc_license_cisuz.jar" })), //$NON-NLS-1$
|
||||
IBMDB2ZOS(new DbVersion4Drivers(EDatabaseTypeName.IBMDB2ZOS, new String[] { "db2jcc4.jar", "db2jcc_license_cu.jar", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
@@ -113,6 +108,8 @@ public enum EDatabaseVersion4Drivers {
|
||||
EXASOL(new DbVersion4Drivers(EDatabaseTypeName.EXASOL, "exajdbc-6.0.9302.jar")), //$NON-NLS-1$
|
||||
MAXDB(new DbVersion4Drivers(EDatabaseTypeName.MAXDB, "sapdbc.jar")), //$NON-NLS-1$
|
||||
|
||||
INGRES(new DbVersion4Drivers(EDatabaseTypeName.INGRES, "iijdbc-10.2-4.1.10.jar")),
|
||||
VECTORWISE(new DbVersion4Drivers(EDatabaseTypeName.VECTORWISE, "iijdbc-10.2-4.1.10.jar")),
|
||||
// HIVE(new DbVersion4Drivers(EDatabaseTypeName.HIVE, "STANDALONE", "STANDALONE", new String[] {
|
||||
// "hive-jdbc-0.8.1.jar",
|
||||
// "hive-metastore-0.8.1.jar", "hive-exec-0.8.1.jar", "hive-service-0.8.1.jar", "libfb303_new.jar",
|
||||
@@ -153,12 +150,16 @@ public enum EDatabaseVersion4Drivers {
|
||||
REDSHIFT(new DbVersion4Drivers(EDatabaseTypeName.REDSHIFT, "redshift", "REDSHIFT", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
new String[]{ "redshift-jdbc42-no-awssdk-1.2.55.1083.jar", "antlr4-runtime-4.8-1.jar" })), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
REDSHIFT_SSO(new DbVersion4Drivers(EDatabaseTypeName.REDSHIFT_SSO, "redshift sso", "REDSHIFT_SSO", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
new String[] { "redshift-jdbc42-no-awssdk-1.2.55.1083.jar", "antlr4-runtime-4.8-1.jar", "aws-java-sdk-1.11.848.jar", "jackson-core-2.13.4.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
||||
"jackson-databind-2.13.4.2.jar", "jackson-annotations-2.13.4.jar", "httpcore-4.4.13.jar", "httpclient-4.5.13.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$//$NON-NLS-4$
|
||||
new String[] { "redshift-jdbc42-no-awssdk-1.2.55.1083.jar", "antlr4-runtime-4.8-1.jar", "jackson-core-2.14.3.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
"jackson-databind-2.14.3.jar", "jackson-annotations-2.14.3.jar", "httpcore-4.4.13.jar", "httpclient-4.5.13.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$//$NON-NLS-4$
|
||||
"joda-time-2.8.1.jar", "commons-logging-1.2.jar", "commons-codec-1.14.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
"aws-java-sdk-redshift-internal-1.12.x.jar" })), //$NON-NLS-1$
|
||||
"aws-java-sdk-redshift-internal-1.12.x.jar", "aws-java-sdk-core-1.12.315.jar", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
"aws-java-sdk-sts-1.12.315.jar", "aws-java-sdk-redshift-1.12.315.jar", "jmespath-java-1.12.315.jar" })), //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
|
||||
|
||||
AMAZON_AURORA(new DbVersion4Drivers(EDatabaseTypeName.AMAZON_AURORA, "mysql-connector-java-5.1.49.jar")); //$NON-NLS-1$
|
||||
AMAZON_AURORA(new DbVersion4Drivers(EDatabaseTypeName.AMAZON_AURORA, "MySQL 5", "MYSQL_5", //$NON-NLS-1$
|
||||
"mysql-connector-java-5.1.49.jar")),
|
||||
AMAZON_AURORA_3(new DbVersion4Drivers(EDatabaseTypeName.AMAZON_AURORA, "MySQL 8", "MYSQL_8", //$NON-NLS-1$
|
||||
"mysql-connector-j-8.0.33.jar"));
|
||||
|
||||
private DbVersion4Drivers dbVersionBean;
|
||||
|
||||
|
||||
@@ -15,8 +15,10 @@ package org.talend.core.hadoop;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||
import org.eclipse.emf.common.util.EList;
|
||||
import org.eclipse.emf.common.util.EMap;
|
||||
import org.talend.commons.exception.CommonExceptionHandler;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
@@ -25,6 +27,9 @@ import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.properties.Property;
|
||||
import org.talend.core.runtime.hd.IDynamicDistributionManager;
|
||||
import org.talend.core.runtime.i18n.Messages;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ElementParameterType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.NodeType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.TalendFileFactory;
|
||||
|
||||
/**
|
||||
* created by cmeng on Jul 20, 2015 Detailled comment
|
||||
@@ -145,4 +150,58 @@ public class BigDataBasicUtil {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public static String getDistributionByVersion(String version) {
|
||||
if (StringUtils.isEmpty(version))
|
||||
return null;
|
||||
if (version.startsWith("EMR")) {
|
||||
return "AMAZON_EMR";
|
||||
} else if (version.equals("SYNAPSE")) {
|
||||
return "AZURE_SYNAPSE";
|
||||
} else if (version.contains("CDH") || version.contains("CDP")) {
|
||||
return "CLOUDERA";
|
||||
} else if (version.startsWith("Databricks")) {
|
||||
return "DATABRICKS";
|
||||
} else if (version.contains("HDP")) {
|
||||
return "HORTONWORKS";
|
||||
} else if (version.startsWith("MICROSOFT_HD_INSIGHT")) {
|
||||
return "MICROSOFT_HD_INSIGHT";
|
||||
} else if (version.startsWith("SPARK")) {
|
||||
return "SPARK";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void setDistribution(NodeType node, String dbVersionName) {
|
||||
if (node == null || dbVersionName == null) {
|
||||
return;
|
||||
}
|
||||
EList<ElementParameterType> elementParameters = node.getElementParameter();
|
||||
String distribution = null;
|
||||
String dbVersion = null;
|
||||
// Iterate over the item elementParameters in order to find the "DISTRIBUTION" and "SPARK_VERSION"
|
||||
// parameters values.
|
||||
for (int i = 0; i < elementParameters.size(); i++) {
|
||||
ElementParameterType param = elementParameters.get(i);
|
||||
if (dbVersionName.equals(param.getName())) {
|
||||
dbVersion = param.getValue();
|
||||
break;
|
||||
}
|
||||
}
|
||||
try {
|
||||
ElementParameterType property = TalendFileFactory.eINSTANCE.createElementParameterType();
|
||||
distribution = BigDataBasicUtil.getDistributionByVersion(dbVersion);
|
||||
if (distribution != null) {
|
||||
property.setName("DISTRIBUTION"); //$NON-NLS-1$
|
||||
property.setField("CLOSED_LIST"); //$NON-NLS-1$
|
||||
property.setValue(distribution);
|
||||
elementParameters.add(property);
|
||||
} else {
|
||||
ExceptionHandler.log("no matched distribution for version " + dbVersion);//$NON-NLS-1$
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.log(e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,10 @@ public class HadoopConstants {
|
||||
public static final String SPARK_MODE_YARN_CLUSTER = "YARN_CLUSTER";
|
||||
|
||||
public static final String SPARK_MODE_DATAPROC = "DATAPROC";
|
||||
|
||||
public static final String SPARK_MODE_SYNAPSE = "SYNAPSE";
|
||||
|
||||
public static final String SPARK_MODE_HDI = "HDI";
|
||||
|
||||
public static final String FRAMEWORK = "FRAMEWORK";
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ import java.util.Map;
|
||||
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.IService;
|
||||
import org.talend.core.model.general.Project;
|
||||
import org.talend.core.runtime.hd.IDistributionsManager;
|
||||
import org.talend.core.runtime.hd.IDynamicDistributionManager;
|
||||
import org.talend.core.runtime.hd.IHDistribution;
|
||||
@@ -132,6 +133,8 @@ public interface IHadoopDistributionService extends IService {
|
||||
|
||||
IDynamicDistributionManager getDynamicDistributionManager();
|
||||
|
||||
void checkAndMigrateDistributionProxyCredential(Project project) throws Exception;
|
||||
|
||||
public static IHadoopDistributionService get() {
|
||||
GlobalServiceRegister gsr = GlobalServiceRegister.getDefault();
|
||||
if (gsr.isServiceRegistered(IHadoopDistributionService.class)) {
|
||||
|
||||
@@ -142,6 +142,8 @@ public enum EHadoopProperties {
|
||||
|
||||
SPARK_EXECUTOR_MEMORY,
|
||||
|
||||
SPARK_EXECUTOR_CORES,
|
||||
|
||||
DATABRICKS_ENDPOINT,
|
||||
|
||||
DATABRICKS_CLOUD_PROVIDER,
|
||||
@@ -153,6 +155,52 @@ public enum EHadoopProperties {
|
||||
DATABRICKS_TOKEN,
|
||||
|
||||
DATABRICKS_DBFS_DEP_FOLDER,
|
||||
|
||||
K8S_SUBMIT_MODE,
|
||||
|
||||
K8S_MASTER,
|
||||
|
||||
K8S_INSTANCES,
|
||||
|
||||
K8S_REGISTRYSECRET,
|
||||
|
||||
K8S_IMAGE,
|
||||
|
||||
K8S_NAMESPACE,
|
||||
|
||||
K8S_SERVICEACCOUNT,
|
||||
|
||||
K8S_DISTUPLOAD,
|
||||
|
||||
K8S_S3BUCKET,
|
||||
|
||||
K8S_S3FOLDER,
|
||||
|
||||
K8S_S3CREDENTIALS,
|
||||
|
||||
K8S_S3ACCESSKEY,
|
||||
|
||||
K8S_S3SECRETKEY,
|
||||
|
||||
K8S_BLOBACCOUNT,
|
||||
|
||||
K8S_BLOBCONTAINER,
|
||||
|
||||
K8S_BLOBSECRETKEY,
|
||||
|
||||
K8S_AZUREACCOUNT,
|
||||
|
||||
K8S_AZURECREDENTIALS,
|
||||
|
||||
K8S_AZURECONTAINER,
|
||||
|
||||
K8S_AZURESECRETKEY,
|
||||
|
||||
K8S_AZUREAADKEY,
|
||||
|
||||
K8S_AZUREAADCLIENTID,
|
||||
|
||||
K8S_AZUREAADDIRECTORYID,
|
||||
|
||||
DATABRICKS_NODE_TYPE,
|
||||
|
||||
@@ -166,7 +214,9 @@ public enum EHadoopProperties {
|
||||
|
||||
UNIV_STANDALONE_EXEC_MEMORY,
|
||||
|
||||
UNIV_STANDALONE_EXEC_CORE;
|
||||
UNIV_STANDALONE_EXEC_CORE,
|
||||
|
||||
UNIV_SPARK_SUBMIT_SCRIPT_HOME;
|
||||
|
||||
public String getName() {
|
||||
return this.name();
|
||||
|
||||
@@ -93,8 +93,8 @@ public final class ComponentUtilities {
|
||||
// TODO SML Use getNodeProperty
|
||||
EList elementParameter = node.getElementParameter();
|
||||
Iterator iterator = elementParameter.iterator();
|
||||
for (Object o = iterator.next(); iterator.hasNext(); o = iterator.next()) {
|
||||
ElementParameterType t = (ElementParameterType) o;
|
||||
while (iterator.hasNext()) {
|
||||
ElementParameterType t = (ElementParameterType) iterator.next();
|
||||
if (t.getName().equals(property)) {
|
||||
iterator.remove();
|
||||
}
|
||||
|
||||
@@ -39,6 +39,8 @@ public interface IComponent {
|
||||
String SPARK_JOBLET_STREAMING_PID = "org.talend.designer.sparkstreamingjoblet"; //$NON-NLS-1$
|
||||
|
||||
String PROP_NAME = "NAME"; //$NON-NLS-1$
|
||||
|
||||
String PROP_DESCRIPTION = "DESCRIPTION"; //$NON-NLS-1$
|
||||
|
||||
String PROP_LONG_NAME = "LONG_NAME"; //$NON-NLS-1$
|
||||
|
||||
|
||||
@@ -522,10 +522,16 @@ public class ContextUtils {
|
||||
return itemMap;
|
||||
}
|
||||
|
||||
|
||||
private static Set<String> missingContexts = new HashSet<>();
|
||||
|
||||
public static void clearMissingContextCache() {
|
||||
missingContexts.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* get the repository context item,now contextId can be either joblet node or context node.
|
||||
*/
|
||||
* get the repository context item, now contextId can be either joblet node or context node.
|
||||
*/
|
||||
public static Item getRepositoryContextItemById(String contextId) {
|
||||
if (IContextParameter.BUILT_IN.equals(contextId)) {
|
||||
return null;
|
||||
@@ -533,6 +539,9 @@ public class ContextUtils {
|
||||
if (checkObject(contextId)) {
|
||||
return null;
|
||||
}
|
||||
if (missingContexts.contains(contextId)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<ERepositoryObjectType> possibleTypes = new ArrayList<ERepositoryObjectType>();
|
||||
possibleTypes.add(ERepositoryObjectType.CONTEXT);
|
||||
@@ -547,6 +556,8 @@ public class ContextUtils {
|
||||
return item;
|
||||
}
|
||||
}
|
||||
missingContexts.add(contextId);
|
||||
ExceptionHandler.log("Can't find Context item[id=" + contextId + "].");
|
||||
} catch (PersistenceException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
@@ -857,6 +868,7 @@ public class ContextUtils {
|
||||
ItemContextLink itemContextLink) {
|
||||
Map<String, String> renamedMap = new HashMap<String, String>();
|
||||
Map<String, Item> tempItemMap = new HashMap<String, Item>();
|
||||
clearMissingContextCache();
|
||||
for (ContextType contextType : contextTypeList) {
|
||||
for (Object obj : contextType.getContextParameter()) {
|
||||
if (obj instanceof ContextParameterType) {
|
||||
@@ -919,6 +931,7 @@ public class ContextUtils {
|
||||
*/
|
||||
public static Map<String, String> calculateRenamedMapFromLinkFile(String projectLabel, String itemId,
|
||||
List<IContext> contextList) {
|
||||
clearMissingContextCache();
|
||||
Map<String, String> renamedMap = new HashMap<String, String>();
|
||||
Map<String, Item> idToItemMap = new HashMap<String, Item>();
|
||||
try {
|
||||
@@ -984,6 +997,14 @@ public class ContextUtils {
|
||||
|
||||
}
|
||||
|
||||
public boolean remove(Item item, String param) {
|
||||
Set<String> params = map.get(item);
|
||||
if (params != null && params.contains(param)) {
|
||||
return params.remove(param);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isEmpty() {
|
||||
return map.isEmpty();
|
||||
}
|
||||
@@ -1186,5 +1207,23 @@ public class ContextUtils {
|
||||
}
|
||||
return jobContext;
|
||||
}
|
||||
|
||||
public static boolean isPromptNeeded(List<IContext> contexts, String contextParaName) {
|
||||
for (IContext context : contexts) {
|
||||
List<IContextParameter> list = context.getContextParameterList();
|
||||
if (list != null && list.size() > 0) {
|
||||
for (IContextParameter contextPara : list) {
|
||||
String tempContextParaName = contextPara.getName();
|
||||
if (tempContextParaName.equals(contextParaName)) {
|
||||
if (contextPara.isPromptNeeded()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -30,6 +30,8 @@ public class JobContext implements IContext, Cloneable {
|
||||
|
||||
boolean confirmationNeeded;
|
||||
|
||||
boolean hide;
|
||||
|
||||
public JobContext(String name) {
|
||||
this.name = name;
|
||||
if (this.name == null) {
|
||||
@@ -66,6 +68,14 @@ public class JobContext implements IContext, Cloneable {
|
||||
this.confirmationNeeded = confirmationNeeded;
|
||||
}
|
||||
|
||||
public boolean isHide() {
|
||||
return this.hide;
|
||||
}
|
||||
|
||||
public void setHide(boolean hide) {
|
||||
this.hide = hide;
|
||||
}
|
||||
|
||||
public IContext clone() {
|
||||
IContext clonedContext = null;
|
||||
try {
|
||||
@@ -131,14 +141,16 @@ public class JobContext implements IContext, Cloneable {
|
||||
* @return
|
||||
*/
|
||||
public IContextParameter getContextParameter(String sourceId, String paraName) {
|
||||
if (sourceId == null || paraName == null)
|
||||
if (sourceId == null || paraName == null) {
|
||||
return null;
|
||||
}
|
||||
if (contextParameterList != null && contextParameterList.size() > 0) {
|
||||
for (IContextParameter contextParam : contextParameterList) {
|
||||
String tempSouceId = contextParam.getSource();
|
||||
String tempParaName = contextParam.getName();
|
||||
if (sourceId.equals(tempSouceId) && paraName.equals(tempParaName))
|
||||
if (sourceId.equals(tempSouceId) && paraName.equals(tempParaName)) {
|
||||
return contextParam;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
@@ -156,8 +168,9 @@ public class JobContext implements IContext, Cloneable {
|
||||
if (contextParameterList != null && contextParameterList.size() > 0) {
|
||||
for (IContextParameter contextParam : contextParameterList) {
|
||||
String tempParaName = contextParam.getName();
|
||||
if (tempParaName.equals(paraName))
|
||||
if (tempParaName.equals(paraName)) {
|
||||
list.add(contextParam);
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
|
||||
@@ -45,6 +45,8 @@ import org.talend.designer.core.model.utils.emf.talendfile.TalendFileFactory;
|
||||
*/
|
||||
public class JobContextManager implements IContextManager {
|
||||
|
||||
private boolean isWrapContextText;
|
||||
|
||||
private IContext defaultContext = new JobContext(IContext.DEFAULT);
|
||||
|
||||
private List<IContext> listContext = new ArrayList<IContext>();
|
||||
@@ -56,6 +58,11 @@ public class JobContextManager implements IContextManager {
|
||||
*/
|
||||
private Map<String, String> nameMap = new HashMap<String, String>();
|
||||
|
||||
/*
|
||||
* record rename context for node
|
||||
*/
|
||||
private Map<String, String> nameMapNode = new HashMap<String, String>();
|
||||
|
||||
private Map<ContextItem, Map<String, String>> repositoryRenamedMap = new HashMap<ContextItem, Map<String, String>>();
|
||||
|
||||
/*
|
||||
@@ -97,6 +104,14 @@ public class JobContextManager implements IContextManager {
|
||||
|
||||
private Map<ContextItem, List<IContext>> renameContextGroupMap = new HashMap<ContextItem, List<IContext>>();
|
||||
|
||||
public boolean isWrapContextText() {
|
||||
return isWrapContextText;
|
||||
}
|
||||
|
||||
public void setWrapContextText(boolean isWrapContextText) {
|
||||
this.isWrapContextText = isWrapContextText;
|
||||
}
|
||||
|
||||
public Map<ContextItem, List<IContext>> getAddContextGroupMap() {
|
||||
return this.addContextGroupMap;
|
||||
}
|
||||
@@ -299,6 +314,7 @@ public class JobContextManager implements IContextManager {
|
||||
}
|
||||
List<ContextItem> contextItemList = ContextUtils.getAllContextItem();
|
||||
boolean setDefault = false;
|
||||
ContextUtils.clearMissingContextCache();
|
||||
for (int i = 0; i < contextTypeList.size(); i++) {
|
||||
contextType = (ContextType) contextTypeList.get(i);
|
||||
String name = contextType.getName();
|
||||
@@ -307,6 +323,7 @@ public class JobContextManager implements IContextManager {
|
||||
}
|
||||
context = new JobContext(name);
|
||||
context.setConfirmationNeeded(contextType.isConfirmationNeeded());
|
||||
context.setHide(contextType.isHide());
|
||||
contextParamList = new ArrayList<IContextParameter>();
|
||||
contextTypeParamList = contextType.getContextParameter();
|
||||
Set<String> paramNamesInCurrentContext = new HashSet<String>();
|
||||
@@ -335,6 +352,8 @@ public class JobContextManager implements IContextManager {
|
||||
} else {
|
||||
contextParam.setType(MetadataTalendType.getDefaultTalendType());
|
||||
}
|
||||
//To avoid encrypt the same value}
|
||||
contextParam.setOriginEncryptedValue(contextParamType.getValue());
|
||||
contextParam.setValue(contextParamType.getRawValue());
|
||||
|
||||
contextParam.setPromptNeeded(contextParamType.isPromptNeeded());
|
||||
@@ -401,6 +420,18 @@ public class JobContextManager implements IContextManager {
|
||||
updateNewParameters(newName, oldName);
|
||||
}
|
||||
|
||||
public void addNameMapForNode(String newName, String oldName) {
|
||||
nameMapNode.put(newName, oldName);
|
||||
}
|
||||
|
||||
public void clearNameMapForNode() {
|
||||
nameMapNode.clear();
|
||||
}
|
||||
|
||||
public Map<String, String> getNameMapNode() {
|
||||
return nameMapNode;
|
||||
}
|
||||
|
||||
public Map<String, String> getNameMap() {
|
||||
return nameMap;
|
||||
}
|
||||
@@ -526,6 +557,7 @@ public class JobContextManager implements IContextManager {
|
||||
|
||||
EList newcontextTypeList = new BasicEList();
|
||||
Map<String, Item> idToItemMap = new HashMap<String, Item>();
|
||||
ContextUtils.clearMissingContextCache();
|
||||
for (int i = 0; i < listContext.size(); i++) {
|
||||
IContext context = listContext.get(i);
|
||||
String contextGroupName = renameGroupContext.get(context);
|
||||
@@ -538,6 +570,7 @@ public class JobContextManager implements IContextManager {
|
||||
}
|
||||
contextType.setName(context.getName());
|
||||
contextType.setConfirmationNeeded(context.isConfirmationNeeded());
|
||||
contextType.setHide(context.isHide());
|
||||
newcontextTypeList.add(contextType);
|
||||
|
||||
EList contextTypeParamList = contextType.getContextParameter();
|
||||
@@ -560,7 +593,10 @@ public class JobContextManager implements IContextManager {
|
||||
contextParamType.setName(contextParam.getName());
|
||||
contextParamType.setPrompt(contextParam.getPrompt());
|
||||
contextParamType.setType(contextParam.getType());
|
||||
//To avoid encrypt the same value
|
||||
contextParamType.setValue(contextParam.getOriginEncryptedValue());
|
||||
contextParamType.setRawValue(contextParam.getValue());
|
||||
contextParam.setOriginEncryptedValue(contextParamType.getValue()); // For origin encrypted value is null or encryption key upgrade
|
||||
contextParamType.setPromptNeeded(contextParam.isPromptNeeded());
|
||||
contextParamType.setComment(contextParam.getComment());
|
||||
if (!contextParam.isBuiltIn()) {
|
||||
|
||||
@@ -46,6 +46,9 @@ public class JobContextParameter implements IContextParameter, Cloneable {
|
||||
String[] valueList;
|
||||
|
||||
String internalId;
|
||||
|
||||
/*This value may dirty, only use to cache encrypted value*/
|
||||
String originEncryptedValue;
|
||||
|
||||
/**
|
||||
* change to save id always for bug 13184.
|
||||
@@ -301,6 +304,15 @@ public class JobContextParameter implements IContextParameter, Cloneable {
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
public String getOriginEncryptedValue() {
|
||||
return originEncryptedValue;
|
||||
}
|
||||
|
||||
|
||||
public void setOriginEncryptedValue(String originEncryptedValue) {
|
||||
this.originEncryptedValue = originEncryptedValue;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user