Compare commits

..

235 Commits

Author SHA1 Message Date
Sébastien Gandon
30f730dc12 Merge release/5.1.3/tis_shared and release/5.1.3/tos for release/5.1.3. 2014-06-22 14:16:08 +02:00
ilazebny
ec12e1b8f3 Update version to 5.1.3 in poms
git-svn-id: http://talendforge.org/svn/tis_shared/branches/branch-5_1@96517 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2013-01-08 09:23:58 +00:00
ilazebny
ca6ec37047 Update version to 5.1.3 in poms
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@96515 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2013-01-08 09:23:27 +00:00
zshen
16bef143ef TDQ-5500 After edit the user define indicator, should automatically update the related analysis
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@96506 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2013-01-08 07:43:03 +00:00
scorreia
e004b50344 TDI-22247 *zh.properties deleted
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@96462 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2013-01-07 16:46:12 +00:00
scorreia
23c3dd6f1a i18n: synchronize Babili strings exported on 2013-01-07-16-38-27
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@96457 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2013-01-07 16:12:18 +00:00
yyin
d7760a1e65 TDQ-6413 temp catch the NPE by using :ExtractMetaDataUtils.conn, when gettables from oracle after creating teradata conn.
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@96421 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2013-01-07 09:18:31 +00:00
zshen
7f35e06529 TDQ-6395 reopen connection editor after cancel wizard
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@96406 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2013-01-07 08:00:53 +00:00
mwang
f6261c0b31 For bug TDI-24377 : When retrieve synonyms in DB2, no column are retrieved
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@96395 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2013-01-07 06:17:23 +00:00
plv
4315904b8f bug TDI-23052 fixed:[DBconnection]Throw "java.lang.StackOverflowError" when retrieving schema from the default derby database.
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@96372 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2013-01-07 03:31:10 +00:00
mwang
c3d6f66d7f For bug TDI-24222 : DB2 v. 9.7 retrive schemas in pending state
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@96346 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2013-01-06 08:44:10 +00:00
mwang
889ae405cb For bug TDI-24222 : DB2 v. 9.7 retrive schemas in pending state
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@96343 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2013-01-06 08:08:02 +00:00
zshen
e5b713a617 TDQ-6394 backport on branch 5.1
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@96337 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2013-01-06 07:44:01 +00:00
zshen
0d144c69fd TDQ-6656 on the editor only modify name will popup dialog to ask whether need to update Editor.
on the wizard only modify name or version will popup it.

git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@96304 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2013-01-05 11:24:36 +00:00
yyin
450bd19224 TDQ-6287 backport to branch5.1 : rename in wizard will not refresh the editor
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@96295 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2013-01-05 07:32:38 +00:00
yyin
c5fd628e2c TDQ-6287 backport to branch5.1 : rename in wizard will not refresh the editor
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@96294 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2013-01-05 07:32:22 +00:00
zwzhao
0c4507aeed TDI-24180 : add migration task to clear the old preferences information to remove any login/password previously stored
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@96293 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2013-01-05 07:31:15 +00:00
xqliu
76837c24fc TDQ-6666 when create connection, if there have error message return it
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@96292 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2013-01-05 07:28:36 +00:00
ldong
19639c740e bug TDI-22056 fixed:Copybook wizard - comments within copybook prevent generating xc2j file.
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@96265 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2013-01-05 02:42:43 +00:00
mwang
7e522b3de5 For bug TDI-24255 : tRunjob passed value gets changed when Subjob context variable name changes
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@96226 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2013-01-04 07:17:06 +00:00
zwzhao
aa69617dd6 bug TDI-23981 fixed : NullPointerException when editing job properties
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@96218 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2013-01-04 05:53:23 +00:00
yyin
14665bc5ff merge r96004 from trunk to branch 5.1
TDQ-6485 fix: change the schema and after click checking , the reload did not popup which should be 


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@96015 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-27 07:53:04 +00:00
plv
a67205fdca merge r96001 from trunk to branch 5.1
bug TDI-22857 fixed:create a file connection, the saved name value is incorrect


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@96012 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-27 07:45:18 +00:00
hcyi
96d5c4e89e bug TDI-20184 fixed : oracle connection export as context,use elt componment create a job,when run there is error.
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@95940 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-26 02:55:21 +00:00
yyin
19a261cf49 Backport to Branch5.1
TDQ-6485 change the type for judge if need set the isneed reload back to false 

git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@95934 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-26 02:37:29 +00:00
plv
288f223e76 merge r95913 from trunk to branch 5.1
bug TUP-339 fixed:<DQSH>:Fail to create LDAP and LDIF


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@95915 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-25 08:48:53 +00:00
jjzhou
e92168add6 fix Bug TDI-24223:Duplicate methods EREPLACE and CHANGE in system routine "StringHandling"
https://jira.talendforge.org/browse/TDI-24223

git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@95872 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-24 10:30:33 +00:00
ilazebny
22d767875b Update poms version to 5.1.3-SNAPSHOT
git-svn-id: http://talendforge.org/svn/tis_shared/branches/branch-5_1@95829 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-21 12:15:55 +00:00
ilazebny
6c7553f6a7 Update poms version to 5.1.3-SNAPSHOT
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@95828 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-21 12:11:47 +00:00
mwang
3211737135 For bug TDI-24174 and bug TDI-23253.
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@95772 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-21 03:27:34 +00:00
zshen
2e283fdbb0 TDQ-5722 hide Overview analysis,Database Compare and Reload menu on unsupport connection node
add messagedialog when reload a unsupport connection type.
                    move reloadDatabase method from TOPRepositoryService to TDQCompareService
                    refactor reloadDatabase to reuse reloadAction 

git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@95752 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-20 11:23:27 +00:00
yyin
76d36599b4 Backport to branch 5.1
TDQ-6485 remove setIsNeedReload from others , only remain in DatabaseForm. 

git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@95703 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-20 06:15:17 +00:00
yyin
bfc1249eaf Backport to branch 5.1
TDQ-6485 remove setIsNeedReload from others , only remain in DatabaseForm. 

git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@95702 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-20 06:14:45 +00:00
hcyi
6f74f6115d bug TDI-24093 fixed : Jobs analyses_no picture display for Job execution analysis .
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@95691 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-20 03:09:29 +00:00
ycbai
bd09ae6534 bug TDI-22836 fixed : Small warning if use tSalesforceConnection with tsetProxy with authentication
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@95616 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-19 06:50:01 +00:00
zwzhao
e46cb7a80c bug TDI-20753 fixed : Re-click generic schema, There was no Tap "create a new generic from xml "
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@95566 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-18 09:18:46 +00:00
ldong
95ea1029b1 bug TDI-21900 fixed:EBCDIC copybook wizard should support other copypage( in *.x2cj file is "ConversionTable") not only.
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@95548 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-18 08:11:09 +00:00
hwang
e19a768f99 merge r95464 from trunk to branch 5.1
TDI-23023:Move to joblet issues


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@95523 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-18 06:01:19 +00:00
yyin
dc4d6e5571 merge r95497 from trunk to branch 5.1
TDQ-6099 Revert: set sqlmode=true , because for Teradata, Studio has this option in creating wizard(but TOP do not have it, so in TOP it is false) 

git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@95500 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-18 03:06:16 +00:00
zwzhao
a008296c50 bug TDI-24180 fixed : Login and pwd are in clear in \workspace\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.ui.prefs
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@95438 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-17 08:34:12 +00:00
nrousseau
16274341d9 merge r95017 from trunk to branch 5.1
TDI-23046 : fix problem of context, avoid to send context for nothing if the context was not exported


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@95272 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-14 04:04:25 +00:00
plv
9161a76733 merge r95200 from trunk to branch 5.1
bug TDI-7809:tHSQLDBInput - In in process persistent mode "guess schema" doesn't work


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@95205 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-13 09:52:37 +00:00
mwang
779532aea4 For bug TDI-24100, sudio hangs after switch to "job script view"
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@95185 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-13 08:00:26 +00:00
zshen
e3e5208f33 TDQ-6455 make it delete all of temp file after reload and close compare editor
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@95153 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-12 10:10:28 +00:00
qiongli
f73b758804 TDQ-6582 TDQ-6437 backport to branch5.1.
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@95147 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-12 09:49:40 +00:00
wchen
7e1464b2c7 bug TDI-24143 fixed: tXmlMap import xml from repository, can select folder and finish ,but will show an error .
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@95131 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-12 07:23:43 +00:00
ycbai
fd5baa5bef bug TDI-24114 fixed : Metadata connection for Oracle RAC
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@95128 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-12 06:52:31 +00:00
yyin
beca41bd89 merge r95119 from trunk to branch 5.1
TDQ-6099 support Teradata's INTERVAL type 


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@95123 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-12 04:04:06 +00:00
zwzhao
033b425139 merge r95121 from trunk to branch 5.1
bug TDI-19775 fixed : Icon of Component can't not specified by icon size because of the code bug


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@95122 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-12 03:56:40 +00:00
fwang
90ee4e7540 bug TDI-23742 fixed:set the length for a column using invalid charactor, it shows wrong msg
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@95109 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-12 02:08:50 +00:00
wchen
9564006ec2 bug TDI-24020 fixed: The Imported Schema Metadata can't be imported into tXMLMap
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@95094 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-11 09:52:27 +00:00
xqliu
4e59bdb673 TDQ-5750 TDQ-6565 update the analysis and refresh the analysis editor when change the FileConnection's name
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@95090 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-11 09:30:32 +00:00
plv
28c7241060 merge r95085 from trunk to branch 5.1
bug TDI-24129:unify the ldif file


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@95089 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-11 09:22:57 +00:00
plv
71e4faa1c9 merge r95076 from trunk to branch 5.1
bug TDI-24128:unify the excel file


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@95081 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-11 08:49:29 +00:00
plv
59db3706e8 bug TDI-24127:unify the xml file
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@95079 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-11 08:32:21 +00:00
plv
6d6223ee3e merge r95060 from trunk to branch 5.1
bug TDI-24127:unify the xml file


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@95077 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-11 07:47:13 +00:00
hcyi
30b5520f90 merge r95044 from trunk to branch 5.1
bug TDI-24134 fixed : when use tloop component parallel execution , get a exception .


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@95046 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-10 10:23:56 +00:00
plv
5eaab053a7 merge r95033 from trunk to branch 5.1
bug TDI-24126:unify the regex file


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@95035 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-10 08:57:59 +00:00
plv
c1d4923344 merge r95032 from trunk to branch 5.1
bug TDI-24125:unify the positional file


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@95034 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-10 08:52:04 +00:00
plv
ff04dc3bcc merge r95020 from trunk to branch 5.1
bug TDI-20748:pop "Choose Context" dialog twice when edit schema with context model


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@95025 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-10 07:23:25 +00:00
wchen
77935db447 bug TDI-24071 fixed: export a rows into xml file then import it(if type = document) will miss loop
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@95019 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-10 06:16:36 +00:00
plv
c415a095b4 bug TDI-23507:SQLserver JDBC: the sql of Guess Schema is wrong
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@95009 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-10 02:04:52 +00:00
msjian
c09724abe7 TDQ-4935 : modify the Export report script to handle OS X, and can support *_64 machines(remove the *.properties file)
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94991 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-07 10:02:58 +00:00
mwang
988fb6da6c For bug TDI-23378
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94990 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-07 10:02:05 +00:00
ycbai
4300c4d41c bug TDI-24028 fixed : The imported xml schema metadata is wrong when tring the attached wsdl
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94974 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-07 08:47:31 +00:00
xqliu
5a6c6072c1 TDQ-5750 TDQ-6565 save the reference resources and refresh the analysis editor after rename a FileConnection
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94962 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-07 07:36:06 +00:00
wchen
7bcdd11a95 bug TDI-24074 fixed: Manual create a xml file will cause a NPE error
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94904 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-06 08:12:38 +00:00
fwang
d9190e286d bug TDI-8064 fixed:Schema dialog
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94899 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-06 07:32:08 +00:00
hwang
5357cae659 merge r94886 from trunk to branch 5.1
TDI-24070:add a flag(*) for unopened jobs when update jobs 


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94889 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-06 06:35:11 +00:00
nrousseau
c393b30499 merge r94877 from trunk to branch 5.1
TDI-24055 : fix problem of item loading during the logon of the studio (emf don't use yet the platform URI, but file URI)


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94880 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-06 04:28:20 +00:00
fwang
d49c30d86d bug TDI-23959 fixed:improper warning message for DB connection
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94856 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-05 08:39:10 +00:00
ldong
5c4eb11138 bug TDI-8370 fixed:backport on 5.1
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94847 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-05 06:57:12 +00:00
nrousseau
2063a0c1e5 merge r94833 from trunk to branch 5.1
TDI-24030 : fixed, avoid to modify the property (label/displayname) when do one edit properties in read only mode.


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94835 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-05 02:50:31 +00:00
wchen
a485cf01f4 bug TDI-23987 fixed :H2 JDBC connection "guess schema" report exception error
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94826 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-05 01:49:38 +00:00
fwang
7733eb3d66 bug TDI-24016 fixed:OracleDB can't retrieve schema by the button @5.1.2
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94825 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-05 01:38:17 +00:00
nrousseau
09e33f6369 merge r94798 from trunk to branch 5.1
TDI-24033 : fix problem of edit properties


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94802 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-04 11:14:37 +00:00
yyin
156c4a37d6 TDQ-6497 replace the tag "USING_URL" by "IS_CONN_NEED_RELOAD", and modify related methods
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94772 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-04 07:31:43 +00:00
yyin
a25bcc87c9 TDQ-6497 replace the tag "USING_URL" by "IS_CONN_NEED_RELOAD", and modify related methods
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94771 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-04 07:31:31 +00:00
nrousseau
24cbfb8de7 merge r94754 from trunk to branch 5.1
bug TDI-23650 fixed: allow to see / use db columns directly from ELT components.


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94762 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-04 03:47:52 +00:00
plv
9ec2203619 bug TDI-23953:Can't change and save the context values in "Values as table", after export as context in metadata connection
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94755 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-04 02:19:08 +00:00
nrousseau
7e34a9ca47 merge r94720 from trunk to branch 5.1
TDI-23995 : fix problem of export when a screenshot is missing and allow to edit anything even if the screenshot is missing


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94742 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-03 09:47:58 +00:00
zshen
477e5ba4af TDQ-6518 backport on branch 5.1
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94734 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-12-03 08:47:01 +00:00
yyin
500408acd6 TDQ-6485 backport
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94666 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-30 07:54:42 +00:00
wchen
a8a97c1305 merge r94623 from trunk to branch 5.1
bug TDI-23745 fixed: select context group list box only appear once when checking connection 


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94630 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-29 11:16:36 +00:00
plv
bbba2c55d4 merge r94625 from trunk to branch 5.1
bug TDI-23507:revert


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94627 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-29 11:09:20 +00:00
hwang
61fa77fc0f TDI-22839:Other joblets used in job locked when joblet saved
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94609 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-29 09:07:07 +00:00
nrousseau
84efb1f2ca merge r94605 from trunk to branch 5.1
TDI-23971 : fix exceptions found from logs, just needs to have another temporary list when check from repository


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94607 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-29 08:53:18 +00:00
plv
fca502a4d5 merge r94594 from trunk to branch 5.1
bug TDI-23507:SQLserver JDBC: the sql of Guess Schema is wrong


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94598 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-29 08:19:29 +00:00
fwang
a8edfc3b17 bug TDI-23890 fixed:Schemas and XML Export/Import feature
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94596 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-29 08:02:29 +00:00
xqliu
54c71d17cb TDQ-6185 TDQ-6420 backport to branch 5.1 (refactoring of RenameFolderAction)
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94570 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-29 03:11:33 +00:00
fwang
4b3e413cec bug TDI-23257 fixed:When drag&drop more a context or a metadata with a context linked, it should ask to copy all context group.
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94535 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-28 10:24:00 +00:00
wchen
81cd899ca6 bug TDI-23942 fixed: DB connection :Export context:add another new group value for it : retreive schema, only one database can be detect
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94512 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-28 07:20:37 +00:00
wchen
40414c1ba0 bug TDI-23745 fixed: select context group list box only appear once when checking connection
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94508 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-28 07:17:21 +00:00
hcyi
e84482734e bug TUP-250 fixed : use jtds connect sqlserver database twice check failed(SSO) .
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94506 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-28 07:08:17 +00:00
xqliu
0ff78a3881 TDQ-6185 TDQ-6420 backport to branch 5.1 (refactoring of RenameFolderAction)
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94503 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-28 06:47:12 +00:00
xqliu
68a66dfb80 TDQ-6291 TDQ-6364 fix the problem: after reload a sybase, there will show schemas under connection
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94493 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-28 04:14:33 +00:00
nrousseau
14c04b7b9a merge r94458 from trunk to branch 5.1
TDI-23927 fixed: modify from enumeration directly


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94466 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-27 11:26:40 +00:00
xqliu
fc8fd2da58 TDQ-6185 TDQ-6420 backport to branch 5.1
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94459 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-27 10:57:46 +00:00
fwang
ec713509ab bug TDI-23943 fixed:If delete the column name in schema dialog of tRowGenerator, the Studio is blocked. Must kill the studio.
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94454 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-27 10:18:29 +00:00
hcyi
09221be330 bug TDI-22861 fixed : Can't start the studio if the AMC database is big .
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94415 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-27 06:07:19 +00:00
plv
6e57f92420 merge r94374 from trunk to branch 5.1
bug TDI-22005:No longer possible to read or conduct impact analysis on deleted items


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94379 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-26 10:25:14 +00:00
wchen
777b350d90 bug TDI-23745 fixed: select context group list box only appear once when checking connection
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94371 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-26 10:04:36 +00:00
wchen
01b93131ad bug TDI-23745 fixed: select context group list box only appear once when checking connection
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94360 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-26 08:58:29 +00:00
jjzhou
89ea83eb2e Fix Bug TDI-23184 : trunjob: BufferOutput + tAggregateRow with List returns wrong List parent job
https://jira.talendforge.org/browse/TDI-23184 

git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94340 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-26 06:57:17 +00:00
wchen
1ce533dab9 bug TDI-23745 fixed: select context group list box only appear once when checking connection
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94331 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-26 05:46:06 +00:00
plv
dbe9777fdc merge r94328 from trunk to branch 5.1
bug TDI-20748:pop "Choose Context" dialog twice when edit schema with context model


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94330 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-26 05:41:41 +00:00
plv
e20dc3c79b merge r94315 from trunk to branch 5.1
bug TDI-22005:No longer possible to read or conduct impact analysis on deleted items


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94329 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-26 05:35:13 +00:00
plv
78a485a285 merge r94278 from trunk to branch 5.1
bug TDI-22005:No longer possible to read or conduct impact analysis on deleted items


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94325 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-26 04:02:39 +00:00
cli
c7943bd6ad TUP-264: check the cache for lib and components
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94318 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-26 03:19:50 +00:00
ycbai
97984897d8 bug TDI-23861 fixed : Loading JDBC connection from metadata repository add additional colon
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94314 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-26 03:03:38 +00:00
hcyi
4672a95715 bug TUP-250 fixed : use jtds connect sqlserver database twice check failed(SSO) .
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94196 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-22 07:58:29 +00:00
fwang
14e8fa0f43 bug TDI-23357 fixed:.dll can't be installed from modules view.
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94192 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-22 07:31:11 +00:00
jjzhou
f4d0ad33db Fix Bug TDI-23184 : trunjob: BufferOutput + tAggregateRow with List returns wrong List parent job
https://jira.talendforge.org/browse/TDI-23184 

git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94156 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-22 02:48:44 +00:00
mzhao
68eb193517 TDQ-6417 the returned password must not a null value. make it to "" if null.
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94100 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-21 08:01:10 +00:00
plv
4cd1f5829f merge r93999 from trunk to branch 5.1
bug TDI-20748:pop "Choose Context" dialog twice when edit schema with context model


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@94001 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-20 07:24:18 +00:00
bchen
fe9b7789e6 Fix Bug TDI-22821 : Flow time statistics after iterate cumulative
https://jira.talendforge.org/browse/TDI-22821 
merge r93942 into branch5.1

git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@93943 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-19 07:54:35 +00:00
plv
eb749086e7 bug TDI-20748:revert code
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@93941 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-19 07:32:31 +00:00
hcyi
b43486faaf merge r93135 from trunk to branch 5.1
bug TDI-23426 fixed : upgrade the jar from mysql-connector-JAVA-5.1.0-bin.jar to mysql-connector-JAVA-5.1.22-bin.jar for studio part . 


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@93911 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-19 03:23:49 +00:00
hcyi
270561e557 merge r92974 from trunk to branch 5.1
bug TDI-23426 fixed : upgrade the jar from mysql-connector-java-5.1.0-bin.jar to mysql-connector-java-5.1.22-bin.jar for studio part .


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@93910 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-19 03:20:44 +00:00
yyin
bca8b423c3 TDQ-6395 backport : save the dependency of the connection when the name is changed
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@93875 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-16 08:06:54 +00:00
yyin
94a835d56f TDQ-6395 backport : save the dependency of the connection when the name is changed
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@93874 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-16 08:06:40 +00:00
fwang
c9ac76a205 bug TDI-23716 fixed:Create items in Metadata,when type a name there is no check
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@93863 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-16 06:17:04 +00:00
fwang
dd821715b1 bug TDI-23454 fixed:shortcut key ( ctrl+c or ctrl+drag on job ) to copy job didn't work
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@93667 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-13 06:22:06 +00:00
plv
96387b653b merge r93638 from trunk to branch 5.1
bug TDI-23507:SQLserver JDBC: the sql of Guess Schema is wrong


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@93650 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-13 03:48:55 +00:00
qiongli
6ec88eb7e6 TDQ-6166 backport to branch5.1(add a function 'initAllConnectionsToSQLExplorer' )
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@93642 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-13 02:40:25 +00:00
ycbai
3b60d2c709 bug TDI-23453 fixed : Need to add a way to set bundleId for system routines defined by extension point
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@93591 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-12 09:20:47 +00:00
wchen
437de8cae5 bug TUP-268 fixed: Merge project:if have a new route under "Meditation" perspective, and under main project "Integration" perspective, try to merge the project, get error
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@93584 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-12 07:17:33 +00:00
xqliu
2f1d299600 TDQ-6291 TDQ-6364 fix the problem when the login don't have the permission to the catalog which user input in the database wizard page for Sybase database
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@93565 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-12 02:39:12 +00:00
sizhaoliu
fd3457c9b2 merge r93554 from trunk to branch 5.1
TDQ-5280 TDQ-6414 drag and drop a BRMS connection to job. the TAC_WEBAPP field is still empty. 


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@93555 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-09 15:40:56 +00:00
sizhaoliu
165b19a355 merge r93552 from trunk to branch 5.1
TDQ-5280 TDQ-6414 propagated TAC_WEBAPP from component to wizard


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@93553 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-09 14:17:58 +00:00
ldong
8a87a4732a bug TDI-23482 fixed:backport from trunk to 5.1.
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@93488 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-09 02:37:59 +00:00
xqliu
f2d4e3047e TDQ-6291 TDQ-6364 1) fix the problem of reload sybase connection; 2) on branch 5.1
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@93461 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-08 11:09:28 +00:00
fwang
25fedcb75c bug TDI-23257 fixed:When drag&drop more a context or a metadata with a context linked, it should ask to copy all context group.
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@93448 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-08 10:03:51 +00:00
mwang
bd58d821dd For bug TDI-23415
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@93433 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-08 08:27:41 +00:00
xqliu
1c4e716de8 TDQ-6389 TDQ-6393 1) remove the useless judgement codes; 2) on branch 5.1
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@93426 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-08 07:52:00 +00:00
hcyi
51bf3acc75 bug TDI-23181 fixed : fix some problem for the MSSQL database name with a "-" .
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@93413 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-08 06:37:47 +00:00
xqliu
ba3d68e090 TDQ-6389 TDQ-6393 1) use the login name as the database name when user don't input it; 2) show database as a catalog; 3) on branch 5.1
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@93407 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-08 04:24:18 +00:00
plv
aa35063c76 merge r93355 from trunk to branch 5.1
bug TDI-23507:SQLserver JDBC: the sql of Guess Schema is wrong


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@93404 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-08 02:41:44 +00:00
mwang
a83562a5b0 For bug TDI-12596, from the screenshots, only schema can not be propagated to metadata db.
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@93382 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-07 10:10:27 +00:00
mwang
212d0126c3 For bug TUP-221
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@93332 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-07 04:21:28 +00:00
ycbai
24a7e10f62 bug TDI-23528 fixed : Can't create the remote conneciton if install path contain blank space
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@93302 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-06 09:59:54 +00:00
plv
975b6349f5 merge r93282 from trunk to branch 5.1
bug TDI-23200:'#' Character in Password does not work


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@93296 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-06 09:15:12 +00:00
zwzhao
392d60591b bug TDI-22320 fixed : Message should pop up to remind user there are jobs locked when delete folder contains locked jobs
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@93291 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-06 09:00:09 +00:00
zwzhao
af15c95f8f bug TDI-23092 fixed : Update Component.xsd
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@93256 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-06 02:51:13 +00:00
ycbai
3f2a82fc21 bug TDI-23550 fixed : check API used to generate xml metadata from XSD
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@93252 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-06 02:42:38 +00:00
zwzhao
ccdc296b8d bug TDI-22320 fixed : Message should pop up to remind user there are jobs locked when delete folder contains locked jobs
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@93214 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-05 03:57:57 +00:00
wchen
340e197ff6 bug TDI-22830 fixed: the jar file can't be imported when import routines
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@93210 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-05 02:40:11 +00:00
ycbai
1438f7d6c5 bug TDI-23178 fixed : Error when import a full project initialized by a different type of product (MDM > DQ/DI or DQ > DI)
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@93183 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-02 09:15:08 +00:00
plv
82a200b384 merge r93175 from trunk to branch 5.1
bug TDI-23200:'#' Character in Password does not work


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@93182 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-02 09:14:39 +00:00
wchen
ca0adfff8e merge r92973 from trunk to branch 5.1
bug TDQ-6274 fixed: manually change label or db column won't lost the analysis


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@93170 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-02 07:16:11 +00:00
plv
c49b073479 merge r93152 from trunk to branch 5.1
bug TDI-23200:'#' Character in Password does not work


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@93154 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-02 03:04:12 +00:00
xqliu
53ceb690e7 TDQ-6291 TDQ-6364 1) externalize strings 3) on branch 5.1
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@93119 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-11-01 04:47:47 +00:00
fwang
e3b6894a64 bug TDI-23357 fixed:.dll can't be installed from modules view.
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@93029 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-31 02:21:26 +00:00
xqliu
b2929b4824 TDQ-6291 TDQ-6364 1) get sybase structure information from system tables; 2) do some code cleaning; 3) on branch 5.1
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@93019 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-30 10:44:12 +00:00
wchen
2212ea1021 merge r93012 from trunk to branch 5.1
bug TDI-23383  fixed : Merge reference project can not work


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@93016 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-30 10:22:55 +00:00
wchen
db34be3de5 merge r92947 from trunk to branch 5.1
bug  TDI-23218 fixed: Unable to associate a fixed value with an XML element (duplicate to 0011723 which is NOT FIXED) 


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@92950 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-29 09:36:59 +00:00
mwang
bba322e979 For bug TDI-22983, the fixes do not display the dialog to choose a context.
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@92931 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-29 05:29:17 +00:00
hcyi
b5d76de144 bug TDI-23468 fixed : open refence service item in main project , have another problems .
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@92863 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-26 09:20:13 +00:00
wchen
1459a58f45 merge r92834 from trunk to branch 5.1
bug TDQ-6274 fixed: manually change label or db column won't lost the analysis


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@92837 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-26 05:31:53 +00:00
fwang
db2b9dc1d5 bug TDI-23408 fixed:Close repository view / reopen, impossible to do any double click in any item.
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@92827 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-26 01:35:25 +00:00
fwang
9d6895cddb bug TDI-23408 fixed:Close repository view / reopen, impossible to do any double click in any item.
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@92786 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-25 09:57:18 +00:00
zwzhao
efcc63d493 bug TDI-22320 fixed : Message should pop up to remind user there are jobs locked when delete folder contains locked jobs
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@92761 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-25 07:13:53 +00:00
jyhu
8eb04e6087 Fix Bug TDI-22793 : tMSSQLInput of small numbers
https://jira.talendforge.org/browse/TDI-22793

git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@92743 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-25 03:32:22 +00:00
fwang
494ebd3f51 bug TDI-23257 fixed:When drag&drop more a context or a metadata with a context linked, it should ask to copy all context group.
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@92737 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-25 03:02:50 +00:00
hcyi
0e21f83fde merge r92730 from trunk to branch 5.1
bug TDI-23181 fixed : On MSSQL Can't Retrieve Schema on a DB with a "-" .


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@92733 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-25 02:50:08 +00:00
qiongli
f16723a7e3 merge r92686 from trunk to branch 5.1
TDQ-6360 - Create a new instance of TdColumn to avoid column lost after job generated.


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@92727 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-25 01:39:28 +00:00
wliu
ac7d4e23c4 Fix Bug TDI-23411 : NodeUtil.getPrivateConnClassName(final IConnection conn) return value is not correct
https://jira.talendforge.org/browse/TDI-23411

git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@92693 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-24 11:18:32 +00:00
qiongli
78318f3a0d TDQ-6166: fix the remain problem(xwang note) for 5.1.
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@92683 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-24 10:23:23 +00:00
jzhao
c09ad426e6 Fixed Bug TDI-23411: NodeUtil.getPrivateConnClassName(final IConnection conn) return value is not correct
https://jira.talendforge.org/browse/TDI-23411

git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@92667 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-24 08:25:23 +00:00
mzhao
95f48cfe8e merge r92587 from trunk to branch 5.1
TDQ-5837 TDI-23300 
- revert commit: 80747
- Use a new method to retrieve TdColumn list in ColumnHelper intead of using a deprecated method.
- Check the db column name again for all the Node of currect process before persistence.


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@92619 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-23 07:50:13 +00:00
xqliu
2c188a7a6c TDQ-6204 TDQ-6336 1) set "AvoidUnloadResource" with true before execute the WorkUnit; 2) on branch 5.1
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@92617 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-23 07:22:37 +00:00
zwzhao
59b931f17d bug TDI-22975 fixed : Cancelling Expression Builder
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@92528 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-22 03:36:07 +00:00
rdubois
3108ff8744 merge r92511 from trunk to branch 5.1
TDI-21998 fixed: char seems not to be available anymore.


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@92512 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-19 12:43:39 +00:00
qiongli
041c21e403 TDQ-6166 backport to 5.1( Remove/add connection in sqlExplore).
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@92456 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-19 04:59:37 +00:00
jyhu
8b4a2c662a Fix Bug TDI-22876 : tReplace always case-sensitive when replacing with null
https://jira.talendforge.org/browse/TDI-22876

git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@92443 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-19 03:44:26 +00:00
fwang
7ef8c0d6e7 bug TDI-23216 fixed:Cam't edit the property of item
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@92369 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-18 09:21:43 +00:00
fwang
4d8b6cb445 bug TDI-22734 fixed:Joblet icon:Revert not worked for it
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@92344 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-18 07:07:27 +00:00
zshen
ceeb51b2c4 TDQ-4855 active reload confirm dialog when user modify a schema on DatabaseWizard
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@92321 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-18 03:31:36 +00:00
wchen
7c7c42269a merge r92270 from trunk to branch 5.1
bug  TDI-23275 fixed: BD build:Project setting->Palette Setting->Transfer components under "Technical" folder from Hide part to Show part, get error message


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@92276 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-17 09:04:30 +00:00
zshen
cf7022fd9f TDQ-6200 TDQ-6264 after switch context change the name of catalog or schema.
fixed reload function for mssql and oracle
                                      make change the name of catalog instead of remove and add catalog.

git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@92258 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-17 07:59:12 +00:00
zshen
513e7673ef TDQ-6200 TDQ-6264 after switch context change the name of catalog or schema.
fixed reload function for mssql and oracle
                                      make change the name of catalog instead of remove and add catalog.

git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@92257 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-17 07:57:21 +00:00
plv
dd4487935e bug TDI-21217:Embedded Rules:Edit rule:garbage string
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@92246 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-17 07:11:57 +00:00
wchen
af3327e591 merge r92209 from trunk to branch 5.1
bug TDQ-6219 fixed: Fix the column missing issue when columns are unchanged after retrieve schema


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@92211 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-17 02:21:31 +00:00
plv
56f14cb4c3 bug TDI-23197:error show in error log when click Finish during Access connection creation
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@92187 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-16 08:39:33 +00:00
bchen
1db27fee9c Fix Bug TDI-21609 : Unexpected result when tOracleInput load data with time zone
https://jira.talendforge.org/browse/TDI-21609 
merge r92160 into branch5.1

git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@92172 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-16 02:28:06 +00:00
plv
87f8fed993 bug TDI-23177:Copy to generic schema:after copy this schema, name changed
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@92171 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-16 02:05:33 +00:00
hwang
c1dcd70826 merge r92115 from trunk to branch 5.1
TDI-23247:Login project throws NPE.


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@92116 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-15 08:13:22 +00:00
plv
b8b7544c5a merge r92034 from trunk to branch 5.1
bug TDI-22504:did not filter catalog when retrieve schema for specified informix connection


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@92037 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-12 06:56:45 +00:00
hwang
5561025a1d merge r92028 from trunk to branch 5.1
TDI-23217:set columns for outputmetadata in outputmapping ,but can not see any columns in the last page


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@92029 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-12 06:06:44 +00:00
xqliu
a2cacc6819 TDQ-6252 TDQ-6293 remove the inaccurate java doc
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@92019 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-12 04:25:18 +00:00
bchen
7fc5523701 Fix Work Item TDI-23035 : Problems after supporting Timestamp with Timezone type in the Oracle
https://jira.talendforge.org/browse/TDI-23035
merge r91957 into branch 5.1


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@91959 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-11 08:03:26 +00:00
xqliu
c43f3de71e TDQ-6096 TDQ-6278 modify the driver class name for Ingres
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@91892 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-10 09:56:54 +00:00
bchen
e8e00ed307 Fix Work Item TDI-23035 : Problems after supporting Timestamp with Timezone type in the Oracle
https://jira.talendforge.org/browse/TDI-23035
merge r91837 into branch 5.1

git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@91842 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-10 06:52:45 +00:00
fwang
af0deba9b0 bug TDI-22734 fixed:Joblet icon:Revert not worked for it
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@91823 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-10 04:52:03 +00:00
bchen
321899411d Fix Work Item TDI-23035 : Problems after supporting Timestamp with Timezone type in the Oracle
https://jira.talendforge.org/browse/TDI-23035 
1. define "TIMESTAMP WITH TIME ZONE" type instead of "TIMESTAMP(6) WITH TIME ZONE" type, 0~9 permitted for length. 
2. modified TalendDate?.format method for timezone pattern. 
3. modified tCreateTable and tOracleOutput to create table with Timestamp with time zone type. 
merge r91750 into branch5.1

git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@91779 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-09 10:02:03 +00:00
plv
9e5c89b7c9 bug TDI-22922:Wrong string show on create a service panel and the panel title should not be empty.
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@91758 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-09 09:06:54 +00:00
fwang
e340ab9d99 bug TDI-23069 fixed:Retrieve Oracle Schema with default values
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@91731 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-09 01:14:18 +00:00
ldong
403c2f8644 bug TDI-22781 fixed:backport from trunk to 5.1.
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@91715 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-10-08 09:27:41 +00:00
ldong
1ac31be0da bug TDI-22920 fixed:copy a job then paste it, error show in error log.
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@91484 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-09-27 07:58:30 +00:00
zshen
4b89fa78e8 TDQ-6168 TDQ-6202 make it don't effect other operation although have dirty connection file exist.
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@91480 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-09-27 07:25:36 +00:00
mwang
06da92ae35 For bug TDI-21878
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@91356 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-09-26 03:04:50 +00:00
hcyi
aea0ab0080 merge r91320 from trunk to branch 5.1
bug TDI-22752 fixed : Create WSDL from top menu, miss "select folder" dialog .


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@91323 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-09-25 10:17:23 +00:00
fwang
f2828ffd83 bug TDI-20755 fixed: Got the same column name in tRowGenerator component
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@91319 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-09-25 10:10:34 +00:00
hcyi
d99e4d5d80 merge r91309 from trunk to branch 5.1
bug TDI-22514 fixed : Vertica component ?save property to metedata ,NPE error .


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@91312 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-09-25 10:01:07 +00:00
bchen
94141bdd8c Fix Bug TDI-21779 : tOracleSCD type 2 does not work as expected with fields containing timestamps
https://jira.talendforge.org/browse/TDI-21779
1.make TalendDate.parseDate method support to store timezone
2.make tOracleSCD component support "Timestamp With Time Zone" type
merge r91187 & r91295 into branch5.1

git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@91300 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-09-25 09:36:44 +00:00
zshen
f29930364b TDQ-5850 TDQ-5860 make software can be save and delete noraml
make reload worked

git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@91290 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-09-25 08:51:49 +00:00
zshen
0632fc5435 TDQ-5850 TDQ-5860 make software can be save and delete noraml
make reload worked

git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@91288 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-09-25 08:49:01 +00:00
fwang
5cdb723a1e bug TDI-22734 fixed:revert
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@91263 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-09-25 06:32:44 +00:00
hcyi
11fae62f21 bug TDI-22816 fixed : Open ESBDEMOS project,use an existing account can't connect to talendforge .
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@91247 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-09-25 02:24:26 +00:00
fwang
97144881de bug TDI-22734 fixed:Joblet icon:Revert not worked for it
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@91198 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-09-24 08:55:26 +00:00
ycbai
1e32a80420 git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@91107 f6f1c999-d317-4740-80b0-e6d1abc6f99e 2012-09-21 07:20:10 +00:00
ycbai
15650f400d bug TDI-22766 fixed : Unable to compile routines missing dom4j jar in dependencies lib directory.
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@91106 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-09-21 07:12:27 +00:00
fwang
d36b9f2373 bug TDI-22712 fixed:TIS Freezes when trying to Create Documentation for specific job
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@91103 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-09-21 06:40:55 +00:00
wchen
cd721a7aeb bug TDI-22802 fixed : Metadata dialog: schema propagation
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@91041 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-09-20 06:25:57 +00:00
hcyi
a5158d37a3 bug TDQ-6100 fixed : delete "ITEMS" function doesn't work well .
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@91040 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-09-20 06:13:03 +00:00
hcyi
0e4c36d687 bug TDI-21584 fixed : tRunJob:Change subjob name and content, run main job, content can not be update .
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@90995 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-09-19 09:25:58 +00:00
nhaumont
02584d8f98 Delete 5.1 branch useless selenium plugin
git-svn-id: http://talendforge.org/svn/tis_shared/branches/branch-5_1@90979 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-09-19 07:56:13 +00:00
yyin
a54b8e7b69 TDQ-5668
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@90973 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-09-19 07:25:13 +00:00
fwang
8ee6be3ded bug TDI-22712 fixed:TIS Freezes when trying to Create Documentation for specific job
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@90968 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-09-19 07:22:14 +00:00
yyin
49fb57f772 merge r90950 from trunk to branch 5.1
TDQ-5362 column/column set analysis editor can not be shown correctly after switching the context of file connection
    TDQ-6151 Remove the analysis impact dialog in DI perspective when swiching context


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@90958 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-09-19 04:41:51 +00:00
yyin
1b5b9adeea merge r90951 from trunk to branch 5.1
TDQ-5668 The display of connection URL string in connection editor is not correct in context mode
-- change the URL in database's item file when switching context


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@90955 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-09-19 04:17:57 +00:00
plv
ae4d977060 merge r90603 from trunk to branch 5.1
bug TDI-20748:pop "Choose Context" dialog twice when edit schema with context model


git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@90944 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-09-19 02:47:40 +00:00
fwang
5a94e1c547 bug TDI-22667 fixed:incorrect duplicate name error for joblet
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@90939 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-09-19 01:48:33 +00:00
fwang
360269d91c bug TDI-22684 fixed:No right-click option to delete schemas in Recycle Bin
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@90937 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-09-19 01:38:48 +00:00
mwang
d1a13a1237 TDI-21878
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@90914 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-09-18 09:29:12 +00:00
zshen
eb131d292e TDQ-6054 TDQ-6132 make report support to matching of JUDI.
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@90907 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-09-18 08:48:10 +00:00
xqliu
498e78f282 TDQ-5381 TDQ-6134 1) modify Median.definition; 2) create UpdateSybaseLanguageNameForMedianIndicatorTask.java; 3) update demo project; 4) on branch 5.1
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@90899 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-09-18 08:24:41 +00:00
hcyi
d73f7993b3 bug TDI-22321 fixed : tRunjob:canot detect child job when deleted child job .
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@90888 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-09-18 07:50:33 +00:00
ycbai
6565a23962 bug TDI-22674 fixed : "-Dfile.encoding=UTF-8" causes Japanese characters garbling in retrieving schema of MS Access.
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@90875 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-09-18 06:41:10 +00:00
zpbai
e2f12f3f18 QAI-14128 - Delete the TDQ automation tests from tis_shared branch 5.1
git-svn-id: http://talendforge.org/svn/tis_shared/branches/branch-5_1@90859 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-09-18 04:34:36 +00:00
zpbai
4b22423501 QAI-14128 - Delete the Selenium automation tests from tis_shared trunk
git-svn-id: http://talendforge.org/svn/tis_shared/branches/branch-5_1@90858 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-09-18 04:33:32 +00:00
zpbai
ac7d51f672 QAI-14128 - Delete the DI automation tests from tis_shared branch 5.1
git-svn-id: http://talendforge.org/svn/tis_shared/branches/branch-5_1@90857 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-09-18 04:30:39 +00:00
zpbai
2bccdc3013 QAI-14128 - Delete the MDM automation tests from tis_shared branch 5.1
git-svn-id: http://talendforge.org/svn/tis_shared/branches/branch-5_1@90856 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-09-18 04:28:47 +00:00
bchen
6d217d9136 Fix Bug TDI-21609 : Unexpected result when tOracleInput load data with time zone
https://jira.talendforge.org/browse/TDI-21609 
support oracle type "TIMESTAMP WITH TIME ZONE" 
merge r89107 & r90785 into branch5.1

git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@90835 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-09-18 03:02:19 +00:00
jyhu
45d4a673ea Fix Bug TDI-22351 : Execption occured while genereting sample data using tRowGenerator into existing Teradata table.
http://jira.talendforge.org/browse/TDI-22351 

git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@90817 f6f1c999-d317-4740-80b0-e6d1abc6f99e
2012-09-18 01:45:07 +00:00
1534 changed files with 8552 additions and 102600 deletions

View File

@@ -10,6 +10,7 @@ ColorStyledText.SelectAllItem.Text=Alle ausw
ContentProposalAdapterExtended.close=Schließen
ControlUtils.Unsupported1=Dieses Steuerelement ({0}) wird nicht unterstützt, bei Bedarf "Feature Request" eröffnen...
CopyPushButton.CopyButton.Tip=Ausgewählte Elemente kopieren
DateDialog.textContent=Wähle Datum und Zeit
DialogErrorForCellEditorListener.Error.MsgDialogTitle=ERROR
ErrorDialogWidthDetailArea.ErrorMessage.Text=Fehlermeldung
EventUtil.activate=Aktivieren

View File

@@ -104,13 +104,13 @@ TableViewerCreator.CellModifier.ExError=\u73FE\u5728\u306E CellModifier \u306F\u
TableViewerCreator.columnNoIBeanProperty=\u30AB\u30E9\u30E0 '{0}' ('{1}') \u306F CellEditor \u30BB\u30C3\u30C8\u3092\u6301\u3061\u307E\u3059\u304C\u3001 IBeanPropertyAccessors\u3092\u6301\u3061\u307E\u305B\u3093\u3002
TableViewerCreator.columnNullId=\u30AB\u30E9\u30E0 '{0}' \u306FNULL\u5024\u306Eid\u3092\u6301\u3063\u3066\u3044\u307E\u3059\u3002
TableViewerCreator.IdProperty.AssertMsg=\u30AB\u30E9\u30E0\u306EidProperty\u306E\u5909\u66F4\u304C\u5FC5\u8981\u3067\u3059\u3001idProperty\u306F\uFF11\u3064\u306E\u30C6\u30FC\u30D6\u30EB\u3067\u30E6\u30CB\u30FC\u30AF\u3067\u306A\u304F\u3066\u306F\u306A\u308A\u307E\u305B\u3093\u3002
TableViewerCreator.Table.BeNull=\u30C6\u30FC\u30D6\u30EB\u304CNULL\u5024\u3067\u3059
TableViewerCreator.Table.BeNull=\u30C6\u30FC\u30D6\u30EB\u304Cnull\u3067\u3059
TableViewerCreator.TableColumn.AssertMsg=idProperty'{0}'\u304C\u3042\u308BTableEditorColumn\u306ETableColumn\u306F\u3001\u6B63\u3057\u3044\u89AATable\u3092\u6301\u3063\u3066\u3044\u307E\u305B\u3093\u3002
TreeToTablesLinker.Type.Unsupported=\u3053\u306E\u30BF\u30A4\u30D7\u306EcurrentControl\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
exception.errorOccured=\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\uFF08{0}\uFF09\n\u8A73\u7D30\u306F\u30ED\u30B0\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002
ModelSelectionDialog.Message=\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\uFF11\u3064\u9078\u629E\u3059\u308B\u304B\u3001\u30AD\u30E3\u30F3\u30BB\u30EB\u3057\u3066\u304F\u3060\u3055\u3044\u3002
ModelSelectionDialog.Option=\u30AA\u30D7\u30B7\u30E7\u30F3
ModelSelectionDialog.BuiltIn=\u7D44\u307F\u8FBC\u307F\u30D7\u30ED\u30D1\u30C6\u30A3\u306B\u5909\u66F4
ModelSelectionDialog.BuiltIn=\u7D44\u8FBC\u307F\u30D7\u30ED\u30D1\u30C6\u30A3\u306B\u5909\u66F4
ModelSelectionDialog.ViewSchema=\u30B9\u30AD\u30FC\u30DE\u306E\u8868\u793A\uFF08\u8AAD\u307F\u53D6\u308A\u5C02\u7528\uFF09\u3002
ModelSelectionDialog.ViewQuery=\u30AF\u30A8\u30EA\u306E\u8868\u793A\uFF08\u8AAD\u307F\u53D6\u308A\u5C02\u7528\uFF09\u3002
ModelSelectionDialog.Update=\u30EA\u30DD\u30B8\u30C8\u30EA\u63A5\u7D9A\u306E\u66F4\u65B0\u3002

View File

@@ -1 +1,9 @@
AddPushButton.AddButton.Tip=Toevoegen
DateDialog.textContent=Selecteer datum & tijd
DialogErrorForCellEditorListener.Error.MsgDialogTitle=Fout
EventUtil.modify=Wijzigen
EventUtil.move=Verplaatsen
EventUtil.show=Toon
LabelledFileField.BrowseButton.Text=Blader...
commons.error=Fout
ExceptionMessageDialog.Yes=Ja

View File

@@ -25,6 +25,7 @@ DefaultCellModifier.tableItemDispose=TableItem disposed
DialogErrorForCellEditorListener.Error.MsgDialogTitle=Error
ErrorDialogWidthDetailArea.ErrorMessage.Text=Error Message
ErrorDialogWidthDetailArea.ErrorMessage.ColumnText=Column can not be empty
ErrorDialogWidthDetailArea.ErrorMessage.ColumnText.NotValid=The input '{0}' is not valid, will use the original value '{1}' instead of it.
ErrorDialogWithContinue.setParameter=Set parameters and continue
EventUtil.activate=activate
EventUtil.arm=arm

View File

@@ -103,7 +103,7 @@ public class ImageUtils {
* RAP.
*/
public static Image scale(Image image, int percent) {
float scale = (float) percent / 100f;
float scale = percent / 100f;
int newWidth = (int) (scale * image.getImageData().width);
int newHeight = (int) (scale * image.getImageData().height);
ImageData imageData = image.getImageData().scaledTo(newWidth, newHeight);
@@ -118,7 +118,7 @@ public class ImageUtils {
return image;
}
private static Map<String, Image> propertyImgCachedImages = new HashMap<String, Image>();
public static Map<String, Image> propertyImgCachedImages = new HashMap<String, Image>();
public static Image propertyLabelScale(String id, Image image, ICON_SIZE size) {
if (image != null && size != null) {
@@ -201,8 +201,9 @@ public class ImageUtils {
if (baos != null) {
try {
baos.close();
if (img != null && !img.isDisposed())
if (img != null && !img.isDisposed()) {
img.dispose();
}
} catch (IOException e) {
ExceptionHandler.process(e);
}
@@ -283,11 +284,11 @@ public class ImageUtils {
// if width is mort than height.
if (w > h) {
newSize.x = requiredSize.x;
newSize.y = (int) (w >= 1 ? Math.round(originalSize.y / w) : Math.round(originalSize.y * w));
newSize.y = (w >= 1 ? Math.round(originalSize.y / w) : Math.round(originalSize.y * w));
}
// if width is less than height.
else if (w < h) {
newSize.x = (int) (h >= 1 ? Math.round(originalSize.x / h) : Math.round(originalSize.x * h));
newSize.x = (h >= 1 ? Math.round(originalSize.x / h) : Math.round(originalSize.x * h));
newSize.y = requiredSize.y;
}
// if equal

View File

@@ -28,7 +28,6 @@ import org.eclipse.jface.viewers.ColumnWeightData;
import org.eclipse.jface.viewers.IBaseLabelProvider;
import org.eclipse.jface.viewers.ICellModifier;
import org.eclipse.jface.viewers.IContentProvider;
import org.eclipse.jface.viewers.ILazyContentProvider;
import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.jface.viewers.TableLayout;
@@ -61,7 +60,6 @@ import org.talend.commons.ui.runtime.ws.WindowSystem;
import org.talend.commons.ui.swt.tableviewer.behavior.DefaultHeaderColumnSelectionListener;
import org.talend.commons.ui.swt.tableviewer.behavior.DefaultStructuredContentProvider;
import org.talend.commons.ui.swt.tableviewer.behavior.DefaultTableLabelProvider;
import org.talend.commons.ui.swt.tableviewer.behavior.LazyContentProvider;
import org.talend.commons.ui.swt.tableviewer.behavior.TableViewerCreatorLayout;
import org.talend.commons.ui.swt.tableviewer.data.AccessorUtils;
import org.talend.commons.ui.swt.tableviewer.data.ModifiedObjectInfo;
@@ -215,15 +213,11 @@ public class TableViewerCreatorNotModifiable<B> {
private boolean columnsSortableByDefault;
private boolean lazyLoad;
private ICellModifier cellModifier;
private ITableLabelProvider labelProvider;
private IStructuredContentProvider contentProviderold;
private IContentProvider contentProvider;
private IStructuredContentProvider contentProvider;
private ControlListener tableParentResizedListener;
@@ -283,6 +277,8 @@ public class TableViewerCreatorNotModifiable<B> {
private ListenableList<B> listenableList;
private boolean lazyLoad;
/**
* Constructor.
*
@@ -361,7 +357,7 @@ public class TableViewerCreatorNotModifiable<B> {
tableEditorManager.init(this.listenableList);
}
if (hasChanged && !(contentProvider instanceof ILazyContentProvider)) {
if (hasChanged && !isLazyLoad()) {
refreshTableEditorControls();
}
@@ -431,7 +427,7 @@ public class TableViewerCreatorNotModifiable<B> {
@Override
public void insert(Object element, int position) {
super.insert(element, position);
refreshTableEditorControls();
// tableEditorManager.redrawControls();
}
/*
@@ -455,10 +451,7 @@ public class TableViewerCreatorNotModifiable<B> {
@Override
public void replace(Object element, int index) {
super.replace(element, index);
refreshTableEditorColumn(index);
if (!(contentProvider instanceof ILazyContentProvider)) {
refreshTableEditorControls();
}
refreshTableEditorControls();
}
/*
@@ -546,25 +539,38 @@ public class TableViewerCreatorNotModifiable<B> {
}
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.viewers.AbstractTableViewer#inputChanged(java.lang.Object, java.lang.Object)
*/
// @Override
// protected void internalRefresh(Object element, boolean updateLabels) {
// int oldCount = tableViewer.getTable().getItemCount();
// if (getInputList() != null && oldCount != getInputList().size()) {
// setItemCount(getInputList().size());
// }
// super.internalRefresh(element, updateLabels);
// };
@Override
protected void inputChanged(Object input, Object oldInput) {
if (input instanceof List && contentProvider instanceof ILazyContentProvider) {
int newSize = ((List) input).size();
int oldSize = 0;
if (oldInput instanceof List) {
oldSize = ((List) oldInput).size();
protected void hookControl(Control control) {
super.hookControl(control);
table.addListener(SWT.SetData, new Listener() {
@Override
public void handleEvent(Event event) {
TableItem item = (TableItem) event.item;
int index = table.indexOf(item);
if (index == -1) {
return;
}
B element = getInputList().get(index);
// if (element != item.getData()) {
associate(element, item);
updateItem(item, element);
refreshTableEditorColumn(index);
// }
}
if (newSize != oldSize) {
tableViewer.setItemCount(newSize);
}
}
super.inputChanged(input, oldInput);
}
});
};
};
setTablePreferences();
@@ -666,7 +672,7 @@ public class TableViewerCreatorNotModifiable<B> {
if (verticalScroll) {
style |= SWT.V_SCROLL;
}
if (lazyLoad) {
if (isLazyLoad()) {
style |= SWT.VIRTUAL;
}
return style;
@@ -731,7 +737,9 @@ public class TableViewerCreatorNotModifiable<B> {
@Override
public void run() {
getTable().forceFocus();
if (!getTable().isDisposed()) {
getTable().forceFocus();
}
}
}).start();
}
@@ -1141,7 +1149,6 @@ public class TableViewerCreatorNotModifiable<B> {
if (this.contentProvider == null) {
this.contentProvider = new DefaultStructuredContentProvider(this);
}
tableViewer.setContentProvider(this.contentProvider);
}
@@ -1618,7 +1625,7 @@ public class TableViewerCreatorNotModifiable<B> {
return contentProvider;
}
public void setContentProvider(IContentProvider contentProvider) {
public void setContentProvider(IStructuredContentProvider contentProvider) {
if (tableViewer != null && tableViewer.getContentProvider() != contentProvider) {
tableViewer.setContentProvider(contentProvider);
}
@@ -1791,9 +1798,8 @@ public class TableViewerCreatorNotModifiable<B> {
}
public void refreshTableEditorColumn(int index) {
if (tableEditorManager != null && contentProvider instanceof ILazyContentProvider) {
if (tableEditorManager != null && isLazyLoad()) {
tableEditorManager.refreshColumn(index);
// tableEditorManager.redrawControls();
}
}
@@ -2159,7 +2165,6 @@ public class TableViewerCreatorNotModifiable<B> {
public void setLazyLoad(boolean lazyLoad) {
this.lazyLoad = lazyLoad;
setContentProvider(new LazyContentProvider(this));
}
}

View File

@@ -22,7 +22,6 @@ import java.util.List;
import java.util.Set;
import org.apache.commons.collections.set.MapBackedSet;
import org.eclipse.jface.viewers.ILazyContentProvider;
import org.eclipse.swt.custom.TableEditor;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
@@ -223,44 +222,40 @@ public class TableEditorManager {
return;
}
if (!(tableViewerCreator.getContentProvider() instanceof ILazyContentProvider)) {
TableItem[] items = tableViewerCreator.getTable().getItems();
TableItem[] items = tableViewerCreator.getTable().getItems();
List<TableEditor> addedTableEditor = new ArrayList<TableEditor>();
List<TableEditor> addedTableEditor = new ArrayList<TableEditor>();
for (TableItem item : items) {
TableItem tableItem = item;
if (previousItemsHash == null || !previousItemsHash.contains(tableItem)) {
for (TableItem item : items) {
TableItem tableItem = item;
if (previousItemsHash == null || !previousItemsHash.contains(tableItem)) {
for (int iEditorCol = 0; iEditorCol < columnsWithEditorContent.size(); iEditorCol++) {
TableViewerCreatorColumnNotModifiable column = columnsWithEditorContent.get(iEditorCol);
for (int iEditorCol = 0; iEditorCol < columnsWithEditorContent.size(); iEditorCol++) {
TableViewerCreatorColumnNotModifiable column = columnsWithEditorContent.get(iEditorCol);
TableEditorContentNotModifiable tableEditorContent = column.getTableEditorContent();
TableEditorContentNotModifiable tableEditorContent = column.getTableEditorContent();
String idProperty = column.getId();
TableEditor tableEditor = addTableEditor(column, tableEditorContent, idProperty, tableItem);
if (tableEditor != null) {
addedTableEditor.add(tableEditor);
}
String idProperty = column.getId();
TableEditor tableEditor = addTableEditor(column, tableEditorContent, idProperty, tableItem);
if (tableEditor != null) {
addedTableEditor.add(tableEditor);
}
}
}
for (int i = indexStart; i < items.length; i++) {
TableItem tableItem = items[i];
Object data = tableItem.getData();
Collection<TableEditor> tableEditorCollection = dataToMultipleDataEditor.getCollection(data);
for (TableEditor tableEditor : tableEditorCollection) {
tableEditor.setItem(tableItem);
}
}
previousItemsHash = new HashSet<TableItem>(Arrays.asList(items));
} else {
refreshColumn(indexStart);
}
for (int i = indexStart; i < items.length; i++) {
TableItem tableItem = items[i];
Object data = tableItem.getData();
Collection<TableEditor> tableEditorCollection = dataToMultipleDataEditor.getCollection(data);
for (TableEditor tableEditor : tableEditorCollection) {
tableEditor.setItem(tableItem);
}
}
previousItemsHash = new HashSet<TableItem>(Arrays.asList(items));
}
private void handleRemovedEvent(final ListenableListEvent event) {
@@ -358,7 +353,7 @@ public class TableEditorManager {
public void refreshColumn(int index) {
Table table = tableViewerCreator.getTable();
if (table.isDisposed()) {
if (table.isDisposed() || index >= table.getItems().length) {
return;
}
for (int iEditorCol = 0; iEditorCol < columnsWithEditorContent.size(); iEditorCol++) {
@@ -405,8 +400,12 @@ public class TableEditorManager {
dataToMultipleDataEditor.put(tableItem.getData(), tableEditor);
Object currentRowObject = tableItem.getData();
// Object value = tableViewerCreator.getCellModifier().getValue(currentRowObject, idProperty);
Object value = column.getBeanPropertyAccessors().get(tableItem.getData());
Object value = null;
if (column.getBeanPropertyAccessors() != null) {
value = column.getBeanPropertyAccessors().get(tableItem.getData());
} else {
value = tableViewerCreator.getCellModifier().getValue(currentRowObject, idProperty);
}
Control control = tableEditorContent.initialize(tableItem.getParent(), tableEditor, column, currentRowObject, value);
// control.addDisposeListener(new DisposeListener() {

View File

@@ -1,36 +0,0 @@
ReusableMultiKey.Keys.BeNull=\u4E3B\u952E\u6570\u7EC4\u4E0D\u80FD\u4E3A\u7A7A
utils.workbench.extensions.noExtension=\u6269\u5C55\u70B9ID\u4E3A"{0}"\u7684Plug-in\u4E0D\u5B58\u5728
resources.file.notGet=\u8981\u6C42\u7684\u6587\u4EF6"{0}"\u6CA1\u6709\u5728\u6587\u4EF6\u5939"{1}"\u4E2D
ListenableList.IndexSameLength.Error=\u539F\u59CB\u7D22\u5F15\u548C\u76EE\u6807\u7D22\u5F15\u5FC5\u987B\u4E3A\u76F8\u540C\u7684\u957F\u5EA6
resources.folder.notGet=\u8981\u6C42\u7684\u6587\u4EF6\u5939"{0}"\u6CA1\u6709\u5728\u5DE5\u7A0B"{1}"\u4E2D
resources.resource.notMoved=\u8D44\u6E90"{0}"\u4E0D\u80FD\u79FB\u52A8\u5230"{1}"
resources.file.notDeleted=\u6587\u4EF6"{0}"\u4E0D\u80FD\u88AB\u5220\u9664
resources.folder.notDeleted=\u6587\u4EF6\u5939"{0}"\u4E0D\u80FD\u88AB\u5220\u9664
resources.folder.notEmptied=\u6587\u4EF6\u5939"{0}"\u4E0D\u80FD\u4E3A\u7A7A
utils.workbench.extensions.badNumberOfExtension=\u65E0\u6548\u7684\u6269\u5C55\u6570\u5B57\u88AB\u53D1\u73B0\u5728{0}\u4E2D\uFF0C\u5F53\u67E5\u627E{3}\u51FA\u73B0\u5728{1}\u548C{2}\u4E4B\u95F4
ExtensionImplementationProviders.ExtensionPointError=\u6269\u5C55\u70B9\u5FC5\u987B\u4F7F\u7528\u5355\u5B9E\u4F8B\u6A21\u5F0F
ExceptionHandler.Parameter.BeNull=\u53C2\u6570\u4E0D\u80FD\u4E3A\u7A7A\u5F02\u5E38
resources.file.notCreated=\u6587\u4EF6"{0}"\u4E0D\u80FD\u88AB\u521B\u5EFA({1})
resources.project.notGet=\u8981\u6C42\u7684\u5DE5\u7A0B"{0}"\u4E0D\u5B58\u5728
resources.fileContent.notGet=\u6587\u4EF6"{0}"\u7684\u5185\u5BB9\u65E0\u6CD5\u8BFB\u53D6\u3002
VersionUtils.Version.Error2=\u7578\u5F62\u5B57\u7B26\u4E32{0}(\u51FA\u73B0M{1}m)
resources.members.notGet=\u5BB9\u5668\u7684\u6210\u5458\u4E0D\u80FD\u88AB\u8BFB\u53D6\u3002
ReflectionPropertyException.Access.ErrorMsg3=\u5F53\u5F15\u7528\u7C7B{2}\u7684\u5C5E\u6027{1}\u503C{0}\u662F\u51FA\u9519
resources.folder.notCreated=\u6587\u4EF6\u5939"{0}"\u4E0D\u80FD\u88AB\u521B\u5EFA
utils.data.container=Id{0}\u5DF2\u7ECF\u88AB\u4F7F\u7528\u5728\u5BB9\u5668\u4E2D
DB2ForZosResultSet.outofRange=\u8D8A\u754C
DB2ForZosResultSet.parameterIndex=\u65E0\u6548\u7684\u53C2\u6570\uFF1A\u53C2\u6570\u6307\u6807
DB2ForZosResultSet.unknowCloumn=\u65E0\u6548\u7684\u53C2\u6570\uFF1A\u672A\u77E5\u7684\u5217\u540D
Locker.beanNull=Bean\u4E0D\u80FD\u4E3A\u7A7A
Locker.keyContext=\u952E
Locker.keyNull=\u952E\u503C\u4E0D\u80FD\u4E3A\u7A7A
ResourceUtils.canMove1=\u53EF\u79FB\u52A8
ResourceUtils.streamNull=\u6D41\u4E3A\u7A7A
FilesUtils.operationCanceled=\u590D\u5236\u6587\u4EF6\u6216\u6587\u4EF6\u5939\u65F6\u64CD\u4F5C\u5DF2\u53D6\u6D88\u3002
XmlNodeRetriever.countResult=\u8BA1\u6570\u7ED3\u679C\uFF1A
XmlNodeRetriever.field2Node=field2\u8282\u70B9
XmlNodeRetriever.filed1Node=field1\u8282\u70B9
XmlNodeRetriever.mainExpression=\u4E3B\u8868\u8FBE\u5F0F
XmlNodeRetriever.mainNode=\u4E3B\u8282\u70B9
XmlNodeRetriever.singleQuotes=.
XmlNodeRetriever.xPathExpression=xPath\u8868\u8FBE\u5F0F

View File

@@ -15,6 +15,7 @@ Export-Package: org.talend.commons,
org.talend.commons.utils,
org.talend.commons.utils.data.bean,
org.talend.commons.utils.data.container,
org.talend.commons.utils.data.extractor,
org.talend.commons.utils.data.list,
org.talend.commons.utils.data.map,
org.talend.commons.utils.data.reflection,

View File

@@ -3,6 +3,9 @@
DB2ForZosResultSet.outofRange=\ is out of range.
DB2ForZosResultSet.parameterIndex=Invalid argument: parameter index
DB2ForZosResultSet.unknowCloumn=Invalid argument: unknown column name
SybaseResultSet.outofRange=\ is out of range.
SybaseResultSet.parameterIndex=Invalid argument\: parameter index
SybaseResultSet.unknowCloumn=Invalid argument\: unknown column name
EntryLocation.returnTableName={tableName={0}, columnName={1}}
ExceptionHandler.Parameter.BeNull=ex param cannot be null
ExtensionImplementationProviders.ExtensionPointError=Extension point must authoriez a single instance

View File

@@ -63,8 +63,8 @@ public class EmfHelper {
}
visitedObjects.add(object.eClass().getName() + ";" + object.getClass().getPackage().getName());
List<EObject> toVisit = new ArrayList<EObject>();
for (Iterator iterator = object.eClass().getEAllReferences().iterator(); iterator.hasNext();) {
EReference reference = (EReference) iterator.next();
for (Object element : object.eClass().getEAllReferences()) {
EReference reference = (EReference) element;
if (reference.isMany()) {
List list = (List) object.eGet(reference);
for (Iterator iterator2 = list.iterator(); iterator2.hasNext();) {

View File

@@ -54,6 +54,10 @@ public final class CommonExceptionHandler {
log.log(Level.INFO, message);
}
public static void warn(String message) {
log.log(Level.WARN, message);
}
/**
* Return priority corresponding to the exception implementation.
*

View File

@@ -107,6 +107,8 @@ public class StringUtils {
input = input.replaceAll(">", "gt"); //$NON-NLS-1$ //$NON-NLS-2$
input = input.replaceAll("'", "apos"); //$NON-NLS-1$ //$NON-NLS-2$
input = input.replaceAll("\"", "quot"); //$NON-NLS-1$ //$NON-NLS-2$
input = input.replaceAll("\\(", "_"); //$NON-NLS-1$ //$NON-NLS-2$
input = input.replaceAll("\\)", "_"); //$NON-NLS-1$ //$NON-NLS-2$
return input;
}
@@ -354,5 +356,4 @@ public class StringUtils {
return text;
}
}

View File

@@ -0,0 +1,48 @@
// ============================================================================
//
// Copyright (C) 2006-2012 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.commons.utils.data.extractor;
import java.io.File;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
/**
* DOC marvin class global comment. Detailled comment <br/>
*
* $Id: talend.epf 55206 2011-02-15 17:32:14Z mhirt $
*
*/
public class ModuleNameExtractor {
/**
* Extracts all file names from the given collection. This method is suitable the case that collection includes not
* only file names but also paths. And you just need a set only including file names. So this method cuts the
* directory of a file only the file name remaining. Added by Marvin Wang on Nov 8, 2012.
*
* @param collection must not be <code>null<code>, otherwise, it will throw NPE.
* @return a set that only includes file name.
*/
public static Set<String> extractFileName(Collection<String> collection) {
Set<String> moduleNameSet = new HashSet<String>();
if (!collection.isEmpty()) {
for (String module : collection) {
if (module != null) {
File moduleFile = new File(module);
moduleNameSet.add(moduleFile.getName());
}
}
}
return moduleNameSet;
}
}

View File

@@ -55,6 +55,7 @@ public class ListenableList<T> implements IExtendedList<T> {
*
* @see java.util.List#add(java.lang.Object)
*/
@Override
public boolean add(T o) {
int index = this.list.size();
fireAddedEvent(index, o, true);
@@ -84,6 +85,7 @@ public class ListenableList<T> implements IExtendedList<T> {
*
* @see java.util.List#add(int, java.lang.Object)
*/
@Override
public void add(int index, T element) {
fireAddedEvent(index, element, true);
this.list.add(index, element);
@@ -95,11 +97,18 @@ public class ListenableList<T> implements IExtendedList<T> {
*
* @see java.util.List#addAll(java.util.Collection)
*/
@Override
@SuppressWarnings("unchecked")
public boolean addAll(Collection<? extends T> c) {
fireAddedEvent(this.list.size(), (Collection<T>) c, null, true);
return addAll(c, true, true);
}
public boolean addAll(Collection<? extends T> c, boolean fireBefore, boolean fireAfter) {
if (fireBefore) {
fireAddedEvent(this.list.size(), (Collection<T>) c, null, true);
}
boolean returnValue = this.list.addAll(c);
if (returnValue) {
if (returnValue && fireAfter) {
fireAddedEvent(this.list.size() - c.size(), (Collection<T>) c, null, false);
}
return returnValue;
@@ -110,11 +119,18 @@ public class ListenableList<T> implements IExtendedList<T> {
*
* @see java.util.List#addAll(int, java.util.Collection)
*/
@Override
@SuppressWarnings("unchecked")
public boolean addAll(int index, Collection<? extends T> c) {
fireAddedEvent(index, (Collection<T>) c, null, true);
return addAll(index, c, true, true);
}
public boolean addAll(int index, Collection<? extends T> c, boolean fireBefore, boolean fireAfter) {
if (fireBefore) {
fireAddedEvent(index, (Collection<T>) c, null, true);
}
boolean returnValue = this.list.addAll(index, c);
if (returnValue) {
if (returnValue && fireAfter) {
fireAddedEvent(index, (Collection<T>) c, null, false);
}
return returnValue;
@@ -124,6 +140,7 @@ public class ListenableList<T> implements IExtendedList<T> {
*
*
*/
@Override
@SuppressWarnings("unchecked")
public void addAll(List<Integer> indices, Collection<? extends T> c) {
@@ -149,6 +166,7 @@ public class ListenableList<T> implements IExtendedList<T> {
*
* @see java.util.List#clear()
*/
@Override
public void clear() {
fireClearedEvent(true);
this.list.clear();
@@ -172,6 +190,7 @@ public class ListenableList<T> implements IExtendedList<T> {
* @return whether the list contains the object.
* @see #useEquals
*/
@Override
public boolean contains(Object object) {
int size = list.size();
@@ -205,6 +224,7 @@ public class ListenableList<T> implements IExtendedList<T> {
* @param object the object in question.
* @return the position of the first occurrence of the object in the list.
*/
@Override
public int indexOf(Object object) {
int size = list.size();
if (useEquals && object != null) {
@@ -228,6 +248,7 @@ public class ListenableList<T> implements IExtendedList<T> {
*
* @see java.util.List#containsAll(java.util.Collection)
*/
@Override
public boolean containsAll(Collection<?> c) {
return this.list.containsAll(c);
}
@@ -237,6 +258,7 @@ public class ListenableList<T> implements IExtendedList<T> {
*
* @see java.util.List#get(int)
*/
@Override
public T get(int index) {
return this.list.get(index);
}
@@ -246,6 +268,7 @@ public class ListenableList<T> implements IExtendedList<T> {
*
* @see java.util.List#isEmpty()
*/
@Override
public boolean isEmpty() {
return this.list.isEmpty();
}
@@ -255,6 +278,7 @@ public class ListenableList<T> implements IExtendedList<T> {
*
* @see java.util.List#iterator()
*/
@Override
public Iterator<T> iterator() {
return new Iterator<T>() {
@@ -262,15 +286,18 @@ public class ListenableList<T> implements IExtendedList<T> {
private T current = null;
@Override
public boolean hasNext() {
return internalIterator.hasNext();
}
@Override
public T next() {
current = internalIterator.next();
return current;
}
@Override
public void remove() {
Integer indexBeforeRemove = indexOf(current);
fireBeforeRemovedEvent(indexBeforeRemove);
@@ -286,6 +313,7 @@ public class ListenableList<T> implements IExtendedList<T> {
*
* @see java.util.List#lastIndexOf(java.lang.Object)
*/
@Override
public int lastIndexOf(Object o) {
return this.list.lastIndexOf(o);
}
@@ -295,6 +323,7 @@ public class ListenableList<T> implements IExtendedList<T> {
*
* @see java.util.List#listIterator()
*/
@Override
public ListIterator<T> listIterator() {
return new ListIterator<T>() {
@@ -302,43 +331,52 @@ public class ListenableList<T> implements IExtendedList<T> {
private T current = null;
@Override
public void add(T o) {
internalListIterator.add(o);
fireAddedEvent(internalListIterator.previousIndex(), o, false);
}
@Override
public boolean hasPrevious() {
return internalListIterator.hasPrevious();
}
@Override
public int nextIndex() {
return internalListIterator.nextIndex();
}
@Override
public T previous() {
current = internalListIterator.previous();
return current;
}
@Override
public int previousIndex() {
return internalListIterator.previousIndex();
}
@Override
public void set(T o) {
fireReplacedEvent(internalListIterator.previousIndex() + 1, current, o, true);
internalListIterator.set(o);
fireReplacedEvent(internalListIterator.previousIndex() + 1, current, o, false);
}
@Override
public boolean hasNext() {
return internalListIterator.hasNext();
}
@Override
public T next() {
current = internalListIterator.next();
return current;
}
@Override
public void remove() {
Integer indexBeforeRemove = internalListIterator.previousIndex() + 1;
fireBeforeRemovedEvent(indexBeforeRemove);
@@ -354,6 +392,7 @@ public class ListenableList<T> implements IExtendedList<T> {
*
* @see java.util.List#listIterator(int)
*/
@Override
public ListIterator<T> listIterator(int index) {
return this.list.listIterator(index);
}
@@ -363,6 +402,7 @@ public class ListenableList<T> implements IExtendedList<T> {
*
* @see java.util.List#remove(java.lang.Object)
*/
@Override
@SuppressWarnings("unchecked")
public boolean remove(Object o) {
int index = indexOf(o);
@@ -378,6 +418,7 @@ public class ListenableList<T> implements IExtendedList<T> {
*
* @see java.util.List#remove(int)
*/
@Override
public T remove(int index) {
fireBeforeRemovedEvent(index);
T removedObject = this.list.remove(index);
@@ -394,7 +435,7 @@ public class ListenableList<T> implements IExtendedList<T> {
private void fireRemovedEvent(int index, T removedObject) {
if (afterListeners.size() != 0) {
List<T> currentList = new ArrayList<T>(1);
currentList.add((T) removedObject);
currentList.add(removedObject);
fireRemovedEvent(index, currentList, null, false);
}
}
@@ -403,7 +444,7 @@ public class ListenableList<T> implements IExtendedList<T> {
if (beforeListeners.size() != 0) {
T removingObject = this.list.get(index);
List<T> currentList = new ArrayList<T>(1);
currentList.add((T) removingObject);
currentList.add(removingObject);
fireRemovedEvent(index, currentList, null, true);
}
}
@@ -415,12 +456,19 @@ public class ListenableList<T> implements IExtendedList<T> {
* @param collection the collection of objects to be removed.
* @return whether any object was actually contained by the list.
*/
@Override
@SuppressWarnings("unchecked")
public boolean removeAll(Collection<?> collection) {
return removeAll(collection, true, true);
}
public boolean removeAll(Collection<?> collection, boolean fireBefore, boolean fireAfter) {
List<Integer> indices = getIndices(collection);
fireRemovedEvent(null, new ArrayList(collection), indices, true);
if (fireBefore) {
fireRemovedEvent(null, new ArrayList(collection), indices, true);
}
if (this.list == null) {
return false;
}
@@ -429,7 +477,7 @@ public class ListenableList<T> implements IExtendedList<T> {
this.list.remove((int) indices.get(i));
modified = true;
}
if (modified) {
if (modified && fireAfter) {
fireRemovedEvent(null, new ArrayList(collection), indices, false);
}
return modified;
@@ -458,6 +506,7 @@ public class ListenableList<T> implements IExtendedList<T> {
*
* @see java.util.List#retainAll(java.util.Collection)
*/
@Override
public boolean retainAll(Collection<?> c) {
List<T> all = new ArrayList<T>();
all.addAll(this.list);
@@ -481,6 +530,7 @@ public class ListenableList<T> implements IExtendedList<T> {
*
* @see java.util.List#set(int, java.lang.Object)
*/
@Override
public T set(int index, T element) {
fireReplacedEvent(index, null, element, true);
T replacedObject = this.list.set(index, element);
@@ -493,6 +543,7 @@ public class ListenableList<T> implements IExtendedList<T> {
*
* @see java.util.List#size()
*/
@Override
public int size() {
if (this.list != null) {
return this.list.size();
@@ -507,6 +558,7 @@ public class ListenableList<T> implements IExtendedList<T> {
*
* @see java.util.List#subList(int, int)
*/
@Override
public List<T> subList(int fromIndex, int toIndex) {
if (this.list != null) {
return this.list.subList(fromIndex, toIndex);
@@ -520,6 +572,7 @@ public class ListenableList<T> implements IExtendedList<T> {
*
* @see java.util.List#toArray()
*/
@Override
public Object[] toArray() {
if (this.list != null) {
return this.list.toArray();
@@ -533,6 +586,7 @@ public class ListenableList<T> implements IExtendedList<T> {
*
* @see java.util.List#toArray(T[])
*/
@Override
@SuppressWarnings("hiding")
public <T> T[] toArray(T[] a) {
if (this.list != null) {
@@ -542,6 +596,7 @@ public class ListenableList<T> implements IExtendedList<T> {
}
}
@Override
public void swap(int index1, int index2) {
ArrayList<Integer> indexList1 = new ArrayList<Integer>(1);
@@ -579,6 +634,7 @@ public class ListenableList<T> implements IExtendedList<T> {
}
}
@Override
public void swapElements(List<Integer> indicesOrigin, List<Integer> indicesTarget) {
if (indicesOrigin.size() != indicesTarget.size()) {
throw new IllegalArgumentException(Messages.getString("ListenableList.IndexSameLength.Error")); //$NON-NLS-1$
@@ -596,6 +652,7 @@ public class ListenableList<T> implements IExtendedList<T> {
fireSwapedEvent(indicesOrigin, indicesTarget, swapedObjects.toArray(), false);
}
@Override
public void swapElement(T object1, T object2) {
swap(indexOf(object1), indexOf(object2));
}
@@ -825,6 +882,7 @@ public class ListenableList<T> implements IExtendedList<T> {
*
* @return the useEquals
*/
@Override
public boolean isUseEquals() {
return this.useEquals;
}
@@ -834,6 +892,7 @@ public class ListenableList<T> implements IExtendedList<T> {
*
* @param useEquals the useEquals to set
*/
@Override
public void setUseEquals(boolean useEquals) {
this.useEquals = useEquals;
}

View File

@@ -0,0 +1,141 @@
// ============================================================================
//
// Copyright (C) 2006-2012 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.commons.utils.database;
import java.sql.SQLException;
import java.util.List;
import org.talend.commons.i18n.internal.Messages;
import org.talend.commons.utils.TalendDBUtils;
import org.talend.fakejdbc.FakeResultSet;
/**
* created by xqliu on Oct 26, 2012 Detailled comment
*
*/
public class SybaseResultSet extends FakeResultSet {
private String[] tableMeta = null;
private List<String[]> data;
int index = -1;
/*
* (non-Javadoc)
*
* @see org.talend.commons.utils.database.FakeResultSet#next()
*/
@Override
public boolean next() throws SQLException {
if (data == null || data.size() == 0 || index >= data.size() - 1) {
return false;
}
index++;
return true;
}
public static int indexOf(String string, String[] search) {
for (int i = 0; i < search.length; i++) {
if (search[i].equals(string)) {
return i;
}
}
return -1;
}
/*
* (non-Javadoc)
*
* @see org.talend.commons.utils.database.FakeResultSet#getString(java.lang.String)
*/
@Override
public String getString(String columnLabel) throws SQLException {
int columnIndex = indexOf(columnLabel, tableMeta);
if (columnIndex == -1) {
throw new SQLException(Messages.getString("SybaseResultSet.unknowCloumn") + columnLabel); //$NON-NLS-1$
}
return getString(columnIndex + 1);
}
/*
* (non-Javadoc)
*
* @see org.talend.commons.utils.database.FakeResultSet#getInt(java.lang.String)
*/
@Override
public int getInt(String columnLabel) throws SQLException {
int value = 0;
String str = getString(columnLabel);
if (columnLabel.equals("TYPE_NAME")) { //$NON-NLS-1$
value = TalendDBUtils.convertToJDBCType(str);
} else if (columnLabel.equals("IS_NULLABLE")) { //$NON-NLS-1$
if (str.equals("N")) { //$NON-NLS-1$
value = 1;
} else {
value = 0;
}
} else {
value = Integer.parseInt(str);
}
return value;
}
/*
* (non-Javadoc)
*
* @see org.talend.commons.utils.database.FakeResultSet#getBoolean(java.lang.String)
*/
@Override
public boolean getBoolean(String columnLabel) throws SQLException {
String str = getString(columnLabel);
return Boolean.parseBoolean(str);
}
/*
* (non-Javadoc)
*
* @see org.talend.commons.utils.database.FakeResultSet#getString(int)
*/
@Override
public String getString(int columnIndex) throws SQLException {
String[] row = data.get(index);
columnIndex--;
if (columnIndex < 0 || columnIndex > row.length) {
throw new SQLException(
Messages.getString("SybaseResultSet.parameterIndex") + columnIndex + Messages.getString("SybaseResultSet.outofRange")); //$NON-NLS-1$ //$NON-NLS-2$
}
return row[columnIndex];
}
/**
* DOC bqian Comment method "setMetadata".
*
* @param table_meta
*/
public void setMetadata(String[] tableMeta) {
this.tableMeta = tableMeta;
}
/**
* DOC bqian Comment method "setData".
*
* @param tables
*/
public void setData(List<String[]> data) {
this.data = data;
}
}

View File

@@ -54,8 +54,8 @@ public class CharsetToolkit {
/**
* Defines the default <code>Charset</code> used in case the buffer represents an 8-bit <code>Charset</code>.
*
* @param defaultCharset the default <code>Charset</code> to be returned by <code>guessEncoding()</code> if an
* 8-bit <code>Charset</code> is encountered.
* @param defaultCharset the default <code>Charset</code> to be returned by <code>guessEncoding()</code> if an 8-bit
* <code>Charset</code> is encountered.
*/
public void setDefaultCharset(Charset defaultCharset) {
if (defaultCharset != null) {
@@ -299,6 +299,17 @@ public class CharsetToolkit {
return Charset.forName(System.getProperty("file.encoding")); //$NON-NLS-1$
}
/**
* DOC ycbai Comment method "getInternalSystemCharset".
*
* Retrieve the system charset from "sun.jnu.encoding" property.
*
* @return
*/
public static Charset getInternalSystemCharset() {
return Charset.forName(System.getProperty("sun.jnu.encoding")); //$NON-NLS-1$
}
/**
* Has a Byte Order Marker for UTF-8 (Used by Microsoft's Notepad and other editors).
*

View File

@@ -73,5 +73,4 @@ public final class PluginChecker {
public static boolean isOnlyTopLoaded() {
return isPluginLoaded(TOP_BRANDING) && !isTDCPLoaded() && !isTDQLoaded();
}
}

View File

@@ -15,7 +15,7 @@ ImportPushButton.ImportButton.Tip=\u3059\u3079\u3066\u306e\u884c\u3092xml\u30d5\
LabelledFileField.FileDialog.Text=\u9078\u629E
ModelSelectionDialog.Option=\u30AA\u30D7\u30B7\u30E7\u30F3
ModelSelectionDialog.Update=\u30EA\u30DD\u30B8\u30C8\u30EA\u63A5\u7D9A\u306E\u66F4\u65B0\u3002
TableViewerCreator.Table.BeNull=\u30C6\u30FC\u30D6\u30EB\u304CNULL\u5024\u3067\u3059
TableViewerCreator.Table.BeNull=\u30C6\u30FC\u30D6\u30EB\u304Cnull\u3067\u3059
ModelSelectionDialog.Title=\u30EA\u30DD\u30B8\u30C8\u30EA\u3092\u4F7F\u7528\u3057\u3066\u30D1\u30E9\u30E1\u30FC\u30BF\u306E\u7DE8\u96C6
AddAllPushButton.AddAllButton.Tip=\u3059\u3079\u3066\u8ffd\u52a0
ExtendedTableRemoveCommand.Romve.Label=\u30C6\u30FC\u30D6\u30EB\u30A8\u30F3\u30C8\u30EA\u306E\u524A\u9664

View File

@@ -1 +1,8 @@
commons.error=Fout
AddPushButton.AddButton.Tip=Toevoegen
LabelledFileField.BrowseButton.Text=Blader...
DialogErrorForCellEditorListener.Error.MsgDialogTitle=Fout
DateDialog.textContent=Selecteer datum & tijd
EventUtil.modify=Wijzigen
EventUtil.move=Verplaatsen
EventUtil.show=Toon

View File

@@ -19,6 +19,7 @@ import org.eclipse.gef.commands.Command;
import org.talend.commons.ui.runtime.i18n.Messages;
import org.talend.commons.ui.swt.extended.table.ExtendedTableModel;
import org.talend.commons.ui.utils.SimpleClipboard;
import org.talend.commons.utils.data.list.UniqueStringGenerator;
/**
* DOC amaumont class global comment. Detailled comment <br/>
@@ -55,7 +56,7 @@ public abstract class ExtendedTablePasteCommand extends Command implements IExte
*
* @see org.eclipse.gef.commands.Command#execute()
*/
@SuppressWarnings("unchecked")//$NON-NLS-1$
@SuppressWarnings("unchecked")
@Override
public void execute() {
@@ -80,4 +81,17 @@ public abstract class ExtendedTablePasteCommand extends Command implements IExte
return true;
}
public String validateColumnName(final String columnName, List<String> labels) {
String name = columnName;
UniqueStringGenerator<String> uniqueStringGenerator = new UniqueStringGenerator<String>(name, labels) {
@Override
protected String getBeanString(String bean) {
return bean;
}
};
return uniqueStringGenerator.getUniqueString();
}
}

View File

@@ -47,17 +47,20 @@ public class ErrorDialogWidthDetailArea {
* @param detailMessage (\n an \t are interpreted ; \r are deleted)
*/
public ErrorDialogWidthDetailArea(Shell shell, String pid, String mainMessage, String detailMessage) {
this(shell, pid, mainMessage, detailMessage, IStatus.INFO);
}
public ErrorDialogWidthDetailArea(Shell shell, String pid, String mainMessage, String detailMessage, int status) {
MultiStatus info = new MultiStatus(pid, 1, mainMessage, null);
if (detailMessage != null) {
String[] lines = detailMessage.split("\n"); //$NON-NLS-1$
for (int i = 0; i < lines.length; i++) {
info
.add(new Status(IStatus.INFO, pid, 1, lines[i].replaceAll("\t", " ").replaceAll("\r", ""), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
null));
for (String line : lines) {
info.add(new Status(status, pid, 1, line.replaceAll("\t", " ").replaceAll("\r", ""), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
null));
}
}
codeOfButton = ErrorDialog.openError(shell, Messages.getString("ErrorDialogWidthDetailArea.ErrorMessage.Text"), //$NON-NLS-1$
null, info); //$NON-NLS-1$
null, info);
}
public int getCodeOfButton() {

View File

@@ -16,7 +16,6 @@ import java.util.List;
import org.apache.commons.lang.ArrayUtils;
import org.eclipse.gef.commands.CommandStack;
import org.eclipse.jface.viewers.ILazyContentProvider;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.DisposeEvent;
@@ -374,41 +373,36 @@ public abstract class AbstractExtendedTableViewer<B> extends AbstractExtendedCon
}).start();
} else {
if (event.type == TYPE.ADDED) {
if (tableViewer.getContentProvider() instanceof ILazyContentProvider) {
tableViewer.setItemCount(event.source.size());
}
if (tableViewerCreator.isLazyLoad()) {
tableViewer.refresh();
} else if (event.type == TYPE.SWAPED) {
// tableViewer.refresh();
Object[] swapedObjects = event.swapedObjects;
for (Object data : swapedObjects) {
tableViewer.refresh(data, true, true);
}
} else if (event.type == TYPE.REMOVED) {
// if(event.index != null) {
// tableViewerCreator.getSelectionHelper().select(event.index);
// } else if(event.indicesOrigin != null) {
// Integer startIndex = event.indicesOrigin.get(0);
// tableViewerCreator.getSelectionHelper().select(startIndex);
// }
// Collection<B> addedObjects = event.addedObjects;
// for (B bean : addedObjects) {
// tableViewer.refresh(bean);
// }
} else {
if (tableViewer.getContentProvider() instanceof ILazyContentProvider) {
tableViewer.setItemCount(event.source.size());
if (event.type == TYPE.ADDED) {
} else if (event.type == TYPE.SWAPED) {
// tableViewer.refresh();
Object[] swapedObjects = event.swapedObjects;
for (Object data : swapedObjects) {
tableViewer.refresh(data, true, true);
}
} else if (event.type == TYPE.REMOVED) {
// if(event.index != null) {
// tableViewerCreator.getSelectionHelper().select(event.index);
// } else if(event.indicesOrigin != null) {
// Integer startIndex = event.indicesOrigin.get(0);
// tableViewerCreator.getSelectionHelper().select(startIndex);
// }
// Collection<B> addedObjects = event.addedObjects;
// for (B bean : addedObjects) {
// tableViewer.refresh(bean);
// }
} else {
tableViewer.refresh();
}
tableViewer.refresh();
}
}

View File

@@ -115,11 +115,15 @@ public class ExtendedTableModel<B> extends AbstractExtendedControlModel {
* @param index can be null
*/
public void addAll(final Integer index, List<B> beans) {
addAll(index, beans, true, true);
}
public void addAll(final Integer index, List<B> beans, boolean fireBefore, boolean fireAfter) {
if (index == null || index < 0 || index > this.beansList.size() - 1) {
if (tableViewer != null && !tableViewer.getTable().isDisposed()) {
tableViewer.add(beans.toArray(new Object[beans.size()]));
}
this.beansList.addAll(beans);
this.beansList.addAll(beans, fireBefore, fireAfter);
} else {
if (tableViewer != null && !tableViewer.getTable().isDisposed()) {
int localIndex = index;
@@ -128,7 +132,7 @@ public class ExtendedTableModel<B> extends AbstractExtendedControlModel {
tableViewer.insert(beans.get(i), localIndex++);
}
}
this.beansList.addAll(index, beans);
this.beansList.addAll(index, beans, fireBefore, fireAfter);
}
}
@@ -152,6 +156,10 @@ public class ExtendedTableModel<B> extends AbstractExtendedControlModel {
addAll((Integer) null, beans);
}
public void addAll(List<B> beans, boolean fireBefore, boolean fireAfter) {
addAll((Integer) null, beans, fireBefore, fireAfter);
}
public void registerDataList(List<B> list) {
this.beansList.registerList(list);
}
@@ -162,8 +170,9 @@ public class ExtendedTableModel<B> extends AbstractExtendedControlModel {
public void addBeans(B b) {
if (this.beansList.contains(b)) {
} else
} else {
this.beansList.add(b);
}
}
public void setUseEquals(boolean useEquals) {
@@ -200,10 +209,14 @@ public class ExtendedTableModel<B> extends AbstractExtendedControlModel {
* @see org.talend.commons.utils.data.list.ListenableList#removeAll(java.util.Collection)
*/
public boolean removeAll(Collection<B> c) {
return removeAll(c, true, true);
}
public boolean removeAll(Collection<B> c, boolean fireBefor, boolean fireAfter) {
if (tableViewer != null && !tableViewer.getTable().isDisposed()) {
tableViewer.remove(c.toArray(new Object[c.size()]));
}
return this.beansList.removeAll(c);
return this.beansList.removeAll(c, fireBefor, fireAfter);
}
public void removeAll() {
@@ -277,8 +290,8 @@ public class ExtendedTableModel<B> extends AbstractExtendedControlModel {
*/
public List<B> remove(int[] indexArray) {
ArrayList<B> objectsToRemove = new ArrayList<B>(indexArray.length);
for (int i = 0; i < indexArray.length; i++) {
objectsToRemove.add(beansList.get(indexArray[i]));
for (int element : indexArray) {
objectsToRemove.add(beansList.get(element));
}
removeAll(objectsToRemove);
return objectsToRemove;
@@ -344,6 +357,7 @@ public class ExtendedTableModel<B> extends AbstractExtendedControlModel {
this.modifiedBeanListenable = modifiedBeanListenable;
}
@Override
public boolean isDataRegistered() {
return beansList.isListRegistered();
}

View File

@@ -16,6 +16,7 @@ import java.util.Comparator;
import java.util.HashSet;
import java.util.List;
import org.eclipse.core.runtime.Platform;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.GC;
@@ -99,7 +100,7 @@ public class TableToTreeLinker<D1, D2> extends BgDrawableComposite implements IB
LinkableTree linkableTree = new LinkableTree(this, backgroundRefresher, targetTree, this, false);
targetTree.removeSelectionListener(linkableTree.getSelectionListener());
new LinkableTable(this, backgroundRefresher, sourceTable, (BgDrawableComposite) this, true);
new LinkableTable(this, backgroundRefresher, sourceTable, this, true);
this.target = targetTree;
this.source = sourceTable;
@@ -227,7 +228,7 @@ public class TableToTreeLinker<D1, D2> extends BgDrawableComposite implements IB
IExtremityLink<Tree, D2> extremity2 = link.getExtremity2();
// see bug 7360
dataToTableItemCache.clear();
TableItem tableItem = dataToTableItemCache.getTableItem((Object) extremity1.getDataItem());
TableItem tableItem = dataToTableItemCache.getTableItem(extremity1.getDataItem());
TableItem firstExpandedAscTableItem = tableItem;
Rectangle tableItemBounds = firstExpandedAscTableItem.getBounds();
@@ -302,6 +303,12 @@ public class TableToTreeLinker<D1, D2> extends BgDrawableComposite implements IB
pointEndCentralCurve.x += offset.x - 6;
pointEndCentralCurve.y += offset.y;
// Added by Marvin Wang on Nov. 28, 2012 for bug TDI-23378. This is not the best way to fix this issue,
// but till now I have not found the root cause.
if (Platform.OS_LINUX.equals(Platform.getOS())) {
pointEndCentralCurve.y = pointEndCentralCurve.y - tableItem.getBounds().height;
}
drawableLink.setPoint1(pointEndStraight);
drawableLink.setPoint2(pointEndCentralCurve);
@@ -326,8 +333,8 @@ public class TableToTreeLinker<D1, D2> extends BgDrawableComposite implements IB
* @return
*/
private int findXRightStartBezierLink(TableItem[] items, int maxWidth) {
for (int i = 0; i < items.length; i++) {
TableItem item = items[i];
for (TableItem item2 : items) {
TableItem item = item2;
if (!item.isDisposed()) {
Rectangle bounds = item.getBounds();
maxWidth = Math.max(maxWidth, bounds.x + bounds.width);
@@ -353,8 +360,7 @@ public class TableToTreeLinker<D1, D2> extends BgDrawableComposite implements IB
getTarget().deselectAll();
TreeItem[] selection = getTarget().getSelection();
for (int i = 0; i < selection.length; i++) {
TreeItem tableItem = selection[i];
for (TreeItem tableItem : selection) {
selectedItems.add(tableItem.getData());
}
@@ -362,8 +368,7 @@ public class TableToTreeLinker<D1, D2> extends BgDrawableComposite implements IB
getSource().deselectAll();
TableItem[] selection = getSource().getSelection();
for (int i = 0; i < selection.length; i++) {
TableItem treeItem = selection[i];
for (TableItem treeItem : selection) {
selectedItems.add(treeItem.getData());
}

View File

@@ -82,7 +82,7 @@ public abstract class DialogErrorForCellEditorListener implements ICellEditorLis
CELL_EDITOR_STATE state) {
final Text text = (Text) cellEditor.getControl();
final ModifiedObjectInfo modifiedObjectInfo = tableViewerCreator.getModifiedObjectInfo();
Object originalValue = modifiedObjectInfo.getOriginalPropertyBeanValue();
final Object originalValue = modifiedObjectInfo.getOriginalPropertyBeanValue();
lastValidValue = lastValidValue != null && state == CELL_EDITOR_STATE.EDITING ? lastValidValue : originalValue;
int beanPosition = tableViewerCreator.getInputList().indexOf(currentModifiedBean);
@@ -101,19 +101,22 @@ public abstract class DialogErrorForCellEditorListener implements ICellEditorLis
public void run() {
if (errorMessage.equals("")) {
MessageDialog.openError(
text.getShell(),
Messages.getString("DialogErrorForCellEditorListener.Error.MsgDialogTitle"), Messages.getString("ErrorDialogWidthDetailArea.ErrorMessage.ColumnText")); //$NON-NLS-1$
MessageDialog.openError(text.getShell(),
Messages.getString("DialogErrorForCellEditorListener.Error.MsgDialogTitle"), //$NON-NLS-1$
Messages.getString("ErrorDialogWidthDetailArea.ErrorMessage.ColumnText.NotValid", //$NON-NLS-1$
newValue, originalValue == null ? "" : originalValue.toString())); //$NON-NLS-1$
final int columnPosition = tableViewerCreator.getColumns().indexOf(column);
tableViewerCreator.getTableViewer().editElement(currentModifiedBean, columnPosition);
text.setText(newValue);
// Added by Marvin Wang on Dec. 12, 2012 for bug TDI-24174 and it also replaces the bug
// TDI-23253.
text.setText(originalValue == null ? "" : originalValue.toString()); //$NON-NLS-1$
text.setSelection(selection.x, selection.y);
} else {
MessageDialog.openError(text.getShell(),
Messages.getString("DialogErrorForCellEditorListener.Error.MsgDialogTitle"), errorMessage); //$NON-NLS-1$
final int columnPosition = tableViewerCreator.getColumns().indexOf(column);
tableViewerCreator.getTableViewer().editElement(currentModifiedBean, columnPosition);
text.setText(newValue);
text.setText("");
text.setSelection(selection.x, selection.y);
}
}

View File

@@ -84,8 +84,8 @@ public class FilesUtils {
public static boolean isSVNFolder(String name) {
if (name != null) {
name = name.toLowerCase();
for (int i = 0; i < SVN_FOLDER_NAMES.length; i++) {
if (SVN_FOLDER_NAMES[i].equals(name) || name.endsWith(SVN_FOLDER_NAMES[i])) {
for (String element : SVN_FOLDER_NAMES) {
if (element.equals(name) || name.endsWith(element)) {
return true;
}
}
@@ -377,8 +377,9 @@ public class FilesUtils {
|| (excludedFile != null && excludedFile.equals(file.getName()))) {
canAdd = false;
}
if (canAdd)
if (canAdd) {
results.add(file);
}
} else if (file.isDirectory() && nested) {
if (excludedFolder != null && excludedFolder.equals(file.getName())) {
return results;
@@ -467,11 +468,15 @@ public class FilesUtils {
return getFilesFromFolderByName(file, fileName, new String[] { ".jar", ".zip", ".bar" }, null, true); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
public static List<File> getDllFilesFromFolder(File file, String fileName) throws MalformedURLException {
return getFilesFromFolderByName(file, fileName, new String[] { ".dll" }, null, true); //$NON-NLS-1$
}
public static FileFilter getExcludeSystemFilesFilter() {
FileFilter filter = new FileFilter() {
public boolean accept(File pathname) {
return !isSVNFolder(pathname) && !pathname.toString().endsWith(".dummy"); //$NON-NLS-1$ //$NON-NLS-2$
return !isSVNFolder(pathname) && !pathname.toString().endsWith(".dummy"); //$NON-NLS-1$
}
};
@@ -794,7 +799,7 @@ public class FilesUtils {
for (File sample : fileList) {
boolean isDeleted = sample.delete();
log.info(sample.getAbsolutePath() + (isDeleted ? " is deleted." : " failed to delete."));
boolean isrenamed = new File(sample.getAbsolutePath() + MIGRATION_FILE_EXT).renameTo(sample); //$NON-NLS-1$
boolean isrenamed = new File(sample.getAbsolutePath() + MIGRATION_FILE_EXT).renameTo(sample);
log.info(sample.getAbsolutePath() + MIGRATION_FILE_EXT + (isrenamed ? " is renamed." : " failed to rename."));
}
}
@@ -890,8 +895,38 @@ public class FilesUtils {
if (source.isDirectory()) {
tarpath.mkdir();
File[] dir = source.listFiles();
for (int i = 0; i < dir.length; i++) {
copyDirectory(dir[i], tarpath);
for (File element : dir) {
copyDirectory(element, tarpath);
}
} else {
try {
InputStream is = new FileInputStream(source);
OutputStream os = new FileOutputStream(tarpath);
byte[] buf = new byte[1024];
int len = 0;
while ((len = is.read(buf)) != -1) {
os.write(buf, 0, len);
}
is.close();
os.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
}
public static void copyDirectoryWithoutSvnFolder(File source, File target) {
File tarpath = new File(target, source.getName());
if (source.isDirectory()) {
tarpath.mkdir();
File[] dir = source.listFiles();
for (File element : dir) {
if (element.getName().equals(".svn")) { //$NON-NLS-1$
continue;
}
copyDirectoryWithoutSvnFolder(element, tarpath);
}
} else {
try {
@@ -918,8 +953,8 @@ public class FilesUtils {
file.delete();
} else if (file.isDirectory()) {
File files[] = file.listFiles();
for (int i = 0; i < files.length; i++) {
deleteFile(files[i], true);
for (File file2 : files) {
deleteFile(file2, true);
}
}
if (delete) {

View File

@@ -0,0 +1 @@
prefsName=Talend

View File

@@ -7,7 +7,7 @@ ColorsCodeViewerPreferencePage.keyword2Color=\u30AD\u30FC\u30EF\u30FC\u30C92\u82
MetadataDialog.Message=\u5165\u529B\u30B9\u30AD\u30FC\u30DE\u306E\u3059\u3079\u3066\u306E\u30AB\u30E9\u30E0\u304C\u51FA\u529B\u30B9\u30AD\u30FC\u30DE\u3078\u79FB\u884C\u3055\u308C\u307E\u3059
MetadataDialog.TransferMessage=\u51FA\u30B9\u30AD\u30FC\u30DE\u306E\u3059\u3079\u3066\u306E\u30AB\u30E9\u30E0\u304C\u5165\u529B\u30B9\u30AD\u30FC\u30DE\u3078\u79FB\u884C\u3055\u308C\u307E\u3059
EMetadataEncoding.Cyrillic=\u30AD\u30EA\u30EB\u8A9E
EUpdateResult.BuiltIn=\u30D3\u30EB\u30C9\u30A4\u30F3\u30E2\u30FC\u30C9\u3078\u5909\u66F4
EUpdateResult.BuiltIn=\u7D44\u8FBC\u307F\u30E2\u30FC\u30C9\u3078\u5909\u66F4
EUpdateResult.Rename=\u540D\u524D\u3092\u5909\u66F4
MetadataTypeLengthConstants.DOUBLE_LENGTH=Double
ContextProcessSection.ParameterNameIsNotValid=\u5F15\u6570\u540D\u304C\u6B63\u3057\u304F\u3042\u308A\u307E\u305B\u3093\u3002
@@ -185,7 +185,9 @@ PaletteContentDialog.lable=\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u30E9\u30D9\u30E
MetadataDialog.CopySelectionToInput.toolTipText=\u9078\u629E\u3055\u308C\u305F\u30AB\u30E9\u30E0\u3092\u51FA\u529B\u30B9\u30AD\u30FC\u30DE\u304B\u3089\u5165\u529B\u30B9\u30AD\u30FC\u30DE\u3078\u30B3\u30D4\u30FC
MetadataDialog.CopyToOutput=\u3059\u3079\u3066\u306E\u30AB\u30E9\u30E0\u3092\u5165\u529B\u30B9\u30AD\u30FC\u30DE\u304B\u3089\u51FA\u529B\u30B9\u30AD\u30FC\u30DE\u3078\u30B3\u30D4\u30FC
MetadataDialog.CopySelectionToOutput=\u9078\u629E\u3055\u308C\u305F\u30AB\u30E9\u30E0\u3092\u5165\u529B\u30B9\u30AD\u30FC\u30DE\u304B\u3089\u51FA\u529B\u30B9\u30AD\u30FC\u30DE\u3078\u30B3\u30D4\u30FC
MetadataTalendType.dbIdNotFound=DBMS Id : {0} \u306F\u898B\u3064\u304B\u308A\u307E\u305B\u3093!
PaletteContentDialog.connection=\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u63A5\u7D9A\u30C7\u30D5\u30A9\u30EB\u30C8\uFF1A
PaletteContentDialog.hint=\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u30D2\u30F3\u30C8\u30C7\u30D5\u30A9\u30EB\u30C8\uFF1A
PaletteContentDialog.lable=\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u30E9\u30D9\u30EB\u30C7\u30D5\u30A9\u30EB\u30C8:
ProcessorUtilities.finalizeBuild=\u30D3\u30EB\u30C9\u3092\u7D42\u4E86\u4E2D...
ProcessorUtilities.generatingJob=\u30B8\u30E7\u30D6\u751F\u6210\u4E2D...
@@ -241,6 +243,8 @@ MetadataTool.schemaNull=\u30B9\u30AD\u30FC\u30DE\u540D\u304CNULL\u3067\u3059\u30
MetadataTool.invalidChar=\u7121\u52B9\u306A\u6587\u5B57
MetadataTool.nameNull=\u30B9\u30AD\u30FC\u30DE\u540D\u3092\u6307\u5B9A\u3057\u3066\u4E0B\u3055\u3044\u3002
MetadataTool.nullValue=Null\u5024
MetadataTool.schemaExist=\u30B9\u30AD\u30FC\u30DE\u540D\u306F\u5B58\u5728\u3057\u307E\u3059\u3002
MetadataTool.schemaIn=\u30B9\u30AD\u30FC\u30DE\u540D\u304C\u4E0D\u6B63\u3067\u3059\u3002
MetadataTool.schemaInvalid=\u30B9\u30AD\u30FC\u30DE\u540D\u304C\u4E0D\u6B63\u3067\u3059\u3002
MetadataTool.schemaNull=\u30B9\u30AD\u30FC\u30DE\u540D\u304CNULL\u3067\u3059\u3002
RepositoryUpdateManager.NotFoundTitle=\u898B\u3064\u304B\u308A\u307E\u305B\u3093

View File

@@ -1,5 +1,44 @@
ContextProcessSection.errorTitle=Fout
ContextProcessSection.7=Naam voor nieuwe Context
ContextProcessSection.6=Nieuwe Context
RoutinesFunctionProposal.User=Gebruiker
ContextProcessSection.49=Standaard Context
ContextProcessSection.29=Fout
EUpdateItemType.Name=Naam
ContextParameterProposal.ContextVariable=Context variabele
ComponentsFormatPreferencePage.add=Toevoegen
ComponentToRepositoryProperty.error=Fout
ContextSetConfigurationDialog.nameNotValid=Ongeldige naam
ProcessorUtilities.finalizeBuild=Bouwen afronden...
ProcessorUtilities.generatingJob=Job genereren...
ProcessorUtilities.loadingJob=Job laden...
VariableItemEditor.name=Naam
VariableItemEditor.new=Nieuw
ApplicationActionBarAdvisor.menuFileLabel=&Bestand
ApplicationActionBarAdvisor.navigateLabel=&Navigeer
ApplicationActionBarAdvisor.gotoLabel=&Ga naar
ApplicationActionBarAdvisor.projectLabel=&Project
ApplicationActionBarAdvisor.menuWindowLabel=&Venster
ApplicationActionBarAdvisor.menuHelpLabel=&Help
BusinessAppearanceComposite.textAlignmentGroup=Tekst uitlijning
BusinessAppearanceComposite.textAlignment.horizontal=Horizontaal
BusinessAppearanceComposite.textAlignment.vertical=Verticaal
BusinessAppearanceComposite.textAlignment.horizontal.centre=Centreer
BusinessAppearanceComposite.textAlignment.vertical.centre=Centreer
ComponentsFormatPreferencePage.ErrorTitle=Fout
ConextTableValuesComposite.nameLabel=Naam
ContextTemplateComposite.CommentLabel=Opmerking
ContextTemplateComposite.nameLabel=Naam
ContextTemplateComposite.sourceLabel=Bron
EComponentCategory_assignment=Toewijzing
EComponentCategory_properties=Eigenschappen
EComponentCategory_sqlTemplate=SQL Template
HTMLDocGenerator.comment=Opmerking
HTMLDocGenerator.context=Context:
HTMLDocGenerator.name=Naam
HTMLDocGenerator.project_description=Project omschrijving
HTMLDocGenerator.project_name=Project Naam
HTMLDocGenerator.properties=Eigenschappen
HTMLDocGenerator.source=Bron
ConnectionParameterName.UserLabel=Gebruiker
ConnectionParameterName.PasswordLabel=Wachtwoord

View File

@@ -0,0 +1 @@
CreateRuleDialog.nameLabel=Naam

View File

@@ -60,3 +60,17 @@ JobletReferenceDialog.DeletedInfor=M
JobletReferenceDialog.project=Projekt
ContextReferenceDialog.Recycle=Mülleimer
ContextReferenceDialog.Types=Typ
ProjectRepositoryNode.code=Code
ProjectRepositoryNode.columns=Spalten
ProjectRepositoryNode.validationRules=Validierungsregeln
ProjectRepositoryNode.genericSchema=Generische Schemata
ProjectRepositoryNode.queries=Abfragen
ProjectRepositoryNode.synonymSchemas=Synonym-Schemas
ProjectRepositoryNode.tableSchemas=Tabellen-Schemas
ProjectRepositoryNode.viewSchemas=Ansicht-Schemas
ProjectRepositoryNode.sapFunctions=SAP Funktionen
ProjectRepositoryNode.sapIDocs=SAP iDocs
RepositoryDropAdapter_moveTitle=Verschieben
ItemReferenceDialog.item=Element
ItemReferenceDialog.project=Projekt
ItemReferenceDialog.deletedInfor=Mülleimer

View File

@@ -144,3 +144,11 @@ RepositoryDropAdapter_moveTitle=Move
RepositoryDropAdapter_movingItems=Moving items...
RepositoryDropAdapter.checkingLockStatus=Checking lock status of
RepositoryDropAdapter.moving=Moving
ItemReferenceDialog.title=Items which cannot be deleted
ItemReferenceDialog.item=Item
ItemReferenceDialog.referenceItem=Reference Item
ItemReferenceDialog.nodeTotals=Totals
ItemReferenceDialog.nodeTotalsTip=The totals of node reference
ItemReferenceDialog.project=Project
ItemReferenceDialog.deletedInfor=In Recycle Bin
ItemReferenceDialog.messages=Some items cannot be deleted because they are referenced from other items.

View File

@@ -103,9 +103,18 @@ ProjectRepositoryNode.rulesManagement=Gestion des r
ProjectRepositoryNode.itemInvalid=Elément invalide : [{0}] {1}
ProjectRepositoryNode.invalidItem=Elément invalide
ProjectRepositoryNode.validationRules=Règles de validation
ProjectRepositoryNode.cdcFoundation=Fondation CDC
ProjectRepositoryNode.genericSchema=Schémas génériques
ProjectRepositoryNode.queries=Requêtes
ProjectRepositoryNode.synonymSchemas=Schémas synonymes
ProjectRepositoryNode.tableSchemas=Schémas des tables
ProjectRepositoryNode.viewSchemas=Voir les schémas
ProjectRepositoryNode.sapFunctions=Fonctions SAP
ProjectRepositoryNode.sapIDocs=SAP iDocs
ItemReferenceDialog.title=Eléments ne pouvant être supprimés
ItemReferenceDialog.item=Elément
ItemReferenceDialog.referenceItem=Elément de référence
ItemReferenceDialog.nodeTotals=Totaux
ItemReferenceDialog.project=Projet
ItemReferenceDialog.deletedInfor=Dans la Corbeille
ItemReferenceDialog.messages=Des éléments ne peuvent être supprimés car ils sont référencés par d'autres.

View File

@@ -1 +1,8 @@
CreateSandboxProjectDialog.userFirstname=Voornaam
CreateSandboxProjectDialog.userLastname=Achternaam
CreateSandboxProjectDialog.Password=Wachtwoord
PropertiesWizardPage.Name=Naam
JobletReferenceDialog.project=PROJECT
ProjectRepositoryNode.invalidItem=Ongeldig item
RepositoryDropAdapter_moveTitle=Verplaatsen
ItemReferenceDialog.project=PROJECT

View File

@@ -1,4 +1,3 @@
ProxyRepositoryFactory.Label=Labela
CreateSandboxProjectDialog.ProjectLabel=Labela
PropertiesWizardPage.Select=SELECT
DeleteAction.action.logicalTitle=DELETE

View File

@@ -13,7 +13,8 @@ Require-Bundle: org.eclipse.ui,
org.talend.commons.ui,
org.apache.log4j,
org.talend.libraries.apache,
org.eclipse.osgi.services
org.eclipse.osgi.services,
org.eclipse.ui.ide
Export-Package: org.talend.core.ldap,
org.talend.core.model.genhtml,
org.talend.core.model.metadata,
@@ -25,6 +26,7 @@ Export-Package: org.talend.core.ldap,
org.talend.core.repository.model.repositoryObject,
org.talend.core.repository.ui.actions.metadata,
org.talend.core.repository.utils,
org.talend.repository.editor,
org.talend.repository.model,
org.talend.repository.model.actions,
org.talend.repository.preview,
@@ -32,6 +34,7 @@ Export-Package: org.talend.core.ldap,
org.talend.repository.ui.dialog,
org.talend.repository.ui.utils,
org.talend.repository.ui.views,
org.talend.repository.ui.wizards.folder,
org.talend.repository.utils
Bundle-Activator: org.talend.core.repository.CoreRepositoryPlugin
Bundle-ActivationPolicy: lazy

View File

@@ -586,6 +586,10 @@
class="org.talend.core.repository.model.CheckJobletDeleteReference"
priority="high">
</check>
<check
class="org.talend.core.repository.model.CheckJobDeleteReference"
priority="high">
</check>
</extension>
</plugin>

View File

@@ -21,6 +21,7 @@ ProxyRepositoryFactory.log.physicalDeletion=Physical deletion [{0}] by {1}.
ProxyRepositoryFactory.log.tempFolderEmptied=Temp folder emptied ({0} files deleted in {1} ms)
ProxyRepositoryFactory.log.unlock=Unlock [{0}] by "{1}".
ProxyRepositoryFactory.logonInProgress=Log on in progress...
ProxyRepositoryFactory.projectIsNotCompatible=The project {0} had been opend by a more recent studio so cannot open it.
ProxyRepositoryFactory.ReplaceJob=is already in use,do you want to replace it?
ProxyRepositoryFactory.synch.repo.items=Synchronize repository items
ProxyRepositoryFactory.synchronizeLibraries=Synchronize libraries...
@@ -92,6 +93,8 @@ DeleteAction.dialog.messageAllElements=All the elements will be deleted forever
DeleteAction.dialog.title=Delete forever
DeleteAction.error.lockedOrOpenedObject.newMessage=The {0} is locked, so you can't delete it.\n If this object is opened ,you must close it before deletion.
DeleteAction.error.title=Deletion forbidden
DeleteAction.warning.message1=can not delete the folder because at least one item contained in this folder is currently open. Close any open item and try again.
DeleteAction.warning.title=Warning
DuplicateAction.cannotGenerateItem=Cannot generate pasted item label.
DuplicateAction.dialog.message=Give name to new job
DuplicateAction.dialog.title=Please input job name
@@ -115,12 +118,14 @@ JobletReferenceDialog.NodeTotalsTip=The totals of node reference
JobletReferenceDialog.project=Project
JobletReferenceDialog.ReferenceJob=Reference Job
JobletReferenceDialog.Title=Delete the joblet failure
ContextReferenceDialog.Title=Delete the context failure
ContextReferenceDialog.Title=Delete Context Group
ContextReferenceDialog.Recycle=in Recycle Bin
ContextReferenceDialog.ReferenceJob=Reference Objects
ContextReferenceDialog.Types=Type
ContextReferenceDialog.NodeTypeTip=The type of node reference
ContextReferenceDialog.Messages=Context({0} {1}) is referenced from\:\n
ContextReferenceDialog.kindMessages=The context group of {0} {1} is referred by the following list, if you really want to delete it, the context group is used in job will be changed to built-in when job is opened again. Would you still like to delete it?
ContextReferenceDialog.kindMessages1=The context group of {0} {1} is referred by the following list, Would you still like to delete it?
CopyToGenericSchemaHelper.cannotGenarateItem=Cannot generate pasted item label.
ProxyRepositoryFactory.ReplaceJobHazardDescription=\nDependence on the original connection may be lost\!
@@ -154,4 +159,24 @@ RepositoryDropAdapter_lockedByYou=This item is locked by you, it can not be move
RepositoryDropAdapter_moveTitle=Move
RepositoryDropAdapter_movingItems=Moving items...
RepositoryDropAdapter.checkingLockStatus=Checking lock status of
RepositoryDropAdapter.moving=Moving
RepositoryDropAdapter.moving=Moving
NewFolderWizard.description=Create a new folder in repository
NewFolderWizard.failureText=An error occurs. Folder cannot be created. See log for more details.
NewFolderWizard.failureTitle=Error
NewFolderWizard.label=Label
NewFolderWizard.nameEmpty=Label is required
NewFolderWizard.nameIncorrect=Label contains incorrect characters.
NewFolderWizard.nameInvalid=Label {0} is forbidden
NewFolderWizard.title=Folder
NewFolderWizard.windowTitle=New folder
CreateFolderAction.action.title=Create folder
CreateFolderAction.action.toolTipText=Create folder
RenameFolderAction.action.title=Rename folder
RenameFolderAction.action.toolTipText=Rename folder
RenameFolderAction.warning.editorOpen.message=Cannot rename "{1}" folder because an item ({0}) contained in this folder is currently open.\nClose it and retry.
RenameFolderAction.warning.editorOpen.title=Action not available
RenameFolderAction.warning.cannotFind.message=Cannot rename folder, it may have been moved or deleted. Click refresh button to update the repository.
RenameFolderAction.warning.cannotFind.title=Action not available

View File

@@ -43,4 +43,12 @@ public class FileConstants {
// MOD klliu 2010-11-26
public static final String JRXML_EXTENSION = "jrxml"; //$NON-NLS-1$
public static final String ZIP_FILE_SUFFIX = ".zip"; //$NON-NLS-1$
public static final String TAR_FILE_SUFFIX = ".tar"; //$NON-NLS-1$
public static final String TAR_GZ_FILE_SUFFIX = ".tar.gz"; //$NON-NLS-1$
public static final String PROPERTIES_FILE_SUFFIX = '.' + PROPERTIES_EXTENSION;
}

View File

@@ -14,7 +14,6 @@ package org.talend.core.repository.model;
import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
@@ -41,6 +40,7 @@ import org.talend.core.GlobalServiceRegister;
import org.talend.core.ICoreService;
import org.talend.core.IStatusPreferenceInitService;
import org.talend.core.model.general.ILibrariesService;
import org.talend.core.model.general.LibraryInfo;
import org.talend.core.model.general.ModuleNeeded;
import org.talend.core.model.general.Project;
import org.talend.core.model.process.EParameterFieldType;
@@ -99,6 +99,7 @@ public abstract class AbstractEMFRepositoryFactory extends AbstractRepositoryFac
return EcoreUtil.generateUUID();
}
@Override
public RootContainer<String, IRepositoryViewObject> getMetadata(Project project, ERepositoryObjectType type,
boolean... options) throws PersistenceException {
return getObjectFromFolder(project, type, true, options);
@@ -138,6 +139,7 @@ public abstract class AbstractEMFRepositoryFactory extends AbstractRepositoryFac
*
* @see org.talend.repository.model.IRepositoryFactory#getRecycleBinItems()
*/
@Override
public List<IRepositoryViewObject> getRecycleBinItems(Project project, boolean... options) throws PersistenceException {
ERepositoryObjectType types[] = { ERepositoryObjectType.DOCUMENTATION, ERepositoryObjectType.METADATA_CONNECTIONS,
ERepositoryObjectType.METADATA_SAPCONNECTIONS, ERepositoryObjectType.SQLPATTERNS,
@@ -155,8 +157,8 @@ public abstract class AbstractEMFRepositoryFactory extends AbstractRepositoryFac
ERepositoryObjectType.JOB_SCRIPT };
List<IRepositoryViewObject> deletedItems = new ArrayList<IRepositoryViewObject>();
for (int i = 0; i < types.length; i++) {
RootContainer<String, IRepositoryViewObject> container = getObjectFromFolder(project, types[i], true, options);
for (ERepositoryObjectType type : types) {
RootContainer<String, IRepositoryViewObject> container = getObjectFromFolder(project, type, true, options);
List<IRepositoryViewObject> repositoryObjects = container.getAbsoluteMembers().objects();
for (IRepositoryViewObject object : repositoryObjects) {
if (object.isDeleted()) {
@@ -237,6 +239,7 @@ public abstract class AbstractEMFRepositoryFactory extends AbstractRepositoryFac
protected abstract Object getFolder(Project project, ERepositoryObjectType repositoryObjectType) throws PersistenceException;
@Override
public List<IRepositoryViewObject> getAllVersion(Project project, String id, boolean avoidSaveProject)
throws PersistenceException {
List<IRepositoryViewObject> serializableAllVersion = null;
@@ -244,6 +247,7 @@ public abstract class AbstractEMFRepositoryFactory extends AbstractRepositoryFac
return convert(serializableAllVersion);
}
@Override
public List<IRepositoryViewObject> getAllVersion(Project project, String id, String relativeFolder, ERepositoryObjectType type)
throws PersistenceException {
List<IRepositoryViewObject> serializableAllVersion = null;
@@ -261,6 +265,7 @@ public abstract class AbstractEMFRepositoryFactory extends AbstractRepositoryFac
return serializableAllVersion;
}
@Override
public boolean isNameAvailable(Project project, Item item, String name, List<IRepositoryViewObject>... givenList)
throws PersistenceException {
if (name == null) {
@@ -395,7 +400,7 @@ public abstract class AbstractEMFRepositoryFactory extends AbstractRepositoryFac
}
List<IRepositoryViewObject> repositoryObjects = getAll(project, ERepositoryObjectType.ROUTINES, false, false);
Map<String, List<URI>> routineAndJars = coreSerivce.getRoutineAndJars();
Map<String, List<LibraryInfo>> routineAndJars = coreSerivce.getRoutineAndJars();
for (URL url : routines) {
String[] fragments = url.toString().split("/"); //$NON-NLS-1$
String label = fragments[fragments.length - 1];
@@ -503,7 +508,7 @@ public abstract class AbstractEMFRepositoryFactory extends AbstractRepositoryFac
* @param url
* @throws PersistenceException
*/
private void createRoutine(URL url, IPath path, String label, List<URI> neededJars) throws PersistenceException {
private void createRoutine(URL url, IPath path, String label, List<LibraryInfo> neededJars) throws PersistenceException {
if (url == null) {
throw new IllegalArgumentException();
}
@@ -527,13 +532,13 @@ public abstract class AbstractEMFRepositoryFactory extends AbstractRepositoryFac
routineItem.setContent(byteArray);
routineItem.setBuiltIn(true);
if (neededJars != null) {
for (URI jar : neededJars) {
for (LibraryInfo jar : neededJars) {
IMPORTType type = ComponentFactory.eINSTANCE.createIMPORTType();
type.setMESSAGE("");
type.setNAME(label);
type.setREQUIRED(true);
type.setMODULE(new Path(jar.getPath()).lastSegment());
type.setUrlPath(jar.getPath());
type.setMODULE(jar.getLibName());
type.setBundleID(jar.getBundleId());
routineItem.getImports().add(type);
}
}
@@ -651,6 +656,7 @@ public abstract class AbstractEMFRepositoryFactory extends AbstractRepositoryFac
}
}
@Override
public void logOnProject(Project project) throws LoginException, PersistenceException {
setLoggedOnProject(false);
@@ -678,6 +684,7 @@ public abstract class AbstractEMFRepositoryFactory extends AbstractRepositoryFac
setLoggedOnProject(true);
}
@Override
public List<ModuleNeeded> getModulesNeededForJobs() throws PersistenceException {
List<ModuleNeeded> importNeedsList = new ArrayList<ModuleNeeded>();
IProxyRepositoryFactory repositoryFactory = CoreRuntimePlugin.getInstance().getRepositoryService()
@@ -710,6 +717,7 @@ public abstract class AbstractEMFRepositoryFactory extends AbstractRepositoryFac
return importNeedsList;
}
@Override
public RootContainer<String, IRepositoryViewObject> getRoutineFromProject(Project project) throws PersistenceException {
RootContainer<String, IRepositoryViewObject> toReturn = new RootContainer<String, IRepositoryViewObject>();
ERepositoryObjectType type = ERepositoryObjectType.ROUTINES;
@@ -724,6 +732,7 @@ public abstract class AbstractEMFRepositoryFactory extends AbstractRepositoryFac
return toReturn;
}
@Override
public IRepositoryViewObject getLastVersion(Project project, String id) throws PersistenceException {
List<IRepositoryViewObject> serializableAllVersion = null;
serializableAllVersion = getSerializable(project, id, false, false);
@@ -761,6 +770,7 @@ public abstract class AbstractEMFRepositoryFactory extends AbstractRepositoryFac
return message;
}
@Override
public IRepositoryViewObject getLastVersion(Project project, String id, String relativeFolder, ERepositoryObjectType type)
throws PersistenceException {
List<IRepositoryViewObject> serializableAllVersion = null;
@@ -803,7 +813,7 @@ public abstract class AbstractEMFRepositoryFactory extends AbstractRepositoryFac
}
Object fullFolder;
if (folder instanceof IFolder) {
fullFolder = (IFolder) getFolder(project, itemType);
fullFolder = getFolder(project, itemType);
if (path != null && !"".equals(path)) { //$NON-NLS-1$
fullFolder = ((IFolder) fullFolder).getFolder(new Path(path));
}
@@ -824,6 +834,7 @@ public abstract class AbstractEMFRepositoryFactory extends AbstractRepositoryFac
return fullFolder;
}
@Override
public Property getUptodateProperty(Project project, Property property) throws PersistenceException {
List<IRepositoryViewObject> allVersion = new ArrayList<IRepositoryViewObject>();
@@ -855,8 +866,7 @@ public abstract class AbstractEMFRepositoryFactory extends AbstractRepositoryFac
String parentBranch = getRepositoryContext().getFields().get(
IProxyRepositoryFactory.BRANCH_SELECTION + "_" + project.getTechnicalLabel());
for (ProjectReference refProject : (List<ProjectReference>) (List<ProjectReference>) project.getEmfProject()
.getReferencedProjects()) {
for (ProjectReference refProject : (List<ProjectReference>) project.getEmfProject().getReferencedProjects()) {
if (refProject.getBranch() != null && !parentBranch.equals(refProject.getBranch())) {
continue;
}
@@ -874,6 +884,7 @@ public abstract class AbstractEMFRepositoryFactory extends AbstractRepositoryFac
}
@Override
public FolderItem getFolderItem(Project project, ERepositoryObjectType itemType, IPath path) {
return getFolderHelper(project.getEmfProject()).getFolder(
ERepositoryObjectType.getFolderName(itemType) + IPath.SEPARATOR + path);
@@ -884,6 +895,7 @@ public abstract class AbstractEMFRepositoryFactory extends AbstractRepositoryFac
*
* @see org.talend.repository.model.IRepositoryFactory#reloadProject(org.talend.core.model.general.Project)
*/
@Override
public void reloadProject(Project project) throws PersistenceException {
// TODO Auto-generated method stub
@@ -898,25 +910,30 @@ public abstract class AbstractEMFRepositoryFactory extends AbstractRepositoryFac
* @return all of object under path.
*/
@Override
public List<IRepositoryViewObject> getMetadataByFolder(Project project, ERepositoryObjectType itemType, IPath path) {
return getMetadatasByFolder(project, itemType, path);
}
protected abstract <K, T> List<T> getMetadatasByFolder(Project project, ERepositoryObjectType type, IPath path);
@Override
public RootContainer<String, IRepositoryViewObject> getTdqRepositoryViewObjects(Project project, ERepositoryObjectType type,
String folderName, boolean[] options) throws PersistenceException {
return getObjectFromFolder(project, type, folderName, true, options);
}
@Override
public boolean canLock(Item item) throws PersistenceException {
return true;
}
@Override
public boolean canUnlock(Item item) throws PersistenceException {
return true;
}
@Override
public RootContainer<String, IRepositoryViewObject> getRootContainerFromType(Project project, ERepositoryObjectType type) {
if (project == null || type == null) {
return null;
@@ -929,6 +946,7 @@ public abstract class AbstractEMFRepositoryFactory extends AbstractRepositoryFac
return null;
}
@Override
public LockInfo getLockInfo(Item item) {
if (item.getState().isLocked()) {
return new LockInfo(item.getState().getLocker().getLogin(), "studio", item.getState().getLockDate());//$NON-NLS-1$

View File

@@ -0,0 +1,211 @@
// ============================================================================
//
// Copyright (C) 2006-2012 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.core.repository.model;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import org.apache.commons.collections.map.MultiKeyMap;
import org.eclipse.emf.common.util.EList;
import org.talend.commons.exception.PersistenceException;
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
import org.talend.core.model.general.Project;
import org.talend.core.model.process.IElementParameter;
import org.talend.core.model.process.INode;
import org.talend.core.model.process.IProcess2;
import org.talend.core.model.properties.Item;
import org.talend.core.model.properties.ProcessItem;
import org.talend.core.model.properties.Property;
import org.talend.core.model.repository.ERepositoryObjectType;
import org.talend.core.model.repository.IRepositoryViewObject;
import org.talend.core.repository.ICheckDeleteItemReference;
import org.talend.designer.core.model.utils.emf.talendfile.ElementParameterType;
import org.talend.designer.core.model.utils.emf.talendfile.NodeType;
import org.talend.repository.ProjectManager;
import org.talend.repository.model.ERepositoryStatus;
import org.talend.repository.model.IProxyRepositoryFactory;
import org.talend.repository.model.IRepositoryNode;
import org.talend.repository.model.ItemReferenceBean;
import org.talend.repository.ui.actions.DeleteActionCache;
/**
*
* DOC hcyi class global comment. Detailled comment
*/
public class CheckJobDeleteReference extends AbstractCheckDeleteItemReference implements ICheckDeleteItemReference {
private static final String PROCESS_TYPE_PROCESS = "PROCESS_TYPE_PROCESS"; //$NON-NLS-1$
// almost move from the method checkRepositoryNodeFromProcess of DeleteAction class.
public Set<ItemReferenceBean> checkItemReferenceBeans(IProxyRepositoryFactory factory, DeleteActionCache deleteActionCache,
IRepositoryNode currentJobNode) {
IRepositoryViewObject object = currentJobNode.getObject();
Item nodeItem = object.getProperty().getItem();
boolean needCheckJobIfUsedInProcess = false;
if (nodeItem instanceof ProcessItem) {
needCheckJobIfUsedInProcess = true;
}
Set<ItemReferenceBean> list = new HashSet<ItemReferenceBean>();
if (object != null && needCheckJobIfUsedInProcess) {
Property property = object.getProperty();
if (property != null) {
String label = property.getLabel();
String version = property.getVersion();
ERepositoryObjectType type = object.getRepositoryObjectType();
boolean isItemDeleted = factory.getStatus(object) == ERepositoryStatus.DELETED;
Item item = property.getItem();
if (!(item instanceof ProcessItem)) {
return list;
}
EList nodesList = null;
// fix bug 10050
Set<Project> refParentProjects = new HashSet<Project>();
try {
refParentProjects.add(ProjectManager.getInstance().getCurrentProject());
refParentProjects.addAll(ProjectManager.getInstance().getReferencedProjects());
for (Project refP : refParentProjects) {
List<IRepositoryViewObject> processes = factory.getAll(refP, ERepositoryObjectType.PROCESS, true);
deleteActionCache.setProcessList(processes);
for (IRepositoryViewObject process : deleteActionCache.getProcessList()) {
Property property2 = process.getProperty();
boolean isDelete = factory.getStatus(process) == ERepositoryStatus.DELETED;
Item item2 = property2.getItem();
if (item == item2) {
continue;
}
if (!isOpenedItem(item2, deleteActionCache.getOpenProcessMap())) {
if (item2 instanceof ProcessItem) {
nodesList = ((ProcessItem) item2).getProcess().getNode();
}
}
if (nodesList != null) {
for (Object object2 : nodesList) {
if (object2 instanceof NodeType) {
NodeType nodeType = (NodeType) object2;
boolean equals = false;
// only detect the tRunJob component releationship between father job and child job //$NON-NLS-1$
if ("tRunJob".equals(nodeType.getComponentName())) {
for (Object obj : nodeType.getElementParameter()) {
if (obj != null && obj instanceof ElementParameterType) {
ElementParameterType param = (ElementParameterType) obj;
if ("PROCESS:PROCESS_TYPE_PROCESS".equals(param.getName())) { //$NON-NLS-1$
if (property.getId().equals(param.getValue())) {
equals = true;
}
}
}
}
}
if (equals) {
String path = item2.getState().getPath();
boolean found = false;
ItemReferenceBean bean = new ItemReferenceBean();
bean.setItemName(label);
bean.setItemVersion(version);
bean.setItemType(type);
bean.setItemDeleted(isItemDeleted);
bean.setReferenceItemName(property2.getLabel());
bean.setReferenceItemVersion(property2.getVersion());
bean.setReferenceItemType(process.getRepositoryObjectType());
bean.setReferenceItemPath(path);
bean.setReferenceProjectName(refP.getLabel());
bean.setReferenceItemDeleted(isDelete);
for (ItemReferenceBean b : list) {
if (b.equals(bean)) {
found = true;
b.addNodeNum();
break;
}
}
if (!found) {
list.add(bean);
}
}
}
}
}
}
for (IProcess2 openedProcess : deleteActionCache.getOpenedProcessList()) {
for (INode node : openedProcess.getGraphicalNodes()) {
boolean equals = false;
IElementParameter processTypeParam = node.getElementParameter(PROCESS_TYPE_PROCESS);
if (processTypeParam != null && property.getId().equals(processTypeParam.getValue())) {
equals = true;
}
boolean isDelete = factory.getStatus(openedProcess) == ERepositoryStatus.DELETED;
Property property2 = openedProcess.getProperty();
Item item2 = property2.getItem();
String path = item2.getState().getPath();
if (equals) {
boolean found = false;
ItemReferenceBean bean = new ItemReferenceBean();
bean.setItemName(label);
bean.setItemVersion(version);
bean.setItemType(type);
bean.setItemDeleted(isItemDeleted);
bean.setReferenceItemName(property2.getLabel());
bean.setReferenceItemVersion(property2.getVersion());
bean.setReferenceItemType(ERepositoryObjectType.getItemType(item2));
bean.setReferenceItemPath(path);
bean.setReferenceProjectName(refP.getLabel());
bean.setReferenceItemDeleted(isDelete);
for (ItemReferenceBean b : list) {
if (b.equals(bean)) {
found = true;
b.addNodeNum();
break;
}
}
if (!found) {
list.add(bean);
}
}
}
}
}
} catch (PersistenceException e) {
ExceptionHandler.process(e);
}
}
}
/*
* If the reference job or joblet is in the recycle bin but the joblet is not then no need to check; If both the
* joblet and the reference job or joblet are all in the recycle bin and they are all in the delete list then no
* need to check them; If both the joblet and the reference job or joblet are all not in the recycle bin and
* they are all in the delete list then no need to check them too.
*/
Iterator<ItemReferenceBean> it = list.iterator();
while (it.hasNext()) {
ItemReferenceBean bean = it.next();
if ((!bean.isItemDeleted() && bean.isReferenceItemDeleted())
|| (bean.isItemDeleted() && bean.isReferenceItemDeleted() && isItemInDeleteList(bean, true))
|| (!bean.isItemDeleted() && !bean.isReferenceItemDeleted() && isItemInDeleteList(bean, true))) {
it.remove();
}
}
return list;
}
private static boolean isOpenedItem(Item openedItem, MultiKeyMap openProcessMap) {
if (openedItem == null) {
return false;
}
Property property = openedItem.getProperty();
return (openProcessMap.get(property.getId(), property.getLabel(), property.getVersion()) != null);
}
}

View File

@@ -123,12 +123,12 @@ public class CopyToGenericSchemaHelper {
listColumns = (ConnectionHelper.getTables(dbConnection).toArray(new MetadataTable[0])[0]).getColumns();
}
boolean isConnectionTableSchema = checkIsConnectionTableSchema(tableToMove);
if (isConnectionTableSchema) {
metadataTable.setLabel(DEFAULT_TABLE_NAME);
} else {
metadataTable.setLabel(tableToMove.getLabel() == null ? DEFAULT_TABLE_NAME : tableToMove.getLabel());
}
// boolean isConnectionTableSchema = checkIsConnectionTableSchema(tableToMove);
// if (isConnectionTableSchema) {
// metadataTable.setLabel(DEFAULT_TABLE_NAME);
// } else {
metadataTable.setLabel(tableToMove.getLabel() == null ? DEFAULT_TABLE_NAME : tableToMove.getLabel());
// }
for (Object temp : listColumns) {
MetadataColumn column = (MetadataColumnImpl) temp;
MetadataColumn metadataColumn = ConnectionFactory.eINSTANCE.createMetadataColumn();
@@ -162,8 +162,7 @@ public class CopyToGenericSchemaHelper {
connectionProperty.setLabel(connectionLabel);
metadataTable.setId(factory.getNextId());
GenericPackage g = (GenericPackage) ConnectionHelper.getPackage(connection.getName(), (Connection) connection,
GenericPackage.class);
GenericPackage g = (GenericPackage) ConnectionHelper.getPackage(connection.getName(), connection, GenericPackage.class);
if (g != null) { // hywang
g.getOwnedElement().add(metadataTable);
} else {
@@ -176,7 +175,7 @@ public class CopyToGenericSchemaHelper {
connectionProperty.setItem(connectionItem);
connectionProperty.setId(factory.getNextId());
if (!repositoryFactory.isNameAvailable(connectionItem, connectionLabel))// name is existing in generic
if (!repositoryFactory.isNameAvailable(connectionItem, connectionLabel)) {
// schema.
try {
setPropNewName(connectionProperty);
@@ -184,6 +183,7 @@ public class CopyToGenericSchemaHelper {
// e.printStackTrace();
ExceptionHandler.process(e);
}
}
repositoryFactory.create(connectionItem, targetPath);
}

View File

@@ -12,6 +12,9 @@
// ============================================================================
package org.talend.core.repository.utils;
import java.io.File;
import java.util.List;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IPath;
import org.eclipse.emf.ecore.resource.Resource;
@@ -20,7 +23,8 @@ import org.talend.core.IService;
import org.talend.core.model.properties.ConnectionItem;
import org.talend.core.model.properties.Item;
import org.talend.core.model.properties.Property;
import orgomg.cwm.objectmodel.core.ModelElement;
import org.talend.core.model.properties.TDQItem;
import org.talend.repository.model.IRepositoryNode;
/**
* DOC mzhao Abstract unload resource service which can be extended by client.
@@ -30,11 +34,6 @@ public class AbstractResourceChangesService implements IService {
public void handleUnload(Resource toBeUnloadedResource) {
}
// Add new elements to resource, remove elements from resource, delete resource
public boolean handleResourceChange(ModelElement modelElement) {
return true;
}
public void handleLogicalDelete(Property prop) {
}
@@ -75,8 +74,26 @@ public class AbstractResourceChangesService implements IService {
* @throws PersistenceException
*/
public void saveResourceByEMFShared(Resource toSave) {
}
/**
* if move TDQReportItem, need to move the generated doc of it also.
*
* @param tdqItem
* @param tarFolder
*/
public void moveReportGeneratedDocFolder(TDQItem tdqItem, File tarFolder) {
}
public List<IRepositoryNode> getDependentNodes(IRepositoryNode currentNode) {
return null;
}
public List<IRepositoryNode> getDependentConnNodesInRecycleBin(List<IRepositoryNode> children) {
return null;
}
public void openDependcesDialog(List<IRepositoryNode> nodes) {
}
}

View File

@@ -0,0 +1,64 @@
// ============================================================================
//
// Copyright (C) 2006-2012 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.core.repository.utils;
import java.util.ArrayList;
import java.util.List;
import org.talend.core.model.process.IProcess2;
import org.talend.core.model.utils.RepositoryManagerHelper;
import org.talend.repository.model.ContextReferenceBean;
/**
* DOC Marvin class global comment. Detailled comment <br/>
*
* $Id: talend.epf 55206 2011-02-15 17:32:14Z mhirt $
*
*/
public class RepositoryReferenceBeanUtils {
public static boolean hasReferenceBean(List<ContextReferenceBean> list, String beanName, String beanVersion) {
boolean has = false;
if (list == null) {
list = new ArrayList<ContextReferenceBean>();
has = false;
} else {
for (ContextReferenceBean loopBean : list) {
String loopBeanName = loopBean.getRelateName();
String loopBeanVersion = loopBean.getRelateVersion();
if (loopBeanName != null && !"".equals(loopBeanName) && loopBeanName.equals(beanName) && loopBeanVersion != null
&& !"".equals(loopBeanVersion) && loopBeanVersion.equals(beanVersion)) {
has = true;
break;
}
}
}
return has;
}
public static boolean isOpenedProcess(IProcess2 process) {
List<IProcess2> openedProcesses = RepositoryManagerHelper.getOpenedProcess();
boolean isOpenedProcess = false;
if (openedProcesses != null && openedProcesses.size() > 0) {
for (IProcess2 tempPro : openedProcesses) {
if (process.getId().equals(tempPro.getId())) {
isOpenedProcess = true;
break;
}
}
}
return isOpenedProcess;
}
}

View File

@@ -12,9 +12,9 @@
// ============================================================================
package org.talend.core.repository.utils;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
@@ -122,11 +122,12 @@ public class XmiResourceManager {
public void loadScreenshots(Property property, ProcessType processType) {
Resource screenshotResource = getScreenshotResource(property.getItem());
processType.getScreenshots().addAll(screenshotResource.getContents());
if (screenshotResource != null) { // if no screenshot, we will try to add later when save
processType.getScreenshots().addAll(screenshotResource.getContents());
}
}
public Property loadProperty(IResource iResource) {
public synchronized Property loadProperty(IResource iResource) {
// force unload old version, or the UI won't be synchronized all the time to the current file.
// this is only if a user update itself a .item or .properties, or for SVN repository.
//
@@ -192,8 +193,8 @@ public class XmiResourceManager {
public Resource createTempProjectResource() {
URI uri = null;
try {
uri = URI.createPlatformResourceURI(Platform.getInstallLocation().getURL().toURI().toString());
} catch (URISyntaxException e) {
uri = URI.createPlatformResourceURI(Platform.getInstallLocation().getURL().getFile(), true);
} catch (Exception e) {
ExceptionHandler.process(e);
}
return resourceSet.createResource(uri);
@@ -214,36 +215,41 @@ public class XmiResourceManager {
return resourceSet.createResource(propertyResourceURI);
}
public Resource getReferenceFileResource(Resource itemResource, String extension, boolean needLoad) {
URI referenceFileURI = getReferenceFileURI(itemResource.getURI(), extension);
public Resource getReferenceFileResource(Resource itemResource, ReferenceFileItem refFile, boolean needLoad) {
URI referenceFileURI = getReferenceFileURI(itemResource.getURI(), refFile.getExtension());
URIConverter converter = resourceSet.getURIConverter();
Resource referenceResource = new ByteArrayResource(referenceFileURI);
InputStream inputStream = null;
List<Resource> resources = new ArrayList<Resource>(resourceSet.getResources());
for (Resource res : resources) {
if (res != null && referenceFileURI.toString().equals(res.getURI().toString())) {
res.unload();
resourceSet.getResources().remove(res);
// in case ESB load reference file from the physcial file,but DI need reference from the EMF,so add this flag
if (refFile.isReloadFromFile()) {
for (Resource res : resources) {
if (res != null && referenceFileURI.toString().equals(res.getURI().toString())) {
res.unload();
resourceSet.getResources().remove(res);
}
}
}
resourceSet.getResources().add(referenceResource);
try {
if (needLoad) {
inputStream = converter.createInputStream(referenceFileURI);
referenceResource.load(inputStream, null);
}
} catch (IOException e) {
e.printStackTrace();
} finally {
resourceSet.getResources().add(referenceResource);
try {
if (inputStream != null) {
inputStream.close();
if (needLoad) {
inputStream = converter.createInputStream(referenceFileURI);
referenceResource.load(inputStream, null);
}
} catch (IOException e) {
ExceptionHandler.process(e);
e.printStackTrace();
} finally {
try {
if (inputStream != null) {
inputStream.close();
}
} catch (IOException e) {
ExceptionHandler.process(e);
}
}
} else {
referenceResource = resourceSet.getResource(referenceFileURI, true);
}
return referenceResource;
}
@@ -335,17 +341,41 @@ public class XmiResourceManager {
return itemResource;
}
public Resource getScreenshotResource(Item item) {
return getScreenshotResource(item, false);
}
/*
* Get a resource obj from Item resource file. if the resouce file does not exist ,will create it first.
*/
public Resource getScreenshotResource(Item item) {
public Resource getScreenshotResource(Item item, boolean createIfNotExist) {
URI itemResourceURI = null;
itemResourceURI = getScreenshotResourceURI(getItemURI(item));
Resource itemResource;
try {
// judge whether the physical file exists or not
itemResource = resourceSet.getResource(itemResourceURI, true);
} catch (Exception e) {
boolean fileExist = false;
if (itemResourceURI.isFile()) {
fileExist = new File(itemResourceURI.toFileString()).exists();
} else {
IPath path = URIHelper.convert(itemResourceURI);
if (path != null) {
IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
if (file.exists()) {
fileExist = true;
}
} else {
fileExist = false;
}
}
Resource itemResource = null;
if (fileExist) {
try {
// judge whether the physical file exists or not
itemResource = resourceSet.getResource(itemResourceURI, true);
} catch (Exception e) {
// do nothing, consider the file don't exist
itemResource = null;
}
}
if (itemResource == null && createIfNotExist) {
itemResource = resourceSet.createResource(itemResourceURI);
}
return itemResource;

View File

@@ -49,10 +49,12 @@ public class RepositoryEditorInput extends FileEditorInput implements IRepositor
return name;
}
@Override
public Item getItem() {
return this.item;
}
@Override
public void setItem(Item item) {
this.item = item;
if (item != null) {
@@ -62,14 +64,17 @@ public class RepositoryEditorInput extends FileEditorInput implements IRepositor
}
}
@Override
public boolean isReadOnly() {
return this.readOnly;
}
@Override
public void setReadOnly(boolean readOnly) {
this.readOnly = readOnly;
}
@Override
public boolean equals(final Object obj) {
if (this == obj) {
return true;
@@ -89,6 +94,7 @@ public class RepositoryEditorInput extends FileEditorInput implements IRepositor
return true;
}
@Override
public int hashCode() {
if (getItem() != null) {
return super.hashCode() & getItem().hashCode();
@@ -98,6 +104,7 @@ public class RepositoryEditorInput extends FileEditorInput implements IRepositor
protected RepositoryNode repositoryNode;
@Override
public RepositoryNode getRepositoryNode() {
return this.repositoryNode;
}
@@ -107,6 +114,7 @@ public class RepositoryEditorInput extends FileEditorInput implements IRepositor
*
* @param node
*/
@Override
public void setRepositoryNode(IRepositoryNode repositoryNode) {
if (repositoryNode != null) {
this.repositoryNode = (RepositoryNode) repositoryNode;

View File

@@ -464,6 +464,8 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
refProject.setProperties(EProperties.CONTENT_TYPE, ERepositoryObjectType.REFERENCED_PROJECTS);
nodes.add(refProject);
}
// delete the hidden nodes
deleteHiddenNodes(nodes);
// *init the repository node from extension
initExtensionRepositoryNodes(curParentNode);
@@ -476,6 +478,31 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
collectRepositoryNodes(curParentNode);
}
private void deleteHiddenNodes(List<IRepositoryNode> nodes) {
if (GlobalServiceRegister.getDefault().isServiceRegistered(IBrandingService.class)) {
IBrandingService service = (IBrandingService) GlobalServiceRegister.getDefault().getService(IBrandingService.class);
List<IRepositoryNode> hiddens = service.getBrandingConfiguration().getHiddenRepositoryCategory(this, "DI");
for (IRepositoryNode node : hiddens) {
Iterator<IRepositoryNode> it = nodes.iterator();
while (it.hasNext()) {
IRepositoryNode curNode = it.next();
if (curNode.getContentType() != null && curNode.getContentType().equals(ERepositoryObjectType.METADATA)) {
for (IRepositoryNode curNode2 : curNode.getChildren()) {
if (curNode2.equals(node)) {
curNode.getChildren().remove(curNode2);
break;
}
}
}
if (curNode.equals(node)) {
it.remove();
}
}
}
}
}
private void collectRepositoryNodes(IRepositoryNode curParentNode) {
if (repositoryNodeMap == null) {
repositoryNodeMap = new HashMap<String, RepositoryNode>();
@@ -1145,7 +1172,7 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
"ProjectRepositoryNode.itemInvalid", repositoryObject.getRepositoryObjectType(), //$NON-NLS-1$,
repositoryObject.getLabel()));
if (repositoryObject.getProperty().getInformations().isEmpty()) {
if (repositoryObject.getProperty() != null && repositoryObject.getProperty().getInformations().isEmpty()) {
Information info = PropertiesFactory.eINSTANCE.createInformation();
info.setLevel(InformationLevel.ERROR_LITERAL);
info.setText(Messages.getString("ProjectRepositoryNode.invalidItem")); //$NON-NLS-1$
@@ -1812,7 +1839,7 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
}
public boolean getMergeRefProject() {
IPreferenceStore preferenceStore = RepositoryManager.getPreferenceStore();
IPreferenceStore preferenceStore = RepositoryManager.getRepositoryPreferenceStore();
return preferenceStore.getBoolean(IRepositoryPrefConstants.MERGE_REFERENCE_PROJECT);
}
@@ -1900,5 +1927,4 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
}
super.dispose();
}
}

View File

@@ -267,35 +267,62 @@ public class CopyObjectAction {
}
private void copySingleVersionItem(final Item item, final IPath path) {
final RepositoryWorkUnit<Object> workUnit = new RepositoryWorkUnit<Object>("", this) {//$NON-NLS-1$
final RepositoryWorkUnit<Object> workUnit = new RepositoryWorkUnit<Object>("", this) {//$NON-NLS-1$
@Override
protected void run() throws LoginException, PersistenceException {
final IWorkspaceRunnable op = new IWorkspaceRunnable() {
public void run(IProgressMonitor monitor) throws CoreException {
try {
Item newItem = factory.copy(item, path, true);
// qli modified to fix the bug 5400 and 6185.
if (newItem instanceof RoutineItem) {
synDuplicatedRoutine((RoutineItem) newItem);
}
ICamelDesignerCoreService service = null;
if (GlobalServiceRegister.getDefault().isServiceRegistered(ICamelDesignerCoreService.class)) {
service = (ICamelDesignerCoreService) GlobalServiceRegister.getDefault().getService(
ICamelDesignerCoreService.class);
}
if (service != null && service.isInstanceofCamelBeans(item)) {
// for camel
synDuplicatedBean(newItem);
}
if (newItem instanceof ProcessItem || newItem instanceof JobletProcessItem) {
RelationshipItemBuilder.getInstance().addOrUpdateItem(newItem);
}
if (newItem instanceof ConnectionItem) {
ConnectionItem connectionItem = (ConnectionItem) newItem;
connectionItem.getConnection().getSupplierDependency().clear();
}
factory.save(newItem);
} catch (Exception e) {
ExceptionHandler.process(e);
}
}
};
IRunnableWithProgress iRunnableWithProgress = new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
IWorkspace workspace = ResourcesPlugin.getWorkspace();
try {
ISchedulingRule schedulingRule = workspace.getRoot();
workspace.run(op, schedulingRule, IWorkspace.AVOID_UPDATE, monitor);
} catch (CoreException e) {
throw new InvocationTargetException(e);
}
}
};
try {
Item newItem = factory.copy(item, path, true);
// qli modified to fix the bug 5400 and 6185.
if (newItem instanceof RoutineItem) {
synDuplicatedRoutine((RoutineItem) newItem);
}
ICamelDesignerCoreService service = null;
if (GlobalServiceRegister.getDefault().isServiceRegistered(ICamelDesignerCoreService.class)) {
service = (ICamelDesignerCoreService) GlobalServiceRegister.getDefault().getService(
ICamelDesignerCoreService.class);
}
if (service != null && service.isInstanceofCamelBeans(item)) {
// for camel
synDuplicatedBean(newItem);
}
if (newItem instanceof ProcessItem || newItem instanceof JobletProcessItem) {
RelationshipItemBuilder.getInstance().addOrUpdateItem(newItem);
}
if (newItem instanceof ConnectionItem) {
ConnectionItem connectionItem = (ConnectionItem) newItem;
connectionItem.getConnection().getSupplierDependency().clear();
}
factory.save(newItem);
} catch (Exception e) {
new ProgressMonitorDialog(null).run(true, true, iRunnableWithProgress);
} catch (InvocationTargetException e) {
ExceptionHandler.process(e);
} catch (InterruptedException e) {
//
}
}
};

View File

@@ -21,8 +21,6 @@ import org.eclipse.ui.PlatformUI;
import org.talend.commons.exception.PersistenceException;
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
import org.talend.commons.utils.workbench.resources.ResourceUtils;
import org.talend.core.model.properties.ConnectionItem;
import org.talend.core.model.properties.Item;
import org.talend.core.model.repository.ERepositoryObjectType;
import org.talend.core.model.repository.IRepositoryViewObject;
import org.talend.core.model.repository.RepositoryManager;
@@ -34,6 +32,7 @@ import org.talend.core.repository.utils.AbstractResourceChangesService;
import org.talend.core.repository.utils.TDQServiceRegister;
import org.talend.repository.model.ERepositoryStatus;
import org.talend.repository.model.IProxyRepositoryFactory;
import org.talend.repository.model.IRepositoryNode;
import org.talend.repository.model.IRepositoryNode.ENodeType;
import org.talend.repository.model.IRepositoryNode.EProperties;
import org.talend.repository.model.JobletReferenceBean;
@@ -291,11 +290,10 @@ public class MoveObjectAction {
|| repositoryObjectType == ERepositoryObjectType.METADATA_MDMCONNECTION) {
AbstractResourceChangesService resourceChangeService = TDQServiceRegister.getInstance()
.getResourceChangeService(AbstractResourceChangesService.class);
Item item = objectToMove.getProperty() == null ? null : objectToMove.getProperty().getItem();
if (null != resourceChangeService && null != item) {
boolean handleResourceChange = resourceChangeService.handleResourceChange(((ConnectionItem) item)
.getConnection());
if (!handleResourceChange) {
if (null != resourceChangeService) {
List<IRepositoryNode> dependentNodes = resourceChangeService.getDependentNodes(sourceNode);
if (dependentNodes != null && !dependentNodes.isEmpty()) {
resourceChangeService.openDependcesDialog(dependentNodes);
return;
}
}

View File

@@ -68,9 +68,15 @@ public class CopyAction extends AContextualAction {
LocalSelectionTransfer.getTransfer().setSelection(selection);
LocalSelectionTransfer.getTransfer().setSelectionSetTime(System.currentTimeMillis());
// init paste action
PasteAction pasteActionInstance = PasteAction.getInstance();
if (pasteActionInstance != null) {
pasteActionInstance.init(null, selection);
}
// refresh();
}
@Override
public void init(TreeViewer viewer, IStructuredSelection selection) {
boolean canWork = true;
RepositoryNode node = (RepositoryNode) selection.getFirstElement();

View File

@@ -35,6 +35,7 @@ import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IEditorReference;
@@ -58,11 +59,13 @@ import org.talend.core.model.general.Project;
import org.talend.core.model.metadata.builder.connection.MetadataTable;
import org.talend.core.model.metadata.builder.connection.SubscriberTable;
import org.talend.core.model.process.IContext;
import org.talend.core.model.process.IContextParameter;
import org.talend.core.model.process.INode;
import org.talend.core.model.process.IProcess;
import org.talend.core.model.process.IProcess2;
import org.talend.core.model.properties.ConnectionItem;
import org.talend.core.model.properties.ContextItem;
import org.talend.core.model.properties.DatabaseConnectionItem;
import org.talend.core.model.properties.FolderItem;
import org.talend.core.model.properties.FolderType;
import org.talend.core.model.properties.Item;
@@ -70,17 +73,18 @@ import org.talend.core.model.properties.JobletProcessItem;
import org.talend.core.model.properties.ProcessItem;
import org.talend.core.model.properties.ProjectReference;
import org.talend.core.model.properties.Property;
import org.talend.core.model.properties.TDQItem;
import org.talend.core.model.repository.ERepositoryObjectType;
import org.talend.core.model.repository.Folder;
import org.talend.core.model.repository.IRepositoryViewObject;
import org.talend.core.model.repository.RepositoryManager;
import org.talend.core.model.utils.RepositoryManagerHelper;
import org.talend.core.repository.i18n.Messages;
import org.talend.core.repository.model.ISubRepositoryObject;
import org.talend.core.repository.model.ProxyRepositoryFactory;
import org.talend.core.repository.model.repositoryObject.MetadataTableRepositoryObject;
import org.talend.core.repository.utils.AbstractResourceChangesService;
import org.talend.core.repository.utils.RepositoryNodeDeleteManager;
import org.talend.core.repository.utils.RepositoryReferenceBeanUtils;
import org.talend.core.repository.utils.TDQServiceRegister;
import org.talend.core.runtime.CoreRuntimePlugin;
import org.talend.cwm.helper.SubItemHelper;
@@ -154,6 +158,7 @@ public class DeleteAction extends AContextualAction {
final List<RepositoryNode> deletedFolder = new ArrayList<RepositoryNode>();
final IWorkspaceRunnable op = new IWorkspaceRunnable() {
@Override
public void run(IProgressMonitor monitor) {
monitor.beginTask("Delete Running", IProgressMonitor.UNKNOWN); //$NON-NLS-1$
Object[] selections = ((IStructuredSelection) selection).toArray();
@@ -190,6 +195,7 @@ public class DeleteAction extends AContextualAction {
if (jobNames != null) {
Display.getDefault().syncExec(new Runnable() {
@Override
public void run() {
String message = jobNames.toString()
+ Messages.getString("DeleteAction.deleteJobAssignedToOneService"); //$NON-NLS-1$
@@ -209,6 +215,20 @@ public class DeleteAction extends AContextualAction {
continue;
}
// TDI-22550
if (GlobalServiceRegister.getDefault().isServiceRegistered(IDesignerCoreService.class)) {
IDesignerCoreService coreService = (IDesignerCoreService) GlobalServiceRegister.getDefault()
.getService(IDesignerCoreService.class);
IRepositoryViewObject object = node.getObject();
if (coreService != null && object != null && object.getProperty() != null) {
Item item = object.getProperty().getItem();
IProcess iProcess = coreService.getProcessFromItem(item);
if (iProcess != null && iProcess instanceof IProcess2) {
IProcess2 process = (IProcess2) iProcess;
process.removeProblems4ProcessDeleted();
}
}
}
boolean needReturn = deleteElements(factory, deleteActionCache, node);
if (node.getProperties(EProperties.CONTENT_TYPE) == ERepositoryObjectType.JOBLET) {
needToUpdataPalette = true;
@@ -218,18 +238,6 @@ public class DeleteAction extends AContextualAction {
}
types.add(node.getObjectType());
// TDI-22550
IDesignerCoreService coreService = (IDesignerCoreService) GlobalServiceRegister.getDefault()
.getService(IDesignerCoreService.class);
IRepositoryViewObject object = node.getObject();
if (coreService != null && object != null && object.getProperty() != null) {
Item item = object.getProperty().getItem();
IProcess iProcess = coreService.getProcessFromItem(item);
if (iProcess != null && iProcess instanceof IProcess2) {
IProcess2 process = (IProcess2) iProcess;
process.removeProblems4ProcessDeleted();
}
}
} else if (node.getType() == ENodeType.SIMPLE_FOLDER) {
FolderItem folderItem = (FolderItem) node.getObject().getProperty().getItem();
if (node.getChildren().size() > 0 && !folderItem.getState().isDeleted()) {
@@ -241,6 +249,7 @@ public class DeleteAction extends AContextualAction {
if (jobNames != null) {
Display.getDefault().syncExec(new Runnable() {
@Override
public void run() {
String message = null;
if (jobNames.toString().contains(",")) { //$NON-NLS-1$
@@ -301,6 +310,7 @@ public class DeleteAction extends AContextualAction {
if (unDeleteItems.size() > 0) {
Display.getDefault().syncExec(new Runnable() {
@Override
public void run() {
ItemReferenceDialog dialog = new ItemReferenceDialog(PlatformUI.getWorkbench()
.getActiveWorkbenchWindow().getShell(), unDeleteItems);
@@ -338,6 +348,7 @@ public class DeleteAction extends AContextualAction {
IRunnableWithProgress iRunnableWithProgress = new IRunnableWithProgress() {
@Override
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
IWorkspace workspace = ResourcesPlugin.getWorkspace();
try {
@@ -362,6 +373,7 @@ public class DeleteAction extends AContextualAction {
final boolean updatePalette = needToUpdataPalette;
Display.getCurrent().syncExec(new Runnable() {
@Override
public void run() {
// MOD qiongli 2011-1-24,avoid to refresh repositoryView for top
if (!org.talend.commons.utils.platform.PluginChecker.isOnlyTopLoaded()) {
@@ -416,14 +428,21 @@ public class DeleteAction extends AContextualAction {
ERepositoryObjectType objectType = (ERepositoryObjectType) node.getProperties(EProperties.CONTENT_TYPE);
List<IRepositoryNode> repositoryList = node.getChildren();
boolean success = true;
Exception bex = null;
for (IRepositoryNode repositoryNode : repositoryList) {
try {
deleteRepositoryNode(repositoryNode, factory);
} catch (Exception e) {
bex = e;
ExceptionHandler.process(e);
success = false;
}
}
if (bex != null) {
final Shell shell = getShell();
MessageDialog.openWarning(shell, Messages.getString("DeleteAction.warning.title"),
Messages.getString("DeleteAction.warning.message1"));
}
if (!success) {
return;
}
@@ -574,17 +593,20 @@ public class DeleteAction extends AContextualAction {
} else {
IRepositoryViewObject objToDelete = repositoryNode.getObject();
// TDI-22550
IDesignerCoreService coreService = (IDesignerCoreService) GlobalServiceRegister.getDefault().getService(
IDesignerCoreService.class);
if (coreService != null && objToDelete != null && objToDelete.getProperty() != null) {
Item item = objToDelete.getProperty().getItem();
IProcess iProcess = coreService.getProcessFromItem(item);
if (iProcess != null && iProcess instanceof IProcess2) {
IProcess2 process = (IProcess2) iProcess;
process.removeProblems4ProcessDeleted();
if (GlobalServiceRegister.getDefault().isServiceRegistered(IDesignerCoreService.class)) {
IDesignerCoreService coreService = (IDesignerCoreService) GlobalServiceRegister.getDefault().getService(
IDesignerCoreService.class);
if (coreService != null && objToDelete != null && objToDelete.getProperty() != null) {
Item item = objToDelete.getProperty().getItem();
IProcess iProcess = coreService.getProcessFromItem(item);
if (iProcess != null && iProcess instanceof IProcess2) {
IProcess2 process = (IProcess2) iProcess;
process.removeProblems4ProcessDeleted();
}
}
}
factory.deleteObjectLogical(objToDelete);
removeConnFromSQLExplorer(repositoryNode);
}
}
@@ -600,6 +622,7 @@ public class DeleteAction extends AContextualAction {
final List<IEditorReference> list = new ArrayList<IEditorReference>();
Display.getDefault().syncExec(new Runnable() {
@Override
public void run() {
IEditorReference[] reference = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
.getEditorReferences();
@@ -700,10 +723,20 @@ public class DeleteAction extends AContextualAction {
for (Project refP : refParentProjects) {
List<IRepositoryViewObject> objList = new ArrayList<IRepositoryViewObject>();
List<IRepositoryViewObject> processes = factory.getAll(refP, ERepositoryObjectType.PROCESS);
List<IRepositoryViewObject> allJobVersions = new ArrayList<IRepositoryViewObject>();
// Added by Marvin Wang on Sep.14, 2012 for bug TDI-21878. It assumes that for a job the low
// version maybe use the Context Group, but the latest version does not use it. So it has to to
// check all job versions.
if (processes != null && processes.size() > 0) {
for (IRepositoryViewObject process : processes) {
allJobVersions.addAll(factory.getAllVersion(process.getId()));
}
}
List<IRepositoryViewObject> jobletes = factory.getAll(refP, ERepositoryObjectType.JOBLET);
processes.addAll(jobletes);
deleteActionCache.setProcessList(processes);
objList.addAll(processes);
allJobVersions.addAll(jobletes);
deleteActionCache.setProcessList(allJobVersions);
objList.addAll(allJobVersions);
List<IRepositoryViewObject> connectionc = factory
.getAll(refP, ERepositoryObjectType.METADATA_CONNECTIONS);
@@ -751,34 +784,67 @@ public class DeleteAction extends AContextualAction {
}
List<IContext> contextList = null;
String contextID = null;
if (!isOpenedItem(item2, deleteActionCache.getOpenProcessMap())) {
IDesignerCoreService service = (IDesignerCoreService) GlobalServiceRegister.getDefault()
.getService(IDesignerCoreService.class);
// if (!isOpenedItem(item2, deleteActionCache.getOpenProcessMap())) {
// The following logic is added by Marvin Wang on Sep. 14, 2012 for bug TDI-21878.
// The reason to check if the above "process" is opened is the give "process" may be
// changed, that means user may do some operation on the process and not save. So I need to
// get the changed process in order to get the correct context list.
List<IProcess2> openedProcesses = RepositoryManagerHelper.getOpenedProcess();
boolean isOpenedProcess = false;
if (openedProcesses != null && openedProcesses.size() > 0) {
for (IProcess2 tempPro : openedProcesses) {
if (process.getId().equals(tempPro.getId())) {
isOpenedProcess = true;
contextList = tempPro.getContextManager().getListContext();
break;
}
}
}
IDesignerCoreService service = (IDesignerCoreService) GlobalServiceRegister.getDefault().getService(
IDesignerCoreService.class);
// Commented by Marvin Wang on Sep.14, 2012.
// If the given "process" is not opened, it indicates there are no changes(no dirty) on job.
// So we can use IDesignerCoreService.getProcessFromProcessItem(Item) to get IProcess by
// loading file. That is why it can not use the method to get IProcess directly without
// checking if "process" is opened.
if (!isOpenedProcess) {
if (item2 instanceof ProcessItem) {
contextList = service.getProcessFromProcessItem((ProcessItem) item2).getContextManager()
.getListContext();
} else if (item2 instanceof JobletProcessItem) {
contextList = service.getProcessFromJobletProcessItem((JobletProcessItem) item2)
.getContextManager().getListContext();
} else if (item2 instanceof ConnectionItem) {
contextID = ((ConnectionItem) item2).getConnection().getContextId();
}
}
if (item2 instanceof JobletProcessItem) {
contextList = service.getProcessFromJobletProcessItem((JobletProcessItem) item2)
.getContextManager().getListContext();
} else if (item2 instanceof ConnectionItem) {
contextID = ((ConnectionItem) item2).getConnection().getContextId();
}
if (contextList != null) {
// isExtensionComponent(node);
for (IContext context : contextList) {
if (context.getContextParameterList().size() <= 0) {
continue;
}
String source = context.getContextParameterList().get(0).getSource();
if (source.equals(item.getProperty().getId())) {
String path = item2.getState().getPath();
String type = process.getRepositoryObjectType().getType();
ContextReferenceBean bean = new ContextReferenceBean(property2.getLabel(), type,
property2.getVersion(), path, refP.getLabel());
bean.setJobFlag(isJob, isDelete);
list.add(bean);
break;
// Added by Marvin Wang on Sep.14, 2012 for bug TDI-21878. It just needs to check the
// first IContext, normally it is named "default". In order to add the different version
// jobs to ContextReferenceBean, below uses
// "RepositoryReferenceBeanUtils.hasReferenceBean" to filter the repeat object.
List<IContextParameter> contextParams = contextList.get(0).getContextParameterList();
if (contextParams != null && contextParams.size() > 0) {
for (IContextParameter contextParameter : contextParams) {
if (contextParameter.isBuiltIn()) {
continue;
}
String contextId = item.getProperty().getId();
String sourceId = contextParameter.getSource();
if (contextId != null && contextId.equals(sourceId)) {
String processName = process.getLabel();
String processVersion = process.getVersion();
if (!RepositoryReferenceBeanUtils.hasReferenceBean(list, processName, processVersion)) {
String path = item2.getState().getPath();
String type = process.getRepositoryObjectType().getType();
ContextReferenceBean bean = new ContextReferenceBean(property2.getLabel(), type,
property2.getVersion(), path, refP.getLabel());
bean.setJobFlag(isJob, isDelete);
list.add(bean);
}
}
}
}
} else if (contextID != null) {
@@ -807,11 +873,18 @@ public class DeleteAction extends AContextualAction {
Item item2 = property2.getItem();
String path = item2.getState().getPath();
ContextReferenceBean bean = new ContextReferenceBean(property2.getLabel(), openedProcess
.getRepositoryObjectType().getType(), property2.getVersion(), path, refP.getLabel());
bean.setJobFlag(isJob, isDelete);
list.add(bean);
break;
String processName = openedProcess.getLabel();
String processVersion = openedProcess.getVersion();
// Added by Marvin Wang on Sep. 24, 2012 for bug TDI-21878 to filter the bean that
// has been added in the list.
if (!RepositoryReferenceBeanUtils.hasReferenceBean(list, processName, processVersion)) {
ContextReferenceBean bean = new ContextReferenceBean(property2.getLabel(), openedProcess
.getRepositoryObjectType().getType(), property2.getVersion(), path,
refP.getLabel());
bean.setJobFlag(isJob, isDelete);
list.add(bean);
break;
}
}
}
}
@@ -984,13 +1057,14 @@ public class DeleteAction extends AContextualAction {
&& nodeObject.getProperty().getItem() != null
&& (nodeObject.getRepositoryStatus() == ERepositoryStatus.LOCK_BY_OTHER
|| nodeObject.getRepositoryStatus() == ERepositoryStatus.LOCK_BY_USER || RepositoryManager
.isOpenedItemInEditor(nodeObject)) && !(DELETE_FOREVER_TITLE.equals(getText()))) {
.isOpenedItemInEditor(nodeObject)) && !(DELETE_FOREVER_TITLE.equals(getText()))) {
final String title = Messages.getString("DeleteAction.error.title"); //$NON-NLS-1$
String nodeName = ERepositoryObjectType.getDeleteFolderName(nodeObject.getRepositoryObjectType());
final String message = Messages.getString("DeleteAction.error.lockedOrOpenedObject.newMessage", nodeName);//$NON-NLS-1$
Display.getDefault().syncExec(new Runnable() {
@Override
public void run() {
MessageDialog dialog = new MessageDialog(new Shell(), title, null, message, MessageDialog.ERROR,
new String[] { IDialogConstants.OK_LABEL }, 0);
@@ -1048,38 +1122,43 @@ public class DeleteAction extends AContextualAction {
private boolean deleteElements(IProxyRepositoryFactory factory, DeleteActionCache deleteActionCache,
final RepositoryNode currentJobNode, Boolean confirm) throws PersistenceException, BusinessException {
boolean needReturn = false;
final boolean[] enableDeleting = new boolean[1];
enableDeleting[0] = true;
final IRepositoryViewObject objToDelete = currentJobNode.getObject();
final List<ContextReferenceBean> checkContext = checkContextFromProcess(factory, deleteActionCache, currentJobNode);
if (checkContext.size() > 0) {
Display.getDefault().syncExec(new Runnable() {
@Override
public void run() {
ContextReferenceDialog dialog = new ContextReferenceDialog(PlatformUI.getWorkbench()
.getActiveWorkbenchWindow().getShell(), objToDelete, checkContext);
dialog.open();
int returnCode = dialog.open();
switch (returnCode) {
case Window.OK:
enableDeleting[0] = true;
break;
case Window.CANCEL:
enableDeleting[0] = false;
break;
}
}
});
}
if (!enableDeleting[0]) {
return true;
}
Item item = null;
if (objToDelete != null && objToDelete.getProperty() != null) {
item = objToDelete.getProperty().getItem();
}
AbstractResourceChangesService resChangeService = TDQServiceRegister.getInstance().getResourceChangeService(
AbstractResourceChangesService.class);
if (resChangeService != null && item != null && item instanceof ConnectionItem && item.getState().isDeleted()) {
if (!resChangeService.handleResourceChange(((ConnectionItem) item).getConnection())) {
return true;
}
}
// To manage case of we have a subitem. This is possible using 'DEL' shortcut:
ERepositoryObjectType nodeType = (ERepositoryObjectType) currentJobNode.getProperties(EProperties.CONTENT_TYPE);
if (nodeType != null && nodeType.isSubItem()) {
Display.getDefault().syncExec(new Runnable() {
@Override
public void run() {
final DeleteTableAction deleteTableAction = new DeleteTableAction();
deleteTableAction.setWorkbenchPart(getWorkbenchPart());
@@ -1089,9 +1168,17 @@ public class DeleteAction extends AContextualAction {
needReturn = true;
} else {
if (factory.getStatus(objToDelete) == ERepositoryStatus.DELETED) {
if (resChangeService != null) {
List<IRepositoryNode> dependentNodes = resChangeService.getDependentNodes(currentJobNode);
if (dependentNodes != null && !dependentNodes.isEmpty()) {
resChangeService.openDependcesDialog(dependentNodes);
return true;
}
}
if (confirm == null) {
Display.getDefault().syncExec(new Runnable() {
@Override
public void run() {
String title = Messages.getString("DeleteAction.dialog.title"); //$NON-NLS-1$
@@ -1139,15 +1226,11 @@ public class DeleteAction extends AContextualAction {
} else {
// MOD qiongli 2011-5-10,bug 21189.should remove dependency after showing the question dialog of
// physical delete.
if (resChangeService != null && (item instanceof TDQItem || item instanceof ConnectionItem)) {
resChangeService.removeAllDependecies(item);
}
// MOD qiongli 2012-3-30 remove SQL Explore only when it is confirmed to delete.
if (item instanceof ConnectionItem
&& GlobalServiceRegister.getDefault().isServiceRegistered(ITDQRepositoryService.class)) {
ITDQRepositoryService tdqRepService = (ITDQRepositoryService) GlobalServiceRegister.getDefault()
.getService(ITDQRepositoryService.class);
tdqRepService.removeAliasInSQLExplorer(currentJobNode);
if (resChangeService != null && objToDelete != null && objToDelete.getProperty() != null) {
Item item = objToDelete.getProperty().getItem();
if (item != null) {
resChangeService.removeAllDependecies(item);
}
}
factory.deleteObjectPhysical(objToDelete);
ExpressionPersistance.getInstance().jobDeleted(objToDelete.getLabel());
@@ -1155,18 +1238,65 @@ public class DeleteAction extends AContextualAction {
}
} else {
factory.deleteObjectLogical(objToDelete);
updateRelatedViews();
removeConnFromSQLExplorer(currentJobNode);
}
}
return needReturn;
}
/**
*
* Added by Marvin Wang on Sep 14, 2012.
*/
private void updateRelatedViews() {
Display.getDefault().syncExec(new Runnable() {
@Override
public void run() {
IDesignerCoreService designerCoreService = CoreRuntimePlugin.getInstance().getDesignerCoreService();
if (designerCoreService != null) {
designerCoreService.switchToCurContextsView();
// for tRunJob component
designerCoreService.switchToCurComponentSettingsView();
// for 2608
designerCoreService.switchToCurJobSettingsView();
}
}
});
}
/* *
* Remove the dbconnection in sql explorer after logical delete.
*
* @param node
*/
private void removeConnFromSQLExplorer(IRepositoryNode node) {
IRepositoryViewObject object = node.getObject();
Property prop = null;
if (object != null) {
prop = object.getProperty();
}
if (prop == null || prop.getItem() == null || !(prop.getItem() instanceof DatabaseConnectionItem)) {
return;
}
if (GlobalServiceRegister.getDefault().isServiceRegistered(ITDQRepositoryService.class)) {
ITDQRepositoryService tdqRepService = (ITDQRepositoryService) GlobalServiceRegister.getDefault().getService(
ITDQRepositoryService.class);
if (tdqRepService != null) {
tdqRepService.removeAliasInSQLExplorer(node);
}
}
}
/*
* (non-Javadoc)
*
* @see org.talend.repository.ui.actions.ITreeContextualAction#init(org.eclipse.jface.viewers.TreeViewer,
* org.eclipse.jface.viewers.IStructuredSelection)
*/
@Override
public void init(TreeViewer viewer, IStructuredSelection selection) {
visible = !selection.isEmpty();
if (selection.isEmpty()) {
@@ -1254,6 +1384,12 @@ public class DeleteAction extends AContextualAction {
break;
}
if (contentType == ERepositoryObjectType.METADATA_CON_TABLE) {
enabled = false;
visible = false;
break;
}
IRepositoryViewObject repObj = node.getObject();
ERepositoryStatus status = repObj.getRepositoryStatus();
@@ -1267,11 +1403,6 @@ public class DeleteAction extends AContextualAction {
}
if (isDeleted) {
if (ERepositoryObjectType.METADATA_CON_TABLE.equals(nodeType)) {
visible = false;
break;
}
if (ERepositoryObjectType.METADATA_CON_COLUMN.equals(nodeType)) {
visible = false;
break;

View File

@@ -52,6 +52,7 @@ import org.talend.core.repository.utils.TDQServiceRegister;
import org.talend.cwm.helper.SubItemHelper;
import org.talend.repository.model.ERepositoryStatus;
import org.talend.repository.model.IProxyRepositoryFactory;
import org.talend.repository.model.IRepositoryNode;
import org.talend.repository.model.IRepositoryNode.ENodeType;
import org.talend.repository.model.IRepositoryNode.EProperties;
import org.talend.repository.model.RepositoryConstants;
@@ -128,7 +129,11 @@ public class DeleteTableAction extends AContextualAction {
AbstractResourceChangesService resChangeService = TDQServiceRegister.getInstance()
.getResourceChangeService(AbstractResourceChangesService.class);
if (resChangeService != null) {
isSave = resChangeService.handleResourceChange(((ConnectionItem) item).getConnection());
List<IRepositoryNode> dependentNodes = resChangeService.getDependentNodes(node);
if (dependentNodes != null && !dependentNodes.isEmpty()) {
resChangeService.openDependcesDialog(dependentNodes);
isSave = false;
}
}
}
if (isSave) {
@@ -180,6 +185,7 @@ public class DeleteTableAction extends AContextualAction {
}
Display.getCurrent().syncExec(new Runnable() {
@Override
public void run() {
RepositoryManager.refreshDeletedNode(types);
}
@@ -205,6 +211,7 @@ public class DeleteTableAction extends AContextualAction {
* @see org.talend.repository.ui.actions.ITreeContextualAction#init(org.eclipse.jface.viewers.TreeViewer,
* org.eclipse.jface.viewers.IStructuredSelection)
*/
@Override
public void init(TreeViewer viewer, IStructuredSelection selection) {
boolean canWork = false;
setText(null);

View File

@@ -49,8 +49,11 @@ import org.talend.commons.ui.runtime.exception.ExceptionHandler;
import org.talend.commons.ui.runtime.image.EImage;
import org.talend.commons.ui.runtime.image.ImageProvider;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.ITDQRepositoryService;
import org.talend.core.model.general.Project;
import org.talend.core.model.metadata.builder.connection.Connection;
import org.talend.core.model.properties.ConnectionItem;
import org.talend.core.model.properties.DatabaseConnectionItem;
import org.talend.core.model.properties.Item;
import org.talend.core.model.properties.ProcessItem;
import org.talend.core.model.properties.PropertiesFactory;
@@ -453,7 +456,18 @@ public class DuplicateAction extends AContextualAction {
if (copy instanceof ProcessItem) {
RelationshipItemBuilder.getInstance().addOrUpdateItem(copy);
}
// MOD qiongli 2012-10-16 TDQ-6166 notify sqlExplore when duplicate a new
// connection
if (copy instanceof DatabaseConnectionItem) {
Connection connection = ((DatabaseConnectionItem) copy).getConnection();
if (connection != null) {
connection.getSupplierDependency().clear();
connection.setLabel(newJobName);
connection.setName(newJobName);
}
}
factory.save(copy);
notifySQLExplorer(copy);
}
} catch (PersistenceException e) {
throw new CoreException(new Status(IStatus.ERROR, "org.talend.core.repository", "", e));
@@ -524,10 +538,16 @@ public class DuplicateAction extends AContextualAction {
}
if (newItem instanceof ConnectionItem) {
ConnectionItem connectionItem = (ConnectionItem) newItem;
connectionItem.getConnection().getSupplierDependency().clear();
Connection connection = ((ConnectionItem) newItem).getConnection();
if (connection != null) {
connection.setLabel(newName);
connection.setName(newName);
connection.getSupplierDependency().clear();
}
}
factory.save(newItem);
// MOD qiongli 2012-10-16 TDQ-6166 notify sqlExplore when duplicate a new connection
notifySQLExplorer(newItem);
} catch (PersistenceException e) {
throw new CoreException(new Status(IStatus.ERROR, "org.talend.core.repository", "", e));
} catch (BusinessException e) {
@@ -618,4 +638,15 @@ public class DuplicateAction extends AContextualAction {
protected boolean resetProcessVersion() {
return false;
}
private void notifySQLExplorer(Item item) {
if (item instanceof DatabaseConnectionItem
&& GlobalServiceRegister.getDefault().isServiceRegistered(ITDQRepositoryService.class)) {
ITDQRepositoryService tdqRepService = (ITDQRepositoryService) GlobalServiceRegister.getDefault().getService(
ITDQRepositoryService.class);
if (tdqRepService != null) {
tdqRepService.notifySQLExplorer(item);
}
}
}
}

View File

@@ -48,7 +48,9 @@ import org.talend.core.model.repository.RepositoryManager;
import org.talend.core.repository.i18n.Messages;
import org.talend.core.repository.model.ISubRepositoryObject;
import org.talend.core.repository.model.ProxyRepositoryFactory;
import org.talend.core.repository.utils.AbstractResourceChangesService;
import org.talend.core.repository.utils.RepositoryNodeDeleteManager;
import org.talend.core.repository.utils.TDQServiceRegister;
import org.talend.designer.business.diagram.custom.IDiagramModelService;
import org.talend.repository.ProjectManager;
import org.talend.repository.model.ERepositoryStatus;
@@ -86,9 +88,21 @@ public class EmptyRecycleBinAction extends AContextualAction {
// TDI-20542
List<IRepositoryNode> originalChildren = node.getChildren();
final List<IRepositoryNode> children = new ArrayList<IRepositoryNode>(originalChildren);
// MOD qiongli 2012-12-12 TUP-273 if a connection in recycle bin which depended by DQ analysis,should give a
// warning then return.
if (children.size() == 0) {
return;
} else if (children.size() > 1) {
}
AbstractResourceChangesService resChangeService = TDQServiceRegister.getInstance().getResourceChangeService(
AbstractResourceChangesService.class);
if (resChangeService != null) {
List<IRepositoryNode> dependentNodes = resChangeService.getDependentConnNodesInRecycleBin(children);
if (dependentNodes != null && !dependentNodes.isEmpty()) {
resChangeService.openDependcesDialog(dependentNodes);
return;
}
}
if (children.size() > 1) {
message = Messages.getString("DeleteAction.dialog.messageAllElements") + "\n" + //$NON-NLS-1$ //$NON-NLS-2$
Messages.getString("DeleteAction.dialog.message2"); //$NON-NLS-1$;
} else {

View File

@@ -94,12 +94,13 @@ public class PasteAction extends AContextualAction {
}
}
@Override
public void init(TreeViewer viewer, IStructuredSelection selection) {
boolean enabled = true;
if (selection.size() != 1) { // only one current node selected
setEnabled(false);
return;
}
// if (selection.size() != 1) { // only one current node selected
// setEnabled(false);
// return;
// }
Object targetObject = selection.getFirstElement();
if (!(targetObject instanceof RepositoryNode)) {

View File

@@ -0,0 +1,186 @@
// ============================================================================
//
// Copyright (C) 2006-2012 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.repository.ui.actions;
import java.util.ArrayList;
import java.util.List;
import org.apache.log4j.Level;
import org.eclipse.core.runtime.IPath;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorReference;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PartInitException;
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
import org.talend.commons.ui.runtime.image.ECoreImage;
import org.talend.commons.ui.runtime.image.ImageProvider;
import org.talend.core.model.repository.ERepositoryObjectType;
import org.talend.core.repository.i18n.Messages;
import org.talend.core.repository.model.ProxyRepositoryFactory;
import org.talend.repository.ProjectManager;
import org.talend.repository.editor.RepositoryEditorInput;
import org.talend.repository.model.IProxyRepositoryFactory;
import org.talend.repository.model.IRepositoryNode;
import org.talend.repository.model.IRepositoryNode.ENodeType;
import org.talend.repository.model.IRepositoryNode.EProperties;
import org.talend.repository.model.RepositoryConstants;
import org.talend.repository.model.RepositoryNode;
import org.talend.repository.model.RepositoryNodeUtilities;
import org.talend.repository.ui.actions.AContextualAction;
import org.talend.repository.ui.wizards.folder.FolderWizard;
/**
* Action used to create a new folder in repository.<br/>
*
* $Id: CreateFolderAction.java 1100 2006-12-19 14:27:01Z amaumont $
*
*/
public class RenameFolderAction extends AContextualAction {
public RenameFolderAction() {
super();
this.setText(Messages.getString("RenameFolderAction.action.title")); //$NON-NLS-1$
this.setToolTipText(Messages.getString("RenameFolderAction.action.toolTipText")); //$NON-NLS-1$
this.setImageDescriptor(ImageProvider.getImageDesc(ECoreImage.FOLDER_CLOSE_ICON));
}
/*
* (non-Javadoc)
*
* @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
*/
@Override
protected void doRun() {
ISelection selection = getSelection();
Object obj = ((IStructuredSelection) selection).getFirstElement();
if (obj == null) {
MessageDialog.openWarning(new Shell(), Messages.getString("RenameFolderAction.warning.cannotFind.title"), Messages //$NON-NLS-1$
.getString("RenameFolderAction.warning.cannotFind.message")); //$NON-NLS-1$
return;
}
RepositoryNode node = (RepositoryNode) obj;
// Check if some jobs in the folder are currently opened:
String firstChildOpen = getFirstOpenedChild(node);
if (firstChildOpen != null) {
MessageDialog.openWarning(new Shell(), Messages.getString("RenameFolderAction.warning.editorOpen.title"), Messages //$NON-NLS-1$
.getString("RenameFolderAction.warning.editorOpen.message", firstChildOpen, node //$NON-NLS-1$
.getProperties(EProperties.LABEL)));
return;
}
ERepositoryObjectType objectType = null;
IPath path = null;
path = RepositoryNodeUtilities.getPath(node);
objectType = (ERepositoryObjectType) node.getProperties(EProperties.CONTENT_TYPE);
openFolderWizard(node, objectType, path);
}
protected void openFolderWizard(RepositoryNode node, ERepositoryObjectType objectType, IPath path) {
if (objectType != null) {
FolderWizard processWizard = new FolderWizard(path, objectType, node.getObject().getLabel());
Shell activeShell = Display.getCurrent().getActiveShell();
WizardDialog dialog = new WizardDialog(activeShell, processWizard);
dialog.setPageSize(400, 60);
dialog.create();
dialog.open();
}
}
/*
* (non-Javadoc)
*
* @see org.talend.repository.ui.actions.ITreeContextualAction#init(org.eclipse.jface.viewers.TreeViewer,
* org.eclipse.jface.viewers.IStructuredSelection)
*/
@Override
public void init(TreeViewer viewer, IStructuredSelection selection) {
boolean canWork = !selection.isEmpty() && selection.size() == 1;
IProxyRepositoryFactory factory = ProxyRepositoryFactory.getInstance();
if (factory.isUserReadOnlyOnCurrentProject()) {
canWork = false;
}
if (canWork) {
Object o = selection.getFirstElement();
RepositoryNode node = (RepositoryNode) o;
Object obj = node.getProperties(EProperties.LABEL);
switch (node.getType()) {
case SIMPLE_FOLDER:
String label = null;
if (obj instanceof String) {
label = (String) obj;
}
if (node.getContentType() == ERepositoryObjectType.JOB_DOC
|| node.getContentType() == ERepositoryObjectType.JOBLET_DOC
|| (node.getContentType() == ERepositoryObjectType.SQLPATTERNS && !isUnderUserDefined(node))
|| RepositoryConstants.USER_DEFINED.equals(label)) {
canWork = false;
}
if (node.getObject() != null && node.getObject().getProperty().getItem().getState().isDeleted()) {
canWork = false;
}
break;
default:
canWork = false;
}
if (canWork && !ProjectManager.getInstance().isInCurrentMainProject(node)) {
canWork = false;
}
}
setEnabled(canWork);
}
protected String getFirstOpenedChild(IRepositoryNode node) {
if (node.hasChildren()) {
IWorkbenchPage page = getActivePage();
IEditorReference[] editorReferences = page.getEditorReferences();
List<String> openEditor = new ArrayList<String>();
for (IEditorReference tmp : editorReferences) {
try {
IEditorInput editorInput = tmp.getEditorInput();
if (editorInput instanceof RepositoryEditorInput) {
RepositoryEditorInput rei = (RepositoryEditorInput) editorInput;
openEditor.add(rei.getItem().getProperty().getId());
}
} catch (PartInitException e) {
ExceptionHandler.process(e, Level.WARN);
}
}
List<IRepositoryNode> children = node.getChildren();
for (IRepositoryNode currentNode : children) {
if (currentNode.getType() == ENodeType.REPOSITORY_ELEMENT) {
if (openEditor.contains(currentNode.getObject().getId())) {
return currentNode.getObject().getLabel();
}
} else if (currentNode.getType() == ENodeType.SIMPLE_FOLDER) {
String childOpen = getFirstOpenedChild(currentNode);
if (childOpen != null) {
return childOpen;
}
}
}
}
return null;
}
}

View File

@@ -38,8 +38,10 @@ import org.talend.commons.ui.runtime.image.EImage;
import org.talend.commons.ui.runtime.image.ImageProvider;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.ICoreService;
import org.talend.core.ITDQRepositoryService;
import org.talend.core.model.metadata.builder.connection.AbstractMetadataObject;
import org.talend.core.model.properties.ConnectionItem;
import org.talend.core.model.properties.DatabaseConnectionItem;
import org.talend.core.model.properties.FolderItem;
import org.talend.core.model.properties.Item;
import org.talend.core.model.repository.ERepositoryObjectType;
@@ -106,11 +108,22 @@ public class RestoreAction extends AContextualAction {
// IPath path = restoreFolder.restoreFolderIfNotExists(nodeType, node);
String oldPath = node.getObject().getProperty().getItem().getState().getPath();
IPath path = new Path(oldPath);
if (node.getObject().getProperty().getItem() instanceof FolderItem) {
node.getObject().getProperty().getItem().getState().setDeleted(false);
} else {
Item item = node.getObject().getProperty().getItem();
if (item instanceof FolderItem) {
item.getState().setDeleted(false);
} else {
RestoreObjectAction restoreObjectAction = RestoreObjectAction.getInstance();
restoreObjectAction.execute(node, null, path);
// MOD qiongli 2012-10-16 TDQ-6166 notify sql exploere when restore a connection.
if (item instanceof DatabaseConnectionItem) {
if (GlobalServiceRegister.getDefault().isServiceRegistered(ITDQRepositoryService.class)) {
ITDQRepositoryService tdqRepService = (ITDQRepositoryService) GlobalServiceRegister.getDefault()
.getService(ITDQRepositoryService.class);
if (tdqRepService != null) {
tdqRepService.notifySQLExplorer(item);
}
}
}
}
ProxyRepositoryFactory factory = ProxyRepositoryFactory.getInstance();

View File

@@ -51,6 +51,7 @@ public class ContextReferenceDialog extends SelectionDialog {
*/
class ContextsProvide extends LabelProvider implements ITableLabelProvider {
@Override
public Image getColumnImage(Object element, int columnIndex) {
if (columnIndex == 0) {
if (element instanceof ContextReferenceBean) {
@@ -82,6 +83,7 @@ public class ContextReferenceDialog extends SelectionDialog {
return null;
}
@Override
public String getColumnText(Object element, int columnIndex) {
ContextReferenceBean bean = (ContextReferenceBean) element;
switch (columnIndex) {
@@ -121,7 +123,7 @@ public class ContextReferenceDialog extends SelectionDialog {
Item item = objToDelete.getProperty().getItem();
if (item != null) {
setMessage(Messages.getString(
"ContextReferenceDialog.Messages", item.getProperty().getLabel(), item.getProperty().getVersion())); //$NON-NLS-1$
"ContextReferenceDialog.kindMessages1", item.getProperty().getLabel(), item.getProperty().getVersion())); //$NON-NLS-1$
}
}
setHelpAvailable(false);
@@ -136,10 +138,11 @@ public class ContextReferenceDialog extends SelectionDialog {
@Override
protected void createButtonsForButtonBar(Composite parent) {
createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, false);
createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, true);
}
@SuppressWarnings("unchecked")//$NON-NLS-1$
@SuppressWarnings("unchecked")
@Override
protected Control createDialogArea(Composite parent) {
Composite composite = (Composite) super.createDialogArea(parent);
@@ -153,16 +156,19 @@ public class ContextReferenceDialog extends SelectionDialog {
viewer.setLabelProvider(new ContextsProvide());
viewer.setContentProvider(new IStructuredContentProvider() {
@Override
public void dispose() {
//
}
@Override
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
//
}
@Override
public Object[] getElements(Object inputElement) {
if (inputElement != null) {
return ((List) inputElement).toArray();

View File

@@ -38,7 +38,6 @@ import org.talend.commons.exception.PersistenceException;
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.model.business.BusinessType;
import org.talend.core.model.properties.ConnectionItem;
import org.talend.core.model.properties.Item;
import org.talend.core.model.properties.Property;
import org.talend.core.model.properties.RoutineItem;
@@ -96,8 +95,9 @@ public class RepositoryDropAdapter extends PluginDropAdapter {
case DND.DROP_COPY:
RunnableWithReturnValue runnable = new CopyRunnable(
Messages.getString("RepositoryDropAdapter_copyingItems"), data, targetNode); //$NON-NLS-1$
runInProgressDialog(runnable);
toReturn = (Boolean) runnable.getReturnValue();
// runInProgressDialog(runnable);
// toReturn = (Boolean) runnable.getReturnValue();
runCopy(data, targetNode);
break;
case DND.DROP_MOVE:
runnable = new MoveRunnable(Messages.getString("RepositoryDropAdapter_movingItems"), data, targetNode); //$NON-NLS-1$
@@ -149,10 +149,10 @@ public class RepositoryDropAdapter extends PluginDropAdapter {
// iRepositoryNode.getObject().getProperty().getItem().eResource().unload();
Item item = repositoryNode.getObject() == null ? null : repositoryNode.getObject().getProperty().getItem();
if (resourceChangeService != null && null != item) {
boolean handleResourceChange = resourceChangeService.handleResourceChange(((ConnectionItem) item)
.getConnection());
if (!handleResourceChange) {
return handleResourceChange;
List<IRepositoryNode> dependentNodes = resourceChangeService.getDependentNodes(repositoryNode);
if (dependentNodes != null && !dependentNodes.isEmpty()) {
resourceChangeService.openDependcesDialog(dependentNodes);
return false;
}
}
}
@@ -167,8 +167,9 @@ public class RepositoryDropAdapter extends PluginDropAdapter {
*/
@Override
public boolean validateDrop(Object target, int operation, TransferData transferType) {
if (target == null)
if (target == null) {
return false;
}
super.validateDrop(target, operation, transferType);
boolean isValid = true;
for (Object obj : ((StructuredSelection) getViewer().getSelection()).toArray()) {
@@ -229,9 +230,29 @@ public class RepositoryDropAdapter extends PluginDropAdapter {
return isValid;
}
private void runCopy(final Object data, final RepositoryNode targetNode) {
String copyName = "User action : Copy Object"; //$NON-NLS-1$
RepositoryWorkUnit<Object> repositoryWorkUnit = new RepositoryWorkUnit<Object>(copyName, CopyObjectAction.getInstance()) {
@Override
protected void run() throws LoginException, PersistenceException {
try {
for (Object obj : ((StructuredSelection) data).toArray()) {
final RepositoryNode sourceNode = (RepositoryNode) obj;
CopyObjectAction.getInstance().execute(sourceNode, targetNode);
}
} catch (Exception e) {
throw new PersistenceException(e);
}
}
};
ProxyRepositoryFactory.getInstance().executeRepositoryWorkUnit(repositoryWorkUnit);
}
private void runInProgressDialog(final IWorkspaceRunnable op) {
final IRunnableWithProgress iRunnableWithProgress = new IRunnableWithProgress() {
@Override
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
IWorkspace workspace = ResourcesPlugin.getWorkspace();
try {
@@ -279,6 +300,7 @@ public class RepositoryDropAdapter extends PluginDropAdapter {
this.targetNode = targetNode;
}
@Override
public void run(IProgressMonitor monitor) throws CoreException {
monitor.beginTask(getTaskName(), IProgressMonitor.UNKNOWN);
String copyName = "User action : Copy Object"; //$NON-NLS-1$
@@ -319,6 +341,7 @@ public class RepositoryDropAdapter extends PluginDropAdapter {
this.targetNode = targetNode;
}
@Override
public void run(final IProgressMonitor monitor) throws CoreException {
monitor.beginTask(getTaskName(), IProgressMonitor.UNKNOWN);
// MOD gdbu 2011-10-9 TDQ-3545
@@ -340,7 +363,7 @@ public class RepositoryDropAdapter extends PluginDropAdapter {
}
MessageDialog.openInformation(getViewer().getControl().getShell(),
Messages.getString("RepositoryDropAdapter_moveTitle"), //$NON-NLS-1$
errorMsg); //$NON-NLS-1$
errorMsg);
setReturnValue(false);
return;
}
@@ -371,6 +394,7 @@ public class RepositoryDropAdapter extends PluginDropAdapter {
protected void run() throws LoginException, PersistenceException {
final IWorkspaceRunnable op = new IWorkspaceRunnable() {
@Override
public void run(IProgressMonitor monitor) throws CoreException {
try {
for (Object obj : ((StructuredSelection) data).toArray()) {

View File

@@ -0,0 +1,168 @@
// ============================================================================
//
// Copyright (C) 2006-2012 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.repository.ui.wizards.folder;
import java.lang.reflect.InvocationTargetException;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.IWorkspaceRunnable;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.ISchedulingRule;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.wizard.Wizard;
import org.osgi.framework.FrameworkUtil;
import org.talend.commons.exception.PersistenceException;
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
import org.talend.commons.ui.runtime.image.ECoreImage;
import org.talend.commons.ui.runtime.image.ImageProvider;
import org.talend.core.model.repository.ERepositoryObjectType;
import org.talend.core.repository.i18n.Messages;
import org.talend.core.repository.model.ProxyRepositoryFactory;
import org.talend.repository.model.IProxyRepositoryFactory;
/**
* Wizard for the creation of a new project. <br/>
*
* $Id$
*
*/
public class FolderWizard extends Wizard {
/** Main page. */
private FolderWizardPage mainPage;
private IPath path;
private ERepositoryObjectType type;
private final String defaultLabel;
/**
* Constructs a new NewProjectWizard.
*
* @param author Project author.
* @param server
* @param password
*/
public FolderWizard(IPath path, ERepositoryObjectType type, String defaultLabel) {
super();
this.path = path;
this.type = type;
this.defaultLabel = defaultLabel;
setDefaultPageImageDescriptor(ImageProvider.getImageDesc(ECoreImage.FOLDER_WIZ));
}
/**
* @see org.eclipse.jface.wizard.Wizard#addPages()
*/
@Override
public void addPages() {
mainPage = new FolderWizardPage(defaultLabel);
addPage(mainPage);
if (defaultLabel != null) {
setWindowTitle(Messages.getString("RenameFolderAction.action.title")); //$NON-NLS-1$
} else {
setWindowTitle(Messages.getString("NewFolderWizard.windowTitle")); //$NON-NLS-1$
}
}
/**
* @see org.eclipse.jface.wizard.Wizard#performFinish()
*/
@Override
public boolean performFinish() {
final String folderName = mainPage.getName();
final IProxyRepositoryFactory repositoryFactory = ProxyRepositoryFactory.getInstance();
if (defaultLabel == null) {
final IWorkspaceRunnable op = new IWorkspaceRunnable() {
@Override
public void run(IProgressMonitor monitor) throws CoreException {
try {
repositoryFactory.createFolder(type, path, folderName);
} catch (PersistenceException e) {
throw new CoreException(new Status(IStatus.ERROR, FrameworkUtil.getBundle(this.getClass())
.getSymbolicName(), "Error", e));
}
};
};
IRunnableWithProgress iRunnableWithProgress = new IRunnableWithProgress() {
@Override
public void run(final IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
IWorkspace workspace = ResourcesPlugin.getWorkspace();
try {
ISchedulingRule schedulingRule = workspace.getRoot();
// the update the project files need to be done in the workspace runnable to avoid all
// notification
// of changes before the end of the modifications.
workspace.run(op, schedulingRule, IWorkspace.AVOID_UPDATE, monitor);
} catch (CoreException e) {
throw new InvocationTargetException(e);
}
}
};
try {
new ProgressMonitorDialog(getShell()).run(true, true, iRunnableWithProgress);
return true;
} catch (InvocationTargetException e1) {
Throwable targetException = e1.getTargetException();
MessageDialog.openError(getShell(), Messages.getString("NewFolderWizard.failureTitle"), Messages //$NON-NLS-1$
.getString("NewFolderWizard.failureText")); //$NON-NLS-1$
ExceptionHandler.process(targetException);
} catch (InterruptedException e1) {
}
} else {
try {
repositoryFactory.renameFolder(type, path, folderName);
return true;
} catch (PersistenceException e) {
MessageDialog.openError(getShell(), Messages.getString("NewFolderWizard.failureTitle"), Messages //$NON-NLS-1$
.getString("NewFolderWizard.failureText")); //$NON-NLS-1$
ExceptionHandler.process(e);
}
}
return false;
}
public boolean isValid(String folderName) {
IProxyRepositoryFactory repositoryFactory = ProxyRepositoryFactory.getInstance();
try {
if (defaultLabel == null) {
return repositoryFactory.isPathValid(type, path, folderName);
} else {
return repositoryFactory.isPathValid(type, path.removeLastSegments(1), folderName);
}
} catch (PersistenceException e) {
ExceptionHandler.process(e);
return false;
}
}
@Override
public boolean canFinish() {
return super.canFinish() && !mainPage.getName().equals(defaultLabel);
}
}

View File

@@ -0,0 +1,161 @@
// ============================================================================
//
// Copyright (C) 2006-2012 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.repository.ui.wizards.folder;
import java.util.regex.Pattern;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.wizard.WizardPage;
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.Label;
import org.eclipse.swt.widgets.Text;
import org.talend.core.repository.CoreRepositoryPlugin;
import org.talend.core.repository.i18n.Messages;
import org.talend.repository.model.RepositoryConstants;
/**
* Page for new project details. <br/>
*
* $Id$
*
*/
public class FolderWizardPage extends WizardPage {
private static final String DESC = Messages.getString("NewFolderWizard.description"); //$NON-NLS-1$
private Text nameText;
private IStatus nameStatus;
private final String defaultLabel;
/**
* Constructs a new NewProjectWizardPage.
*
*/
public FolderWizardPage(String defaultLabel) {
super("WizardPage"); //$NON-NLS-1$
this.defaultLabel = defaultLabel;
setTitle(Messages.getString("NewFolderWizard.title")); //$NON-NLS-1$
if (defaultLabel == null) {
setDescription(DESC);
} else {
setDescription("");
}
nameStatus = createOkStatus();
}
/**
* @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
*/
@Override
public void createControl(Composite parent) {
Composite container = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout(2, false);
container.setLayout(layout);
// Name
Label nameLab = new Label(container, SWT.NONE);
nameLab.setText(Messages.getString("NewFolderWizard.label")); //$NON-NLS-1$
nameText = new Text(container, SWT.BORDER);
nameText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
setControl(container);
addListeners();
setPageComplete(false);
setDefaultValues();
}
private void setDefaultValues() {
if (defaultLabel != null) {
setName(defaultLabel);
}
}
private void addListeners() {
nameText.addModifyListener(new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
checkFieldsValue();
}
});
}
/**
* DOC ocarbone Comment method "checkField".
*/
protected void checkFieldsValue() {
// Field Name
if (nameText.getText().length() == 0) {
nameStatus = new Status(IStatus.ERROR, CoreRepositoryPlugin.PLUGIN_ID, IStatus.OK,
Messages.getString("NewFolderWizard.nameEmpty"), null); //$NON-NLS-1$
} else if (!Pattern.matches(RepositoryConstants.FOLDER_PATTERN, nameText.getText())) {
nameStatus = new Status(IStatus.ERROR, CoreRepositoryPlugin.PLUGIN_ID, IStatus.OK,
Messages.getString("NewFolderWizard.nameIncorrect"), null); //$NON-NLS-1$
} else if ((defaultLabel == null || !defaultLabel.equals(nameText.getText()))
&& !((FolderWizard) getWizard()).isValid(nameText.getText())) {
nameStatus = new Status(IStatus.ERROR, CoreRepositoryPlugin.PLUGIN_ID, IStatus.OK, Messages.getString(
"NewFolderWizard.nameInvalid", nameText.getText()), null); //$NON-NLS-1$
} else {
nameStatus = createOkStatus();
}
updatePageStatus();
}
private void updatePageStatus() {
setMessage(findMostSevere());
setPageComplete(findMostSevere().getSeverity() != IStatus.ERROR);
}
private IStatus findMostSevere() {
return nameStatus;
}
private void setMessage(IStatus status) {
String message2 = status.getMessage();
if (IStatus.ERROR == status.getSeverity()) {
setErrorMessage(message2);
setMessage(""); //$NON-NLS-1$
} else {
if (message2.length() == 0 && defaultLabel == null) {
message2 = DESC;
}
setMessage(message2);
setErrorMessage(null);
}
}
@Override
public String getName() {
return nameText.getText();
}
public void setName(String name) {
nameText.setText(name);
}
private static IStatus createOkStatus() {
return new Status(IStatus.OK, CoreRepositoryPlugin.PLUGIN_ID, IStatus.OK, "", null); //$NON-NLS-1$
}
}

View File

@@ -1,2 +1,3 @@
Metadata=Meta-Daten
TalendDataCollectorPreview=Vorschau
prefs=Talend

View File

@@ -0,0 +1 @@
prefs=Talend

View File

@@ -283,7 +283,10 @@ OpenXSDFileDialog.confirm=Best
repository.column=Spalte
repository.recyclebin=Papierkorb
repository.metadataColumn=Metadata Spalte
EComponentCategory.validationRules=Validierungsregeln
repository.metadataValidationRules=Validierungsregeln
RepositoryContentProvider.repositoryLabel.sapFunction=SAP Funktionen
repository.code=Code
TalendDataCollectorPreviewPreferencePage_Key=Schlüsselwert
repository.servicesPort=Port
BinRepositoryNode.label=Papierkorb

View File

@@ -526,3 +526,4 @@ RepositoryUpdateManager.MessagesForTDQ=Do you want to propagate the modification
EComponentCategory.executeJob=Execute Job
EComponentCategory.monitoring=Monitoring
BinRepositoryNode.label=Recycle bin
EMetadataEncoding.Latin9=Latin9

View File

@@ -453,3 +453,4 @@ RepositoryUpdateManager.MessagesForTDQ=Voulez-vous propager les modifications
EComponentCategory.executeJob=Exécuter le Job
EComponentCategory.monitoring=Monitoring
BinRepositoryNode.label=Corbeille
EMetadataEncoding.Latin9=Latin9

View File

@@ -482,3 +482,5 @@ TalendDataCollectorUploadingPreferencePage_UploadPeriod=\u30A2\u30C3\u30D7\u30ED
TalendDataCollectorUploadingPreferencePage_Days=\u65E5
repository.servicesOperation=\u64CD\u4F5C
repository.servicesPort=\u30DD\u30FC\u30C8
BinRepositoryNode.label=\u3054\u307F\u7BB1
EMetadataEncoding.Latin9=Latin9

View File

@@ -1,5 +1,39 @@
ComponentsFormatPreferencePage.add=Toevoegen
ComponentsFormatPreferencePage.ErrorTitle=Fout
ComponentToRepositoryProperty.error=Fout
ContextProcessSection.29=Fout
ContextProcessSection.49=Standaard Context
ContextProcessSection.6=Nieuwe Context
ContextProcessSection.7=Naam voor nieuwe Context
ContextProcessSection.errorTitle=Fout
ConextTableValuesComposite.nameLabel=Naam
ContextSetConfigurationDialog.nameNotValid=Ongeldige naam
ContextTemplateComposite.CommentLabel=Opmerking
ContextTemplateComposite.nameLabel=Naam
ContextTemplateComposite.sourceLabel=Bron
EComponentCategory_assignment=Toewijzing
EComponentCategory_properties=Eigenschappen
EComponentCategory_sqlTemplate=SQL Template
MetadataTableEditorView.CommentTitle=Opmerking
ProcessorUtilities.finalizeBuild=Bouwen afronden...
ProcessorUtilities.generatingJob=Job genereren
ProcessorUtilities.loadingJob=Job laden...
PropertiesWizardPage.Name=Naam
RoutinesFunctionProposal.User=Gebruiker
VariableItemEditor.name=Naam
VariableItemEditor.new=Nieuw
repository.concept=Concept
EUpdateItemType.Name=Naam
ApplicationActionBarAdvisor.menuFileLabel=&Bestand
ApplicationActionBarAdvisor.navigateLabel=&Navigeer
ApplicationActionBarAdvisor.gotoLabel=&Ga naar
ApplicationActionBarAdvisor.projectLabel=&Project
ApplicationActionBarAdvisor.menuWindowLabel=&Venster
ApplicationActionBarAdvisor.menuHelpLabel=&Help
BusinessAppearanceComposite.textAlignmentGroup=Tekst uitlijning
BusinessAppearanceComposite.textAlignment.horizontal=Horizontaal
BusinessAppearanceComposite.textAlignment.vertical=Verticaal
BusinessAppearanceComposite.textAlignment.horizontal.centre=Centreer
BusinessAppearanceComposite.textAlignment.vertical.centre=Centreer
ConnectionBean.Local=Lokaal
ConnectionBean.DefaultConnection=Standaard verbinding

View File

@@ -23,6 +23,7 @@
<dbType type="BINARY_DOUBLE" ignoreLen="true" ignorePre="true"/>
<dbType type="DATE" ignoreLen="true" ignorePre="true"/>
<dbType type="TIMESTAMP" defaultPrecision="6" ignoreLen="true" ignorePre="false"/>
<dbType type="TIMESTAMP WITH TIME ZONE" defaultLength="6" ignoreLen="true" ignorePre="true"/>
<dbType type="BLOB" ignoreLen="true" ignorePre="true" />
<dbType type="CLOB" ignoreLen="true" ignorePre="true" />
<dbType type="BFILE" ignoreLen="true" ignorePre="true"/>
@@ -53,6 +54,7 @@
<talendType type="id_Date">
<dbType type="DATE" default="true"/>
<dbType type="TIMESTAMP"/>
<dbType type="TIMESTAMP WITH TIME ZONE"/>
</talendType>
<talendType type="id_BigDecimal">
<dbType type="DEC" default="true"/>
@@ -163,6 +165,9 @@
<dbType type="TIMESTAMP">
<talendType type="id_Date" default="true" />
</dbType>
<dbType type="TIMESTAMP WITH TIME ZONE">
<talendType type="id_Date" default="true" />
</dbType>
<dbType type="BLOB">
<talendType type="id_Object" default="true" />
</dbType>

View File

@@ -8,8 +8,10 @@
<dbType type="BYTEINT" ignoreLen="true" ignorePre="true" />
<dbType type="BYTE" ignoreLen="true" ignorePre="true" />
<dbType type="CHAR" defaultLength="50" ignorePre="true"/>
<dbType type="CHARACTER" defaultLength="50" ignorePre="true"/>
<dbType type="CLOB" ignoreLen="true" ignorePre="true" />
<dbType type="DATE" ignoreLen="true" ignorePre="true" />
<dbType type="DEC" defaultLength="20" defaultPrecision="10"/>
<dbType type="DECIMAL" defaultLength="20" defaultPrecision="10"/>
<dbType type="FLOAT" ignorePre="true" />
<dbType type="I" ignoreLen="true" ignorePre="true" />
@@ -29,6 +31,10 @@
<dbType type="I2" ignoreLen="true" ignorePre="true" />
<dbType type="TS" ignoreLen="true" ignorePre="true" />
<dbType type="TZ" ignoreLen="true" ignorePre="true" />
<dbType type="LONG VARCHAR" ignoreLen="true" ignorePre="true" />
<dbType type="NUMERIC" defaultLength="20" defaultPrecision="10"/>
<dbType type="REAL" ignoreLen="true" ignorePre="true"/>
<dbType type="TIME" ignoreLen="true" ignorePre="true" />
<dbType type="TIMESTAMP" ignoreLen="true" ignorePre="true" />
<dbType type="SMALLINT" ignoreLen="true" ignorePre="true" />
<dbType type="INTEGER" ignoreLen="true" ignorePre="true" />
@@ -61,39 +67,47 @@
<dbType type="VARBYTE"/>
</talendType>
<talendType type="id_Character">
<dbType type="BYTE" />
<dbType type="CHAR" default="true"/>
<dbType type="CHARACTER"/>
<dbType type="VARCHAR"/>
<dbType type="NCHAR"/>
<dbType type="VARCHAR"/>
<dbType type="CV"/>
<dbType type="LONG VARCHAR"/>
</talendType>
<talendType type="id_Date">
<dbType type="DATE" default="true" />
<dbType type="DA"/>
<dbType type="TIMESTAMP"/>
<dbType type="TIME"/>
</talendType>
<talendType type="id_BigDecimal">
<dbType type="DECIMAL" default="true" />
<dbType type="FLOAT" />
<dbType type="D"/>
<dbType type="DEC"/>
<dbType type="NUMERIC"/>
</talendType>
<talendType type="id_Double">
<dbType type="DECIMAL" default="true" />
<dbType type="FLOAT" />
<dbType type="DECIMAL"/>
<dbType type="FLOAT" default="true"/>
<dbType type="REAL"/>
</talendType>
<talendType type="id_Float">
<dbType type="FLOAT" default="true" />
<dbType type="DECIMAL"/>
<dbType type="FLOAT"/>
<dbType type="DECIMAL" default="true" />
<dbType type="DEC"/>
<dbType type="NUMERIC"/>
<dbType type="F" />
</talendType>
<talendType type="id_Integer">
<dbType type="INTEGER" default="true" />
<dbType type="I" default="true" />
<dbType type="I" />
<dbType type="SMALLINT"/>
</talendType>
<talendType type="id_Long">
<dbType type="INTEGER" default="true" />
<dbType type="BIGINT" />
<dbType type="INTEGER"/>
<dbType type="BIGINT" default="true"/>
</talendType>
<talendType type="id_Object">
<dbType type="BLOB" default="true"/>
@@ -118,14 +132,16 @@
<dbType type="GV"/>
</talendType>
<talendType type="id_Short">
<dbType type="INTEGER" default="true" />
<dbType type="SMALLINT" default="true" />
<dbType type="INTEGER"/>
</talendType>
<talendType type="id_String">
<dbType type="VARCHAR" default="true" />
<dbType type="NCHAR" />
<dbType type="VARCHAR"/>
<dbType type="LONG VARCHAR"/>
<dbType type="CHAR" />
<dbType type="CF" />
<dbType type="CHARACTER"/>
<dbType type="NCHAR" />
<dbType type="CF" />
</talendType>
</talendToDbTypes>
<dbToTalendTypes><!-- Adviced mappings -->
@@ -136,14 +152,15 @@
<talendType type="id_Object" default="true" />
</dbType>
<dbType type="BIGINT">
<talendType type="id_Integer" default="true"/>
<talendType type="id_Long" />
<talendType type="id_Long" default="true"/>
<talendType type="id_Integer"/>
</dbType>
<dbType type="BYTEINT">
<talendType type="id_Byte" default="true" />
</dbType>
<dbType type="BYTE">
<talendType type="id_Byte" default="true" />
<talendType type="id_Character" default="true" />
<talendType type="id_Byte" />
</dbType>
<dbType type="CLOB">
<talendType type="id_Object" default="true" />
@@ -151,6 +168,9 @@
<dbType type="TIMESTAMP">
<talendType type="id_Date" default="true" />
</dbType>
<dbType type="TIME">
<talendType type="id_Date" default="true" />
</dbType>
<dbType type="DATE">
<talendType type="id_Date" default="true" />
</dbType>
@@ -158,14 +178,29 @@
<talendType type="id_Object" default="true" />
</dbType>
<dbType type="DECIMAL">
<talendType type="id_Float" default="true" />
<talendType type="id_BigDecimal" default="true" />
<talendType type="id_Float"/>
<talendType type="id_Double"/>
<talendType type="id_BigDecimal"/>
</dbType>
<dbType type="DEC">
<talendType type="id_BigDecimal" default="true" />
</dbType>
<dbType type="NUMERIC">
<talendType type="id_BigDecimal" default="true" />
</dbType>
<dbType type="FLOAT">
<talendType type="id_Float" default="true" />
<talendType type="id_Double"/>
<talendType type="id_BigDecimal"/>
<talendType type="id_Double" default="true" />
<talendType type="id_Float"/>
<talendType type="id_BigDecimal"/>
</dbType>
<dbType type="REAL">
<talendType type="id_Double" default="true" />
</dbType>
<dbType type="LONG VARCHAR">
<talendType type="id_String" default="true" />
</dbType>
<dbType type="CHARACTER">
<talendType type="id_String" default="true" />
</dbType>
<dbType type="I">
<talendType type="id_Long"/>

View File

@@ -10,13 +10,12 @@
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.core.utils;
package org.talend.core;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.swt.widgets.Display;
import org.talend.commons.CommonsPlugin;
import org.talend.core.CorePlugin;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.runtime.CoreRuntimePlugin;
import org.talend.core.ui.branding.IBrandingService;
/**
@@ -28,7 +27,7 @@ public class BrandingChecker {
private static boolean isBrandingChanged;
private static final String LAST_STARTED_PRODUCT = "last started product";
private static final String LAST_STARTED_PRODUCT = "last_started_product";
public static boolean isBrandingChanged() {
if (!initialized) {
@@ -45,8 +44,9 @@ public class BrandingChecker {
}
display.syncExec(new Runnable() {
@Override
public void run() {
IPreferenceStore preferenceStore = CorePlugin.getDefault().getPreferenceStore();
IPreferenceStore preferenceStore = CoreRuntimePlugin.getInstance().getPreferenceStore();
String oldBrandingName = preferenceStore.getString(LAST_STARTED_PRODUCT);
if (oldBrandingName == null || oldBrandingName.equals("") || !oldBrandingName.equals(fullProductName)) {
isBrandingChanged = true;

View File

@@ -34,9 +34,6 @@ public class GlobalServiceRegister {
// The shared instance
private static GlobalServiceRegister instance = new GlobalServiceRegister();
public static GlobalServiceRegister getDefault() {
return instance;
}
@@ -45,6 +42,8 @@ public class GlobalServiceRegister {
private Map<Class<?>, AbstractDQModelService> dqModelServices = new HashMap<Class<?>, AbstractDQModelService>();
private static IConfigurationElement[] configurationDQDriverElements = null;
private static IExtensionRegistry registry = Platform.getExtensionRegistry();
private static IConfigurationElement[] configurationElements = registry == null ? null : registry
@@ -76,6 +75,38 @@ public class GlobalServiceRegister {
return true;
}
private IConfigurationElement[] getConfigurationDQDriverElements() {
if (configurationDQDriverElements == null) {
IExtensionRegistry registry = Platform.getExtensionRegistry();
configurationDQDriverElements = (registry == null ? null : registry
.getConfigurationElementsFor("org.talend.metadata.managment.DBDriver_extension")); //$NON-NLS-1$
}
return configurationDQDriverElements;
}
public IService getDQDriverService(Class<?> klass) {
IService dqModelserviceInst = services.get(klass);
if (dqModelserviceInst == null) {
dqModelserviceInst = findDQModelService(klass);
if (dqModelserviceInst != null) {
services.put(klass, dqModelserviceInst);
}
}
return dqModelserviceInst;
}
public boolean isDQDriverServiceRegistered(Class klass) {
IService service = services.get(klass);
if (service == null) {
service = findDQDriverService(klass);
if (service == null) {
return false;
}
services.put(klass, service);
}
return true;
}
public boolean isServiceRegistered(Class klass) {
IService service = services.get(klass);
if (service == null) {
@@ -100,7 +131,7 @@ public class GlobalServiceRegister {
service = findService(klass);
if (service == null) {
throw new RuntimeException(Messages.getString("GlobalServiceRegister.ServiceNotRegistered", klass.getName())); //$NON-NLS-1$ //$NON-NLS-2$
throw new RuntimeException(Messages.getString("GlobalServiceRegister.ServiceNotRegistered", klass.getName())); //$NON-NLS-1$
}
services.put(klass, service);
}
@@ -115,8 +146,7 @@ public class GlobalServiceRegister {
*/
private IService findService(Class klass) {
String key = klass.getName();
for (int i = 0; i < configurationElements.length; i++) {
IConfigurationElement element = configurationElements[i];
for (IConfigurationElement element : configurationElements) {
if (element.isValid()) {
String id = element.getAttribute("serviceId"); //$NON-NLS-1$
if (!key.endsWith(id)) {
@@ -144,8 +174,7 @@ public class GlobalServiceRegister {
* @return IService
*/
public IProviderService findService(String key) {
for (int i = 0; i < configurationElements.length; i++) {
IConfigurationElement element = configurationElements[i];
for (IConfigurationElement element : configurationElements) {
if (element.isValid()) {
String id = element.getAttribute("serviceId"); //$NON-NLS-1$
if (!key.equals(id)) {
@@ -165,8 +194,7 @@ public class GlobalServiceRegister {
}
private AbstractDQModelService findDQModelService(Class<?> klass) {
for (int i = 0; i < configurationDQModelElements.length; i++) {
IConfigurationElement element = configurationDQModelElements[i];
for (IConfigurationElement element : configurationDQModelElements) {
try {
Object service = element.createExecutableExtension("class"); //$NON-NLS-1$
if (klass.isInstance(service)) {
@@ -178,4 +206,21 @@ public class GlobalServiceRegister {
}
return null;
}
private IService findDQDriverService(Class<?> klass) {
IConfigurationElement[] configDQModelElements = getConfigurationDQDriverElements();
if (configDQModelElements != null) {
for (IConfigurationElement element : configDQModelElements) {
try {
Object service = element.createExecutableExtension("class"); //$NON-NLS-1$
if (klass.isInstance(service)) {
return (IService) service;
}
} catch (CoreException e) {
ExceptionHandler.process(e);
}
}
}
return null;
}
}

View File

@@ -12,7 +12,6 @@
// ============================================================================
package org.talend.core;
import java.net.URI;
import java.util.List;
import java.util.Map;
@@ -28,6 +27,7 @@ import org.eclipse.swt.graphics.Image;
import org.talend.commons.exception.BusinessException;
import org.talend.commons.exception.SystemException;
import org.talend.commons.ui.swt.actions.ITreeContextualAction;
import org.talend.core.model.general.LibraryInfo;
import org.talend.core.model.general.Project;
import org.talend.core.model.metadata.ColumnNameChanged;
import org.talend.core.model.metadata.IMetadataTable;
@@ -61,7 +61,7 @@ public interface ICoreService extends IService {
public boolean getContextFlagFromQueryUtils();
public Map<String, List<URI>> getRoutineAndJars();
public Map<String, List<LibraryInfo>> getRoutineAndJars();
public String getTemplateString();

View File

@@ -69,6 +69,14 @@ public interface ILibraryManagerService extends IService {
*/
public Set<String> list(IProgressMonitor... monitorWrap);
/**
*
* List all .dll files
*
* @return
*/
public Set<String> listAllDllFiles();
public boolean delete(String jarName);
public boolean contains(String jarName);

View File

@@ -1,26 +1,26 @@
// ============================================================================
//
// Copyright (C) 2006-2012 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.swtbot.helpers;
import org.eclipse.swtbot.eclipse.gef.finder.SWTGefBot;
import org.talend.swtbot.TalendSwtBotForTos;
/**
* DOC fzhong class global comment. Detailled comment
*/
public interface Helper {
SWTGefBot GEFBOT = new SWTGefBot();
TalendSwtBotForTos UTIL = new TalendSwtBotForTos();
}
// ============================================================================
//
// Copyright (C) 2006-2012 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;
import org.talend.core.model.properties.ConnectionItem;
import org.talend.utils.sugars.ReturnCode;
/**
* created by talend on Dec 19, 2012 Detailled comment
*
*/
public interface ITDQCompareService extends IService {
// ADD zshen 2012-12-19 to reuse reloadAction
public ReturnCode reloadDatabase(ConnectionItem connectionItem);
}

View File

@@ -20,7 +20,6 @@ import java.util.Map;
import org.eclipse.jface.dialogs.InputDialog;
import org.eclipse.ui.IViewPart;
import org.talend.core.model.properties.ConnectionItem;
import org.talend.core.model.properties.ContextItem;
import org.talend.core.model.properties.Item;
import org.talend.core.model.repository.IRepositoryViewObject;
import org.talend.repository.model.IRepositoryNode;
@@ -42,7 +41,7 @@ public interface ITDQRepositoryService extends IService {
public IViewPart getTDQRespositoryView();
public void openEditor(Item item);
public void openConnectionEditor(Item item);
public void notifySQLExplorer(Item... items);
@@ -56,17 +55,20 @@ public interface ITDQRepositoryService extends IService {
public void initProxyRepository();
public void addPartListener();
//MOD klliu 2011-04-28 bug 20204 removing connection is synced to the connection view of SQL explore
// MOD klliu 2011-04-28 bug 20204 removing connection is synced to the connection view of SQL explore
public boolean removeAliasInSQLExplorer(IRepositoryNode children);
// MOD zshen 2012-09-19 bug TDQ-5850 change the action for create softWareSystemResource, so need to delete it when
// connection just be deleted.
public boolean removeSoftWareSystem(IRepositoryNode children);
public void createParserRuleItem(ArrayList<HashMap<String, Object>> values, String parserRuleName);
public List<Map<String, String>> getPaserRulesFromResources(Object[] rules);
public List<Map<String, String>> getPaserRulesFromRules(Object parser);
// ADD qiongli 2011-9-13 TDQ-3317
public void reloadDatabase(ContextItem contextItem);
// ADD zshen 2012-1-6 TDQ-4384
public ReturnCode reloadDatabase(ConnectionItem connectionItem);
@@ -96,4 +98,19 @@ public interface ITDQRepositoryService extends IService {
// ADD xqliu 2012-07-24 TDQ-5853
public void checkUsernameBeforeSaveConnection(ConnectionItem connectionItem);
// ADD qiongli 2012-11-12 TDQ-6166
public void initAllConnectionsToSQLExplorer();
// Add yyin 2012-11-15 TDQ-6395
public void saveConnectionWithDependency(ConnectionItem connectionItem);
// Add xqliu 2012-12-11 TDQ-5750
public void refreshCurrentAnalysisEditor();
// Add zshen 2013-01-05
public void refreshCurrentAnalysisAndConnectionEditor();
public void refreshConnectionEditor(Item item);
}

View File

@@ -65,8 +65,11 @@ public enum EDatabase4DriverClassName {
SAS(EDatabaseTypeName.SAS, "com.sas.rio.MVADriver"), //$NON-NLS-1$
SQLITE(EDatabaseTypeName.SQLITE, "org.sqlite.JDBC"), //$NON-NLS-1$
SYBASEASE(EDatabaseTypeName.SYBASEASE, "com.sybase.jdbc3.jdbc.SybDriver"), //$NON-NLS-1$
SYBASEIQ(EDatabaseTypeName.SYBASEIQ, "com.sybase.jdbc3.jdbc.SybDriver"), //$NON-NLS-1$
SYBASEASE(EDatabaseTypeName.SYBASEASE, new String[] {
"com.sybase.jdbc3.jdbc.SybDriver", "com.sybase.jdbc3.jdbc.SybDataSource" }, new String[] {}), //$NON-NLS-1$
SYBASEIQ(
EDatabaseTypeName.SYBASEIQ,
new String[] { "com.sybase.jdbc3.jdbc.SybDriver", "com.sybase.jdbc3.jdbc.SybDataSource" }, new String[] {}), //$NON-NLS-1$
EXASOLUTION(EDatabaseTypeName.EXASOL, "com.exasol.jdbc.EXADriver"), //$NON-NLS-1$
// MOD klliu 2010-06-04 bug 12819: upgrade jdbc driver class used in sql explorer

View File

@@ -19,8 +19,6 @@ import java.util.List;
import org.talend.core.database.EDatabaseTypeName;
import org.talend.core.database.conn.version.EDatabaseVersion4Drivers;
import org.talend.core.language.ECodeLanguage;
import org.talend.core.language.LanguageManager;
/**
* cli class global comment. Detailled comment
@@ -257,37 +255,16 @@ public enum EDatabaseConnTemplate {
databaseType.add(typeName);
}
}
if (!all && LanguageManager.getCurrentLanguage() == ECodeLanguage.PERL) {
databaseType.remove(getDBTypeName(EDatabaseConnTemplate.MSSQL, display));
databaseType.remove(getDBTypeName(EDatabaseConnTemplate.INGRES, display));
databaseType.remove(getDBTypeName(EDatabaseConnTemplate.INTERBASE, display));
databaseType.remove(getDBTypeName(EDatabaseConnTemplate.INFORMIX, display));
databaseType.remove(getDBTypeName(EDatabaseConnTemplate.FIREBIRD, display));
databaseType.remove(getDBTypeName(EDatabaseConnTemplate.ACCESS, display));
databaseType.remove(getDBTypeName(EDatabaseConnTemplate.TERADATA, display));
databaseType.remove(getDBTypeName(EDatabaseConnTemplate.AS400, display));
databaseType.remove(getDBTypeName(EDatabaseConnTemplate.JAVADB_DERBYCLIENT, display));
databaseType.remove(getDBTypeName(EDatabaseConnTemplate.JAVADB_EMBEDED, display));
databaseType.remove(getDBTypeName(EDatabaseConnTemplate.JAVADB_JCCJDBC, display));
databaseType.remove(getDBTypeName(EDatabaseConnTemplate.HSQLDB_IN_PROGRESS, display));
databaseType.remove(getDBTypeName(EDatabaseConnTemplate.HSQLDB_SERVER, display));
databaseType.remove(getDBTypeName(EDatabaseConnTemplate.HSQLDB_WEBSERVER, display));
databaseType.remove(getDBTypeName(EDatabaseConnTemplate.VERTICA, display));
databaseType.remove(getDBTypeName(EDatabaseConnTemplate.HIVE, display));
databaseType.remove(getDBTypeName(EDatabaseConnTemplate.HBASE, display));
}
if (sort) {
String[] sortedArray = databaseType.toArray(new String[0]);
Arrays.sort(sortedArray, new Comparator() {
Arrays.sort(sortedArray, new Comparator<String>() {
public int compare(Object o1, Object o2) {
if (o1 instanceof String && o2 instanceof String) {
return o1.toString().compareTo(o2.toString());
}
return 0;
@Override
public int compare(String o1, String o2) {
return o1.compareTo(o2);
}
});
return Arrays.asList(sortedArray);
return new ArrayList<String>(Arrays.asList(sortedArray));
}
return databaseType;
}

View File

@@ -64,7 +64,7 @@ public enum EDatabaseVersion4Drivers {
SAS_9_2(new DbVersion4Drivers(EDatabaseTypeName.SAS,
"SAS 9.2", "SAS_9.2", new String[] { "sas.core.jar", "sas.security.sspi.jar", "sas.svc.connection.jar" })), //$NON-NLS-1$ //$NON-NLS-2$
// MYSQL, add for 9594
MYSQL_5(new DbVersion4Drivers(EDatabaseTypeName.MYSQL, "MySQL 5", "MYSQL_5", "mysql-connector-java-5.1.0-bin.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
MYSQL_5(new DbVersion4Drivers(EDatabaseTypeName.MYSQL, "MySQL 5", "MYSQL_5", "mysql-connector-java-5.1.22-bin.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
MYSQL_4(new DbVersion4Drivers(EDatabaseTypeName.MYSQL, "MySQL 4", "MYSQL_4", "mysql-connector-java-3.1.14-bin.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
// add for 9594
MSSQL(new DbVersion4Drivers(EDatabaseTypeName.MSSQL, "jtds-1.2.5.jar")), //$NON-NLS-1$

View File

@@ -94,14 +94,18 @@ public final class UpdateRunJobComponentContextHelper {
}
}
}
// bug 9424
obj = valueMap.get(PARAM_VALUE_COLUMN);
if (obj != null && obj instanceof String) {
String oldValue = (String) obj;
String newValue = checkAndUpdateValue(nameMap, oldValue);
if (newValue != null) { // update
valueMap.put(PARAM_VALUE_COLUMN, newValue);
changed = true;
// Change value only for the job which context variable is changed. Changed by Marvin Wang
// on Dec. 28, 2012 for bug TDI-24255.
if (process.getId().equals(refJobId)) {
// bug 9424
obj = valueMap.get(PARAM_VALUE_COLUMN);
if (obj != null && obj instanceof String) {
String oldValue = (String) obj;
String newValue = checkAndUpdateValue(nameMap, oldValue);
if (newValue != null) { // update
valueMap.put(PARAM_VALUE_COLUMN, newValue);
changed = true;
}
}
}
}
@@ -116,7 +120,7 @@ public final class UpdateRunJobComponentContextHelper {
}
// update the job state
if (changed && process instanceof IProcess2) {
CommandStack commandStack = ((IProcess2) process).getCommandStack();
CommandStack commandStack = process.getCommandStack();
if (commandStack != null) {
commandStack.execute(new Command() {
});
@@ -321,7 +325,7 @@ public final class UpdateRunJobComponentContextHelper {
boolean exist = false;
for (IContext con : listContext) {
String name = con.getName();
if (((String) value).equals(name)) {
if (value.equals(name)) {
exist = true;
break;
}

View File

@@ -13,10 +13,13 @@
package org.talend.core.model.general;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
import org.talend.core.runtime.i18n.Messages;
import org.talend.json.JSONException;
import org.talend.json.JSONObject;
import org.talend.repository.model.RepositoryConstants;
/**
@@ -31,22 +34,26 @@ public class ConnectionBean implements Cloneable {
private static final String FIELDS_SEPARATOR = "#"; //$NON-NLS-1$
private String repositoryId;
private static final String ID = "id"; //$NON-NLS-1$
private String name;
private static final String DESCRIPTION = "description"; //$NON-NLS-1$
private String description;
private static final String NAME = "name"; //$NON-NLS-1$
private String user;
private static final String PASSWORD = "password"; //$NON-NLS-1$
private String password;
private static final String USER = "user"; //$NON-NLS-1$
private static final String WORKSPACE = "workSpace"; //$NON-NLS-1$
private static final String DYNAMICFIELDS = "dynamicFields"; //$NON-NLS-1$
private static final String COMPLETE = "complete"; //$NON-NLS-1$
private JSONObject conDetails = new JSONObject();
private Map<String, String> dynamicFields = new HashMap<String, String>();
private boolean complete;
private String workSpace;
/**
* DOC smallet ConnectionBean constructor comment.
*/
@@ -73,12 +80,33 @@ public class ConnectionBean implements Cloneable {
return newConnection;
}
/**
* Getter for ID.
*
* @return the ID
*/
public String getRepositoryId() {
return this.repositoryId;
try {
if (conDetails.has(ID)) {
return conDetails.getString(ID);
}
} catch (JSONException e) {
ExceptionHandler.process(e);
}
return "";
}
/**
* Sets the ID.
*
* @param id the id to set
*/
public void setRepositoryId(String repositoryId) {
this.repositoryId = repositoryId;
try {
conDetails.put(ID, repositoryId);
} catch (JSONException e) {
ExceptionHandler.process(e);
}
}
/**
@@ -87,7 +115,14 @@ public class ConnectionBean implements Cloneable {
* @return the description
*/
public String getDescription() {
return this.description;
try {
if (conDetails.has(DESCRIPTION)) {
return conDetails.getString(DESCRIPTION);
}
} catch (JSONException e) {
ExceptionHandler.process(e);
}
return "";
}
/**
@@ -96,7 +131,11 @@ public class ConnectionBean implements Cloneable {
* @param description the description to set
*/
public void setDescription(String description) {
this.description = description;
try {
conDetails.put(DESCRIPTION, description);
} catch (JSONException e) {
ExceptionHandler.process(e);
}
}
/**
@@ -105,7 +144,14 @@ public class ConnectionBean implements Cloneable {
* @return the name
*/
public String getName() {
return this.name;
try {
if (conDetails.has(NAME)) {
return conDetails.getString(NAME);
}
} catch (JSONException e) {
ExceptionHandler.process(e);
}
return "";
}
/**
@@ -114,7 +160,11 @@ public class ConnectionBean implements Cloneable {
* @param name the name to set
*/
public void setName(String name) {
this.name = name;
try {
conDetails.put(NAME, name);
} catch (JSONException e) {
ExceptionHandler.process(e);
}
}
/**
@@ -123,7 +173,14 @@ public class ConnectionBean implements Cloneable {
* @return the password
*/
public String getPassword() {
return this.password;
try {
if (conDetails.has(PASSWORD)) {
return conDetails.getString(PASSWORD);
}
} catch (JSONException e) {
ExceptionHandler.process(e);
}
return "";
}
/**
@@ -132,7 +189,11 @@ public class ConnectionBean implements Cloneable {
* @param password the password to set
*/
public void setPassword(String password) {
this.password = password;
try {
conDetails.put(PASSWORD, password);
} catch (JSONException e) {
ExceptionHandler.process(e);
}
}
/**
@@ -141,7 +202,14 @@ public class ConnectionBean implements Cloneable {
* @return the user
*/
public String getUser() {
return this.user;
try {
if (conDetails.has(USER)) {
return conDetails.getString(USER);
}
} catch (JSONException e) {
ExceptionHandler.process(e);
}
return "";
}
/**
@@ -150,7 +218,11 @@ public class ConnectionBean implements Cloneable {
* @param user the user to set
*/
public void setUser(String user) {
this.user = user;
try {
conDetails.put(USER, user);
} catch (JSONException e) {
ExceptionHandler.process(e);
}
}
/**
@@ -159,10 +231,14 @@ public class ConnectionBean implements Cloneable {
* @return the workSpace
*/
public String getWorkSpace() {
if (this.workSpace == null) {
return ""; //$NON-NLS-1$
try {
if (conDetails.has(WORKSPACE)) {
return conDetails.getString(WORKSPACE);
}
} catch (JSONException e) {
ExceptionHandler.process(e);
}
return this.workSpace;
return "";
}
/**
@@ -171,11 +247,15 @@ public class ConnectionBean implements Cloneable {
* @param workSpace the workSpace to set
*/
public void setWorkSpace(String workSpace) {
this.workSpace = workSpace;
try {
conDetails.put(WORKSPACE, workSpace);
} catch (JSONException e) {
ExceptionHandler.process(e);
}
}
public Map<String, String> getDynamicFields() {
return this.dynamicFields;
return dynamicFields;
}
public void setDynamicFields(Map<String, String> dynamicFields) {
@@ -183,53 +263,32 @@ public class ConnectionBean implements Cloneable {
}
public boolean isComplete() {
return this.complete;
try {
if (conDetails.has(COMPLETE)) {
return (Boolean) conDetails.get(COMPLETE);
}
} catch (JSONException e) {
ExceptionHandler.process(e);
}
return false;
}
public void setComplete(boolean complete) {
this.complete = complete;
try {
conDetails.put(COMPLETE, complete);
} catch (JSONException e) {
e.printStackTrace();
}
}
@Override
public ConnectionBean clone() throws CloneNotSupportedException {
ConnectionBean object = (ConnectionBean) super.clone();
object.setDynamicFields(new HashMap<String, String>(this.dynamicFields));
return object;
return writeFromJSON(this.getConDetails());
}
@Override
public String toString() {
StringBuffer string = new StringBuffer("Repository:" + getRepositoryId() + ", Name:" + getName() //$NON-NLS-1$ //$NON-NLS-2$
+ ", Desription:" + getDescription() + ", User:" + getUser() + ", Password:" + getPassword() //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ", WorkSpace:" + getWorkSpace() + ", Complete:" + isComplete()); //$NON-NLS-1$//$NON-NLS-1$ //$NON-NLS-2$
string.append(", Dyn:").append(dynamicFields); //$NON-NLS-1$
return string.toString();
}
public String readToString() {
StringBuffer fields = new StringBuffer(256);
fields.append(assertValue(getRepositoryId()));
fields.append(FIELDS_SEPARATOR);
fields.append(assertValue(getName()));
fields.append(FIELDS_SEPARATOR);
fields.append(assertValue(getDescription()));
fields.append(FIELDS_SEPARATOR);
fields.append(assertValue(getUser()));
fields.append(FIELDS_SEPARATOR);
fields.append(assertValue(getPassword()));
fields.append(FIELDS_SEPARATOR);
fields.append(assertValue(getWorkSpace()));
fields.append(FIELDS_SEPARATOR);
fields.append(isComplete());
if (dynamicFields.size() > 0) {
for (String current : dynamicFields.keySet()) {
fields.append(FIELDS_SEPARATOR);
fields.append(current + DYN_FIELDS_SEPARATOR + dynamicFields.get(current));
}
}
return fields.toString();
return this.getConDetails().toString();
}
public static ConnectionBean writeFromString(String s) {
@@ -244,41 +303,28 @@ public class ConnectionBean implements Cloneable {
toReturn.setPassword(st[i++]);
toReturn.setWorkSpace(st[i++]);
toReturn.setComplete(new Boolean(st[i++]));
JSONObject dynamicJson = new JSONObject();
toReturn.getConDetails().put(DYNAMICFIELDS, dynamicJson);
while (i < st.length) {
String[] st2 = st[i++].split(DYN_FIELDS_SEPARATOR, -1);
toReturn.getDynamicFields().put(st2[0], st2[1]);
dynamicJson.put(st2[0], st2[1]);
}
} catch (ArrayIndexOutOfBoundsException e) {
// e.printStackTrace();
ExceptionHandler.process(e);
} catch (JSONException e) {
ExceptionHandler.process(e);
}
return toReturn;
}
// public static void main(String[] args) {
// ConnectionBean tt = new ConnectionBean();
// tt.setName("tagada");
// System.out.println(tt);
// tt.setDescription("MyDesc");
// tt.setUser("smallet@talend.com");
// tt.setPassword("");
// tt.getDynamicFields().put("DbLogin", "root");
// tt.getDynamicFields().put("DbPassword", "toor");
// String test2 = tt.readToString();
// ConnectionBean bean2 = writeFromString(test2);
// System.out.println(bean2 + " (" + test2 + ")");
// }
/**
*
* DOC ggu Comment method "assertValue".
*/
private String assertValue(final String value) {
if (value == null) {
return ""; //$NON-NLS-1$
public static ConnectionBean writeFromJSON(JSONObject json) {
ConnectionBean toReturn = new ConnectionBean();
try {
toReturn.setConDetails(new JSONObject(json.toString()));
} catch (JSONException e) {
ExceptionHandler.process(e);
}
return value;
return toReturn;
}
@Override
@@ -289,8 +335,43 @@ public class ConnectionBean implements Cloneable {
if (!(obj instanceof ConnectionBean)) {
return false;
}
ConnectionBean other = (ConnectionBean) obj;
return this.readToString().equals(((ConnectionBean) obj).readToString());
return this.getConDetails().toString().equals(other.getConDetails().toString());
}
public JSONObject getConDetails() {
JSONObject dynamicJson = new JSONObject();
try {
for (String key : dynamicFields.keySet()) {
dynamicJson.put(key, dynamicFields.get(key));
}
conDetails.put(DYNAMICFIELDS, dynamicJson);
} catch (JSONException e) {
ExceptionHandler.process(e);
}
return conDetails;
}
public void setConDetails(JSONObject conDetails) {
this.conDetails = conDetails;
try {
if (conDetails.has(DYNAMICFIELDS)) {
Object object = conDetails.get(DYNAMICFIELDS);
if (object instanceof JSONObject) {
JSONObject dynamicJson = (JSONObject) object;
Iterator sortedKeys = dynamicJson.sortedKeys();
while (sortedKeys.hasNext()) {
String key = (String) sortedKeys.next();
String value = dynamicJson.getString(key);
dynamicFields.put(key, value);
}
}
}
} catch (JSONException e) {
ExceptionHandler.process(e);
}
}
}

View File

@@ -0,0 +1,71 @@
// ============================================================================
//
// Copyright (C) 2006-2012 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.general;
/**
* DOC ycbai class global comment. Detailled comment
*/
public class LibraryInfo {
private String libName;
private String bundleId;
public String getLibName() {
return this.libName;
}
public void setLibName(String libName) {
this.libName = libName;
}
public String getBundleId() {
return this.bundleId;
}
public void setBundleId(String bundleId) {
this.bundleId = bundleId;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((this.bundleId == null) ? 0 : this.bundleId.hashCode());
result = prime * result + ((this.libName == null) ? 0 : this.libName.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
LibraryInfo other = (LibraryInfo) obj;
if (this.bundleId == null) {
if (other.bundleId != null)
return false;
} else if (!this.bundleId.equals(other.bundleId))
return false;
if (this.libName == null) {
if (other.libName != null)
return false;
} else if (!this.libName.equals(other.libName))
return false;
return true;
}
}

View File

@@ -67,7 +67,7 @@ public class MetadataManager {
if (!components.isEmpty()) {
itemResource.getContents().addAll(components);
}
if(!dependencies.isEmpty()){
if (!dependencies.isEmpty()) {
itemResource.getContents().addAll(dependencies);
}
}
@@ -123,6 +123,11 @@ public class MetadataManager {
for (int i = 0; i < item.getConnection().getDataPackage().size(); i++) {
if (item.getConnection().getDataPackage().get(i) instanceof RecordFile) {
RecordFile rf = (RecordFile) item.getConnection().getDataPackage().get(i);
// add for TDI-22857
item.getConnection().setName(item.getProperty().getDisplayName());
if (rf != null) {
rf.setName("default");
}
returnlist.add(rf);
}
}
@@ -142,8 +147,8 @@ public class MetadataManager {
}
break;
case Dependency:
List<Dependency> dependencies = item.getConnection().getSupplierDependency();
returnlist.addAll(dependencies);
List<Dependency> dependencies = item.getConnection().getSupplierDependency();
returnlist.addAll(dependencies);
break;
default:
}

View File

@@ -388,8 +388,12 @@ public class MetadataSchema {
if (pattern.getNodeValue() != null) {
metadataColumn.setPattern(pattern.getNodeValue());
}
metadataColumn.setOriginalField(metadataColumn.getLabel());
if (originalField.getNodeValue() != null) {
String originalFieldValue = MetadataToolHelper.validateColumnName(originalField.getNodeValue(), 0);
metadataColumn.setOriginalField(originalFieldValue);
} else {
metadataColumn.setOriginalField(metadataColumn.getLabel());
}
if (!columnsAlreadyAdded.contains(metadataColumn.getLabel())) {
listColumns.add(metadataColumn);
columnsAlreadyAdded.add(metadataColumn.getLabel());

View File

@@ -225,7 +225,7 @@ public final class MetadataToolHelper {
for (int i = 0; i < originalColumnName.length(); i++) {
Character car = originalColumnName.charAt(i);
// MOD yyin TDQ-4929 20120330
if (car.toString().getBytes().length == 1 && !isAllowSpecific) {
if (car.toString().getBytes().length == 1 || !isAllowSpecific) {
// first character should have only a-z or A-Z or _
// other characters should have only a-z or A-Z or _ or 0-9
if (((car >= 'a') && (car <= 'z')) || ((car >= 'A') && (car <= 'Z')) || car == '_'

View File

@@ -296,6 +296,11 @@ public class ComponentToRepositoryProperty {
connection.setDatabaseType(EDatabaseTypeName.GENERAL_JDBC.getDisplayName());
connection.setProductId(EDatabaseTypeName.GENERAL_JDBC.getProduct());
}
// vertica output component have no TYPE ElementParameter .
if (para.getRepositoryValue().endsWith(EDatabaseTypeName.VERTICA.getProduct())) {
connection.setDatabaseType(EDatabaseTypeName.VERTICA.getDisplayName());
connection.setProductId(EDatabaseTypeName.VERTICA.getProduct());
}
return;
}
// mysql
@@ -369,12 +374,10 @@ public class ComponentToRepositoryProperty {
connection.setProductId(EDatabaseTypeName.AS400.getProduct());
}
// Vertica
// not exist in "DB Type" in Database Connection page.
// else if (EDatabaseTypeName.VERTICA.getProduct().equalsIgnoreCase((String) parameter.getValue())) {
// connection.setDatabaseType(EDatabaseTypeName.VERTICA.getDisplayName());
// connection.setProductId(EDatabaseTypeName.VERTICA.getProduct());
// }
else if (EDatabaseTypeName.VERTICA.getProduct().equalsIgnoreCase((String) parameter.getValue())) {
connection.setDatabaseType(EDatabaseTypeName.VERTICA.getDisplayName());
connection.setProductId(EDatabaseTypeName.VERTICA.getProduct());
}
// MaxDB
else if (EDatabaseTypeName.MAXDB.getProduct().equalsIgnoreCase((String) parameter.getValue())) {
connection.setDatabaseType(EDatabaseTypeName.MAXDB.getDisplayName());
@@ -566,6 +569,9 @@ public class ComponentToRepositoryProperty {
if (connection.getDatabaseType().equals(EDatabaseTypeName.AS400.getDisplayName())) {
setDatabaseValueForAs400(connection, node, repositoryValue);
}
if (connection.getDatabaseType().equals(EDatabaseTypeName.VERTICA.getDisplayName())) {
setDatabaseValueForVertica(connection, node, repositoryValue);
}
if (connection.getDatabaseType().equals(EDatabaseTypeName.MSSQL.getDisplayName())) {
setDatabaseValueForMSSql(connection, node, repositoryValue);
}
@@ -666,6 +672,16 @@ public class ComponentToRepositoryProperty {
}
}
private static void setDatabaseValueForVertica(DatabaseConnection connection, INode node, String repositoryValue) {
if ("DB_VERSION".equals(repositoryValue)) { //$NON-NLS-1$
String value = getParameterValue(connection, node, "DB_VERSION"); //$NON-NLS-1$
String dbVersionName = EDatabaseVersion4Drivers.getDbVersionName(EDatabaseTypeName.VERTICA, value);
if (value != null) {
connection.setDbVersionString(dbVersionName);
}
}
}
private static void setDatabaseValueForMysql(DatabaseConnection connection, INode node, String repositoryValue) {
if ("PROPERTIES_STRING".equals(repositoryValue)) { //$NON-NLS-1$
String value = getParameterValue(connection, node, "PROPERTIES"); //$NON-NLS-1$
@@ -1141,6 +1157,13 @@ public class ComponentToRepositoryProperty {
}
}
if ("TAC_WEBAPP".equals(repositoryValue)) {//$NON-NLS-1$
String value = getParameterValue(connection, node, "TAC_WEBAPP"); //$NON-NLS-1$
if (value != null) {
connection.setTacWebappName(value);
}
}
if ("CLASS_NAME".equals(repositoryValue)) {//$NON-NLS-1$
String value = getParameterValue(connection, node, "CLASS_NAME"); //$NON-NLS-1$
if (value != null) {

View File

@@ -910,7 +910,8 @@ public class RepositoryToComponentProperty {
if (value.equals("DB_VERSION")) { //$NON-NLS-1$
String dbVersionString = connection.getDbVersionString();
if (EDatabaseConnTemplate.ACCESS.getDBDisplayName().equals(databaseType)) {
if (EDatabaseConnTemplate.ACCESS.getDBDisplayName().equals(databaseType)
|| EDatabaseConnTemplate.MYSQL.getDBDisplayName().equals(databaseType)) {
// @Deprecated: see bug 7262 this bug is Deprecated
return dbVersionString;
} else {
@@ -966,6 +967,13 @@ public class RepositoryToComponentProperty {
String h2Prefix = "jdbc:h2:"; //$NON-NLS-1$
if (url.startsWith(h2Prefix)) {
String path = url.substring(h2Prefix.length(), url.length());
// TDI-23861: handle the server mode of H2 which url has more than one colon.
if (path.split(":").length > 2) { //$NON-NLS-1$
int startIndex = path.lastIndexOf(":") - 1; //$NON-NLS-1$
String filePath = path.substring(startIndex);
h2Prefix += path.substring(0, startIndex);
path = filePath;
}
path = PathUtils.getPortablePath(path);
url = h2Prefix + path;
}
@@ -1204,6 +1212,20 @@ public class RepositoryToComponentProperty {
return TalendQuoteUtils.addQuotes(p.toPortableString());
}
}
if ("CODE_PAGE".equals(value)) { //$NON-NLS-1$
if (connection.getCodePage() == null) {
return null;
}
if (isContextMode(connection, connection.getCodePage())) {
return connection.getCodePage();
} else {
Path p = new Path(""); //$NON-NLS-1$
if (connection.getCodePage() != null) {
p = new Path(connection.getCodePage());
}
return TalendQuoteUtils.addQuotes(p.toPortableString());
}
}
return null;
}
@@ -2055,14 +2077,29 @@ public class RepositoryToComponentProperty {
return connection.getXmlField();
}
if (value.equals("GUVNOR_URL")) {
return connection.getUrlName();
return addQuotesIfNecessary(connection, connection.getUrlName());
}
if (value.equals("TAC_WEBAPP")) {
return addQuotesIfNecessary(connection, connection.getTacWebappName());
}
if (value.equals("CLASS_NAME")) {
return connection.getClassName();
return addQuotesIfNecessary(connection, connection.getClassName());
}
if (value.equals("GUVNOR_PACKAGE")) {
return addQuotesIfNecessary(connection, connection.getPackage());
}
if (value.equals("MODULE_USED")) {
return connection.getModuleUsed();
}
return null;
}
private static Object addQuotesIfNecessary(Connection connection, String value) {
if (!isContextMode(connection, value)) {
if (!value.startsWith(TalendQuoteUtils.QUOTATION_MARK) && !value.endsWith(TalendQuoteUtils.QUOTATION_MARK)) {
return TalendQuoteUtils.addQuotes(value);
}
}
return value;
}
}

View File

@@ -53,7 +53,7 @@ public class Java2STLangTypesHelper {
// Characters: char(Character)
if (typeToGenerate.equals("char")) { //$NON-NLS-1$
return "char"; //$NON-NLS-1$
return "string"; //$NON-NLS-1$
}
// others treat as string

View File

@@ -385,7 +385,7 @@ public class ERepositoryObjectType extends DynaEnum<ERepositoryObjectType> {
private String alias;
private String folder = ""; //$NON-NLS-N$
private String folder = "";
private String[] products;
@@ -451,6 +451,18 @@ public class ERepositoryObjectType extends DynaEnum<ERepositoryObjectType> {
return toReturn.toArray(new ERepositoryObjectType[] {});
}
// Bad code here to fix bug TDI-23178. If DQ repository type implemented by extention point like what MDM does
// will avoid this bug.
if (!PluginChecker.isPluginLoaded("org.talend.dataprofiler.core")) { //$NON-NLS-1$
List<ERepositoryObjectType> toReturn = new ArrayList<ERepositoryObjectType>();
for (ERepositoryObjectType currentType : values(ERepositoryObjectType.class)) {
if (!(currentType.getProducts().length == 1 && ArrayUtils.contains(currentType.getProducts(), "DQ"))) { //$NON-NLS-1$
toReturn.add(currentType);
}
}
return toReturn.toArray(new ERepositoryObjectType[0]);
}
return values(ERepositoryObjectType.class);
}
@@ -460,25 +472,24 @@ public class ERepositoryObjectType extends DynaEnum<ERepositoryObjectType> {
IConfigurationElement[] configurationElements = registry
.getConfigurationElementsFor("org.talend.core.repository.repository_node_provider"); //$NON-NLS-1$
try {
for (int i = 0; i < configurationElements.length; i++) {
IConfigurationElement element = configurationElements[i];
Object extensionNode = element.createExecutableExtension("class");//$NON-NLS-N$
for (IConfigurationElement element : configurationElements) {
Object extensionNode = element.createExecutableExtension("class");
if (extensionNode instanceof IExtendRepositoryNode) {
IExtendRepositoryNode diyNode = (IExtendRepositoryNode) extensionNode;
String label = element.getAttribute("label");//$NON-NLS-N$
String type = element.getAttribute("type");//$NON-NLS-N$
String folder = element.getAttribute("folder");//$NON-NLS-N$
String label = element.getAttribute("label");
String type = element.getAttribute("type");
String folder = element.getAttribute("folder");
if (folder == null) {
folder = "";
}
String isResouce = element.getAttribute("isResouce");//$NON-NLS-N$
String rightAttribute = element.getAttribute("user_right");//$NON-NLS-N$
String isResouce = element.getAttribute("isResouce");
String rightAttribute = element.getAttribute("user_right");
if (rightAttribute == null) {
rightAttribute = "";
}
String productsAttribute = element.getAttribute("products");//$NON-NLS-N$
String[] products = productsAttribute.split("\\|");//$NON-NLS-N$
String[] user_right = rightAttribute.split(";");//$NON-NLS-N$
String productsAttribute = element.getAttribute("products");
String[] products = productsAttribute.split("\\|");
String[] user_right = rightAttribute.split(";");
boolean isResource = false;
if (isResouce != null) {
@@ -550,18 +561,18 @@ public class ERepositoryObjectType extends DynaEnum<ERepositoryObjectType> {
if (type == GENERATED || type == JOBS || type == JOB_DOC) {
if ((PluginChecker.isDocumentationPluginLoaded())) {
return type.getFolder(); //$NON-NLS-1$
return type.getFolder();
}
}
if (type == JOBLETS || type == JOBLET_DOC) {
if (PluginChecker.isJobLetPluginLoaded()) {
return type.getFolder(); //$NON-NLS-1$
return type.getFolder();
}
} else {
return type.getFolder();
}
throw new IllegalArgumentException(Messages.getString("ERepositoryObjectType.FolderNotFound", type)); //$NON-NLS-1$ //$NON-NLS-2$
throw new IllegalArgumentException(Messages.getString("ERepositoryObjectType.FolderNotFound", type)); //$NON-NLS-1$
}
public static String getDeleteFolderName(ERepositoryObjectType type) {
@@ -751,6 +762,7 @@ public class ERepositoryObjectType extends DynaEnum<ERepositoryObjectType> {
return FOLDER;
}
@Override
public Object caseDocumentationItem(DocumentationItem object) {
return DOCUMENTATION;
}
@@ -776,6 +788,7 @@ public class ERepositoryObjectType extends DynaEnum<ERepositoryObjectType> {
* @seeorg.talend.core.model.properties.util.PropertiesSwitch# caseJobDocumentationItem
* (org.talend.core.model.properties.JobDocumentationItem)
*/
@Override
public Object caseJobDocumentationItem(JobDocumentationItem object) {
return JOB_DOC;
}
@@ -786,10 +799,12 @@ public class ERepositoryObjectType extends DynaEnum<ERepositoryObjectType> {
* @seeorg.talend.core.model.properties.util.PropertiesSwitch# caseJobletDocumentationItem
* (org.talend.core.model.properties.JobletDocumentationItem)
*/
@Override
public Object caseJobletDocumentationItem(JobletDocumentationItem object) {
return JOBLET_DOC;
}
@Override
public Object caseRoutineItem(RoutineItem object) {
return ROUTINES;
}
@@ -798,6 +813,7 @@ public class ERepositoryObjectType extends DynaEnum<ERepositoryObjectType> {
// return BEANS;
// }
@Override
public Object caseJobScriptItem(JobScriptItem object) {
return JOB_SCRIPT;
}
@@ -813,6 +829,7 @@ public class ERepositoryObjectType extends DynaEnum<ERepositoryObjectType> {
return SQLPATTERNS;
}
@Override
public Object caseProcessItem(ProcessItem object) {
return PROCESS;
@@ -829,26 +846,32 @@ public class ERepositoryObjectType extends DynaEnum<ERepositoryObjectType> {
return JOBLET;
}
@Override
public Object caseContextItem(ContextItem object) {
return CONTEXT;
}
@Override
public Object caseSnippetItem(SnippetItem object) {
return SNIPPETS;
}
@Override
public Object caseSnippetVariable(SnippetVariable object) {
return SNIPPETS;
}
@Override
public Object caseBusinessProcessItem(BusinessProcessItem object) {
return BUSINESS_PROCESS;
}
@Override
public Object caseCSVFileConnectionItem(CSVFileConnectionItem object) {
throw new IllegalStateException(Messages.getString("ERepositoryObjectType.NotImplemented")); //$NON-NLS-1$
}
@Override
public Object caseDatabaseConnectionItem(DatabaseConnectionItem object) {
return METADATA_CONNECTIONS;
}
@@ -858,46 +881,57 @@ public class ERepositoryObjectType extends DynaEnum<ERepositoryObjectType> {
return METADATA_SAPCONNECTIONS;
}
@Override
public Object caseDelimitedFileConnectionItem(DelimitedFileConnectionItem object) {
return METADATA_FILE_DELIMITED;
}
@Override
public Object casePositionalFileConnectionItem(PositionalFileConnectionItem object) {
return METADATA_FILE_POSITIONAL;
}
@Override
public Object caseRegExFileConnectionItem(RegExFileConnectionItem object) {
return METADATA_FILE_REGEXP;
}
@Override
public Object caseXmlFileConnectionItem(XmlFileConnectionItem object) {
return METADATA_FILE_XML;
}
@Override
public Object caseExcelFileConnectionItem(ExcelFileConnectionItem object) {
return METADATA_FILE_EXCEL;
}
@Override
public Object caseLdifFileConnectionItem(LdifFileConnectionItem object) {
return METADATA_FILE_LDIF;
}
@Override
public Object caseLDAPSchemaConnectionItem(LDAPSchemaConnectionItem object) {
return METADATA_LDAP_SCHEMA;
}
@Override
public Object caseGenericSchemaConnectionItem(GenericSchemaConnectionItem object) {
return METADATA_GENERIC_SCHEMA;
}
@Override
public Object caseSalesforceSchemaConnectionItem(SalesforceSchemaConnectionItem object) {
return METADATA_SALESFORCE_SCHEMA;
}
@Override
public Object caseWSDLSchemaConnectionItem(WSDLSchemaConnectionItem object) {
return METADATA_WSDL_SCHEMA;
}
@Override
public Object caseEDIFACTConnectionItem(EDIFACTConnectionItem object) {
return METADATA_EDIFACT;
}
@@ -907,10 +941,12 @@ public class ERepositoryObjectType extends DynaEnum<ERepositoryObjectType> {
return METADATA_FILE_EBCDIC;
}
@Override
public Object caseHL7ConnectionItem(HL7ConnectionItem object) {
return METADATA_FILE_HL7;
}
@Override
public Object caseFTPConnectionItem(FTPConnectionItem object) {
return METADATA_FILE_FTP;
}
@@ -920,6 +956,7 @@ public class ERepositoryObjectType extends DynaEnum<ERepositoryObjectType> {
return METADATA_FILE_BRMS;
}
@Override
public Object caseMDMConnectionItem(MDMConnectionItem object) {
return METADATA_MDMCONNECTION;
}
@@ -929,6 +966,7 @@ public class ERepositoryObjectType extends DynaEnum<ERepositoryObjectType> {
return SVG_BUSINESS_PROCESS;
}
@Override
public Object caseHeaderFooterConnectionItem(HeaderFooterConnectionItem object) {
return METADATA_HEADER_FOOTER;
}
@@ -939,10 +977,12 @@ public class ERepositoryObjectType extends DynaEnum<ERepositoryObjectType> {
return TDQ_ELEMENT;
}
@Override
public Object caseValidationRulesConnectionItem(ValidationRulesConnectionItem object) {
return METADATA_VALIDATION_RULES;
}
@Override
public Object defaultCase(EObject object) {
throw new IllegalStateException();
}
@@ -985,7 +1025,7 @@ public class ERepositoryObjectType extends DynaEnum<ERepositoryObjectType> {
* @return
*/
public boolean isDQItemType() {
return Arrays.asList(this.getProducts()).contains("DQ"); //$NON-NLS-N$
return Arrays.asList(this.getProducts()).contains("DQ");
}
/**
@@ -997,7 +1037,7 @@ public class ERepositoryObjectType extends DynaEnum<ERepositoryObjectType> {
* @return
*/
public boolean isDIItemType() {
return Arrays.asList(this.getProducts()).contains("DI"); //$NON-NLS-N$
return Arrays.asList(this.getProducts()).contains("DI");
}
/**
@@ -1017,6 +1057,7 @@ public class ERepositoryObjectType extends DynaEnum<ERepositoryObjectType> {
*
* @see org.talend.core.model.repository.DynaEnum#name()
*/
@Override
public String name() {
if (isStaticNode()) {
Field[] allFields = ERepositoryObjectType.class.getDeclaredFields();

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