Compare commits

...

80 Commits

Author SHA1 Message Date
Svitlana Ponomarova
14950f3b50 fix 2024-01-31 12:22:14 +02:00
Svitlana Ponomarova
ae71aef181 fix 2024-01-31 11:46:47 +02:00
Svitlana Ponomarova
c398d16dc7 fix(TBD-15940): cleanup Impala wizard 2024-01-31 10:21:56 +02:00
kjwang
46027749f3 Add tacokit metadata migration task (#6747)
TUP-41447 TCK migration issues
https://jira.talendforge.org/browse/TUP-41447
2024-01-31 14:20:14 +08:00
Jane Ding
7fe2e8be48 fix(TUP-41534):Remove dependency on pendo related API during logon (#6730)
process
https://jira.talendforge.org/browse/TUP-41534
2024-01-29 16:14:50 +08:00
jiezhang-tlnd
5b80d8dc36 80 loc fr fr 2024 01 25 04 02 (#6756)
* Add localized files (#6753)

Co-authored-by: build-talend-doc <build-talend-doc@talend.com>

* Add localized files (#6754)

Co-authored-by: build-talend-doc <build-talend-doc@talend.com>

---------

Co-authored-by: Alexiane Yvonet <ayvonet@talend.com>
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2024-01-29 10:14:05 +08:00
Zhiwei Xue
97efd263bf fix(TUP-41688):Talend Studio 8.0.1 / Java 17 / Memory Run : Searching (#6751)
the active JVM of current job / there is no job running
2024-01-29 10:09:37 +08:00
bhe-talendbj
7ed11666dd fix(TUP-41122): fix aether proxy selector (#6603) 2024-01-23 15:54:31 +08:00
sbliu
441a27dbbd fix(TUP-41099) Author path not updated for all items when moved as group (#6634)
* fix(TUP-41099) Author path not updated for all items when moved as group

* add junit to check if relation ship is keep correct after move multi object as group

* adjust test
2024-01-22 18:13:34 +08:00
bhe-talendbj
24c7e20234 fix(TUP-41640): correct token url for custom cloud (#6732) 2024-01-22 18:04:39 +08:00
jiezhang-tlnd
394d74ff56 Jzhang/80/tup 41557 (#6726)
* chore(TUP-41557)sqlite-jdbc:3.40.0.0 | CVE-2023-32697

* chore(TUP-41557)sqlite-jdbc:3.40.0.0 | CVE-2023-32697

* add slf4j api
2024-01-22 17:06:25 +08:00
Zhiwei Xue
1bc51409c4 fix(TUP-41397):Issue when set a reference project (#6721) 2024-01-22 09:34:20 +08:00
jiezhang-tlnd
c319fa2b6e Add localized files (#6734) (#6741)
Co-authored-by: Toshi Sasada <51699524+tsasada-talend@users.noreply.github.com>
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2024-01-19 19:38:31 +08:00
kjwang
0075eeedb1 Fix TUP-40846 Error shows after import items if workspace path contains (#6697)
Fix TUP-40846 Error shows after import items if workspace path contains Special char "!% "
https://jira.talendforge.org/browse/TUP-40846
2024-01-19 09:41:30 +08:00
Zhiwei Xue
21955ee445 feat(TUP-41073):Block the update if studio is not compatible (#6710)
* feat(TUP-41073):Block the update if studio is not compatible

* feat(TUP-41073):fix feature adapt and block commandline
2024-01-15 16:36:32 +08:00
Zhiwei Xue
fe81245083 Revert "feat(TUP-41073):Block the update if studio is not compatible (#6710)"
This reverts commit 94bfffa01d.
2024-01-15 16:35:12 +08:00
Zhiwei Xue
94bfffa01d feat(TUP-41073):Block the update if studio is not compatible (#6710)
* feat(TUP-41073):Block the update if studio is not compatible

* feat(TUP-41073):fix feature adapt and block commandline
2024-01-15 16:17:05 +08:00
jiezhang-tlnd
0162ddf86f Add localized files (#6720) (#6725)
Co-authored-by: Toshi Sasada <51699524+tsasada-talend@users.noreply.github.com>
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2024-01-12 17:48:54 +08:00
bhe-talendbj
4be615ad4c fix(TUP-41511): throw exception (#6719) 2024-01-12 15:06:00 +08:00
msjian
77ee619152 chore(TDQ-21713): improve code to fix NPE (#6717) 2024-01-10 18:29:04 +08:00
Jane Ding
feb8e81628 feat(TUP-36992):Set max-width for Context column in Studio (#6601)
* feat(TUP-40408):Context view improvement research
https://jira.talendforge.org/browse/TUP-40408

* feat(TUP-40408):Context view improvement research
https://jira.talendforge.org/browse/TUP-40408

* feat(TUP-40408):Context view improvement research
https://jira.talendforge.org/browse/TUP-40408

* feat(TUP-36992):Set max-width for Context column in Studio
https://jira.talendforge.org/browse/TUP-36992

* feat(TUP-36992):Set max-width for Context column in Studio
https://jira.talendforge.org/browse/TUP-36992

* feat(TUP-36992):Set max-width for Context column in Studio
https://jira.talendforge.org/browse/TUP-36992

* feat(TUP-36992):Set max-width for Context column in Studio
https://jira.talendforge.org/browse/TUP-36992

* feat(TUP-36992):Set max-width for Context column in Studio
https://jira.talendforge.org/browse/TUP-36992

* feat(TUP-36992):Set max-width for Context column in Studio
https://jira.talendforge.org/browse/TUP-36992

* feat(TUP-36992):Set max-width for Context column in Studio
https://jira.talendforge.org/browse/TUP-36992

* feat(TUP-36992):Set max-width for Context column in Studio
https://jira.talendforge.org/browse/TUP-36992
2024-01-10 17:20:31 +08:00
bhe-talendbj
472b999612 fix(TUP-40092): Uncommitted changes available on all branches (#6594)
* fix(TUP-40092): add new field to ExceptionMessageDialog

* fix(TUP-40092): add new method
2024-01-10 16:31:35 +08:00
Emmanuel GALLOIS
f924a19f7d feat(TDI-50675): bump component-runtime to 1.63.0 (#6660) 2024-01-09 11:22:25 +01:00
wang wei
8ca4df75ea fix(TDI-50707): Still missing java options with JDK 17 for tRESTClient (#6699) 2024-01-08 18:14:05 +08:00
sbliu
9e04aa1fd4 chore(TUP-40453) upgrade avro in tck (#6708) 2024-01-08 15:25:52 +08:00
kjwang
ed7375ea82 Fix TUP-41299 Cannot connect to Oracle with patch R2023-11 (#6648)
* Fix TUP-41299 Cannot connect to Oracle with patch R2023-11
https://jira.talendforge.org/browse/TUP-41299
2024-01-08 11:50:00 +08:00
msjian
5ce7b0d702 fix(TDQ-21713): fix failed junit (#6705) 2024-01-07 14:19:57 +08:00
msjian
127573adc5 fix fail junit (#6703) 2024-01-06 11:11:52 +08:00
msjian
96abfedf4c fix(TDQ-21713): fix one failed junit (#6701) 2024-01-05 14:58:51 +08:00
hzhao
b19d7c550d fix(TUP-41404): dummy change to update the plugin timestamp # (#6698) 2024-01-04 16:15:03 +08:00
bhe-talendbj
6eec1e24d1 fix(TUP-41391): Always pop up workspace has been changed when start studio (#6689)
* fix(TUP-41391): initialized workspace too early

* fix(TUP-41391): initialized workspace too early
2024-01-03 16:46:07 +08:00
zyuan-talend
7a5fb399ec fix(TUP-41242):Clean up the call of studio registration service. (#6638) 2024-01-03 10:07:20 +08:00
msjian
f7bebc1efe fix(TDQ-21668): fix generate ThresholdViolationAlert job failed when jdk17 (#6676) 2023-12-29 18:10:00 +08:00
msjian
4e50edcff1 fix(TDQ-21713): ignore ".gitkeep" file under the git remote project's folders(#6687) 2023-12-29 15:29:38 +08:00
hcyi
4cf6b6277f fix(TUP-41106):Track shared mode with data collector. (#6672)
* fix(TUP-41106):Track shared mode with data collector.

* fix(TUP-41106):Track Enable Java 17 compatibility with data collector.
2023-12-29 15:09:22 +08:00
hcyi
f964d20a63 fix(TUP-41082):Track projects with Java 17 enabled. (#6651) 2023-12-28 18:06:18 +08:00
jiezhang-tlnd
8225e6fa05 chore(TUP-39612)bcprov-jdk15on:1.70 | CVE-2023-33201 (#6559) 2023-12-28 11:16:12 +08:00
Dmytro Sylaiev
9e918597a3 fix(TDI-50700): Fix httpclient for java 17 (#6662) 2023-12-26 13:07:08 +02:00
zyuan-talend
825a4634d5 fix(TUP-41256):Update jars linked to EDI component. (#6670) 2023-12-26 18:45:48 +08:00
msjian
e0b36d539d Revert "fix(TDQ-21668): fix generate job ThresholdViolationAlert fail when jdk17 (#6622)" (#6678)
This reverts commit afc3c0c57e.
2023-12-26 18:44:16 +08:00
sbliu
2f7fcb839c fix(TUP-41009) data view failed for tacokit data connection (#6654) 2023-12-26 14:19:11 +08:00
bhe-talendbj
4810bd8cda fix(TUP-41249): update manifest timestamp (#6665) (#6666)
* fix(TUP-41249): update manifest timestamp

* fix(TUP-41249): update type of time
2023-12-22 19:55:32 +08:00
Jane Ding
b2173b2707 Add localized files (#6656) (#6659)
Co-authored-by: Toshi Sasada <51699524+tsasada-talend@users.noreply.github.com>
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-12-21 17:38:45 +08:00
hzhao
30643242a4 fix(TUP-40887): Mac Sonoma issue with image flipped (#6639)
* fix(TUP-40887): Mac Sonoma issue with image flipped

* fix(TUP-40887): Mac Sonoma issue with image flipped

* fix(TUP-40887): Mac Sonoma issue with image flipped

* fix(TUP-40887): Mac Sonoma issue with image flipped

* fix(TUP-40887):  try remove listener

* fix(TUP-40887): add back resourceDisposeListener

* fix(TUP-40887): Mac Sonoma issue with image flipped
2023-12-21 10:42:03 +08:00
sbliu
eea308c852 chore(TUP-40457) Errors in CommandLine log file (#6585) 2023-12-21 10:03:52 +08:00
hzhao
482dab62dc fix(TUP-41133): Display row number displayed as 0 after click some (#6637)
* fix(TUP-41133): Display row number displayed as 0 after click some
buttons in schema of tDBOutput

* fix(TUP-41133): refresh for paste action
2023-12-19 18:52:28 +08:00
bhe-talendbj
e9fb0a7d70 chore(TUP-40916): Studio issues if Java version is > Java 17 (#6572)
* chore(TUP-40916): update error message

* chore(TUP-40916): update error message

* chore(TUP-40916): exit studio if validate java version error

* chore(TUP-40916): exit studio if validate java version error

* chore(TUP-40916): update error messages

* chore(TUP-40916): update error messages

* chore(TUP-40916): validate java complier's compliance level

* chore(TUP-40916): update message

* chore(TUP-40916): update message
2023-12-18 14:55:27 +08:00
bhe-talendbj
962800e16b fix(TUP-41020): LDAP Metadata : Check Authentication fails when Encryption method = LDAPS(SSL) even with correct credentials. (#6590)
* fix(TUP-41020): init default trust manager if can not find cacert path

* fix(TUP-41020): add junit test
2023-12-18 10:09:48 +08:00
Jane Ding
c605b5cf6e fix(TUP-40871):Import dependencies will not calculate the context (#6587)
* fix(TUP-40871):Import dependencies will not calculate the context
dependent for db connection
https://jira.talendforge.org/browse/TUP-40871

* fix(TUP-40871):Import dependencies will not calculate the context
dependent for db connection
https://jira.talendforge.org/browse/TUP-40871
2023-12-18 09:59:47 +08:00
bhe-talendbj
50facdd03d fix(TUP-41249): correct allowed seconds for pat (#6631) 2023-12-13 17:41:12 +08:00
kjwang
0d3ad601ab TUP-41174 old version of Teradata related jars download fail (#6629)
* TUP-41174 old version of Teradata related jars download fail (Add junit)
https://jira.talendforge.org/browse/TUP-41174
2023-12-12 17:50:08 +08:00
apoltavtsev
4851f670d6 APPINT-36161: Correct build type for child Route job (#6619) 2023-12-11 09:23:59 +01:00
msjian
afc3c0c57e fix(TDQ-21668): fix generate job ThresholdViolationAlert fail when jdk17 (#6622) 2023-12-11 16:07:24 +08:00
kjwang
5cc4ddbcf2 Fix TUP-41174 old version of Teradata related jars download fail (#6620) (#6626)
* Fix TUP-41174 old version of Teradata related jars download fail
https://jira.talendforge.org/browse/TUP-41174
2023-12-11 15:54:37 +08:00
bhe-talendbj
646c80fec6 chore(TUP-41184): correct maven repository id (#6624) 2023-12-11 15:43:27 +08:00
Zhiwei Xue
7f5e7c70b3 fix(TUP-41154):TcompV0 metadata refresh issue when only parts feature (#6609)
installed
2023-12-08 18:21:04 +08:00
sbliu
3a196a0095 Revert "fix(TUP-41057) add dnd support for dynamic setting's tableviewer (#6592)" (#6614)
This reverts commit 2019954122.
2023-12-08 17:02:05 +08:00
Jane Ding
b571bef976 Add localized files (#6606) (#6616)
Co-authored-by: Toshi Sasada <51699524+tsasada-talend@users.noreply.github.com>
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-12-08 16:03:18 +08:00
kjwang
67ef82fede Fix TUP-41144 Unknown dbmsId: 'null' "show when open component tDBInput (#6604)
Fix TUP-41144 Unknown dbmsId: 'null' "show when open component tDBInput with jdbc db2 migrated from 73
https://jira.talendforge.org/browse/TUP-41144
2023-12-07 16:52:58 +08:00
Chao MENG
9adc6b7634 fix(TUP-40481): commandline can't connect to the proxy defined on maven jvm.arguments (#6560)
* fix(TUP-40481): commandline can't connect to the proxy defined on maven
jvm.arguments
https://jira.talendforge.org/browse/TUP-40481

* fix(TUP-40481): commandline can't connect to the proxy defined on maven
jvm.arguments
https://jira.talendforge.org/browse/TUP-40481

* fix(TUP-40481): commandline can't connect to the proxy defined on maven
jvm.arguments
https://jira.talendforge.org/browse/TUP-40481

avoid password print from eclipse

* fix(TUP-40481): commandline can't connect to the proxy defined on maven
jvm.arguments
https://jira.talendforge.org/browse/TUP-40481

avoid password print from eclipse

* fix(TUP-40481): commandline can't connect to the proxy defined on maven
jvm.arguments
https://jira.talendforge.org/browse/TUP-40481

avoid password print from eclipse
2023-12-07 16:12:41 +08:00
zyuan-talend
214f47d0d1 fix(TUP-41046):link some GAV to some license. (#6602) 2023-12-07 15:52:18 +08:00
msjian
835f89e891 fix(TDQ-21624): code refactor and fix tck jdbc DQ dependency update (#6584)
* fix(TDQ-21563): fix tck jdbc notifyDQSQLExplorer

* fix(TDQ-21562): fix add driver twice when import the project from login
2023-12-05 09:58:32 +08:00
zyuan-talend
4bdc3703c3 fix(TUP-40250):Replace GAV from org.talend.libraries with official GAV (#6420)
* fix(TUP-40250):Replace GAV from org.talend.libraries with official GAV.

* fix(TUP-40590): Type in mvn uri has higher priority than pom.xml.
2023-12-04 16:52:21 +08:00
jiezhang-tlnd
ebfa988a4f Revert "feat(TUP-39520)Deprecate AS400 CDC / RUNCDC (#6289)" (#6553)
This reverts commit 4a7a831c77.
2023-12-04 14:22:09 +08:00
sbliu
2019954122 fix(TUP-41057) add dnd support for dynamic setting's tableviewer (#6592) 2023-12-04 11:36:45 +08:00
sbliu
7c75d23ae8 chore(TUP-40453) upgrade avro from 1.11.2 to 1.11.3 (#6543) 2023-11-30 17:26:19 +08:00
Jane Ding
6d12874f4d Add localized files (#6595) (#6596)
Co-authored-by: Toshi Sasada <51699524+tsasada-talend@users.noreply.github.com>
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-11-30 17:15:12 +08:00
jiezhang-tlnd
24ea68ce97 fix(TUP-29006)The attached db connection file can be imported as new (#6579)
* fix(TUP-29006)The attached db connection file can be imported as new
each time.
https://jira.talendforge.org/browse/TUP-29006

* fix(TUP-29006)The attached db connection file can be imported as new
each time
https://jira.talendforge.org/browse/TUP-29006
2023-11-27 09:26:13 +08:00
Zhiwei Xue
5aabff0e3d fix(TUP-40701):[bug] the directory structure display incorrect after (#6565)
delete to recycle bin
2023-11-23 17:45:02 +08:00
Jane Ding
6172fe622c Add localized files (#6582)
* Add localized files (#6578)

Co-authored-by: build-talend-doc <build-talend-doc@talend.com>

* Add localized files (#6580)

Co-authored-by: build-talend-doc <build-talend-doc@talend.com>

---------

Co-authored-by: Alexiane Yvonet <ayvonet@talend.com>
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
Co-authored-by: Toshi Sasada <51699524+tsasada-talend@users.noreply.github.com>
2023-11-23 17:43:17 +08:00
Jane Ding
4b678206df fix(TUP-40721):SAP Context issue - Additional Properties (#6538)
* fix(TUP-40721):SAP Context issue - Additional Properties
https://jira.talendforge.org/browse/TUP-40721

* fix(TUP-40721):SAP Context issue - Additional Properties
https://jira.talendforge.org/browse/TUP-40721
2023-11-23 17:06:08 +08:00
jzhao
d3c9eff9c5 fix(TDI-50399): Json:20230227 | CVE-2023-5072 (#6568) 2023-11-22 17:02:16 +08:00
bhe-talendbj
b91ac54c40 feat(TUP-39181): Force PAT rotation on Studio login (#6546)
* feat(TUP-39181): initial impl

* feat(TUP-39181): need to block fetching license if old PAT

* feat(TUP-39181): need to block fetching license if old PAT

* feat(TUP-39181): need to block fetching license if old PAT
2023-11-22 09:32:20 +08:00
Jane Ding
ff3cee4aab Add localized files (#6570) (#6571)
Co-authored-by: Alexiane Yvonet <ayvonet@talend.com>
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-11-16 16:58:23 +08:00
kjwang
7798616c46 Fix TUP-40878 Add validation rule for jdbc db (#6563)
Fix TUP-40878 Add validation rule for jdbc db schema throw NPE when try to select a
reference table.
https://jira.talendforge.org/browse/TUP-40878
2023-11-15 16:20:08 +08:00
apoltavtsev
63f2485928 APPINT-35996: "Setup custom scripts by folder" does not work in Studio for a Route folder (#6502) 2023-11-14 09:25:39 +01:00
kjwang
b34075c36a TUP-40710 TCK-JDBC Dynamic setting view (#6536)
TUP-40710 TCK-JDBC Dynamic setting view
https://jira.talendforge.org/browse/TUP-40710
2023-11-13 17:58:38 +08:00
msjian
2d59042cfe chore(TDQ-21220): Remove useless MDM code (#6552) 2023-11-13 15:37:26 +08:00
Jane Ding
60022731f3 Add localized files (#6545) (#6550)
Co-authored-by: Toshi Sasada <51699524+tsasada-talend@users.noreply.github.com>
Co-authored-by: build-talend-doc <build-talend-doc@talend.com>
2023-11-13 14:20:01 +08:00
Zhiwei Xue
501e024c54 fix(TUP-40742):fix junit failure (#6548) 2023-11-10 11:01:33 +08:00
146 changed files with 2293 additions and 2070 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 B

View File

@@ -40,6 +40,8 @@ public class ExceptionMessageDialog extends MessageDialog {
private String exceptionString = null;
private int[] diabledButtonIndex = new int[] {};
private boolean expandedOnOpen = false;
public ExceptionMessageDialog(Shell parentShell, String dialogTitle, Image dialogTitleImage, String dialogMessage,
int dialogImageType, String[] dialogButtonLabels, int defaultIndex, Throwable ex) {
@@ -85,6 +87,8 @@ public class ExceptionMessageDialog extends MessageDialog {
text.setText(exceptionString);
text.setEditable(false);
errorComposite.setClient(text);
errorComposite.setExpanded(expandedOnOpen);
return errorComposite;
}
@@ -150,6 +154,22 @@ public class ExceptionMessageDialog extends MessageDialog {
this.exceptionString = exceptionString;
}
/**
* @return the expandedOnOpen
*/
public boolean isExpandedOnOpen() {
return expandedOnOpen;
}
/**
* @param expandedOnOpen the expandedOnOpen to set
*/
public void setExpandedOnOpen(boolean expandedOnOpen) {
this.expandedOnOpen = expandedOnOpen;
}
public void setDisabledButtons(int[] index) {
this.diabledButtonIndex = index;
}

View File

@@ -15,7 +15,7 @@ ColorStyledText.SelectAllItem.Text=\u3059\u3079\u3066\u9078\u629E
ContentProposalAdapterExtended.close=\u9589\u3058\u308B
ContentProposalAdapterExtended.closeFocusout=\u30D5\u30A9\u30FC\u30AB\u30B9\u30A2\u30A6\u30C8\u3092\u9589\u3058\u308B
ControlUtils.Unsupported1=\u3053\u306E\u30B3\u30F3\u30C8\u30ED\u30FC\u30EB({0})\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u5FC5\u8981\u3067\u3042\u308C\u3070\u3001\u30B1\u30FC\u30B9\u3092\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044...
CopyPushButton.CopyButton.Tip=\u9078\u629E\u3057\u305F\u30A2\u30A4\u30C6\u30E0\u3092\u30B3\u30D4\u30FC
CopyPushButton.CopyButton.Tip=\u9078\u629E\u9805\u76EE\u3092\u30B3\u30D4\u30FC
Curve2D.MaxNum.Be0=maximumSegments\u306F\u6B63\u6570\u304B0\u306B\u3057\u3066\u304F\u3060\u3055\u3044
Curve2D.MinNum.Be0=minimumSegments\u306F\u6B63\u6570\u307E\u305F\u306F0\u306B\u3057\u3066\u304F\u3060\u3055\u3044
DateDialog.textContent=\u65E5\u6642\u3092\u9078\u629E

View File

@@ -39,6 +39,7 @@ public enum EImage implements IImage {
EDIT_ICON("/icons/write_obj.gif"), //$NON-NLS-1$
READ_ICON("/icons/read_obj.gif"), //$NON-NLS-1$
WRAP_ICON("/icons/wrap.png"), //$NON-NLS-1$
QUESTION_ICON("/icons/question.gif"), //$NON-NLS-1$
HELP_ICON("/icons/help.png"), //$NON-NLS-1$
MOREINFO_ICON("/icons/moreInfo.png"), //$NON-NLS-1$

View File

@@ -23,10 +23,19 @@ public class FatalException extends RuntimeException {
@SuppressWarnings("unused")//$NON-NLS-1$
private static final long serialVersionUID = 1L;
public static final int CODE_INCOMPATIBLE_UPDATE = 10;
private int code;
public FatalException(String message, Throwable cause) {
super(message, cause);
}
public FatalException(int code, String message) {
super(message);
this.code = code;
}
public FatalException(String message) {
super(message);
}
@@ -34,4 +43,9 @@ public class FatalException extends RuntimeException {
public FatalException(Throwable cause) {
super(cause);
}
public int getCode() {
return code;
}
}

View File

@@ -31,7 +31,9 @@ import javax.xml.transform.stream.StreamResult;
import org.talend.utils.xml.XmlUtils;
import org.w3c.dom.Document;
import org.xml.sax.ErrorHandler;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
/**
*
@@ -50,6 +52,23 @@ public final class XMLFileUtil {
public static Document loadDoc(InputStream stream) throws ParserConfigurationException, SAXException, IOException {
try {
DocumentBuilder db = DOCBUILDER_FACTORY.newDocumentBuilder();
db.setErrorHandler(new ErrorHandler() {
@Override
public void warning(SAXParseException exception) throws SAXException {
throw exception;
}
@Override
public void fatalError(SAXParseException exception) throws SAXException {
throw exception;
}
@Override
public void error(SAXParseException exception) throws SAXException {
throw exception;
}
});
return db.parse(stream);
} finally {
try {

View File

@@ -24,6 +24,7 @@ import java.net.URI;
import java.net.URL;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Enumeration;
import java.util.LinkedHashSet;
import java.util.List;
@@ -31,6 +32,10 @@ import java.util.Set;
import java.util.regex.Pattern;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.eclipse.core.internal.net.ProxyManager;
import org.eclipse.core.net.proxy.IProxyData;
import org.eclipse.core.net.proxy.IProxyService;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.core.runtime.preferences.InstanceScope;
import org.talend.commons.exception.CommonExceptionHandler;
@@ -42,6 +47,8 @@ import org.talend.commons.runtime.utils.io.FileCopyUtils;
*/
public class NetworkUtil {
private static final Logger LOGGER = Logger.getLogger(NetworkUtil.class);
private static final String[] windowsCommand = { "ipconfig", "/all" }; //$NON-NLS-1$ //$NON-NLS-2$
private static final String[] linuxCommand = { "/sbin/ifconfig", "-a" }; //$NON-NLS-1$ //$NON-NLS-2$
@@ -72,6 +79,136 @@ public class NetworkUtil {
private static final String PROP_NETWORK_STATUS = "network.status"; //$NON-NLS-1$
private static final String SYSTEM_PROXY_ENABLED = "talend.studio.proxy.enableSystemProxyByDefault";
public static void applyProxyFromSystemProperties() throws Exception {
if (!Boolean.valueOf(System.getProperty("talend.studio.proxy.applySystemProps", Boolean.FALSE.toString()))) {
return;
}
final String passwordMask = "***";
String httpProxyHost = System.getProperty("http.proxyHost");
String httpProxyPort = System.getProperty("http.proxyPort");
String httpUser = System.getProperty("http.proxyUser");
String httpPassword = System.getProperty("http.proxyPassword");
if (StringUtils.isNotBlank(httpPassword)) {
System.setProperty("http.proxyPassword", passwordMask);
}
String httpNonProxyHosts = System.getProperty("http.nonProxyHosts");
String httpsProxyHost = System.getProperty("https.proxyHost");
String httpsProxyPort = System.getProperty("https.proxyPort");
String httpsUser = System.getProperty("https.proxyUser");
String httpsPassword = System.getProperty("https.proxyPassword");
if (StringUtils.isNotBlank(httpsPassword)) {
System.setProperty("https.proxyPassword", passwordMask);
}
String httpsNonProxyHosts = System.getProperty("https.nonProxyHosts");
String socksProxyHost = System.getProperty("socksProxyHost");
String socksProxyPort = System.getProperty("socksProxyPort");
String socksProxyUser = System.getProperty("socksProxyUser");
if (socksProxyUser == null) {
socksProxyUser = System.getProperty("java.net.socks.username");
}
String socksProxyPassword = System.getProperty("socksProxyPassword");
if (StringUtils.isNotBlank(socksProxyPassword)) {
System.setProperty("socksProxyPassword", passwordMask);
}
if (socksProxyPassword == null) {
socksProxyPassword = System.getProperty("java.net.socks.password");
}
IProxyService proxyService = ProxyManager.getProxyManager();
boolean isHttpProxyEnabled = StringUtils.isNotBlank(httpProxyHost) && StringUtils.isNotBlank(httpProxyPort);
boolean isHttpsProxyEnabled = StringUtils.isNotBlank(httpsProxyHost) && StringUtils.isNotBlank(httpsProxyPort);
boolean isSocksProxyEnabled = StringUtils.isNotBlank(socksProxyHost) && StringUtils.isNotBlank(socksProxyPort);
if (!isHttpProxyEnabled && !isHttpsProxyEnabled && !isSocksProxyEnabled) {
proxyService
.setSystemProxiesEnabled(Boolean.valueOf(System.getProperty(SYSTEM_PROXY_ENABLED, Boolean.TRUE.toString())));
proxyService.setProxiesEnabled(false);
LOGGER.info("No proxy specified, disabled.");
} else {
proxyService.setSystemProxiesEnabled(false);
proxyService.setProxiesEnabled(true);
List<IProxyData> proxies = new ArrayList<>();
String initedProxyTypes = "";
if (isHttpProxyEnabled) {
try {
IProxyData httpProxy = proxyService.getProxyData(IProxyData.HTTP_PROXY_TYPE);
httpProxy.setHost(httpProxyHost);
httpProxy.setPort(Integer.valueOf(httpProxyPort));
if (StringUtils.isNotBlank(httpUser)) {
httpProxy.setUserid(httpUser);
if (httpPassword == null) {
httpPassword = "";
}
httpProxy.setPassword(httpPassword);
}
proxies.add(httpProxy);
initedProxyTypes += IProxyData.HTTP_PROXY_TYPE + " ";
} catch (Throwable e) {
LOGGER.error(e.getMessage(), e);
}
}
if (isHttpsProxyEnabled) {
try {
IProxyData httpsProxy = proxyService.getProxyData(IProxyData.HTTPS_PROXY_TYPE);
httpsProxy.setHost(httpsProxyHost);
httpsProxy.setPort(Integer.valueOf(httpsProxyPort));
if (StringUtils.isNotBlank(httpsUser)) {
httpsProxy.setUserid(httpsUser);
if (httpsPassword == null) {
httpsPassword = "";
}
httpsProxy.setPassword(httpsPassword);
}
proxies.add(httpsProxy);
initedProxyTypes += IProxyData.HTTPS_PROXY_TYPE + " ";
} catch (Throwable e) {
LOGGER.error(e.getMessage(), e);
}
}
if (isSocksProxyEnabled) {
try {
IProxyData socksProxy = proxyService.getProxyData(IProxyData.SOCKS_PROXY_TYPE);
socksProxy.setHost(socksProxyHost);
socksProxy.setPort(Integer.valueOf(socksProxyPort));
if (StringUtils.isNotBlank(socksProxyUser)) {
socksProxy.setUserid(socksProxyUser);
if (socksProxyPassword == null) {
socksProxyPassword = "";
}
socksProxy.setPassword(socksProxyPassword);
}
proxies.add(socksProxy);
initedProxyTypes += IProxyData.SOCKS_PROXY_TYPE;
} catch (Throwable e) {
LOGGER.error(e.getMessage(), e);
}
}
proxyService.setProxyData(proxies.toArray(new IProxyData[0]));
List<String> nonProxyHosts = new ArrayList<>();
if (StringUtils.isNotBlank(httpNonProxyHosts)) {
String[] split = httpNonProxyHosts.split("|");
nonProxyHosts.addAll(Arrays.asList(split));
}
if (StringUtils.isNotBlank(httpsNonProxyHosts)) {
String[] split = httpsNonProxyHosts.split("|");
nonProxyHosts.addAll(Arrays.asList(split));
}
proxyService.setNonProxiedHosts(nonProxyHosts.toArray(new String[0]));
if (passwordMask.equals(System.getProperty("http.proxyPassword"))) {
System.setProperty("http.proxyPassword", httpPassword);
}
if (passwordMask.equals(System.getProperty("https.proxyPassword"))) {
System.setProperty("https.proxyPassword", httpsPassword);
}
if (passwordMask.equals(System.getProperty("socksProxyPassword"))) {
System.setProperty("socksProxyPassword", socksProxyPassword);
}
LOGGER.info("Succeed to init proxy: " + initedProxyTypes);
}
}
public static boolean isNetworkValid() {
return isNetworkValid(DEFAULT_TIMEOUT);
}

View File

@@ -15,7 +15,7 @@ ColorStyledText.SelectAllItem.Text=\u3059\u3079\u3066\u9078\u629E
ContentProposalAdapterExtended.close=\u9589\u3058\u308B
ContentProposalAdapterExtended.closeFocusout=\u30D5\u30A9\u30FC\u30AB\u30B9\u30A2\u30A6\u30C8\u3092\u9589\u3058\u308B
ControlUtils.Unsupported1=\u3053\u306E\u30B3\u30F3\u30C8\u30ED\u30FC\u30EB({0})\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u5FC5\u8981\u3067\u3042\u308C\u3070\u3001\u30B1\u30FC\u30B9\u3092\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044...
CopyPushButton.CopyButton.Tip=\u9078\u629E\u3057\u305F\u30A2\u30A4\u30C6\u30E0\u3092\u30B3\u30D4\u30FC
CopyPushButton.CopyButton.Tip=\u9078\u629E\u9805\u76EE\u3092\u30B3\u30D4\u30FC
Curve2D.MaxNum.Be0=maximumSegments\u306F\u6B63\u6570\u304B0\u306B\u3057\u3066\u304F\u3060\u3055\u3044
Curve2D.MinNum.Be0=minimumSegments\u306F\u6B63\u307E\u305F\u306F0\u306B\u3057\u3066\u304F\u3060\u3055\u3044
DateDialog.textContent=\u65E5\u6642\u3092\u9078\u629E

View File

@@ -52,7 +52,7 @@ public abstract class ExtendedTableCaseCommand extends Command implements IExten
@Override
public void execute() {
convertCase(extendedTable, beansToCovertCase, selectionIndices, isUpperCase);
extendedTable.getTableViewer().refresh();
}
public abstract void convertCase(ExtendedTableModel extendedTable, List copiedObjectsList, int[] selectionIndices, boolean isUpperCase);

View File

@@ -17,6 +17,7 @@ import java.util.List;
import org.eclipse.gef.commands.Command;
import org.talend.commons.ui.runtime.i18n.Messages;
import org.talend.commons.ui.runtime.swt.tableviewer.TableViewerCreatorNotModifiable;
import org.talend.commons.ui.swt.extended.table.ExtendedTableModel;
import org.talend.commons.ui.utils.SimpleClipboard;
import org.talend.commons.utils.data.list.UniqueStringGenerator;
@@ -65,6 +66,11 @@ public abstract class ExtendedTablePasteCommand extends Command implements IExte
List list = new ArrayList((List) data);
list = createPastableBeansList(extendedTable, list);
extendedTable.addAll(indexStart, list);
// when not lazy load need to do refresh to refresh the row number
if (!TableViewerCreatorNotModifiable.getRecommandLazyLoad()
&& !TableViewerCreatorNotModifiable.isLazyLoadingEnabled()) {
extendedTable.getTableViewer().refresh();
}
}
}

View File

@@ -14,6 +14,7 @@ package org.talend.commons.ui.swt.advanced.dataeditor.commands;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.gef.commands.Command;
import org.talend.commons.ui.runtime.i18n.Messages;
import org.talend.commons.ui.swt.extended.table.ExtendedTableModel;
@@ -54,7 +55,7 @@ public abstract class ExtendedTableQuoteCommand extends Command implements IExte
@Override
public void execute() {
toQuote(extendedTable, beansToQuote, selectionIndices, quote, isAddingQuote);
extendedTable.getTableViewer().refresh();
}
public abstract void toQuote(ExtendedTableModel extendedTable, List copiedObjectsList, int[] selectionIndices, String quote, boolean isAddingQuote);

View File

@@ -1,178 +1,178 @@
// ============================================================================
//
// Copyright (C) 2006-2021 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.commons.ui.utils.loader;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import org.apache.log4j.Logger;
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
/**
* ggu class global comment. Detailled comment
*/
public class MyURLClassLoader extends URLClassLoader {
public static interface IAssignableClassFilter {
public boolean filter(URL[] urls);
public boolean filter(Class clazz);
public boolean filter(String clazzName);
}
private static Logger log = Logger.getLogger(MyURLClassLoader.class);
private Map pclasses = new HashMap();
public MyURLClassLoader(String fileName) throws IOException {
this(new File(fileName).toURL());
}
public MyURLClassLoader(URL url) {
this(new URL[] { url });
}
public MyURLClassLoader(URL[] urls) {
super(urls, Class.class.getClassLoader());
}
public MyURLClassLoader(URL[] urls, ClassLoader parentLoader) {
super(urls, parentLoader);
}
public Class[] getAssignableClasses(Class type) throws IOException {
return getAssignableClasses(type, null);
}
@SuppressWarnings("unchecked")
public Class[] getAssignableClasses(Class type, IAssignableClassFilter filter) throws IOException {
List classes = new ArrayList();
URL[] urls = getURLs();
for (URL url : urls) {
if (filter != null && filter.filter(new URL[] { url })) {
continue;
}
File file = new File(url.getFile());
if (!file.isDirectory() && file.exists() && file.canRead()) {
ZipFile zipFile = null;
try {
zipFile = new ZipFile(file);
} catch (IOException ex) {
ExceptionHandler.process(ex);
}
Enumeration<? extends ZipEntry> entries = zipFile.entries();
while (entries.hasMoreElements()) {
Class cls = null;
String entryName = entries.nextElement().getName();
String className = changeFileNameToClassName(entryName);
if (className != null) {
if (filter != null && filter.filter(className)) {
continue;
}
try {
cls = loadClass(className);
} catch (Throwable th) {
log.warn(th);
}
if (cls != null) {
if (filter != null && filter.filter(cls)) {
continue;
}
if (isAssignableType(type, cls)) {
classes.add(cls);
}
}
}
}
}
}
return (Class[]) classes.toArray(new Class[classes.size()]);
}
@SuppressWarnings("unchecked")
private boolean isAssignableType(Class type, Class current) {
if (type == null || current == null || current.equals(Object.class)) {
return false;
}
if (type.isAssignableFrom(current)) {
return true;
} else
// sometimes can not assign the java generic, use the class url
if (type.getName() != null && type.getName().equals(current.getName())) {
return true;
} else {
//
if (type.isInterface()) {//
for (Class interfaceClazz : current.getInterfaces()) {
if (interfaceClazz.equals(type)) {
return true;
} else {
if (isAssignableType(type, interfaceClazz)) {
return true;
}
}
}
if (isAssignableType(type, current.getSuperclass())) {
return true;
}
} else {
return isAssignableType(type, current.getSuperclass());
}
}
return false;
}
/*
* (non-Javadoc)
*
* @see java.net.URLClassLoader#findClass(java.lang.String)
*/
@SuppressWarnings("unchecked")
protected synchronized Class findCslass(String className) throws ClassNotFoundException {
Class cls = (Class) pclasses.get(className);
if (cls == null) {
cls = super.findClass(className);
pclasses.put(className, cls);
}
return cls;
}
public static String changeFileNameToClassName(String name) {
if (name == null) {
throw new IllegalArgumentException("File Name == null");
}
String className = null;
if (name.toLowerCase().endsWith(".class")) {
className = name.replace('/', '.');
className = className.replace('\\', '.');
className = className.substring(0, className.length() - 6);
}
return className;
}
protected void classHasBeenLoaded(Class cls) {
}
}
// ============================================================================
//
// Copyright (C) 2006-2021 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.commons.ui.utils.loader;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import org.apache.log4j.Logger;
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
/**
* ggu class global comment. Detailled comment
*/
public class MyURLClassLoader extends URLClassLoader {
public static interface IAssignableClassFilter {
public boolean filter(URL[] urls);
public boolean filter(Class clazz);
public boolean filter(String clazzName);
}
private static Logger log = Logger.getLogger(MyURLClassLoader.class);
private Map pclasses = new HashMap();
public MyURLClassLoader(String fileName) throws IOException {
this(new File(fileName).toURI().toURL());
}
public MyURLClassLoader(URL url) {
this(new URL[] { url });
}
public MyURLClassLoader(URL[] urls) {
super(urls, Class.class.getClassLoader());
}
public MyURLClassLoader(URL[] urls, ClassLoader parentLoader) {
super(urls, parentLoader);
}
public Class[] getAssignableClasses(Class type) throws IOException {
return getAssignableClasses(type, null);
}
@SuppressWarnings("unchecked")
public Class[] getAssignableClasses(Class type, IAssignableClassFilter filter) throws IOException {
List classes = new ArrayList();
URL[] urls = getURLs();
for (URL url : urls) {
if (filter != null && filter.filter(new URL[] { url })) {
continue;
}
File file = new File(url.getFile());
if (!file.isDirectory() && file.exists() && file.canRead()) {
ZipFile zipFile = null;
try {
zipFile = new ZipFile(file);
} catch (IOException ex) {
ExceptionHandler.process(ex);
}
Enumeration<? extends ZipEntry> entries = zipFile.entries();
while (entries.hasMoreElements()) {
Class cls = null;
String entryName = entries.nextElement().getName();
String className = changeFileNameToClassName(entryName);
if (className != null) {
if (filter != null && filter.filter(className)) {
continue;
}
try {
cls = loadClass(className);
} catch (Throwable th) {
log.warn(th);
}
if (cls != null) {
if (filter != null && filter.filter(cls)) {
continue;
}
if (isAssignableType(type, cls)) {
classes.add(cls);
}
}
}
}
}
}
return (Class[]) classes.toArray(new Class[classes.size()]);
}
@SuppressWarnings("unchecked")
private boolean isAssignableType(Class type, Class current) {
if (type == null || current == null || current.equals(Object.class)) {
return false;
}
if (type.isAssignableFrom(current)) {
return true;
} else
// sometimes can not assign the java generic, use the class url
if (type.getName() != null && type.getName().equals(current.getName())) {
return true;
} else {
//
if (type.isInterface()) {//
for (Class interfaceClazz : current.getInterfaces()) {
if (interfaceClazz.equals(type)) {
return true;
} else {
if (isAssignableType(type, interfaceClazz)) {
return true;
}
}
}
if (isAssignableType(type, current.getSuperclass())) {
return true;
}
} else {
return isAssignableType(type, current.getSuperclass());
}
}
return false;
}
/*
* (non-Javadoc)
*
* @see java.net.URLClassLoader#findClass(java.lang.String)
*/
@SuppressWarnings("unchecked")
protected synchronized Class findCslass(String className) throws ClassNotFoundException {
Class cls = (Class) pclasses.get(className);
if (cls == null) {
cls = super.findClass(className);
pclasses.put(className, cls);
}
return cls;
}
public static String changeFileNameToClassName(String name) {
if (name == null) {
throw new IllegalArgumentException("File Name == null");
}
String className = null;
if (name.toLowerCase().endsWith(".class")) {
className = name.replace('/', '.');
className = className.replace('\\', '.');
className = className.substring(0, className.length() - 6);
}
return className;
}
protected void classHasBeenLoaded(Class cls) {
}
}

View File

@@ -155,7 +155,6 @@ ProjectRepositoryNode.invalidItem=Invalid item
ProjectRepositoryNode.columns=Columns
ProjectRepositoryNode.validationRules=Validation Rules
ProjectRepositoryNode.cdcFoundation=CDC Foundation
ProjectRepositoryNode.cdcFoundation.deprecated=CDC Foundation (deprecated)
ProjectRepositoryNode.genericSchema=Generic schemas
ProjectRepositoryNode.queries=Queries
ProjectRepositoryNode.synonymSchemas=Synonym schemas

View File

@@ -155,7 +155,6 @@ ProjectRepositoryNode.invalidItem=\u00C9l\u00E9ment invalide
ProjectRepositoryNode.columns=Colonnes
ProjectRepositoryNode.validationRules=R\u00E8gles de validation
ProjectRepositoryNode.cdcFoundation=Fondation CDC
ProjectRepositoryNode.cdcFoundation.deprecated=Fondation CDC (d\u00E9pr\u00E9ci\u00E9)
ProjectRepositoryNode.genericSchema=Sch\u00E9mas g\u00E9n\u00E9riques
ProjectRepositoryNode.queries=Requ\u00EAtes
ProjectRepositoryNode.synonymSchemas=Sch\u00E9mas synonymes

View File

@@ -155,7 +155,6 @@ 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.cdcFoundation.deprecated=CDC Foundation (\u975E\u63A8\u5968)
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

View File

@@ -155,7 +155,6 @@ ProjectRepositoryNode.invalidItem=\u65E0\u6548\u9879\u76EE
ProjectRepositoryNode.columns=\u5217
ProjectRepositoryNode.validationRules=\u9A8C\u8BC1\u89C4\u5219
ProjectRepositoryNode.cdcFoundation=CDC Foundation
ProjectRepositoryNode.cdcFoundation.deprecated=CDC Foundation (\u5DF2\u5F03\u7528)
ProjectRepositoryNode.genericSchema=\u901A\u7528 schema
ProjectRepositoryNode.queries=\u67E5\u8BE2
ProjectRepositoryNode.synonymSchemas=\u540C\u4E49\u5B57 schema

View File

@@ -35,6 +35,7 @@ import org.eclipse.jface.preference.IPreferenceStore;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.exception.PersistenceException;
import org.talend.commons.runtime.model.repository.ERepositoryStatus;
import org.talend.commons.runtime.service.ITaCoKitService;
import org.talend.commons.ui.runtime.exception.RuntimeExceptionHandler;
import org.talend.commons.ui.runtime.image.ECoreImage;
import org.talend.commons.ui.runtime.repository.IExtendRepositoryNode;
@@ -823,7 +824,8 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
* @return
*/
private RepositoryNode getFolder(ERepositoryObjectType currentType, String path, List<IRepositoryNode> rootNodes) {
if (RepositoryNodeUtilities.isGenericDBExtraType(currentType) || RepositoryNodeManager.isSnowflake(currentType)) {
if (RepositoryNodeUtilities.isGenericDBExtraType(currentType) || RepositoryNodeManager.isSnowflake(currentType)
|| (ITaCoKitService.getInstance() != null && ITaCoKitService.getInstance().isTaCoKitType(currentType))) {
currentType = ERepositoryObjectType.METADATA_CONNECTIONS;
}
if (path == null || path.isEmpty()) {
@@ -1721,11 +1723,11 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
DatabaseConnectionItem connectionItem = (DatabaseConnectionItem) item;
DatabaseConnection connection = (DatabaseConnection) connectionItem.getConnection();
if (PluginChecker.isCDCPluginLoaded()) {
ICDCProviderService service = GlobalServiceRegister.getDefault().getService(ICDCProviderService.class);
ICDCProviderService service = GlobalServiceRegister.getDefault()
.getService(ICDCProviderService.class);
if (service != null && service.canCreateCDCConnection(connection)) {
RepositoryNode cdcNode = new StableRepositoryNode(node,
Messages.getString("ProjectRepositoryNode.cdcFoundation.deprecated"), //$NON-NLS-1$
Messages.getString("ProjectRepositoryNode.cdcFoundation"), //$NON-NLS-1$
ECoreImage.FOLDER_CLOSE_ICON);
node.getChildren().add(cdcNode);
service.createCDCTypes(recBinNode, cdcNode, connection.getCdcConns());

View File

@@ -147,7 +147,11 @@ public class LDAPCATruster implements X509TrustManager {
} catch (IOException ex) {
}
try {
ks.load(in, certStorePwd);
if (in != null) {
ks.load(in, certStorePwd);
} else {
ks = null;
}
} catch (Exception e) {
log.error(Messages.getString("LDAPCATruster.failedLoadCert") + e.getMessage()); //$NON-NLS-1$
return;

View File

@@ -856,13 +856,13 @@ public class XmiResourceManager {
URI orgPropertyResourceURI = EcoreUtil.getURI(originalItem.getProperty());
URI orgRelativePlateformDestUri = orgPropertyResourceURI.trimFileExtension().appendFileExtension(
FileConstants.SCREENSHOT_EXTENSION);
URL orgFileURL = FileLocator.toFileURL(new java.net.URL(
URL orgFileURL = FileLocator.resolve(new java.net.URL(
"platform:/resource" + orgRelativePlateformDestUri.toPlatformString(true))); //$NON-NLS-1$
URI newPropertyResourceURI = EcoreUtil.getURI(newItem.getProperty());
URI newRelativePlateformDestUri = newPropertyResourceURI.trimFileExtension().appendFileExtension(
FileConstants.SCREENSHOT_EXTENSION);
URL newFileURL = FileLocator.toFileURL(new java.net.URL(
URL newFileURL = FileLocator.resolve(new java.net.URL(
"platform:/resource" + newRelativePlateformDestUri.toPlatformString(true))); //$NON-NLS-1$
os = new FileOutputStream(newFileURL.getFile());

View File

@@ -144,7 +144,7 @@ Require-Bundle: org.eclipse.jdt.core,
com.fasterxml.jackson.core.jackson-annotations,
com.fasterxml.jackson.core.jackson-databind,
com.fasterxml.jackson.core.jackson-core,
avro;bundle-version="1.11.2"
avro
Bundle-Activator: org.talend.core.runtime.CoreRuntimePlugin
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .,

View File

@@ -49,8 +49,10 @@ tDqReportRun=java.base/java.lang,java.base/java.nio
tWebService=java.base/java.lang
tWebServiceInput=java.base/java.lang
tRESTClient=java.base/sun.net.www.protocol.https,java.base/java.net
# TCK framework
TCK_COMMON_ARGS=java.base/java.io,java.base/java.lang.invoke,java.base/java.lang.reflect,java.base/java.lang,java.base/java.net,java.base/java.nio,java.base/java.util,java.base/sun.nio.ch
TCK_COMMON_ARGS=java.base/java.io,java.base/java.lang.invoke,java.base/java.lang.reflect,java.base/java.lang,java.base/java.net,java.base/java.nio,java.base/java.util,java.base/sun.nio.ch,java.base/sun.net.www.protocol.https
# BigData distribution
SPARK_3_4_x=java.base/java.nio,java.base/sun.nio.ch,java.base/java.util,java.base/java.lang.invoke,java.base/sun.util.calendar

View File

@@ -39,6 +39,9 @@ import org.talend.core.GlobalServiceRegister;
import org.talend.core.runtime.CoreRuntimePlugin;
import org.talend.core.runtime.projectsetting.ProjectPreferenceManager;
import org.talend.designer.runprocess.IRunProcessService;
import org.talend.utils.JavaVersion;
import org.talend.utils.StudioKeysFileCheck;
import org.talend.utils.VersionException;
/**
* Utilities around perl stuff. <br/>
@@ -248,7 +251,7 @@ public final class JavaUtils {
setProjectJavaVserion(javaVersion);
applyCompilerCompliance(javaVersion);
if (GlobalServiceRegister.getDefault().isServiceRegistered(IRunProcessService.class)) {
IRunProcessService service = (IRunProcessService) GlobalServiceRegister.getDefault().getService(IRunProcessService.class);
IRunProcessService service = GlobalServiceRegister.getDefault().getService(IRunProcessService.class);
service.updateProjectPomWithTemplate();
}
}
@@ -284,6 +287,10 @@ public final class JavaUtils {
if (version == null) {
return defaultCompliance;
}
JavaVersion ver = new JavaVersion(version);
if (ver.getMajor() > 8) {
return String.valueOf(ver.getMajor());
}
if (version.startsWith(JavaCore.VERSION_1_8)) {
return JavaCore.VERSION_1_8;
}
@@ -364,5 +371,39 @@ public final class JavaUtils {
monitor.worked(1);
}
}
public static void validateJavaVersion() {
try {
// validate jvm which is used to start studio
StudioKeysFileCheck.validateJavaVersion();
// validate default complier's compliance level
IVMInstall install = JavaRuntime.getDefaultVMInstall();
String ver = getCompilerCompliance((IVMInstall2) install, JavaCore.VERSION_1_8);
if (new JavaVersion(ver).compareTo(new JavaVersion(StudioKeysFileCheck.JAVA_VERSION_MAXIMUM_STRING)) > 0) {
VersionException e = new VersionException(VersionException.ERR_JAVA_VERSION_NOT_SUPPORTED,
"The maximum Java version supported by Studio is " + StudioKeysFileCheck.JAVA_VERSION_MAXIMUM_STRING + ". Your compiler's compliance level is " + ver);
throw e;
}
} catch (Exception e1) {
if (e1 instanceof VersionException) {
throw e1;
}
ExceptionHandler.process(e1);
}
}
public static boolean isJava17() {
boolean isJava17 = false;
String javaVersion = System.getProperty("java.version");
String[] arr = javaVersion.split("[^\\d]+");
try {
isJava17 = Integer.parseInt(arr[0]) >= 17;
} catch (NumberFormatException e) {
ExceptionHandler.process(e);
isJava17 = false;
}
return isJava17;
}
}

View File

@@ -54,4 +54,6 @@ public interface ILibraryManagerUIService extends IService {
public boolean confirmDialog(String originalJarFileName);
public IConfigModuleDialog getConfigModuleDialog(Shell parentShell, String initValue, boolean allowDetectDependencies);
public String getLicenseUrlByName(String licenceName);
}

View File

@@ -60,8 +60,6 @@ public interface ITDQRepositoryService extends IService {
*/
public void notifySQLExplorer(Item... items);
public void fillMetadata(ConnectionItem connItem);
public void refresh();
// Added 20120503 yyin

View File

@@ -22,14 +22,13 @@ import org.talend.core.runtime.hd.hive.HiveMetadataHelper;
*/
public enum EImpalaDriver {
HIVE2("HIVE2", "HIVE2", "org.apache.hive.jdbc.HiveDriver", "doSupportHive2"),
IMPALA("IMPALA", "IMPALA", "com.cloudera.impala.jdbc.Driver", "doSupportImpalaConnector");
HIVE2("HIVE2", "HIVE2", "org.apache.hive.jdbc.HiveDriver"),
IMPALA("IMPALA", "IMPALA", "com.cloudera.impala.jdbc.Driver");
EImpalaDriver(String displayName, String name, String driver, String supportDriverMethodName) {
EImpalaDriver(String displayName, String name, String driver) {
this.displayName = displayName;
this.name = name;
this.driver = driver;
this.supportDriverMethodName = supportDriverMethodName;
}
private String displayName;
@@ -38,8 +37,6 @@ public enum EImpalaDriver {
private String driver;
private String supportDriverMethodName;
public String getDisplayName() {
return displayName;
}
@@ -52,20 +49,14 @@ public enum EImpalaDriver {
return driver;
}
public String getSupportDriverMethodName() {
return supportDriverMethodName;
}
public static boolean isSupport(String distribution, String version, boolean byDisplay, String supportMethodName) {
return HiveMetadataHelper.doSupportMethod(distribution, version, byDisplay, supportMethodName);
public static boolean isSupport(String distribution, String version, boolean byDisplay) {
return true;
}
public static String[] getImpalaDriverDisplay(String distribution, String version, boolean byDisplay) {
List<String> list = new ArrayList<>(0);
for (EImpalaDriver driver : EImpalaDriver.values()) {
if (isSupport(distribution, version, byDisplay, driver.getSupportDriverMethodName())) {
list.add(driver.getDisplayName());
}
}
return list.toArray(new String[0]);
}

View File

@@ -22,7 +22,7 @@ import org.talend.core.database.EDatabaseTypeName;
*/
public class DbVersion4DriversForOracle11 extends DbVersion4Drivers {
public static final String DRIVER_1_6 = "ojdbc6.jar"; //$NON-NLS-1$
public static final String DRIVER_1_6 = "ojdbc6-11.2.0.4.jar"; //$NON-NLS-1$
public static final String DRIVER_1_5 = "ojdbc5.jar"; //$NON-NLS-1$

View File

@@ -54,12 +54,12 @@ public enum EDatabaseVersion4Drivers {
H2(new DbVersion4Drivers(EDatabaseTypeName.H2, "h2-2.1.214.jar")), //$NON-NLS-1$
//
JAVADB_EMBEDED(new DbVersion4Drivers(EDatabaseTypeName.JAVADB_EMBEDED, "derby.jar")), //$NON-NLS-1$
SQLITE(new DbVersion4Drivers(EDatabaseTypeName.SQLITE, "sqlite-jdbc-3.40.0.0.jar")), //$NON-NLS-1$
FIREBIRD(new DbVersion4Drivers(EDatabaseTypeName.FIREBIRD, "jaybird-full-2.1.1.jar")), //$NON-NLS-1$
JAVADB_EMBEDED(new DbVersion4Drivers(EDatabaseTypeName.JAVADB_EMBEDED, "derby-10.14.2.0.jar")), //$NON-NLS-1$
SQLITE(new DbVersion4Drivers(EDatabaseTypeName.SQLITE, new String[] { "slf4j-api-1.7.34.jar", "sqlite-jdbc-3.44.1.0.jar" })), //$NON-NLS-1$
FIREBIRD(new DbVersion4Drivers(EDatabaseTypeName.FIREBIRD, "jaybird-2.1.1.jar")), //$NON-NLS-1$
TERADATA(new DbVersion4Drivers(EDatabaseTypeName.TERADATA,
new String[] { "terajdbc4-17.10.00.27.jar" })), //$NON-NLS-1$
JAVADB_DERBYCLIENT(new DbVersion4Drivers(EDatabaseTypeName.JAVADB_DERBYCLIENT, "derbyclient.jar")), //$NON-NLS-1$
JAVADB_DERBYCLIENT(new DbVersion4Drivers(EDatabaseTypeName.JAVADB_DERBYCLIENT, "derbyclient-10.14.2.0.jar")), //$NON-NLS-1$
NETEZZA(new DbVersion4Drivers(EDatabaseTypeName.NETEZZA, "nzjdbc.jar")), //$NON-NLS-1$
INFORMIX(new DbVersion4Drivers(EDatabaseTypeName.INFORMIX, "ifxjdbc.jar")), //$NON-NLS-1$

View File

@@ -45,6 +45,8 @@ import org.talend.designer.core.model.utils.emf.talendfile.TalendFileFactory;
*/
public class JobContextManager implements IContextManager {
private boolean isWrapContextText;
private IContext defaultContext = new JobContext(IContext.DEFAULT);
private List<IContext> listContext = new ArrayList<IContext>();
@@ -102,6 +104,14 @@ public class JobContextManager implements IContextManager {
private Map<ContextItem, List<IContext>> renameContextGroupMap = new HashMap<ContextItem, List<IContext>>();
public boolean isWrapContextText() {
return isWrapContextText;
}
public void setWrapContextText(boolean isWrapContextText) {
this.isWrapContextText = isWrapContextText;
}
public Map<ContextItem, List<IContext>> getAddContextGroupMap() {
return this.addContextGroupMap;
}

View File

@@ -20,7 +20,6 @@ import org.apache.commons.lang.StringUtils;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.core.pendo.PendoDataTrackFactory;
import org.talend.core.runtime.i18n.Messages;
import org.talend.core.service.ICloudSignOnService;
import org.talend.repository.model.RepositoryConstants;
@@ -254,7 +253,13 @@ public class ConnectionBean implements Cloneable {
String user = conDetails.getString(USER);
if (isToken()) {
String url = getDynamicFields().get(RepositoryConstants.REPOSITORY_URL);
user = PendoDataTrackFactory.getInstance().getTmcUser(url, getPassword());
if (ICloudSignOnService.get() != null) {
try {
user = ICloudSignOnService.get().getTokenUser(url, getPassword());
} catch (Exception e) {
ExceptionHandler.process(e);
}
}
if (StringUtils.isNotBlank(user)) {
setUser(user);
}

View File

@@ -63,11 +63,4 @@ public class PendoDataTrackFactory {
}
}
public String getTmcUser(String url, String token) {
if (coreRuntimeService != null) {
return coreRuntimeService.getTmcUser(url, token);
}
return "";
}
}

View File

@@ -640,7 +640,7 @@ TalendLibsServerManager.cannotGetUserLibraryServer=Impossible d'obtenir le serve
MigrationReportAccessDialog.title=Migration des \u00E9l\u00E9ments du projet
MigrationReportAccessDialog.migrateSuccess=Les \u00E9l\u00E9ments du projet ont bien \u00E9t\u00E9 migr\u00E9s.
MigrationReportAccessDialog.completeReportAvailable=Consulter le rapport
MigrationReportAccessDialog.accessReport=ici
MigrationReportAccessDialog.accessBrowse=Parcourir...
MigrationReportAccessDialog.provideAnalysisTool=Vous pouvez ex\u00E9cuter une analyse de projet pour analyser votre projet migr\u00E9. Cet outil exp\u00E9rimental va g\u00E9n\u00E9rer un rapport contenant\u00A0:
MigrationReportAccessDialog.listOfProblems=- la liste des \u00E9l\u00E9ments \u00E0 corriger manuellement,
MigrationReportAccessDialog.listItems=- la liste des \u00E9l\u00E9ments \u00E0 v\u00E9rifier.
@@ -655,7 +655,7 @@ ItemAnalysisReportManager.Warning.message=Impossible d'ex\u00E9cuter une analyse
AnalysisReportAccessDialog.shellTitle=Analyse du projet
AnalysisReportAccessDialog.generateSuccess=Analyse du projet termin\u00E9e.
AnalysisReportAccessDialog.completeReportAvailable=Consulter le rapport
AnalysisReportAccessDialog.accessReport=ici
AnalysisReportAccessDialog.accessBrowse=Parcourir...
AbstractPomTemplateProjectSettingPage.defaultTabLabel=Par d\u00E9faut
AbstractPomTemplateProjectSettingPage.customTabLabel=Personnalis\u00E9
AbstractPomTemplateProjectSettingPage.previewButton=Aper\u00E7u

View File

@@ -640,7 +640,7 @@ TalendLibsServerManager.cannotGetUserLibraryServer=\u30EA\u30E2\u30FC\u30C8\u7BA
MigrationReportAccessDialog.title=\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u9805\u76EE\u3092\u79FB\u884C
MigrationReportAccessDialog.migrateSuccess=\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u9805\u76EE\u304C\u6B63\u3057\u304F\u79FB\u884C\u3055\u308C\u307E\u3057\u305F\u3002
MigrationReportAccessDialog.completeReportAvailable=\u30EC\u30DD\u30FC\u30C8\u3092\u30C1\u30A7\u30C3\u30AF
MigrationReportAccessDialog.accessReport=\u3053\u3061\u3089
MigrationReportAccessDialog.accessBrowse=\u53C2\u7167...
MigrationReportAccessDialog.provideAnalysisTool=\u4ECA\u3059\u3050\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u5206\u6790\u3092\u5B9F\u884C\u3057\u3066\u3001\u79FB\u884C\u3055\u308C\u305F\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u3092\u5206\u6790\u3067\u304D\u307E\u3059\u3002\u3053\u306E\u8A66\u9A13\u7684\u306A\u30C4\u30FC\u30EB\u306B\u3088\u3063\u3066\u3001\u4EE5\u4E0B\u304C\u542B\u307E\u308C\u308B\u30EC\u30DD\u30FC\u30C8\u304C\u751F\u6210\u3055\u308C\u307E\u3059:
MigrationReportAccessDialog.listOfProblems=- \u624B\u52D5\u3067\u4FEE\u6B63\u3059\u308B\u30A2\u30A4\u30C6\u30E0\u306E\u30EA\u30B9\u30C8\u3002
MigrationReportAccessDialog.listItems=- \u30C1\u30A7\u30C3\u30AF\u3059\u308B\u30A2\u30A4\u30C6\u30E0\u306E\u30EA\u30B9\u30C8\u3002
@@ -655,7 +655,7 @@ ItemAnalysisReportManager.Warning.message=\u65B0\u3057\u3044\u5206\u6790\u3092\u
AnalysisReportAccessDialog.shellTitle=\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u5206\u6790
AnalysisReportAccessDialog.generateSuccess=\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u5206\u6790\u304C\u6B63\u3057\u304F\u5B8C\u4E86\u3057\u307E\u3057\u305F\u3002
AnalysisReportAccessDialog.completeReportAvailable=\u30EC\u30DD\u30FC\u30C8\u3092\u30C1\u30A7\u30C3\u30AF
AnalysisReportAccessDialog.accessReport=\u3053\u3061\u3089
AnalysisReportAccessDialog.accessBrowse=\u53C2\u7167...
AbstractPomTemplateProjectSettingPage.defaultTabLabel=\u30C7\u30D5\u30A9\u30EB\u30C8
AbstractPomTemplateProjectSettingPage.customTabLabel=\u30AB\u30B9\u30BF\u30E0
AbstractPomTemplateProjectSettingPage.previewButton=\u30D7\u30EC\u30D3\u30E5\u30FC

View File

@@ -640,7 +640,7 @@ TalendLibsServerManager.cannotGetUserLibraryServer=\u65E0\u6CD5\u4ECE\u8FDC\u7A0
MigrationReportAccessDialog.title=\u5DE5\u7A0B\u9879\u76EE\u8FC1\u79FB
MigrationReportAccessDialog.migrateSuccess=\u5DE5\u7A0B\u9879\u76EE\u8FC1\u79FB\u6210\u529F\u3002
MigrationReportAccessDialog.completeReportAvailable=\u8BF7\u68C0\u67E5\u62A5\u544A
MigrationReportAccessDialog.accessReport=\u6B64\u5904
MigrationReportAccessDialog.accessBrowse=\u6D4F\u89C8...
MigrationReportAccessDialog.provideAnalysisTool=\u60A8\u73B0\u5728\u53EF\u4EE5\u8FD0\u884C\u5DE5\u7A0B\u5206\u6790\u4EE5\u5206\u6790\u8FC1\u79FB\u7684\u5DE5\u7A0B\u3002\u6B64\u5B9E\u9A8C\u6027\u5DE5\u5177\u5C06\u751F\u6210\u4E00\u4EFD\u5206\u6790\u62A5\u544A\uFF0C\u5176\u4E2D\u5305\u542B:
MigrationReportAccessDialog.listOfProblems=- \u9700\u8981\u624B\u52A8\u4FEE\u590D\u7684\u9879\u76EE\u6E05\u5355\u3002
MigrationReportAccessDialog.listItems=- \u9700\u8981\u68C0\u67E5\u7684\u9879\u76EE\u6E05\u5355\u3002
@@ -655,7 +655,7 @@ ItemAnalysisReportManager.Warning.message=\u73B0\u5728\u65E0\u6CD5\u8FD0\u884C\u
AnalysisReportAccessDialog.shellTitle=\u5DE5\u7A0B\u5206\u6790
AnalysisReportAccessDialog.generateSuccess=\u5DE5\u7A0B\u5206\u6790\u6210\u529F\u5B8C\u6210\u3002
AnalysisReportAccessDialog.completeReportAvailable=\u8BF7\u68C0\u67E5\u62A5\u544A
AnalysisReportAccessDialog.accessReport=\u6B64\u5904
AnalysisReportAccessDialog.accessBrowse=\u6D4F\u89C8...
AbstractPomTemplateProjectSettingPage.defaultTabLabel=\u9ED8\u8BA4
AbstractPomTemplateProjectSettingPage.customTabLabel=\u81EA\u5B9A\u4E49
AbstractPomTemplateProjectSettingPage.previewButton=\u9884\u89C8

View File

@@ -211,6 +211,9 @@ public class ModuleAccessHelper {
}
private static boolean hasExtraSettings(EList<ElementParameterType> parameters) {
if (parameters == null) {
return false;
}
Map<String, String> paramMap = parameters.stream().filter(p -> p.getName() != null && p.getValue() != null)
.collect(Collectors.toMap(ElementParameterType::getName, ElementParameterType::getValue, (a1, a2) -> a1));
// Implicit context
@@ -243,6 +246,11 @@ public class ModuleAccessHelper {
if ("ID".equals(property.getId()) && "Mock_job_for_Guess_schema".equals(property.getLabel())) {
return true;
}
// TDQ-21668: only for fix generate ThresholdViolationAlert job failed
if (property.getLabel().startsWith("ThresholdViolationAlert")) { //$NON-NLS-1$
return true;
}
// TDQ-21668~
Class<?> clazz = process.getClass();
// preview process
if (CLASS_PREVIEW_PROCESS.equals(clazz.getName()) || CLASS_PREVIEW_PROCESS.equals(clazz.getSuperclass().getName())) {

View File

@@ -14,6 +14,7 @@ package org.talend.core.service;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.IService;
import org.talend.signon.util.PAT;
import org.talend.signon.util.TokenMode;
import org.talend.signon.util.listener.LoginEventListener;
@@ -27,7 +28,7 @@ public interface ICloudSignOnService extends IService {
boolean hasValidToken() throws Exception;
String getTokenUser(String url, TokenMode token) throws Exception;
String getTokenUser(String url, String token) throws Exception;
void signonCloud(LoginEventListener listener) throws Exception;
@@ -53,4 +54,21 @@ public interface ICloudSignOnService extends IService {
}
return null;
}
/**
* Introspect PAT to retrieve the pat_created date and user info
* @param pat Personal access token of TMC
* @param dataCenter data center of TMC
* @return Introspected PAT
*/
PAT introspectPAT(String pat, String dataCenter) throws Exception;
/**
* Introspect pat and check whether pat is allowed
*
* @param pat Personal access token
* @param tmcUrl tmc url
* @return valid or not
*/
boolean validatePAT(String pat, String tmcUrl) throws Exception;
}

View File

@@ -23,8 +23,6 @@ import org.talend.core.pendo.properties.IPendoDataProperties;
*/
public interface ICoreTisRuntimeService extends IService {
String getTmcUser(String url, String token);
AbstractPendoTrackManager getPendoProjectLoginManager();
AbstractPendoTrackManager getPendoGenericManager(TrackEvent event, IPendoDataProperties peoperties);

View File

@@ -149,6 +149,10 @@ public interface IStudioLiteP2Service extends IService {
void cleanM2(IProgressMonitor monitor);
boolean isCompatibleUpdate() throws Exception;
String getCompatibleMessage() throws Exception;
public static IStudioLiteP2Service get() {
if (GlobalServiceRegister.getDefault().isServiceRegistered(IStudioLiteP2Service.class)) {
return GlobalServiceRegister.getDefault().getService(IStudioLiteP2Service.class);

View File

@@ -19,6 +19,7 @@ import org.eclipse.jface.wizard.Wizard;
import org.eclipse.swt.graphics.Image;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.IService;
import org.talend.core.model.components.IComponent;
import org.talend.core.model.metadata.builder.connection.Connection;
import org.talend.core.model.repository.ERepositoryObjectType;
import org.talend.core.model.repository.IRepositoryViewObject;
@@ -42,6 +43,8 @@ public interface ITCKUIService extends IService {
Wizard createTCKWizard(String type, IPath path, boolean isNew);
Wizard editTCKWizard(RepositoryNode node);
String getComponentFamilyName(IComponent component);
public static ITCKUIService get() {
if (GlobalServiceRegister.getDefault().isServiceRegistered(ITCKUIService.class)) {

View File

@@ -36,4 +36,7 @@ public interface IReferenceProjectProvider {
public void initSettings() throws BusinessException, PersistenceException;
public boolean isHasConfigurationFile();
void resetReferenceProjectList();
}

View File

@@ -251,6 +251,12 @@ public class ReferenceProjectProvider implements IReferenceProjectProvider {
public static void removeTacReferenceList(String projectLabel) {
tacReferenceMap.remove(projectLabel);
}
@Override
public void resetReferenceProjectList() {
referenceProjectList = null;
}
}
class ReferenceProjectConfiguration {

View File

@@ -22,6 +22,7 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.log4j.Logger;
import org.eclipse.core.runtime.CoreException;
import org.talend.core.model.properties.Item;
import org.talend.core.model.properties.ProcessItem;
@@ -41,6 +42,7 @@ import org.talend.repository.model.IRepositoryNode;
*
*/
public class ExportFileResource {
private static Logger LOGGER = Logger.getLogger(ExportFileResource.class);
private Item item;
@@ -101,7 +103,7 @@ public class ExportFileResource {
String decodeStr = URLDecoder.decode(url.toString(), "UTF-8"); //$NON-NLS-1$
url = new URL(decodeStr);
} catch (Exception e) {
e.printStackTrace(); // only for debug.
LOGGER.warn(e);
}
return url;

View File

@@ -499,6 +499,7 @@ public class RepositoryNodeUtilities {
|| curType == ERepositoryObjectType.METADATA_CON_SYNONYM
|| curType == ERepositoryObjectType.METADATA_CON_QUERY
|| curType == ERepositoryObjectType.METADATA_CONNECTIONS
|| curType == ERepositoryObjectType.METADATA_TACOKIT_JDBC
|| curType == ERepositoryObjectType.METADATA_FILE_DELIMITED
|| curType == ERepositoryObjectType.METADATA_FILE_POSITIONAL
|| curType == ERepositoryObjectType.METADATA_FILE_REGEXP
@@ -525,12 +526,13 @@ public class RepositoryNodeUtilities {
tmpType = ERepositoryObjectType.DOCUMENTATION;
}
if (tmpType != null && tmpType == rootContextType) {
if (tmpType != null && (tmpType == rootContextType || rootContextType.isChildTypeOf(tmpType))) {
expandParentNode(view, rootNode);
}
// expand the parent node
if (curType == rootContextType && isRepositoryFolder(rootNode)) {
if ((curType == rootContextType || curType.isChildTypeOf(rootContextType))
&& isRepositoryFolder(rootNode)) {
if (rootContextType == ERepositoryObjectType.SQLPATTERNS
&& !(rootNode.getParent() instanceof IProjectRepositoryNode)) {
// sql pattern
@@ -718,7 +720,7 @@ public class RepositoryNodeUtilities {
if (GlobalServiceRegister.getDefault().isServiceRegistered(IGenericWizardService.class)) {
wizardService = GlobalServiceRegister.getDefault().getService(IGenericWizardService.class);
}
if (wizardService != null && wizardService.isGenericType(type)) {
if (wizardService != null && wizardService.isGenericType(type) || ERepositoryObjectType.METADATA_TACOKIT_JDBC == type) {
return getGenericSchemaNode(connection, tableName);
}
if (repType == ERepositoryObjectType.METADATA_CON_QUERY) {

View File

@@ -108,6 +108,8 @@ public class ContextNebulaGridComposite extends AbstractContextTabEditComposite
private Button manageEnvironmentsButton;
private Button wrapButton;
private ContextManagerHelper helper;
private List<Button> buttonList;
@@ -229,8 +231,11 @@ public class ContextNebulaGridComposite extends AbstractContextTabEditComposite
}
private void createButtonsGroup(Composite parentComposite) {
boolean isRepositoryContext = (modelManager instanceof ContextComposite)
&& ((ContextComposite) modelManager).isRepositoryContext();
int columnNum = isRepositoryContext ? 5 : 7;
buttonsComp = new Composite(parentComposite, SWT.NULL);
buttonsComp.setLayout(GridLayoutFactory.swtDefaults().spacing(5, 0).margins(5, 0).numColumns(7).create());
buttonsComp.setLayout(GridLayoutFactory.swtDefaults().spacing(10, 0).margins(5, 0).numColumns(columnNum).create());
GridDataFactory.swtDefaults().align(SWT.FILL, SWT.DOWN).grab(true, false).applyTo(buttonsComp);
buttonList.clear();
addButton = createAddPushButton(buttonsComp);
@@ -238,8 +243,6 @@ public class ContextNebulaGridComposite extends AbstractContextTabEditComposite
removeButton = createRemovePushButton(buttonsComp);
buttonList.add(removeButton);
boolean isRepositoryContext = (modelManager instanceof ContextComposite)
&& ((ContextComposite) modelManager).isRepositoryContext();
if (!isRepositoryContext) {// for bug 7393
moveUpButton = createMoveUpPushButton(buttonsComp);
buttonList.add(moveUpButton);
@@ -253,14 +256,16 @@ public class ContextNebulaGridComposite extends AbstractContextTabEditComposite
}
createEnvironmentsGroup(buttonsComp);
wrapButton = createWrapButton(buttonsComp);
}
private void createEnvironmentsGroup(Composite parentComposite) {
Composite environmentsComp = new Composite(parentComposite, SWT.NULL);
environmentsComp.setLayout(new GridLayout(2, false));
GridLayout gridLayout = new GridLayout(2, false);
gridLayout.horizontalSpacing = 10;
environmentsComp.setLayout(gridLayout);
GridData contextComboData = new GridData();
contextComboData.grabExcessHorizontalSpace = true;
contextComboData.horizontalAlignment = GridData.END;
environmentsComp.setLayoutData(contextComboData);
viewEnvironmentsCombo = new CCombo(environmentsComp, SWT.BORDER);
@@ -547,6 +552,35 @@ public class ContextNebulaGridComposite extends AbstractContextTabEditComposite
return selectContextVariablesPushButton;
}
private Button createWrapButton(final Composite parent) {
Button wrapToggleButton = new Button(parent, SWT.TOGGLE);
wrapToggleButton.setBackground(parent.getBackground());
GridData gridData = new GridData();
gridData.grabExcessHorizontalSpace = true;
gridData.horizontalAlignment = GridData.END;
Image image = ImageProvider.getImage(EImage.WRAP_ICON);
IContextManager contextManager = getContextManager();
if (contextManager instanceof JobContextManager) {
JobContextManager jobContextManager = (JobContextManager) contextManager;
wrapToggleButton.setSelection(jobContextManager.isWrapContextText());
}
wrapToggleButton.setImage(image);
wrapToggleButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
IContextManager contextManager = getContextManager();
if (contextManager instanceof JobContextManager) {
JobContextManager jobContextManager = (JobContextManager) contextManager;
jobContextManager.setWrapContextText(wrapToggleButton.getSelection());
}
refresh();
}
});
return wrapToggleButton;
}
private void setButtonEnableState() {
boolean enableState = !modelManager.isReadOnly();
if (this.addButton != null) {
@@ -570,6 +604,13 @@ public class ContextNebulaGridComposite extends AbstractContextTabEditComposite
if (contextsCombo != null) {
this.contextsCombo.setEnabled(enableState);
}
if (wrapButton != null) {
IContextManager contextManager = getContextManager();
if (contextManager instanceof JobContextManager) {
JobContextManager jobContextManager = (JobContextManager) contextManager;
wrapButton.setSelection(jobContextManager.isWrapContextText());
}
}
}
public Object createNewEntry() {

View File

@@ -20,6 +20,7 @@ import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang.StringUtils;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.ISelectionProvider;
@@ -34,6 +35,7 @@ import org.eclipse.nebula.widgets.nattable.config.DefaultComparator;
import org.eclipse.nebula.widgets.nattable.config.IConfigRegistry;
import org.eclipse.nebula.widgets.nattable.data.IColumnPropertyAccessor;
import org.eclipse.nebula.widgets.nattable.data.IDataProvider;
import org.eclipse.nebula.widgets.nattable.edit.event.DataUpdateEvent;
import org.eclipse.nebula.widgets.nattable.extension.glazedlists.DetailGlazedListsEventLayer;
import org.eclipse.nebula.widgets.nattable.extension.glazedlists.GlazedListsDataProvider;
import org.eclipse.nebula.widgets.nattable.extension.glazedlists.GlazedListsSortModel;
@@ -56,10 +58,18 @@ import org.eclipse.nebula.widgets.nattable.group.ColumnGroupModel.ColumnGroup;
import org.eclipse.nebula.widgets.nattable.group.ColumnGroupReorderLayer;
import org.eclipse.nebula.widgets.nattable.hideshow.ColumnHideShowLayer;
import org.eclipse.nebula.widgets.nattable.hideshow.RowHideShowLayer;
import org.eclipse.nebula.widgets.nattable.layer.AbstractIndexLayerTransform;
import org.eclipse.nebula.widgets.nattable.layer.AbstractLayerTransform;
import org.eclipse.nebula.widgets.nattable.layer.DataLayer;
import org.eclipse.nebula.widgets.nattable.layer.ILayer;
import org.eclipse.nebula.widgets.nattable.layer.ILayerListener;
import org.eclipse.nebula.widgets.nattable.layer.cell.ColumnOverrideLabelAccumulator;
import org.eclipse.nebula.widgets.nattable.layer.cell.ILayerCell;
import org.eclipse.nebula.widgets.nattable.layer.config.DefaultColumnHeaderStyleConfiguration;
import org.eclipse.nebula.widgets.nattable.layer.event.ILayerEvent;
import org.eclipse.nebula.widgets.nattable.layer.event.RowDeleteEvent;
import org.eclipse.nebula.widgets.nattable.layer.event.RowInsertEvent;
import org.eclipse.nebula.widgets.nattable.layer.event.RowStructuralChangeEvent;
import org.eclipse.nebula.widgets.nattable.painter.cell.TextPainter;
import org.eclipse.nebula.widgets.nattable.painter.layer.NatGridLayerPainter;
import org.eclipse.nebula.widgets.nattable.reorder.ColumnReorderLayer;
@@ -92,7 +102,9 @@ import org.eclipse.swt.widgets.Event;
import org.talend.commons.exception.PersistenceException;
import org.talend.commons.ui.runtime.ColorConstants;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.model.context.JobContextManager;
import org.talend.core.model.process.IContext;
import org.talend.core.model.process.IContextManager;
import org.talend.core.model.process.IContextParameter;
import org.talend.core.model.repository.ERepositoryObjectType;
import org.talend.core.model.repository.IRepositoryViewObject;
@@ -149,6 +161,10 @@ public class ContextTreeTable {
private final static int fixedTypeWidth = 100;
private final static int minDefultHeight = 20;
private final static int maxDefaultWidth = 400;
public ContextTreeTable(IContextModelManager manager) {
this.manager = manager;
}
@@ -421,6 +437,101 @@ public class ContextTreeTable {
currentNatTabSel = (IStructuredSelection) event.getSelection();
}
});
this.natTable.addLayerListener(new ILayerListener() {
@Override
public void handleLayerEvent(ILayerEvent event) {
// DataUpdateEvent->Data change, RowInsertEvent->node expand, RowDeleteEvent->node collapse
if (event instanceof DataUpdateEvent) {
// data changed then execute here no need compare value
DataUpdateEvent dataEvent = (DataUpdateEvent) event;
ILayer layer = dataEvent.getLayer();
DataLayer dataLayer = getDataLayer(layer);
if (dataLayer == null) {
return;
}
int rowPosition = dataEvent.getRowPosition();
int columnPosition = dataEvent.getColumnPosition();
if (layer instanceof GridLayer) {
GridLayer gridLayer = (GridLayer) layer;
rowPosition = rowPosition - gridLayer.getColumnHeaderLayer().getRowCount();
columnPosition = columnPosition - gridLayer.getRowHeaderLayer().getColumnCount();
}
String text = dataEvent.getNewValue() == null ? "" : dataEvent.getNewValue().toString();
GC gc = new GCFactory(natTable).createGC();
Point point = gc.textExtent(text, SWT.DRAW_MNEMONIC);
int textLength = point.x;
int currentColumnWidth = layer.getColumnWidthByPosition(columnPosition);
if (textLength > layer.getColumnWidthByPosition(columnPosition)) {
if (textLength > maxDefaultWidth) {
int columnWidth = Math.max(currentColumnWidth, maxDefaultWidth);
dataLayer.setColumnWidthByPosition(columnPosition, columnWidth);
} else {
int columnWidth = getColumWidth(gc, dataLayer, columnPosition);
dataLayer.setColumnWidthByPosition(columnPosition, columnWidth);
}
}
int promptColPos = dataLayer.getColumnPositionByIndex(3);
IContextManager contextManager = manager.getContextManager();
if (contextManager instanceof JobContextManager) {
JobContextManager jobContextManager = (JobContextManager) contextManager;
if (jobContextManager.isWrapContextText()) {
int rowHeight = getRowHeight(gc, dataLayer, rowPosition, promptColPos);
dataLayer.setRowHeightByPosition(rowPosition, rowHeight);
}
}
gc.dispose();
} else if (event instanceof RowInsertEvent || event instanceof RowDeleteEvent) {
RowStructuralChangeEvent changeEvent = (RowStructuralChangeEvent) event;
ILayer layer = changeEvent.getLayer();
DataLayer dataLayer = getDataLayer(layer);
List<Integer> checkPos = new ArrayList<Integer>();
checkPos.add(3);
adjustCellWidthHeight(dataLayer, checkPos);
}
}
});
}
private DataLayer getDataLayer(ILayer layer) {
DataLayer dataLayer = null;
if (layer instanceof GridLayer) {
GridLayer gridLayer = (GridLayer) layer;
ILayer bodyLayer = gridLayer.getBodyLayer();
if (bodyLayer instanceof AbstractLayerTransform) {
AbstractLayerTransform childLayer = (AbstractLayerTransform) bodyLayer;
dataLayer = findDataLayerByUnderlyingLayer(childLayer);
}
} else if (layer instanceof DataLayer) {
dataLayer = (DataLayer) layer;
} else if (layer instanceof AbstractLayerTransform || layer instanceof AbstractIndexLayerTransform) {
dataLayer = findDataLayerByUnderlyingLayer(layer);
}
return dataLayer;
}
private DataLayer findDataLayerByUnderlyingLayer(ILayer layer) {
// only 1 underlyingLayer set on AbstractLayerTransform / AbstractIndexLayerTransform
ILayer underlyingLayer = null;
if (layer instanceof AbstractLayerTransform) {
AbstractLayerTransform layerTransform = (AbstractLayerTransform) layer;
underlyingLayer = layerTransform.getUnderlyingLayerByPosition(0, 0);
} else if (layer instanceof AbstractIndexLayerTransform) {
AbstractIndexLayerTransform layerTransform = (AbstractIndexLayerTransform) layer;
underlyingLayer = layerTransform.getUnderlyingLayerByPosition(0, 0);
}
if (underlyingLayer instanceof DataLayer) {
return (DataLayer) underlyingLayer;
} else if (underlyingLayer instanceof AbstractLayerTransform) {
AbstractLayerTransform childLayer = (AbstractLayerTransform) underlyingLayer;
return findDataLayerByUnderlyingLayer(childLayer);
} else if (underlyingLayer instanceof AbstractIndexLayerTransform) {
AbstractIndexLayerTransform childLayer = (AbstractIndexLayerTransform) underlyingLayer;
return findDataLayerByUnderlyingLayer(childLayer);
}
return null;
}
private List<Integer> getAllCheckPosBehaviour(IContextModelManager manager, ColumnGroupModel contextGroupModel) {
@@ -448,58 +559,108 @@ public class ContextTreeTable {
dataLayer.setColumnWidthByPosition(i, averageWidth);
}
} else {
int typeColumnPos = dataLayer.getColumnPositionByIndex(1);
int leftWidth = maxWidth - fixedTypeWidth - fixedCheckBoxWidth * checkColumnsPos.size() - cornerWidth * 2;
int currentColumnsCount = dataColumnsCount - checkColumnsPos.size() - 1;
int averageWidth = leftWidth / currentColumnsCount;
for (int i = 0; i < dataLayer.getColumnCount(); i++) {
boolean findHide = false;
boolean findCheck = false;
boolean findType = false;
if (typeColumnPos == i) {
findType = true;
dataLayer.setColumnWidthByPosition(i, fixedTypeWidth);
}
for (int checkPos : checkColumnsPos) {
if (checkPos == i) {
findCheck = true;
dataLayer.setColumnWidthByPosition(i, fixedCheckBoxWidth);
}
}
if (!findHide && !findCheck && !findType) {
int colW = getColumWidth(dataLayer, i, averageWidth);
dataLayer.setColumnWidthByPosition(i, colW);
}
}
adjustCellWidthHeight(dataLayer, checkColumnsPos);
}
}
private int getColumWidth(DataLayer dataLayer, int colPos, int avgWidth) {
int colWidth = fixedTypeWidth;
private void adjustCellWidthHeight(DataLayer dataLayer, List<Integer> checkColumnsPos) {
int typeColumnPos = dataLayer.getColumnPositionByIndex(1);
GC gc = new GCFactory(natTable).createGC();
for (int i = 0; i < dataLayer.getColumnCount(); i++) {
boolean findCheck = false;
boolean findType = false;
if (typeColumnPos == i) {
findType = true;
dataLayer.setColumnWidthByPosition(i, fixedTypeWidth);
}
for (int checkPos : checkColumnsPos) {
if (checkPos == i) {
findCheck = true;
dataLayer.setColumnWidthByPosition(i, fixedCheckBoxWidth);
}
}
if (!findCheck && !findType) {
int colW = getColumWidth(gc, dataLayer, i);
dataLayer.setColumnWidthByPosition(i, colW);
}
}
// setColumnWidthByPosition final scaled by DPI, set height according final width
int promptColPos = dataLayer.getColumnPositionByIndex(3);
IContextManager contextManager = manager.getContextManager();
if (contextManager instanceof JobContextManager) {
JobContextManager jobContextManager = (JobContextManager) contextManager;
if (jobContextManager.isWrapContextText()) {
for (int i = 0; i < dataLayer.getPreferredRowCount(); i++) {
int rowHeight = getRowHeight(gc, dataLayer, i, promptColPos);
dataLayer.setRowHeightByPosition(i, rowHeight);
}
}
}
gc.dispose();
}
private int getColumWidth(GC gc, DataLayer dataLayer, int colPos) {
int colWidth = fixedTypeWidth;
int max = 0;
String text = "";
for (int i = 0; i < dataLayer.getPreferredRowCount(); i++) {
Object dataValueByPosition = dataLayer.getDataValueByPosition(colPos, i);
if (dataValueByPosition == null) {
if (dataValueByPosition == null || StringUtils.isBlank(dataValueByPosition.toString())) {
continue;
}
text = dataValueByPosition.toString();
Point size = gc.textExtent(text, SWT.DRAW_MNEMONIC);
int temp = size.x;
if (temp > max) {
max = temp;
int textWidth = size.x;
if (textWidth > max) {
max = textWidth;
}
}
gc.dispose();
if (max > colWidth) {
max = (int) (max - text.getBytes().length * 1.5);
if (max > maxDefaultWidth) {
max = maxDefaultWidth;
}
}
return colWidth > max ? colWidth : max;
}
private int getRowHeight(GC gc, DataLayer dataLayer, int rowPos, int promptColPos) {
int maxHeight = minDefultHeight;
for (int j = 0; j < dataLayer.getColumnCount(); j++) {
// only check value column height
if (j <= promptColPos) {
continue;
}
Object dataValueByPosition = dataLayer.getDataValueByPosition(j, rowPos);
if (dataValueByPosition == null || StringUtils.isBlank(dataValueByPosition.toString())) {
continue;
}
String text = dataValueByPosition.toString();
Point size = gc.textExtent(text, SWT.DRAW_MNEMONIC);
int textWidth = size.x;
int textHeight = size.y;
String[] lines = text.split(TextPainter.NEW_LINE_REGEX);
int columnWidth = dataLayer.getColumnWidthByPosition(j);
if (textWidth >= columnWidth || lines.length > 1) {
int heightCount = 0;
for (String line : lines) {
int lineWidth = gc.textExtent(line).x;
if (lineWidth < columnWidth) {
heightCount++;
} else {
heightCount += lineWidth / columnWidth;
heightCount += lineWidth % columnWidth == 0 ? 0 : 1;
}
}
int cellheight = textHeight * heightCount;
maxHeight = Math.max(maxHeight, dataLayer.downScaleRowHeight(cellheight));
} else {
maxHeight = Math.max(maxHeight, textHeight);
}
}
return maxHeight;
}
private void addCustomSelectionBehaviour(SelectionLayer layer) {
// need control the selection style when select the rows.
DefaultSelectionStyleConfiguration selectStyleConfig = new DefaultSelectionStyleConfiguration();

View File

@@ -0,0 +1,84 @@
// ============================================================================
//
// 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.core.ui.context;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.talend.commons.ui.runtime.ITalendThemeService;
import org.talend.commons.ui.swt.colorstyledtext.ColorStyledText;
/**
* DOC jding class global comment. Detailled comment
*/
public class StringTextDialog extends Dialog {
private String content;
private Text text;
public StringTextDialog(Shell parentShell) {
super(parentShell);
}
public StringTextDialog(Shell parentShell, String content) {
super(parentShell);
this.content = content;
}
@Override
protected boolean isResizable() {
return true;
}
@Override
protected void configureShell(Shell shell) {
super.configureShell(shell);
shell.setText("Enter the value");
}
@Override
protected Control createDialogArea(Composite parent) {
Composite composite = new Composite(parent, SWT.NONE);
GridData gd = new GridData(GridData.FILL_BOTH);
gd.widthHint = 640;
gd.heightHint = 260;
composite.setLayoutData(gd);
composite.setLayout(new GridLayout());
text = new Text(composite, SWT.WRAP | SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.LEFT);
text.setForeground(ITalendThemeService.getColor(ColorStyledText.PREFERENCE_COLOR_FOREGROUND).orElse(null));
text.setBackground(ITalendThemeService.getColor(ColorStyledText.PREFERENCE_COLOR_BACKGROUND).orElse(null));
text.setLayoutData(new GridData(GridData.FILL_BOTH));
text.setText(content);
text.addModifyListener(new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
content = text.getText();
}
});
return composite;
}
public String getTextContent() {
return content;
}
}

View File

@@ -37,7 +37,9 @@ import org.eclipse.nebula.widgets.nattable.painter.cell.ImagePainter;
import org.eclipse.nebula.widgets.nattable.style.CellStyleAttributes;
import org.eclipse.nebula.widgets.nattable.style.CellStyleUtil;
import org.eclipse.nebula.widgets.nattable.style.DisplayMode;
import org.eclipse.nebula.widgets.nattable.style.HorizontalAlignmentEnum;
import org.eclipse.nebula.widgets.nattable.style.Style;
import org.eclipse.nebula.widgets.nattable.style.VerticalAlignmentEnum;
import org.eclipse.nebula.widgets.nattable.ui.util.CellEdgeEnum;
import org.eclipse.nebula.widgets.nattable.util.GUIHelper;
import org.eclipse.swt.graphics.Color;
@@ -128,7 +130,11 @@ public class ContextNatTableConfiguration extends AbstractRegistryConfiguration
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyleDefault, DisplayMode.NORMAL,
ContextTableConstants.COLUMN_CHECK_PROPERTY);
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyleDefault, DisplayMode.NORMAL,
Style valueCellStyleDefault = new Style();
valueCellStyleDefault.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR, ColorConstants.getTableBackgroundColor());
valueCellStyleDefault.setAttributeValue(CellStyleAttributes.HORIZONTAL_ALIGNMENT, HorizontalAlignmentEnum.LEFT);
valueCellStyleDefault.setAttributeValue(CellStyleAttributes.VERTICAL_ALIGNMENT, VerticalAlignmentEnum.TOP);
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, valueCellStyleDefault, DisplayMode.NORMAL,
ContextTableConstants.COLUMN_CONTEXT_VALUE);
Style cellStyleSelect = new Style();
@@ -146,6 +152,10 @@ public class ContextNatTableConfiguration extends AbstractRegistryConfiguration
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyleSelect, DisplayMode.SELECT,
ContextTableConstants.COLUMN_CHECK_PROPERTY);
Style valueCellStyleSelect = new Style();
valueCellStyleSelect.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR, GUIHelper.COLOR_TITLE_INACTIVE_BACKGROUND);
valueCellStyleSelect.setAttributeValue(CellStyleAttributes.FONT, GUIHelper.DEFAULT_FONT);
valueCellStyleSelect.setAttributeValue(CellStyleAttributes.HORIZONTAL_ALIGNMENT, HorizontalAlignmentEnum.LEFT);
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyleSelect, DisplayMode.SELECT,
ContextTableConstants.COLUMN_CONTEXT_VALUE);
}
@@ -317,6 +327,13 @@ public class ContextNatTableConfiguration extends AbstractRegistryConfiguration
ProxyDynamicCellEditor cutomCellEditor = new ProxyDynamicCellEditor(dataProvider, manager, modelManager);
configRegistry.registerConfigAttribute(EditConfigAttributes.CELL_EDITOR, cutomCellEditor, DisplayMode.EDIT,
ContextTableConstants.COLUMN_CONTEXT_VALUE);
ContextAutoResizeTextPainter customPainter = new ContextAutoResizeTextPainter(true, false, false);
customPainter.setWordWrapping(true);
ContextNatTableBackGroudPainter backGroudPainter = new ContextNatTableBackGroudPainter(customPainter, dataProvider);
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_PAINTER, backGroudPainter, DisplayMode.NORMAL,
ContextTableConstants.COLUMN_CONTEXT_VALUE);
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_PAINTER, backGroudPainter, DisplayMode.SELECT,
ContextTableConstants.COLUMN_CONTEXT_VALUE);
}
private void registerColumnFiveTextEditor(IConfigRegistry configRegistry) {

View File

@@ -15,6 +15,7 @@ package org.talend.core.ui.context.nattableTree;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang.StringUtils;
import org.eclipse.nebula.widgets.nattable.style.CellStyleAttributes;
import org.eclipse.nebula.widgets.nattable.style.HorizontalAlignmentEnum;
import org.eclipse.nebula.widgets.nattable.style.IStyle;
@@ -109,9 +110,12 @@ public class ContextValuesNatText extends Composite {
if (NatTableCellEditorFactory.isPassword(realPara.getType())) {
widgetStyle = SWT.PASSWORD | HorizontalAlignmentEnum.getSWTStyle(cellStyle);
}
if (NatTableCellEditorFactory.isResource(realPara.getType())) {
if (NatTableCellEditorFactory.isResource(realPara.getType()) || NatTableCellEditorFactory.isList(realPara.getType())) {
widgetStyle = SWT.READ_ONLY | HorizontalAlignmentEnum.getSWTStyle(cellStyle);
}
if (NatTableCellEditorFactory.isString(realPara.getType())) {
widgetStyle = widgetStyle | SWT.WRAP | SWT.MULTI | SWT.V_SCROLL;
}
text = new Text(this, widgetStyle);
text.setBackground(cellStyle.getAttributeValue(CellStyleAttributes.BACKGROUND_COLOR));
text.setForeground(cellStyle.getAttributeValue(CellStyleAttributes.FOREGROUND_COLOR));
@@ -235,6 +239,7 @@ public class ContextValuesNatText extends Composite {
*/
protected String getTransformedSelection(boolean focusOnText) {
Object result = null;
validateValue();
result = cellFactory.openCustomCellEditor(realPara, getShell());
String finalResult = "";
if (result == null || result.equals("")) {
@@ -251,6 +256,14 @@ public class ContextValuesNatText extends Composite {
return finalResult;
}
private void validateValue() {
// possible value modified manually
// notify focuslost to commit value might execute after dialog open in some os
if (NatTableCellEditorFactory.isString(realPara.getType()) && !StringUtils.equals(realPara.getValue(), text.getText())) {
realPara.setValue(text.getText());
}
}
protected String getTransformedTextForDialog(boolean focusOnText) {
String result = "";
result = getTransformedSelection(focusOnText);

View File

@@ -25,6 +25,8 @@ import org.eclipse.nebula.widgets.nattable.style.Style;
import org.eclipse.nebula.widgets.nattable.util.GUIHelper;
import org.eclipse.nebula.widgets.nattable.widget.EditModeEnum;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.FocusAdapter;
import org.eclipse.swt.events.FocusEvent;
import org.eclipse.swt.events.KeyAdapter;
import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.widgets.Composite;
@@ -78,6 +80,33 @@ public class CustomTextCellEditor extends AbstractCellEditor {
this.cellStyle = cellStyle;
this.commitOnUpDown = commitOnUpDown;
this.moveSelectionOnEnter = moveSelectionOnEnter;
this.focusListener = new FocusAdapter() {
@Override
public void focusLost(FocusEvent e) {
// overwrite org.eclipse.nebula.widgets.nattable.edit.editor.AbstractCellEditor.InlineFocusListener
// set closeAfterCommit to false
if (!commit(MoveDirectionEnum.NONE, false)) {
if (!e.widget.isDisposed() && e.widget instanceof Control) {
((Control) e.widget).forceFocus();
}
} else {
if (!CustomTextCellEditor.this.parent.isDisposed()) {
CustomTextCellEditor.this.parent.forceFocus();
}
}
}
};
}
@Override
public void addEditorControlListeners() {
Control editorControl = getEditorControl();
if (editorControl != null && !editorControl.isDisposed() && this.editMode == EditModeEnum.INLINE) {
editorControl.addFocusListener(this.focusListener);
editorControl.addTraverseListener(this.traverseListener);
}
}
/*

View File

@@ -27,6 +27,7 @@ import org.talend.core.model.metadata.types.JavaTypesManager;
import org.talend.core.model.process.IContextParameter;
import org.talend.core.service.IResourcesDependenciesService;
import org.talend.core.ui.context.MultiStringSelectionDialog;
import org.talend.core.ui.context.StringTextDialog;
import org.talend.core.utils.TalendQuoteUtils;
/**
@@ -44,7 +45,7 @@ public class NatTableCellEditorFactory {
String currentType = para.getType();
if (currentType != null) {
if (isFile(currentType) || isDate(currentType) || isDirectory(currentType) || isList(currentType)
|| isResource(currentType)) {
|| isResource(currentType) || isString(currentType)) {
return true;
}
}
@@ -67,6 +68,8 @@ public class NatTableCellEditorFactory {
defalutDataValue = para.getDisplayValue();
} else if (isResource(currentType)) {
transformResult = openResourcesDialogForCellEditor(parentShell, para);
} else if (isString(currentType)) {
transformResult = openStringDialogFoeCellEditor(parentShell, para);
}
}
return transformResult;
@@ -140,6 +143,15 @@ public class NatTableCellEditorFactory {
return ContextNatTableUtils.getSpecialTypeDisplayValue(JavaTypesManager.RESOURCE.getId(), value);
}
private String openStringDialogFoeCellEditor(Shell parentShell, IContextParameter para) {
StringTextDialog stringTextDialog = new StringTextDialog(parentShell, para.getValue());
int open = stringTextDialog.open();
if (open == Dialog.OK) {
return stringTextDialog.getTextContent();
}
return "";
}
public static String getAddQuoteString(String path) {
ECodeLanguage codeLanguage = LanguageManager.getCurrentLanguage();
if (codeLanguage == ECodeLanguage.PERL) {
@@ -184,6 +196,10 @@ public class NatTableCellEditorFactory {
return MetadataToolHelper.isResource(value);
}
public static boolean isString(final String value) {
return JavaTypesManager.STRING.getId().equals(value);
}
/**
* For the different value between display value and real value, due to nattable model comes from context, if set
* new context parameter value in this factory, then the UpdateDataCommandHandler of nattable will treat this as no

View File

@@ -146,4 +146,13 @@ public class ProxyDynamicCellEditor extends AbstractCellEditor {
return super.commit(direction, closeAfterCommit, skipValidation);
}
@Override
public void addEditorControlListeners() {
if (dynamicEditor != null) {
dynamicEditor.addEditorControlListeners();
} else {
super.addEditorControlListeners();
}
}
}

View File

@@ -16,6 +16,7 @@ import java.util.ArrayList;
import java.util.List;
import org.apache.log4j.Logger;
import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.viewers.TextCellEditor;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CCombo;
@@ -341,7 +342,11 @@ public abstract class AbstractMetadataTableEditorView<B> extends AbstractDataTab
column.setBeanPropertyAccessors(getRowNumAccessor());
column.setWeight(5);
column.setModifiable(false);
column.setMinimumWidth(10);
if (Platform.OS_MACOSX.equals(Platform.getOS())) {
column.setMinimumWidth(10);
} else {
column.setMinimumWidth(30);
}
column.setSortable(true);
}

View File

@@ -30,6 +30,7 @@ import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.exception.LoginException;
import org.talend.commons.exception.PersistenceException;
import org.talend.commons.ui.nofitication.ArrangedNotificationPopup;
import org.talend.commons.utils.generation.JavaUtils;
import org.talend.core.CorePlugin;
import org.talend.core.prefs.ITalendCorePrefConstants;
import org.talend.core.repository.model.ProxyRepositoryFactory;
@@ -79,7 +80,7 @@ public class Java17NotificationPopup extends ArrangedNotificationPopup {
}
public static boolean show() {
return !showOnce() && isJava17() && (!ModuleAccessHelper.allowJavaInternalAcess(null) || !checkInterpreter());
return !showOnce() && JavaUtils.isJava17() && (!ModuleAccessHelper.allowJavaInternalAcess(null) || !checkInterpreter());
}
private static boolean showOnce() {
@@ -132,17 +133,4 @@ public class Java17NotificationPopup extends ArrangedNotificationPopup {
return false;
}
private static boolean isJava17() {
boolean isJava17 = false;
String javaVersion = System.getProperty("java.version");
String[] arr = javaVersion.split("[^\\d]+");
try {
isJava17 = Integer.parseInt(arr[0]) >= 17;
} catch (NumberFormatException e) {
ExceptionHandler.process(e);
isJava17 = false;
}
return isJava17;
}
}

View File

@@ -30,6 +30,8 @@ public interface IGitUIProviderService extends IService {
public String[] changeCredentials(Shell parent, Serializable uriIsh, String initUser, boolean canStoreCredentials);
boolean checkPendingChanges();
boolean checkUncommittedFiles();
public void openPushFailedDialog(Object pushResult);

View File

@@ -15,8 +15,11 @@ package org.talend.core.ui.token;
import org.apache.commons.codec.digest.DigestUtils;
import org.eclipse.jface.preference.IPreferenceStore;
import org.talend.commons.utils.VersionUtils;
import org.talend.commons.utils.generation.JavaUtils;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.prefs.ITalendCorePrefConstants;
import org.talend.core.runtime.CoreRuntimePlugin;
import org.talend.core.runtime.util.SharedStudioUtils;
import org.talend.core.ui.CoreUIPlugin;
import org.talend.core.ui.branding.IBrandingService;
import org.talend.daikon.token.TokenGenerator;
@@ -41,6 +44,10 @@ public class DefaultTokenCollector extends AbstractTokenCollector {
private static final TokenKey OS = new TokenKey("os"); //$NON-NLS-1$
private static final TokenKey SHARE_MODE = new TokenKey("share.mode"); //$NON-NLS-1$
private static final TokenKey ENABLED_JAVA17_COMPATIBILITY = new TokenKey("enabled.java17.compatibility"); //$NON-NLS-1$
public static final String COLLECTOR_SYNC_NB = "COLLECTOR_SYNC_NB"; //$NON-NLS-1$
public DefaultTokenCollector() {
@@ -70,7 +77,7 @@ public class DefaultTokenCollector extends AbstractTokenCollector {
// typeStudio
if (GlobalServiceRegister.getDefault().isServiceRegistered(IBrandingService.class)) {
IBrandingService brandingService = (IBrandingService) GlobalServiceRegister.getDefault().getService(
IBrandingService brandingService = GlobalServiceRegister.getDefault().getService(
IBrandingService.class);
tokenStudioObject.put(TYPE_STUDIO.getKey(), brandingService.getAcronym());
// tokenStudioObject.put(TYPE_STUDIO.getKey(), brandingService.getShortProductName());
@@ -92,6 +99,11 @@ public class DefaultTokenCollector extends AbstractTokenCollector {
tokenStudioObject.put(STOP_COLLECTOR.getKey(), "0"); //$NON-NLS-1$
}
// Share mode
tokenStudioObject.put(SHARE_MODE.getKey(), SharedStudioUtils.isSharedStudioMode());
// Enable Java 17 compatibility
tokenStudioObject.put(ENABLED_JAVA17_COMPATIBILITY.getKey(), CoreRuntimePlugin.getInstance().getProjectPreferenceManager()
.getPreferenceStore().getBoolean(JavaUtils.ALLOW_JAVA_INTERNAL_ACCESS));
return tokenStudioObject;
}
}

View File

@@ -50,7 +50,6 @@ public class DisableLanguageActions implements IStartup {
}
ECodeLanguage lan = LanguageManager.getCurrentLanguage();
switch (lan) {
case JAVA:
ids = Arrays.asList(new String[] { "org.talend.help.perl.OpenPerlHelpAction" }); //$NON-NLS-1$

View File

@@ -1085,7 +1085,7 @@ public class ProcessorUtilities {
if (childBuildType == null) {
Property parentProperty = parentJobInfo.getProcessor().getProperty();
String parentBuildType = (String)parentProperty.getAdditionalProperties().get(TalendProcessArgumentConstant.ARG_BUILD_TYPE);
if ("ROUTE".equalsIgnoreCase(parentBuildType)) {
if (parentBuildType!= null && parentBuildType.contains("ROUTE")) {
childProperty.getAdditionalProperties().put(TalendProcessArgumentConstant.ARG_BUILD_TYPE, "OSGI");
}
}

View File

@@ -333,7 +333,7 @@ _UI_InformationsetModelWizard_description = Cr\u00E9er un mod\u00E8le Informatio
_UI_InformationsetEditor_label = \u00C9diteur de mod\u00E8le Informationset
_UI_InformationsetEditorFilenameDefaultBase = INVISIBLE dans l'interface
_UI_InformationsetEditorFilenameDefaultBase = Mon
_UI_InformationsetEditorFilenameExtension = informationset
_UI_InformationreportingModelWizard_label = Mod\u00E8le Informationreporting

View File

@@ -12,6 +12,12 @@
// ============================================================================
package org.talend.designer.maven.aether.util;
import java.net.InetSocketAddress;
import java.net.SocketAddress;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.List;
import org.eclipse.aether.repository.Authentication;
import org.eclipse.aether.repository.Proxy;
import org.eclipse.aether.repository.ProxySelector;
@@ -35,6 +41,7 @@ public class TalendAetherProxySelector implements ProxySelector {
@Override
public Proxy getProxy(RemoteRepository repository) {
/**
* Update each time in case the settings are changed
*/
@@ -53,6 +60,37 @@ public class TalendAetherProxySelector implements ProxySelector {
ExceptionHandler.process(e);
}
}
if (proxy == null) {
java.net.ProxySelector jreSelector = java.net.ProxySelector.getDefault();
try {
URI uri = new URI(repository.getUrl());
List<java.net.Proxy> proxies = jreSelector.select(uri);
if (proxies != null && !proxies.isEmpty() && proxies.get(0).type() == java.net.Proxy.Type.HTTP) {
SocketAddress addr = proxies.get(0).address();
if (addr instanceof InetSocketAddress) {
InetSocketAddress iaddr = (InetSocketAddress) addr;
proxy = new org.eclipse.aether.repository.Proxy(proxies.get(0).type().name().toLowerCase(), iaddr.getHostName(), iaddr.getPort(), null);
}
}
} catch (URISyntaxException e) {
ExceptionHandler.process(e);
}
}
if (isTalendDebug) {
try {
if (repository != null) {
String proxyStr = "";
if (proxy != null) {
proxyStr = proxy.getType() + " " + proxy.toString() + ", proxy user: "
+ (proxy.getAuthentication() != null ? "..." : "<empty>");
}
ExceptionHandler.log("Aether system proxy> host: " + repository.getHost() + ", proxy: " + proxyStr);
}
} catch (Exception e) {
ExceptionHandler.process(e);
}
}
return proxy;
}

View File

@@ -93,7 +93,7 @@
<dependency>
<groupId>org.apache.avro</groupId>
<artifactId>avro</artifactId>
<version>1.11.2</version>
<version>1.11.3</version>
<scope>compile</scope>
</dependency>
<dependency>

View File

@@ -72,7 +72,7 @@
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20230227</version>
<version>20231013</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>

View File

@@ -146,8 +146,8 @@
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.70</version>
<artifactId>bcprov-jdk18on</artifactId>
<version>1.74</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>

View File

@@ -97,8 +97,8 @@
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.70</version>
<artifactId>bcprov-jdk18on</artifactId>
<version>1.74</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>

View File

@@ -37,8 +37,8 @@
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.70</version>
<artifactId>bcprov-jdk18on</artifactId>
<version>1.74</version>
</dependency>
</dependencies>
<build>

View File

@@ -42,7 +42,7 @@
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20230227</version>
<version>20231013</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>

View File

@@ -11,7 +11,7 @@
<packaging>pom</packaging>
<properties>
<tcomp.version>1.62.1</tcomp.version>
<tcomp.version>1.63.0</tcomp.version>
<slf4j.version>1.7.34</slf4j.version>
<reload4j.version>1.2.22</reload4j.version>
</properties>

View File

@@ -11,7 +11,7 @@
<packaging>pom</packaging>
<repositories>
<repository>
<id>Talend OpenSource Release</id>
<id>talend_open</id>
<url>https://artifacts-oss.talend.com/nexus/content/repositories/TalendOpenSourceRelease/</url>
</repository>
</repositories>

View File

@@ -8,3 +8,4 @@ ProjectSettingPage_ProjectPom=Projet
ProjectSettingPage_ProjectPomDesc=Param\u00E8tres des POM du projet
ProjectSettingPage_MavenCustomSetup=Configurer les scripts personnalis\u00E9s par dossier
ProjectSettingPage_MavenCustomSetupDesc=Configurer les scripts Maven personnalis\u00E9s par dossier
TalendMavenPreferencePage=Maven

View File

@@ -8,3 +8,4 @@ ProjectSettingPage_ProjectPom=\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8
ProjectSettingPage_ProjectPomDesc=\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8POM\u8A2D\u5B9A
ProjectSettingPage_MavenCustomSetup=\u30AB\u30B9\u30BF\u30E0\u30B9\u30AF\u30EA\u30D7\u30C8\u3092\u30D5\u30A9\u30EB\u30C0\u30FC\u3054\u3068\u306B\u8A2D\u5B9A
ProjectSettingPage_MavenCustomSetupDesc=\u30AB\u30B9\u30BF\u30E0Maven\u30B9\u30AF\u30EA\u30D7\u30C8\u3092\u30D5\u30A9\u30EB\u30C0\u30FC\u3054\u3068\u306B\u8A2D\u5B9A
TalendMavenPreferencePage=Maven

View File

@@ -8,3 +8,4 @@ ProjectSettingPage_ProjectPom=\u5DE5\u7A0B
ProjectSettingPage_ProjectPomDesc=\u5DE5\u7A0B POM \u8BBE\u7F6E
ProjectSettingPage_MavenCustomSetup=\u6309\u6587\u4EF6\u5939\u8BBE\u7F6E\u81EA\u5B9A\u4E49\u811A\u672C
ProjectSettingPage_MavenCustomSetupDesc=\u6309\u6587\u4EF6\u5939\u8BBE\u7F6E\u81EA\u5B9A\u4E49 Maven \u811A\u672C
TalendMavenPreferencePage=Maven

View File

@@ -23,3 +23,5 @@ MavenProjectSettingPage.syncAllPomsWarning=Cliquez sur Forcer la nouvelle synchr
MavenProjectSettingPage.skipFolders=Ignorer les dossiers
BuildProjectSettingPage.allowRecursiveJobsJoblets=Autorise les Jobs et Joblets r\u00E9cursifs (non support\u00E9 - pour des raisons de compatibilit\u00E9)
BuildProjectSettingPage.allowRecursiveJobs=Autoriser les Jobs r\u00E9cursifs (non recommand\u00E9)
TalendMavenPreferencePage.maven.offline=Hors ligne
TalendMavenPreferencePage.maven.warn=Le mode en ligne n'est pas recommand\u00E9 dans le Studio.

View File

@@ -23,3 +23,5 @@ MavenProjectSettingPage.syncAllPomsWarning=[\u5B8C\u5168\u306A\u518D\u540C\u671F
MavenProjectSettingPage.skipFolders=\u30D5\u30A9\u30EB\u30C0\u30FC\u3092\u30B9\u30AD\u30C3\u30D7
BuildProjectSettingPage.allowRecursiveJobsJoblets=\u518D\u5E30\u7684\u30B8\u30E7\u30D6\u3068\u30B8\u30E7\u30D6\u30EC\u30C3\u30C8\u3092\u8A31\u53EF(\u30B5\u30DD\u30FC\u30C8\u306A\u3057 - \u4E92\u63DB\u6027\u306E\u76EE\u7684\u306E\u307F)
BuildProjectSettingPage.allowRecursiveJobs=\u518D\u5E30\u7684\u30B8\u30E7\u30D6\u3092\u8A31\u53EF(\u975E\u63A8\u5968)
TalendMavenPreferencePage.maven.offline=\u30AA\u30D5\u30E9\u30A4\u30F3
TalendMavenPreferencePage.maven.warn=Studio\u5185\u90E8\u3067\u306E\u30AA\u30F3\u30E9\u30A4\u30F3\u30E2\u30FC\u30C9\u306F\u304A\u52E7\u3081\u3067\u304D\u307E\u305B\u3093\u3002

View File

@@ -23,3 +23,5 @@ MavenProjectSettingPage.syncAllPomsWarning=\u5355\u51FB \u201C\u5F3A\u5236\u5B8C
MavenProjectSettingPage.skipFolders=\u8DF3\u8FC7\u6587\u4EF6\u5939
BuildProjectSettingPage.allowRecursiveJobsJoblets=\u5141\u8BB8\u9012\u5F52\u4F5C\u4E1A\u548C\u5C0F\u4F5C\u4E1A (\u4E0D\u652F\u6301 - \u4EC5\u7528\u4E8E\u517C\u5BB9\u6027)
BuildProjectSettingPage.allowRecursiveJobs=\u5141\u8BB8\u9012\u5F52\u4F5C\u4E1A (\u4E0D\u63A8\u8350)
TalendMavenPreferencePage.maven.offline=\u79BB\u7EBF
TalendMavenPreferencePage.maven.warn=Studio \u5185\u4E0D\u5EFA\u8BAE\u4F7F\u7528\u5728\u7EBF\u6A21\u5F0F\u3002

View File

@@ -26,7 +26,9 @@ import java.util.List;
import java.util.Properties;
import javax.xml.parsers.DocumentBuilder;
import org.apache.commons.lang3.StringUtils;
import org.apache.log4j.Logger;
import org.apache.maven.cli.configuration.SettingsXmlConfigurationProcessor;
import org.apache.maven.settings.Profile;
import org.apache.maven.settings.Proxy;
@@ -66,6 +68,8 @@ import org.w3c.dom.Node;
@SuppressWarnings({ "rawtypes", "unchecked" })
public class M2eUserSettingForTalendLoginTask extends AbstractLoginTask {
private static final Logger LOGGER = Logger.getLogger(M2eUserSettingForTalendLoginTask.class);
public static final String MAVEN_REPO_CONFIG = "maven.repository"; //$NON-NLS-1$
public static final String VERSION_KEY = "version"; //$NON-NLS-1$
@@ -444,6 +448,8 @@ public class M2eUserSettingForTalendLoginTask extends AbstractLoginTask {
proxyService.setNonProxiedHosts(bypassHosts.toArray(new String[bypassHosts.size()]));
}
}
LOGGER.info("Updated studio proxy settings from maven settings.");
}
private boolean updateProfileSettings(IProgressMonitor monitor, IMaven maven, Settings settings, Path configPath,

View File

@@ -0,0 +1,58 @@
#Eclipse modern messages class
#Sat Apr 19 16:43:19 MSK 2014
ExecutePomAction_dialog_debug_message=S\u00E9lectionnez une configuration de d\u00E9marrage pour le d\u00E9bogage\u00A0:
ExecutePomAction_dialog_run_message=S\u00E9lectionnez une configuration de d\u00E9marrage pour l'ex\u00E9cution\u00A0:
ExecutePomAction_dialog_title=S\u00E9lectionner une configuration
ExecutePomAction_executing=Ex\u00E9cution de {0} dans {1}
MavenLaunchDelegate_error_cannot_create_conf=Impossible de cr\u00E9er m2.conf
MavenLaunchDelegate_job_name=Actualisation des ressources...
MavenLaunchDelegate_error_cannot_read_jvmConfig=Impossible de lire la configuration de la JVM depuis {0}
MavenLaunchExtensionsTab_lblExtensions=D\u00E9marrer les extensions Maven
MavenLaunchExtensionsTab_name=D\u00E9marrer les extensions
MavenLaunchMainTab_btnAfterClean=S\u00E9lec&tionner...
MavenLaunchMainTab_btnAutoBuild=&S\u00E9lectionner...
MavenLaunchMainTab_btnCleanBuild=S\u00E9&lectionner...
MavenLaunchMainTab_btnConfigure=Configurer...
MavenLaunchMainTab_btnDebugOutput=D\u00E9bo&guer la sortie
MavenLaunchMainTab_btnManualBuild=S&\u00E9lectionner...
MavenLaunchMainTab_btnNotRecursive=Non r\u00E9cursif
MavenLaunchMainTab_btnOffline=Hors ligne (&O)
MavenLaunchMainTab_btnResolveWorkspace=R\u00E9soudre les artefacts de l'espace de travail
MavenLaunchMainTab_btnSkipTests=Ignorer les tests (&k)
MavenLaunchMainTab_btnUpdateSnapshots=Mettre \u00E0 jour les Snapshots (&U)
MavenLaunchMainTab_lblAfterClean=Goals apr\u00E8s Clean (&f)\u00A0:
MavenLaunchMainTab_lblAutoBuildGoals=Goals &Build Auto\u00A0:
MavenLaunchMainTab_lblCleanBuild=Goals au cours d'un Clean (&D)\u00A0:
MavenLaunchMainTab_lblManualGoals=Goals du Build ma&nuel\u00A0:
MavenLaunchMainTab_lblRuntime=Runt&ime Maven\u00A0:
MavenLaunchMainTab_lblThreads=&Threads\u00A0:
MavenLaunchMainTab_lblEnableColorOutput=&Colorer la sortie\u00A0:
MavenLaunchMainTab_lblEnableColorOutput_Auto=Auto
MavenLaunchMainTab_lblEnableColorOutput_Always=Toujours
MavenLaunchMainTab_lblEnableColorOutput_Never=Jamais
MavenLaunchMainTab_lblUserSettings_text=Param\u00E8tres utilisateur\u00A0:
MavenLaunchMainTab_property_dialog_edit_title=Modifier le param\u00E8tre
MavenLaunchMainTab_property_dialog_title=Ajouter un param\u00E8tre
MavenJRETab_lblDefault=JRE d'ex\u00E9cution Maven par d\u00E9faut\u00A0: {0}
MavenJRETab_lblDefaultDetailsRequiredJavaVersion={0} (s\u00E9lection auto dans l'intervalle de versions Java requis {1})
MavenLaunchUtils_error_no_maven_install=L'installation de Maven est introuvable {0}
MavenLaynchDelegate_unsupported_source_locator=Locator de source inconnu on non support\u00E9 {0}
launchBrowseFs=Syst\u00E8&me de fichiers...
launchBrowseVariables=&Variables...
launchBrowseWorkspace=Espace de travail... (&W)
launchChoosePomDir=S\u00E9lectionner le r\u00E9pertoire de &Base
launchChooseSettingsFile=S\u00E9lectionner le fichier des param\u00E8tre&S
launchGoals=&S\u00E9lectionner...
launchGoalsLabel=&Goals\u00A0:
launchMainTabName=Main
launchPomDirectoryDoesntExist=Le r\u00E9pertoire de base n'existe pas ou ne peut \u00EAtre lu
launchErrorEvaluatingBaseDirectory=Le nom du r\u00E9pertoire de base ne peut \u00EAtre \u00E9valu\u00E9
launchPomDirectoryEmpty=Le r\u00E9pertoire de base doit \u00EAtre sp\u00E9cifi\u00E9
launchPomGroup=R\u00E9pertoire de base\u00A0:
launchProfilesLabel=&Profils\u00A0:
launchPropAddButton=&Ajouter...
launchPropEditButton=Mo&difier...
launchPropName=Nom du param\u00E8tre
launchPropRemoveButton=Supp&rimer
launchPropValue=Valeur
launchPropertyDialogBrowseVariables=Varia&bles...

View File

@@ -0,0 +1,58 @@
#Eclipse modern messages class
#Sat Apr 19 16:43:19 MSK 2014
ExecutePomAction_dialog_debug_message=\u30C7\u30D0\u30C3\u30B0\u3059\u308B\u8D77\u52D5\u8A2D\u5B9A\u3092\u9078\u629E:
ExecutePomAction_dialog_run_message=\u5B9F\u884C\u3059\u308B\u8D77\u52D5\u8A2D\u5B9A\u3092\u9078\u629E:
ExecutePomAction_dialog_title=\u8A2D\u5B9A\u3092\u9078\u629E
ExecutePomAction_executing={1}\u3067{0}\u3092\u5B9F\u884C
MavenLaunchDelegate_error_cannot_create_conf=m2.conf\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093
MavenLaunchDelegate_job_name=\u30EA\u30BD\u30FC\u30B9\u3092\u66F4\u65B0...
MavenLaunchDelegate_error_cannot_read_jvmConfig={0}\u304B\u3089JVM\u8A2D\u5B9A\u3092\u8AAD\u307F\u53D6\u308C\u307E\u305B\u3093
MavenLaunchExtensionsTab_lblExtensions=Maven\u8D77\u52D5\u62E1\u5F35\u6A5F\u80FD
MavenLaunchExtensionsTab_name=\u8D77\u52D5\u62E1\u5F35\u6A5F\u80FD
MavenLaunchMainTab_btnAfterClean=\u9078\u629E(&T)...
MavenLaunchMainTab_btnAutoBuild=\u9078\u629E(&S)...
MavenLaunchMainTab_btnCleanBuild=\u9078\u629E(&L)...
MavenLaunchMainTab_btnConfigure=\u8A2D\u5B9A...
MavenLaunchMainTab_btnDebugOutput=\u51FA\u529B\u3092\u30C7\u30D0\u30C3\u30B0(&G)
MavenLaunchMainTab_btnManualBuild=\u9078\u629E(&E)...
MavenLaunchMainTab_btnNotRecursive=\u975E\u518D\u5E30\u7684
MavenLaunchMainTab_btnOffline=\u30AA\u30D5\u30E9\u30A4\u30F3(&O)
MavenLaunchMainTab_btnResolveWorkspace=\u30EF\u30FC\u30AF\u30B9\u30DA\u30FC\u30B9\u30A2\u30FC\u30C6\u30A3\u30D5\u30A1\u30AF\u30C8\u3092\u89E3\u6C7A
MavenLaunchMainTab_btnSkipTests=\u30C6\u30B9\u30C8\u3092\u30B9\u30AD\u30C3\u30D7(&K)
MavenLaunchMainTab_btnUpdateSnapshots=\u30B9\u30CA\u30C3\u30D7\u30B7\u30E7\u30C3\u30C8\u3092\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8(&U)
MavenLaunchMainTab_lblAfterClean=\u30AF\u30EA\u30FC\u30F3\u76EE\u6A19\u5F8C(&F):
MavenLaunchMainTab_lblAutoBuildGoals=\u81EA\u52D5\u30D3\u30EB\u30C9\u76EE\u6A19(&B):
MavenLaunchMainTab_lblCleanBuild=\u30AF\u30EA\u30FC\u30F3\u76EE\u6A19\u4E2D(&D):
MavenLaunchMainTab_lblManualGoals=\u624B\u52D5\u30D3\u30EB\u30C9\u76EE\u6A19(&N):
MavenLaunchMainTab_lblRuntime=Maven\u30E9\u30F3\u30BF\u30A4\u30E0(&I):
MavenLaunchMainTab_lblThreads=\u30B9\u30EC\u30C3\u30C9(&T):
MavenLaunchMainTab_lblEnableColorOutput=\u8272\u306E\u51FA\u529B(&C):
MavenLaunchMainTab_lblEnableColorOutput_Auto=\u81EA\u52D5
MavenLaunchMainTab_lblEnableColorOutput_Always=\u5E38\u6642
MavenLaunchMainTab_lblEnableColorOutput_Never=\u3057\u306A\u3044
MavenLaunchMainTab_lblUserSettings_text=\u30E6\u30FC\u30B6\u30FC\u8A2D\u5B9A:
MavenLaunchMainTab_property_dialog_edit_title=\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u3092\u7DE8\u96C6
MavenLaunchMainTab_property_dialog_title=\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u3092\u8FFD\u52A0
MavenJRETab_lblDefault=\u30C7\u30D5\u30A9\u30EB\u30C8\u306EMaven\u5B9F\u884CJRE: {0}
MavenJRETab_lblDefaultDetailsRequiredJavaVersion={0} (\u5FC5\u8981\u306AJava\u30D0\u30FC\u30B8\u30E7\u30F3\u7BC4\u56F2{1}\u304B\u3089\u81EA\u52D5\u9078\u629E)
MavenLaunchUtils_error_no_maven_install=Maven\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB{0}\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
MavenLaynchDelegate_unsupported_source_locator=\u4E0D\u660E\u307E\u305F\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u306A\u3044\u30BD\u30FC\u30B9\u30ED\u30B1\u30FC\u30BF\u30FC{0}
launchBrowseFs=\u30D5\u30A1\u30A4\u30EB\u30B7\u30B9\u30C6\u30E0(&M)...
launchBrowseVariables=\u5909\u6570(&V)...
launchBrowseWorkspace=\u30EF\u30FC\u30AF\u30B9\u30DA\u30FC\u30B9(&W)...
launchChoosePomDir=\u30D9\u30FC\u30B9\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u30FC\u3092\u9078\u629E(&B)
launchChooseSettingsFile=\u8A2D\u5B9A\u30D5\u30A1\u30A4\u30EB\u3092\u9078\u629E(&S)
launchGoals=\u9078\u629E(&S)...
launchGoalsLabel=\u76EE\u6A19(&G):
launchMainTabName=\u30E1\u30A4\u30F3
launchPomDirectoryDoesntExist=\u30D9\u30FC\u30B9\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u30FC\u304C\u5B58\u5728\u3057\u306A\u3044\u304B\u8AAD\u307F\u53D6\u308C\u307E\u305B\u3093
launchErrorEvaluatingBaseDirectory=\u30D9\u30FC\u30B9\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u30FC\u540D\u3092\u8A55\u4FA1\u3067\u304D\u307E\u305B\u3093
launchPomDirectoryEmpty=\u30D9\u30FC\u30B9\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u30FC\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
launchPomGroup=\u30D9\u30FC\u30B9\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u30FC
launchProfilesLabel=\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB(&P):
launchPropAddButton=\u8FFD\u52A0(&A)...
launchPropEditButton=\u7DE8\u96C6(&D)...
launchPropName=\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u540D
launchPropRemoveButton=\u524A\u9664(&R)
launchPropValue=\u5024
launchPropertyDialogBrowseVariables=\u5909\u6570(&B)...

View File

@@ -0,0 +1,58 @@
#Eclipse modern messages class
#Sat Apr 19 16:43:19 MSK 2014
ExecutePomAction_dialog_debug_message=\u9009\u62E9\u8981\u8C03\u8BD5\u7684\u542F\u52A8\u914D\u7F6E\uFF1A
ExecutePomAction_dialog_run_message=\u9009\u62E9\u8981\u8FD0\u884C\u7684\u542F\u52A8\u914D\u7F6E\uFF1A
ExecutePomAction_dialog_title=\u9009\u62E9\u914D\u7F6E
ExecutePomAction_executing=\u5728 {1} \u4E2D\u6267\u884C {0}
MavenLaunchDelegate_error_cannot_create_conf=\u65E0\u6CD5\u521B\u5EFA m2.conf
MavenLaunchDelegate_job_name=\u6B63\u5728\u5237\u65B0\u8D44\u6E90...
MavenLaunchDelegate_error_cannot_read_jvmConfig=\u65E0\u6CD5\u4ECE {0} \u8BFB\u53D6 JVM \u914D\u7F6E
MavenLaunchExtensionsTab_lblExtensions=Maven \u542F\u52A8\u6269\u5C55
MavenLaunchExtensionsTab_name=\u542F\u52A8\u6269\u5C55
MavenLaunchMainTab_btnAfterClean=\u9009\u62E9(&T)...
MavenLaunchMainTab_btnAutoBuild=\u9009\u62E9(&S)...
MavenLaunchMainTab_btnCleanBuild=\u9009\u62E9(&L)...
MavenLaunchMainTab_btnConfigure=\u914D\u7F6E...
MavenLaunchMainTab_btnDebugOutput=\u8C03\u8BD5\u8F93\u51FA(&G)
MavenLaunchMainTab_btnManualBuild=\u9009\u62E9(&E)...
MavenLaunchMainTab_btnNotRecursive=\u975E\u9012\u5F52
MavenLaunchMainTab_btnOffline=\u79BB\u7EBF(&O)
MavenLaunchMainTab_btnResolveWorkspace=\u89E3\u51B3\u5DE5\u4F5C\u533A\u4F5C\u54C1
MavenLaunchMainTab_btnSkipTests=\u8DF3\u8FC7\u6D4B\u8BD5(&K)
MavenLaunchMainTab_btnUpdateSnapshots=\u66F4\u65B0\u5FEB\u7167(&U)
MavenLaunchMainTab_lblAfterClean=\u5728\u6E05\u7406\u76EE\u6807\u4E4B\u540E(&F)\uFF1A
MavenLaunchMainTab_lblAutoBuildGoals=\u81EA\u52A8\u6784\u5EFA\u76EE\u6807(&B)\uFF1A
MavenLaunchMainTab_lblCleanBuild=\u5728\u6E05\u7406\u76EE\u6807\u671F\u95F4(&D)\uFF1A
MavenLaunchMainTab_lblManualGoals=\u624B\u52A8\u6784\u5EFA\u76EE\u6807(&N)\uFF1A
MavenLaunchMainTab_lblRuntime=Maven \u8FD0\u884C\u65F6(&I)\uFF1A
MavenLaunchMainTab_lblThreads=\u7EBF\u7A0B(&T)\uFF1A
MavenLaunchMainTab_lblEnableColorOutput=\u989C\u8272\u8F93\u51FA(&C)\uFF1A
MavenLaunchMainTab_lblEnableColorOutput_Auto=\u81EA\u52A8
MavenLaunchMainTab_lblEnableColorOutput_Always=\u603B\u662F
MavenLaunchMainTab_lblEnableColorOutput_Never=\u4ECE\u4E0D
MavenLaunchMainTab_lblUserSettings_text=\u7528\u6237\u8BBE\u7F6E\uFF1A
MavenLaunchMainTab_property_dialog_edit_title=\u7F16\u8F91\u53C2\u6570
MavenLaunchMainTab_property_dialog_title=\u6DFB\u52A0\u53C2\u6570
MavenJRETab_lblDefault=\u9ED8\u8BA4 Maven Execution JRE\uFF1A {0}
MavenJRETab_lblDefaultDetailsRequiredJavaVersion={0} \uFF08\u4ECE\u6240\u9700\u7684 Java \u7248\u672C\u8303\u56F4 {1} \u4E2D\u81EA\u52A8\u9009\u62E9\uFF09
MavenLaunchUtils_error_no_maven_install=\u65E0\u6CD5\u627E\u5230 Maven \u5B89\u88C5 {0}
MavenLaynchDelegate_unsupported_source_locator=\u672A\u77E5\u6216\u4E0D\u652F\u6301\u7684\u6E90\u5B9A\u4F4D\u5668 {0}
launchBrowseFs=\u6587\u4EF6\u7CFB\u7EDF(&M)...
launchBrowseVariables=\u53D8\u91CF(&V)...
launchBrowseWorkspace=\u5DE5\u4F5C\u533A(&W)...
launchChoosePomDir=\u9009\u62E9\u57FA\u672C\u76EE\u5F55(&B)
launchChooseSettingsFile=\u9009\u62E9\u8BBE\u7F6E\u6587\u4EF6(&S)
launchGoals=\u9009\u62E9(&S)...
launchGoalsLabel=\u76EE\u6807(&G)\uFF1A
launchMainTabName=\u4E3B
launchPomDirectoryDoesntExist=\u57FA\u672C\u76EE\u5F55\u4E0D\u5B58\u5728\u6216\u65E0\u6CD5\u8BFB\u53D6
launchErrorEvaluatingBaseDirectory=\u65E0\u6CD5\u8BA1\u7B97\u57FA\u672C\u76EE\u5F55\u540D
launchPomDirectoryEmpty=\u5E94\u6307\u5B9A\u57FA\u672C\u76EE\u5F55
launchPomGroup=\u57FA\u672C\u76EE\u5F55\uFF1A
launchProfilesLabel=\u914D\u7F6E\u6587\u4EF6(&P)\uFF1A
launchPropAddButton=\u6DFB\u52A0(&A)...
launchPropEditButton=\u7F16\u8F91(&D)...
launchPropName=\u53C2\u6570\u540D\u79F0
launchPropRemoveButton=\u79FB\u9664(&R)
launchPropValue=\u503C
launchPropertyDialogBrowseVariables=\u53D8\u91CF(&B)...

View File

@@ -135,6 +135,31 @@ public class CreateMavenBundleTemplatePom extends CreateMaven {
}
return null;
}
protected Model createFeatureModel() {
InputStream inputStream = null;
try {
Model model = null;
inputStream = getFeatureTemplateStream();
if (inputStream != null) {
model = MODEL_MANAGER.readMavenModel(inputStream);
}
return model;
} catch (IOException e) {
ExceptionHandler.process(e);
} catch (CoreException e) {
ExceptionHandler.process(e);
} finally {
if (inputStream != null) {
try {
inputStream.close();
} catch (IOException e) {
//
}
}
}
return null;
}
protected InputStream getTemplateStream() throws IOException {
try {
@@ -143,6 +168,16 @@ public class CreateMavenBundleTemplatePom extends CreateMaven {
throw new IOException(e);
}
}
protected InputStream getFeatureTemplateStream() throws IOException {
try {
return MavenTemplateManager.getBundleTemplateStream(JOB_TEMPLATE_BUNDLE, getBundleTemplatePath());
} catch (Exception e) {
throw new IOException(e);
}
}
/*
* (non-Javadoc)

View File

@@ -5,6 +5,6 @@ Bundle-SymbolicName: org.talend.libraries.javacsv;singleton:=true
Bundle-Version: 8.0.1.qualifier
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .,
lib/javacsv.jar
lib/javacsv-2.0.jar;mvn:net.sourceforge.javacsv/javacsv/2.0
Export-Package: com.csvreader
Eclipse-BundleShape: dir

View File

@@ -6,7 +6,7 @@
context="plugin:org.talend.libraries.javacsv"
language="java"
message="Needed for Java CVS Reader and Writer"
name="javacsv.jar" mvn_uri="mvn:org.talend.libraries/javacsv/6.0.0"
name="javacsv-2.0.jar" mvn_uri="mvn:net.sourceforge.javacsv/javacsv/2.0"
required="true">
</libraryNeeded>
</extension>

View File

@@ -5,7 +5,7 @@ Bundle-Name: Jboss
Bundle-SymbolicName: org.talend.libraries.jboss;singleton:=true
Bundle-Version: 8.0.1.qualifier
Bundle-ClassPath: .,
lib/trove.jar,
lib/trove-1.0.2.jar;mvn:trove/trove/1.0.2,
lib/jboss-serialization.jar
Eclipse-BuddyPolicy: registered
Export-Package: org.jboss.serial,

View File

@@ -6,14 +6,14 @@
context="plugin:org.talend.libraries.jboss"
language="java"
message="Needed for JBoss"
name="jboss-serialization.jar" mvn_uri="mvn:org.talend.libraries/jboss-serialization/6.0.0"
name="jboss-serialization-1.0.3.GA.jar" mvn_uri="mvn:jboss/jboss-serialization/1.0.3.GA"
required="true">
</libraryNeeded>
<libraryNeeded
context="plugin:org.talend.libraries.jboss"
language="java"
message="Needed for JBoss"
name="trove.jar" mvn_uri="mvn:org.talend.libraries/trove/6.0.0"
name="trove-1.0.2.jar" mvn_uri="mvn:trove/trove/1.0.2"
required="true">
</libraryNeeded>
</extension>

View File

@@ -13,7 +13,7 @@
context="plugin:org.talend.libraries.jdbc.mysql"
language="java"
message="Needed for Mysql jdbc plugin"
name="mysql-connector-java-5.1.30-bin.jar" mvn_uri="mvn:org.talend.libraries/mysql-connector-java-5.1.30-bin/6.0.0"
name="mysql-connector-java-5.1.30.jar" mvn_uri="mvn:mysql/mysql-connector-java/5.1.30"
required="true">
</libraryNeeded>
<libraryNeeded
@@ -29,8 +29,8 @@
context="plugin:org.talend.libraries.jdbc.mysql"
language="java"
message="Needed for Mysql jdbc plugin"
mvn_uri="mvn:org.talend.libraries/mysql-connector-java-3.1.14-bin/6.0.0"
name="mysql-connector-java-3.1.14-bin.jar"
mvn_uri="mvn:mysql/mysql-connector-java/3.1.14"
name="mysql-connector-java-3.1.14.jar"
required="true">
</libraryNeeded>
</extension>

View File

@@ -6,7 +6,7 @@
context="plugin:org.talend.libraries.jexcel"
language="java"
message="Needed for jexcel component"
name="jxl.jar" mvn_uri="mvn:org.talend.libraries/jxl/6.0.0"
name="jxl-2.6.12.jar" mvn_uri="mvn:net.sourceforge.jexcelapi/jxl/2.6.12"
required="true">
</libraryNeeded>
<libraryNeeded

View File

@@ -0,0 +1,61 @@
<!-- saved from url=(0042)http://www.apache.org/licenses/LICENSE-1.1 -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">/* ====================================================================
* The Apache Software License, Version 1.1
*
* Copyright (c) 2000 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Apache" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* &lt;http://www.apache.org/&gt;.
*
* Portions of this software are based upon public domain software
* originally written at the National Center for Supercomputing Applications,
* University of Illinois, Urbana-Champaign.
*/
</pre></body></html>

View File

@@ -1,6 +1,7 @@
[
{"licenseUrl":"http://www.talendforge.org/modules/licenses/PUBLIC_DOMAIN.txt","licenseName":"PUBLIC_DOMAIN"},
{"licenseUrl":"http://www.talendforge.org/modules/licenses/APACHE_v2.txt","licenseName":"Apache-2.0"},
{"licenseUrl":"http://www.talendforge.org/modules/licenses/APACHE_v1.1.txt","licenseName":"Apache-1.1"},
{"licenseUrl":"http://www.talendforge.org/modules/licenses/Oracle-Binary.txt","licenseName":"Oracle-Binary"},
{"licenseUrl":"http://www.talendforge.org/modules/licenses/BSD_v2.txt","licenseName":"BSD-2-Clause"},
{"licenseUrl":"http://www.talendforge.org/modules/licenses/BSD_v3.txt","licenseName":"BSD-3-Clause"},

View File

@@ -40,6 +40,7 @@ import org.talend.librariesmanager.prefs.LibrariesManagerUtils;
import org.talend.librariesmanager.ui.dialogs.ConfigModuleDialog;
import org.talend.librariesmanager.ui.i18n.Messages;
import org.talend.librariesmanager.ui.service.RoutineProviderManager;
import org.talend.librariesmanager.utils.LicenseTextUtil;
import org.talend.librariesmanager.utils.ModulesInstaller;
/**
@@ -188,4 +189,8 @@ public class LibraryManagerUIService implements ILibraryManagerUIService {
public IConfigModuleDialog getConfigModuleDialog(Shell parentShell, String initValue, boolean allowDetectDependencies) {
return new ConfigModuleDialog(parentShell, initValue, allowDetectDependencies);
}
public String getLicenseUrlByName(String licenceName) {
return LicenseTextUtil.getLicenseUrlByName(licenceName);
}
}

View File

@@ -102,6 +102,15 @@ public class LicenseTextUtil {
return null;
}
public static String getLicenseUrlByName(String name) {
for (String url : licenseMap.keySet()) {
if (name != null && name.equalsIgnoreCase(licenseMap.get(url))) {
return url;
}
}
return "";
}
private static String getStringFromText(File file) throws Exception {
StringBuilder sb = new StringBuilder();
List<String> lines = Files.readAllLines(file.toPath(), StandardCharsets.UTF_8);

View File

@@ -622,15 +622,17 @@ public class RemoteModulesHelper {
message.put("module", child);//$NON-NLS-1$
String url = serviceUrl + "?data=" + message;
JSONObject resultStr = readJsonFromUrl(url);
JSONArray jsonArray = resultStr.getJSONArray("result");//$NON-NLS-1$
if (jsonArray != null) {
JSONObject object = jsonArray.getJSONObject(0);
if (object != null) {
String licenseText = object.getString("licenseText");//$NON-NLS-1$
if (licenseText != null) {
licenseText.replace("http://", "https://");//$NON-NLS-1$ //$NON-NLS-2$
if (resultStr != null) {
JSONArray jsonArray = resultStr.getJSONArray("result");//$NON-NLS-1$
if (jsonArray != null) {
JSONObject object = jsonArray.getJSONObject(0);
if (object != null) {
String licenseText = object.getString("licenseText");//$NON-NLS-1$
if (licenseText != null) {
licenseText.replace("http://", "https://");//$NON-NLS-1$ //$NON-NLS-2$
}
return licenseText;
}
return licenseText;
}
}
} catch (JSONException e) {

View File

@@ -153,8 +153,14 @@ public class LibraryDataService {
}
public void buildLibraryLicenseData(Set<String> mvnUrlList) {
buildLibraryLicenseData(mvnUrlList, null);
}
public void buildLibraryLicenseData(Set<String> mvnUrlList, Map<String, List<String[]>> licenseMap) {
for (String mvnUrl : mvnUrlList) {
Library libraryObj = resolve(mvnUrl);
Library libraryObj = getLicenseDataFromMap(mvnUrl, licenseMap);
if (libraryObj == null)
libraryObj = resolve(mvnUrl);
if (!libraryObj.isLicenseMissing() || !libraryObj.isPomMissing()) {
mvnToLibraryMap.put(getShortMvnUrl(mvnUrl), libraryObj);
}
@@ -171,10 +177,10 @@ public class LibraryDataService {
isRemoved = true;
}
}
if(lib.isPomMissing()) {
if (lib.isPomMissing()) {
lib.getLicenses().clear();
lib.getLicenses().add(unknownLicense);
}else {
} else {
if ((isRemoved && licenses.size() == 0)) {
licenses.add(unknownLicense);
lib.setLicenseMissing(true);
@@ -183,6 +189,38 @@ public class LibraryDataService {
}
dataProvider.saveLicenseData(mvnToLibraryMap);
}
private Library getLicenseDataFromMap(String mvnUrl, Map<String, List<String[]>> licenseMap) {
if (licenseMap == null)
return null;
MavenArtifact artifact = MavenUrlHelper.parseMvnUrl(mvnUrl);
String shourtMvnUrl = getShortMvnUrl(mvnUrl);
String gav = String.format("%s:%s:%s", artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion());
List<String[]> licenses = licenseMap.get(gav);
Library libraryObj = null;
if (licenses != null && licenses.size() > 0) {
libraryObj = new Library();
libraryObj.setGroupId(artifact.getGroupId());
libraryObj.setArtifactId(artifact.getArtifactId());
libraryObj.setVersion(artifact.getVersion());
libraryObj.setMvnUrl(shourtMvnUrl);
libraryObj.setType(artifact.getType());
libraryObj.setClassifier(artifact.getClassifier());
libraryObj.setPomMissing(false);
for (String[] licenseContent : licenses) {
LibraryLicense license = new LibraryLicense();
if (licenseContent != null && licenseContent.length == 2) {
license.setName(licenseContent[0]);
license.setUrl(licenseContent[1]);
}
libraryObj.getLicenses().add(license);
}
} else {
return null;
}
return libraryObj;
}
private Library resolve(String mvnUrl) {
MavenArtifact artifact = MavenUrlHelper.parseMvnUrl(mvnUrl);

View File

@@ -34,7 +34,7 @@ Require-Bundle: org.eclipse.ui,
org.talend.daikon,
org.talend.libraries.apache,
org.talend.studio.studio-utils,
avro;bundle-version="1.11.2"
avro
Bundle-ActivationPolicy: lazy
Bundle-Vendor: .Talend SA.
Bundle-Localization: plugin

View File

@@ -48,7 +48,6 @@ import org.talend.core.model.context.JobContext;
import org.talend.core.model.context.JobContextParameter;
import org.talend.core.model.metadata.IMetadataConnection;
import org.talend.core.model.metadata.MetadataTalendType;
import org.talend.core.model.metadata.builder.connection.AdditionalConnectionProperty;
import org.talend.core.model.metadata.builder.connection.Connection;
import org.talend.core.model.metadata.builder.connection.DatabaseConnection;
import org.talend.core.model.metadata.builder.connection.FTPConnection;
@@ -382,12 +381,7 @@ public final class ConnectionContextHelper {
} catch (JSONException e) {
ExceptionHandler.process(e);
}
} else if (currentConnection instanceof SAPConnection) {
SAPConnection sapConn = (SAPConnection) currentConnection;
for (AdditionalConnectionProperty sapProperty : sapConn.getAdditionalProperties()) {
varList.add(sapProperty.getPropertyName());
}
} else if (currentConnection instanceof DatabaseConnection && !(currentConnection instanceof TacokitDatabaseConnection)) {
}else if (currentConnection instanceof DatabaseConnection && !(currentConnection instanceof TacokitDatabaseConnection)) {
DatabaseConnection dbConn = (DatabaseConnection) currentConnection;
List<Map<String, Object>> hadoopPropertiesList = DBConnectionContextUtils.getHiveOrHbaseHadoopProperties(dbConn);
if (!hadoopPropertiesList.isEmpty()) {

View File

@@ -620,11 +620,6 @@ public final class OtherConnectionContextUtils {
}
}
}
// Create sap context parameters for additional properties
for (AdditionalConnectionProperty sapProperty : conn.getAdditionalProperties()) {
String sapPropertyContextName = getValidSapContextName(sapProperty.getPropertyName());
ConnectionContextHelper.createParameters(varList, sapPropertyContextName, sapProperty.getValue());
}
return varList;
}
@@ -652,7 +647,6 @@ public final class OtherConnectionContextUtils {
setSAPConnnectionBasicPropertiesForContextMode(sapCon, sapParam, sapVariableName);
}
}
setSAPConnectionAdditionPropertiesForContextMode(sapCon);
}
static void setSAPConnectionPropertiesForExistContextMode(SAPConnection sapConn, Set<IConnParamName> paramSet,
@@ -682,7 +676,6 @@ public final class OtherConnectionContextUtils {
setSAPConnnectionBasicPropertiesForContextMode(sapConn, sapParam, sapVariableName);
}
}
setSAPConnectionAdditionPropertiesForContextMode(sapConn);
}
static void setSAPConnnectionBasicPropertiesForContextMode(SAPConnection sapConn, EParamName sapParam,
@@ -735,12 +728,6 @@ public final class OtherConnectionContextUtils {
}
}
static void setSAPConnectionAdditionPropertiesForContextMode(SAPConnection sapConn) {
for (AdditionalConnectionProperty sapProperty : sapConn.getAdditionalProperties()) {
String sapPropertyContextName = getValidSapContextName(sapProperty.getPropertyName());
sapProperty.setValue(ContextParameterUtils.getNewScriptCode(sapPropertyContextName, LANGUAGE));
}
}
static void revertSAPPropertiesForContextMode(SAPConnection conn, ContextType contextType) {
String client = TalendQuoteUtils.removeQuotes(ConnectionContextHelper.getOriginalValue(contextType, conn.getClient()));

View File

@@ -28,6 +28,7 @@ import org.talend.commons.exception.PersistenceException;
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
import org.talend.commons.utils.VersionUtils;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.ITDQRepositoryService;
import org.talend.core.model.metadata.builder.connection.MetadataTable;
import org.talend.core.model.properties.ConnectionItem;
import org.talend.core.model.properties.Item;
@@ -176,11 +177,34 @@ public abstract class CheckLastVersionRepositoryWizard extends RepositoryWizard
workspace.run(operation, schedulingRule, IWorkspace.AVOID_UPDATE, new NullProgressMonitor());
}
@Override
public boolean performCancel() {
// connectionCopy = null;
// metadataTableCopy = null;
return super.performCancel();
protected void updateDQDependency(boolean isModified, String originaleObjectLabel) {
if (isModified) {
if (GlobalServiceRegister.getDefault().isServiceRegistered(ITDQRepositoryService.class)) {
ITDQRepositoryService tdqRepService = GlobalServiceRegister.getDefault()
.getService(ITDQRepositoryService.class);
if (tdqRepService != null) {
// TDQ-6395, save all dependency of the connection when the name is changed.
tdqRepService.saveConnectionWithDependency(connectionItem);
// TDQ-7438, If the analysis editor is opened, popup the dialog which ask user refresh
// the editor or not once should enough(use hasReloaded to control,because the reload will refresh)
tdqRepService.refreshCurrentAnalysisEditor(connectionItem);
tdqRepService.updateAliasInSQLExplorer(connectionItem, originaleObjectLabel);
}
}
}
}
protected void notifyDQSQLExplorer() {
if (GlobalServiceRegister.getDefault().isServiceRegistered(ITDQRepositoryService.class)) {
ITDQRepositoryService tdqRepService = GlobalServiceRegister.getDefault()
.getService(ITDQRepositoryService.class);
if (tdqRepService != null) {
tdqRepService.notifySQLExplorer(connectionItem);
}
}
}
protected void refreshInFinish(boolean isModified) {

View File

@@ -82,8 +82,8 @@
context="plugin:org.talend.libraries.jdbc.oracle"
language="java"
message="Needed for Oracle jdbc plugin"
mvn_uri="mvn:org.talend.libraries/ojdbc6/6.0.0"
name="ojdbc6.jar"
mvn_uri="mvn:com.oracle.database.jdbc/ojdbc6/11.2.0.4"
name="ojdbc6-11.2.0.4.jar"
required="true">
</libraryNeeded>
<libraryNeeded
@@ -190,8 +190,16 @@
context="plugin:org.talend.metadata.managment"
language="java"
message="Needed for create sqlite connection"
mvn_uri="mvn:org.xerial/sqlite-jdbc/3.40.0.0"
name="sqlite-jdbc-3.40.0.0.jar"
mvn_uri="mvn:org.xerial/sqlite-jdbc/3.44.1.0"
name="sqlite-jdbc-3.44.1.0.jar"
required="true">
</libraryNeeded>
<libraryNeeded
context="plugin:org.talend.metadata.managment"
language="java"
message="Needed for create sqlite connection"
mvn_uri="mvn:org.slf4j/slf4j-api/1.7.34"
name="slf4j-api-1.7.34.jar"
required="true">
</libraryNeeded>
<libraryNeeded

View File

@@ -1085,8 +1085,8 @@ public class ExtractMetaDataUtils {
} else if (driverJarPathArg.contains("/")) {
if (driverJarPathArg.contains(";")) {
String jars[] = driverJarPathArg.split(";");
List<String> jarNames = new ArrayList<>();
for (String jar : jars) {
jar = TalendQuoteUtils.removeQuotesIfExist(jar);
if (jar.startsWith(MavenUrlHelper.MVN_PROTOCOL)) {
setDriverPath(librairesManagerService, jarPathList, jar);
} else {

View File

@@ -1,111 +1,111 @@
// ============================================================================
//
// 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.model.metadata.builder.database;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.net.URLClassLoader;
import org.talend.commons.exception.ExceptionHandler;
/**
*
* DOC YeXiaowei class global comment. Detailled comment <br/>
*
*/
public class HotClassLoader extends URLClassLoader {
// Commentted by Marvin Wang on Feb. 4, 2012 for TDI-23833.
// // qli modified to fix the bug 6281.
// private static HotClassLoader instance;
//
// public static HotClassLoader getInstance() {
// // bug 17800 fixed
// // if (instance == null) {
// instance = new HotClassLoader();
// // }
// return instance;
// }
public HotClassLoader() {
super(new URL[0], ClassLoader.getSystemClassLoader());
}
public void addPath(String paths) {
if (paths == null || paths.length() <= 0) {
return;
}
String separator = System.getProperty("path.separator"); //$NON-NLS-1$
String[] pathToAdds = paths.split(separator);
for (String pathToAdd2 : pathToAdds) {
if (pathToAdd2 != null && pathToAdd2.length() > 0) {
try {
File pathToAdd = new File(pathToAdd2).getCanonicalFile();
addURL(pathToAdd.toURL());
} catch (IOException e) {
ExceptionHandler.process(e);
}
}
}
}
// public static String getClassFile(String name){
// if(name != null && !"".equals(name))
// return name.replace(".", "/").concat(".class");
// return null;
// }
//
// /**
// * "hive driver"
// */
// public Class findClass(String name) throws ClassNotFoundException{
// Class clazz = null;
// byte[] data = loadClassData(name);
//
// clazz = defineClass(name, data, 0, data.length);
// URL url = clazz.getProtectionDomain().getCodeSource().getLocation();
// return clazz;
// }
//
//
// public byte[] loadClassData(String name) throws ClassNotFoundException{
// InputStream input = null;
// ByteArrayOutputStream output = null;
// byte[] data = null;
// URL[] urls = this.getURLs();
// if(urls != null){
// boolean isFind = false;
// for(URL url : urls){
// try {
// String newDriverName = HotClassLoader.getClassFile(name);
// URL newURL = new URL("jar:" + url.toString() + "!/"+ newDriverName);
// input = newURL.openStream();
// output = new ByteArrayOutputStream();
// int ch = 0;
// while((ch = input.read()) != -1){
// output.write(ch);
// }
// data = output.toByteArray();
// isFind = true;
// break;
// } catch (IOException e) {
// }
// }
// if(!isFind)
// throw new ClassNotFoundException("Can not find " + name + "!");
// }
// return data;
// }
}
// ============================================================================
//
// 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.model.metadata.builder.database;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.net.URLClassLoader;
import org.talend.commons.exception.ExceptionHandler;
/**
*
* DOC YeXiaowei class global comment. Detailled comment <br/>
*
*/
public class HotClassLoader extends URLClassLoader {
// Commentted by Marvin Wang on Feb. 4, 2012 for TDI-23833.
// // qli modified to fix the bug 6281.
// private static HotClassLoader instance;
//
// public static HotClassLoader getInstance() {
// // bug 17800 fixed
// // if (instance == null) {
// instance = new HotClassLoader();
// // }
// return instance;
// }
public HotClassLoader() {
super(new URL[0], ClassLoader.getSystemClassLoader());
}
public void addPath(String paths) {
if (paths == null || paths.length() <= 0) {
return;
}
String separator = System.getProperty("path.separator"); //$NON-NLS-1$
String[] pathToAdds = paths.split(separator);
for (String pathToAdd2 : pathToAdds) {
if (pathToAdd2 != null && pathToAdd2.length() > 0) {
try {
File pathToAdd = new File(pathToAdd2).getCanonicalFile();
addURL(pathToAdd.toURI().toURL());
} catch (IOException e) {
ExceptionHandler.process(e);
}
}
}
}
// public static String getClassFile(String name){
// if(name != null && !"".equals(name))
// return name.replace(".", "/").concat(".class");
// return null;
// }
//
// /**
// * "hive driver"
// */
// public Class findClass(String name) throws ClassNotFoundException{
// Class clazz = null;
// byte[] data = loadClassData(name);
//
// clazz = defineClass(name, data, 0, data.length);
// URL url = clazz.getProtectionDomain().getCodeSource().getLocation();
// return clazz;
// }
//
//
// public byte[] loadClassData(String name) throws ClassNotFoundException{
// InputStream input = null;
// ByteArrayOutputStream output = null;
// byte[] data = null;
// URL[] urls = this.getURLs();
// if(urls != null){
// boolean isFind = false;
// for(URL url : urls){
// try {
// String newDriverName = HotClassLoader.getClassFile(name);
// URL newURL = new URL("jar:" + url.toString() + "!/"+ newDriverName);
// input = newURL.openStream();
// output = new ByteArrayOutputStream();
// int ch = 0;
// while((ch = input.read()) != -1){
// output.write(ch);
// }
// data = output.toByteArray();
// isFind = true;
// break;
// } catch (IOException e) {
// }
// }
// if(!isFind)
// throw new ClassNotFoundException("Can not find " + name + "!");
// }
// return data;
// }
}

View File

@@ -223,10 +223,6 @@ public final class JavaSqlFactory {
} // else we are ok
return driverClassName;
}
MDMConnection mdmConn = SwitchHelpers.MDMCONNECTION_SWITCH.doSwitch(conn);
if (mdmConn != null) {
return ""; //$NON-NLS-1$
}
DelimitedFileConnection dfConn = SwitchHelpers.DELIMITEDFILECONNECTION_SWITCH.doSwitch(conn);
if (dfConn != null) {
return ""; //$NON-NLS-1$
@@ -246,10 +242,6 @@ public final class JavaSqlFactory {
if (dbConn != null) {
dbConn.setURL(url);
}
MDMConnection mdmConn = SwitchHelpers.MDMCONNECTION_SWITCH.doSwitch(conn);
if (mdmConn != null) {
mdmConn.setPathname(url);
}
// MOD qiongli 2011-1-9 feature 16796
DelimitedFileConnection dfConnection = SwitchHelpers.DELIMITEDFILECONNECTION_SWITCH.doSwitch(conn);
if (dfConnection != null) {
@@ -268,11 +260,6 @@ public final class JavaSqlFactory {
DatabaseConnection dbConn = SwitchHelpers.DATABASECONNECTION_SWITCH.doSwitch(conn);
if (dbConn != null) {
userName = getOriginalValueConnection(dbConn).getUsername();// root
} else {
MDMConnection mdmConn = SwitchHelpers.MDMCONNECTION_SWITCH.doSwitch(conn);
if (mdmConn != null) {
userName = mdmConn.getUsername();
}
}
if (userName == null) {
userName = "";//$NON-NLS-1$
@@ -296,11 +283,6 @@ public final class JavaSqlFactory {
} else {
psw = getOriginalValueConnection(dbConn).getRawPassword();// ""
}
} else {
MDMConnection mdmConn = SwitchHelpers.MDMCONNECTION_SWITCH.doSwitch(conn);
if (mdmConn != null) {
psw = ConnectionHelper.getPassword(mdmConn);
}
}
if (psw == null) {
psw = "";//$NON-NLS-1$
@@ -553,10 +535,6 @@ public final class JavaSqlFactory {
}
return url;
}
MDMConnection mdmConn = SwitchHelpers.MDMCONNECTION_SWITCH.doSwitch(conn);
if (mdmConn != null) {
return mdmConn.getPathname();
}
// MOD qiongli 2011-1-11 feature 16796.
DelimitedFileConnection dfConnection = SwitchHelpers.DELIMITEDFILECONNECTION_SWITCH.doSwitch(conn);
if (dfConnection != null) {
@@ -720,10 +698,6 @@ public final class JavaSqlFactory {
if (dbConn != null) {
return getOriginalValueConnection(dbConn).getServerName();
}
MDMConnection mdmConn = SwitchHelpers.MDMCONNECTION_SWITCH.doSwitch(conn);
if (mdmConn != null) {
return mdmConn.getServer();
}
return null;
}
@@ -751,10 +725,6 @@ public final class JavaSqlFactory {
if (dbConn != null) {
dbConn.setServerName(serverName);
}
MDMConnection mdmConn = SwitchHelpers.MDMCONNECTION_SWITCH.doSwitch(conn);
if (mdmConn != null) {
mdmConn.setServer(serverName);
}
}
/**
@@ -768,10 +738,6 @@ public final class JavaSqlFactory {
if (dbConn != null) {
return getOriginalValueConnection(dbConn).getPort();
}
MDMConnection mdmConn = SwitchHelpers.MDMCONNECTION_SWITCH.doSwitch(conn);
if (mdmConn != null) {
return mdmConn.getPort();
}
return null;
}
@@ -786,10 +752,6 @@ public final class JavaSqlFactory {
if (dbConn != null) {
dbConn.setPort(port);
}
MDMConnection mdmConn = SwitchHelpers.MDMCONNECTION_SWITCH.doSwitch(conn);
if (mdmConn != null) {
mdmConn.setPort(port);
}
}
/**
@@ -803,10 +765,6 @@ public final class JavaSqlFactory {
if (dbConn != null) {
return getOriginalValueConnection(dbConn).getSID();
}
MDMConnection mdmConn = SwitchHelpers.MDMCONNECTION_SWITCH.doSwitch(conn);
if (mdmConn != null) {
return mdmConn.getContext();
}
return null;
}
@@ -821,10 +779,6 @@ public final class JavaSqlFactory {
if (dbConn != null) {
dbConn.setSID(sid);
}
MDMConnection mdmConn = SwitchHelpers.MDMCONNECTION_SWITCH.doSwitch(conn);
if (mdmConn != null) {
mdmConn.setContext(sid);
}
}
/**

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