Compare commits
103 Commits
bugfix/mas
...
patch/6.2.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1be3e5919e | ||
|
|
73829777ab | ||
|
|
04341ca72d | ||
|
|
da82aecd00 | ||
|
|
b01d1edad0 | ||
|
|
71b95ffe82 | ||
|
|
ce642e7e25 | ||
|
|
285031d006 | ||
|
|
aeb90f135c | ||
|
|
497ae99da7 | ||
|
|
d4038a7b00 | ||
|
|
3ab79261d0 | ||
|
|
7d63df9992 | ||
|
|
a5a7e8d8ef | ||
|
|
4dc2c392b8 | ||
|
|
64913f0de0 | ||
|
|
1f1fc295bf | ||
|
|
d566b5c618 | ||
|
|
3661475476 | ||
|
|
47454db941 | ||
|
|
2738e22635 | ||
|
|
ff8770c26f | ||
|
|
50c5f9fe21 | ||
|
|
d5a8afb0e4 | ||
|
|
2423568f41 | ||
|
|
d8f1efe293 | ||
|
|
fb228def78 | ||
|
|
b67bb95bfc | ||
|
|
c18a46d80c | ||
|
|
ae1e73aa5d | ||
|
|
bc57342be6 | ||
|
|
772f3919ee | ||
|
|
ba2bbe99e8 | ||
|
|
cfe000dec2 | ||
|
|
7b6f6610da | ||
|
|
9b2534c053 | ||
|
|
48dab7e53e | ||
|
|
6c74a3c784 | ||
|
|
2c2eefaad2 | ||
|
|
8b000d1c3b | ||
|
|
f381e5ea3f | ||
|
|
6b9a18246b | ||
|
|
312272e4c8 | ||
|
|
202e75c108 | ||
|
|
d17c7e2394 | ||
|
|
ecbd97aba0 | ||
|
|
3b1b9d4f51 | ||
|
|
37cfc826a1 | ||
|
|
5af4f4d66c | ||
|
|
359dd99d47 | ||
|
|
988180e793 | ||
|
|
0fd134ee6f | ||
|
|
bcf6f75a45 | ||
|
|
f513fb4c52 | ||
|
|
d6da724ed5 | ||
|
|
a24d61f6fc | ||
|
|
76863a534f | ||
|
|
b783b8f5c1 | ||
|
|
5d49f07357 | ||
|
|
9198b5fa23 | ||
|
|
f78b90451a | ||
|
|
ac4793cc62 | ||
|
|
1ee14bf126 | ||
|
|
872fe7b8b1 | ||
|
|
e29bce7cca | ||
|
|
3cef088688 | ||
|
|
c92187f577 | ||
|
|
95097a2834 | ||
|
|
6c53ef0f5c | ||
|
|
d4768de197 | ||
|
|
ca3469d057 | ||
|
|
d726b9917a | ||
|
|
57ae0543fe | ||
|
|
81be190e48 | ||
|
|
87ba237389 | ||
|
|
64f283698b | ||
|
|
c9444c7827 | ||
|
|
364c9e6a99 | ||
|
|
e5b08d5817 | ||
|
|
8ce7b38ffd | ||
|
|
dbf73db7c1 | ||
|
|
77b93bc9cc | ||
|
|
e5c017ac00 | ||
|
|
96a08249fc | ||
|
|
8adc470b17 | ||
|
|
34e66059d1 | ||
|
|
d784f722ea | ||
|
|
ee0b100728 | ||
|
|
efbe3b9cd4 | ||
|
|
387ea3bfbc | ||
|
|
c9e201ca93 | ||
|
|
8c82752570 | ||
|
|
9bfeb8b268 | ||
|
|
ec47ba71bb | ||
|
|
f470556711 | ||
|
|
3518b38596 | ||
|
|
9f27da74f9 | ||
|
|
070b88e605 | ||
|
|
c3be1e9b2e | ||
|
|
954c7a6bfd | ||
|
|
77e9cf633b | ||
|
|
ad92e8d41a | ||
|
|
1df0478f32 |
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.common.ui.runtime.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.commons.runtime.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.commons.ui.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.core.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.core.repository.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.core.runtime.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.core.ui.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.cwm.mip.edit.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.cwm.mip.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.maven.ui.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.help.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.helpers.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.librariesmanager.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.librariesmanager.ui.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.metadata.managment.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.metadata.managment.ui.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.migrationTool.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.model.edit.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.model.migration.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.model.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.presentation.onboarding.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.rcp.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.registration.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.items.importexport.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.items.importexport.ui.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.localprovider.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.mdm.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.metadata.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.view.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.resources.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.commons.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.core.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.fragment.jars.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.help.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.jdt.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.libraries.jdbc.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.m2e.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.model.migration.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.rcp.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.update.p2.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.updates.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.utils.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.common.ui.runtime</artifactId>
|
||||
|
||||
@@ -34,6 +34,8 @@ public class ExceptionMessageDialog extends MessageDialog {
|
||||
|
||||
private Throwable ex;
|
||||
|
||||
private String exceptionString = null;
|
||||
|
||||
public ExceptionMessageDialog(Shell parentShell, String dialogTitle, Image dialogTitleImage, String dialogMessage,
|
||||
int dialogImageType, String[] dialogButtonLabels, int defaultIndex, Throwable ex) {
|
||||
super(parentShell, dialogTitle, dialogTitleImage, dialogMessage, dialogImageType, dialogButtonLabels, defaultIndex);
|
||||
@@ -42,15 +44,18 @@ public class ExceptionMessageDialog extends MessageDialog {
|
||||
|
||||
@Override
|
||||
protected Control createCustomArea(Composite parent) {
|
||||
StringWriter stringWriter = new StringWriter();
|
||||
ex.printStackTrace(new PrintWriter(stringWriter));
|
||||
String exceptionString = stringWriter.toString();
|
||||
if (exceptionString == null || exceptionString.isEmpty()) {
|
||||
StringWriter stringWriter = new StringWriter();
|
||||
ex.printStackTrace(new PrintWriter(stringWriter));
|
||||
exceptionString = stringWriter.toString();
|
||||
}
|
||||
|
||||
ExpandableComposite errorComposite = new ExpandableComposite(parent, ExpandableComposite.COMPACT);
|
||||
errorComposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, true, 1, 1));
|
||||
errorComposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true, 1, 1));
|
||||
errorComposite.setText(Messages.getString("ExceptionMessageDialog.log")); //$NON-NLS-1$
|
||||
errorComposite.addExpansionListener(new IExpansionListener() {
|
||||
|
||||
@Override
|
||||
public void expansionStateChanged(ExpansionEvent e) {
|
||||
int delta = 300;
|
||||
if (!e.getState()) {
|
||||
@@ -61,6 +66,7 @@ public class ExceptionMessageDialog extends MessageDialog {
|
||||
getShell().setSize(newSize);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void expansionStateChanging(ExpansionEvent e) {
|
||||
}
|
||||
|
||||
@@ -108,4 +114,12 @@ public class ExceptionMessageDialog extends MessageDialog {
|
||||
return;
|
||||
}
|
||||
|
||||
public String getExceptionString() {
|
||||
return this.exceptionString;
|
||||
}
|
||||
|
||||
public void setExceptionString(String exceptionString) {
|
||||
this.exceptionString = exceptionString;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -41,6 +41,8 @@ import org.eclipse.swt.events.KeyEvent;
|
||||
import org.eclipse.swt.events.KeyListener;
|
||||
import org.eclipse.swt.events.MouseEvent;
|
||||
import org.eclipse.swt.events.MouseListener;
|
||||
import org.eclipse.swt.events.PaintEvent;
|
||||
import org.eclipse.swt.events.PaintListener;
|
||||
import org.eclipse.swt.events.TraverseEvent;
|
||||
import org.eclipse.swt.events.TraverseListener;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
@@ -68,8 +70,8 @@ import org.talend.commons.ui.runtime.swt.tableviewer.selection.SelectionHelper;
|
||||
import org.talend.commons.ui.runtime.swt.tableviewer.sort.TableViewerCreatorSorter;
|
||||
import org.talend.commons.ui.runtime.swt.tableviewer.tableeditor.ITableEditorManagerListener;
|
||||
import org.talend.commons.ui.runtime.swt.tableviewer.tableeditor.TableEditorManager;
|
||||
import org.talend.commons.ui.runtime.swt.tableviewer.tableeditor.TableEditorManagerEvent;
|
||||
import org.talend.commons.ui.runtime.swt.tableviewer.tableeditor.TableEditorManager.EVENT_TYPE;
|
||||
import org.talend.commons.ui.runtime.swt.tableviewer.tableeditor.TableEditorManagerEvent;
|
||||
import org.talend.commons.ui.runtime.thread.AsynchronousThreading;
|
||||
import org.talend.commons.ui.runtime.utils.TableUtils;
|
||||
import org.talend.commons.ui.runtime.ws.WindowSystem;
|
||||
@@ -819,7 +821,15 @@ public class TableViewerCreatorNotModifiable<B> {
|
||||
addTraverseListenerRecursivly(cellEditor.getControl(), traverseListenerForControls);
|
||||
}
|
||||
}
|
||||
|
||||
getTable().addPaintListener(new PaintListener() {
|
||||
|
||||
public void paintControl(PaintEvent event) {
|
||||
if (tableEditorManager != null) {
|
||||
tableEditorManager.paintVisibleAreaEditor(event);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,6 +23,9 @@ import java.util.Set;
|
||||
|
||||
import org.apache.commons.collections.set.MapBackedSet;
|
||||
import org.eclipse.swt.custom.TableEditor;
|
||||
import org.eclipse.swt.events.PaintEvent;
|
||||
import org.eclipse.swt.graphics.GC;
|
||||
import org.eclipse.swt.graphics.Rectangle;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Control;
|
||||
import org.eclipse.swt.widgets.Table;
|
||||
@@ -146,9 +149,7 @@ public class TableEditorManager {
|
||||
public void handleEvent(ListenableListEvent event) {
|
||||
|
||||
if (event.type == TYPE.ADDED) {
|
||||
|
||||
handleAddedEventAsynchronous(event);
|
||||
|
||||
} else if (event.type == TYPE.REMOVED) {
|
||||
handleRemovedEventAsynchronous(event);
|
||||
} else if (event.type == TYPE.SWAPED) {
|
||||
@@ -190,7 +191,6 @@ public class TableEditorManager {
|
||||
|
||||
}).start();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void handleRemovedEventAsynchronous(final ListenableListEvent event) {
|
||||
@@ -218,7 +218,7 @@ public class TableEditorManager {
|
||||
|
||||
int indexStart = event.index;
|
||||
|
||||
if (tableViewerCreator.getTable().isDisposed()) {
|
||||
if (tableViewerCreator.getTable().isDisposed() || tableViewerCreator.isLazyLoad()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -301,7 +301,7 @@ public class TableEditorManager {
|
||||
// //////////////////////////////////
|
||||
Set dataHash = MapBackedSet.decorate(new IdentityHashMap());
|
||||
dataHash.addAll(Arrays.asList(event.swapedObjects));
|
||||
;
|
||||
|
||||
for (TableItem tableItem : items) {
|
||||
Object data = tableItem.getData();
|
||||
if (dataHash.contains(data)) {
|
||||
@@ -350,12 +350,65 @@ public class TableEditorManager {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void paintVisibleAreaEditor(PaintEvent event) {
|
||||
Table table = tableViewerCreator.getTable();
|
||||
if (table.isDisposed()) {
|
||||
return;
|
||||
}
|
||||
|
||||
int topIndex = table.getTopIndex();
|
||||
int itemsCount = table.getItemCount();
|
||||
int itemHeight = table.getItemHeight();
|
||||
GC gc = event.gc;
|
||||
Rectangle clipping = gc.getClipping();
|
||||
int headerHeight = table.getHeaderHeight();
|
||||
int startIndex = (clipping.y - headerHeight) / itemHeight + topIndex;
|
||||
int endIndex = -1;
|
||||
if (startIndex < itemsCount) {
|
||||
endIndex = startIndex + (int) Math.ceil((float) clipping.height / itemHeight);
|
||||
}
|
||||
startIndex = Math.max(0, startIndex);
|
||||
endIndex = Math.min(endIndex, itemsCount - 1);
|
||||
// Set the cell editor if need
|
||||
for (int itemIndex = topIndex; itemIndex <= endIndex; itemIndex++) {
|
||||
TableItem item = table.getItem(itemIndex);
|
||||
for (int columnIndex = 0; columnIndex < columnsWithEditorContent.size(); columnIndex++) {
|
||||
TableViewerCreatorColumnNotModifiable column = columnsWithEditorContent.get(columnIndex);
|
||||
TableEditorContentNotModifiable tableEditorContent = column.getTableEditorContent();
|
||||
|
||||
if (dataToMultipleDataEditor.containsKey(item.getData())) {
|
||||
Collection<TableEditor> tableEditorCollection = dataToMultipleDataEditor.getCollection(item.getData());
|
||||
for (TableEditor tableEditor : tableEditorCollection) {
|
||||
tableEditor.setItem(item);
|
||||
Control editor = tableEditor.getEditor();
|
||||
if (editor != null) {
|
||||
editor.redraw();
|
||||
}
|
||||
}
|
||||
if (columnIndex < tableEditorCollection.size()) {
|
||||
continue;
|
||||
} else {
|
||||
addTableEditor(column, tableEditorContent, column.getId(), item);
|
||||
}
|
||||
} else {
|
||||
addTableEditor(column, tableEditorContent, column.getId(), item);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void refreshColumn(int index) {
|
||||
Table table = tableViewerCreator.getTable();
|
||||
if (table.isDisposed() || index >= table.getItems().length) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
int topIndex = table.getTopIndex();
|
||||
int itemCount = table.getItemCount();
|
||||
int numVisibleLines = Math.min((table.getBounds().height / table.getItemHeight()) + 2, itemCount - topIndex);
|
||||
if (index < topIndex || index > topIndex + numVisibleLines) {
|
||||
return;
|
||||
}
|
||||
for (int iEditorCol = 0; iEditorCol < columnsWithEditorContent.size(); iEditorCol++) {
|
||||
TableViewerCreatorColumnNotModifiable column = columnsWithEditorContent.get(iEditorCol);
|
||||
|
||||
@@ -412,16 +465,6 @@ public class TableEditorManager {
|
||||
|
||||
Control control = tableEditorContent.initialize(tableItem.getParent(), tableEditor, column, currentRowObject, value);
|
||||
|
||||
// control.addDisposeListener(new DisposeListener() {
|
||||
//
|
||||
// public void widgetDisposed(DisposeEvent e) {
|
||||
//
|
||||
// // System.out.println(e);
|
||||
//
|
||||
// }
|
||||
//
|
||||
// });
|
||||
|
||||
if (tableItem != null && !tableItem.isDisposed()) {
|
||||
tableEditor.setEditor(control, tableItem, column.getIndex());
|
||||
fireEvent(new TableEditorManagerEvent(EVENT_TYPE.CONTROL_CREATED, tableEditor));
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.commons.runtime</artifactId>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend</groupId>
|
||||
<artifactId>org.talend.tos</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../pom_server.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -94,21 +94,33 @@ public class TeradataDataBaseMetadata extends FakeDatabaseMetaData {
|
||||
*/
|
||||
@Override
|
||||
public ResultSet getPrimaryKeys(String catalog, String schema, String table) throws SQLException {
|
||||
int dbMajorVersion = connection.getMetaData().getDatabaseMajorVersion();
|
||||
String sql = "HELP COLUMN \"" + schema + "\".\"" + table + "\".* ";//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
|
||||
|
||||
ResultSet rs = null;
|
||||
Statement stmt = null;
|
||||
String columnName = null;
|
||||
List<String[]> list = new ArrayList<String[]>();
|
||||
try {
|
||||
stmt = connection.createStatement();
|
||||
rs = stmt.executeQuery(sql);
|
||||
while (rs.next()) {
|
||||
String columnName = rs.getString("Column Name").trim(); //$NON-NLS-1$
|
||||
String pk = rs.getString("Primary?");//$NON-NLS-1$
|
||||
String[] r = new String[] { columnName, pk };
|
||||
list.add(r);
|
||||
if (dbMajorVersion > 12) {
|
||||
sql = "SELECT * from DBC.INDICESV WHERE UPPER(databasename) = UPPER('" + schema //$NON-NLS-1$
|
||||
+ "') AND UPPER(tablename) = UPPER('" + table + "') AND UPPER(UniqueFlag) = UPPER('Y')"; //$NON-NLS-1$//$NON-NLS-2$
|
||||
rs = getResultSet(catalog, schema, table, sql);
|
||||
while (rs.next()) {
|
||||
columnName = rs.getString("ColumnName").trim(); //$NON-NLS-1$
|
||||
String indexType = rs.getString("IndexType");//$NON-NLS-1$
|
||||
String[] r = new String[] { columnName, indexType };
|
||||
list.add(r);
|
||||
}
|
||||
} else {
|
||||
stmt = connection.createStatement();
|
||||
rs = stmt.executeQuery(sql);
|
||||
while (rs.next()) {
|
||||
columnName = rs.getString("Column Name").trim(); //$NON-NLS-1$
|
||||
String pk = rs.getString("Primary?");//$NON-NLS-1$
|
||||
String[] r = new String[] { columnName, pk };
|
||||
list.add(r);
|
||||
}
|
||||
}
|
||||
|
||||
} catch (SQLException e) {
|
||||
throw new RuntimeException(e);
|
||||
} finally {
|
||||
@@ -124,6 +136,18 @@ public class TeradataDataBaseMetadata extends FakeDatabaseMetaData {
|
||||
return tableResultSet;
|
||||
}
|
||||
|
||||
public ResultSet getResultSet(String catalog, String schema, String table, String sql) throws SQLException {
|
||||
ResultSet rs = null;
|
||||
Statement stmt = null;
|
||||
try {
|
||||
stmt = connection.createStatement();
|
||||
rs = stmt.executeQuery(sql);
|
||||
} catch (SQLException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return rs;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
@@ -173,12 +197,17 @@ public class TeradataDataBaseMetadata extends FakeDatabaseMetaData {
|
||||
}
|
||||
// end
|
||||
String sql = null;
|
||||
int dbMajorVersion = connection.getMetaData().getDatabaseMajorVersion();
|
||||
String sysTable = "DBC.TABLES";//$NON-NLS-1$
|
||||
if (dbMajorVersion > 12) {
|
||||
sysTable = "DBC.TABLESV";//$NON-NLS-1$
|
||||
}
|
||||
if (types != null && types.length > 0) {
|
||||
sql = "SELECT * from DBC.TABLES WHERE UPPER(databasename) = UPPER('" + database //$NON-NLS-1$
|
||||
sql = "SELECT * from " + sysTable + " WHERE UPPER(databasename) = UPPER('" + database //$NON-NLS-1$//$NON-NLS-2$
|
||||
+ "') AND tablekind " + addTypesToSql(types); //$NON-NLS-1$
|
||||
} else {
|
||||
// When the types is empty, all the tables and views will be retrieved.
|
||||
sql = "SELECT * from DBC.TABLES WHERE UPPER(databasename) = UPPER('" + database //$NON-NLS-1$
|
||||
sql = "SELECT * from " + sysTable + " WHERE UPPER(databasename) = UPPER('" + database //$NON-NLS-1$//$NON-NLS-2$
|
||||
+ "') AND (tablekind = 'T' or tablekind = 'V')"; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
@@ -287,15 +316,25 @@ public class TeradataDataBaseMetadata extends FakeDatabaseMetaData {
|
||||
@Override
|
||||
public ResultSet getColumns(String catalog, String database, String tableNamePattern, String columnNamePattern)
|
||||
throws SQLException {
|
||||
// for real
|
||||
|
||||
String sql;
|
||||
// for real sql
|
||||
if (databaseName != null && !databaseName.trim().isEmpty()) {
|
||||
database = databaseName;
|
||||
}
|
||||
// all the columns of this table will be retrieved.
|
||||
String sql = null;
|
||||
int dbMajorVersion = connection.getMetaData().getDatabaseMajorVersion();
|
||||
if (!StringUtils.isEmpty(database)) {
|
||||
sql = "HELP COLUMN \"" + database + "\".\"" + tableNamePattern + "\".* ";//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
|
||||
if (dbMajorVersion > 12) {
|
||||
sql = "SELECT * from DBC.COLUMNSV WHERE UPPER(databasename) = UPPER('" + database //$NON-NLS-1$
|
||||
+ "') AND UPPER(tablename) = UPPER('" + tableNamePattern + "')" + " Order by tablename "; //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
|
||||
}
|
||||
} else {
|
||||
sql = "HELP COLUMN \"" + tableNamePattern + "\".* ";//$NON-NLS-1$//$NON-NLS-2$
|
||||
if (dbMajorVersion > 12) {
|
||||
sql = "SELECT * from DBC.COLUMNSV WHERE UPPER(tablename) = UPPER('" + tableNamePattern + "')" + " Order by tablename "; //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
|
||||
}
|
||||
}
|
||||
|
||||
ResultSet rs = null;
|
||||
Statement stmt = null;
|
||||
List<String[]> list = new ArrayList<String[]>();
|
||||
@@ -304,16 +343,34 @@ public class TeradataDataBaseMetadata extends FakeDatabaseMetaData {
|
||||
rs = stmt.executeQuery(sql);
|
||||
while (rs.next()) {
|
||||
String tableName = tableNamePattern;
|
||||
String columnName = rs.getString("Column Name").trim(); //$NON-NLS-1$
|
||||
String typeName = rs.getString("Type"); //$NON-NLS-1$
|
||||
String columnSize = rs.getString("Max Length"); //$NON-NLS-1$
|
||||
String decimalDigits = rs.getString("Decimal Fractional Digits"); //$NON-NLS-1$
|
||||
String columnName = null;
|
||||
String typeName = null;
|
||||
String columnSize = null;
|
||||
String decimalDigits = null;
|
||||
if (dbMajorVersion > 12) {
|
||||
columnName = rs.getString("ColumnName").trim(); //$NON-NLS-1$
|
||||
typeName = rs.getString("ColumnType"); //$NON-NLS-1$
|
||||
columnSize = rs.getString("ColumnLength"); //$NON-NLS-1$
|
||||
decimalDigits = rs.getString("DecimalFractionalDigits"); //$NON-NLS-1$
|
||||
} else {
|
||||
columnName = rs.getString("Column Name").trim(); //$NON-NLS-1$
|
||||
typeName = rs.getString("Type"); //$NON-NLS-1$
|
||||
columnSize = rs.getString("Max Length"); //$NON-NLS-1$
|
||||
decimalDigits = rs.getString("Decimal Fractional Digits"); //$NON-NLS-1$
|
||||
}
|
||||
String isNullable;
|
||||
if ("Y".equals(rs.getString("Nullable"))) { //$NON-NLS-1$ //$NON-NLS-2$
|
||||
isNullable = "YES"; //$NON-NLS-1$
|
||||
} else {
|
||||
isNullable = rs.getString("Nullable"); //$NON-NLS-1$
|
||||
}
|
||||
// fill default value if null
|
||||
if (typeName == null) {
|
||||
typeName = "CV"; //$NON-NLS-1$
|
||||
}
|
||||
if (columnSize == null) {
|
||||
columnSize = "255";//$NON-NLS-1$
|
||||
}
|
||||
if (decimalDigits == null) {
|
||||
decimalDigits = "0";//$NON-NLS-1$
|
||||
}
|
||||
@@ -324,7 +381,6 @@ public class TeradataDataBaseMetadata extends FakeDatabaseMetaData {
|
||||
columnDef };
|
||||
list.add(r);
|
||||
}
|
||||
|
||||
} catch (SQLException e) {
|
||||
throw new RuntimeException(e);
|
||||
} finally {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.commons.ui</artifactId>
|
||||
|
||||
@@ -18,7 +18,6 @@ import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.OperationCanceledException;
|
||||
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
|
||||
import org.eclipse.jface.operation.IRunnableWithProgress;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.talend.commons.ui.runtime.thread.AsynchronousThreading;
|
||||
@@ -98,22 +97,24 @@ public abstract class ProgressDialog {
|
||||
display.asyncExec(new Runnable() {
|
||||
|
||||
public void run() {
|
||||
final ProgressMonitorDialog progressMonitorDialog = new ProgressMonitorDialog(parentShell);
|
||||
final ProgressMonitorDialog progressMonitorDialog = newProgressMonitorDialog(parentShell);
|
||||
if (timeBeforeShowDialog > 0) {
|
||||
progressMonitorDialog.setOpenOnRun(false);
|
||||
if (progressMonitorDialog != null) {
|
||||
progressMonitorDialog.setOpenOnRun(false);
|
||||
}
|
||||
// for bug 16801
|
||||
AsynchronousThreading asynchronousThreading = new AsynchronousThreading(timeBeforeShowDialog, true,
|
||||
display, new Runnable() {
|
||||
|
||||
public void run() {
|
||||
progressMonitorDialog.open();
|
||||
openDialog(progressMonitorDialog);
|
||||
}
|
||||
});
|
||||
asynchronousThreading.start();
|
||||
}
|
||||
|
||||
try {
|
||||
progressMonitorDialog.run(false, true, op);
|
||||
dialogRun(progressMonitorDialog, op);
|
||||
} catch (InvocationTargetException e) {
|
||||
// Pass it outside the workspace runnable
|
||||
iteHolder[0] = e;
|
||||
@@ -128,22 +129,24 @@ public abstract class ProgressDialog {
|
||||
display.syncExec(new Runnable() {
|
||||
|
||||
public void run() {
|
||||
final ProgressMonitorDialog progressMonitorDialog = new ProgressMonitorDialog(parentShell);
|
||||
final ProgressMonitorDialog progressMonitorDialog = newProgressMonitorDialog(parentShell);
|
||||
if (timeBeforeShowDialog > 0) {
|
||||
progressMonitorDialog.setOpenOnRun(false);
|
||||
if (progressMonitorDialog != null) {
|
||||
progressMonitorDialog.setOpenOnRun(false);
|
||||
}
|
||||
// for bug 16801
|
||||
AsynchronousThreading asynchronousThreading = new AsynchronousThreading(timeBeforeShowDialog, true,
|
||||
display, new Runnable() {
|
||||
|
||||
public void run() {
|
||||
progressMonitorDialog.open();
|
||||
openDialog(progressMonitorDialog);
|
||||
}
|
||||
});
|
||||
asynchronousThreading.start();
|
||||
}
|
||||
|
||||
try {
|
||||
progressMonitorDialog.run(false, true, op);
|
||||
dialogRun(progressMonitorDialog, op);
|
||||
} catch (InvocationTargetException e) {
|
||||
// Pass it outside the workspace runnable
|
||||
iteHolder[0] = e;
|
||||
@@ -165,6 +168,19 @@ public abstract class ProgressDialog {
|
||||
}
|
||||
}
|
||||
|
||||
protected ProgressMonitorDialog newProgressMonitorDialog(Shell shell) {
|
||||
return new ProgressMonitorDialog(shell);
|
||||
}
|
||||
|
||||
protected void openDialog(ProgressMonitorDialog dialog) {
|
||||
dialog.open();
|
||||
}
|
||||
|
||||
protected void dialogRun(ProgressMonitorDialog dialog, IRunnableWithProgress op)
|
||||
throws InvocationTargetException, InterruptedException {
|
||||
dialog.run(false, true, op);
|
||||
}
|
||||
|
||||
public abstract void run(final IProgressMonitor monitor) throws InvocationTargetException, InterruptedException;
|
||||
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ import org.eclipse.swt.graphics.Rectangle;
|
||||
import org.eclipse.swt.widgets.Control;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.talend.commons.ui.runtime.image.ImageUtils;
|
||||
import org.talend.commons.utils.system.EnvironmentUtils;
|
||||
|
||||
/**
|
||||
* <code>ImageCapture</code> provides utilities to capture images.
|
||||
@@ -53,11 +54,7 @@ public class ImageCapture {
|
||||
*
|
||||
* @param control
|
||||
*/
|
||||
public static Image capture(Control control) {
|
||||
|
||||
// First try not conclusive...
|
||||
// So I should use org.eclipse.ve.internal.swt.targetvm.win32.ImageCapture class which work perfectly
|
||||
|
||||
public static Image capture(Control control) {
|
||||
Shell shell = control.getShell();
|
||||
Rectangle boundsShell = shell.getBounds();
|
||||
|
||||
@@ -71,7 +68,13 @@ public class ImageCapture {
|
||||
GC gc = new GC(control);
|
||||
Image image = new Image(control.getDisplay(), control.getSize().x, control.getSize().y);
|
||||
|
||||
gc.copyArea(image, 0, 0);
|
||||
boolean skipCopyArea = false;
|
||||
if (EnvironmentUtils.isMacOsSytem()) {
|
||||
skipCopyArea = true;
|
||||
}
|
||||
if (!skipCopyArea) {
|
||||
gc.copyArea(image, 0, 0);
|
||||
}
|
||||
gc.dispose();
|
||||
return image;
|
||||
// return getImage(control, control.getSize().x, control.getSize().y, true);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.core.repository</artifactId>
|
||||
|
||||
@@ -51,4 +51,15 @@ public final class Constant {
|
||||
*/
|
||||
public static final String FILE_LIST_EVENT_PROPERTY_KEY = "fileList"; //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* suffix used when issuing an event on the OSGI event bus when the main project is reloaded.
|
||||
*/
|
||||
public static final String PROJECT_RELOAD_EVENT_SUFFIX = "project"; //$NON-NLS-1$
|
||||
|
||||
|
||||
/**
|
||||
* key used to get/set the property of an event related to a list of files modified in the repository
|
||||
* (REPOSITORY_ITEM_EVENT_PREFIX). The value is the Collection of String (list of all files modified).
|
||||
*/
|
||||
public static final String PROJECT_RELOAD_PROPERTY_KEY = "project"; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
@@ -271,7 +271,7 @@ public abstract class AbstractEMFRepositoryFactory extends AbstractRepositoryFac
|
||||
}
|
||||
|
||||
for (IRepositoryViewObject current : list) {
|
||||
if (name.equalsIgnoreCase(current.getProperty().getLabel())
|
||||
if ((name.equalsIgnoreCase(current.getProperty().getLabel()) || name.equalsIgnoreCase(current.getProperty().getDisplayName()))
|
||||
&& item.getProperty().getId() != current.getProperty().getId()) {
|
||||
// To check SQLPattern in same path. see bug 0005038: unable to add a SQLPattern into repository.
|
||||
if (!isAllowMultipleName || current.getProperty().getItem().getState().getPath().equals(path)) {
|
||||
|
||||
@@ -76,7 +76,7 @@ public class CheckJobDeleteReference extends AbstractCheckDeleteItemReference im
|
||||
Set<Project> refParentProjects = new HashSet<Project>();
|
||||
try {
|
||||
refParentProjects.add(ProjectManager.getInstance().getCurrentProject());
|
||||
refParentProjects.addAll(ProjectManager.getInstance().getReferencedProjects());
|
||||
// refParentProjects.addAll(ProjectManager.getInstance().getReferencedProjects());
|
||||
for (Project refP : refParentProjects) {
|
||||
|
||||
// get all types processes such as standard job, big data streaming job, big data batch job;
|
||||
|
||||
@@ -61,7 +61,8 @@ public class CheckJobletDeleteReference extends AbstractCheckDeleteItemReference
|
||||
Set<Project> refParentProjects = new HashSet<Project>();
|
||||
try {
|
||||
refParentProjects.add(ProjectManager.getInstance().getCurrentProject());
|
||||
refParentProjects.addAll(ProjectManager.getInstance().getReferencedProjects());
|
||||
//the item in mainProject never be used in referenceProject TDI-21403
|
||||
//refParentProjects.addAll(ProjectManager.getInstance().getReferencedProjects());
|
||||
for (Project refP : refParentProjects) {
|
||||
List<IRepositoryViewObject> processes = new ArrayList<IRepositoryViewObject>(50);
|
||||
|
||||
|
||||
@@ -126,6 +126,9 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
|
||||
|
||||
private static ProjectRepositoryNode defaultProjRepoNode;
|
||||
|
||||
private static ProjectRepositoryNode dummyProjRepoNode = new ProjectRepositoryNode(null, null,
|
||||
ENodeType.STABLE_SYSTEM_FOLDER);
|
||||
|
||||
private final IProxyRepositoryFactory factory = ProxyRepositoryFactory.getInstance();
|
||||
|
||||
private org.talend.core.model.general.Project project;
|
||||
@@ -169,6 +172,9 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
|
||||
}
|
||||
|
||||
public static ProjectRepositoryNode getInstance() {
|
||||
if (!ProxyRepositoryFactory.getInstance().isFullLogonFinished()) {
|
||||
return dummyProjRepoNode;
|
||||
}
|
||||
if (defaultProjRepoNode == null) {
|
||||
defaultProjRepoNode = new ProjectRepositoryNode(null, null, ENodeType.STABLE_SYSTEM_FOLDER);
|
||||
defaultProjRepoNode.initialize(null);
|
||||
@@ -469,7 +475,7 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
|
||||
String parentBranch = ProjectManager.getInstance().getMainProjectBranch(project);
|
||||
if (refProject.getBranch() == null || parentBranch.equals(refProject.getBranch())) {
|
||||
Project p = refProject.getReferencedProject();
|
||||
//no need caching
|
||||
// no need caching
|
||||
/*
|
||||
* List<Project> list = nodeAndProject.get(parent); if (list == null) { list = new ArrayList<Project>();
|
||||
* nodeAndProject.put(parent, list); } if (list.contains(p)) { return; } else { list.add(p); }
|
||||
@@ -596,7 +602,7 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
|
||||
|
||||
public void buildDeletedItemsTree(RepositoryNode rootNode) {
|
||||
// build deleted folders
|
||||
//need to use the current project to avoid the cache influence
|
||||
// need to use the current project to avoid the cache influence
|
||||
List<String> folders = RecycleBinManager.getInstance()
|
||||
.getDeletedFolders(ProjectManager.getInstance().getCurrentProject());
|
||||
Collections.sort(folders);
|
||||
@@ -714,7 +720,7 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
|
||||
}
|
||||
} else if (node.getType() == ENodeType.SIMPLE_FOLDER) {
|
||||
RepositoryNode pNode = getTestCaseParent(node.getChildren(), originalID);
|
||||
if(pNode!=null){
|
||||
if (pNode != null) {
|
||||
return pNode;
|
||||
}
|
||||
}
|
||||
@@ -1190,10 +1196,7 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
|
||||
if (parent.getType().equals(ENodeType.SYSTEM_FOLDER)) {
|
||||
for (ProjectReference refProject : (List<ProjectReference>) project.getEmfProject().getReferencedProjects()) {
|
||||
String parentBranch = ProjectManager.getInstance().getMainProjectBranch(project);
|
||||
// if not a DB ref project, modified by nma, order 12519
|
||||
if (refProject.getReferencedProject().getUrl() != null
|
||||
&& refProject.getReferencedProject().getUrl().startsWith("teneo") //$NON-NLS-1$
|
||||
|| (refProject.getBranch() != null && refProject.getBranch().equals(parentBranch))) {
|
||||
if (refProject.getBranch() == null || refProject.getBranch().equals(parentBranch)) {
|
||||
Project emfProject = refProject.getReferencedProject();
|
||||
ProjectRepositoryNode referencedProjectNode = new ProjectRepositoryNode(
|
||||
new org.talend.core.model.general.Project(emfProject), null, parent, this,
|
||||
@@ -2000,7 +2003,17 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
|
||||
}
|
||||
|
||||
public void cleanup() {
|
||||
// reset it
|
||||
defaultProjRepoNode = null;
|
||||
if (defaultProjRepoNode == null) {
|
||||
return;
|
||||
}
|
||||
// reinitialize every children
|
||||
for (IRepositoryNode childNode : defaultProjRepoNode.getChildren()) {
|
||||
if (childNode instanceof RepositoryNode) {
|
||||
RepositoryNode node = (RepositoryNode) childNode;
|
||||
node.setInitialized(false);
|
||||
node.getChildren().clear();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,6 +127,7 @@ import org.talend.repository.model.IProxyRepositoryFactory;
|
||||
import org.talend.repository.model.RepositoryConstants;
|
||||
import org.talend.utils.io.FilesUtils;
|
||||
import org.talend.utils.json.JSONArray;
|
||||
|
||||
import orgomg.cwm.objectmodel.core.ModelElement;
|
||||
|
||||
/**
|
||||
@@ -1825,7 +1826,9 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
|
||||
currentMonitor = subMonitor.newChild(1, SubMonitor.SUPPRESS_NONE);
|
||||
currentMonitor.beginTask(Messages.getString("ProxyRepositoryFactory.initializeProjectConnection"), 1); //$NON-NLS-1$
|
||||
ProjectManager.getInstance().getBeforeLogonRecords().clear();
|
||||
this.repositoryFactoryFromProvider.beforeLogon(project);
|
||||
ProjectManager.getInstance().getBeforeLogonRecords().clear();
|
||||
|
||||
// monitorWrap.worked(1);
|
||||
TimeMeasure.step("logOnProject", "beforeLogon"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
@@ -1843,13 +1846,17 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
|
||||
currentMonitor = subMonitor.newChild(1, SubMonitor.SUPPRESS_NONE);
|
||||
currentMonitor.beginTask("Execute before logon migrations tasks", 1); //$NON-NLS-1$
|
||||
ProjectManager.getInstance().getMigrationRecords().clear();
|
||||
executeMigrations(project, true, currentMonitor);
|
||||
ProjectManager.getInstance().getMigrationRecords().clear();
|
||||
// monitorWrap.worked(1);
|
||||
TimeMeasure.step("logOnProject", "executeMigrations(beforeLogonTasks)"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
|
||||
currentMonitor = subMonitor.newChild(1, SubMonitor.SUPPRESS_NONE);
|
||||
currentMonitor.beginTask(Messages.getString("ProxyRepositoryFactory.logonInProgress"), 1); //$NON-NLS-1$
|
||||
ProjectManager.getInstance().getLogonRecords().clear();
|
||||
this.repositoryFactoryFromProvider.logOnProject(project);
|
||||
ProjectManager.getInstance().getLogonRecords().clear();
|
||||
// monitorWrap.worked(1);
|
||||
TimeMeasure.step("logOnProject", "logOnProject"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
|
||||
@@ -1867,7 +1874,9 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
|
||||
currentMonitor = subMonitor.newChild(1, SubMonitor.SUPPRESS_NONE);
|
||||
currentMonitor.beginTask(Messages.getString("ProxyRepositoryFactory.exec.migration.tasks"), 1); //$NON-NLS-1$
|
||||
ProjectManager.getInstance().getMigrationRecords().clear();
|
||||
executeMigrations(project, false, currentMonitor);
|
||||
ProjectManager.getInstance().getMigrationRecords().clear();
|
||||
TimeMeasure.step("logOnProject", "executeMigrations(afterLogonTasks)"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
if (monitor != null && monitor.isCanceled()) {
|
||||
throw new OperationCanceledException(""); //$NON-NLS-1$
|
||||
@@ -1876,7 +1885,18 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
if (coreService != null) {
|
||||
// clean workspace
|
||||
currentMonitor.beginTask(Messages.getString("ProxyRepositoryFactory.cleanWorkspace"), 1); //$NON-NLS-1$
|
||||
coreService.deleteAllJobs(false);
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IRunProcessService.class)) {
|
||||
IRunProcessService runProcessService = (IRunProcessService) GlobalServiceRegister.getDefault().getService(
|
||||
IRunProcessService.class);
|
||||
try {
|
||||
runProcessService.deleteAllJobs(false);
|
||||
runProcessService.getTalendProcessJavaProject().cleanMavenFiles(monitor);
|
||||
TimeMeasure.step("logOnProject", "clean Maven files"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
|
||||
TimeMeasure.step("logOnProject", "clean Java project"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
if (workspace instanceof Workspace) {
|
||||
((Workspace) workspace).getFileSystemManager().getHistoryStore().clean(currentMonitor);
|
||||
@@ -1967,6 +1987,17 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
public void logOffProject() {
|
||||
// getRepositoryContext().setProject(null);
|
||||
repositoryFactoryFromProvider.logOffProject();
|
||||
|
||||
/**
|
||||
* If intergrate TUP-5048, should add those codes upon the [fullLogonFinished = false], since the gitHandler
|
||||
* refactor is after fixed TUP-5048, I changed the order
|
||||
*/
|
||||
// ProjectRepositoryNode root = ProjectRepositoryNode.getInstance();
|
||||
// if (root != null) {
|
||||
// root.setEnableDisposed(true);
|
||||
// root.dispose();
|
||||
// }
|
||||
|
||||
fullLogonFinished = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -179,7 +179,7 @@ public abstract class AbstractRepoViewSeeker implements IRepositorySeeker<IRepos
|
||||
if (preExpandTypes != null) {
|
||||
for (ERepositoryObjectType preExpandType : preExpandTypes) {
|
||||
IRepositoryNode preExpandNode = root.getRootRepositoryNode(preExpandType);
|
||||
if (preExpandNode != null) {
|
||||
if (preExpandNode != null && viewer != null) {
|
||||
viewer.expandToLevel(preExpandNode, expandLevel);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -795,7 +795,7 @@ public class DeleteAction extends AContextualAction {
|
||||
Set<Project> refParentProjects = new HashSet<Project>();
|
||||
try {
|
||||
refParentProjects.add(ProjectManager.getInstance().getCurrentProject());
|
||||
refParentProjects.addAll(ProjectManager.getInstance().getReferencedProjects());
|
||||
// refParentProjects.addAll(ProjectManager.getInstance().getReferencedProjects());
|
||||
for (Project refP : refParentProjects) {
|
||||
List<IRepositoryViewObject> objList = new ArrayList<IRepositoryViewObject>();
|
||||
List<IRepositoryViewObject> allJobVersions = new ArrayList<IRepositoryViewObject>();
|
||||
@@ -1007,7 +1007,7 @@ public class DeleteAction extends AContextualAction {
|
||||
Set<Project> refParentProjects = new HashSet<Project>();
|
||||
try {
|
||||
refParentProjects.add(ProjectManager.getInstance().getCurrentProject());
|
||||
refParentProjects.addAll(ProjectManager.getInstance().getReferencedProjects());
|
||||
// refParentProjects.addAll(ProjectManager.getInstance().getReferencedProjects());
|
||||
// if (currentProject != null) {
|
||||
// final Project[] readProject = factory.readProject();
|
||||
// for (Project p : readProject) {
|
||||
|
||||
@@ -369,9 +369,18 @@ public class XmiResourceManager {
|
||||
return getItemResource(item, true);
|
||||
}
|
||||
|
||||
public Resource getItemResource(ResourceSet resourceSet, Item item) {
|
||||
return getItemResource(resourceSet, item, true);
|
||||
}
|
||||
|
||||
public Resource getItemResource(Item item, boolean forceLoad) {
|
||||
if (item == null)
|
||||
return getItemResource(getResourceSet(), item, forceLoad);
|
||||
}
|
||||
|
||||
public Resource getItemResource(ResourceSet resourceSet, Item item, boolean forceLoad) {
|
||||
if (item == null) {
|
||||
return null;
|
||||
}
|
||||
URI itemResourceURI = null;
|
||||
if (item.getFileExtension() != null) {
|
||||
itemResourceURI = getItemResourceURI(getItemURI(item), item.getFileExtension());
|
||||
@@ -381,13 +390,13 @@ public class XmiResourceManager {
|
||||
} else {
|
||||
itemResourceURI = getItemResourceURI(getItemURI(item));
|
||||
}
|
||||
Resource itemResource = getResourceSet().getResource(itemResourceURI, false);
|
||||
Resource itemResource = resourceSet.getResource(itemResourceURI, false);
|
||||
if (forceLoad && itemResource == null) {
|
||||
if (item instanceof FileItem) {
|
||||
itemResource = new ByteArrayResource(itemResourceURI);
|
||||
getResourceSet().getResources().add(itemResource);
|
||||
resourceSet.getResources().add(itemResource);
|
||||
}
|
||||
itemResource = getResourceSet().getResource(itemResourceURI, true);
|
||||
itemResource = resourceSet.getResource(itemResourceURI, true);
|
||||
}
|
||||
return itemResource;
|
||||
}
|
||||
@@ -400,10 +409,14 @@ public class XmiResourceManager {
|
||||
* Get a resource obj from Item resource file. if the resouce file does not exist ,will create it first.
|
||||
*/
|
||||
public Resource getScreenshotResource(Item item, boolean createIfNotExist) {
|
||||
return getScreenshotResource(item, createIfNotExist, false);
|
||||
return getScreenshotResource(getResourceSet(), item, createIfNotExist, false);
|
||||
}
|
||||
|
||||
public Resource getScreenshotResource(Item item, boolean createIfNotExist, boolean forceReload) {
|
||||
return getScreenshotResource(getResourceSet(), item, createIfNotExist, forceReload);
|
||||
}
|
||||
|
||||
public Resource getScreenshotResource(ResourceSet resourceSet, Item item, boolean createIfNotExist, boolean forceReload) {
|
||||
URI itemResourceURI = null;
|
||||
itemResourceURI = getScreenshotResourceURI(getItemURI(item));
|
||||
boolean fileExist = false;
|
||||
@@ -526,6 +539,10 @@ public class XmiResourceManager {
|
||||
// }
|
||||
|
||||
public List<Resource> getAffectedResources(Property property) {
|
||||
return getAffectedResources(getResourceSet(), property);
|
||||
}
|
||||
|
||||
public List<Resource> getAffectedResources(ResourceSet resourceSet, Property property) {
|
||||
List<Resource> resources = new ArrayList<Resource>();
|
||||
List<Resource> allRes = resourceSet.getResources();
|
||||
synchronized (allRes) {
|
||||
@@ -547,8 +564,8 @@ public class XmiResourceManager {
|
||||
if (!currentResource.getURI().lastSegment().equals(getProjectFilename())) {
|
||||
resources.add(currentResource);
|
||||
}
|
||||
if (!getResourceSet().getResources().contains(currentResource)) {
|
||||
getResourceSet().getResources().add(currentResource);
|
||||
if (!resourceSet.getResources().contains(currentResource)) {
|
||||
resourceSet.getResources().add(currentResource);
|
||||
}
|
||||
}
|
||||
if (object instanceof ReferenceFileItem) {
|
||||
@@ -591,8 +608,8 @@ public class XmiResourceManager {
|
||||
resources.add(currentResource);
|
||||
}
|
||||
}
|
||||
if (!getResourceSet().getResources().contains(currentResource)) {
|
||||
getResourceSet().getResources().add(currentResource);
|
||||
if (!resourceSet.getResources().contains(currentResource)) {
|
||||
resourceSet.getResources().add(currentResource);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -608,7 +625,7 @@ public class XmiResourceManager {
|
||||
|
||||
if (property.getItem() instanceof ProcessItem || property.getItem() instanceof JobletProcessItem || isTestContainer) {
|
||||
if (property.eResource() != null) {
|
||||
Resource screenshotResource = getScreenshotResource(property.getItem());
|
||||
Resource screenshotResource = getScreenshotResource(resourceSet, property.getItem(), false, false);
|
||||
if (screenshotResource != null) {
|
||||
resources.add(screenshotResource);
|
||||
}
|
||||
@@ -850,10 +867,14 @@ public class XmiResourceManager {
|
||||
}
|
||||
|
||||
public void unloadResources(Property property) {
|
||||
for (Resource resource : getAffectedResources(property)) {
|
||||
unloadResources(getResourceSet(), property);
|
||||
}
|
||||
|
||||
public void unloadResources(ResourceSet resourceSet, Property property) {
|
||||
for (Resource resource : getAffectedResources(resourceSet, property)) {
|
||||
if (resource != null) {
|
||||
resource.unload();
|
||||
getResourceSet().getResources().remove(resource);
|
||||
resourceSet.getResources().remove(resource);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.core.runtime</artifactId>
|
||||
|
||||
@@ -215,8 +215,8 @@ public class FilesUtils {
|
||||
copyFolder(current, newFolder, targetBaseFolder, emptyTargetBeforeCopy, sourceFolderFilter,
|
||||
sourceFileFilter, copyFolder, synchronize);
|
||||
} else {
|
||||
copyFolder(current, target, targetBaseFolder, emptyTargetBeforeCopy, sourceFolderFilter,
|
||||
sourceFileFilter, copyFolder, synchronize);
|
||||
copyFolder(current, target, targetBaseFolder, emptyTargetBeforeCopy, sourceFolderFilter, sourceFileFilter,
|
||||
copyFolder, synchronize);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -339,7 +339,8 @@ public class FilesUtils {
|
||||
return getFilesFromFolder(bundle, path, extension, true, false);
|
||||
}
|
||||
|
||||
public static List<URL> getFilesFromFolder(Bundle bundle, String path, String extension, boolean absoluteURL, boolean nested) {
|
||||
public static List<URL> getFilesFromFolder(Bundle bundle, String path, String extension, boolean absoluteURL,
|
||||
boolean nested) {
|
||||
List<URL> toReturn = new ArrayList<URL>();
|
||||
|
||||
Enumeration entryPaths = bundle.getEntryPaths(path);
|
||||
@@ -484,7 +485,7 @@ public class FilesUtils {
|
||||
}
|
||||
|
||||
public static List<File> getDllFilesFromFolder(File file, String fileName) throws MalformedURLException {
|
||||
return getFilesFromFolderByName(file, fileName, new String[] { ".dll" }, null, true); //$NON-NLS-1$
|
||||
return getFilesFromFolderByName(file, fileName, new String[] { ".dll" }, null, true); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
public static FileFilter getExcludeSystemFilesFilter() {
|
||||
@@ -492,7 +493,7 @@ public class FilesUtils {
|
||||
|
||||
@Override
|
||||
public boolean accept(File pathname) {
|
||||
return !isSVNFolder(pathname) && !pathname.toString().endsWith(".dummy"); //$NON-NLS-1$
|
||||
return !isSVNFolder(pathname) && !pathname.toString().endsWith(".dummy"); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
};
|
||||
@@ -1142,8 +1143,8 @@ public class FilesUtils {
|
||||
return filePath;
|
||||
}
|
||||
|
||||
public static BufferedReader isFilePathAvailable(String fileStr, FileConnection connection) throws IOException,
|
||||
UnsupportedEncodingException, FileNotFoundException {
|
||||
public static BufferedReader isFilePathAvailable(String fileStr, FileConnection connection)
|
||||
throws IOException, UnsupportedEncodingException, FileNotFoundException {
|
||||
BufferedReader in;
|
||||
File file = new File(fileStr);
|
||||
Charset guessedCharset = CharsetToolkit.guessEncoding(file, 4096);
|
||||
@@ -1156,23 +1157,15 @@ public class FilesUtils {
|
||||
return in;
|
||||
}
|
||||
|
||||
protected static List<IResource> getExistedResources(IResource file, boolean ignoreFileNameCase) {
|
||||
List<IResource> existedFiles = new ArrayList<IResource>();
|
||||
protected static List<IResource> getExistedResources(IResource file, boolean ignoreFileNameCase) throws CoreException {
|
||||
List<IResource> existedFiles = new ArrayList<>();
|
||||
if (ignoreFileNameCase) {
|
||||
final String currentFileName = file.getName();
|
||||
File parentFile = file.getLocation().toFile().getParentFile();
|
||||
IContainer parentFile = file.getParent();
|
||||
if (parentFile.exists()) {
|
||||
File[] listFiles = parentFile.listFiles(new FilenameFilter() {
|
||||
|
||||
@Override
|
||||
public boolean accept(File dir, String name) {
|
||||
return name.equalsIgnoreCase(currentFileName);
|
||||
}
|
||||
});
|
||||
if (listFiles != null) {
|
||||
for (File f : listFiles) {
|
||||
IFile sameFile = file.getParent().getFile(new Path(f.getName()));
|
||||
existedFiles.add(sameFile);
|
||||
for (IResource resource: parentFile.members()) {
|
||||
if (resource.getName().equalsIgnoreCase(currentFileName)) {
|
||||
existedFiles.add(resource);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1184,9 +1177,6 @@ public class FilesUtils {
|
||||
|
||||
public static void removeExistedResources(IProgressMonitor monitor, IResource currentResources, boolean ignoreFileNameCase,
|
||||
boolean overwrite) throws Exception {
|
||||
final IContainer parent = currentResources.getParent();
|
||||
parent.refreshLocal(IResource.DEPTH_ONE, monitor);
|
||||
|
||||
List<IResource> existedSameFiles = getExistedResources(currentResources, ignoreFileNameCase);
|
||||
|
||||
// existed current one and not overwrite.
|
||||
@@ -1195,17 +1185,8 @@ public class FilesUtils {
|
||||
}
|
||||
// delete all
|
||||
for (IResource resource : existedSameFiles) {
|
||||
File f = resource.getLocation().toFile();
|
||||
if (f.exists()) {
|
||||
if (f.isDirectory()) {
|
||||
org.talend.utils.io.FilesUtils.deleteFolder(f, true);
|
||||
} else {
|
||||
f.delete();
|
||||
}
|
||||
}
|
||||
resource.delete(true, monitor);
|
||||
}
|
||||
|
||||
parent.refreshLocal(IResource.DEPTH_ONE, monitor);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ public final class ResourceUtils {
|
||||
public static IFolder getFolder(IProject source, String folderName, boolean forceExists) throws PersistenceException {
|
||||
IFolder processFolder = source.getFolder(folderName);
|
||||
|
||||
if (forceExists && !processFolder.getLocation().toFile().exists()) {
|
||||
if (forceExists && !processFolder.exists()) {
|
||||
String msg = Messages.getString("resources.folder.notGet", folderName, source.getName()); //$NON-NLS-1$
|
||||
throw new ResourceNotFoundException(msg);
|
||||
}
|
||||
|
||||
@@ -96,6 +96,8 @@ public interface ILibraryManagerService extends IService {
|
||||
IProgressMonitor... monitorWrap);
|
||||
|
||||
public boolean retrieve(ModuleNeeded module, String pathToStore, boolean showDialog, IProgressMonitor... monitorWrap);
|
||||
|
||||
public boolean retrieve(ModuleNeeded module, String pathToStore, boolean showDialog, NexusServerBean bean, IProgressMonitor... monitorWrap);
|
||||
|
||||
/**
|
||||
* List all the jars (or other files) available.
|
||||
|
||||
@@ -32,9 +32,11 @@ import org.talend.commons.utils.workbench.resources.ResourceUtils;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.ILibraryManagerService;
|
||||
import org.talend.core.database.conn.ConnParameterKeys;
|
||||
import org.talend.core.model.general.ModuleNeeded;
|
||||
import org.talend.core.model.general.Project;
|
||||
import org.talend.core.model.metadata.IMetadataConnection;
|
||||
import org.talend.core.runtime.hd.IHDistribution;
|
||||
import org.talend.core.runtime.hd.IHDistributionVersion;
|
||||
import org.talend.core.runtime.hd.hive.HiveMetadataHelper;
|
||||
import org.talend.repository.ProjectManager;
|
||||
import org.talend.utils.io.FilesUtils;
|
||||
@@ -52,6 +54,8 @@ public class ClassLoaderFactory {
|
||||
|
||||
public final static String SEPARATOR = ";"; //$NON-NLS-1$
|
||||
|
||||
public final static String KEY_SEPARATOR = ":"; //$NON-NLS-1$
|
||||
|
||||
private final static String PATH_SEPARATOR = "/"; //$NON-NLS-1$
|
||||
|
||||
public final static String INDEX_ATTR = "index"; //$NON-NLS-1$
|
||||
@@ -307,7 +311,7 @@ public class ClassLoaderFactory {
|
||||
String jarsStr = (String) metadataConn.getParameter(ConnParameterKeys.CONN_PARA_KEY_HADOOP_CUSTOM_JARS);
|
||||
moduleList = jarsStr.split(";"); //$NON-NLS-1$
|
||||
} else {
|
||||
String index = "HIVE" + ":" + distroKey + ":" + distroVersion + ":" + hiveModel; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
||||
String index = "HIVE" + KEY_SEPARATOR + distroKey + KEY_SEPARATOR + distroVersion + KEY_SEPARATOR + hiveModel; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
||||
moduleList = getDriverModuleList(index);
|
||||
}
|
||||
return moduleList;
|
||||
@@ -328,4 +332,16 @@ public class ClassLoaderFactory {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static DynamicClassLoader getClassLoader(IHDistributionVersion hdVersion) {
|
||||
String index = "HadoopModules" + KEY_SEPARATOR + hdVersion.getDistribution().getName() + KEY_SEPARATOR
|
||||
+ hdVersion.getVersion();
|
||||
List<ModuleNeeded> modulesNeeded = hdVersion.getModulesNeeded();
|
||||
Set<String> libraries = new HashSet<String>();
|
||||
for (ModuleNeeded m : modulesNeeded) {
|
||||
libraries.add(m.getModuleName());
|
||||
}
|
||||
DynamicClassLoader hdClassLoader = getCustomClassLoader(index, libraries);
|
||||
return hdClassLoader;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -336,7 +336,7 @@ public class DatabaseConnStrUtil {
|
||||
}
|
||||
} else {
|
||||
if (Principal != null) {
|
||||
standardURlString = standardURlString.concat(SEMICOLON).concat(principalSuffix).concat(Principal);
|
||||
standardURlString = urlArray[0].concat(SEMICOLON).concat(principalSuffix).concat(Principal);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@ public enum EDatabaseVersion4Drivers {
|
||||
// Changed by Marvin Wang on Oct.9, 2012, just because the libs checking can not pass, Remy updated some jars from
|
||||
HBASE(new DbVersion4Drivers(EDatabaseTypeName.HBASE, new String[] {})),
|
||||
|
||||
REDSHIFT(new DbVersion4Drivers(EDatabaseTypeName.REDSHIFT, "RedshiftJDBC41-1.1.13.1013.jar")), //$NON-NLS-1$
|
||||
REDSHIFT(new DbVersion4Drivers(EDatabaseTypeName.REDSHIFT, "RedshiftJDBC41-1.2.10.1009.jar")), //$NON-NLS-1$
|
||||
|
||||
AMAZON_AURORA(new DbVersion4Drivers(EDatabaseTypeName.AMAZON_AURORA, "mysql-connector-java-5.1.30-bin.jar")); //$NON-NLS-1$
|
||||
|
||||
|
||||
@@ -218,7 +218,7 @@ public class HadoopClassLoaderFactory2 {
|
||||
return cll;
|
||||
}
|
||||
|
||||
private static String[] getSecurityJars(EHadoopCategory category) {
|
||||
public static String[] getSecurityJars(EHadoopCategory category) {
|
||||
String[] securityJars;
|
||||
switch (category) {
|
||||
case HDFS:
|
||||
|
||||
@@ -17,6 +17,7 @@ import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
@@ -24,6 +25,7 @@ import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.hadoop.IHadoopClusterService;
|
||||
import org.talend.core.model.metadata.builder.connection.Connection;
|
||||
import org.talend.core.model.utils.ContextParameterUtils;
|
||||
import org.talend.core.service.IMetadataManagmentUiService;
|
||||
import org.talend.core.utils.TalendQuoteUtils;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ContextType;
|
||||
import org.talend.utils.json.JSONArray;
|
||||
@@ -134,6 +136,11 @@ public class HadoopRepositoryUtil {
|
||||
*/
|
||||
public static List<Map<String, Object>> getHadoopPropertiesFullList(Connection connection, String propertiesJsonStr,
|
||||
boolean includeQuotes) {
|
||||
return getHadoopPropertiesFullList(connection, propertiesJsonStr, includeQuotes, false);
|
||||
}
|
||||
|
||||
public static List<Map<String, Object>> getHadoopPropertiesFullList(Connection connection, String propertiesJsonStr,
|
||||
boolean includeQuotes, boolean useOriginalValue) {
|
||||
IHadoopClusterService hadoopClusterService = null;
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IHadoopClusterService.class)) {
|
||||
hadoopClusterService = (IHadoopClusterService) GlobalServiceRegister.getDefault().getService(
|
||||
@@ -143,11 +150,12 @@ public class HadoopRepositoryUtil {
|
||||
if (hadoopClusterService != null) {
|
||||
Connection hadoopClusterConnection = hadoopClusterService.getHadoopClusterConnectionBySubConnection(connection);
|
||||
if (hadoopClusterConnection != null) {
|
||||
parentProperties = getHadoopPropertiesList(hadoopClusterService.getHadoopClusterProperties(connection),
|
||||
hadoopClusterConnection.isContextMode(), true);
|
||||
String hadoopClusterPropertiesStrs = hadoopClusterService.getHadoopClusterProperties(connection);
|
||||
parentProperties = getHadoopProperties(hadoopClusterConnection, hadoopClusterPropertiesStrs, includeQuotes,
|
||||
useOriginalValue);
|
||||
}
|
||||
}
|
||||
List<Map<String, Object>> properties = getHadoopPropertiesList(propertiesJsonStr, connection.isContextMode(), true);
|
||||
List<Map<String, Object>> properties = getHadoopProperties(connection, propertiesJsonStr, includeQuotes, useOriginalValue);
|
||||
Map<String, Map<String, Object>> propertiesMap = new HashMap<String, Map<String, Object>>();
|
||||
for (Map<String, Object> proMap : properties) {
|
||||
String property = String.valueOf(proMap.get("PROPERTY")); //$NON-NLS-1$
|
||||
@@ -165,7 +173,27 @@ public class HadoopRepositoryUtil {
|
||||
|
||||
return properties;
|
||||
}
|
||||
|
||||
|
||||
private static List<Map<String, Object>> getHadoopProperties(Connection connection, String propertiesJsonStr,
|
||||
boolean includeQuotes, boolean useOriginalValue) {
|
||||
List<Map<String, Object>> properties = null;
|
||||
IMetadataManagmentUiService mmUIService = null;
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IMetadataManagmentUiService.class)) {
|
||||
mmUIService = (IMetadataManagmentUiService) GlobalServiceRegister.getDefault().getService(
|
||||
IMetadataManagmentUiService.class);
|
||||
}
|
||||
ContextType contextType = null;
|
||||
if (mmUIService != null) {
|
||||
contextType = mmUIService.getContextTypeForContextMode(connection);
|
||||
}
|
||||
if (useOriginalValue && contextType != null) {
|
||||
properties = getHadoopPropertiesWithOriginalValue(propertiesJsonStr, contextType, includeQuotes);
|
||||
} else {
|
||||
properties = getHadoopPropertiesList(propertiesJsonStr, contextType != null, includeQuotes);
|
||||
}
|
||||
return properties;
|
||||
}
|
||||
|
||||
public static boolean useClouderaNavi(Connection hadoopSubConnection) {
|
||||
IHadoopClusterService hadoopClusterService = null;
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IHadoopClusterService.class)) {
|
||||
@@ -274,36 +302,62 @@ public class HadoopRepositoryUtil {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static String getOriginalValueOfProperties(ContextType contextType, String propertiesStrings) {
|
||||
public static String getOriginalValueOfProperties(String propertiesStrings, ContextType contextType) {
|
||||
return getOriginalValueOfProperties(propertiesStrings, contextType, false);
|
||||
}
|
||||
|
||||
public static String getOriginalValueOfProperties(String propertiesStrings, ContextType contextType, boolean includeQuotes) {
|
||||
String originalValueOfProperties = propertiesStrings;
|
||||
if (propertiesStrings != null && !propertiesStrings.isEmpty()) {
|
||||
List<Map<String, Object>> jdbcPropertiesList = HadoopRepositoryUtil.getHadoopPropertiesList(propertiesStrings);
|
||||
if (jdbcPropertiesList != null && !jdbcPropertiesList.isEmpty()) {
|
||||
List<Map<String, Object>> newJdbcPropertiesList = new ArrayList<Map<String, Object>>(jdbcPropertiesList.size());
|
||||
Iterator<Map<String, Object>> iter = jdbcPropertiesList.iterator();
|
||||
while (iter.hasNext()) {
|
||||
Map<String, Object> map = iter.next();
|
||||
if (map != null && !map.isEmpty()) {
|
||||
Map<String, Object> newMap = new HashMap<String, Object>();
|
||||
Iterator<Map.Entry<String, Object>> mapEntryIter = map.entrySet().iterator();
|
||||
while (mapEntryIter.hasNext()) {
|
||||
Map.Entry<String, Object> entry = mapEntryIter.next();
|
||||
if (entry != null) {
|
||||
Object obj = entry.getValue();
|
||||
Object newValue = null;
|
||||
if (obj != null) {
|
||||
newValue = ContextParameterUtils.getOriginalValue(contextType, obj.toString());
|
||||
}
|
||||
newMap.put(entry.getKey(), newValue);
|
||||
}
|
||||
}
|
||||
newJdbcPropertiesList.add(newMap);
|
||||
}
|
||||
|
||||
}
|
||||
originalValueOfProperties = HadoopRepositoryUtil.getHadoopPropertiesJsonStr(newJdbcPropertiesList);
|
||||
List<Map<String, Object>> propertiesList = getHadoopPropertiesWithOriginalValue(propertiesStrings, contextType,
|
||||
includeQuotes);
|
||||
if (propertiesList != null && !propertiesList.isEmpty()) {
|
||||
originalValueOfProperties = getHadoopPropertiesJsonStr(propertiesList);
|
||||
}
|
||||
}
|
||||
return originalValueOfProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* DOC ycbai Comment method "getHadoopPropertiesWithOriginalValue".
|
||||
*
|
||||
* <p>
|
||||
* Get hadoop properties list which convert conext value to original value if needed.
|
||||
* </p>
|
||||
*
|
||||
* @param propertiesStrings
|
||||
* @param contextType
|
||||
* @param includeQuotes
|
||||
* @return
|
||||
*/
|
||||
public static List<Map<String, Object>> getHadoopPropertiesWithOriginalValue(String propertiesStrings,
|
||||
ContextType contextType, boolean includeQuotes) {
|
||||
boolean isContextMode = contextType == null ? false : true;
|
||||
List<Map<String, Object>> propertiesList = getHadoopPropertiesList(propertiesStrings, isContextMode,
|
||||
includeQuotes);
|
||||
if (!isContextMode) {
|
||||
return propertiesList;
|
||||
}
|
||||
|
||||
List<Map<String, Object>> newPropertiesList = new ArrayList<>();
|
||||
for (Map<String, Object> propMap : propertiesList) {
|
||||
Map<String, Object> newPropMap = new HashMap<>();
|
||||
Iterator<Map.Entry<String, Object>> propMapEntryIter = propMap.entrySet().iterator();
|
||||
while (propMapEntryIter.hasNext()) {
|
||||
Entry<String, Object> propMapEntry = propMapEntryIter.next();
|
||||
String propKey = propMapEntry.getKey();
|
||||
Object propValue = propMapEntry.getValue();
|
||||
if (propKey != null && propValue != null) {
|
||||
String newValue = ContextParameterUtils.getOriginalValue(contextType, String.valueOf(propValue));
|
||||
newPropMap.put(propKey, newValue);
|
||||
}
|
||||
}
|
||||
if (!newPropMap.isEmpty()) {
|
||||
newPropertiesList.add(newPropMap);
|
||||
}
|
||||
}
|
||||
|
||||
return newPropertiesList;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -299,6 +299,11 @@ public class JobContextManager implements IContextManager {
|
||||
Item item = ContextUtils.getRepositoryContextItemById(contextParam.getSource());
|
||||
if (item != null) {
|
||||
contextParamType.setRepositoryContextId(item.getProperty().getId());
|
||||
} else {
|
||||
String contextId = contextParam.getSource();
|
||||
if (!IContextParameter.BUILT_IN.equals(contextId)) {
|
||||
contextParamType.setRepositoryContextId(contextId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,6 +98,8 @@ public interface ILibrariesService extends IService {
|
||||
|
||||
Set<ModuleNeeded> getCodesModuleNeededs(ERepositoryObjectType type);
|
||||
|
||||
List<ModuleNeeded> getModuleNeeded(String id, boolean isGroup);
|
||||
|
||||
/**
|
||||
* Listener used to fire that libraries status has been changed (new lib or new check install).
|
||||
*
|
||||
|
||||
@@ -16,6 +16,7 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
import org.ops4j.pax.url.mvn.MavenResolver;
|
||||
import org.osgi.framework.Bundle;
|
||||
import org.osgi.framework.ServiceReference;
|
||||
@@ -62,6 +63,9 @@ public class ModuleNeeded {
|
||||
|
||||
private ELibraryInstallStatus status = ELibraryInstallStatus.UNKNOWN;
|
||||
|
||||
// status installed in maven
|
||||
private ELibraryInstallStatus installStatus = ELibraryInstallStatus.UNKNOWN;
|
||||
|
||||
private boolean isShow = true;
|
||||
|
||||
List<String> installURL;
|
||||
@@ -70,6 +74,8 @@ public class ModuleNeeded {
|
||||
|
||||
private String mavenUri;
|
||||
|
||||
private boolean dynamic;
|
||||
|
||||
public static final String SINGLE_QUOTE = "'"; //$NON-NLS-1$
|
||||
|
||||
public static final String QUOTATION_MARK = "\""; //$NON-NLS-1$
|
||||
@@ -113,7 +119,10 @@ public class ModuleNeeded {
|
||||
UNKNOWN,
|
||||
INSTALLED,
|
||||
UNUSED,
|
||||
NOT_INSTALLED;
|
||||
NOT_INSTALLED,
|
||||
DEPLOYED,
|
||||
NOT_DEPLOYED;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -141,7 +150,7 @@ public class ModuleNeeded {
|
||||
|
||||
/**
|
||||
* creates ModuleNeeded from its maven uri. the modeule name is the artifact_ID + "." + artifact_type
|
||||
*
|
||||
*
|
||||
* @param context
|
||||
* @param informationMsg
|
||||
* @param required
|
||||
@@ -252,8 +261,11 @@ public class ModuleNeeded {
|
||||
|
||||
public void setModuleName(String moduleName) {
|
||||
if (moduleName != null) {
|
||||
this.moduleName = moduleName.replace(QUOTATION_MARK, "").replace(SINGLE_QUOTE, //$NON-NLS-1$
|
||||
""); //$NON-NLS-1$
|
||||
String mn = moduleName.replace(QUOTATION_MARK, "").replace(SINGLE_QUOTE, ""); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
if (mn.indexOf("\\") != -1 || mn.indexOf("/") != -1) { //$NON-NLS-1$ //$NON-NLS-2$
|
||||
mn = new Path(mn).lastSegment();
|
||||
}
|
||||
this.moduleName = mn;
|
||||
} else {
|
||||
this.moduleName = moduleName;
|
||||
}
|
||||
@@ -272,7 +284,7 @@ public class ModuleNeeded {
|
||||
final ELibraryInstallStatus eLibraryInstallStatus = ModuleStatusProvider.getStatusMap().get(mvnUriStatusKey);
|
||||
if (eLibraryInstallStatus != null) {
|
||||
return eLibraryInstallStatus;
|
||||
} else {
|
||||
} else if (mvnUriStatusKey != null) {
|
||||
// compute the status of the lib.
|
||||
// first use the Library manager service
|
||||
ILibraryManagerService libManagerService = (ILibraryManagerService) GlobalServiceRegister.getDefault().getService(
|
||||
@@ -280,20 +292,41 @@ public class ModuleNeeded {
|
||||
Set<String> existLibraries = libManagerService.list();
|
||||
if (existLibraries.contains(getModuleName())) {
|
||||
status = ELibraryInstallStatus.INSTALLED;
|
||||
ModuleStatusProvider.getStatusMap().put(mvnUriStatusKey, status);
|
||||
} else {// then try to resolve locally
|
||||
String localMavenUri = mvnUriStatusKey.replace("mvn:", "mvn:" + MavenConstants.LOCAL_RESOLUTION_URL + "!"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
try {
|
||||
getMavenResolver().resolve(localMavenUri);
|
||||
status = ELibraryInstallStatus.INSTALLED;
|
||||
} catch (Exception e) {
|
||||
status = ELibraryInstallStatus.NOT_INSTALLED;
|
||||
}
|
||||
resolveStatusLocally(mvnUriStatusKey);
|
||||
}
|
||||
ModuleStatusProvider.getStatusMap().put(mvnUriStatusKey, status);
|
||||
|
||||
}
|
||||
return this.status;
|
||||
}
|
||||
|
||||
public ELibraryInstallStatus getDeployStatus() {
|
||||
String mvnUriStatusKey = getMavenUri(true);
|
||||
final ELibraryInstallStatus eLibraryDeployStatus = ModuleStatusProvider.getDeployStatusMap().get(mvnUriStatusKey);
|
||||
if (eLibraryDeployStatus != null) {
|
||||
return eLibraryDeployStatus;
|
||||
} else {
|
||||
resolveStatusLocally(mvnUriStatusKey);
|
||||
}
|
||||
return this.installStatus;
|
||||
}
|
||||
|
||||
private void resolveStatusLocally(String mvnUriStatusKey) {
|
||||
// then try to resolve locally
|
||||
String localMavenUri = mvnUriStatusKey.replace("mvn:", "mvn:" + MavenConstants.LOCAL_RESOLUTION_URL + "!"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
try {
|
||||
getMavenResolver().resolve(localMavenUri);
|
||||
status = ELibraryInstallStatus.INSTALLED;
|
||||
installStatus = ELibraryInstallStatus.DEPLOYED;
|
||||
} catch (Exception e) {
|
||||
status = ELibraryInstallStatus.NOT_INSTALLED;
|
||||
installStatus = ELibraryInstallStatus.NOT_DEPLOYED;
|
||||
}
|
||||
ModuleStatusProvider.getStatusMap().put(mvnUriStatusKey, status);
|
||||
ModuleStatusProvider.getDeployStatusMap().put(mvnUriStatusKey, installStatus);
|
||||
}
|
||||
|
||||
private MavenResolver getMavenResolver() {
|
||||
if (mavenResolver == null) {
|
||||
final Bundle bundle = CoreRuntimePlugin.getInstance().getBundle();
|
||||
@@ -393,7 +426,7 @@ public class ModuleNeeded {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see java.lang.Object#hashCode()
|
||||
*/
|
||||
@Override
|
||||
@@ -416,7 +449,7 @@ public class ModuleNeeded {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see java.lang.Object#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
@@ -530,7 +563,7 @@ public class ModuleNeeded {
|
||||
|
||||
/**
|
||||
* Getter for mavenUriSnapshot.
|
||||
*
|
||||
*
|
||||
* @return the mavenUriSnapshot
|
||||
*/
|
||||
public String getMavenUri() {
|
||||
@@ -539,7 +572,7 @@ public class ModuleNeeded {
|
||||
|
||||
/**
|
||||
* Sets the mavenUrl.
|
||||
*
|
||||
*
|
||||
* @param mavenUrl the mavenUrl to set
|
||||
*/
|
||||
public void setMavenUri(String mavenUri) {
|
||||
@@ -556,9 +589,18 @@ public class ModuleNeeded {
|
||||
// set jar by default
|
||||
parseMvnUrl.setType(MavenConstants.TYPE_JAR);
|
||||
}
|
||||
uri = MavenUrlHelper.generateMvnUrl(parseMvnUrl.getGroupId(), parseMvnUrl.getArtifactId(),
|
||||
parseMvnUrl.getVersion(), parseMvnUrl.getType(), parseMvnUrl.getClassifier());
|
||||
uri = MavenUrlHelper.generateMvnUrl(parseMvnUrl.getGroupId(), parseMvnUrl.getArtifactId(), parseMvnUrl.getVersion(),
|
||||
parseMvnUrl.getType(), parseMvnUrl.getClassifier());
|
||||
}
|
||||
return uri;
|
||||
}
|
||||
|
||||
public boolean isDynamic() {
|
||||
return this.dynamic;
|
||||
}
|
||||
|
||||
public void setDynamic(boolean dynamic) {
|
||||
this.dynamic = dynamic;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -31,6 +31,8 @@ public class ModuleStatusProvider {
|
||||
*/
|
||||
private static Map<String, ELibraryInstallStatus> statusMap = new HashMap<String, ELibraryInstallStatus>();
|
||||
|
||||
private static Map<String, ELibraryInstallStatus> deployStatusMap = new HashMap<String, ELibraryInstallStatus>();
|
||||
|
||||
/**
|
||||
* Getter for statusMap.
|
||||
*
|
||||
@@ -40,7 +42,17 @@ public class ModuleStatusProvider {
|
||||
return statusMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for deployStatusMap.
|
||||
*
|
||||
* @return the deployStatusMap
|
||||
*/
|
||||
public static Map<String, ELibraryInstallStatus> getDeployStatusMap() {
|
||||
return deployStatusMap;
|
||||
}
|
||||
|
||||
public static void reset() {
|
||||
statusMap.clear();
|
||||
deployStatusMap.clear();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,6 +111,7 @@ public class MetadataColumn implements IMetadataColumn, Cloneable {
|
||||
setRelatedEntity(metadataColumn.getRelatedEntity());
|
||||
setRelationshipType(metadataColumn.getRelationshipType());
|
||||
this.usefulColumn = metadataColumn.isUsefulColumn();
|
||||
this.getAdditionalField().putAll(metadataColumn.getAdditionalField());
|
||||
}
|
||||
|
||||
private static synchronized String getNewId() {
|
||||
|
||||
@@ -94,9 +94,9 @@ import org.talend.cwm.helper.ConnectionHelper;
|
||||
|
||||
/**
|
||||
* DOC nrousseau class global comment. Detailled comment <br/>
|
||||
*
|
||||
*
|
||||
* $Id: RepositoryToComponentProperty.java 51621 2010-11-23 09:18:34Z hwang $
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class RepositoryToComponentProperty {
|
||||
|
||||
@@ -168,7 +168,7 @@ public class RepositoryToComponentProperty {
|
||||
|
||||
/**
|
||||
* DOC guanglong.du Comment method "getEDIFACTSchemaValue".
|
||||
*
|
||||
*
|
||||
* @param connection
|
||||
* @param value
|
||||
* @return
|
||||
@@ -196,9 +196,9 @@ public class RepositoryToComponentProperty {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* DOC YeXiaowei Comment method "getSAPInputAndOutputValue".
|
||||
*
|
||||
*
|
||||
* @param conn
|
||||
* @param value2
|
||||
* @param functionLabel
|
||||
@@ -283,9 +283,9 @@ public class RepositoryToComponentProperty {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* DOC xye Comment method "getSAPValuesForFunction".
|
||||
*
|
||||
*
|
||||
* @param conn
|
||||
* @param functionLabel
|
||||
* @param paramterName
|
||||
@@ -316,9 +316,9 @@ public class RepositoryToComponentProperty {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* DOC YeXiaowei Comment method "getTalendTypeFromJCOType".
|
||||
*
|
||||
*
|
||||
* @param jcoType
|
||||
* @return
|
||||
*/
|
||||
@@ -335,9 +335,9 @@ public class RepositoryToComponentProperty {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* DOC YeXiaowei Comment method "getSAPValue".
|
||||
*
|
||||
*
|
||||
* @param connection
|
||||
* @param value
|
||||
* @return
|
||||
@@ -399,9 +399,9 @@ public class RepositoryToComponentProperty {
|
||||
if (property.getPropertyName() != null && !"".equals(property.getPropertyName())) {
|
||||
map.put("PROPERTY", TalendQuoteUtils.addQuotes(property.getPropertyName()));//$NON-NLS-1$
|
||||
if (isContextMode(connection, property.getValue())) {
|
||||
map.put("VALUE", property.getValue());//$NON-NLS-1$
|
||||
map.put("VALUE", property.getValue());//$NON-NLS-1$
|
||||
} else {
|
||||
map.put("VALUE", TalendQuoteUtils.addQuotes(property.getValue()));//$NON-NLS-1$
|
||||
map.put("VALUE", TalendQuoteUtils.addQuotes(property.getValue()));//$NON-NLS-1$
|
||||
}
|
||||
values.add(map);
|
||||
}
|
||||
@@ -414,7 +414,7 @@ public class RepositoryToComponentProperty {
|
||||
|
||||
/**
|
||||
* DOC gcui Comment method "getHL7Value".
|
||||
*
|
||||
*
|
||||
* @param connection
|
||||
* @param value
|
||||
* @return
|
||||
@@ -444,7 +444,7 @@ public class RepositoryToComponentProperty {
|
||||
|
||||
/**
|
||||
* DOC YeXiaowei Comment method "getSalesforceSchemaValue".
|
||||
*
|
||||
*
|
||||
* @param connection
|
||||
* @param value
|
||||
* @return
|
||||
@@ -601,7 +601,7 @@ public class RepositoryToComponentProperty {
|
||||
|
||||
/**
|
||||
* DOC qzhang Comment method "getWSDLValue".
|
||||
*
|
||||
*
|
||||
* @param connection
|
||||
* @param value
|
||||
* @return
|
||||
@@ -726,7 +726,7 @@ public class RepositoryToComponentProperty {
|
||||
|
||||
/**
|
||||
* DOC hwang Comment method "getMDMValue".
|
||||
*
|
||||
*
|
||||
* @param connection
|
||||
* @param value
|
||||
* @param node
|
||||
@@ -1131,14 +1131,14 @@ public class RepositoryToComponentProperty {
|
||||
return getAppropriateValue(connection, connection.getDBRootPath());
|
||||
}
|
||||
// add for feature 11674
|
||||
if (value.equals("RUNNING_MODE")) {//$NON-NLS-1$
|
||||
String runningMode = "HSQLDB_IN_MEMORY";//$NON-NLS-1$
|
||||
if (value.equals("RUNNING_MODE")) {//$NON-NLS-1$
|
||||
String runningMode = "HSQLDB_IN_MEMORY";//$NON-NLS-1$
|
||||
if (EDatabaseTypeName.HSQLDB_IN_PROGRESS.getXmlName().equals(databaseType)) {
|
||||
runningMode = "HSQLDB_INPROGRESS_PERSISTENT";//$NON-NLS-1$
|
||||
runningMode = "HSQLDB_INPROGRESS_PERSISTENT";//$NON-NLS-1$
|
||||
} else if (EDatabaseTypeName.HSQLDB_SERVER.getXmlName().equals(databaseType)) {
|
||||
runningMode = "HSQLDB_SERVER";//$NON-NLS-1$
|
||||
runningMode = "HSQLDB_SERVER";//$NON-NLS-1$
|
||||
} else if (EDatabaseTypeName.HSQLDB_WEBSERVER.getXmlName().equals(databaseType)) {
|
||||
runningMode = "HSQLDB_WEBSERVER";//$NON-NLS-1$
|
||||
runningMode = "HSQLDB_WEBSERVER";//$NON-NLS-1$
|
||||
}
|
||||
return runningMode;
|
||||
}
|
||||
@@ -1410,7 +1410,7 @@ public class RepositoryToComponentProperty {
|
||||
|
||||
/**
|
||||
* JOBTRACKER_PRINCIPAL and RESOURCEMANAGER_PRINCIPAL use the same field
|
||||
*
|
||||
*
|
||||
* @see org.talend.repository.model.hadoopcluster.HadoopClusterConnection#getJtOrRmPrincipal()
|
||||
*/
|
||||
if (value.equals("JOBTRACKER_PRINCIPAL") || value.equals("RESOURCEMANAGER_PRINCIPAL")) {
|
||||
@@ -1542,7 +1542,7 @@ public class RepositoryToComponentProperty {
|
||||
|
||||
/**
|
||||
* DOC nrousseau Comment method "getDatabaseValue".
|
||||
*
|
||||
*
|
||||
* @param connection
|
||||
* @param value
|
||||
* @return
|
||||
@@ -1564,7 +1564,7 @@ public class RepositoryToComponentProperty {
|
||||
|
||||
/**
|
||||
* DOC nrousseau Comment method "getFileValue".
|
||||
*
|
||||
*
|
||||
* @param connection
|
||||
* @param value
|
||||
* @return
|
||||
@@ -1649,9 +1649,9 @@ public class RepositoryToComponentProperty {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* ggu Comment method "getEBCDICFieldValue".
|
||||
*
|
||||
*
|
||||
*/
|
||||
private static Object getEBCDICFieldValue(EbcdicConnection connection, String value) {
|
||||
// if ("XC2J_FILE".equals(value)) { //$NON-NLS-1$
|
||||
@@ -1692,7 +1692,7 @@ public class RepositoryToComponentProperty {
|
||||
|
||||
/**
|
||||
* DOC yexiaowei Comment method "getExcelFileValue".
|
||||
*
|
||||
*
|
||||
* @param connection
|
||||
* @param value
|
||||
* @return
|
||||
@@ -1767,7 +1767,7 @@ public class RepositoryToComponentProperty {
|
||||
|
||||
/**
|
||||
* DOC YeXiaowei Comment method "getExcelSheetTableValue".
|
||||
*
|
||||
*
|
||||
* @param connection
|
||||
*/
|
||||
private static List<Map<String, Object>> getExcelSheetTableValue(FileExcelConnection connection) {
|
||||
@@ -1787,7 +1787,7 @@ public class RepositoryToComponentProperty {
|
||||
|
||||
/**
|
||||
* DOC nrousseau Comment method "getPositionalFileValue".
|
||||
*
|
||||
*
|
||||
* @param connection
|
||||
* @param value
|
||||
* @return
|
||||
@@ -1810,7 +1810,7 @@ public class RepositoryToComponentProperty {
|
||||
return connection.getTextEnclosure();
|
||||
}
|
||||
|
||||
if (value.equals("SPLITRECORD")) { //$NON-NLS-1$
|
||||
if (value.equals("SPLITRECORD")) { //$NON-NLS-1$
|
||||
return connection.isSplitRecord();
|
||||
}
|
||||
return null;
|
||||
@@ -1980,7 +1980,7 @@ public class RepositoryToComponentProperty {
|
||||
|
||||
/**
|
||||
* qiang.zhang Comment method "getTableXMLMappingValue".
|
||||
*
|
||||
*
|
||||
* @param connection
|
||||
* @param tableInfo
|
||||
* @param metaTable
|
||||
@@ -2073,7 +2073,7 @@ public class RepositoryToComponentProperty {
|
||||
|
||||
/**
|
||||
* qiang.zhang Comment method "getTableXMLMappingValue".
|
||||
*
|
||||
*
|
||||
* @param connection
|
||||
* @param tableInfo
|
||||
* @param metaTable
|
||||
@@ -2348,7 +2348,7 @@ public class RepositoryToComponentProperty {
|
||||
|
||||
/**
|
||||
* Gets repository value for LDAP schema.
|
||||
*
|
||||
*
|
||||
* @param connection
|
||||
* @param value
|
||||
* @return
|
||||
@@ -2435,7 +2435,7 @@ public class RepositoryToComponentProperty {
|
||||
|
||||
/**
|
||||
* DOC qiang.zhang Comment method "getXMLMappingValue".
|
||||
*
|
||||
*
|
||||
* @param repositoryConnection
|
||||
* @param metadataTable
|
||||
* @return
|
||||
@@ -2665,7 +2665,7 @@ public class RepositoryToComponentProperty {
|
||||
}
|
||||
|
||||
if (value.equals("USE_ENCODING")) {
|
||||
return connection.isSFTP();
|
||||
return connection.isUseFileNameEncoding();
|
||||
}
|
||||
|
||||
if (value.equals("ENCODING")) {
|
||||
|
||||
@@ -17,6 +17,7 @@ import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
@@ -26,7 +27,6 @@ import org.apache.log4j.Level;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||
import org.eclipse.emf.common.util.EList;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.core.model.general.Project;
|
||||
@@ -175,7 +175,7 @@ public class RelationshipItemBuilder {
|
||||
return instance;
|
||||
}
|
||||
|
||||
private static RelationshipItemBuilder createInstance(IProxyRepositoryFactory repositoryFactory, Project project) {
|
||||
public static RelationshipItemBuilder createInstance(IProxyRepositoryFactory repositoryFactory, Project project) {
|
||||
RelationshipItemBuilder instance = new RelationshipItemBuilder();
|
||||
instance.setAimProject(project);
|
||||
instance.setProxyRepositoryFactory(repositoryFactory);
|
||||
@@ -218,15 +218,28 @@ public class RelationshipItemBuilder {
|
||||
* @return
|
||||
*/
|
||||
public List<Relation> getItemsHaveRelationWith(String itemId) {
|
||||
return getItemsHaveRelationWith(itemId, null);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Look for every linked items who use the selected id, no matter the version. Usefull when want to delete an item
|
||||
* since it will delete every versions.
|
||||
*
|
||||
* @param itemId
|
||||
* @param version
|
||||
* @return
|
||||
*/
|
||||
public List<Relation> getItemsHaveRelationWith(String itemId, String version) {
|
||||
if (!loaded) {
|
||||
loadRelations();
|
||||
}
|
||||
Set<Relation> relations = new HashSet<Relation>();
|
||||
Set<Relation> itemsRelations = getItemsHaveRelationWith(currentProjectItemsRelations, itemId);
|
||||
Set<Relation> itemsRelations = getItemsHaveRelationWith(currentProjectItemsRelations, itemId, version);
|
||||
if (itemsRelations != null) {
|
||||
relations.addAll(itemsRelations);
|
||||
}
|
||||
itemsRelations = getItemsHaveRelationWith(referencesItemsRelations, itemId);
|
||||
itemsRelations = getItemsHaveRelationWith(referencesItemsRelations, itemId, version);
|
||||
if (itemsRelations != null) {
|
||||
relations.addAll(itemsRelations);
|
||||
}
|
||||
@@ -275,7 +288,20 @@ public class RelationshipItemBuilder {
|
||||
return new ArrayList<Relation>(relations);
|
||||
}
|
||||
|
||||
private Set<Relation> getItemsHaveRelationWith(Map<Relation, Set<Relation>> itemsRelations, String itemId) {
|
||||
/**
|
||||
*
|
||||
* DOC cmeng Comment method "getItemsHaveRelationWith".
|
||||
*
|
||||
* @param itemsRelations
|
||||
* @param itemId
|
||||
* @param version if null, then won't check
|
||||
* @return
|
||||
*/
|
||||
private Set<Relation> getItemsHaveRelationWith(Map<Relation, Set<Relation>> itemsRelations, String itemId, String version) {
|
||||
|
||||
/**
|
||||
* if verison is null, then won't check
|
||||
*/
|
||||
|
||||
Set<Relation> relations = new HashSet<Relation>();
|
||||
|
||||
@@ -295,8 +321,36 @@ public class RelationshipItemBuilder {
|
||||
tmpRelatedItem = relatedItem;
|
||||
}
|
||||
if (tmpRelatedItem != null && itemId.equals(id)) {
|
||||
relations.add(baseItem);
|
||||
break;
|
||||
boolean isEqual = true;
|
||||
|
||||
if (version != null) {
|
||||
/**
|
||||
* if verison is null, then won't check
|
||||
*/
|
||||
String curVersion = tmpRelatedItem.getVersion();
|
||||
|
||||
if (!LATEST_VERSION.equals(version) && LATEST_VERSION.equals(curVersion)) {
|
||||
try {
|
||||
IRepositoryViewObject latest = getProxyRepositoryFactory().getLastVersion(getAimProject(),
|
||||
id);
|
||||
if (latest != null) {
|
||||
curVersion = latest.getVersion();
|
||||
}
|
||||
} catch (PersistenceException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
if (version.equals(curVersion)) {
|
||||
isEqual = true;
|
||||
} else {
|
||||
isEqual = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (isEqual) {
|
||||
relations.add(baseItem);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -314,7 +368,7 @@ public class RelationshipItemBuilder {
|
||||
if (relatedItem.getType().equals(JOB_RELATION) && itemId.equals(id)) {
|
||||
if ("Latest".equals(relatedItem.getVersion())) {
|
||||
try {
|
||||
IRepositoryViewObject latest = getProxyRepositoryFactory().getLastVersion(id);
|
||||
IRepositoryViewObject latest = getProxyRepositoryFactory().getLastVersion(getAimProject(), id);
|
||||
if (!latest.getVersion().equals(version)) {
|
||||
continue;
|
||||
}
|
||||
@@ -431,8 +485,68 @@ public class RelationshipItemBuilder {
|
||||
|
||||
public void unloadRelations() {
|
||||
loaded = false;
|
||||
currentProjectItemsRelations = new HashMap<Relation, Set<Relation>>();
|
||||
referencesItemsRelations = new HashMap<Relation, Set<Relation>>();
|
||||
clearAllItemsRelations();
|
||||
}
|
||||
|
||||
public void clearAllItemsRelations() {
|
||||
if (currentProjectItemsRelations != null) {
|
||||
currentProjectItemsRelations.clear();
|
||||
}
|
||||
if (referencesItemsRelations != null) {
|
||||
referencesItemsRelations.clear();
|
||||
}
|
||||
}
|
||||
|
||||
public void cleanTypeRelations(String baseType, String relationType, boolean save) {
|
||||
if (!loaded) {
|
||||
loadRelations();
|
||||
}
|
||||
// because only save for current project
|
||||
modified = cleanTypeRelations(getCurrentProjectItemsRelations(), baseType, relationType);
|
||||
cleanTypeRelations(referencesItemsRelations, baseType, relationType);
|
||||
|
||||
if (save) {
|
||||
saveRelations();
|
||||
}
|
||||
}
|
||||
|
||||
private boolean cleanTypeRelations(Map<Relation, Set<Relation>> projectRelations, String baseType, String relationType) {
|
||||
if (projectRelations == null) {
|
||||
return false;
|
||||
}
|
||||
boolean modified = false;
|
||||
// clean up base type first
|
||||
if (baseType != null) {
|
||||
List<Relation> cleanupItems = new ArrayList<Relation>();
|
||||
for (Relation base : projectRelations.keySet()) {
|
||||
if (baseType.equals(base.getType())) {
|
||||
cleanupItems.add(base);
|
||||
}
|
||||
}
|
||||
modified = !cleanupItems.isEmpty();
|
||||
//
|
||||
for (Relation r : cleanupItems) {
|
||||
projectRelations.remove(r);
|
||||
}
|
||||
}
|
||||
|
||||
// deal with the left for relation type
|
||||
if (relationType != null) {
|
||||
for (Relation base : projectRelations.keySet()) {
|
||||
Set<Relation> relation = projectRelations.get(base);
|
||||
if (relation != null) {
|
||||
Iterator<Relation> iterator = relation.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
Relation r = iterator.next();
|
||||
if (relationType.equals(r.getType())) {
|
||||
iterator.remove();
|
||||
modified = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return modified;
|
||||
}
|
||||
|
||||
private void loadRelations() {
|
||||
@@ -506,15 +620,17 @@ public class RelationshipItemBuilder {
|
||||
for (Relation relation : currentProjectItemsRelations.keySet()) {
|
||||
ItemRelations itemRelations = null;
|
||||
boolean exist = false;
|
||||
for(ItemRelations relations : oldRelations){
|
||||
if(relations.getBaseItem().getId().equals(relation.getId())){
|
||||
for (ItemRelations relations : oldRelations) {
|
||||
boolean isIdSame = relations.getBaseItem().getId().equals(relation.getId());
|
||||
boolean isVersionSame = StringUtils.equals(relations.getBaseItem().getVersion(), relation.getVersion());
|
||||
if (isIdSame && isVersionSame) {
|
||||
usedList.add(relations);
|
||||
itemRelations = relations;
|
||||
exist = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(itemRelations == null){
|
||||
if (itemRelations == null) {
|
||||
itemRelations = PropertiesFactory.eINSTANCE.createItemRelations();
|
||||
|
||||
ItemRelation baseItem = PropertiesFactory.eINSTANCE.createItemRelation();
|
||||
@@ -524,7 +640,7 @@ public class RelationshipItemBuilder {
|
||||
baseItem.setType(relation.getType());
|
||||
baseItem.setVersion(relation.getVersion());
|
||||
}
|
||||
|
||||
|
||||
// sort by type
|
||||
List<Relation> relationItemsList = new ArrayList<Relation>(currentProjectItemsRelations.get(relation));
|
||||
Collections.sort(relationItemsList, new Comparator<Relation>() {
|
||||
@@ -534,16 +650,31 @@ public class RelationshipItemBuilder {
|
||||
return o1.getType().compareTo(o2.getType());
|
||||
}
|
||||
});
|
||||
List<ItemRelation> usedRelationList = new ArrayList<ItemRelation>();
|
||||
List<ItemRelation> oldRelatedItems = new ArrayList<ItemRelation>(itemRelations.getRelatedItems());
|
||||
for (Relation relatedItem : relationItemsList) {
|
||||
List<ItemRelation> relationList = new ArrayList<ItemRelation>(itemRelations.getRelatedItems());
|
||||
boolean found = false;
|
||||
for(ItemRelation item : relationList){
|
||||
if(item.getId() != null && item.getId().equals(relatedItem.getId())){
|
||||
boolean found = false;
|
||||
for (ItemRelation item : oldRelatedItems) {
|
||||
boolean isIdSame = false;
|
||||
String itemId = item.getId();
|
||||
if (itemId != null) {
|
||||
isIdSame = itemId.equals(relatedItem.getId());
|
||||
}
|
||||
boolean isVersionSame = false;
|
||||
if (isIdSame) {
|
||||
isVersionSame = StringUtils.equals(item.getVersion(), relatedItem.getVersion());
|
||||
}
|
||||
boolean sameType = false;
|
||||
if (isVersionSame) {
|
||||
sameType = StringUtils.equals(item.getType(), relatedItem.getType());
|
||||
}
|
||||
if (isIdSame && isVersionSame && sameType) {
|
||||
usedRelationList.add(item);
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(found){
|
||||
if (found) {
|
||||
continue;
|
||||
}
|
||||
ItemRelation emfRelatedItem = PropertiesFactory.eINSTANCE.createItemRelation();
|
||||
@@ -552,7 +683,11 @@ public class RelationshipItemBuilder {
|
||||
emfRelatedItem.setVersion(relatedItem.getVersion());
|
||||
itemRelations.getRelatedItems().add(emfRelatedItem);
|
||||
}
|
||||
if(!exist){
|
||||
// get unused relation items
|
||||
oldRelatedItems.removeAll(usedRelationList);
|
||||
// remove unused relation items
|
||||
itemRelations.getRelatedItems().removeAll(oldRelatedItems);
|
||||
if (!exist) {
|
||||
currentProject.getEmfProject().getItemsRelations().add(itemRelations);
|
||||
}
|
||||
}
|
||||
@@ -604,15 +739,6 @@ public class RelationshipItemBuilder {
|
||||
}
|
||||
}
|
||||
|
||||
public void clearAllItemsRelations() {
|
||||
if (currentProjectItemsRelations != null) {
|
||||
currentProjectItemsRelations.clear();
|
||||
}
|
||||
if (referencesItemsRelations != null) {
|
||||
referencesItemsRelations.clear();
|
||||
}
|
||||
}
|
||||
|
||||
private void addRelationShip(Item baseItem, String relatedId, String relatedVersion, String type) {
|
||||
Relation relation = new Relation();
|
||||
relation.setId(baseItem.getProperty().getId());
|
||||
@@ -659,7 +785,7 @@ public class RelationshipItemBuilder {
|
||||
try {
|
||||
for (ERepositoryObjectType curTyp : getTypes()) {
|
||||
if (curTyp != null) {
|
||||
list.addAll(factory.getAll(curTyp, true, true));
|
||||
list.addAll(factory.getAll(project, curTyp, true, true));
|
||||
}
|
||||
}
|
||||
monitor.beginTask(Messages.getString("RelationshipItemBuilder.buildingIndex"), list.size()); //$NON-NLS-1$
|
||||
@@ -858,7 +984,7 @@ public class RelationshipItemBuilder {
|
||||
}
|
||||
}
|
||||
|
||||
public Map<Relation, Set<Relation>> getCurrentProjectItemsRelations(){
|
||||
public Map<Relation, Set<Relation>> getCurrentProjectItemsRelations() {
|
||||
return this.currentProjectItemsRelations;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,8 @@ public interface SVNConstant {
|
||||
|
||||
public static final String NAME_MASTER = "master"; //$NON-NLS-1$
|
||||
|
||||
public static final String NAME_ORIGIN = "origin"; //$NON-NLS-1$
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -268,6 +268,14 @@ public class RepositoryUpdateManagerHelper {
|
||||
if (jobletType != null) {
|
||||
processRep.addAll(factory.getAll(jobletType, true));
|
||||
}
|
||||
ERepositoryObjectType processMr = ERepositoryObjectType.PROCESS_MR;
|
||||
if (processMr != null) {
|
||||
processRep.addAll(factory.getAll(processMr, true));
|
||||
}
|
||||
ERepositoryObjectType processStrom = ERepositoryObjectType.PROCESS_STORM;
|
||||
if (processStrom != null) {
|
||||
processRep.addAll(factory.getAll(processStrom, true));
|
||||
}
|
||||
} catch (PersistenceException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
|
||||
@@ -66,9 +66,7 @@ public abstract class AbstractRepository4ProcessUpdateManagerProvider extends Ab
|
||||
return helper.checkJobItemsForUpdate(monitor, getTypes());
|
||||
}
|
||||
|
||||
protected boolean enableCheckItem(final IRepositoryViewObject object) {
|
||||
return false; // false, will only check the opened job.
|
||||
}
|
||||
|
||||
|
||||
protected List<Relation> getRelations(final IRepositoryViewObject object) {
|
||||
// get the relation of item with other items
|
||||
|
||||
@@ -24,6 +24,7 @@ import org.eclipse.jface.operation.IRunnableWithProgress;
|
||||
import org.eclipse.jface.viewers.IStructuredSelection;
|
||||
import org.eclipse.jface.viewers.TreeViewer;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.core.model.repository.IRepositoryViewObject;
|
||||
import org.talend.core.model.update.IUpdateItemType;
|
||||
import org.talend.core.model.update.UpdateResult;
|
||||
import org.talend.core.model.update.UpdatesConstants;
|
||||
@@ -37,6 +38,8 @@ import org.talend.repository.model.IProxyRepositoryFactory;
|
||||
*/
|
||||
public abstract class AbstractRepositoryUpdateManagerProvider implements IRepositoryUpdateManagerProvider {
|
||||
|
||||
protected boolean enableCheckItem;
|
||||
|
||||
protected IProxyRepositoryFactory factory = CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
|
||||
|
||||
/*
|
||||
@@ -196,4 +199,22 @@ public abstract class AbstractRepositoryUpdateManagerProvider implements IReposi
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return false, will only check the opened job.
|
||||
*/
|
||||
@Override
|
||||
public boolean enableCheckItem(final IRepositoryViewObject object) {
|
||||
return enableCheckItem;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.talend.core.model.update.extension.IRepositoryUpdateManagerProvider#setEnableCheckItem(boolean)
|
||||
*/
|
||||
@Override
|
||||
public void setEnableCheckItem(boolean checkItem) {
|
||||
this.enableCheckItem = checkItem;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ package org.talend.core.model.update.extension;
|
||||
|
||||
import org.eclipse.jface.viewers.IStructuredSelection;
|
||||
import org.eclipse.jface.viewers.TreeViewer;
|
||||
import org.talend.core.model.repository.IRepositoryViewObject;
|
||||
|
||||
/**
|
||||
* DOC ggu class global comment. Detailled comment
|
||||
@@ -61,4 +62,15 @@ public interface IRepositoryUpdateManagerProvider extends IUpdateManagerProvider
|
||||
*/
|
||||
boolean updateForRepository(IStructuredSelection selection);
|
||||
|
||||
/**
|
||||
* @return false, will only check the opened job.
|
||||
*/
|
||||
boolean enableCheckItem(final IRepositoryViewObject object);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param checkItem if true , force to check closed job
|
||||
*/
|
||||
void setEnableCheckItem(boolean checkItem);
|
||||
|
||||
}
|
||||
|
||||
@@ -246,42 +246,51 @@ public enum UpdateManagerProviderDetector {
|
||||
public boolean updateForRepository(IStructuredSelection selection, boolean needConfirm) {
|
||||
boolean forcePropagation = false;
|
||||
IRepositoryUpdateManagerProvider[] repositoryProviders = reader.getRepositoryProviders();
|
||||
for (IRepositoryUpdateManagerProvider provider : repositoryProviders) {
|
||||
if (provider.needForcePropagation(selection)) {
|
||||
forcePropagation = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!forcePropagation && needConfirm) {
|
||||
IDesignerCoreService designerCoreService = CoreRuntimePlugin.getInstance().getDesignerCoreService();
|
||||
boolean deactive = designerCoreService != null ? Boolean.parseBoolean(designerCoreService
|
||||
.getPreferenceStore(ITalendCorePrefConstants.DEACTIVE_REPOSITORY_UPDATE)) : true;
|
||||
if (deactive) {// disable to do update
|
||||
return false;
|
||||
try {
|
||||
for (IRepositoryUpdateManagerProvider provider : repositoryProviders) {
|
||||
if (provider.needForcePropagation(selection)) {
|
||||
forcePropagation = true;
|
||||
}
|
||||
}
|
||||
|
||||
boolean propagated = RepositoryUpdateManager.openPropagationDialog();
|
||||
if (!propagated) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (!forcePropagation && needConfirm) {
|
||||
IDesignerCoreService designerCoreService = CoreRuntimePlugin.getInstance().getDesignerCoreService();
|
||||
boolean deactive = designerCoreService != null ? Boolean.parseBoolean(designerCoreService
|
||||
.getPreferenceStore(ITalendCorePrefConstants.DEACTIVE_REPOSITORY_UPDATE)) : true;
|
||||
if (deactive) {// disable to do update
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean updated = false;
|
||||
for (IRepositoryUpdateManagerProvider provider : repositoryProviders) {
|
||||
// if one upate successfully, will return true.
|
||||
if (provider.updateForRepository(selection)) {
|
||||
boolean propagated = RepositoryUpdateManager.openPropagationDialog();
|
||||
if (!propagated) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
boolean updated = false;
|
||||
for (IRepositoryUpdateManagerProvider provider : repositoryProviders) {
|
||||
// fix for the joblet ,force to check closed jobs incese joblet context changed
|
||||
provider.setEnableCheckItem(true);
|
||||
// if one upate successfully, will return true.
|
||||
if (provider.updateForRepository(selection)) {
|
||||
updated = true;
|
||||
}
|
||||
}
|
||||
// Old Updates
|
||||
if (doOldUpdates(selection)) {
|
||||
updated = true;
|
||||
}
|
||||
if (!updated) {
|
||||
// nothing to update
|
||||
RepositoryUpdateManager.openNoModificationDialog();
|
||||
}
|
||||
return updated;
|
||||
} finally {
|
||||
for (IRepositoryUpdateManagerProvider provider : repositoryProviders) {
|
||||
// change back to default value
|
||||
provider.setEnableCheckItem(false);
|
||||
}
|
||||
}
|
||||
// Old Updates
|
||||
if (doOldUpdates(selection)) {
|
||||
updated = true;
|
||||
}
|
||||
if (!updated) {
|
||||
// nothing to update
|
||||
RepositoryUpdateManager.openNoModificationDialog();
|
||||
}
|
||||
return updated;
|
||||
}
|
||||
|
||||
private boolean doOldUpdates(IStructuredSelection selection) {
|
||||
|
||||
@@ -58,8 +58,12 @@ public final class ContextParameterUtils {
|
||||
|
||||
private static final String JAVA_ENDWITH = "\"))"; //$NON-NLS-1$
|
||||
|
||||
private static final String LINE = "_"; //$NON-NLS-1$
|
||||
|
||||
private static final String EMPTY = ""; //$NON-NLS-1$
|
||||
|
||||
private static final String NON_CONTEXT_PATTERN = "[^a-zA-Z0-9_]"; //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Constructs a new ContextParameterUtils.
|
||||
*/
|
||||
@@ -395,6 +399,35 @@ public final class ContextParameterUtils {
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* DOC ycbai Comment method "isContextParamOfContextType".
|
||||
*
|
||||
* <p>
|
||||
* Estimate if the context parameter exists in the context type.
|
||||
*
|
||||
* @param contextType
|
||||
* @param value
|
||||
* @return
|
||||
*/
|
||||
public static boolean isContextParamOfContextType(ContextType contextType, String value) {
|
||||
if (contextType == null || value == null) {
|
||||
return false;
|
||||
}
|
||||
ContextParameterType param = null;
|
||||
if (ContextParameterUtils.isContainContextParam(value)) {
|
||||
String var = ContextParameterUtils.getVariableFromCode(value);
|
||||
if (var != null) {
|
||||
for (ContextParameterType paramType : (List<ContextParameterType>) contextType.getContextParameter()) {
|
||||
if (var.equals(paramType.getName())) {
|
||||
param = paramType;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return param != null;
|
||||
}
|
||||
|
||||
public static boolean isValidParameterName(String name) {
|
||||
if (name != null) {
|
||||
// for java, the var name not be named with java keywords.
|
||||
@@ -420,4 +453,28 @@ public final class ContextParameterUtils {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* DOC ycbai Comment method "getValidParameterName".
|
||||
*
|
||||
* <p>
|
||||
* Get a valid context parameter name which revise the invalid characters.
|
||||
* </p>
|
||||
*
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
public static String getValidParameterName(String name) {
|
||||
if (name == null || name.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
if (isValidParameterName(name)) {
|
||||
return name;
|
||||
}
|
||||
String newName = name.replaceAll(NON_CONTEXT_PATTERN, LINE);
|
||||
if (ContextUtils.isJavaKeyWords(newName)) {
|
||||
newName = LINE + name;
|
||||
}
|
||||
return newName;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -941,7 +941,7 @@ public class NodeUtil {
|
||||
if (original == null || original.trim().length() == 0) {
|
||||
return original;
|
||||
}
|
||||
String result = "";
|
||||
StringBuilder result = new StringBuilder();
|
||||
int leftQuotes = original.indexOf("\"");
|
||||
int rightQuotes = original.indexOf("\"", leftQuotes + 1);
|
||||
int fakeRightQuotes = original.indexOf("\\\"", leftQuotes + 1);
|
||||
@@ -950,14 +950,33 @@ public class NodeUtil {
|
||||
fakeRightQuotes = original.indexOf("\\\"", fakeRightQuotes + 1);
|
||||
}
|
||||
int leftPrev = 0;
|
||||
while (leftQuotes >= 0 && rightQuotes > leftQuotes) {
|
||||
if (leftQuotes > leftPrev) {
|
||||
result += original.substring(leftPrev, leftQuotes);
|
||||
}
|
||||
// System.out.println("leftQuote="+leftQuotes + ", rightQuote="+rightQuotes);
|
||||
if (leftQuotes < rightQuotes) {
|
||||
result += original.substring(leftQuotes, rightQuotes + 1).replace("\r", "").replace("\n", "\\n");
|
||||
}
|
||||
while (leftQuotes >= 0 && rightQuotes > leftQuotes) {
|
||||
if (leftQuotes > leftPrev) {//Outside of double quote
|
||||
result.append(original.substring(leftPrev, leftQuotes));
|
||||
|
||||
}
|
||||
if (leftQuotes < rightQuotes) {//Inside of double quote
|
||||
//split string for better appearance and avoid compile error when string exceed 64k
|
||||
int current = leftQuotes;
|
||||
int Offset = 120;
|
||||
int count = 0;
|
||||
while (rightQuotes + 1 - current > 120) {
|
||||
while (original.charAt(current + Offset - 1) == '\\') {//avoid split special character e.g. \"
|
||||
Offset--;
|
||||
}
|
||||
|
||||
if(count>500){//This is the code that really solve TDI-39968 others are only for good appearance.
|
||||
result.append(original.substring(current, current + Offset).replace("\r", "").replace("\n", "\\n")).append("\" + new String()\n+\"");
|
||||
count = 0;
|
||||
}else{
|
||||
result.append(original.substring(current, current + Offset).replace("\r", "").replace("\n", "\\n")).append("\"\n+\"");
|
||||
}
|
||||
current += Offset;
|
||||
Offset = 120;
|
||||
count++;
|
||||
}
|
||||
result.append(original.substring(current, rightQuotes + 1).replace("\r", "").replace("\n", "\\n"));
|
||||
}
|
||||
|
||||
leftQuotes = original.indexOf("\"", rightQuotes + 1);
|
||||
leftPrev = rightQuotes + 1;
|
||||
@@ -968,8 +987,8 @@ public class NodeUtil {
|
||||
fakeRightQuotes = original.indexOf("\\\"", fakeRightQuotes + 1);
|
||||
}
|
||||
}
|
||||
result += original.substring(leftPrev);
|
||||
return result;
|
||||
result.append( original.substring(leftPrev));
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -204,6 +204,11 @@ public class TalendLibsServerManager {
|
||||
return mavenResolver;
|
||||
|
||||
}
|
||||
|
||||
public void checkAndUpdateNexusServer() {
|
||||
lastConnectionValid = null;
|
||||
getCustomNexusServer();
|
||||
}
|
||||
|
||||
public NexusServerBean getCustomNexusServer() {
|
||||
if (!org.talend.core.PluginChecker.isCoreTISPluginLoaded()) {
|
||||
@@ -223,32 +228,40 @@ public class TalendLibsServerManager {
|
||||
|| Boolean.FALSE == lastConnectionValid) {
|
||||
return null;
|
||||
}
|
||||
if (repositoryContext != null && repositoryContext.getFields() != null && !factory.isLocalConnectionProvider()
|
||||
&& !repositoryContext.isOffline()) {
|
||||
String adminUrl = repositoryContext.getFields().get(RepositoryConstants.REPOSITORY_URL);
|
||||
String userName = "";
|
||||
String password = "";
|
||||
User user = repositoryContext.getUser();
|
||||
if (user != null) {
|
||||
userName = user.getLogin();
|
||||
password = repositoryContext.getClearPassword();
|
||||
}
|
||||
if (lastConnectionValid != Boolean.TRUE) {
|
||||
if (repositoryContext != null && repositoryContext.getFields() != null && !factory.isLocalConnectionProvider()
|
||||
&& !repositoryContext.isOffline()) {
|
||||
String adminUrl = repositoryContext.getFields().get(RepositoryConstants.REPOSITORY_URL);
|
||||
String userName = "";
|
||||
String password = "";
|
||||
User user = repositoryContext.getUser();
|
||||
if (user != null) {
|
||||
userName = user.getLogin();
|
||||
password = repositoryContext.getClearPassword();
|
||||
}
|
||||
|
||||
if (adminUrl != null && !"".equals(adminUrl)
|
||||
&& GlobalServiceRegister.getDefault().isServiceRegistered(IRemoteService.class)) {
|
||||
IRemoteService remoteService = (IRemoteService) GlobalServiceRegister.getDefault().getService(
|
||||
IRemoteService.class);
|
||||
JSONObject libServerObject;
|
||||
libServerObject = remoteService.getLibNexusServer(userName, password, adminUrl);
|
||||
if (libServerObject != null) {
|
||||
nexus_url = libServerObject.getString(KEY_NEXUS_RUL);
|
||||
nexus_user = libServerObject.getString(KEY_NEXUS_USER);
|
||||
nexus_pass = libServerObject.getString(KEY_NEXUS_PASS);
|
||||
repositoryId = libServerObject.getString(KEY_CUSTOM_LIB_REPOSITORY);
|
||||
snapshotRepId = libServerObject.getString(KEY_CUSTOM_LIB_SNAPSHOT_REPOSITORY);
|
||||
if (adminUrl != null && !"".equals(adminUrl)
|
||||
&& GlobalServiceRegister.getDefault().isServiceRegistered(IRemoteService.class)) {
|
||||
IRemoteService remoteService = (IRemoteService) GlobalServiceRegister.getDefault().getService(
|
||||
IRemoteService.class);
|
||||
JSONObject libServerObject;
|
||||
libServerObject = remoteService.getLibNexusServer(userName, password, adminUrl);
|
||||
if (libServerObject != null) {
|
||||
nexus_url = libServerObject.getString(KEY_NEXUS_RUL);
|
||||
nexus_user = libServerObject.getString(KEY_NEXUS_USER);
|
||||
nexus_pass = libServerObject.getString(KEY_NEXUS_PASS);
|
||||
repositoryId = libServerObject.getString(KEY_CUSTOM_LIB_REPOSITORY);
|
||||
snapshotRepId = libServerObject.getString(KEY_CUSTOM_LIB_SNAPSHOT_REPOSITORY);
|
||||
System.setProperty(NEXUS_URL, nexus_url);
|
||||
System.setProperty(NEXUS_USER, nexus_user);
|
||||
System.setProperty(NEXUS_PASSWORD, nexus_pass);
|
||||
System.setProperty(NEXUS_LIB_REPO, repositoryId);
|
||||
System.setProperty(NEXUS_LIB_SNAPSHOT_REPO, snapshotRepId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (lastConnectionValid == null) {
|
||||
boolean connectionOk = NexusServerUtils.checkConnectionStatus(nexus_url, repositoryId, nexus_user, nexus_pass)
|
||||
&& NexusServerUtils.checkConnectionStatus(nexus_url, snapshotRepId, nexus_user, nexus_pass);
|
||||
|
||||
@@ -12,6 +12,10 @@
|
||||
// ============================================================================
|
||||
package org.talend.core.runtime.hd;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.talend.core.model.general.ModuleNeeded;
|
||||
|
||||
/**
|
||||
* DOC ggu class global comment. Detailled comment
|
||||
*/
|
||||
@@ -24,4 +28,6 @@ public interface IHDistributionVersion {
|
||||
String getDisplayVersion();
|
||||
|
||||
String getDefaultConfig(String... keys);
|
||||
|
||||
List<ModuleNeeded> getModulesNeeded();
|
||||
}
|
||||
|
||||
@@ -146,4 +146,10 @@ public interface ITalendProcessJavaProject {
|
||||
*/
|
||||
void cleanMavenFiles(IProgressMonitor monitor) throws Exception;
|
||||
|
||||
/**
|
||||
*
|
||||
* Reset the main pom to empty the content of the job dependencies.
|
||||
*/
|
||||
void regenerateMainProjectPom(IProgressMonitor monitor) throws Exception;
|
||||
|
||||
}
|
||||
|
||||
@@ -30,6 +30,8 @@ public interface TalendProcessOptionConstants {
|
||||
|
||||
public static final int GENERATE_WITHOUT_COMPILING = 1 << 5;
|
||||
|
||||
public static final int GENERATE_WITHOUT_FORMAT = 1 << 6;
|
||||
|
||||
/**
|
||||
* clean options
|
||||
*/
|
||||
|
||||
@@ -23,4 +23,6 @@ import org.eclipse.core.runtime.jobs.ISchedulingRule;
|
||||
public interface ITalendSchedulingRule extends ISchedulingRule {
|
||||
|
||||
public Thread getRuleThread();
|
||||
|
||||
public void setRuleThread(Thread thread);
|
||||
}
|
||||
|
||||
@@ -17,6 +17,9 @@ import java.util.List;
|
||||
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.core.runtime.i18n.Messages;
|
||||
import org.talend.utils.json.JSONArray;
|
||||
import org.talend.utils.json.JSONException;
|
||||
import org.talend.utils.json.JSONObject;
|
||||
|
||||
/**
|
||||
* class global comment. Detailled comment <br/>
|
||||
@@ -24,6 +27,14 @@ import org.talend.core.runtime.i18n.Messages;
|
||||
*/
|
||||
public class Function implements Cloneable {
|
||||
|
||||
public static final String NAME = "NAME"; //$NON-NLS-1$
|
||||
|
||||
public static final String PARAMETERS = "PARAMETERS"; //$NON-NLS-1$
|
||||
|
||||
public static final String PARAMETER_NAME = "PARAMETER_NAME"; //$NON-NLS-1$
|
||||
|
||||
public static final String PARAMETER_VALUE = "PARAMETER_VALUE"; //$NON-NLS-1$
|
||||
|
||||
private String category;
|
||||
|
||||
private String className;
|
||||
@@ -239,6 +250,32 @@ public class Function implements Cloneable {
|
||||
return function;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Function clone(JSONArray parametersArray) {
|
||||
if (parametersArray == null || parametersArray.length() == 0) {
|
||||
return (Function) clone();
|
||||
}
|
||||
Function function = (Function) clone();
|
||||
if (parametersArray != null) {
|
||||
try {
|
||||
List<Parameter> params = function.getParameters();
|
||||
for (Parameter param : params) {
|
||||
for (int i = 0; i < parametersArray.length(); i++) {
|
||||
JSONObject parameterObj = parametersArray.getJSONObject(i);
|
||||
String paramName = parameterObj.getString(PARAMETER_NAME);
|
||||
String paramValue = parameterObj.getString(PARAMETER_VALUE);
|
||||
if (param.getName().equals(paramName)) {
|
||||
param.setValue(paramValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
return function;
|
||||
}
|
||||
|
||||
public boolean sameFunctionAs(Function fun) {
|
||||
if (this == fun) {
|
||||
return true;
|
||||
@@ -477,4 +514,21 @@ public class Function implements Cloneable {
|
||||
public void setClassName(String className) {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public String toSerialized() throws JSONException {
|
||||
JSONObject functionObj = new JSONObject();
|
||||
functionObj.put(NAME, getName());
|
||||
JSONArray parametersArr = new JSONArray();
|
||||
List<Parameter> params = getParameters();
|
||||
for (Parameter param : params) {
|
||||
JSONObject parameterObj = new JSONObject();
|
||||
parameterObj.put(PARAMETER_NAME, param.getName());
|
||||
parameterObj.put(PARAMETER_VALUE, param.getValue());
|
||||
parametersArr.put(parameterObj);
|
||||
}
|
||||
functionObj.put(PARAMETERS, parametersArr);
|
||||
return functionObj.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -59,6 +59,8 @@ public interface IProcessor {
|
||||
*/
|
||||
public void generateCode(boolean statistics, boolean trace, boolean context) throws ProcessorException;
|
||||
|
||||
public void generateCode(boolean statistics, boolean trace, boolean context, int option) throws ProcessorException;
|
||||
|
||||
/**
|
||||
*
|
||||
* Only generate context code, not main code.
|
||||
|
||||
@@ -15,9 +15,11 @@ package org.talend.repository;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.ResourcesPlugin;
|
||||
@@ -73,7 +75,16 @@ public final class ProjectManager {
|
||||
|
||||
private Map<String, List<FolderItem>> foldersMap = new HashMap<String, List<FolderItem>>();
|
||||
|
||||
private Set<String> beforeLogonRecords;
|
||||
|
||||
private Set<String> logonRecords;
|
||||
|
||||
private Set<String> migrationRecords;
|
||||
|
||||
private ProjectManager() {
|
||||
beforeLogonRecords = new HashSet<String>();
|
||||
logonRecords = new HashSet<String>();
|
||||
migrationRecords = new HashSet<String>();
|
||||
initCurrentProject();
|
||||
}
|
||||
|
||||
@@ -121,7 +132,7 @@ public final class ProjectManager {
|
||||
String parentBranch = ProjectManager.getInstance().getMainProjectBranch(p);
|
||||
if (parentBranch != null) {
|
||||
for (ProjectReference pr : (List<ProjectReference>) p.getReferencedProjects()) {
|
||||
if (pr.getBranch() == null || parentBranch.equals(pr.getBranch())) {
|
||||
if (pr.getBranch() == null || pr.getBranch().equals(parentBranch)) {
|
||||
resolveRefProject(pr.getReferencedProject()); // only to resolve all
|
||||
}
|
||||
}
|
||||
@@ -135,7 +146,7 @@ public final class ProjectManager {
|
||||
String parentBranch = ProjectManager.getInstance().getMainProjectBranch(p);
|
||||
if (parentBranch != null) {
|
||||
for (ProjectReference pr : (List<ProjectReference>) p.getReferencedProjects()) {
|
||||
if (pr.getBranch() == null || parentBranch.equals(pr.getBranch())) {
|
||||
if (pr.getBranch() == null || pr.getBranch().equals(parentBranch)) {
|
||||
Project project = new Project(pr.getReferencedProject(), false);
|
||||
allReferencedprojects.add(project);
|
||||
resolveSubRefProject(pr.getReferencedProject(), allReferencedprojects); // only to resolve all
|
||||
@@ -251,7 +262,7 @@ public final class ProjectManager {
|
||||
|
||||
List<Project> refProjects = new ArrayList<Project>();
|
||||
for (ProjectReference refProject : (List<ProjectReference>) project.getEmfProject().getReferencedProjects()) {
|
||||
if (refProject.getBranch() == null || parentBranch.equals(refProject.getBranch())) {
|
||||
if (refProject.getBranch() == null || refProject.getBranch().equals(parentBranch)) {
|
||||
refProjects.add(new Project(refProject.getReferencedProject(), false));
|
||||
}
|
||||
}
|
||||
@@ -528,14 +539,6 @@ public final class ProjectManager {
|
||||
|
||||
public String getMainProjectBranch(org.talend.core.model.properties.Project project) {
|
||||
String branchForMainProject = project != null ? getMainProjectBranch(project.getTechnicalLabel()) : null;
|
||||
if (branchForMainProject != null) {
|
||||
if (!branchForMainProject.contains(SVNConstant.NAME_TAGS)
|
||||
&& !branchForMainProject.contains(SVNConstant.NAME_BRANCHES)
|
||||
&& !branchForMainProject.contains(SVNConstant.NAME_TRUNK)
|
||||
&& !branchForMainProject.contains(SVNConstant.NAME_MASTER)) {
|
||||
branchForMainProject = SVNConstant.NAME_BRANCHES + SVNConstant.SEP_CHAR + branchForMainProject;
|
||||
}
|
||||
}
|
||||
return branchForMainProject;
|
||||
}
|
||||
|
||||
@@ -547,16 +550,30 @@ public final class ProjectManager {
|
||||
* @return
|
||||
*/
|
||||
public String getMainProjectBranch(String technicalLabel) {
|
||||
String branchForMainProject = null;
|
||||
Map<String, String> fields = getRepositoryContextFields();
|
||||
if (fields == null || technicalLabel == null) {
|
||||
return null;
|
||||
return branchForMainProject;
|
||||
}
|
||||
String branchKey = IProxyRepositoryFactory.BRANCH_SELECTION + SVNConstant.UNDER_LINE_CHAR + technicalLabel;
|
||||
if (fields.containsKey(branchKey)) {
|
||||
String branchForMainProject = fields.get(branchKey);
|
||||
return branchForMainProject;
|
||||
branchForMainProject = fields.get(branchKey);
|
||||
}
|
||||
return null;
|
||||
if (branchForMainProject != null) {
|
||||
branchForMainProject = getFormatedBranchName(branchForMainProject);
|
||||
}
|
||||
return branchForMainProject;
|
||||
}
|
||||
|
||||
public String getFormatedBranchName(String branchName) {
|
||||
String formatedBranchName = branchName;
|
||||
if (!branchName.startsWith(SVNConstant.NAME_TAGS + SVNConstant.SEP_CHAR)
|
||||
&& !branchName.startsWith(SVNConstant.NAME_BRANCHES + SVNConstant.SEP_CHAR)
|
||||
&& !branchName.startsWith(SVNConstant.NAME_ORIGIN + SVNConstant.SEP_CHAR)
|
||||
&& !branchName.equals(SVNConstant.NAME_TRUNK) && !branchName.equals(SVNConstant.NAME_MASTER)) {
|
||||
formatedBranchName = SVNConstant.NAME_BRANCHES + SVNConstant.SEP_CHAR + branchName;
|
||||
}
|
||||
return formatedBranchName;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -643,4 +660,17 @@ public final class ProjectManager {
|
||||
}
|
||||
return projectType;
|
||||
}
|
||||
|
||||
public Set<String> getBeforeLogonRecords() {
|
||||
return this.beforeLogonRecords;
|
||||
}
|
||||
|
||||
public Set<String> getLogonRecords() {
|
||||
return this.logonRecords;
|
||||
}
|
||||
|
||||
public Set<String> getMigrationRecords() {
|
||||
return this.migrationRecords;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -252,7 +252,15 @@ public class RepositoryNodeUtilities {
|
||||
if (view == null) {
|
||||
return null;
|
||||
}
|
||||
return getRepositoryNode((IRepositoryNode) view.getRoot(), curNode, view, expanded);
|
||||
RepositoryNode node = null;
|
||||
IRepositoryNode nodeFromType = view.getRoot().getRootRepositoryNode(curNode.getRepositoryObjectType());
|
||||
if (nodeFromType != null) {
|
||||
node = getRepositoryNode(nodeFromType, curNode, view, expanded);
|
||||
}
|
||||
if (node == null) {
|
||||
node = getRepositoryNode((IRepositoryNode) view.getRoot(), curNode, view, expanded);
|
||||
}
|
||||
return node;
|
||||
}
|
||||
|
||||
private static IRepositoryNode viewRootNode;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.2.1-SNAPSHOT</version>
|
||||
<version>6.2.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.core.ui</artifactId>
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
// ============================================================================
|
||||
package org.talend.core.ui.context;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.gef.commands.Command;
|
||||
@@ -25,7 +26,11 @@ import org.talend.core.model.process.IContext;
|
||||
import org.talend.core.model.process.IContextManager;
|
||||
import org.talend.core.model.process.IProcess2;
|
||||
import org.talend.core.model.update.EUpdateItemType;
|
||||
import org.talend.core.model.update.IUpdateItemType;
|
||||
import org.talend.core.model.update.IUpdateManager;
|
||||
import org.talend.core.model.update.UpdateManagerHelper;
|
||||
import org.talend.core.model.update.UpdateResult;
|
||||
import org.talend.core.model.update.extension.UpdateManagerProviderDetector;
|
||||
|
||||
/**
|
||||
* An action that can config the contexts. <br/>
|
||||
@@ -61,7 +66,14 @@ public class ConfigureContextAction extends Action {
|
||||
if (manager.getProcess() != null && manager.getProcess() instanceof IProcess2) {
|
||||
IUpdateManager updateManager = manager.getProcess().getUpdateManager();
|
||||
if (updateManager != null) {
|
||||
updateManager.update(EUpdateItemType.CONTEXT);
|
||||
List<UpdateResult> updatesNeeded = new ArrayList<UpdateResult>();
|
||||
updatesNeeded.addAll(updateManager.getUpdatesNeeded(EUpdateItemType.CONTEXT));
|
||||
final IUpdateItemType jobletContextType = UpdateManagerProviderDetector.INSTANCE
|
||||
.getUpdateItemType(UpdateManagerHelper.TYPE_JOBLET_CONTEXT);
|
||||
if (jobletContextType != null) {
|
||||
updatesNeeded.addAll(updateManager.getUpdatesNeeded(jobletContextType));
|
||||
}
|
||||
updateManager.executeUpdates(updatesNeeded);
|
||||
}
|
||||
} else {
|
||||
// set the report editor dirty according to the manager(TdqContextViewComposite)
|
||||
|
||||
@@ -546,7 +546,7 @@ public class MetadataEmfTableEditorView extends AbstractMetadataTableEditorView<
|
||||
@Override
|
||||
protected void setTableViewerCreatorOptions(TableViewerCreator<MetadataColumn> newTableViewerCreator) {
|
||||
super.setTableViewerCreatorOptions(newTableViewerCreator);
|
||||
// newTableViewerCreator.setLazyLoad(true);
|
||||
newTableViewerCreator.setLazyLoad(true);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user