Compare commits

..

291 Commits

Author SHA1 Message Date
bhe-talendbj
cedd7a8994 fix(TUP-39645): add NPE check (#6304) 2023-07-12 17:16:46 +08:00
jiezhang-tlnd
71178a9f15 feat(TUP-38391)Help menu revamp - Planning (#6302) 2023-07-12 16:24:41 +08:00
nrousseau
ef468af7ca chore(TUP-39636): update dependencies of pom for cxf (#6300) 2023-07-12 12:59:31 +08:00
zyuan-talend
933a2495a4 fix(TUP-39291): Remove Talend Exchange link from Studio. (#6285) (#6299) 2023-07-11 18:34:01 +08:00
jiezhang-tlnd
3c13721c44 fix(TUP-38391)remove Support button (#6282) (#6292)
* fix(TUP-38391)remove Support button

* remove blank space

* change guided tour text
2023-07-11 09:42:46 +08:00
pyzhou
e108f814c9 fix(TDI-49933): snowflake metadata time issue (#6279) 2023-07-10 12:11:01 +08:00
Alexiane Yvonet
93fc3c175e Add localized files (#6291)
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-07-07 19:12:00 +08:00
Alexiane Yvonet
12582eaadf Add localized files (#6290)
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-07-07 19:11:36 +08:00
hzhao
2b208a1d57 chore(TUP-39350): fix tuj (#6295) 2023-07-07 16:37:32 +08:00
Chao MENG
7222e1e0eb item(TUP-39284): Align add/delete node logic with studio (#6280)
* item(TUP-39284): Align add/delete node logic with studio
https://jira.talendforge.org/browse/TUP-39284

* item(TUP-39284): Align add/delete node logic with studio
https://jira.talendforge.org/browse/TUP-39284

* item(TUP-39284): Align add/delete node logic with studio
https://jira.talendforge.org/browse/TUP-39284

* item(TUP-39284): Align add/delete node logic with studio
https://jira.talendforge.org/browse/TUP-39284

* item(TUP-39284): Align add/delete node logic with studio
https://jira.talendforge.org/browse/TUP-39284

* item(TUP-39284): Align add/delete node logic with studio
https://jira.talendforge.org/browse/TUP-39284

* item(TUP-39284): Align add/delete node logic with studio
https://jira.talendforge.org/browse/TUP-39284
2023-07-07 10:45:05 +08:00
jiezhang-tlnd
db6dd66e41 chore(TUP-39332)guava:30.0-jre | CVE-2020-8908 (#6277) (#6288)
* chore(TUP-39332)guava:30.0-jre | CVE-2020-8908
https://jira.talendforge.org/browse/TUP-39332

* update guava to 32.0.1
2023-07-06 11:23:10 +08:00
Jane Ding
670767b0e1 fix(TUP-39398):"Argument not valid" Error shows in error log after edit (#6284) (#6287)
* fix(TUP-39398):"Argument not valid" Error shows in error log after edit
Comment in job>Contexts View and press Enter
https://jira.talendforge.org/browse/TUP-39398

* fix(TUP-39398):"Argument not valid" Error shows in error log after edit
Comment in job>Contexts View and press Enter
https://jira.talendforge.org/browse/TUP-39398
2023-07-06 10:55:39 +08:00
hzhao
9b4681afbd chore(TUP-39350): fix tuj failed (#6286) 2023-07-06 09:46:58 +08:00
qiongli
746eedf8a0 feat(TDQ-21251):Support foreign/external table for Postgresql/Redshift (#6275) 2023-07-04 11:31:23 +08:00
hzhao
1ae10f496a chore(TUP-39350): Cleanup studio bundle re-exports part 2 (#6276)
* chore(TUP-39350): Cleanup studio bundle re-exports part 2

* chore(TUP-39350): Cleanup studio bundle re-exports part 2
2023-07-04 11:21:41 +08:00
zyuan-talend
8ab307ba9b fix(TUP-39467): CVE-2022-29599,maven-shared-utils:0.9.0. (#6274) (#6281) 2023-07-04 11:00:15 +08:00
jiezhang-tlnd
27ba81ba3d 4 basics walkthrough should be 4 basic walkthrough (#6271) 2023-07-03 17:35:08 +08:00
hzhao
79672cce8e chore(TUP-39350): Cleanup studio bundle re-exports to get clean (#6245)
* chore(TUP-39350): Cleanup studio bundle re-exports to get clean

* chore(TUP-39350): Cleanup studio bundle re-exports to get clean

* chore(TUP-39350): Cleanup studio bundle re-exports to get clean

* chore(TUP-39350): Cleanup studio bundle re-exports to get clean

* chore(TUP-39350): Cleanup studio bundle re-exports to get clean

* chore(TUP-39350): Cleanup studio bundle re-exports to get clean

* chore(TUP-39350): Cleanup studio bundle re-exports to get clean

* chore(TUP-39350): Cleanup studio bundle re-exports to get clean

* chore(TUP-39350): Cleanup studio bundle re-exports to get clean

* chore(TUP-39350): Cleanup studio bundle re-exports

* chore(TUP-39350): Cleanup studio bundle re-exports

* chore(TUP-39350): Cleanup studio bundle re-exports

* chore(TUP-39350): Cleanup studio bundle re-exports to get clean

* chore(TUP-39350): Cleanup studio bundle re-exports to get clean

* chore(TUP-39350): Cleanup studio bundle re-exports to get clean

* chore(TUP-39350): Cleanup studio bundle re-exports to get clean

* chore(TUP-39350): Cleanup studio bundle re-exports
2023-06-29 11:02:11 +08:00
sbliu
3c2624a5ea fix(TUP-39463) fix cannot open Hive Metadata connection with context parameters(without bigdata feature installed) (#6267) 2023-06-28 16:15:14 +08:00
sbliu
e1ac2b85d5 feat(TUP-38946) add support vertica 12 (#6223)
* feat(TUP-38946) add support vertica 12

* remove VERTICA 9

* remove vertica 9 driver class

* transform db connection string from vertica 9 to vertica 12
2023-06-27 14:55:34 +08:00
Jane Ding
72b988fe76 fix(TUP-37696):Issue on redshift SSO metadata after update aws-java-sdk (#6265)
https://jira.talendforge.org/browse/TUP-37696
2023-06-27 10:09:00 +08:00
tsasada-talend
319bbda1c9 Add localized files (#6261)
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-06-26 09:34:11 +08:00
Alexiane Yvonet
d197a0c194 Add localized files (#6260)
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-06-26 09:33:48 +08:00
Alexiane Yvonet
0a7093fb66 Add localized files (#6259)
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-06-26 09:33:32 +08:00
Jane Ding
e8453bab5e fix(TUP-38646):Environment variables values are lost during the job (#6257) (#6262)
export
https://jira.talendforge.org/browse/TUP-38646
2023-06-25 10:31:20 +08:00
Emmanuel GALLOIS
e2d67b5d64 feat(TDI-49951): bump component-runtime to 1.58 (#6250) 2023-06-21 15:57:14 +02:00
Zhiwei Xue
e6d1c55d7e fix(TUP-39262):Unable to save Talend type setup (#6239) 2023-06-21 11:22:09 +08:00
sbliu
3fcd368b7b chore(TUP-39233) upgrade json-smart, accessors-smart to 2.4.11 (#6216)
* chore(TUP-39233) upgrade json-smart, accessors-smart to 2.4.11

* modify omitted
2023-06-20 16:19:45 +08:00
sbliu
b3e1404884 fix(TUP-39239) not same ordering of the columns between table schema and (#6228)
synonym schema for oracle
2023-06-20 16:17:31 +08:00
Zhiwei Xue
e75c49fffd fix(TUP-38235):Job in a project that references other projects load very (#6241)
slowly in Studio
2023-06-20 10:11:50 +08:00
jiezhang-tlnd
906a50dfa7 Jzhang/80/tup 38391 (#6224) (#6256)
* feat(TUP-38391)Help menu revamp
https://jira.talendforge.org/browse/TUP-38391

* add links

* replace icons

* add icons

* added icons

* fix install software menu

* add icons folder

* keep Support menu

* code format

* code format

* format xml

* code format

* add icons

* code format
2023-06-19 15:00:31 +08:00
jiezhang-tlnd
f5288a6a98 fix(TUP-39057)schema of txxxCatcher component can not be exported (#6200)
https://jira.talendforge.org/browse/TUP-39057
2023-06-19 10:08:18 +08:00
sbliu
6681a1e987 feat(TUP-38947) upgrade mariadb jdbc driver mariadb-java-client to 3.1.4 (#6242) (#6254) 2023-06-16 17:43:06 +08:00
jiezhang-tlnd
1f4ccc0111 fix(TUP-38643)The custom mvn URI is not valid (#6205) (#6253)
* fix(TUP-38643)The custom mvn URI is not valid
https://jira.talendforge.org/browse/TUP-38643

* junits
2023-06-16 17:29:46 +08:00
tsasada-talend
7d5646942f Add localized files (#6249)
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-06-16 16:47:28 +08:00
Alexiane Yvonet
d2036f9561 Add localized files (#6248)
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-06-15 16:05:25 +08:00
Alexiane Yvonet
0f4e9a5a1b Add localized files (#6247)
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-06-15 16:03:42 +08:00
jiezhang-tlnd
18a72d530d fix(TUP-39329)NullPointerException when save guessed schema for TCK (#6238)
connector
https://jira.talendforge.org/browse/TUP-39329
2023-06-14 16:21:34 +08:00
tsasada-talend
b18e21d351 Add localized files (#6233)
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-06-09 10:10:56 +08:00
wang wei
93eec79c74 fix(TDI-49753): improve tsetkeystore (#6234) 2023-06-09 09:52:17 +08:00
Zhiwei Xue
1864cf5278 feat(TUP-38140):SAP CDS Views over Talend (#6178) (#6232) 2023-06-08 15:34:41 +08:00
hzhao
a1c433d0b4 fix(TUP-38590): CI/CD Pipeline generating different code (#6177) (#6231) 2023-06-08 14:51:00 +08:00
Chao MENG
c0a9f38b85 item(TUP-38907): Duplicate designer plugins for studio (#6229)
https://jira.talendforge.org/browse/TUP-38907
2023-06-08 11:39:42 +08:00
Emmanuel GALLOIS
af6dc4fc88 feat(TDI-49854): bump component-runtime to 1.57 (#6206) 2023-06-07 15:19:05 +02:00
Jane Ding
fd0f9d6c12 feat(TUP-38589):Managed updates improvements (#6196) (#6230)
* feat(TUP-38589):Managed updates improvements
https://jira.talendforge.org/browse/TUP-38589

* feat(TUP-38589):Managed updates improvements
https://jira.talendforge.org/browse/TUP-38589
2023-06-07 18:52:38 +08:00
zyuan-talend
ccf0931aa0 fix(TUP-38922): Clear old storage of git project. (#6226) 2023-06-05 15:25:22 +08:00
tsasada-talend
843fcc5b9a Add localized files (#6221)
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-06-05 10:51:00 +08:00
Chao MENG
aeb0031a66 item(TUP-38907): Duplicate designer plugins (#6219)
* item(TUP-38907): Duplicate designer plugins
https://jira.talendforge.org/browse/TUP-38907

* item(TUP-38907): Duplicate designer plugins
https://jira.talendforge.org/browse/TUP-38907

* item(TUP-38907): Duplicate designer plugins
https://jira.talendforge.org/browse/TUP-38907

* item(TUP-38907): Duplicate designer plugins
https://jira.talendforge.org/browse/TUP-38907

* item(TUP-38907): Duplicate designer plugins
https://jira.talendforge.org/browse/TUP-38907

* item(TUP-38907): Duplicate designer plugins
https://jira.talendforge.org/browse/TUP-38907

* item(TUP-38907): Duplicate designer plugins
https://jira.talendforge.org/browse/TUP-38907

* item(TUP-38907): Duplicate designer plugins
https://jira.talendforge.org/browse/TUP-38907
2023-06-02 10:45:38 +08:00
sponomarova
20d4fae588 feat(TBD-15036): Beta - Universal Spark 3.1 for HDInsight 5.0 (#6203) (#6220) 2023-06-01 09:24:35 +03:00
Abdulhamid Rashankar
faea680b47 APPINT-35612:Metadata failed to propagate modifications to routes (#6213) 2023-05-31 09:11:49 +02:00
msjian
6382138c82 fix(TDQ-21109): fix Dialog on tStandardizeRow support dark mode (#6187) 2023-05-29 18:18:23 +08:00
jiezhang-tlnd
9a1da2268f feat(TUP-38935)Add support to AWS (Mysql) Aurora 3.X (#6173) (#6211)
* feat(TUP-38935)Add support to AWS (Mysql) Aurora 3.X
https://jira.talendforge.org/browse/TUP-38935

* update mysql driver

* add dbversion for drag and drop

* set default version

* add libray needed
2023-05-29 14:41:05 +08:00
tsasada-talend
baa7e72aa9 Add localized files (#6208)
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-05-26 16:06:46 +08:00
jiezhang-tlnd
619c013edc chore(TUP-38346)maven-core:3.8.6 (#6079) (#6204)
* chore(TUP-38346)maven-core:3.8.6

* for update time stamp
2023-05-24 10:12:56 +08:00
kjwang
a44534dbdc Kjwang/feat tup 31305 improve the code to avoid encrypt (#6135) (#6201)
* TUP-31305 Improve the code to avoid encrypt the password in job
everytime
https://jira.talendforge.org/browse/TUP-31305
2023-05-22 18:00:43 +08:00
tsasada-talend
83d59da63d Add localized files (#6194)
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-05-19 18:54:46 +08:00
sbliu
2f087d46b4 chore(TUP-38415) upgrade xercesImpl to 2.12.2 (#6144) 2023-05-17 17:20:31 +08:00
wang wei
a25c92866c fix(TDI-49546): CVE-2022-45688, org.json:json:(<=20220924) (#6063) (#6193) 2023-05-17 10:58:40 +08:00
sbliu
55797ec1d1 chore(TUP-38577) upgrade spring-framework-bom to 5.2.9.RELEASE (#6189) 2023-05-16 17:36:59 +08:00
sbliu
6e90dde408 upgrade junit from 4.13.1 to 4.13.2 (#6191) 2023-05-16 11:49:35 +08:00
jiezhang-tlnd
e954b269ec chore(TUP-38624)Request for an API to determine if a joblet refactoring (#6165)
is ongoing
2023-05-15 18:53:01 +08:00
sbliu
76f4e82710 chore(TUP-38579) upgrade junit:4.12 to 4.13.1 (#6182) 2023-05-15 14:47:15 +08:00
sbliu
a63e5f9db8 fix(TUP-38462) add junit to check if invaid report generated (#6133) (#6185)
* fix(TUP-38462) add junit to check if invaid report generated

* update test data

* update test data, remove sap connection and system objects
2023-05-12 17:26:31 +08:00
Zhiwei Xue
8adfc1f968 fix(TUP-38316):[801 CI/CD] Duplicate Parameter error in the artifact and (#6058) (#6186)
creating the task
2023-05-12 17:16:08 +08:00
tsasada-talend
201bcef955 Add localized files (#6183)
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-05-12 15:38:01 +08:00
Chao MENG
6c1691669a chore: fix index out of bound (#6180) 2023-05-11 10:46:16 +08:00
Emmanuel GALLOIS
fd3d1af7b9 feat(TDI-49707): bump component-runtime to 1.56.1 (#6129) 2023-05-10 15:37:18 +02:00
apoltavtsev
a5894125b1 fix(APPINT-35554) Missing build type for child job is added 2023-05-09 15:48:07 +02:00
Dmytro Sylaiev
e16d7a560a fix(TDI-49659): Add new version of lib to module (#6150) 2023-05-09 12:57:40 +03:00
msjian
3ee7c825fd fix(TDQ-21121): upgrade snowflake connection driver (#6172) 2023-05-09 15:57:37 +08:00
kjwang
6962a0cf8c kjwang/Fix TUP-38901 Studio can invoke SSO client if no jre on mac os (#6163) (#6171)
Fix TUP-38901 Studio can invoke SSO client if no jre on mac os
https://jira.talendforge.org/browse/TUP-38901
2023-05-09 15:23:45 +08:00
sbliu
8799c1f0ce fix(TUP-38551) improvement, avoid potential NPE (#6157) 2023-05-08 16:24:40 +08:00
sponomarova
a78f6a4427 fix(TBD-15065): add missing property in EHadoopProperties (#6168) 2023-05-08 10:57:23 +08:00
sponomarova
6950959063 feat(TBD-15065): Synapse with universal : GA (#6149) (#6167) 2023-05-05 16:32:08 +03:00
hcyi
a267e8118c fix(TUP-38348):[8.0.1] Retrieve scheme for DB2 database in Talend does (#6069)
not retrieve PK.
2023-05-05 15:56:40 +08:00
Chao MENG
b413507fbe item(TUP-38247): provide component schema data (#6164)
https://jira.talendforge.org/browse/TUP-38247
2023-05-05 14:14:27 +08:00
zyuan-talend
cd7c9dfe78 fix(TUP-38557): fix XXE issues. (#6125) (#6154) 2023-05-05 09:49:24 +08:00
Abdulhamid Rashankar
bd3875a74d Update TokenInforUtil.java (#6160) 2023-05-03 11:16:37 +02:00
Alexiane Yvonet
15513dc4a0 Add localized files (#6151)
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-04-27 15:44:05 +08:00
sbliu
e6b72f1424 chore(TUP-38551) json-smart:2.4.7 ( CVE-2023-1370) (#6096)
* chore(TUP-38551) json-smart:2.4.7 ( CVE-2023-1370)

* update json-smart version 2.4.10 to 2.4.9

* update maven url index for upgrade json-smart
2023-04-26 10:32:28 +08:00
hcyi
2c5f048f7f fix(TUP-38181):Remove old arvo libraries. (#6106) 2023-04-25 16:11:44 +08:00
jiezhang-tlnd
58f30bae87 chore(TUP-38578CVE-2020-13956org.apache.httpcomponents:httpclient:4.2.6) (#6112) 2023-04-25 15:42:59 +08:00
jzhangbj
0d02e6f3ab Add localized files (#6146)
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-04-25 14:42:10 +08:00
jiezhang-tlnd
8e7da3b6bd chore(TUP-38552)Remove source code of libs (#6134) (#6147) 2023-04-25 14:22:06 +08:00
zyuan-talend
8299007eac fix(TUP-38735): velocity:1.5 | CVE-2020-13936 on TOS. (#6138) (#6145) 2023-04-24 15:43:26 +08:00
msjian
fb67412953 fix(TDQ-21121): upgrade snowflake connection driver (#6140) 2023-04-23 15:08:24 +08:00
tsasada-talend
faf9b905f4 Add localized files (#6136)
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-04-20 16:33:05 +08:00
kjwang
ea6940d222 Fix TUP-38743 Dark Mode: Job editor color is still using light theme in (#6130) (#6132)
Fix TUP-38743 Dark Mode: Job editor color is still using light theme in Remote Project
https://jira.talendforge.org/browse/TUP-38743
2023-04-18 16:54:50 +08:00
kjwang
5039c74452 Kjwang/fix tup 38656 improve job designer in dark mode (#6121) (#6127)
* TUP-38645 On dark mode, Job designer & subjob color can't restore to
correct default color
https://jira.talendforge.org/browse/TUP-38645
2023-04-17 18:14:05 +08:00
Emmanuel GALLOIS
0e3c5f2456 feat(TDI-49562): bump component-runtime to 1.55 (#6053) 2023-04-13 12:06:54 +02:00
kjwang
b8cf81efb1 TUP-38591 Text in unselected row isn't clear in FileJson wizard>"Fields (#6116) (#6120)
TUP-38591 Text in unselected row isn't clear in FileJson wizard>"Fields to extract"
https://jira.talendforge.org/browse/TUP-38591
2023-04-13 15:51:51 +08:00
kjwang
83ff043a43 TUP-37441 Improve mapper display in dark mode (#5906) (#6119)
* TUP-37441 Improve mapper display in dark mode
2023-04-13 15:39:27 +08:00
sbliu
ba64ae6bfb fix(TUP-38637) fix context update problem from TUP-38212 (#6115) 2023-04-13 10:58:33 +08:00
bhe-talendbj
d872479d63 fix(TUP-38617): add new api (#6103) (#6117) 2023-04-13 10:06:53 +08:00
Jane Ding
3fdaf9da69 fix(TUP-37227):Issue building when items names too long (#6067) (#6087) (#6113)
https://jira.talendforge.org/browse/TUP-37227
2023-04-12 18:04:28 +08:00
sbliu
21ec8bac77 chore(TUP-38572) upgrade xstream to 1.4.20 (#6102) 2023-04-12 10:14:01 +08:00
Jane Ding
582227a8c7 feat(TUP-38424):Add dark mode info to the pendo of Login Project (#6088) (#6105)
https://jira.talendforge.org/browse/TUP-38424
2023-04-11 17:39:18 +08:00
bhe-talendbj
098ff85b12 feat(TUP-38297): Improve Update settings for user/password (#6075) (#6100)
* feat(TUP-38297): delete basic auth credential

* feat(TUP-38297): throw error
2023-04-11 11:06:38 +08:00
sponomarova
db7512fd06 feat(TBD-12991): Azure Synapse with Universal (#6070) (#6099) 2023-04-10 11:52:42 +03:00
sbliu
acf9b10765 fix(TUP-38212) using updated context (#6089) (#6095) 2023-04-06 16:39:43 +08:00
Alexiane Yvonet
023a726abc Add localized files (#6093)
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-04-06 14:51:09 +08:00
sbliu
374c31e4cb fix(TUP-37855) add log to network check exception (#5988)
* fix(TUP-37855) add log to network check exception

* fix(TUP-37855) add check ulr to networkutil error log
2023-04-03 11:28:34 +08:00
vyu-talend
4b5e727c5f chore(TDI-49458):bump file enhanced. (#6076) (#6083) 2023-03-30 17:27:28 +08:00
tsasada-talend
ffb65403ef Add localized files (#6082)
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-03-30 17:17:04 +08:00
Zhiwei Xue
7306f314e4 fix(TUP-37990):remove custom bundle org.bouncycastle.bcprov (#6078) 2023-03-29 17:08:33 +08:00
hcyi
d5be5e8fa4 fix(TUP-38199):Remove updates section from Studio preferences. (#6055) 2023-03-29 11:49:56 +08:00
Jill Yan
cc0f6f3e5e master/APPINT-35452 correct snapshot post fix (#6061)
* APPINT-35452 correct snapshot post fix

* APPINT-35452 correct snapshot post fix

* APPINT-35452 correct snapshot post fix
2023-03-28 09:34:12 +08:00
dicarcab
bdc6c1930b fix(TBD-14951):OracleDB Migration task affecting DI Jobs (#6041) (#6073) 2023-03-27 10:56:56 +02:00
bhe-talendbj
59a68d2b7f chore(TUP-38259): refactor proxyrepositoryfactory (#6057) (#6072) 2023-03-27 15:47:09 +08:00
Jane Ding
e2885aeb37 Revert "fix(TUP-37227):Issue building when items names too long (#5980)" (#6022)
This reverts commit 33582b9fa4.
2023-03-23 17:43:16 +08:00
Alexiane Yvonet
f8065a7641 Add localized files (#6066)
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-03-23 17:37:53 +08:00
jiezhang-tlnd
115309e1c7 chore(TUP-38180)CVE-2022-45787,org.apache.james:apache-mime4j:0.6 (#6059) 2023-03-21 17:05:59 +08:00
hcyi
b7eaf61cbf fix(TUP-38139):context tab doesn't get updated after press 'undo'. (#6018) 2023-03-21 09:48:46 +08:00
Alexiane Yvonet
24dad16fb6 Add localized files (#6051)
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-03-17 09:29:34 +08:00
kjwang
2b074aace2 Fix TUP-38298 Can't edit the two default contexts in testcase (#6046) (#6048)
* Fix TUP-38298 Can't edit the two default contexts in testcase
https://jira.talendforge.org/browse/TUP-38298
2023-03-13 10:42:23 +08:00
Oleksandr Zhelezniak
13d4e68b7c fix(TDI-31777): bump talendcsv (#5927) 2023-03-10 12:46:11 +02:00
jzhangbj
d43b53e1c9 Add localized files (#6040)
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-03-09 18:54:23 +08:00
tsasada-talend
13d102128b Add localized files (#6038)
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-03-09 18:18:23 +08:00
Alexiane Yvonet
bcbcf0bc1f Add localized files (#6037)
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-03-09 17:54:40 +08:00
Jane Ding
d31f227ab3 feat(TUP-37093):Send Mapper data to PTP (#5982) (#6036)
* feat(TUP-37093):Send Mapper data to PTP
https://jira.talendforge.org/browse/TUP-37093

* feat(TUP-37093):Send Mapper data to PTP
https://jira.talendforge.org/browse/TUP-37093

* feat(TUP-37093):Send Mapper data to PTP
https://jira.talendforge.org/browse/TUP-37093
2023-03-09 16:13:09 +08:00
bhe-talendbj
94c911534d feat(TUP-38202): Preference for repositories where the username and password can be set in the settings (Window > preferences > Talend > Update settings) of the Talend studio (#6032) (#6035)
* feat(TUP-38202): Add p2 credential api

* feat(TUP-38202): add basic auth api

* feat(TUP-38202): add basic auth api

* feat(TUP-38202): add check for forbidden status code
2023-03-08 15:44:12 +08:00
kjwang
e335b7b469 Kjwang/tup 35058 issues on tmc after publishing (#5954) (#6034)
TUP-35058 Issues on TMC after publishing artifact with Int type parameter but string values
https://jira.talendforge.org/browse/TUP-35058
2023-03-07 18:14:26 +08:00
Jill Yan
4c4526f799 tcommon-studio-se/m80/APPINT-35365 (#6006) (#6029)
* APPINT-35365 fix output flow empty

* APPINT-35365 fix output flow empty

* APPINT-35365 fix empty outflow name

* APPINT-35365 fix empty outflow name
2023-03-06 17:26:05 +08:00
AlixMetivier
48e8282d3f feat(TBD-13123): K8S with Livy (#5090) (#6031)
* feat(TBD-13123): K8S with Livy

* fix for wizard

---------

Co-authored-by: AlixMetivier-zz <50327620+AlixMetivier-zz@users.noreply.github.com>
2023-03-03 11:48:10 +01:00
jzhangbj
22a6f0e575 Add localized files (#6027)
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-03-02 19:54:42 +08:00
tsasada-talend
5428caa7c8 Add localized files (#6024)
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-03-02 17:29:28 +08:00
Emmanuel GALLOIS
31a84fd47e feat(TDI-49432): bump component-runtime to 1.54.0 (#6015) 2023-03-01 16:48:57 +01:00
kjwang
35c5eb898d TUP-38032 [Studio 8.0]"Overwrite existing item" option is not display (#5983) (#6016)
TUP-38032 [Studio 8.0]"Overwrite existing item" option is not display even increase the window height to maximum
https://jira.talendforge.org/browse/TUP-38032
2023-03-01 09:49:22 +08:00
sbliu
932b2296b9 chore(TUP-37430) cleanup orgtalendlibraries (#6014)
* chore(TUP-37430) cleanup default group id org.talend.libraries

* remove extension of library needed

* recovery last removed 'librariesNeeded' extension for unit test

* revert , keep not changed

* revert for org.talend.libraries
2023-02-27 15:19:17 +08:00
Jane Ding
3d061f5555 fix(TUP-37569):Update Support>Documentation link with CLM link (#5979) (#6013)
* fix(TUP-37569):Update Support>Documentation link with CLM link
https://jira.talendforge.org/browse/TUP-37569

* fix(TUP-37569):Update Support>Documentation link with CLM link
https://jira.talendforge.org/browse/TUP-37569
2023-02-24 16:47:24 +08:00
Jane Ding
c1aee61eba fix(TUP-37568):Edits to the Help Contents menu (#5981) (#6012)
* fix(TUP-37568):Edits to the Help Contents menu
https://jira.talendforge.org/browse/TUP-37568

* fix(TUP-37568):Edits to the Help Contents menu
https://jira.talendforge.org/browse/TUP-37568
2023-02-24 16:47:11 +08:00
Oleksandr Zhelezniak
8ea979ab1f fix(TDI-49284): bump talend file enhanced (#5990) 2023-02-23 13:46:16 +02:00
tsasada-talend
b97c858e0e Add localized files (#6010)
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-02-23 17:40:59 +08:00
jiezhang-tlnd
0e23deccdf fix(TUP-37874)SQL inject risk (#6008) 2023-02-23 15:13:19 +08:00
hzhao
4f92562f8b fix(TUP-37874)SQL inject risk (#5955) (#5999)
* fix(TUP-37874)SQL inject risk

* add back

* add back

* SQL inject risk

Co-authored-by: jiezhang-tlnd <40561780+jiezhang-tlnd@users.noreply.github.com>
2023-02-23 09:16:28 +08:00
ypiel
5851599ffb Revert "chore(TDI-49432): bump component-runtime:1.54.0 (#6000)" (#6002)
This reverts commit f926918412.
2023-02-22 14:20:06 +01:00
ypiel
f926918412 chore(TDI-49432): bump component-runtime:1.54.0 (#6000) 2023-02-22 14:04:41 +01:00
kjwang
a978782e05 TUP-37176 SSO logs out way too often on the Studio (#5800) (#5998)
* TUP-37176 SSO logs out way too often on the Studio
https://jira.talendforge.org/browse/TUP-37176
2023-02-22 18:01:50 +08:00
zyuan-talend
10dd7847f6 fix(TUP-35060): tWarn does not show the TalendDate.TO_CHAR method. (#5962) (#5996) 2023-02-21 17:46:01 +08:00
hcyi
5b8f69df64 fix(TUP-37696):Issue on redshift SSO metadata after update aws-java-sdk. (#5937) 2023-02-21 09:57:30 +08:00
Zhiwei Xue
2478ab7f88 fix(TUP-35407):support scm (#5993) 2023-02-20 10:17:49 +08:00
tsasada-talend
6ff693078b Add localized files (#5991)
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-02-16 18:25:25 +08:00
Alexiane Yvonet
13c6b15800 Add localized files (#5986)
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-02-16 17:24:57 +08:00
Colm O hEigeartaigh
2dc20555b7 TDI-49282 - maxDate in TalendDate is not validated (#5944) 2023-02-13 14:01:14 +08:00
Jane Ding
33582b9fa4 fix(TUP-37227):Issue building when items names too long (#5980)
* fix(TUP-37227):Issue building when items names too long (#5828)

* fix(TUP-37227):Issue building when items names too long
https://jira.talendforge.org/browse/TUP-37227

* fix(TUP-37227):Issue building when items names too long
https://jira.talendforge.org/browse/TUP-37227

* fix(TUP-37227):Issue building when items names too long
https://jira.talendforge.org/browse/TUP-37227

Conflicts:
	main/plugins/org.talend.core.runtime/src/main/java/org/talend/core/model/process/AbstractNode.java

* fix(TUP-37227):Issue building when items names too long
https://jira.talendforge.org/browse/TUP-37227

* fix(TUP-37227):Issue building when items names too long
https://jira.talendforge.org/browse/TUP-37227

* fix(TUP-37227):Issue building when items names too long
https://jira.talendforge.org/browse/TUP-37227

* fix(TUP-37227):Issue building when items names too long
https://jira.talendforge.org/browse/TUP-37227

* fix(TUP-37227):Issue building when items names too long
https://jira.talendforge.org/browse/TUP-37227

Conflicts:
	main/plugins/org.talend.designer.maven.ui/src/main/java/messages.properties
2023-02-10 17:59:16 +08:00
tsasada-talend
3de58da430 Add localized files (#5977)
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-02-09 17:57:22 +08:00
Zhiwei Xue
b584695f56 fix(TUP-37971):Studio 8 failed to update using "NIGHTLY" Update URL if (#5973) (#5975)
Studio was used before
2023-02-09 17:51:05 +08:00
Zhiwei Xue
6219a2ae06 feat(TUP-37353):Guess Schema for tBigQueryInput (#5974) 2023-02-09 17:50:42 +08:00
jzhangbj
c2f8bed1aa Add localized files (#5976)
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-02-09 17:05:14 +08:00
zyuan-talend
f74e95599c fix(TUP-37700):generate microservice dependencies into componentIndex (#5923) (#5972)
file.
2023-02-08 16:48:57 +08:00
sbliu
3d3e504a00 fix(TUP-37692) XPath json use context can't get any data when running job (#5910)
* fix(TUP-37692) some change not finished

* to show tree node according to if add root or add root/object
2023-02-07 17:19:32 +08:00
bhe-talendbj
4fbc92dbbb feat(TUP-37595): reintroduce ingres/vectorwise in metedata (#5902) (#5971)
* feat(TUP-37595): add back ingres and vectorwise db

* feat(TUP-37595): add back ingres and vectorwise db

* feat(TUP-37595): enable ingres and vectorwise
2023-02-07 15:47:10 +08:00
bhe-talendbj
0901d8d199 fix(TUP-37920): fix sqllite retrieve tables (#5961) 2023-02-06 17:23:39 +08:00
hcyi
63d094aa2f fix(TUP-36823):Generated SQL Query for Teradata misses reserved word (#5916)
"TIME"
2023-02-06 15:29:38 +08:00
bhe-talendbj
cf0f4eae4b feat(TUP-37841): Generating jsonform for all of components automatically (#5947) (#5968)
* feat(TUP-37841): add jsonform generator

* feat(TUP-37841): add jsonform generator

* feat(TUP-37841): correct class path

* feat(TUP-37841): correct class path

* feat(TUP-37841): refactor

* feat(TUP-37841): refactor
2023-02-06 14:32:14 +08:00
jiezhang-tlnd
43c0dce77e fix(TUP-37349)Data viewer for tCouchBaseInput get npe error (#5848) (#5967)
* fix(TUP-37349)Data viewer for tCouchBaseInput get npe error
https://jira.talendforge.org/browse/TUP-37349

* Data viewer for tCouchBaseInput get npe error
2023-02-06 10:10:44 +08:00
Emmanuel GALLOIS
15862ae4c2 fix(TCOMP-2368): align log4j version (#5965) 2023-02-03 14:31:26 +01:00
Zhiwei Xue
fb13ca9748 fix(TUP-35407):project rootPom template not considered anymore. (#5964) 2023-02-03 17:41:59 +08:00
kjwang
92ca0fd483 TUP-37344 If access token & refresh token change to invalid, can't show (#5835) (#5963)
TUP-37344 If access token & refresh token change to invalid, can't show log in dialog when user selected auto login
https://jira.talendforge.org/browse/TUP-37344
2023-02-03 16:25:22 +08:00
Colm O hEigeartaigh
889a0cab07 Update README.md 2023-02-02 15:39:01 +00:00
Jane Ding
415f325f14 fix(TUP-37253):Excel Metadata fails to set column names and results in (#5816) (#5958)
IndexOutOfBounds for æ character
https://jira.talendforge.org/browse/TUP-37253
2023-02-02 18:16:34 +08:00
Jane Ding
72f0cc1354 fix(TUP-37358):Adding org.ops4j.pax.url.mvn.useFallbackRepositories=false for studio ops4j (#5868) (#5957)
* fix(TUP-37358):Adding
org.ops4j.pax.url.mvn.useFallbackRepositories=false for studio ops4j
https://jira.talendforge.org/browse/TUP-37358

* fix(TUP-37358):Adding
org.ops4j.pax.url.mvn.useFallbackRepositories=false for studio ops4j
https://jira.talendforge.org/browse/TUP-37358
2023-02-02 18:16:19 +08:00
Emmanuel GALLOIS
7297529066 feat(TDI-49275): bump component-runtime to 1.53.0 (#5942) 2023-02-01 11:22:00 +01:00
bhe-talendbj
f7ce9d76f3 fix(TUP-37425): Performance: Not Responding while Retrieving schema and the database contains many tables (#5952)
* fix(TUP-37425): fix retrieve schema

* fix(TUP-37425): check NPE
2023-01-30 19:38:19 +08:00
tsasada-talend
a6829ba4c0 Add localized files (#5945)
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-01-28 10:50:08 +08:00
bhe-talendbj
339d5109cf chore(TUP-37660): upgrade sqlite-jdbc (#5899) (#5940) 2023-01-18 14:45:03 +08:00
bhe-talendbj
d02825a315 chore: fix junit exe resolve (#5936) (#5938)
* chore: fix exe resolve

* chore: revert unnecessay changes

* chore: remove exe dependency test
2023-01-17 18:04:25 +08:00
bhe-talendbj
8d44e904ca bugfix(TUP-37425): Performance: Not Responding while Retrieving schema and the database contains many tables (#5930)
* fix(TUP-37425): retrieve table comment once

* fix(TUP-37425): add busy indicator

* fix(TUP-37425): fix UI responsiveness
2023-01-16 19:26:46 +08:00
Zhiwei Xue
65c6eb9bd9 fix(TUP-37751):Data view/Guess schema fail if set java interpreter to (#5928)
jdk 8
2023-01-11 21:15:45 +08:00
bhe-talendbj
1905631d9a feat(TUP-37030): Research: Enable signing GIT commits from GPG (#5767) (#5922)
* feat(TUP-37030): enable git preference page

* feat(TUP-37030): enable egit preference page for standard mode
2023-01-11 11:27:58 +08:00
hzhao
ca95e4c6be feat(TUP-37472): Oracle version cleanup (#5895) (#5921)
* feat(TUP-37472): Oracle version cleanup

* feat(TUP-37472): Oracle version cleanup

* feat(TUP-37472): Oracle version cleanup

* feat(TUP-37472): Oracle version cleanup
2023-01-11 10:50:37 +08:00
kjwang
b8f861bbf4 TUP-30674 Support rename on custom jar and inner code. (#5831) (#5919)
TUP-30674 Support rename on custom jar and inner code.
https://jira.talendforge.org/browse/TUP-30674
2023-01-10 15:55:36 +08:00
sbliu
c8bfa813f3 feat(TUP-36197) Remove git branch name in project setting (#5898) (#5920)
* feat(TUP-36197) retrieve branch name for build/publish job

* set branch value from null to empty
2023-01-10 15:49:20 +08:00
Wei Hua
2098d64d9c APPINT-35260 CVE-2022-36033, jsoup:1.14.2 (#5893) 2023-01-09 18:14:28 +08:00
Jane Ding
2e6322e2ad fix(TUP-37012):Help Pane: Online Tools menu: (#5858) (#5913)
* fix(TUP-37012):Help Pane: Online Tools menu:
Bugtracker/sources/exchange/forum menus
https://jira.talendforge.org/browse/TUP-37012

* fix(TUP-37012):Help Pane: Online Tools menu:
Bugtracker/sources/exchange/forum menus
https://jira.talendforge.org/browse/TUP-37012

* fix(TUP-37012):Help Pane: Online Tools menu:
Bugtracker/sources/exchange/forum menus
https://jira.talendforge.org/browse/TUP-37012
2023-01-09 10:54:25 +08:00
Zhiwei Xue
6426d95b5a feat(TUP-36692):Modify Studio launcher ini for more --add-opens when (#5911)
apply monthly update
2023-01-09 10:33:50 +08:00
Emmanuel GALLOIS
9dd71e6383 feat(TCOMP-2235): bump component-runtime to 1.52.1 (#5903)
* feat(TCOMP-2235): bump cxf to 3.5.5
2023-01-05 11:57:54 +01:00
hzhao
599f27ef30 chore(TUP-35265): upgrade 'crypto-utils' jar in low level (#5904)
* chore(TUP-35265): upgrade 'crypto-utils' jar in low level

* chore(TUP-35265): upgrade 'crypto-utils' jar in low level
2023-01-05 17:48:29 +08:00
jiezhang-tlnd
b1327c65db chore(TUP-37524)CVE-2022-46364,org.apache.cxf:cxf-core:3.4.4,3.5.2 (#5878) (#5907) 2023-01-05 11:45:42 +08:00
hcyi
ed2cb56b2c fix(TUP-37587):CVE : upgrade redshift-jdbc42 to 2.1.0.10 or latest (#5887) 2023-01-05 11:25:52 +08:00
jiezhang-tlnd
b71c4bbcca chore(TUP-37124)CVE-2022-36033,org.jsoup:jsoup:1.14.2 (#5799) 2022-12-30 14:41:35 +08:00
Jane Ding
f870735ed7 fix(TUP-37467):[8.0.1&7.3.1] custom component are no more build as (#5876) (#5900)
* fix(TUP-37467):[8.0.1&7.3.1] custom component are no more build as
snapshot but releases since june/july patch
https://jira.talendforge.org/browse/TUP-37467

* fix(TUP-37467):[8.0.1&7.3.1] custom component are no more build as
snapshot but releases since june/july patch
https://jira.talendforge.org/browse/TUP-37467

* fix(TUP-37467):[8.0.1&7.3.1] custom component are no more build as
snapshot but releases since june/july patch
https://jira.talendforge.org/browse/TUP-37467

* fix(TUP-37467):[8.0.1&7.3.1] custom component are no more build as
snapshot but releases since june/july patch
https://jira.talendforge.org/browse/TUP-37467
2022-12-28 18:01:05 +08:00
kjwang
1f6fa1f902 feat: TUP-37444 DI Repository view improvements (#5881)
* feat: TUP-37444 DI Repository view improvements
https://jira.talendforge.org/browse/TUP-37444
2022-12-27 10:16:29 +08:00
Jane Ding
8cfc715857 Revert "fix(TUP-37227):Issue building when items names too long (#5828) (#5880)" (#5891)
This reverts commit 666d67d388.
2022-12-23 11:53:38 +08:00
kjwang
231d51146c Fix failed junit (#5883)
Fix failed junit
2022-12-22 14:56:14 +08:00
pyzhou
68e7f5b479 fix(TDI-49103):bump up tck 1.52.0 (#5884) 2022-12-22 10:25:53 +08:00
Jane Ding
666d67d388 fix(TUP-37227):Issue building when items names too long (#5828) (#5880)
* fix(TUP-37227):Issue building when items names too long
https://jira.talendforge.org/browse/TUP-37227

* fix(TUP-37227):Issue building when items names too long
https://jira.talendforge.org/browse/TUP-37227
2022-12-20 10:37:53 +08:00
Alexiane Yvonet
288972c540 Add localized files (#5874)
Co-authored-by: jenkins-git <jenkins-git@talend.com>
2022-12-16 11:33:34 +08:00
tsasada-talend
06b45c7623 Add localized files (#5873)
Co-authored-by: jenkins-git <jenkins-git@talend.com>
2022-12-16 11:33:14 +08:00
Zhiwei Xue
2694abd02e feat(TUP-36415): set java 17 options unselected by default (#5872) 2022-12-15 15:11:24 +08:00
zyuan-talend
9a3d6a2610 fix(TUP-36936):CVE: CVE-not-disclosed, upgrade org.sonatype.plexus:plexus-cipher:1.4 to org.codehaus.plexus:1.8. (#5859) (#5869) 2022-12-15 10:42:49 +08:00
Wei Hua
b53d3b1623 APPINT-35178: [8.0.1] Add optional mechanism to align project models BUILD_TYPE (#5787)
* fix(APPINT-35058) [8.0.1] Add optional mechanism to align project models BUILD_TYPE (#5780)

* - remove duplicate classes ItemReportRecorder/ItemsReportUtil/MigrationReportHelper/MigrationReportRecorder
2022-12-12 10:19:32 +01:00
bhe-talendbj
c1bfc598d2 feat(TUP-37162): Improvement needed for standard Git mode (#5805) (#5867)
* feat(TUP-37162): add new repository node status api

* feat(TUP-37162): init impl

* feat(TUP-37162): add new api

* feat(TUP-37162): remove unnecessary changes

* feat(TUP-37162): fix logoff

* feat(TUP-37162): compute invalid referenced projects

* feat(TUP-37162): add ref project
2022-12-09 16:08:52 +08:00
jzhangbj
6b0dbfd4e4 Add localized files (#5862)
Co-authored-by: jenkins-git <jenkins-git@talend.com>
2022-12-09 09:17:40 +08:00
tsasada-talend
2010dfe2e7 Add localized files (#5860)
Co-authored-by: jenkins-git <jenkins-git@talend.com>
2022-12-08 18:14:32 +08:00
Chao MENG
f69c0a46ea feat(TUP-37052): dark theme support (#5857)
feat(TUP-37052): dark theme support
https://jira.talendforge.org/browse/TUP-37052
2022-12-06 14:34:43 +08:00
pyzhou
6a21ad37cc fix(TDI-48873):reload4j wrong artifactId (#5856) 2022-12-06 11:53:57 +08:00
pyzhou
72142eec40 fix(TDI-48873):sl4j upgrade 1.7.34 (#5829)
* fix(TDI-48873):sl4j upgrade 1.7.34

* slf4j-reload4j

* reload4j
2022-12-06 10:36:26 +08:00
Zhiwei Xue
a389190399 feat(TUP-36415):fix junit failure (#5855) 2022-12-06 10:10:37 +08:00
Emmanuel GALLOIS
db7056de82 feat(TDI-48896): bump component-runtime to 1.51.2 (#5836) 2022-12-05 18:40:23 +01:00
Zhiwei Xue
4cf27d8822 workitem(TUP-37424):Add a system property to setup global module access (#5852) 2022-12-05 17:35:54 +08:00
Chao MENG
03b4bc0a3b fix(TUP-37051): Studio perspective continuously reset after install R2022-09 patch (#5802)
* fix(TUP-37051): Studio perspective continuously reset after install
R2022-09 patch
https://jira.talendforge.org/browse/TUP-37051

* fix(TUP-37051): Studio perspective continuously reset after install
R2022-09 patch
https://jira.talendforge.org/browse/TUP-37051

* fix(TUP-37051): Studio perspective continuously reset after install
R2022-09 patch
https://jira.talendforge.org/browse/TUP-37051

* fix(TUP-37051): Studio perspective continuously reset after install
R2022-09 patch
https://jira.talendforge.org/browse/TUP-37051
2022-12-05 11:19:02 +08:00
Zhiwei Xue
ae3958ab88 feat(TUP-36415):Add needed --add-opens parameters for job execution (#5846)
* feat(TUP-37053):Handle Studio not managed --add-opens for JDBC and user
component for Job execution

* feat(TUP-36415):add junit

* fix(TUP-37335):the setting is not updated timely

* fix(TUP-37342):[bug] Dataview Database schema fail

* fix(TUP-37352):MongoDBOutput is unable work in the Java 17

* fix(TUP-37374):[bug] guess schema for couchbase get error
2022-12-02 15:44:44 +08:00
tsasada-talend
d2c27d7f71 Add localized files (#5845)
Co-authored-by: jenkins-git <jenkins-git@talend.com>
2022-12-02 14:56:35 +08:00
hzhao
8d5f634157 fix(TUP-37161): Pop up windows can not be closed when log on a migrate (#5838) (#5847)
* fix(TUP-37161): Pop up windows can not be closed when log on a migrate
big project

* fix(TUP-37161): Pop up windows can not be closed when log on a migrate
2022-12-02 11:32:50 +08:00
Chao MENG
495dfc9a51 feat(TUP-37052): dark theme support (#5843)
* chore: support dark theme

* chore: support dark theme

* Hide dark theme
2022-12-01 20:15:57 +08:00
Jane Ding
434d4c7285 Fix MetadataTalendTypeFilterTest.sparkDynamicTypeTest junit fail (#5842) (#5844) 2022-11-30 10:31:09 +08:00
hcyi
b5870ee132 feat(TUP-35746):Change the download of jars (#5841) 2022-11-29 15:42:00 +08:00
sbliu
988c2d0a66 chore(TUP-36969) upgrade slf4j (#5832)
* chore(TUP-36969) upgrade slf4j

# Conflicts:
#	main/plugins/org.talend.core.runtime/src/main/java/org/talend/core/database/conn/version/EDatabaseVersion4Drivers.java

* add dependency to slf4j 1.7.34

* replace slf4j-log4j12 with slf4j-reload4j

* slf4j-log4j12-1.7.34.jar replaced with slf4j-reload4j-1.7.34.jar

# Conflicts:
#	main/plugins/org.talend.core.runtime/src/main/java/org/talend/core/database/conn/version/EDatabaseVersion4Drivers.java
2022-11-26 10:19:42 +08:00
Chao MENG
16407eb6e7 fix(TUP-37228): Studio errors when attempting to create a Cloudera Dynamic Distro when repository.apache.org port 80 is blocked (#5815)
* fix(TUP-37228): Studio errors when attempting to create a Cloudera
Dynamic Distro when repository.apache.org port 80 is blocked
https://jira.talendforge.org/browse/TUP-37228

* fix(TUP-37228): Studio errors when attempting to create a Cloudera
Dynamic Distro when repository.apache.org port 80 is blocked
https://jira.talendforge.org/browse/TUP-37228
2022-11-25 14:49:47 +08:00
Colm O hEigeartaigh
7101e9c0d6 Create SECURITY.md (#5819) 2022-11-23 09:40:57 +00:00
Zhiwei Xue
6db5ccb7b2 feat(TUP-36415):fix testcase related problem (#5775)
* feat(TUP-36415):fix testcase related problem

* feat(TUP-36415):fix tck guess schema

* feat(TUP-36415):fix tDqReportRun action
2022-11-23 16:02:51 +08:00
Zhiwei Xue
5009b20e3b fix(TUP-37254):Error in selectively generating all poms when a job is (#5830)
used as child job from multiple jobs
2022-11-23 11:37:31 +08:00
Jane Ding
3112c8c52d fix(TUP-36933):[7.3.1] import dependencies is not working when we do a (#5790) (#5827)
* fix(TUP-36933):[7.3.1] import dependencies is not working when we do a
copy from brunch
https://jira.talendforge.org/browse/TUP-36933

* fix(TUP-36933):[7.3.1] import dependencies is not working when we do a
copy from brunch
https://jira.talendforge.org/browse/TUP-36933

* fix(TUP-36933):[7.3.1] import dependencies is not working when we do a
copy from brunch
https://jira.talendforge.org/browse/TUP-36933

* fix(TUP-36933):[7.3.1] import dependencies is not working when we do a
copy from brunch
https://jira.talendforge.org/browse/TUP-36933
2022-11-22 14:29:10 +08:00
kjwang
bca16388d7 TUP-37007 Disable DTDs feature for DocumentBuilder in class org.eclipse.urischeme.patched.internal.registration.PlistFileWriter (#5763) (#5826)
* TUP-37007 Disable DTDs feature for DocumentBuilder in class
org.eclipse.urischeme.patched.internal.registration.PlistFileWriter
https://jira.talendforge.org/browse/TUP-37007
2022-11-22 10:28:27 +08:00
Samuel ANTOINE
e53771e745 feat(TBD-14288): add dynamic schema on tAvroInput (#5659) (#5818)
feat(TBD-14288): add dynamic schema on tAvroInput (#5659) (#5818)
2022-11-18 14:09:37 +01:00
jzhangbj
c8a54b7b09 Add localized files (#5814)
Co-authored-by: jenkins-git <jenkins-git@talend.com>
2022-11-18 09:49:47 +08:00
tsasada-talend
46654820c1 Add localized files (#5811)
Co-authored-by: jenkins-git <jenkins-git@talend.com>
2022-11-18 09:45:57 +08:00
zyuan-talend
3e7649e7b4 fix(TUP-37016):CVE-2022-41853, upgrade org.hsqldb:hsqldb:2.3.1 to 2.7.1. (#5806) (#5808) 2022-11-17 11:45:16 +08:00
hcyi
0f7f8fa097 feat(TUP-35746):Change the download of jars (#5791) 2022-11-16 10:41:56 +08:00
bhe-talendbj
c136b2a2fa feat(TUP-35957): Use standard git storage mode in workspace (#5447) (#5796)
* feat(TUP-35957): add new api

* feat(TUP-35957): reference project checking for new git mode

* feat(TUP-35957): support multiple git repo for reference projects

* feat(TUP-35957): add new api

* feat(TUP-35957): revert ICoreService changes

* feat(TUP-35957): fix NPE

* feat(TUP-35957): add switch check

* feat(TUP-35957): add new api

* feat(TUP-35957): add api

* feat(TUP-35957): add notifiction service

* feat(TUP-35957): fix popup and jobInfo
2022-11-15 16:25:46 +08:00
zyuan-talend
70561b3423 fix(TUP-37016):CVE-2022-41853, upgrade org.hsqldb:hsqldb:2.3.1 to 2.7.1 (#5783) (#5798) 2022-11-15 16:14:40 +08:00
jzhangbj
53aa1bcc20 Add localized files (#5786)
Co-authored-by: jenkins-git <jenkins-git@talend.com>
2022-11-11 09:16:50 +08:00
tsasada-talend
f034239fe3 Add localized files (#5785)
Co-authored-by: jenkins-git <jenkins-git@talend.com>
2022-11-11 09:03:28 +08:00
Alexiane Yvonet
8acc1f8deb Add localized files (#5784)
Co-authored-by: jenkins-git <jenkins-git@talend.com>
2022-11-11 08:50:42 +08:00
pyzhou
33491a30fa fix(TDI-48441):CVE reload4j 1.2.22 (#5591) 2022-11-10 17:31:23 +08:00
Emmanuel GALLOIS
f900a98066 feat(TDI-48644): bump component-runtime to 1.50 (#5663) 2022-11-09 13:17:28 +01:00
zyuan-talend
53837d58a9 fix(TUP-36566):CVE:upgrade reload4j to 1.2.22. (#5735) (#5777) 2022-11-09 17:14:52 +08:00
sbliu
9c4dcf7244 chore(TUP-36964) commons-text upgrade to 1.10.0 (#5779) 2022-11-09 14:41:17 +08:00
sbliu
e66fb656da feat(TUP-32228) Load multiple libraries with routine by detect the selected module (#5672) (#5778)
* feat(TUP-32228) allow add direct dependencies for select module, for global routine,custom routine jars, global beans, custom bean jars

* share dependencies to custom nexus if needed

* add progress dialog for maven command execution
2022-11-09 10:10:30 +08:00
pyzhou
edce5f68d2 fix(TDI-48793):CVE Apache commons text 1.10.0 (#5769)
# Conflicts:
#	main/plugins/org.talend.designer.maven.repo.tcksdk/pom.xml
2022-11-08 12:13:41 +08:00
hcyi
3da58ccf1b feat(TUP-33031):List invalid items with Project analysis of 8.0 (#5728)
* feat(TUP-33031):List invalid items with Project analysis of 8.0

* feat(TUP-33031):improve for List invalid items with Project analysis of
8.0

* feat(TUP-33031):improve for List invalid items with Project analysis of
8.0

* feat(TUP-33031):improve for List invalid items with Project analysis of
2022-11-07 18:42:15 +08:00
Jane Ding
c5b2b1381f fix(TUP-36862):Transfer pendo to EE (#5723) (#5773)
* fix(TUP-36862):Transfer pendo to EE
https://jira.talendforge.org/browse/TUP-36862

* fix(TUP-36862):Transfer pendo to EE
https://jira.talendforge.org/browse/TUP-36862

* fix(TUP-36862):Transfer pendo to EE
https://jira.talendforge.org/browse/TUP-36862

* fix(TUP-36862):Transfer pendo to EE
https://jira.talendforge.org/browse/TUP-36862
2022-11-07 09:27:40 +08:00
Wei Hua
e5f98e1323 APPINT-35058 [8.0.1] Add optional mechanism to align project models BUILD_TYPE (#5684)
Co-authored-by: apoltavtsev <apoltavtsev@gmail.com>
2022-11-03 17:28:45 +08:00
sbieliaievl
31a91312f7 fix(APPINT-35116) - fix for nexus versions (#5749)
* fix(APPINT-35116) - fix for nexus versions

* fix(APPINT-35116) - fix for nexus versions
2022-11-03 10:25:31 +02:00
Xilai Dai
148a95b917 feat(APPINT-34707) add new getService() into BundleUtils class (#5610) (#5761) 2022-11-02 20:15:50 +08:00
Zhiwei Xue
8f19d0318f feat(TUP-36683):Selective generateAllPoms (#5676) (#5764) 2022-11-02 14:40:46 +08:00
Zhiwei Xue
6384e95a23 feat(TUP-36415):enable internal access by default for new project (#5738) 2022-11-02 14:24:04 +08:00
sbliu
e27917ce53 chore(TUP-36930) upgrade jackson-databind to 2.13.4.2,jackson-core/jackson-annotations to 2.13.4 (#5733) 2022-11-01 14:39:17 +08:00
tsasada-talend
e46c839b87 Add localized files (#5746)
Co-authored-by: jenkins-git <jenkins-git@talend.com>
2022-10-27 16:31:30 +08:00
jzhangbj
f78a644f2d Add localized files (#5747)
Co-authored-by: jenkins-git <jenkins-git@talend.com>
2022-10-27 16:27:24 +08:00
Alexiane Yvonet
edd6f96bf5 Add localized files (#5734)
Co-authored-by: jenkins-git <jenkins-git@talend.com>
2022-10-27 15:48:31 +08:00
jzhangbj
3e7b4174f9 Add localized files (#5732)
Co-authored-by: jenkins-git <jenkins-git@talend.com>
2022-10-27 15:44:59 +08:00
tsasada-talend
39a3e0f384 Add localized files (#5725)
Co-authored-by: jenkins-git <jenkins-git@talend.com>
2022-10-27 15:41:14 +08:00
Alexiane Yvonet
9f60910eb7 Add localized files (#5745)
Co-authored-by: jenkins-git <jenkins-git@talend.com>
2022-10-27 15:34:06 +08:00
pyzhou
90246cf7b0 fix(TDI-48676):ResumeUtil OOM (#5709)
* fix(TDI-48676):ResumeUtil OOM

* replace duplicate variable
2022-10-27 14:51:50 +08:00
Zhiwei Xue
22fc826956 feat(TUP-36415): append components info in module_access.properties (#5744) 2022-10-27 14:08:58 +08:00
Svitlana Anulich
9246668001 fix(TBD-14328): ClassNotFoundException when check service for CDP 7.x knox (#5715) (#5741) 2022-10-25 08:34:47 +03:00
Zhiwei Xue
30fca3bae0 feat(TUP-36415): fix tuj (#5739) 2022-10-24 11:50:48 +08:00
kjwang
35d3ebc21c TUP-36904 Ubuntu ARM64: Cannot "login with TalendCloud" with installed (#5714) (#5736)
TUP-36904 Ubuntu ARM64: Cannot "login with TalendCloud" with installed studio
https://jira.talendforge.org/browse/TUP-36904
2022-10-21 18:20:56 +08:00
sbliu
6fad79dfbb fix(TUP-36726) change tooltip message (#5731) 2022-10-21 11:17:06 +08:00
sbieliaievl
c662e5886d fix(APPINT-34581) - fixed versions 2022-10-18 14:30:20 +02:00
Laurent BOURGEOIS
61f21c1658 feat(TBD-14263):Support MongoDB v4+ - Spark Batch 3.1+ - GA (#5699) 2022-10-17 11:35:19 +02:00
Liu Xinquan
fb61a6cc08 fix(TDQ-20751) tDqReportRun Snowflake Context (#5704) (#5705) 2022-10-17 17:33:42 +08:00
Svitlana Anulich
746ff4aff7 fix(TBD-14194): add knox session timeout variable (#5685) (#5702) 2022-10-17 10:57:26 +03:00
Laurent BOURGEOIS
720c10ffab feat(TBD-13810): add dynamic schema on tfileinputdelimited (#5599) (#5700)
Co-authored-by: Samuel ANTOINE <samuel.antoine.talend@gmail.com>
2022-10-17 08:56:33 +02:00
sbliu
eac4d46b9e fix(TUP-36726) add warning icon and tip message. (#5683) (#5701) 2022-10-17 14:30:36 +08:00
tsasada-talend
1e521b64c0 Add localized files (#5695)
Co-authored-by: jenkins-git <jenkins-git@talend.com>
2022-10-14 19:58:47 +08:00
kjwang
c85260c0b5 TUP-36732 Studio can not fetch SSO access token automatically if stay on (#5689) (#5696)
TUP-36732 Studio can not fetch SSO access token automatically if stay on logon dialog for long time
https://jira.talendforge.org/browse/TUP-36732
2022-10-13 18:05:50 +08:00
Jane Ding
7727289673 fix(TUP-36893):Add new column import_product for Import items pendo (#5690) (#5693)
event
https://jira.talendforge.org/browse/TUP-36893
2022-10-13 16:04:44 +08:00
sbieliaievl
cc56f55c46 fix(APPINT-34581) - Route and data services features versions behave differently in Talend Runtime (#5660)
* fix(APPINT-34581) - added methods for getting feature and bundle version

* fix(APPINT-34581)

* fix(APPINT-34581)

* fix(APPINT-34581)
2022-10-13 10:39:08 +03:00
Jane Ding
109199da03 fix(TUP-36284):Compile error in Studio (#5607) (#5691)
* fix(TUP-36284):Compile error in Studio
https://jira.talendforge.org/browse/TUP-36284

* fix(TUP-36284):Compile error in Studio
https://jira.talendforge.org/browse/TUP-36284
2022-10-13 11:58:15 +08:00
sbieliaievl
d21695dfae feat(APPINT-26700) - Ability to modify microservice application properties file within Talend Studio (#5594)
* fix(APPINT-34929) - added constants for settings application properties

* APPINT-26700: Ability to modify microservice application properties file within Talend Studio

Co-authored-by: arashankar <abdulhamid0606@gmail.com>
2022-10-12 12:27:26 +02:00
kjwang
f31f58c945 Fix TUP-36747 Improve logs when Log in with Talend Cloud (#5679) (#5688)
Fix TUP-36747 Improve logs when Log in with Talend Cloud
https://jira.talendforge.org/browse/TUP-36747
2022-10-12 17:00:34 +08:00
Emmanuel GALLOIS
54fbf241cd feat(TDI-48595): bump component-runtime to 1.49 (#5648) 2022-10-12 10:20:56 +02:00
kjwang
b4859e59d1 TUP-36812 If user installed JAVA version less than 11, Web browser can't (#5673) (#5687)
* TUP-36812 If user installed JAVA version less than 11, Web browser can't
call back SSO client.
https://jira.talendforge.org/browse/TUP-36812
2022-10-12 15:52:33 +08:00
Jane Ding
f9348709de fix(TUP-36780):Add tracking to Studio (#5655) (#5681)
https://jira.talendforge.org/browse/TUP-36780
2022-10-12 11:11:37 +08:00
Jane Ding
bc88a7f4d8 fix(TUP-36710):Some tMap data not show in pendo (#5636) (#5680)
https://jira.talendforge.org/browse/TUP-36710
2022-10-12 11:11:26 +08:00
Zhiwei Xue
a86c54fc71 feat(TUP-36415):Add needed --add-opens parameters for job execution (#5654) 2022-10-12 10:00:09 +08:00
tsasada-talend
bd6673d7e6 Add localized files (#5665)
Co-authored-by: jenkins-git <jenkins-git@talend.com>
2022-10-09 09:21:07 +08:00
Alexiane Yvonet
e044933297 Add localized files (#5662)
Co-authored-by: jenkins-git <jenkins-git@talend.com>
2022-10-09 09:19:05 +08:00
Jane Ding
54446d79dc fix(TUP-36169) Performance issue when execute "Generate Doc as html" (#5666) 2022-10-06 18:34:25 +08:00
dicarcab
a7bafcabd3 fix(TBD-10400): Reject flow doesn't work correctly for dates in extract components (#5658) 2022-09-30 09:34:30 +02:00
Alexiane Yvonet
c5656cb59d Add localized files (#5656)
Co-authored-by: jenkins-git <jenkins-git@talend.com>
2022-09-30 14:55:23 +08:00
tsasada-talend
fcd01e14c0 Add localized files (#5653)
Co-authored-by: jenkins-git <jenkins-git@talend.com>
2022-09-30 14:55:01 +08:00
sbliu
6fae597691 fix(TUP-36169) Performance issue when execute "Generate Doc as html" (#5580) 2022-09-30 14:38:51 +08:00
kjwang
1fc638f09b kjwang/Fix TUP-32606 Support SSO on Studio (Fix build error) (#5651)
kjwang/Fix TUP-32606 Support SSO on Studio (Fix build error)
2022-09-28 10:33:57 +08:00
kjwang
3a0b1d48cb TUP-36748 Studio send request to wrong data center when token invalid (#5633) (#5645)
* TUP-36748 Studio send request to wrong data center when token invalid
https://jira.talendforge.org/browse/TUP-36748
2022-09-26 18:22:08 +08:00
kjwang
6ef54dc38e Fix TUP-36740 When open tmc login page, we should encode all the (#5631) (#5642)
Fix TUP-36740 When open tmc login page, we should encode all the parameters in URL
https://jira.talendforge.org/browse/TUP-36740
2022-09-26 17:53:56 +08:00
kjwang
ce2c8478a0 kjwang/Fix TUP-36721 Only display SSO page for Talend Studio (#5611) (#5620) (#5641)
kjwang/Fix TUP-36721 Only display SSO page for Talend Studio
https://jira.talendforge.org/browse/TUP-36721
2022-09-26 17:51:58 +08:00
kjwang
93d76e62bd Fix TUP-36723 can not list project when use old way to fetch from token (#5613) (#5621) (#5640)
Fix TUP-36723 can not list project when use old way to fetch from token
https://jira.talendforge.org/browse/TUP-36723
2022-09-26 15:13:44 +08:00
kjwang
4b36a57b07 Fix TUP-36733 Fix junit error on maintenance/8.0 (#5628) (#5639)
Fix TUP-36733 Fix junit error on maintenance/8.0
https://jira.talendforge.org/browse/TUP-36733
2022-09-26 10:58:16 +08:00
kjwang
0784f2db5f Fix: TUP-36714 Improve the code for SSO feature (#5608) (#5612) (#5638)
* Fix: TUP-36714 Improve the code for SSO feature
https://jira.talendforge.org/browse/TUP-36714
2022-09-26 10:44:44 +08:00
kjwang
1bc2417f2d kjwang/feat_TUP-32606_Support_SSO (Fix version issue) (#5637)
* kjwang/feat_TUP-32606_Support_SSO (Fix version issue)
2022-09-26 10:16:23 +08:00
kjwang
e1e57b4629 TUP-32606 Support SSO on Studio (#5635)
TUP-32606 Support SSO on Studio
https://jira.talendforge.org/browse/TUP-32606
2022-09-26 09:43:36 +08:00
tsasada-talend
857f4dca9a Add localized files (#5627)
Co-authored-by: jenkins-git <jenkins-git@talend.com>
2022-09-22 17:40:58 +08:00
zyuan-talend
dd51ba9623 fix(TUP-36519):"Detect and update all jobs" does not update all jobs. (#5596) (#5623) 2022-09-22 16:47:56 +08:00
sbliu
e7dc81d3e2 feat(TUP-36340) fix problem that still show missing orai18n jar . (#5617)
fix problem that press finish button show missing orai18n jar .
2022-09-21 17:13:56 +08:00
zshen-talend
d013b64aa3 fix(TDQ-19700):snowflake type don't should show on the combo list of DB (#5604)
* fix(TDQ-19700):snowflake type don't should show on the combo list of DB
wizard

* fix(TDQ-19700): second time switch context failed when schema is empty
2022-09-20 12:23:38 +08:00
Alexiane Yvonet
94538f8b82 Add localized files (#5598)
Co-authored-by: jenkins-git <jenkins-git@talend.com>
2022-09-16 09:58:56 +08:00
Emmanuel GALLOIS
88bb49e6ba feat(TDI-48418): Bump component-runtime to 1.48 (#5592) 2022-09-15 11:42:20 +02:00
1622 changed files with 17085 additions and 307339 deletions

View File

@@ -2,7 +2,7 @@
http://www.talend.com
![alt text](https://www.talend.com/wp-content/uploads/talend_logo_5.png "Talend")
![alt text](https://www.talend.com/wp-content/uploads/2016/07/talend-logo.png "Talend")
## Contents

14
SECURITY.md Normal file
View File

@@ -0,0 +1,14 @@
# Security Policy
## Supported Versions
| Version | Supported |
| ------- | ------------------ |
| 8.0.x | :white_check_mark: |
| 7.3.x | :white_check_mark: |
| < 7.3.x | :x: |
## Reporting a Vulnerability
For information on how to report a new security problem please see [here](https://www.talend.com/security/vulnerability-disclosure/).
Our existing security advisories are published [here](https://www.talend.com/security/incident-response/).

View File

@@ -54,7 +54,13 @@
id="org.talend.libraries.apache.lucene8"
download-size="0"
install-size="0"
version="0.0.0"/>
<plugin
id="org.talend.signon.util"
download-size="0"
install-size="0"
version="0.0.0"
unpack="true"/>
unpack="false"/>
</feature>

View File

@@ -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"/>

View File

@@ -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>

View File

@@ -11,9 +11,12 @@ Require-Bundle: org.eclipse.core.runtime,
org.talend.libraries.apache,
org.talend.commons.runtime,
org.talend.libraries.ui,
org.apache.ant
org.apache.ant,
org.eclipse.jface,
org.apache.commons.lang3
Export-Package:
org.talend.commons.ui.runtime,
org.talend.commons.ui.runtime.custom,
org.talend.commons.ui.runtime.exception,
org.talend.commons.ui.runtime.expressionbuilder,
org.talend.commons.ui.runtime.geometry,
@@ -34,7 +37,8 @@ Export-Package:
org.talend.commons.ui.runtime.update,
org.talend.commons.ui.runtime.utils,
org.talend.commons.ui.runtime.ws
Import-Package: org.eclipse.jface.bindings.keys,
Import-Package: org.eclipse.gef.commands,
org.eclipse.jface.bindings.keys,
org.eclipse.jface.dialogs,
org.eclipse.jface.fieldassist,
org.eclipse.jface.resource,

View File

@@ -4,4 +4,6 @@ bin.includes = META-INF/,\
plugin.xml,\
icons/,\
icons1/,\
.
.,\
resources/

Binary file not shown.

After

Width:  |  Height:  |  Size: 288 B

View File

@@ -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>

View File

@@ -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'
}

View File

@@ -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'
}

View File

@@ -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));
}
}

View File

@@ -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;
/*

View File

@@ -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;
}
}

View File

@@ -0,0 +1,108 @@
// ============================================================================
//
// 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 org.talend.commons.ui.runtime.custom.IBusinessHandler;
import org.talend.commons.ui.runtime.custom.ICustomUI;
import org.talend.commons.ui.runtime.custom.ICustomUIEngine;
/**
* DOC cmeng class global comment. Detailled comment
*/
public class TalendUI {
private static TalendUI inst;
private static Object lock = new Object();
private boolean isStudio = true;
private ICustomUIEngine stigmaUIEngine;
private TalendUI() {
}
public static TalendUI get() {
if (inst == null) {
synchronized (lock) {
if (inst == null) {
inst = new TalendUI();
}
}
}
return inst;
}
public void setStudio(boolean isStudio) {
this.isStudio = isStudio;
}
public boolean isStudio() {
return this.isStudio;
}
public ICustomUIEngine getStigmaUIEngine() {
return this.stigmaUIEngine;
}
public void setStigmaUIEngine(ICustomUIEngine engine) {
this.stigmaUIEngine = engine;
}
/**
* should try to refactor them to different fragment
*/
@Deprecated
public <T extends IBusinessHandler> T run(IStudioRunnable<T> studioRun, ICustomUI<T> stigmaRun) {
if (isStudio()) {
return run(studioRun);
} else {
return run(stigmaRun);
}
}
/**
* should try to refactor them to different fragment
*/
@Deprecated
public <T extends IBusinessHandler> T run(IStudioRunnable<T> run) {
return run.run();
}
public <T extends IBusinessHandler> T run(ICustomUI<T> ui) {
if (ui == null) {
throw new RuntimeException("Custom ui is not defined!");
}
return stigmaUIEngine.run(ui);
}
@Deprecated
public static interface IStudioRunnable<T extends IBusinessHandler> {
T run();
}
@Deprecated
public static abstract class AbsStudioRunnable<T extends IBusinessHandler> implements IStudioRunnable<T> {
@Override
public T run() {
return doRun();
}
abstract public T doRun();
}
}

View File

@@ -0,0 +1,41 @@
// ============================================================================
//
// 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.custom;
import org.eclipse.jface.dialogs.Dialog;
/**
* DOC cmeng class global comment. Detailled comment
*/
public abstract class AbsBusinessHandler implements IBusinessHandler {
private Object openResult = Dialog.CANCEL;
public AbsBusinessHandler() {
}
@Override
public boolean isModalDialog() {
return true;
}
@Override
public Object getOpenResult() {
return openResult;
}
public void setOpenResult(Object openResult) {
this.openResult = openResult;
}
}

View File

@@ -0,0 +1,25 @@
// ============================================================================
//
// 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.custom;
/**
* DOC cmeng class global comment. Detailled comment
*/
public abstract class AbsUIData extends AbsUIEvent implements IUIData {
public AbsUIData(String key, String id, String type) {
super(key, id, type);
}
}

View File

@@ -0,0 +1,78 @@
// ============================================================================
//
// 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.custom;
import java.util.HashMap;
import java.util.Map;
/**
* DOC cmeng class global comment. Detailled comment
*/
public abstract class AbsUIEvent implements IUIEvent {
private String type;
private String id;
private String key;
private Map<String, Object> params = new HashMap<>();
public AbsUIEvent(String key, String id, String type) {
this.key = key;
this.id = id;
this.type = type;
}
@Override
public String getUIId() {
return id;
}
@Override
public void setUIId(String id) {
this.id = id;
}
@Override
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
@Override
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
@Override
public Map<String, Object> getParams() {
return params;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
}

View File

@@ -0,0 +1,28 @@
// ============================================================================
//
// 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.runtime.custom;
/**
* DOC cmeng class global comment. Detailled comment
*/
public abstract class AbsUIHandler implements IUIHandler {
/**
* DOC cmeng AbsUIHandler constructor comment.
*/
public AbsUIHandler() {
// TODO Auto-generated constructor stub
}
}

View File

@@ -0,0 +1,28 @@
// ============================================================================
//
// 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.runtime.custom;
/**
* DOC cmeng class global comment. Detailled comment
*/
public abstract class AbsUIHandlerFactory implements IUIHandlerFactory {
/**
* DOC cmeng AbsUIHandlerFactory constructor comment.
*/
public AbsUIHandlerFactory() {
// TODO Auto-generated constructor stub
}
}

View File

@@ -0,0 +1,258 @@
// ============================================================================
//
// 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.custom;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Semaphore;
import java.util.concurrent.TimeUnit;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.ui.runtime.TalendUI;
/**
* DOC cmeng class global comment. Detailled comment
*/
public abstract class AbstractCustomUI<T extends IBusinessHandler> implements ICustomUI<T> {
public static final String NONE = "none";
public static final String UI_OK = "ok";
public static final String UI_APPLY = "apply";
public static final String UI_CANCEL = "cancel";
public static final String UI_CLOSE = "close";
private Semaphore modalLock = new Semaphore(1);
private boolean isModalDialog = true;
private String uiId;
private String uiKey;
private ICustomUIEngine uiEngine;
private T businessHandler;
private Map<String, IUIEventHandler> eventMap = new HashMap<>();
private String selectedButton = NONE;
public AbstractCustomUI(T businessHandler) {
this.businessHandler = businessHandler;
this.uiId = UUID.randomUUID().toString();
this.uiKey = this.businessHandler.getUiKey();
this.isModalDialog = this.businessHandler.isModalDialog();
this.uiEngine = TalendUI.get().getStigmaUIEngine();
registerEventHandlers();
}
protected IUIEvent createOpenEvent() {
DefaultUIEvent openEvent = new DefaultUIEvent(BuiltinEvent.open.name(), uiId, IUIEvent.TYPE_GLOBAL);
openEvent.getParams().put(BuiltinParams.uiKey.name(), getUiKey());
return openEvent;
}
protected DefaultUIEvent createUIEvent(String key) {
DefaultUIEvent event = new DefaultUIEvent(key, uiId);
return event;
}
protected DefaultUIData createUIDataEvent(String key) {
DefaultUIData uiData = new DefaultUIData(key, uiId);
return uiData;
}
@Override
public boolean canHandle(IUIEvent event) {
return true;
}
@Override
public void handleUIEvent(IUIEvent event) {
String eventKey = event.getKey();
boolean closeDialog = false;
if (BuiltinEvent.ok.name().equals(eventKey)) {
setSelectedButton(UI_OK);
closeDialog = onOk(event);
} else if (BuiltinEvent.apply.name().equals(eventKey)) {
setSelectedButton(UI_APPLY);
closeDialog = onApply(event);
} else if (BuiltinEvent.close.name().equals(eventKey)) {
setSelectedButton(UI_CLOSE);
closeDialog = onClose(event);
} else if (BuiltinEvent.cancel.name().equals(eventKey)) {
setSelectedButton(UI_CANCEL);
closeDialog = onCancel(event);
} else {
IUIEventHandler eventListener = eventMap.get(eventKey);
if (eventListener != null) {
eventListener.handleUIEvent(event);
} else {
ExceptionHandler.process(new Exception("Can't handle event: " + eventKey));
}
}
if (closeDialog) {
closeDialog();
} else {
setSelectedButton(NONE);
}
}
protected int getOpenResult() {
if (isCancelled()) {
return CANCEL;
} else {
return OK;
}
}
@Override
public Object provideUIData(IUIData uiData) {
return getUIEngine().provideUIData(uiData);
}
protected void closeDialog() {
collectDialogData();
try {
dispatchUIEvent(new DefaultUIEvent(BuiltinEvent.close.name(), uiId));
} catch (Exception e) {
ExceptionHandler.process(e);
}
this.uiEngine.unregisterUIEventHandler(uiId);
modalLock.release();
onDialogClosed();
}
@Override
public T run() {
try {
modalLock.acquire();
} catch (InterruptedException e) {
throw new RuntimeException("Can't open dialog", e);
}
try {
this.uiEngine.registerUIEventHandler(uiId, this);
doRun();
if (isModalDialog()) {
try {
while (true) {
boolean succeed = modalLock.tryAcquire(5, TimeUnit.MINUTES);
if (succeed) {
break;
}
if (Thread.currentThread().isInterrupted()) {
throw new InterruptedException();
}
if (this.uiEngine == null || !this.uiEngine.isClientAlive()) {
throw new Exception("Lose connection with client");
}
}
} catch (Exception e) {
throw new RuntimeException("Dialog is closed unexpected", e);
}
}
return businessHandler;
} finally {
modalLock.release();
}
}
@Override
public T getBusinessHandler() {
return this.businessHandler;
}
abstract protected T collectDialogData();
protected void onDialogClosed() {
// nothing to do
}
protected void doRun() {
IUIEvent openEvent = createOpenEvent();
dispatchUIEvent(openEvent);
}
@Override
public void dispatchUIEvent(IUIEvent event) {
event.setUIId(uiId);
this.uiEngine.dispatchUIEvent(this, event);
}
@Override
public CompletableFuture<Object> requestUIData(IUIData uiData) {
uiData.setUIId(uiId);
return this.uiEngine.requestUIData(this, uiData);
}
protected void registerEventListener(String key, IUIEventHandler listener) {
eventMap.put(key, listener);
}
public boolean isModalDialog() {
// currently don't support to change modal, if do it, need to update logic of run
return isModalDialog;
}
protected ICustomUIEngine getUIEngine() {
return this.uiEngine;
}
@Override
public String getId() {
return this.uiId;
}
public String getUiKey() {
return uiKey;
}
protected void registerEventHandlers() {
}
public String getSelectedButton() {
return selectedButton;
}
public void setSelectedButton(String selectedButton) {
this.selectedButton = selectedButton;
}
public boolean isCancelled() {
return Arrays.asList(UI_CANCEL, UI_CLOSE).contains(getSelectedButton());
}
protected boolean onOk(IUIEvent event) {
return onApply(event);
}
protected boolean onApply(IUIEvent event) {
return true;
}
protected boolean onClose(IUIEvent event) {
return onCancel(event);
}
protected boolean onCancel(IUIEvent event) {
return true;
}
}

View File

@@ -0,0 +1,128 @@
// ============================================================================
//
// 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.custom;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Set;
import org.apache.commons.lang3.StringUtils;
import org.apache.log4j.Logger;
/**
* DOC cmeng class global comment. Detailled comment
*/
public abstract class AbstractCustomUIEngine implements ICustomUIEngine {
private static final Logger log = Logger.getLogger(AbstractCustomUIEngine.class);
private Map<String, IUIEventHandler> uiEventHandlers = Collections.synchronizedMap(new HashMap<>());
private Map<String, Set<IUIEventHandler>> globalUIEventHandlers = Collections.synchronizedMap(new HashMap<>());
public AbstractCustomUIEngine() {
// nothing to do
}
@Override
public <T extends IBusinessHandler> T run(ICustomUI<T> ui) {
return doRun(ui);
}
protected <T extends IBusinessHandler> T doRun(ICustomUI<T> ui) {
return ui.run();
}
@Override
public void handleUIEvent(IUIEvent event) {
if (StringUtils.equals(event.getType(), IUIEvent.TYPE_GLOBAL)) {
Set<IUIEventHandler> handlers = globalUIEventHandlers.get(event.getKey());
if (handlers != null) {
new Thread(() -> {
for (IUIEventHandler handler : handlers) {
if (handler.canHandle(event)) {
handler.handleUIEvent(event);
}
}
}).start();
}
} else {
IUIEventHandler handler = uiEventHandlers.get(event.getUIId());
if (handler != null) {
new Thread(() -> {
handler.handleUIEvent(event);
}).start();
}
}
}
@Override
public Object provideUIData(IUIData uiData) {
if (StringUtils.equals(uiData.getType(), IUIEvent.TYPE_GLOBAL)) {
Set<IUIEventHandler> handlers = globalUIEventHandlers.get(uiData.getKey());
if (handlers != null) {
for (IUIEventHandler handler : handlers) {
if (handler.canHandle(uiData)) {
return handler.provideUIData(uiData);
}
}
}
} else {
String uiId = uiData.getUIId();
IUIEventHandler handler = uiEventHandlers.get(uiId);
if (handler != null) {
return handler.provideUIData(uiData);
}
}
return null;
}
@Override
public void registerUIEventHandler(String uiId, IUIEventHandler handler) {
IUIEventHandler existing = uiEventHandlers.put(uiId, handler);
if (existing != null) {
log.warn("duplicated register for UI id: " + uiId);
}
}
@Override
public void unregisterUIEventHandler(String uiId) {
uiEventHandlers.remove(uiId);
}
@Override
public void registerGlobalUIEventHandler(String eventId, IUIEventHandler handler) {
Set<IUIEventHandler> handlers = globalUIEventHandlers.get(eventId);
if (handlers == null) {
synchronized (globalUIEventHandlers) {
handlers = globalUIEventHandlers.get(eventId);
if (handlers == null) {
handlers = Collections.synchronizedSet(new LinkedHashSet<>());
globalUIEventHandlers.put(eventId, handlers);
}
}
}
handlers.add(handler);
}
@Override
public void unregisterGlobalUIEventHandler(String eventId, IUIEventHandler handler) {
Set<IUIEventHandler> handlers = globalUIEventHandlers.get(eventId);
if (handlers != null) {
handlers.remove(handler);
}
}
}

View File

@@ -0,0 +1,30 @@
// ============================================================================
//
// 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.custom;
/**
* DOC cmeng class global comment. Detailled comment
*/
public class DefaultUIData extends AbsUIData {
public DefaultUIData(String key, String id) {
// type is null, means it is an event inside custom ui, which id is 'id'
super(key, id, null);
}
public DefaultUIData(String key, String id, String type) {
super(key, id, type);
}
}

View File

@@ -0,0 +1,30 @@
// ============================================================================
//
// 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.custom;
/**
* DOC cmeng class global comment. Detailled comment
*/
public class DefaultUIEvent extends AbsUIEvent {
public DefaultUIEvent(String key, String id) {
// type is null, means it is an event side the custom ui, which id is 'id'
super(key, id, null);
}
public DefaultUIEvent(String key, String id, String type) {
super(key, id, type);
}
}

View File

@@ -0,0 +1,26 @@
// ============================================================================
//
// 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.custom;
/**
* DOC cmeng class global comment. Detailled comment
*/
public interface IBusinessHandler {
String getUiKey();
boolean isModalDialog();
Object getOpenResult();
}

View File

@@ -0,0 +1,100 @@
// ============================================================================
//
// 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.runtime.custom;
import org.eclipse.gef.commands.Command;
import org.eclipse.swt.widgets.Shell;
/**
* DOC cmeng class global comment. Detailled comment
*/
public interface ICommonUIHandler extends IUIHandler {
/**
* Constant for no image (value 0).
*
* @see #MessageDialog(Shell, String, Image, String, int, int, String...)
*/
static final int NONE = 0;
/**
* Constant for the error image, or a simple dialog with the error image and
* a single OK button (value 1).
*
* @see #MessageDialog(Shell, String, Image, String, int, int, String...)
* @see #open(int, Shell, String, String, int)
*/
static final int ERROR = 1;
/**
* Constant for the info image, or a simple dialog with the info image and a
* single OK button (value 2).
*
* @see #MessageDialog(Shell, String, Image, String, int, int, String...)
* @see #open(int, Shell, String, String, int)
*/
static final int INFORMATION = 2;
/**
* Constant for the question image, or a simple dialog with the question
* image and Yes/No buttons (value 3).
*
* @see #MessageDialog(Shell, String, Image, String, int, int, String...)
* @see #open(int, Shell, String, String, int)
*/
static final int QUESTION = 3;
/**
* Constant for the warning image, or a simple dialog with the warning image
* and a single OK button (value 4).
*
* @see #MessageDialog(Shell, String, Image, String, int, int, String...)
* @see #open(int, Shell, String, String, int)
*/
static final int WARNING = 4;
/**
* Constant for a simple dialog with the question image and OK/Cancel buttons (value 5).
*
* @see #open(int, Shell, String, String, int)
* @since 3.5
*/
static final int CONFIRM = 5;
/**
* Constant for a simple dialog with the question image and Yes/No/Cancel buttons (value 6).
*
* @see #open(int, Shell, String, String, int)
* @since 3.5
*/
static final int QUESTION_WITH_CANCEL = 6;
static final String CONTEXT_COMMAND_STACK = "COMMAND_STACK";
boolean execute(Command cmd);
boolean openQuestion(String title, String msg);
boolean openConfirm(String title, String msg);
void openWarning(String title, String msg);
MessageDialogWithToggleBusinessHandler openToggle(MessageDialogWithToggleBusinessHandler bh);
void openError(String title, String msg);
static ICommonUIHandler get() {
return UIHandlerFactories.inst().getUIHandler(ICommonUIHandler.class);
}
}

View File

@@ -0,0 +1,28 @@
// ============================================================================
//
// 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.runtime.custom;
public interface ICrossPlatformPreferenceStore {
boolean getBoolean(String key);
boolean getDefaultBoolean(String key);
void setValue(String key, boolean value);
void setValue(String key, String value);
Object getOriginStore();
}

View File

@@ -0,0 +1,63 @@
// ============================================================================
//
// 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.custom;
import java.util.concurrent.CompletableFuture;
import org.talend.commons.ui.runtime.TalendUI;
/**
* DOC cmeng class global comment. Detailled comment
*/
public interface ICustomUI<T extends IBusinessHandler> extends IUIEventHandler {
public static final int OK = 0;
public static final int CANCEL = 1;
String getId();
T getBusinessHandler();
T run();
default T open() {
return TalendUI.get().run(this);
}
/**
* Send event to stigma
*/
void dispatchUIEvent(IUIEvent event);
/**
* Request data from stigma
*/
CompletableFuture<Object> requestUIData(IUIData uiData);
static enum BuiltinEvent {
open,
ok,
apply,
close,
cancel;
}
static enum BuiltinParams {
uiKey,
name,
title,
message;
}
}

View File

@@ -0,0 +1,25 @@
// ============================================================================
//
// 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.custom;
/**
* DOC cmeng class global comment. Detailled comment
*/
public interface ICustomUIDialog {
int open();
int getOpenResult();
}

View File

@@ -0,0 +1,64 @@
// ============================================================================
//
// 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.custom;
import java.util.concurrent.CompletableFuture;
/**
* DOC cmeng class global comment. Detailled comment
*/
public interface ICustomUIEngine {
static final String CONTEXT_PROCESS = "PROCESS";
<T extends IBusinessHandler> T run(ICustomUI<T> ui);
/**
* Handle event from stigma
*/
void handleUIEvent(IUIEvent event);
/**
* Provide UI data to stigma
*/
Object provideUIData(IUIData uiData);
/**
* Send event to stigma
*/
<T extends IBusinessHandler> void dispatchUIEvent(ICustomUI<T> ui, IUIEvent event);
/**
* Request data from stigma
*/
<T extends IBusinessHandler> CompletableFuture<Object> requestUIData(ICustomUI<T> ui, IUIData uiData);
<M> M convertValue(Object value, Class<M> clz);
Object readJson(String value) throws Exception;
void registerThreadLocalContext(String key, Object value);
Object getThreadLocalContext(String key);
void registerUIEventHandler(String uiId, IUIEventHandler handler);
void unregisterUIEventHandler(String uiId);
void registerGlobalUIEventHandler(String eventId, IUIEventHandler handler);
void unregisterGlobalUIEventHandler(String eventId, IUIEventHandler handler);
boolean isClientAlive();
}

View File

@@ -0,0 +1,21 @@
// ============================================================================
//
// 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.custom;
/**
* DOC cmeng class global comment. Detailled comment
*/
public interface IUIData extends IUIEvent {
}

View File

@@ -0,0 +1,34 @@
// ============================================================================
//
// 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.custom;
import java.util.Map;
/**
* DOC cmeng class global comment. Detailled comment
*/
public interface IUIEvent {
static final String TYPE_GLOBAL = "global";
String getType();
String getUIId();
void setUIId(String id);
String getKey();
Map<String, Object> getParams();
}

View File

@@ -0,0 +1,30 @@
// ============================================================================
//
// 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.custom;
/**
* DOC cmeng class global comment. Detailled comment
*/
public interface IUIEventHandler {
boolean canHandle(IUIEvent event);
void handleUIEvent(IUIEvent event);
/**
* Provide UIData to frontend
*/
Object provideUIData(IUIData uiData);
}

View File

@@ -0,0 +1,21 @@
// ============================================================================
//
// 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.runtime.custom;
/**
* DOC cmeng class global comment. Detailled comment
*/
public interface IUIHandler {
}

View File

@@ -0,0 +1,23 @@
// ============================================================================
//
// 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.runtime.custom;
/**
* DOC cmeng class global comment. Detailled comment
*/
public interface IUIHandlerFactory {
<T extends IUIHandler> T getUIHandler(Class<T> clz);
}

View File

@@ -0,0 +1,77 @@
// ============================================================================
//
// 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.runtime.custom;
import java.util.Map;
import org.apache.commons.lang3.StringUtils;
import org.talend.commons.exception.ExceptionHandler;
public class InputDialogBusinessCustomUI extends AbstractCustomUI<InputDialogBusinessHandler> {
public InputDialogBusinessCustomUI(InputDialogBusinessHandler businessHandler) {
super(businessHandler);
}
@Override
protected IUIEvent createOpenEvent() {
IUIEvent openEvent = super.createOpenEvent();
Map<String, Object> params = openEvent.getParams();
InputDialogBusinessHandler bh = getBusinessHandler();
params.put(BuiltinParams.title.name(), bh.getTitle());
params.put(BuiltinParams.message.name(), bh.getMessage());
params.put("defaultValue", bh.getDefaultValue());
return openEvent;
}
@Override
protected boolean onApply(IUIEvent event) {
DefaultUIData valueEvent = createUIDataEvent("value");
String errMsg = null;
try {
Object value = requestUIData(valueEvent).get();
InputDialogBusinessHandler bh = getBusinessHandler();
if (value == null) {
value = "";
}
errMsg = bh.getValidator().isValid((String) value);
if (StringUtils.isBlank(errMsg)) {
return true;
}
} catch (Exception e) {
errMsg = e.getLocalizedMessage();
ExceptionHandler.process(e);
}
DefaultUIEvent errorEvent = new DefaultUIEvent("error", getId());
errorEvent.getParams().put("message", errMsg);
dispatchUIEvent(errorEvent);
return false;
}
@Override
protected InputDialogBusinessHandler collectDialogData() {
DefaultUIData valueEvent = createUIDataEvent("value");
InputDialogBusinessHandler businessHandler = getBusinessHandler();
try {
Object value = requestUIData(valueEvent).get();
businessHandler.setOpenResult(getOpenResult());
if (value != null) {
businessHandler.setResult(value.toString());
}
} catch (Exception e) {
ExceptionHandler.process(e);
}
return businessHandler;
}
}

View File

@@ -0,0 +1,72 @@
// ============================================================================
//
// 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.runtime.custom;
public class InputDialogBusinessHandler extends AbsBusinessHandler {
private static final String UI_KEY = "InputDialog";
private String title;
private String message;
private String defaultValue;
private String result;
private IInputDialogInputValidator validator;
public InputDialogBusinessHandler(String title, String message, String defaultValue, IInputDialogInputValidator validator) {
super();
this.title = title;
this.message = message;
this.defaultValue = defaultValue;
this.validator = validator;
}
@Override
public String getUiKey() {
return UI_KEY;
}
public String getTitle() {
return title;
}
public String getMessage() {
return message;
}
public String getDefaultValue() {
return defaultValue;
}
public String getResult() {
return result;
}
public void setResult(String result) {
this.result = result;
}
public IInputDialogInputValidator getValidator() {
return validator;
}
public interface IInputDialogInputValidator {
public String isValid(String newText);
}
}

View File

@@ -0,0 +1,134 @@
// ============================================================================
//
// 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.custom;
import org.eclipse.swt.widgets.Shell;
/**
* DOC cmeng class global comment. Detailled comment
*/
public class MessageDialogBusinessHandler extends AbsBusinessHandler {
/**
* Constant for no image (value 0).
*
* @see #MessageDialog(Shell, String, Image, String, int, int, String...)
*/
public static final int NONE = ICommonUIHandler.NONE;
/**
* Constant for the error image, or a simple dialog with the error image and
* a single OK button (value 1).
*
* @see #MessageDialog(Shell, String, Image, String, int, int, String...)
* @see #open(int, Shell, String, String, int)
*/
public static final int ERROR = ICommonUIHandler.ERROR;
/**
* Constant for the info image, or a simple dialog with the info image and a
* single OK button (value 2).
*
* @see #MessageDialog(Shell, String, Image, String, int, int, String...)
* @see #open(int, Shell, String, String, int)
*/
public static final int INFORMATION = ICommonUIHandler.INFORMATION;
/**
* Constant for the question image, or a simple dialog with the question
* image and Yes/No buttons (value 3).
*
* @see #MessageDialog(Shell, String, Image, String, int, int, String...)
* @see #open(int, Shell, String, String, int)
*/
public static final int QUESTION = ICommonUIHandler.QUESTION;
/**
* Constant for the warning image, or a simple dialog with the warning image
* and a single OK button (value 4).
*
* @see #MessageDialog(Shell, String, Image, String, int, int, String...)
* @see #open(int, Shell, String, String, int)
*/
public static final int WARNING = ICommonUIHandler.WARNING;
/**
* Constant for a simple dialog with the question image and OK/Cancel buttons (value 5).
*
* @see #open(int, Shell, String, String, int)
* @since 3.5
*/
public static final int CONFIRM = ICommonUIHandler.CONFIRM;
/**
* Constant for a simple dialog with the question image and Yes/No/Cancel buttons (value 6).
*
* @see #open(int, Shell, String, String, int)
* @since 3.5
*/
public static final int QUESTION_WITH_CANCEL = ICommonUIHandler.QUESTION_WITH_CANCEL;
private static final String UI_KEY = "MessageDialog";
private String title;
private String message;
private int dialogType;
private boolean isModalDialog = true;
public MessageDialogBusinessHandler(int dialogType) {
super();
this.dialogType = dialogType;
}
public int getDialogType() {
return dialogType;
}
public void setDialogType(int dialogType) {
this.dialogType = dialogType;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
@Override
public String getUiKey() {
return UI_KEY;
}
@Override
public boolean isModalDialog() {
return this.isModalDialog;
}
public void setModalDialog(boolean modal) {
this.isModalDialog = modal;
}
}

View File

@@ -0,0 +1,105 @@
// ============================================================================
//
// 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.custom;
import java.util.Map;
import org.eclipse.jface.dialogs.MessageDialog;
import org.talend.commons.exception.ExceptionHandler;
/**
* DOC cmeng class global comment. Detailled comment
*/
public class MessageDialogCustomUI extends AbstractCustomUI<MessageDialogBusinessHandler> {
public MessageDialogCustomUI(MessageDialogBusinessHandler businessHandler) {
super(businessHandler);
}
@Override
protected IUIEvent createOpenEvent() {
IUIEvent openEvent = super.createOpenEvent();
Map<String, Object> params = openEvent.getParams();
MessageDialogBusinessHandler bh = getBusinessHandler();
params.put(BuiltinParams.title.name(), bh.getTitle());
params.put(BuiltinParams.message.name(), bh.getMessage());
params.put("dialogType", mapDialogType(bh.getDialogType()));
return openEvent;
}
private String mapDialogType(int type) {
switch (type) {
case MessageDialog.CONFIRM:
return "confirm";
case MessageDialog.ERROR:
return "error";
case MessageDialog.INFORMATION:
return "info";
case MessageDialog.QUESTION:
return "question";
case MessageDialog.QUESTION_WITH_CANCEL:
return "questionWithCancel";
case MessageDialog.WARNING:
return "warning";
default:
return "none";
}
}
@Override
protected MessageDialogBusinessHandler collectDialogData() {
MessageDialogBusinessHandler businessHandler = getBusinessHandler();
try {
businessHandler.setOpenResult(getDialogOpenResult());
} catch (Exception e) {
ExceptionHandler.process(e);
}
return businessHandler;
}
private Object getDialogOpenResult() {
Object result = null;
boolean isCancelled = isCancelled();
switch (getBusinessHandler().getDialogType()) {
case MessageDialog.CONFIRM:
case MessageDialog.ERROR:
case MessageDialog.INFORMATION:
case MessageDialog.WARNING:
if (isCancelled) {
result = Boolean.FALSE;
} else {
result = Boolean.TRUE;
}
break;
case MessageDialog.QUESTION:
if (isCancelled) {
result = Boolean.FALSE;
} else {
result = Boolean.TRUE;
}
break;
case MessageDialog.QUESTION_WITH_CANCEL:
if (isCancelled) {
result = Boolean.FALSE;
} else {
result = Boolean.TRUE;
}
break;
default:
result = getOpenResult();
break;
}
return result;
}
}

View File

@@ -0,0 +1,95 @@
// ============================================================================
//
// 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.runtime.custom;
public class MessageDialogWithToggleBusinessHandler extends MessageDialogBusinessHandler {
private static final String UI_KEY = "MessageDialogWithToggle";
private String toggleMessage;
private boolean toggleState;
private ICrossPlatformPreferenceStore preferenceStore;
private String prefKey;
private String[] buttonLabels;
private int defaultBtnIndex = 0;
public MessageDialogWithToggleBusinessHandler(int dialogType, String title, String message, String[] buttonLabels,
int defaultBtnIndex, String toggleMessage, boolean toggleState) {
super(dialogType);
this.setTitle(title);
this.setMessage(message);
this.buttonLabels = buttonLabels;
this.defaultBtnIndex = defaultBtnIndex;
this.toggleMessage = toggleMessage;
this.toggleState = toggleState;
}
@Override
public String getUiKey() {
return UI_KEY;
}
public String getToggleMessage() {
return toggleMessage;
}
public void setToggleMessage(String toggleMessage) {
this.toggleMessage = toggleMessage;
}
public boolean getToggleState() {
return toggleState;
}
public void setToggleState(boolean toggleState) {
this.toggleState = toggleState;
}
public ICrossPlatformPreferenceStore getPreferenceStore() {
return preferenceStore;
}
public void setPreferenceStore(ICrossPlatformPreferenceStore preferenceStore) {
this.preferenceStore = preferenceStore;
}
public String getPrefKey() {
return prefKey;
}
public void setPrefKey(String prefKey) {
this.prefKey = prefKey;
}
public String[] getButtonLabels() {
return buttonLabels;
}
public void setButtonLabels(String[] buttonLabels) {
this.buttonLabels = buttonLabels;
}
public int getDefaultBtnIndex() {
return defaultBtnIndex;
}
public void setDefaultBtnIndex(int defaultBtnIndex) {
this.defaultBtnIndex = defaultBtnIndex;
}
}

View File

@@ -0,0 +1,78 @@
// ============================================================================
//
// 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.runtime.custom;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
import org.eclipse.jface.dialogs.MessageDialog;
import org.talend.commons.exception.ExceptionHandler;
public class MessageDialogWithToggleCustomUI extends AbstractCustomUI<MessageDialogWithToggleBusinessHandler> {
public MessageDialogWithToggleCustomUI(MessageDialogWithToggleBusinessHandler businessHandler) {
super(businessHandler);
}
@Override
protected IUIEvent createOpenEvent() {
IUIEvent openEvent = super.createOpenEvent();
Map<String, Object> params = openEvent.getParams();
MessageDialogWithToggleBusinessHandler bh = getBusinessHandler();
params.put(BuiltinParams.title.name(), bh.getTitle());
params.put(BuiltinParams.message.name(), bh.getMessage());
params.put("toggleMsg", bh.getToggleMessage());
params.put("toggleState", bh.getToggleState());
params.put("dialogImageType", mapDialogImageType(bh.getDialogType()));
params.put("buttons", bh.getButtonLabels());
params.put("defaultBtnIndex", bh.getDefaultBtnIndex());
return openEvent;
}
private String mapDialogImageType(int type) {
switch (type) {
case MessageDialog.CONFIRM:
return "confirm";
case MessageDialog.ERROR:
return "error";
case MessageDialog.INFORMATION:
return "info";
case MessageDialog.QUESTION:
return "question";
case MessageDialog.QUESTION_WITH_CANCEL:
return "questionWithCancel";
case MessageDialog.WARNING:
return "warning";
default:
return "none";
}
}
@Override
protected MessageDialogWithToggleBusinessHandler collectDialogData() {
DefaultUIData toggleStateReq = createUIDataEvent("toggleState");
MessageDialogWithToggleBusinessHandler businessHandler = getBusinessHandler();
try {
CompletableFuture<Object> toggleStateResp = requestUIData(toggleStateReq);
businessHandler.setOpenResult(getOpenResult());
boolean toggleState = Boolean.valueOf(toggleStateResp.get().toString());
if (toggleState != businessHandler.getToggleState()) {
businessHandler.setToggleState(toggleState);
}
} catch (Exception e) {
ExceptionHandler.process(e);
}
return businessHandler;
}
}

View File

@@ -0,0 +1,73 @@
// ============================================================================
//
// 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.runtime.custom;
import java.util.Collection;
import java.util.HashSet;
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 class UIHandlerFactories implements IUIHandlerFactory {
private static UIHandlerFactories inst;
private Collection<IUIHandlerFactory> factories;
public static UIHandlerFactories inst() {
if (inst == null) {
inst = new UIHandlerFactories();
}
return inst;
}
private UIHandlerFactories() {
factories = new HashSet<>();
init();
}
private void init() {
try {
BundleContext bc = FrameworkUtil.getBundle(UIHandlerFactories.class).getBundleContext();
Collection<ServiceReference<IUIHandlerFactory>> serviceReferences = bc.getServiceReferences(IUIHandlerFactory.class,
null);
for (ServiceReference<IUIHandlerFactory> sr : serviceReferences) {
IUIHandlerFactory impl = bc.getService(sr);
factories.add(impl);
}
} catch (Throwable e) {
ExceptionHandler.process(e);
}
}
@Override
public <T extends IUIHandler> T getUIHandler(Class<T> clz) {
for (IUIHandlerFactory factory : factories) {
T ui = factory.getUIHandler(clz);
if (ui != null) {
return ui;
}
}
return null;
}
public ICommonUIHandler getCommonUIHandler() {
return getUIHandler(ICommonUIHandler.class);
}
}

View File

@@ -0,0 +1,96 @@
// ============================================================================
//
// 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.custom;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.Map;
/**
* DOC cmeng class global comment. Detailled comment
*/
public class UnsupportedCustomUI<T extends IBusinessHandler> extends AbstractCustomUI<T> {
UnsupportedBusinessHandler realHandler;
public UnsupportedCustomUI(T bh, String name) {
super(bh);
realHandler = new UnsupportedBusinessHandler(name);
}
public UnsupportedCustomUI(T bh, String name, String message) {
super(bh);
realHandler = new UnsupportedBusinessHandler(name, message);
}
@Override
protected IUIEvent createOpenEvent() {
IUIEvent openEvent = super.createOpenEvent();
Map<String, Object> params = openEvent.getParams();
params.put(BuiltinParams.name.name(), realHandler.getDialogName());
params.put(BuiltinParams.message.name(), realHandler.getDialogName());
return openEvent;
}
@Override
protected T collectDialogData() {
return getBusinessHandler();
}
public static class UnsupportedBusinessHandler extends AbsBusinessHandler {
private static final String UI_KEY = "UnsupportedDialog";
private String dialogName;
private String message;
public UnsupportedBusinessHandler(String name) {
super();
this.dialogName = name;
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
new Exception().printStackTrace(pw);
this.message = sw.toString();
}
public UnsupportedBusinessHandler(String name, String message) {
super();
this.dialogName = name;
this.message = message;
}
@Override
public String getUiKey() {
return UI_KEY;
}
public String getDialogName() {
return dialogName;
}
public void setDialogName(String dialogName) {
this.dialogName = dialogName;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
}

View File

@@ -72,12 +72,27 @@ public final class MessageBoxExceptionHandler {
}
}
public static void process(Throwable ex, Shell shell, boolean wrapMessage) {
CommonExceptionHandler.process(ex);
if (CommonsPlugin.isHeadless() || CommonsPlugin.isJUnitTest()) {
return;
}
if (shell != null) {
showMessage(ex, shell, wrapMessage);
}
}
public static void showMessage(Throwable ex, Shell shell) {
showMessage(ex, shell, true);
}
/**
* Open a message box showing a generic message and exception message.
*
* @param ex - exception to show
*/
public static void showMessage(Throwable ex, Shell shell) {
public static void showMessage(Throwable ex, Shell shell, boolean wrapMessage) {
if (ex.equals(lastShowedAction)) {
return;
}
@@ -85,10 +100,14 @@ public final class MessageBoxExceptionHandler {
// TODO smallet use ErrorDialogWidthDetailArea ?
String title = Messages.getString("commons.error"); //$NON-NLS-1$
String msg = Messages.getString("exception.errorOccured", ex.getMessage()); //$NON-NLS-1$
String excepMsg = ex.getMessage();
//add for tup-19726/19790, as for exception detailMessage will show more details on log area.
if(ex.getCause()!=null) {
msg = Messages.getString("exception.errorOccured", ex.getCause().getMessage()); //$NON-NLS-1$
excepMsg = ex.getCause().getMessage();
}
String msg = Messages.getString("exception.errorOccured", excepMsg); //$NON-NLS-1$
if (!wrapMessage) {
msg = Messages.getString("exception.message", excepMsg); //$NON-NLS-1$
}
Priority priority = CommonExceptionHandler.getPriority(ex);

View File

@@ -114,6 +114,7 @@ TableViewerCreator.Table.BeNull=table is null
TableViewerCreator.TableColumn.AssertMsg=The TableColumn of TableEditorColumn with idProperty '{0}' has not the correct Table parent
TreeToTablesLinker.Type.Unsupported=This type of currentControl is unsupported
commons.error=Error
exception.message={0}\nSee log for more details.
exception.errorOccured=An error occured ({0}).\nSee log for more details.
ModelSelectionDialog.Message=Please choose one option, or cancel.
ModelSelectionDialog.Option=option

View File

@@ -114,6 +114,7 @@ TableViewerCreator.Table.BeNull=la table est null.
TableViewerCreator.TableColumn.AssertMsg=La TableColumn de TableEditorColumn avec idProperty '{0}' n'a pas la bonne Table parente
TreeToTablesLinker.Type.Unsupported=Ce type de currentControl n'est pas support\u00E9
commons.error=Erreur
exception.message={0}\nConsultez le log pour plus de d\u00E9tails.
exception.errorOccured=Une erreur est survenue ({0}).\nConsultez le log pour plus de d\u00E9tails.
ModelSelectionDialog.Message=S\u00E9lectionnez une option ou annulez.
ModelSelectionDialog.Option=Option

View File

@@ -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:
@@ -114,6 +114,7 @@ TableViewerCreator.Table.BeNull=\u30C6\u30FC\u30D6\u30EB\u304CNULL\u3067\u3059
TableViewerCreator.TableColumn.AssertMsg=idProperty'{0}'\u304C\u3042\u308BTableEditorColumn\u306ETableColumn\u306B\u306F\u3001\u6B63\u3057\u3044\u89AA\u30C6\u30FC\u30D6\u30EB\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u305B\u3093
TreeToTablesLinker.Type.Unsupported=currentControl\u306E\u3053\u306E\u30BF\u30A4\u30D7\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
commons.error=\u30A8\u30E9\u30FC
exception.message={0}\n\u8A73\u7D30\u306F\u30ED\u30B0\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002
exception.errorOccured=\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F({0})\u3002\n\u8A73\u7D30\u306F\u30ED\u30B0\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002
ModelSelectionDialog.Message=\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\uFF11\u3064\u9078\u629E\u3059\u308B\u304B\u3001\u30AD\u30E3\u30F3\u30BB\u30EB\u3057\u3066\u304F\u3060\u3055\u3044\u3002
ModelSelectionDialog.Option=\u30AA\u30D7\u30B7\u30E7\u30F3

View File

@@ -114,6 +114,7 @@ TableViewerCreator.Table.BeNull=\u8868\u4E3A null
TableViewerCreator.TableColumn.AssertMsg=TableEditorColumn \u7684 idProperty \u4E3A '{0}' \u7684 TableColumn \u6CA1\u6709\u6B63\u786E\u7684 Table \u7236\u9879
TreeToTablesLinker.Type.Unsupported=\u4E0D\u652F\u6301\u8FD9\u79CD\u7C7B\u578B\u7684 currentControl
commons.error=\u9519\u8BEF
exception.message={0}\n\u8BF7\u67E5\u770B\u65E5\u5FD7\u4EE5\u83B7\u53D6\u66F4\u591A\u8BE6\u7EC6\u4FE1\u606F\u3002
exception.errorOccured=\u51FA\u73B0\u9519\u8BEF ({0})\u3002\n\u8BF7\u67E5\u770B\u65E5\u5FD7\u4EE5\u83B7\u53D6\u66F4\u591A\u8BE6\u7EC6\u4FE1\u606F\u3002
ModelSelectionDialog.Message=\u8BF7\u9009\u62E9\u4E00\u4E2A\u9009\u9879\u6216\u53D6\u6D88\u3002
ModelSelectionDialog.Option=\u9009\u9879

View File

@@ -40,8 +40,8 @@ public enum EImage implements IImage {
READ_ICON("/icons/read_obj.gif"), //$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$

View File

@@ -16,8 +16,14 @@ import java.io.BufferedOutputStream;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.SWT;
@@ -158,8 +164,35 @@ public class ImageUtils {
return imageDes;
}
private static Map<byte[], ImageDataProvider> imageFromDataCachedImages = new HashMap<byte[], ImageDataProvider>();
private static Map<byte[], ImageDataProvider> imageFromDataCachedImages = Collections.synchronizedMap(new HashMap<byte[], ImageDataProvider>());
private static Map<Long, byte[]> cachedImagesTimeKeeping = Collections.synchronizedMap(new HashMap<Long, byte[]>());
private static Thread clearImageFromDataCachedImages = new Thread() {
@SuppressWarnings("static-access")
public void run() {
long timeout = 5 * 60 * 1000;
while(true) {//remove older than 5 mins
Set<Entry<Long, byte[]>> collect = cachedImagesTimeKeeping.entrySet().stream()
.filter(entry -> (System.currentTimeMillis() - entry.getKey()) > timeout).collect(Collectors.toSet());
for(Entry<Long, byte[]> entry: collect) {
Long key = entry.getKey();
cachedImagesTimeKeeping.remove(key);
imageFromDataCachedImages.remove(entry.getValue());
}
try {
sleep(timeout);
} catch (InterruptedException e) {//
}
}
};
};
static {
clearImageFromDataCachedImages.setDaemon(true);
clearImageFromDataCachedImages.start();
}
/**
* By default, keep in memory the .
*
@@ -169,12 +202,17 @@ public class ImageUtils {
*/
public static ImageDescriptor createImageFromData(byte[] data, boolean... keepInMemory) {
if (data != null) {
ImageDataProvider imageProvider = imageFromDataCachedImages.get(data);
ImageDataProvider imageProvider = null;
Optional<byte[]> findKey = imageFromDataCachedImages.keySet().stream().filter(key->Arrays.equals(key, data)).findAny();
if(findKey.isPresent()) {
imageProvider = imageFromDataCachedImages.get(findKey.get());
}
if (imageProvider == null) {
ByteArrayInputStream bais = new ByteArrayInputStream(data);
ImageData img = new ImageData(bais);
imageProvider = new TalendImageProvider(img);
imageFromDataCachedImages.put(data, imageProvider);
cachedImagesTimeKeeping.put(System.currentTimeMillis(), data);
}
return ImageDescriptor.createFromImageDataProvider(imageProvider);
}
@@ -183,8 +221,9 @@ public class ImageUtils {
public static void disposeImages(byte[] data) {
if (data != null) {
if (imageFromDataCachedImages.get(data) != null) {
imageFromDataCachedImages.remove(data);
Optional<byte[]> findKey = imageFromDataCachedImages.keySet().stream().filter(key->Arrays.equals(key, data)).findAny();
if(findKey.isPresent()) {
imageFromDataCachedImages.remove(findKey.get());
}
}
}

View File

@@ -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);

View File

@@ -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);
}
}

View File

@@ -24,6 +24,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.util.Enumeration;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
import java.util.jar.JarOutputStream;
import org.apache.tools.zip.ZipEntry;
@@ -169,8 +170,52 @@ public class ZipFileUtils {
inputStream.close();
}
}
public static void unZipFileEntry(File destFile, java.util.zip.ZipFile zipFile, java.util.zip.ZipEntry entry) throws IOException {
InputStream inputStream;
FileOutputStream fileOut;
if (entry.isDirectory()) {
destFile.mkdirs();
} else {
File parent = destFile.getParentFile();
if (parent != null && !parent.exists()) {
parent.mkdirs();
}
inputStream = zipFile.getInputStream(entry);
fileOut = new FileOutputStream(destFile);
byte[] buf = new byte[bufSize];
int readedBytes;
while ((readedBytes = inputStream.read(buf)) > 0) {
fileOut.write(buf, 0, readedBytes);
}
fileOut.close();
inputStream.close();
}
}
public void setBufSize(int bufSize) {
ZipFileUtils.bufSize = bufSize;
}
public static boolean isValidJarFile(String moduleFilePath) {
if (moduleFilePath == null) {
return false;
}
if (!new File(moduleFilePath).exists()) {
return false;
}
try (JarFile zip = new JarFile(moduleFilePath)) {
zip.getManifest();
} catch (IOException e) {
return false;
}
return true;
}
}

View File

@@ -2,12 +2,13 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Common Runtime Plug-in
Bundle-SymbolicName: org.talend.commons.runtime;singleton:=true
Automatic-Module-Name: org.talend.commons.runtime
Bundle-Version: 8.8.8.qualifier
Require-Bundle: org.apache.log4j;visibility:=reexport,
Require-Bundle: org.apache.log4j,
org.apache.commons.commons-beanutils,
org.apache.commons.collections,
org.apache.commons.httpclient,
org.apache.commons.lang;visibility:=reexport,
org.apache.commons.lang,
org.eclipse.core.runtime,
org.eclipse.emf.ecore.xmi,
org.talend.libraries.apache,
@@ -17,7 +18,11 @@ Require-Bundle: org.apache.log4j;visibility:=reexport,
org.eclipse.core.net,
org.eclipse.m2e.core,
org.eclipse.m2e.maven.runtime,
org.eclipse.core.resources
org.eclipse.core.resources,
org.talend.studio.studio-utils,
org.talend.daikon,
org.apache.commons.codec,
org.apache.commons.lang3
Export-Package: org.talend.commons,
org.talend.commons.exception,
org.talend.commons.i18n,

View File

@@ -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>

View File

@@ -92,12 +92,12 @@
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.12.0</version>
<version>2.12.2</version>
</dependency>
<dependency>
<groupId>ch.qos.reload4j</groupId>
<artifactId>reload4j</artifactId>
<version>1.2.19</version>
<version>1.2.22</version>
</dependency>
</dependencies>
@@ -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>

View File

@@ -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);

View File

@@ -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();
}
}

View File

@@ -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;
}
}

View File

@@ -0,0 +1,35 @@
// ============================================================================
//
// 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.utils;
import org.osgi.framework.BundleContext;
import org.osgi.framework.FrameworkUtil;
import org.osgi.framework.ServiceReference;
import org.talend.commons.exception.ExceptionHandler;
public class OsgiServices {
public static <T> T get(Class<T> clz) {
try {
BundleContext bc = FrameworkUtil.getBundle(OsgiServices.class).getBundleContext();
ServiceReference<T> serviceReference = bc.getServiceReference(clz);
if (serviceReference != null) {
return bc.getService(serviceReference);
}
} catch (Throwable e) {
ExceptionHandler.process(e);
}
return null;
}
}

View File

@@ -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)
*

View File

@@ -33,6 +33,7 @@ import java.util.regex.Pattern;
import org.apache.commons.lang.StringUtils;
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;
@@ -108,6 +109,7 @@ public class NetworkUtil {
return true;
}
} catch (Exception e) {
CommonExceptionHandler.process(e, getCheckUrl());
return false;
} finally {
conn.disconnect();
@@ -120,7 +122,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 +146,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;

View File

@@ -96,7 +96,9 @@ public class EclipseCommandLine {
static public final String PROP_KEY_PROFILE_ID = "eclipse.p2.profile";
static public final String ARG_BRANCH = "-branch";
static public final String ARG_PROJECT = "-project";
static public final String LOGIN_ONLINE_UPDATE = "--loginOnlineUpdate";
static public final String ARG_TALEND_BUNDLES_CLEANED = "-talend.studio.bundles.cleaned"; //$NON-NLS-1$

View File

@@ -2,6 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Common UI Plug-in
Bundle-SymbolicName: org.talend.commons.ui;singleton:=true
Automatic-Module-Name: org.talend.commons.ui
Bundle-Version: 8.8.8.qualifier
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.core.resources,
@@ -10,7 +11,7 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.ui.intro,
org.eclipse.ui.ide,
org.eclipse.gef,
org.eclipse.jface;visibility:=reexport,
org.eclipse.jface,
org.apache.log4j,
org.apache.xalan,
org.apache.commons.lang,
@@ -18,9 +19,11 @@ Require-Bundle: org.eclipse.core.runtime,
org.talend.libraries.dom4j-jaxen,
org.talend.utils,
org.talend.commons.runtime,
org.talend.common.ui.runtime;visibility:=reexport,
org.talend.libraries.ui;visibility:=reexport,
org.eclipse.ui.workbench
org.talend.common.ui.runtime,
org.talend.libraries.ui,
org.eclipse.ui.workbench,
org.talend.studio.studio-utils,
org.apache.commons.lang3
Eclipse-LazyStart: true
Bundle-Vendor: .Talend SA.
Export-Package: org.talend.commons.ui.command,

View File

@@ -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:

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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);

View File

@@ -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);
}
});
}
}
};
}

View File

@@ -12,6 +12,8 @@
// ============================================================================
package org.talend.commons.ui.swt.dialogs;
import java.util.Map;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.RGB;
import org.talend.commons.ui.utils.image.ColorUtils;
@@ -29,5 +31,7 @@ public interface IConfigModuleDialog {
public String getMavenURI();
public int open();
public Map<String, String> getModulesMVNUrls();
}

View File

@@ -0,0 +1,66 @@
// ============================================================================
//
// 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.swt.dialogs;
import org.talend.commons.ui.runtime.custom.AbsBusinessHandler;
import org.talend.commons.ui.swt.dialogs.ModelSelectionDialog.EEditSelection;
import org.talend.commons.ui.swt.dialogs.ModelSelectionDialog.ESelectionType;
/**
* DOC cmeng class global comment. Detailled comment
*/
public class ModelSelectionBusinessHandler extends AbsBusinessHandler {
private static final String UI_KEY = "ModelSelectionDialog";
private ESelectionType selectionType;
private boolean isReadOnly;
private EEditSelection optionValue;
public ModelSelectionBusinessHandler(ESelectionType selectionType, boolean isReadOnly) {
this.selectionType = selectionType;
this.isReadOnly = isReadOnly;
}
@Override
public String getUiKey() {
return UI_KEY;
}
public ESelectionType getSelectionType() {
return selectionType;
}
public void setSelectionType(ESelectionType selectionType) {
this.selectionType = selectionType;
}
public boolean isReadOnly() {
return isReadOnly;
}
public void setReadOnly(boolean isReadOnly) {
this.isReadOnly = isReadOnly;
}
public EEditSelection getOptionValue() {
return this.optionValue;
}
public void setOptionValue(EEditSelection optionValue) {
this.optionValue = optionValue;
}
}

View File

@@ -62,6 +62,10 @@ public class ModelSelectionDialog extends SelectionDialog {
this(parentShell, selectionType, false);
}
public ModelSelectionDialog(ModelSelectionBusinessHandler handler, Shell parentShell) {
this(parentShell, handler.getSelectionType(), handler.isReadOnly());
}
public ModelSelectionDialog(Shell parentShell, ESelectionType selectionType, boolean isReadOnly) {
super(parentShell);
setHelpAvailable(false);

View File

@@ -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();
}

View File

@@ -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));

View File

@@ -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);
}

View File

@@ -15,8 +15,26 @@ Require-Bundle: org.eclipse.ui,
org.talend.libraries.apache,
org.eclipse.osgi.services,
org.eclipse.ui.navigator,
org.eclipse.e4.ui.css.swt.theme,
org.talend.libraries.jackson
org.talend.libraries.jackson,
org.eclipse.emf.ecore,
org.talend.commons.runtime,
org.eclipse.equinox.common,
org.eclipse.core.jobs,
org.eclipse.core.resources,
org.eclipse.osgi,
org.eclipse.emf.ecore.xmi,
org.eclipse.equinox.registry,
org.talend.common.ui.runtime,
org.talend.cwm.mip,
org.eclipse.swt,
org.talend.studio.studio-utils,
org.eclipse.core.runtime,
org.eclipse.gmf.runtime.notation,
org.talend.utils,
org.apache.commons.lang3,
com.fasterxml.jackson.core.jackson-annotations,
com.fasterxml.jackson.core.jackson-core,
com.fasterxml.jackson.core.jackson-databind
Export-Package: org.talend.core.repository,
org.talend.core.repository.constants,
org.talend.core.repository.document,

View File

@@ -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"

View File

@@ -19,6 +19,8 @@ import org.talend.repository.model.RepositoryConstants;
*/
public interface FileConstants {
String DOT = ".";
String OLD_TALEND_PROJECT_FILENAME = "talendProject"; //$NON-NLS-1$
String LOCAL_PROJECT_FILENAME = "talend.project"; //$NON-NLS-1$
@@ -112,5 +114,4 @@ public interface FileConstants {
String TALEND_FOLDER_NAME = "TALEND-INF"; //$NON-NLS-1$
String MAVEN_FOLDER_NAME = "MAVEN-INF";
}

View File

@@ -175,6 +175,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 +205,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.

View File

@@ -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.

View File

@@ -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
@@ -156,7 +156,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 +175,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 +205,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

View File

@@ -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

View File

@@ -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) {

View File

@@ -27,10 +27,6 @@ import java.util.Set;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Level;
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.talend.commons.exception.ExceptionHandler;
import org.talend.core.ICoreService;
import org.talend.core.PluginChecker;
@@ -39,22 +35,22 @@ import org.talend.core.model.properties.RoutineItem;
import org.talend.core.model.properties.SQLPatternItem;
import org.talend.core.model.repository.ERepositoryObjectType;
import org.talend.core.model.repository.IRepositoryViewObject;
import org.talend.core.pendo.AbstractPendoTrackManager;
import org.talend.core.pendo.PendoDataTrackFactory;
import org.talend.core.pendo.PendoItemSignatureUtil;
import org.talend.core.pendo.PendoItemSignatureUtil.SignatureStatus;
import org.talend.core.pendo.PendoItemSignatureUtil.TOSProdNameEnum;
import org.talend.core.pendo.PendoItemSignatureUtil.ValueEnum;
import org.talend.core.pendo.PendoTrackDataUtil;
import org.talend.core.pendo.PendoTrackDataUtil.TrackEvent;
import org.talend.core.pendo.PendoTrackSender;
import org.talend.core.pendo.TrackEvent;
import org.talend.core.pendo.properties.IPendoDataProperties;
import org.talend.core.pendo.properties.PendoSignLogonProperties;
import org.talend.utils.migration.MigrationTokenUtil;
/**
* DOC jding class global comment. Detailled comment
*/
public class PendoItemSignatureManager {
private PendoSignLogonProperties itemSignProperties = new PendoSignLogonProperties();
public class PendoItemSignatureManager extends AbstractPendoTrackManager {
private static PendoItemSignatureManager manager;
@@ -63,7 +59,7 @@ public class PendoItemSignatureManager {
static {
manager = new PendoItemSignatureManager();
try {
isTrackAvailable = PluginChecker.isTIS() && PendoTrackSender.getInstance().isTrackSendAvailable();
isTrackAvailable = PluginChecker.isTIS() && PendoDataTrackFactory.getInstance().isTrackSendAvailable();
} catch (Exception e) {
ExceptionHandler.process(e, Level.WARN);
}
@@ -87,11 +83,12 @@ public class PendoItemSignatureManager {
}
}
public void collectProperties() {
public IPendoDataProperties collectProperties() {
ICoreService coreService = ICoreService.get();
if (coreService == null || !isTrackAvailable) {
return;
return null;
}
PendoSignLogonProperties itemSignProperties = new PendoSignLogonProperties();
try {
itemSignProperties.setSignByMigration(signByLoginMigrationItems.size());
@@ -188,6 +185,7 @@ public class PendoItemSignatureManager {
} catch (Exception e) {
ExceptionHandler.process(e, Level.WARN);
}
return itemSignProperties;
}
@@ -258,23 +256,12 @@ public class PendoItemSignatureManager {
if (!isTrackAvailable) {
return;
}
Job job = new Job("send pendo track") {
super.sendTrackToPendo();
}
@Override
protected IStatus run(IProgressMonitor monitor) {
try {
collectProperties();
PendoTrackSender.getInstance().sendTrackData(TrackEvent.ITEM_SIGNATURE, itemSignProperties);
} catch (Exception e) {
// warning only
ExceptionHandler.process(e, Level.WARN);
}
return Status.OK_STATUS;
}
};
job.setUser(false);
job.setPriority(Job.INTERACTIVE);
job.schedule();
@Override
public TrackEvent getTrackEvent() {
return TrackEvent.ITEM_SIGNATURE;
}
}

View File

@@ -102,6 +102,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;
@@ -1751,6 +1752,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 +1788,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 +1973,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();

View File

@@ -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);
@@ -2379,11 +2376,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 +2524,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 +2569,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 +2624,7 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
ReferenceProjectProvider.clearTacReferenceList();
ReferenceProjectProblemManager.getInstance().clearAll();
repositoryFactoryFromProvider.logOffProject();
fullLogonFinished = false;
}
@@ -3014,4 +3022,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;
}
}

View File

@@ -1,125 +1,127 @@
// ============================================================================
//
// 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.core.repository.model;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang.ArrayUtils;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.swt.events.SelectionListener;
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
import org.talend.commons.utils.workbench.extensions.ExtensionImplementationProvider;
import org.talend.commons.utils.workbench.extensions.ExtensionPointLimiterImpl;
import org.talend.commons.utils.workbench.extensions.IExtensionPointLimiter;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.ui.branding.IBrandingService;
/**
* Provides, using extension points, implementation of many factories.
*
* <ul>
* <li>IProcessFactory</li>
* </ul>
*
* $Id: RepositoryFactoryProvider.java 38013 2010-03-05 14:21:59Z mhirt $
*/
public class RepositoryFactoryProvider {
private static List<IRepositoryFactory> list = null;
public static final IExtensionPointLimiter REPOSITORY_PROVIDER = new ExtensionPointLimiterImpl(
"org.talend.core.repository.repository_provider", //$NON-NLS-1$
"RepositoryFactory", 1, -1); //$NON-NLS-1$
public static List<IRepositoryFactory> getAvailableRepositories() {
if (list == null) {
list = new ArrayList<IRepositoryFactory>();
List<IConfigurationElement> extension = ExtensionImplementationProvider.getInstanceV2(REPOSITORY_PROVIDER);
String hiddenRepos = System.getProperty("hidden.repositories"); //$NON-NLS-1$
String hiddenRepository[] = new String[]{};
if (hiddenRepos != null) {
hiddenRepository = hiddenRepos.split(";"); //$NON-NLS-1$
}
boolean isPoweredByTalend = false;
IBrandingService brandingService = (IBrandingService) GlobalServiceRegister.getDefault()
.getService(IBrandingService.class);
isPoweredByTalend = brandingService.isPoweredbyTalend();
for (IConfigurationElement current : extension) {
try {
String only4TalendStr = current.getAttribute("only4Talend"); //$NON-NLS-1$
if (Boolean.valueOf(only4TalendStr) && !isPoweredByTalend) {
continue;
}
String only4OemStr = current.getAttribute("only4Oem"); //$NON-NLS-1$
if (Boolean.valueOf(only4OemStr) && isPoweredByTalend) {
continue;
}
IRepositoryFactory currentAction = (IRepositoryFactory) current.createExecutableExtension("class"); //$NON-NLS-1$
currentAction.setId(current.getAttribute("id")); //$NON-NLS-1$
currentAction.setName(current.getAttribute("name")); //$NON-NLS-1$
currentAction.setAuthenticationNeeded(new Boolean(current.getAttribute("authenticationNeeded"))); //$NON-NLS-1$
currentAction.setDisplayToUser(new Boolean(current.getAttribute("displayToUser")).booleanValue()); //$NON-NLS-1$
// Getting dynamic login fields:
for (IConfigurationElement currentLoginField : current.getChildren("loginField")) { //$NON-NLS-1$
DynamicFieldBean key = new DynamicFieldBean(currentLoginField.getAttribute("id"), //$NON-NLS-1$
currentLoginField.getAttribute("name"), //$NON-NLS-1$
currentLoginField.getAttribute("defaultValue"), //$NON-NLS-1$
new Boolean(currentLoginField.getAttribute("required")), //$NON-NLS-1$
new Boolean(currentLoginField.getAttribute("password")), //$NON-NLS-1$
Boolean.valueOf(currentLoginField.getAttribute("readonly"))); //$NON-NLS-1$
currentAction.getFields().add(key);
}
for (IConfigurationElement currentLoginField : current.getChildren("button")) { //$NON-NLS-1$
DynamicButtonBean key = new DynamicButtonBean(currentLoginField.getAttribute("id"), //$NON-NLS-1$
currentLoginField.getAttribute("name"), //$NON-NLS-1$
(SelectionListener) currentLoginField.createExecutableExtension("selectionListener")); //$NON-NLS-1$
currentAction.getButtons().add(key);
}
for (IConfigurationElement currentLoginField : current.getChildren("choiceField")) { //$NON-NLS-1$
DynamicChoiceBean key = new DynamicChoiceBean(currentLoginField.getAttribute("id"), //$NON-NLS-1$
currentLoginField.getAttribute("name")); //$NON-NLS-1$
for (IConfigurationElement currentChoice : currentLoginField.getChildren("choice")) { //$NON-NLS-1$
String value = currentChoice.getAttribute("value"); //$NON-NLS-1$
String label = currentChoice.getAttribute("label"); //$NON-NLS-1$
key.addChoice(value, label);
}
currentAction.getChoices().add(key);
}
if (ArrayUtils.contains(hiddenRepository, currentAction.getId())) {
continue;
}
list.add(currentAction);
} catch (CoreException e) {
// e.printStackTrace();
ExceptionHandler.process(e);
}
}
}
return list;
}
public static IRepositoryFactory getRepositoriyById(String id) {
for (IRepositoryFactory current : getAvailableRepositories()) {
if (current.getId().equals(id)) {
return current;
}
}
return null;
}
}
// ============================================================================
//
// 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.core.repository.model;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang.ArrayUtils;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.swt.events.SelectionListener;
import org.talend.commons.CommonsPlugin;
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
import org.talend.commons.utils.workbench.extensions.ExtensionImplementationProvider;
import org.talend.commons.utils.workbench.extensions.ExtensionPointLimiterImpl;
import org.talend.commons.utils.workbench.extensions.IExtensionPointLimiter;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.ui.branding.IBrandingService;
/**
* Provides, using extension points, implementation of many factories.
*
* <ul>
* <li>IProcessFactory</li>
* </ul>
*
* $Id: RepositoryFactoryProvider.java 38013 2010-03-05 14:21:59Z mhirt $
*/
public class RepositoryFactoryProvider {
private static List<IRepositoryFactory> list = null;
public static final IExtensionPointLimiter REPOSITORY_PROVIDER = new ExtensionPointLimiterImpl(
"org.talend.core.repository.repository_provider", //$NON-NLS-1$
"RepositoryFactory", 1, -1); //$NON-NLS-1$
public static synchronized List<IRepositoryFactory> getAvailableRepositories() {
if (list == null) {
list = new ArrayList<IRepositoryFactory>();
List<IConfigurationElement> extension = ExtensionImplementationProvider.getInstanceV2(REPOSITORY_PROVIDER);
String hiddenRepos = System.getProperty("hidden.repositories"); //$NON-NLS-1$
String hiddenRepository[] = new String[]{};
if (hiddenRepos != null) {
hiddenRepository = hiddenRepos.split(";"); //$NON-NLS-1$
}
boolean isPoweredByTalend = false;
IBrandingService brandingService = (IBrandingService) GlobalServiceRegister.getDefault()
.getService(IBrandingService.class);
isPoweredByTalend = brandingService.isPoweredbyTalend();
for (IConfigurationElement current : extension) {
try {
String only4TalendStr = current.getAttribute("only4Talend"); //$NON-NLS-1$
if (Boolean.valueOf(only4TalendStr) && !isPoweredByTalend) {
continue;
}
String only4OemStr = current.getAttribute("only4Oem"); //$NON-NLS-1$
if (Boolean.valueOf(only4OemStr) && isPoweredByTalend) {
continue;
}
IRepositoryFactory currentAction = (IRepositoryFactory) current.createExecutableExtension("class"); //$NON-NLS-1$
currentAction.setId(current.getAttribute("id")); //$NON-NLS-1$
currentAction.setName(current.getAttribute("name")); //$NON-NLS-1$
currentAction.setAuthenticationNeeded(new Boolean(current.getAttribute("authenticationNeeded"))); //$NON-NLS-1$
currentAction.setDisplayToUser(new Boolean(current.getAttribute("displayToUser")).booleanValue()); //$NON-NLS-1$
// Getting dynamic login fields:
for (IConfigurationElement currentLoginField : current.getChildren("loginField")) { //$NON-NLS-1$
DynamicFieldBean key = new DynamicFieldBean(currentLoginField.getAttribute("id"), //$NON-NLS-1$
currentLoginField.getAttribute("name"), //$NON-NLS-1$
currentLoginField.getAttribute("defaultValue"), //$NON-NLS-1$
new Boolean(currentLoginField.getAttribute("required")), //$NON-NLS-1$
new Boolean(currentLoginField.getAttribute("password")), //$NON-NLS-1$
Boolean.valueOf(currentLoginField.getAttribute("readonly"))); //$NON-NLS-1$
currentAction.getFields().add(key);
}
for (IConfigurationElement currentLoginField : current.getChildren("button")) { //$NON-NLS-1$
DynamicButtonBean key = new DynamicButtonBean(currentLoginField.getAttribute("id"), //$NON-NLS-1$
currentLoginField.getAttribute("name"), //$NON-NLS-1$
(SelectionListener) currentLoginField.createExecutableExtension("selectionListener")); //$NON-NLS-1$
currentAction.getButtons().add(key);
}
for (IConfigurationElement currentLoginField : current.getChildren("choiceField")) { //$NON-NLS-1$
DynamicChoiceBean key = new DynamicChoiceBean(currentLoginField.getAttribute("id"), //$NON-NLS-1$
currentLoginField.getAttribute("name")); //$NON-NLS-1$
for (IConfigurationElement currentChoice : currentLoginField.getChildren("choice")) { //$NON-NLS-1$
String value = currentChoice.getAttribute("value"); //$NON-NLS-1$
String label = currentChoice.getAttribute("label"); //$NON-NLS-1$
key.addChoice(value, label);
}
currentAction.getChoices().add(key);
}
if (ArrayUtils.contains(hiddenRepository, currentAction.getId())) {
continue;
}
list.add(currentAction);
} catch (CoreException e) {
// e.printStackTrace();
ExceptionHandler.process(e);
}
}
}
return list;
}
public static IRepositoryFactory getRepositoriyById(String id) {
for (IRepositoryFactory current : getAvailableRepositories()) {
if (current.getId().equals(id)) {
return current;
}
}
ExceptionHandler.log("Can't find repository factory for: " + id);
return null;
}
}

View File

@@ -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)) {

View File

@@ -15,25 +15,22 @@ package org.talend.core.repository.ui.view;
import java.util.HashMap;
import java.util.Map;
import org.eclipse.core.runtime.Platform;
import org.eclipse.e4.ui.css.swt.theme.ITheme;
import org.eclipse.e4.ui.css.swt.theme.IThemeEngine;
import org.eclipse.e4.ui.css.swt.theme.IThemeManager;
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.eclipse.ui.PlatformUI;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
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;
@@ -58,7 +55,6 @@ import org.talend.core.model.repository.IRepositoryViewObject;
import org.talend.core.model.repository.RepositoryContentManager;
import org.talend.core.model.repository.RepositoryNodeProviderRegistryReader;
import org.talend.core.model.repository.RepositoryViewObject;
import org.talend.core.repository.CoreRepositoryPlugin;
import org.talend.core.repository.model.ProxyRepositoryFactory;
import org.talend.core.repository.model.repositoryObject.MetadataTableRepositoryObject;
import org.talend.core.runtime.CoreRuntimePlugin;
@@ -87,18 +83,22 @@ 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);
private static final Color WHITE = new Color(null, 255, 255, 255);
private IRepositoryView view;
private static boolean refreshProperty = true;
@@ -112,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());
@@ -492,40 +504,15 @@ public class RepositoryLabelProvider extends LabelProvider implements IColorProv
@Override
public Color getForeground(Object element) {
RepositoryNode node = (RepositoryNode) element;
try {
Bundle bundle = Platform.getBundle(CoreRepositoryPlugin.PLUGIN_ID);
BundleContext context = bundle.getBundleContext();
ServiceReference ref = context.getServiceReference(IThemeManager.class.getName());
IThemeManager manager = (IThemeManager) context.getService(ref);
IThemeEngine engine = manager
.getEngineForDisplay(PlatformUI.getWorkbench().getActiveWorkbenchWindow() == null ? Display.getCurrent()
: PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell().getDisplay());
ITheme curTheme = engine.getActiveTheme();
if (curTheme.getId().contains("dark")) {
return null;
}
} catch (Exception ex) {
ex.printStackTrace();
}
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()
@@ -537,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();
}
}
}
@@ -563,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();
}
}
}
});
}
}
};
}
}

View File

@@ -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);

View File

@@ -48,6 +48,8 @@ import org.talend.commons.runtime.model.emf.provider.EmfResourcesFactoryReader;
*/
public class TalendResourceSet extends ResourceSetImpl {
private boolean showLog;
public TalendResourceSet() {
super();
@@ -58,6 +60,14 @@ public class TalendResourceSet extends ResourceSetImpl {
getLoadOptions().put(XMLResource.OPTION_USE_DEPRECATED_METHODS, Boolean.FALSE);
}
public boolean isShowLog() {
return this.showLog;
}
public void setShowLog(boolean showLog) {
this.showLog = showLog;
}
/*
* (non-Javadoc)
*
@@ -83,7 +93,13 @@ public class TalendResourceSet extends ResourceSetImpl {
Resource resource = map.get(uri);
if (resource != null) {
if (loadOnDemand && !resource.isLoaded()) {
demandLoadHelper(resource);
try {
demandLoadHelper(resource);
} catch (Exception e) {
if (showLog) {
throw new RuntimeException(e);
}
}
}
return resource;
}
@@ -99,7 +115,13 @@ public class TalendResourceSet extends ResourceSetImpl {
}
if (theURIConverter.normalize(resource.getURI()).equals(normalizedURI)) {
if (loadOnDemand && !resource.isLoaded()) {
demandLoadHelper(resource);
try {
demandLoadHelper(resource);
} catch (Exception e) {
if (showLog) {
throw new RuntimeException(e);
}
}
}
if (map != null) {
@@ -125,7 +147,13 @@ public class TalendResourceSet extends ResourceSetImpl {
+ "'; a registered resource factory is needed");
}
demandLoadHelper(resource);
try {
demandLoadHelper(resource);
} catch (Exception e) {
if (showLog) {
throw new RuntimeException(e);
}
}
if (map != null) {
map.put(uri, resource);

View File

@@ -349,7 +349,7 @@ public class XmiResourceManager {
return itemResource;
}
public Resource createItemResource(boolean byteArrayResource, URI itemResourceURI) {
private Resource createItemResource(boolean byteArrayResource, URI itemResourceURI) {
Resource itemResource;
itemResource = getResourceSet().getResource(itemResourceURI, false);
if (itemResource != null) {
@@ -390,6 +390,10 @@ public class XmiResourceManager {
}
public Resource getItemResource(ResourceSet resourceSet, Item item, boolean forceLoad) {
return getItemResource(getResourceSet(), item, forceLoad, false);
}
public Resource getItemResource(ResourceSet resourceSet, Item item, boolean forceLoad, boolean showLog) {
if (item == null) {
return null;
}
@@ -402,13 +406,23 @@ public class XmiResourceManager {
} else {
itemResourceURI = getItemResourceURI(getItemURI(item));
}
Resource itemResource = resourceSet.getResource(itemResourceURI, false);
if (forceLoad && itemResource == null) {
if (item instanceof FileItem) {
itemResource = new ByteArrayResource(itemResourceURI);
resourceSet.getResources().add(itemResource);
Resource itemResource = null;
try {
if (resourceSet instanceof TalendResourceSet) {
((TalendResourceSet) resourceSet).setShowLog(showLog);
}
itemResource = resourceSet.getResource(itemResourceURI, false);
if (forceLoad && itemResource == null) {
if (item instanceof FileItem) {
itemResource = new ByteArrayResource(itemResourceURI);
resourceSet.getResources().add(itemResource);
}
itemResource = resourceSet.getResource(itemResourceURI, true);
}
} catch (Exception e) {
if (showLog) {
throw new RuntimeException(e);
}
itemResource = resourceSet.getResource(itemResourceURI, true);
}
return itemResource;
}
@@ -628,7 +642,7 @@ public class XmiResourceManager {
boolean isTestContainer = false;
if (GlobalServiceRegister.getDefault().isServiceRegistered(ITestContainerProviderService.class)) {
ITestContainerProviderService testContainerService = (ITestContainerProviderService) GlobalServiceRegister
ITestContainerProviderService testContainerService = GlobalServiceRegister
.getDefault().getService(ITestContainerProviderService.class);
if (testContainerService != null) {
isTestContainer = testContainerService.isTestContainerItem(property.getItem());

View File

@@ -2,10 +2,12 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Core Runtime Plug-in
Bundle-SymbolicName: org.talend.core.runtime;singleton:=true
Automatic-Module-Name: org.talend.core.runtime
Bundle-Version: 8.8.8.qualifier
Bundle-Localization: plugin
Bundle-Vendor: .Talend SA.
Export-Package: org.talend.analysistask,
Export-Package: org.json.simple,
org.talend.analysistask,
org.talend.commons.utils.generation,
org.talend.commons.utils.io,
org.talend.commons.utils.workbench.resources,
@@ -117,11 +119,11 @@ Require-Bundle: org.eclipse.jdt.core,
org.apache.commons.lang,
org.apache.log4j,
org.talend.model,
org.talend.utils;visibility:=reexport,
org.talend.utils,
org.talend.libraries.dom4j-jaxen,
org.talend.libraries.csv,
org.talend.libraries.apache.http,
org.talend.commons.runtime;visibility:=reexport,
org.talend.commons.runtime,
org.talend.commons.ui,
org.ops4j.pax.url.mvn,
org.talend.components.api,
@@ -129,7 +131,21 @@ Require-Bundle: org.eclipse.jdt.core,
jackson-core-asl,
org.talend.libraries.jackson,
org.eclipse.m2e.core,
org.talend.libraries.apache.common
org.talend.libraries.apache.common,
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
Bundle-Activator: org.talend.core.runtime.CoreRuntimePlugin
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .,
@@ -138,3 +154,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

View File

@@ -22,7 +22,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/,\

View 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>

View File

@@ -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>

View File

@@ -0,0 +1,59 @@
# 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
# 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
# BigData distribution
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_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

View File

@@ -33,6 +33,13 @@ public class AnalysisReportRecorder extends ItemReportRecorder {
this.detailMessage = detailMessage;
}
public AnalysisReportRecorder(IItemAnalysisTask task, SeverityOption severity, String detailMessage) {
super();
this.task = task;
this.severity = severity;
this.detailMessage = detailMessage;
}
public String getTaskName() {
return task.getName();
}

View File

@@ -0,0 +1,43 @@
// ============================================================================
//
// 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.analysistask;
import java.util.List;
import java.util.Set;
import org.talend.core.model.properties.Item;
import org.talend.core.model.repository.ERepositoryObjectType;
/**
* created by hcyi on Oct 26, 2022
* Detailled comment
*
*/
public class DefaultItemsAnalysisTask extends AbstractItemAnalysisTask {
public DefaultItemsAnalysisTask() {
}
@Override
public Set<ERepositoryObjectType> getRepositoryObjectTypeScope() {
return null;
}
@Override
public List<AnalysisReportRecorder> execute(Item item) {
// TODO Auto-generated method stub
return null;
}
}

View File

@@ -20,6 +20,7 @@ import java.util.List;
import java.util.Set;
import java.util.concurrent.atomic.AtomicBoolean;
import org.apache.commons.lang.StringUtils;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
@@ -50,7 +51,9 @@ import org.talend.core.model.general.Project;
import org.talend.core.model.properties.Item;
import org.talend.core.model.repository.ERepositoryObjectType;
import org.talend.core.model.repository.IRepositoryViewObject;
import org.talend.core.runtime.CoreRuntimePlugin;
import org.talend.core.runtime.i18n.Messages;
import org.talend.designer.core.IDesignerCoreService;
import org.talend.repository.ProjectManager;
import org.talend.repository.model.IProxyRepositoryFactory;
import org.talend.repository.model.IRepositoryService;
@@ -73,7 +76,7 @@ public class ItemAnalysisReportManager {
private AtomicBoolean inGenerating = new AtomicBoolean(false);
public List<AnalysisReportRecorder> executeAnalysisTask(Project project) {
IRepositoryService service = (IRepositoryService) GlobalServiceRegister.getDefault().getService(IRepositoryService.class);
IRepositoryService service = GlobalServiceRegister.getDefault().getService(IRepositoryService.class);
IProxyRepositoryFactory repFactory = service.getProxyRepositoryFactory();
List<AnalysisReportRecorder> analysisResultList = new ArrayList<AnalysisReportRecorder>();
List<IItemAnalysisTask> analysisTasks = ItemAnalysisTaskRegistryReader.getInstance().getItemAnalysisTasks();
@@ -105,6 +108,16 @@ public class ItemAnalysisReportManager {
}
}
}
//
ItemAnalysisTaskRegistryReader.getInstance().getAllItemURIsMap().clear();
ItemAnalysisTaskRegistryReader.getInstance().getDuplicatedItemURIsMap().clear();
IDesignerCoreService designerCoreService = CoreRuntimePlugin.getInstance().getDesignerCoreService();
if (designerCoreService != null) {
List<AnalysisReportRecorder> recorder = designerCoreService.analysis(project);
if (recorder != null && !recorder.isEmpty()) {
analysisResultList.addAll(recorder);
}
}
} catch (Exception e) {
ExceptionHandler.process(e);
}
@@ -190,6 +203,42 @@ public class ItemAnalysisReportManager {
inGenerating.set(newValue);
}
public String getCompleteObjectTypePath(ERepositoryObjectType itemType) {
ERepositoryObjectType rootItemType = itemType;
if (ERepositoryObjectType.JDBC != null && ERepositoryObjectType.JDBC.equals(rootItemType)) {
rootItemType = ERepositoryObjectType.METADATA_CONNECTIONS;
}
List<String> typeLabels = new ArrayList<String>();
findOutCompleteTypePath(rootItemType, typeLabels);
if (ERepositoryObjectType.PROCESS != null && ERepositoryObjectType.PROCESS.equals(rootItemType)) {
IRepositoryService repositoryService = IRepositoryService.get();
if (repositoryService != null) {
String standardNodeLabel = repositoryService.getStandardNodeLabel();
if (StringUtils.isNotBlank(standardNodeLabel)) {
typeLabels.add(standardNodeLabel);
}
}
}
StringBuffer buffer = new StringBuffer();
if (!typeLabels.isEmpty()) {
for (int i = 0; i < typeLabels.size(); i++) {
if (i != 0) {
buffer.append("/");
}
buffer.append(typeLabels.get(i));
}
}
return buffer.toString();
}
public void findOutCompleteTypePath(ERepositoryObjectType type, List<String> typeLabels) {
ERepositoryObjectType parentType = ERepositoryObjectType.findParentType(type);
if (parentType != null) {
findOutCompleteTypePath(parentType, typeLabels);
}
typeLabels.add(type.getLabel());
}
}
class AnalysisReportAccessDialog extends Dialog {

Some files were not shown because too many files have changed in this diff Show More