Compare commits
30 Commits
loc
...
cmeng/stig
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1e1c36f822 | ||
|
|
6289ee8a56 | ||
|
|
f384da5e85 | ||
|
|
08b62b8f69 | ||
|
|
b8689e25c1 | ||
|
|
aca3de12e6 | ||
|
|
d11a664df6 | ||
|
|
1602306e93 | ||
|
|
497a7b63e0 | ||
|
|
635210a114 | ||
|
|
6f8bc10c6f | ||
|
|
606aa40664 | ||
|
|
16791ae92d | ||
|
|
fdb83c5620 | ||
|
|
59f8f6c3ce | ||
|
|
0cfdb4ecdd | ||
|
|
0029c41b81 | ||
|
|
761ac868c5 | ||
|
|
40c7bbd422 | ||
|
|
93024e2d02 | ||
|
|
594b972bd2 | ||
|
|
082b262552 | ||
|
|
147d0826db | ||
|
|
0ac05064df | ||
|
|
d26e65929e | ||
|
|
acf4f73876 | ||
|
|
6ebca7beda | ||
|
|
cf73cae37e | ||
|
|
7d6625d66c | ||
|
|
a4acc6db37 |
@@ -2,7 +2,7 @@
|
||||
http://www.talend.com
|
||||
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
## Contents
|
||||
|
||||
14
SECURITY.md
14
SECURITY.md
@@ -1,14 +0,0 @@
|
||||
# Security Policy
|
||||
|
||||
## Supported Versions
|
||||
|
||||
| Version | Supported |
|
||||
| ------- | ------------------ |
|
||||
| 8.0.x | :white_check_mark: |
|
||||
| 7.3.x | :white_check_mark: |
|
||||
| < 7.3.x | :x: |
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
For information on how to report a new security problem please see [here](https://www.talend.com/security/vulnerability-disclosure/).
|
||||
Our existing security advisories are published [here](https://www.talend.com/security/incident-response/).
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<feature id="org.talend.commons.feature" label="Commons Feature" version="8.8.8.qualifier" provider-name=".Talend SA.">
|
||||
<feature id="org.talend.commons.feature" label="Commons Feature" version="8.0.1.qualifier" provider-name=".Talend SA.">
|
||||
<description url="http://www.talend.com/online/featuresdescription.html#commons-feature">Complete description about this feature at http://www.talend.com/online/featuresdescription.html#commons-feature</description>
|
||||
<copyright url="http://www.talend.com/online/copyright.txt">Copyright Talend 2006, 2007</copyright>
|
||||
<license>The licence are describe in branding feature</license>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>8.8.8-SNAPSHOT</version>
|
||||
<version>8.0.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.commons.feature</artifactId>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<feature id="org.talend.core.feature" label="Core Feature" version="8.8.8.qualifier" provider-name=".Talend SA.">
|
||||
<feature id="org.talend.core.feature" label="Core Feature" version="8.0.1.qualifier" provider-name=".Talend SA.">
|
||||
<description url="http://www.talend.com/online/featuresdescription.html#core-feature">Complete description about this feature at http://www.talend.com/online/featuresdescription.html#core-feature</description>
|
||||
<copyright url="http://www.talend.com/online/copyright.txt">Copyright Talend 2006, 2007</copyright>
|
||||
<license>The licence are describe in branding feature</license>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>8.8.8-SNAPSHOT</version>
|
||||
<version>8.0.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.core.feature</artifactId>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<feature
|
||||
id="org.talend.fragment.jars.common.feature"
|
||||
label="Fragment Jars in Common"
|
||||
version="8.8.8.qualifier">
|
||||
version="8.0.1.qualifier">
|
||||
|
||||
<description url="http://www.example.com/description">
|
||||
[Enter Feature Description here.]
|
||||
@@ -54,13 +54,7 @@
|
||||
id="org.talend.libraries.apache.lucene8"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"/>
|
||||
|
||||
<plugin
|
||||
id="org.talend.signon.util"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
unpack="true"/>
|
||||
|
||||
</feature>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>8.8.8-SNAPSHOT</version>
|
||||
<version>8.0.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.fragment.jars.common.feature</artifactId>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<feature id="org.talend.help.feature" label="Help Feature" version="8.8.8.qualifier" provider-name=".Talend SA.">
|
||||
<feature id="org.talend.help.feature" label="Help Feature" version="8.0.1.qualifier" provider-name=".Talend SA.">
|
||||
<description url="http://www.talend.com/online/featuresdescription.html#help-feature">Complete description about this feature at http://www.talend.com/online/featuresdescription.html#help-feature</description>
|
||||
<copyright url="http://www.talend.com/online/copyright.txt">Copyright Talend 2006, 2007</copyright>
|
||||
<license>The licence are describe in branding feature</license>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>8.8.8-SNAPSHOT</version>
|
||||
<version>8.0.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.help.feature</artifactId>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<feature id="org.talend.libraries.jdbc.feature" label="Jdbc_feature Feature" version="8.8.8.qualifier" provider-name=".Talend SA.">
|
||||
<feature id="org.talend.libraries.jdbc.feature" label="Jdbc_feature Feature" version="8.0.1.qualifier" provider-name=".Talend SA.">
|
||||
<description url="http://www.example.com/description">[Enter Feature Description here.]</description>
|
||||
<copyright url="http://www.example.com/copyright">[Enter Copyright Description here.]</copyright>
|
||||
<license url="http://www.example.com/license">[Enter License Description here.]</license>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>8.8.8-SNAPSHOT</version>
|
||||
<version>8.0.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.libraries.jdbc.feature</artifactId>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<feature
|
||||
id="org.talend.platform.feature"
|
||||
label="Platform featrue"
|
||||
version="8.8.8.qualifier"
|
||||
version="8.0.1.qualifier"
|
||||
provider-name=".Talend SA.">
|
||||
|
||||
<description url="http://www.talend.com/online/featuresdescription.html#platform-feature">
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>8.8.8-SNAPSHOT</version>
|
||||
<version>8.0.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.platform.feature</artifactId>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<feature
|
||||
id="org.talend.rcp.feature"
|
||||
label="RCP Feature"
|
||||
version="8.8.8.qualifier"
|
||||
version="8.0.1.qualifier"
|
||||
provider-name=".Talend SA.">
|
||||
|
||||
<description url="http://www.talend.com/online/featuresdescription.html#rcp-feature">
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>8.8.8-SNAPSHOT</version>
|
||||
<version>8.0.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.rcp.feature</artifactId>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<feature id="org.talend.update.p2.feature" label="P2-feature" version="8.8.8.qualifier">
|
||||
<feature id="org.talend.update.p2.feature" label="P2-feature" version="8.0.1.qualifier">
|
||||
<description url="http://www.example.com/description">[Enter Feature Description here.]</description>
|
||||
<copyright url="http://www.example.com/copyright">[Enter Copyright Description here.]</copyright>
|
||||
<license url="http://www.example.com/license">[Enter License Description here.]</license>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>8.8.8-SNAPSHOT</version>
|
||||
<version>8.0.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.update.p2.feature</artifactId>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<feature id="org.talend.updates.feature" label="Updates-feature" version="8.8.8.qualifier" provider-name=".Talend SA.">
|
||||
<feature id="org.talend.updates.feature" label="Updates-feature" version="8.0.1.qualifier" provider-name=".Talend SA.">
|
||||
<copyright url="http://www.talend.com/about-us">[Enter Copyright Description here.]</copyright>
|
||||
<plugin id="org.talend.updates.runtime" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
|
||||
</feature>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>8.8.8-SNAPSHOT</version>
|
||||
<version>8.0.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.updates.feature</artifactId>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<feature id="org.talend.utils.feature" label="Utils_feature Feature" version="8.8.8.qualifier">
|
||||
<feature id="org.talend.utils.feature" label="Utils_feature Feature" version="8.0.1.qualifier">
|
||||
<description url="http://www.example.com/description">This feature contains the Talend utilities plugin and its dependencies.</description>
|
||||
<copyright url="http://www.example.com/copyright">[Enter Copyright Description here.]</copyright>
|
||||
<license url="http://www.example.com/license">[Enter License Description here.]</license>
|
||||
<requires>
|
||||
<import plugin="org.bouncycastle.bcprov" version="1.69.0" match="greaterOrEqual"/>
|
||||
<import plugin="com.cedarsoftware.json-io" version="0.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="com.fasterxml.jackson.core.jackson-annotations" version="2.9.0" match="greaterOrEqual"/>
|
||||
<import plugin="com.fasterxml.jackson.core.jackson-core" version="2.9.8" match="greaterOrEqual"/>
|
||||
|
||||
@@ -4,12 +4,9 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>8.8.8-SNAPSHOT</version>
|
||||
<version>8.0.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.utils.feature</artifactId>
|
||||
<packaging>eclipse-feature</packaging>
|
||||
<properties>
|
||||
<tycho.buildtimestamp.format>${timestamp}</tycho.buildtimestamp.format>
|
||||
</properties>
|
||||
</project>
|
||||
|
||||
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Common UI runtime Plug-in
|
||||
Bundle-SymbolicName: org.talend.common.ui.runtime;singleton:=true
|
||||
Bundle-Version: 8.8.8.qualifier
|
||||
Bundle-Version: 8.0.1.qualifier
|
||||
Require-Bundle: org.eclipse.core.runtime,
|
||||
org.apache.commons.collections,
|
||||
org.talend.libraries.dom4j-jaxen,
|
||||
@@ -11,12 +11,9 @@ Require-Bundle: org.eclipse.core.runtime,
|
||||
org.talend.libraries.apache,
|
||||
org.talend.commons.runtime,
|
||||
org.talend.libraries.ui,
|
||||
org.apache.ant,
|
||||
org.eclipse.jface,
|
||||
org.apache.commons.lang3
|
||||
org.apache.ant
|
||||
Export-Package:
|
||||
org.talend.commons.ui.runtime,
|
||||
org.talend.commons.ui.runtime.custom,
|
||||
org.talend.commons.ui.runtime.exception,
|
||||
org.talend.commons.ui.runtime.expressionbuilder,
|
||||
org.talend.commons.ui.runtime.geometry,
|
||||
@@ -37,8 +34,7 @@ Export-Package:
|
||||
org.talend.commons.ui.runtime.update,
|
||||
org.talend.commons.ui.runtime.utils,
|
||||
org.talend.commons.ui.runtime.ws
|
||||
Import-Package: org.eclipse.gef.commands,
|
||||
org.eclipse.jface.bindings.keys,
|
||||
Import-Package: org.eclipse.jface.bindings.keys,
|
||||
org.eclipse.jface.dialogs,
|
||||
org.eclipse.jface.fieldassist,
|
||||
org.eclipse.jface.resource,
|
||||
|
||||
@@ -4,6 +4,4 @@ bin.includes = META-INF/,\
|
||||
plugin.xml,\
|
||||
icons/,\
|
||||
icons1/,\
|
||||
.,\
|
||||
resources/
|
||||
|
||||
.
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 600 B |
Binary file not shown.
|
Before Width: | Height: | Size: 288 B |
Binary file not shown.
|
Before Width: | Height: | Size: 618 B |
Binary file not shown.
|
Before Width: | Height: | Size: 406 B |
@@ -1,17 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?eclipse version="3.4"?>
|
||||
<plugin>
|
||||
<extension
|
||||
point="org.eclipse.e4.ui.css.swt.theme">
|
||||
<stylesheet
|
||||
uri="resources/theme/light_preferencestyle.css">
|
||||
<themeid
|
||||
refid="org.talend.themes.css.talend.default"></themeid>
|
||||
</stylesheet>
|
||||
<stylesheet
|
||||
uri="resources/theme/dark_preferencestyle.css">
|
||||
<themeid
|
||||
refid="org.eclipse.e4.ui.css.theme.e4_dark"></themeid>
|
||||
</stylesheet>
|
||||
</extension>
|
||||
|
||||
</plugin>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>8.8.8-SNAPSHOT</version>
|
||||
<version>8.0.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.common.ui.runtime</artifactId>
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
/* ############################## Eclipse UI properties ############################## */
|
||||
|
||||
IEclipsePreferences#org-talend-common-ui-runtime:org-talend-common-ui-runtime { /* pseudo attribute added to allow contributions without replacing this node, see Bug 466075 */
|
||||
preferences:
|
||||
'table.background=#org-eclipse-ui-workbench-DARK_BACKGROUND'
|
||||
'table.foreground=#org-eclipse-ui-workbench-DARK_FOREGROUND'
|
||||
}
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
/* ############################## Eclipse UI properties ############################## */
|
||||
|
||||
|
||||
IEclipsePreferences#org-talend-common-ui-runtime:org-talend-common-ui-runtime { /* pseudo attribute added to allow contributions without replacing this node, see Bug 466075 */
|
||||
preferences:
|
||||
'table.background=COLOR-LIST-BACKGROUND'
|
||||
'table.foreground=COLOR_LIST_FOREGROUND'
|
||||
}
|
||||
@@ -12,22 +12,14 @@
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.runtime;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.graphics.RGB;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
|
||||
/**
|
||||
* DOC cmeng class global comment. Detailled comment
|
||||
*/
|
||||
public interface ColorConstants {
|
||||
|
||||
static final String BUNDLE_ID_COMMON_UI_RUNTIME = "org.talend.common.ui.runtime";
|
||||
|
||||
static final String KEY_TABLE_BACKGROUND = "table.background";
|
||||
|
||||
static final String KEY_TABLE_FOREGROUND = "table.foreground";
|
||||
|
||||
static final Color WHITE_COLOR = new Color(null, 255, 255, 255);
|
||||
|
||||
static final Color GREY_COLOR = new Color(null, 215, 215, 215);
|
||||
@@ -36,38 +28,11 @@ public interface ColorConstants {
|
||||
|
||||
static final Color YELLOW_COLOR = new Color(null, 255, 173, 37);// 254, 182, 84
|
||||
|
||||
static final Color RED_COLOR = new Color(null, new RGB(204, 87, 89));// 255
|
||||
|
||||
static final Color ERROR_FONT_COLOR = new Color(null, new RGB(255, 0, 0));// 255
|
||||
static final Color RED_COLOR = new Color(null, new RGB(204,87,89));// 255
|
||||
|
||||
static final Color VERTICAL_SEPERATOR_LINE_COLOR = new Color(null, 162, 179, 195);
|
||||
|
||||
static final Color LOCHMARA_COLOR = new Color(null, 6, 117, 193);
|
||||
|
||||
static final Color WATHET_COLOR = new Color(null, 135, 206, 235);
|
||||
|
||||
static final Color INFO_COLOR = new Color(null, 205, 227, 242);
|
||||
// static final Color INFO_COLOR = YELLOW_GREEN_COLOR;
|
||||
|
||||
static final Color WARN_COLOR = new Color(null, 252, 230, 217);
|
||||
|
||||
static final Color ERR_COLOR = new Color(null, 255, 235, 235);
|
||||
|
||||
static final Color SUCCEED_COLOR = new Color(null, 221, 242, 217);
|
||||
|
||||
static Color getTableBackgroundColor() {
|
||||
return ITalendThemeService.getColor(ColorConstants.BUNDLE_ID_COMMON_UI_RUNTIME, ColorConstants.KEY_TABLE_BACKGROUND)
|
||||
.orElse(Display.getDefault().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
|
||||
}
|
||||
|
||||
static Color getTableForegroundColor() {
|
||||
return ITalendThemeService.getColor(ColorConstants.BUNDLE_ID_COMMON_UI_RUNTIME, ColorConstants.KEY_TABLE_FOREGROUND)
|
||||
.orElse(Display.getDefault().getSystemColor(SWT.COLOR_LIST_FOREGROUND));
|
||||
}
|
||||
|
||||
static Color getTableReadOnlyForegroundColor() {
|
||||
return ITalendThemeService.getColor("CONTEXT_TABLE_READONLY_FOREGROUND")
|
||||
.orElse(Display.getDefault().getSystemColor(SWT.COLOR_WIDGET_DARK_SHADOW));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -23,8 +23,6 @@ import org.talend.commons.ui.runtime.exception.ExceptionServiceImpl;
|
||||
|
||||
public class CommonUIPlugin implements BundleActivator {
|
||||
|
||||
public static String BUNDLE_ID = "org.talend.common.ui.runtime";
|
||||
|
||||
private static Boolean fullyHeadless = null;
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,154 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.runtime;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
import org.eclipse.jface.util.IPropertyChangeListener;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.osgi.framework.BundleContext;
|
||||
import org.osgi.framework.FrameworkUtil;
|
||||
import org.osgi.framework.ServiceReference;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
|
||||
/**
|
||||
* DOC cmeng class global comment. Detailled comment
|
||||
*/
|
||||
public interface ITalendThemeService {
|
||||
|
||||
public static String DEFAULT_PREFERENCE_ID = "org.eclipse.ui.workbench";
|
||||
|
||||
public static String THEME_PREFERENCE_ID = "org.eclipse.e4.ui.css.swt.theme";
|
||||
|
||||
/**
|
||||
* Get color from instance scope preference of default bundleId, which managed by theme; the standard way eclipse
|
||||
* uses
|
||||
*
|
||||
* @param prop
|
||||
* @return the Color, <font color="red">please <b>DON'T</b> dispose it, it is managed by JFaceResources</font>
|
||||
*/
|
||||
static Optional<Color> getColor(String prop) {
|
||||
return getColor(DEFAULT_PREFERENCE_ID, prop);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get color from instance scope preference of bundleId, which managed by theme; the standard way eclipse uses
|
||||
*
|
||||
* @param bundleId the instance scope preference which stores the prop
|
||||
* @param prop
|
||||
* @return the Color, <font color="red">please <b>DON'T</b> dispose it, it is managed by JFaceResources</font>
|
||||
*/
|
||||
static Optional<Color> getColor(String bundleId, String prop) {
|
||||
ITalendThemeService theme = get();
|
||||
if (theme != null) {
|
||||
return Optional.ofNullable(theme.getColorForTheme(bundleId, prop));
|
||||
}
|
||||
return Optional.ofNullable(null);
|
||||
}
|
||||
|
||||
Color getColorForTheme(String bundleId, String prop);
|
||||
|
||||
/**
|
||||
* Get property from instance scope preference of default bundleId, which managed by theme; the standard way eclipse
|
||||
* uses
|
||||
*
|
||||
* @param key
|
||||
* @return
|
||||
*/
|
||||
static Optional<String> getProperty(String key) {
|
||||
return getProperty(DEFAULT_PREFERENCE_ID, key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get property from instance scope preference of bundleId, which managed by theme; the standard way eclipse uses
|
||||
*
|
||||
* @param bundleId the instance scope preference which stores the key
|
||||
* @param key
|
||||
* @return
|
||||
*/
|
||||
static Optional<String> getProperty(String bundleId, String key) {
|
||||
ITalendThemeService theme = get();
|
||||
String value = null;
|
||||
if (theme != null) {
|
||||
value = theme.getPropertyForTheme(bundleId, key);
|
||||
}
|
||||
if (StringUtils.isBlank(value)) {
|
||||
return Optional.ofNullable(null);
|
||||
} else {
|
||||
return Optional.ofNullable(value);
|
||||
}
|
||||
}
|
||||
|
||||
String getPropertyForTheme(String bundleId, String key);
|
||||
|
||||
static void addPropertyChangeListener(IPropertyChangeListener listener) {
|
||||
ITalendThemeService theme = get();
|
||||
if (theme != null) {
|
||||
theme.addPropertyChangeListenerFor(DEFAULT_PREFERENCE_ID, listener);
|
||||
}
|
||||
}
|
||||
|
||||
static void addPropertyChangeListener(String bundleId, IPropertyChangeListener listener) {
|
||||
ITalendThemeService theme = get();
|
||||
if (theme != null) {
|
||||
theme.addPropertyChangeListenerFor(bundleId, listener);
|
||||
}
|
||||
}
|
||||
|
||||
void addPropertyChangeListenerFor(String bundleId, IPropertyChangeListener listener);
|
||||
|
||||
static boolean containsPropertyChangeListener(String bundleId, IPropertyChangeListener listener) {
|
||||
ITalendThemeService theme = get();
|
||||
if (theme != null) {
|
||||
return theme.containsPropertyChangeListenerFor(bundleId, listener);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean containsPropertyChangeListenerFor(String bundleId, IPropertyChangeListener listener);
|
||||
|
||||
static void removePropertyChangeListener(IPropertyChangeListener listener) {
|
||||
ITalendThemeService theme = get();
|
||||
if (theme != null) {
|
||||
theme.removePropertyChangeListenerFor(DEFAULT_PREFERENCE_ID, listener);
|
||||
}
|
||||
}
|
||||
|
||||
static void removePropertyChangeListener(String bundleId, IPropertyChangeListener listener) {
|
||||
ITalendThemeService theme = get();
|
||||
if (theme != null) {
|
||||
theme.removePropertyChangeListenerFor(bundleId, listener);
|
||||
}
|
||||
}
|
||||
|
||||
void removePropertyChangeListenerFor(String bundleId, IPropertyChangeListener listener);
|
||||
|
||||
IPreferenceStore getThemePreferenceStore();
|
||||
|
||||
static ITalendThemeService get() {
|
||||
try {
|
||||
BundleContext bc = FrameworkUtil.getBundle(ITalendThemeService.class).getBundleContext();
|
||||
ServiceReference<ITalendThemeService> serviceReference = bc.getServiceReference(ITalendThemeService.class);
|
||||
if (serviceReference == null) {
|
||||
return null;
|
||||
}
|
||||
return bc.getService(serviceReference);
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,108 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.runtime;
|
||||
|
||||
import org.talend.commons.ui.runtime.custom.IBusinessHandler;
|
||||
import org.talend.commons.ui.runtime.custom.ICustomUI;
|
||||
import org.talend.commons.ui.runtime.custom.ICustomUIEngine;
|
||||
|
||||
/**
|
||||
* DOC cmeng class global comment. Detailled comment
|
||||
*/
|
||||
public class TalendUI {
|
||||
|
||||
private static TalendUI inst;
|
||||
|
||||
private static Object lock = new Object();
|
||||
|
||||
private boolean isStudio = true;
|
||||
|
||||
private ICustomUIEngine stigmaUIEngine;
|
||||
|
||||
private TalendUI() {
|
||||
}
|
||||
|
||||
public static TalendUI get() {
|
||||
if (inst == null) {
|
||||
synchronized (lock) {
|
||||
if (inst == null) {
|
||||
inst = new TalendUI();
|
||||
}
|
||||
}
|
||||
}
|
||||
return inst;
|
||||
}
|
||||
|
||||
public void setStudio(boolean isStudio) {
|
||||
this.isStudio = isStudio;
|
||||
}
|
||||
|
||||
public boolean isStudio() {
|
||||
return this.isStudio;
|
||||
}
|
||||
|
||||
public ICustomUIEngine getStigmaUIEngine() {
|
||||
return this.stigmaUIEngine;
|
||||
}
|
||||
|
||||
public void setStigmaUIEngine(ICustomUIEngine engine) {
|
||||
this.stigmaUIEngine = engine;
|
||||
}
|
||||
|
||||
/**
|
||||
* should try to refactor them to different fragment
|
||||
*/
|
||||
@Deprecated
|
||||
public <T extends IBusinessHandler> T run(IStudioRunnable<T> studioRun, ICustomUI<T> stigmaRun) {
|
||||
if (isStudio()) {
|
||||
return run(studioRun);
|
||||
} else {
|
||||
return run(stigmaRun);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* should try to refactor them to different fragment
|
||||
*/
|
||||
@Deprecated
|
||||
public <T extends IBusinessHandler> T run(IStudioRunnable<T> run) {
|
||||
return run.run();
|
||||
}
|
||||
|
||||
public <T extends IBusinessHandler> T run(ICustomUI<T> ui) {
|
||||
if (ui == null) {
|
||||
throw new RuntimeException("Custom ui is not defined!");
|
||||
}
|
||||
return stigmaUIEngine.run(ui);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static interface IStudioRunnable<T extends IBusinessHandler> {
|
||||
|
||||
T run();
|
||||
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static abstract class AbsStudioRunnable<T extends IBusinessHandler> implements IStudioRunnable<T> {
|
||||
|
||||
@Override
|
||||
public T run() {
|
||||
return doRun();
|
||||
}
|
||||
|
||||
abstract public T doRun();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.runtime.custom;
|
||||
|
||||
import org.eclipse.jface.dialogs.Dialog;
|
||||
|
||||
/**
|
||||
* DOC cmeng class global comment. Detailled comment
|
||||
*/
|
||||
public abstract class AbsBusinessHandler implements IBusinessHandler {
|
||||
|
||||
private Object openResult = Dialog.CANCEL;
|
||||
|
||||
public AbsBusinessHandler() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isModalDialog() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getOpenResult() {
|
||||
return openResult;
|
||||
}
|
||||
|
||||
public void setOpenResult(Object openResult) {
|
||||
this.openResult = openResult;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.runtime.custom;
|
||||
|
||||
|
||||
/**
|
||||
* DOC cmeng class global comment. Detailled comment
|
||||
*/
|
||||
public abstract class AbsUIData extends AbsUIEvent implements IUIData {
|
||||
|
||||
public AbsUIData(String key, String id, String type) {
|
||||
super(key, id, type);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.runtime.custom;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* DOC cmeng class global comment. Detailled comment
|
||||
*/
|
||||
public abstract class AbsUIEvent implements IUIEvent {
|
||||
|
||||
private String type;
|
||||
|
||||
private String id;
|
||||
|
||||
private String key;
|
||||
|
||||
private Map<String, Object> params = new HashMap<>();
|
||||
|
||||
public AbsUIEvent(String key, String id, String type) {
|
||||
this.key = key;
|
||||
this.id = id;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUIId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setUIId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
public void setKey(String key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getParams() {
|
||||
return params;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2023 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.runtime.custom;
|
||||
|
||||
|
||||
/**
|
||||
* DOC cmeng class global comment. Detailled comment
|
||||
*/
|
||||
public abstract class AbsUIHandler implements IUIHandler {
|
||||
|
||||
/**
|
||||
* DOC cmeng AbsUIHandler constructor comment.
|
||||
*/
|
||||
public AbsUIHandler() {
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2023 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.runtime.custom;
|
||||
|
||||
|
||||
/**
|
||||
* DOC cmeng class global comment. Detailled comment
|
||||
*/
|
||||
public abstract class AbsUIHandlerFactory implements IUIHandlerFactory {
|
||||
|
||||
/**
|
||||
* DOC cmeng AbsUIHandlerFactory constructor comment.
|
||||
*/
|
||||
public AbsUIHandlerFactory() {
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,258 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.runtime.custom;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.Semaphore;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.ui.runtime.TalendUI;
|
||||
|
||||
/**
|
||||
* DOC cmeng class global comment. Detailled comment
|
||||
*/
|
||||
public abstract class AbstractCustomUI<T extends IBusinessHandler> implements ICustomUI<T> {
|
||||
|
||||
public static final String NONE = "none";
|
||||
|
||||
public static final String UI_OK = "ok";
|
||||
|
||||
public static final String UI_APPLY = "apply";
|
||||
|
||||
public static final String UI_CANCEL = "cancel";
|
||||
|
||||
public static final String UI_CLOSE = "close";
|
||||
|
||||
private Semaphore modalLock = new Semaphore(1);
|
||||
|
||||
private boolean isModalDialog = true;
|
||||
|
||||
private String uiId;
|
||||
|
||||
private String uiKey;
|
||||
|
||||
private ICustomUIEngine uiEngine;
|
||||
|
||||
private T businessHandler;
|
||||
|
||||
private Map<String, IUIEventHandler> eventMap = new HashMap<>();
|
||||
|
||||
private String selectedButton = NONE;
|
||||
|
||||
public AbstractCustomUI(T businessHandler) {
|
||||
this.businessHandler = businessHandler;
|
||||
this.uiId = UUID.randomUUID().toString();
|
||||
this.uiKey = this.businessHandler.getUiKey();
|
||||
this.isModalDialog = this.businessHandler.isModalDialog();
|
||||
this.uiEngine = TalendUI.get().getStigmaUIEngine();
|
||||
registerEventHandlers();
|
||||
}
|
||||
|
||||
protected IUIEvent createOpenEvent() {
|
||||
DefaultUIEvent openEvent = new DefaultUIEvent(BuiltinEvent.open.name(), uiId, IUIEvent.TYPE_GLOBAL);
|
||||
openEvent.getParams().put(BuiltinParams.uiKey.name(), getUiKey());
|
||||
return openEvent;
|
||||
}
|
||||
|
||||
protected DefaultUIEvent createUIEvent(String key) {
|
||||
DefaultUIEvent event = new DefaultUIEvent(key, uiId);
|
||||
return event;
|
||||
}
|
||||
|
||||
protected DefaultUIData createUIDataEvent(String key) {
|
||||
DefaultUIData uiData = new DefaultUIData(key, uiId);
|
||||
return uiData;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canHandle(IUIEvent event) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleUIEvent(IUIEvent event) {
|
||||
String eventKey = event.getKey();
|
||||
boolean closeDialog = false;
|
||||
if (BuiltinEvent.ok.name().equals(eventKey)) {
|
||||
setSelectedButton(UI_OK);
|
||||
closeDialog = onOk(event);
|
||||
} else if (BuiltinEvent.apply.name().equals(eventKey)) {
|
||||
setSelectedButton(UI_APPLY);
|
||||
closeDialog = onApply(event);
|
||||
} else if (BuiltinEvent.close.name().equals(eventKey)) {
|
||||
setSelectedButton(UI_CLOSE);
|
||||
closeDialog = onClose(event);
|
||||
} else if (BuiltinEvent.cancel.name().equals(eventKey)) {
|
||||
setSelectedButton(UI_CANCEL);
|
||||
closeDialog = onCancel(event);
|
||||
} else {
|
||||
IUIEventHandler eventListener = eventMap.get(eventKey);
|
||||
if (eventListener != null) {
|
||||
eventListener.handleUIEvent(event);
|
||||
} else {
|
||||
ExceptionHandler.process(new Exception("Can't handle event: " + eventKey));
|
||||
}
|
||||
}
|
||||
if (closeDialog) {
|
||||
closeDialog();
|
||||
} else {
|
||||
setSelectedButton(NONE);
|
||||
}
|
||||
}
|
||||
|
||||
protected int getOpenResult() {
|
||||
if (isCancelled()) {
|
||||
return CANCEL;
|
||||
} else {
|
||||
return OK;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object provideUIData(IUIData uiData) {
|
||||
return getUIEngine().provideUIData(uiData);
|
||||
}
|
||||
|
||||
protected void closeDialog() {
|
||||
collectDialogData();
|
||||
try {
|
||||
dispatchUIEvent(new DefaultUIEvent(BuiltinEvent.close.name(), uiId));
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
this.uiEngine.unregisterUIEventHandler(uiId);
|
||||
modalLock.release();
|
||||
onDialogClosed();
|
||||
}
|
||||
|
||||
@Override
|
||||
public T run() {
|
||||
try {
|
||||
modalLock.acquire();
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException("Can't open dialog", e);
|
||||
}
|
||||
try {
|
||||
this.uiEngine.registerUIEventHandler(uiId, this);
|
||||
doRun();
|
||||
if (isModalDialog()) {
|
||||
try {
|
||||
while (true) {
|
||||
boolean succeed = modalLock.tryAcquire(5, TimeUnit.MINUTES);
|
||||
if (succeed) {
|
||||
break;
|
||||
}
|
||||
if (Thread.currentThread().isInterrupted()) {
|
||||
throw new InterruptedException();
|
||||
}
|
||||
if (this.uiEngine == null || !this.uiEngine.isClientAlive()) {
|
||||
throw new Exception("Lose connection with client");
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("Dialog is closed unexpected", e);
|
||||
}
|
||||
}
|
||||
return businessHandler;
|
||||
} finally {
|
||||
modalLock.release();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public T getBusinessHandler() {
|
||||
return this.businessHandler;
|
||||
}
|
||||
|
||||
abstract protected T collectDialogData();
|
||||
|
||||
protected void onDialogClosed() {
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
protected void doRun() {
|
||||
IUIEvent openEvent = createOpenEvent();
|
||||
dispatchUIEvent(openEvent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispatchUIEvent(IUIEvent event) {
|
||||
event.setUIId(uiId);
|
||||
this.uiEngine.dispatchUIEvent(this, event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<Object> requestUIData(IUIData uiData) {
|
||||
uiData.setUIId(uiId);
|
||||
return this.uiEngine.requestUIData(this, uiData);
|
||||
}
|
||||
|
||||
protected void registerEventListener(String key, IUIEventHandler listener) {
|
||||
eventMap.put(key, listener);
|
||||
}
|
||||
|
||||
public boolean isModalDialog() {
|
||||
// currently don't support to change modal, if do it, need to update logic of run
|
||||
return isModalDialog;
|
||||
}
|
||||
|
||||
protected ICustomUIEngine getUIEngine() {
|
||||
return this.uiEngine;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getId() {
|
||||
return this.uiId;
|
||||
}
|
||||
|
||||
public String getUiKey() {
|
||||
return uiKey;
|
||||
}
|
||||
|
||||
protected void registerEventHandlers() {
|
||||
}
|
||||
|
||||
public String getSelectedButton() {
|
||||
return selectedButton;
|
||||
}
|
||||
|
||||
public void setSelectedButton(String selectedButton) {
|
||||
this.selectedButton = selectedButton;
|
||||
}
|
||||
|
||||
public boolean isCancelled() {
|
||||
return Arrays.asList(UI_CANCEL, UI_CLOSE).contains(getSelectedButton());
|
||||
}
|
||||
|
||||
protected boolean onOk(IUIEvent event) {
|
||||
return onApply(event);
|
||||
}
|
||||
|
||||
protected boolean onApply(IUIEvent event) {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected boolean onClose(IUIEvent event) {
|
||||
return onCancel(event);
|
||||
}
|
||||
|
||||
protected boolean onCancel(IUIEvent event) {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,128 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.runtime.custom;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* DOC cmeng class global comment. Detailled comment
|
||||
*/
|
||||
public abstract class AbstractCustomUIEngine implements ICustomUIEngine {
|
||||
|
||||
private static final Logger log = Logger.getLogger(AbstractCustomUIEngine.class);
|
||||
|
||||
private Map<String, IUIEventHandler> uiEventHandlers = Collections.synchronizedMap(new HashMap<>());
|
||||
|
||||
private Map<String, Set<IUIEventHandler>> globalUIEventHandlers = Collections.synchronizedMap(new HashMap<>());
|
||||
|
||||
public AbstractCustomUIEngine() {
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T extends IBusinessHandler> T run(ICustomUI<T> ui) {
|
||||
return doRun(ui);
|
||||
}
|
||||
|
||||
protected <T extends IBusinessHandler> T doRun(ICustomUI<T> ui) {
|
||||
return ui.run();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleUIEvent(IUIEvent event) {
|
||||
if (StringUtils.equals(event.getType(), IUIEvent.TYPE_GLOBAL)) {
|
||||
Set<IUIEventHandler> handlers = globalUIEventHandlers.get(event.getKey());
|
||||
if (handlers != null) {
|
||||
new Thread(() -> {
|
||||
for (IUIEventHandler handler : handlers) {
|
||||
if (handler.canHandle(event)) {
|
||||
handler.handleUIEvent(event);
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
} else {
|
||||
IUIEventHandler handler = uiEventHandlers.get(event.getUIId());
|
||||
if (handler != null) {
|
||||
new Thread(() -> {
|
||||
handler.handleUIEvent(event);
|
||||
}).start();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object provideUIData(IUIData uiData) {
|
||||
if (StringUtils.equals(uiData.getType(), IUIEvent.TYPE_GLOBAL)) {
|
||||
Set<IUIEventHandler> handlers = globalUIEventHandlers.get(uiData.getKey());
|
||||
if (handlers != null) {
|
||||
for (IUIEventHandler handler : handlers) {
|
||||
if (handler.canHandle(uiData)) {
|
||||
return handler.provideUIData(uiData);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
String uiId = uiData.getUIId();
|
||||
IUIEventHandler handler = uiEventHandlers.get(uiId);
|
||||
if (handler != null) {
|
||||
return handler.provideUIData(uiData);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerUIEventHandler(String uiId, IUIEventHandler handler) {
|
||||
IUIEventHandler existing = uiEventHandlers.put(uiId, handler);
|
||||
if (existing != null) {
|
||||
log.warn("duplicated register for UI id: " + uiId);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unregisterUIEventHandler(String uiId) {
|
||||
uiEventHandlers.remove(uiId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerGlobalUIEventHandler(String eventId, IUIEventHandler handler) {
|
||||
Set<IUIEventHandler> handlers = globalUIEventHandlers.get(eventId);
|
||||
if (handlers == null) {
|
||||
synchronized (globalUIEventHandlers) {
|
||||
handlers = globalUIEventHandlers.get(eventId);
|
||||
if (handlers == null) {
|
||||
handlers = Collections.synchronizedSet(new LinkedHashSet<>());
|
||||
globalUIEventHandlers.put(eventId, handlers);
|
||||
}
|
||||
}
|
||||
}
|
||||
handlers.add(handler);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unregisterGlobalUIEventHandler(String eventId, IUIEventHandler handler) {
|
||||
Set<IUIEventHandler> handlers = globalUIEventHandlers.get(eventId);
|
||||
if (handlers != null) {
|
||||
handlers.remove(handler);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.runtime.custom;
|
||||
|
||||
|
||||
/**
|
||||
* DOC cmeng class global comment. Detailled comment
|
||||
*/
|
||||
public class DefaultUIData extends AbsUIData {
|
||||
|
||||
public DefaultUIData(String key, String id) {
|
||||
// type is null, means it is an event inside custom ui, which id is 'id'
|
||||
super(key, id, null);
|
||||
}
|
||||
|
||||
public DefaultUIData(String key, String id, String type) {
|
||||
super(key, id, type);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.runtime.custom;
|
||||
|
||||
|
||||
/**
|
||||
* DOC cmeng class global comment. Detailled comment
|
||||
*/
|
||||
public class DefaultUIEvent extends AbsUIEvent {
|
||||
|
||||
public DefaultUIEvent(String key, String id) {
|
||||
// type is null, means it is an event side the custom ui, which id is 'id'
|
||||
super(key, id, null);
|
||||
}
|
||||
|
||||
public DefaultUIEvent(String key, String id, String type) {
|
||||
super(key, id, type);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.runtime.custom;
|
||||
|
||||
/**
|
||||
* DOC cmeng class global comment. Detailled comment
|
||||
*/
|
||||
public interface IBusinessHandler {
|
||||
|
||||
String getUiKey();
|
||||
|
||||
boolean isModalDialog();
|
||||
|
||||
Object getOpenResult();
|
||||
|
||||
}
|
||||
@@ -1,100 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2023 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.runtime.custom;
|
||||
|
||||
import org.eclipse.gef.commands.Command;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
|
||||
/**
|
||||
* DOC cmeng class global comment. Detailled comment
|
||||
*/
|
||||
public interface ICommonUIHandler extends IUIHandler {
|
||||
|
||||
/**
|
||||
* Constant for no image (value 0).
|
||||
*
|
||||
* @see #MessageDialog(Shell, String, Image, String, int, int, String...)
|
||||
*/
|
||||
static final int NONE = 0;
|
||||
|
||||
/**
|
||||
* Constant for the error image, or a simple dialog with the error image and
|
||||
* a single OK button (value 1).
|
||||
*
|
||||
* @see #MessageDialog(Shell, String, Image, String, int, int, String...)
|
||||
* @see #open(int, Shell, String, String, int)
|
||||
*/
|
||||
static final int ERROR = 1;
|
||||
|
||||
/**
|
||||
* Constant for the info image, or a simple dialog with the info image and a
|
||||
* single OK button (value 2).
|
||||
*
|
||||
* @see #MessageDialog(Shell, String, Image, String, int, int, String...)
|
||||
* @see #open(int, Shell, String, String, int)
|
||||
*/
|
||||
static final int INFORMATION = 2;
|
||||
|
||||
/**
|
||||
* Constant for the question image, or a simple dialog with the question
|
||||
* image and Yes/No buttons (value 3).
|
||||
*
|
||||
* @see #MessageDialog(Shell, String, Image, String, int, int, String...)
|
||||
* @see #open(int, Shell, String, String, int)
|
||||
*/
|
||||
static final int QUESTION = 3;
|
||||
|
||||
/**
|
||||
* Constant for the warning image, or a simple dialog with the warning image
|
||||
* and a single OK button (value 4).
|
||||
*
|
||||
* @see #MessageDialog(Shell, String, Image, String, int, int, String...)
|
||||
* @see #open(int, Shell, String, String, int)
|
||||
*/
|
||||
static final int WARNING = 4;
|
||||
|
||||
/**
|
||||
* Constant for a simple dialog with the question image and OK/Cancel buttons (value 5).
|
||||
*
|
||||
* @see #open(int, Shell, String, String, int)
|
||||
* @since 3.5
|
||||
*/
|
||||
static final int CONFIRM = 5;
|
||||
|
||||
/**
|
||||
* Constant for a simple dialog with the question image and Yes/No/Cancel buttons (value 6).
|
||||
*
|
||||
* @see #open(int, Shell, String, String, int)
|
||||
* @since 3.5
|
||||
*/
|
||||
static final int QUESTION_WITH_CANCEL = 6;
|
||||
|
||||
static final String CONTEXT_COMMAND_STACK = "COMMAND_STACK";
|
||||
|
||||
boolean execute(Command cmd);
|
||||
|
||||
boolean openQuestion(String title, String msg);
|
||||
|
||||
boolean openConfirm(String title, String msg);
|
||||
|
||||
void openWarning(String title, String msg);
|
||||
|
||||
MessageDialogWithToggleBusinessHandler openToggle(MessageDialogWithToggleBusinessHandler bh);
|
||||
|
||||
void openError(String title, String msg);
|
||||
|
||||
static ICommonUIHandler get() {
|
||||
return UIHandlerFactories.inst().getUIHandler(ICommonUIHandler.class);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2023 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.runtime.custom;
|
||||
|
||||
|
||||
public interface ICrossPlatformPreferenceStore {
|
||||
|
||||
boolean getBoolean(String key);
|
||||
|
||||
boolean getDefaultBoolean(String key);
|
||||
|
||||
void setValue(String key, boolean value);
|
||||
|
||||
void setValue(String key, String value);
|
||||
|
||||
Object getOriginStore();
|
||||
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.runtime.custom;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
import org.talend.commons.ui.runtime.TalendUI;
|
||||
|
||||
/**
|
||||
* DOC cmeng class global comment. Detailled comment
|
||||
*/
|
||||
public interface ICustomUI<T extends IBusinessHandler> extends IUIEventHandler {
|
||||
|
||||
public static final int OK = 0;
|
||||
|
||||
public static final int CANCEL = 1;
|
||||
|
||||
String getId();
|
||||
|
||||
T getBusinessHandler();
|
||||
|
||||
T run();
|
||||
|
||||
default T open() {
|
||||
return TalendUI.get().run(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send event to stigma
|
||||
*/
|
||||
void dispatchUIEvent(IUIEvent event);
|
||||
|
||||
/**
|
||||
* Request data from stigma
|
||||
*/
|
||||
CompletableFuture<Object> requestUIData(IUIData uiData);
|
||||
|
||||
static enum BuiltinEvent {
|
||||
open,
|
||||
ok,
|
||||
apply,
|
||||
close,
|
||||
cancel;
|
||||
}
|
||||
|
||||
static enum BuiltinParams {
|
||||
uiKey,
|
||||
name,
|
||||
title,
|
||||
message;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.runtime.custom;
|
||||
|
||||
|
||||
/**
|
||||
* DOC cmeng class global comment. Detailled comment
|
||||
*/
|
||||
public interface ICustomUIDialog {
|
||||
|
||||
int open();
|
||||
|
||||
int getOpenResult();
|
||||
|
||||
}
|
||||
@@ -1,64 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.runtime.custom;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
/**
|
||||
* DOC cmeng class global comment. Detailled comment
|
||||
*/
|
||||
public interface ICustomUIEngine {
|
||||
|
||||
static final String CONTEXT_PROCESS = "PROCESS";
|
||||
|
||||
<T extends IBusinessHandler> T run(ICustomUI<T> ui);
|
||||
|
||||
/**
|
||||
* Handle event from stigma
|
||||
*/
|
||||
void handleUIEvent(IUIEvent event);
|
||||
|
||||
/**
|
||||
* Provide UI data to stigma
|
||||
*/
|
||||
Object provideUIData(IUIData uiData);
|
||||
|
||||
/**
|
||||
* Send event to stigma
|
||||
*/
|
||||
<T extends IBusinessHandler> void dispatchUIEvent(ICustomUI<T> ui, IUIEvent event);
|
||||
|
||||
/**
|
||||
* Request data from stigma
|
||||
*/
|
||||
<T extends IBusinessHandler> CompletableFuture<Object> requestUIData(ICustomUI<T> ui, IUIData uiData);
|
||||
|
||||
<M> M convertValue(Object value, Class<M> clz);
|
||||
|
||||
Object readJson(String value) throws Exception;
|
||||
|
||||
void registerThreadLocalContext(String key, Object value);
|
||||
|
||||
Object getThreadLocalContext(String key);
|
||||
|
||||
void registerUIEventHandler(String uiId, IUIEventHandler handler);
|
||||
|
||||
void unregisterUIEventHandler(String uiId);
|
||||
|
||||
void registerGlobalUIEventHandler(String eventId, IUIEventHandler handler);
|
||||
|
||||
void unregisterGlobalUIEventHandler(String eventId, IUIEventHandler handler);
|
||||
|
||||
boolean isClientAlive();
|
||||
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.runtime.custom;
|
||||
|
||||
|
||||
/**
|
||||
* DOC cmeng class global comment. Detailled comment
|
||||
*/
|
||||
public interface IUIData extends IUIEvent {
|
||||
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.runtime.custom;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* DOC cmeng class global comment. Detailled comment
|
||||
*/
|
||||
public interface IUIEvent {
|
||||
|
||||
static final String TYPE_GLOBAL = "global";
|
||||
|
||||
String getType();
|
||||
|
||||
String getUIId();
|
||||
|
||||
void setUIId(String id);
|
||||
|
||||
String getKey();
|
||||
|
||||
Map<String, Object> getParams();
|
||||
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.runtime.custom;
|
||||
|
||||
|
||||
/**
|
||||
* DOC cmeng class global comment. Detailled comment
|
||||
*/
|
||||
public interface IUIEventHandler {
|
||||
|
||||
boolean canHandle(IUIEvent event);
|
||||
|
||||
void handleUIEvent(IUIEvent event);
|
||||
|
||||
/**
|
||||
* Provide UIData to frontend
|
||||
*/
|
||||
Object provideUIData(IUIData uiData);
|
||||
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2023 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.runtime.custom;
|
||||
|
||||
|
||||
/**
|
||||
* DOC cmeng class global comment. Detailled comment
|
||||
*/
|
||||
public interface IUIHandlerFactory {
|
||||
|
||||
<T extends IUIHandler> T getUIHandler(Class<T> clz);
|
||||
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2023 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.runtime.custom;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
|
||||
public class InputDialogBusinessCustomUI extends AbstractCustomUI<InputDialogBusinessHandler> {
|
||||
|
||||
public InputDialogBusinessCustomUI(InputDialogBusinessHandler businessHandler) {
|
||||
super(businessHandler);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected IUIEvent createOpenEvent() {
|
||||
IUIEvent openEvent = super.createOpenEvent();
|
||||
Map<String, Object> params = openEvent.getParams();
|
||||
InputDialogBusinessHandler bh = getBusinessHandler();
|
||||
params.put(BuiltinParams.title.name(), bh.getTitle());
|
||||
params.put(BuiltinParams.message.name(), bh.getMessage());
|
||||
params.put("defaultValue", bh.getDefaultValue());
|
||||
return openEvent;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean onApply(IUIEvent event) {
|
||||
DefaultUIData valueEvent = createUIDataEvent("value");
|
||||
String errMsg = null;
|
||||
try {
|
||||
Object value = requestUIData(valueEvent).get();
|
||||
InputDialogBusinessHandler bh = getBusinessHandler();
|
||||
if (value == null) {
|
||||
value = "";
|
||||
}
|
||||
errMsg = bh.getValidator().isValid((String) value);
|
||||
if (StringUtils.isBlank(errMsg)) {
|
||||
return true;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
errMsg = e.getLocalizedMessage();
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
DefaultUIEvent errorEvent = new DefaultUIEvent("error", getId());
|
||||
errorEvent.getParams().put("message", errMsg);
|
||||
dispatchUIEvent(errorEvent);
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected InputDialogBusinessHandler collectDialogData() {
|
||||
DefaultUIData valueEvent = createUIDataEvent("value");
|
||||
InputDialogBusinessHandler businessHandler = getBusinessHandler();
|
||||
try {
|
||||
Object value = requestUIData(valueEvent).get();
|
||||
businessHandler.setOpenResult(getOpenResult());
|
||||
if (value != null) {
|
||||
businessHandler.setResult(value.toString());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
return businessHandler;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2023 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.runtime.custom;
|
||||
|
||||
public class InputDialogBusinessHandler extends AbsBusinessHandler {
|
||||
|
||||
private static final String UI_KEY = "InputDialog";
|
||||
|
||||
private String title;
|
||||
|
||||
private String message;
|
||||
|
||||
private String defaultValue;
|
||||
|
||||
private String result;
|
||||
|
||||
private IInputDialogInputValidator validator;
|
||||
|
||||
public InputDialogBusinessHandler(String title, String message, String defaultValue, IInputDialogInputValidator validator) {
|
||||
super();
|
||||
this.title = title;
|
||||
this.message = message;
|
||||
this.defaultValue = defaultValue;
|
||||
this.validator = validator;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUiKey() {
|
||||
return UI_KEY;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public String getDefaultValue() {
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
public String getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResult(String result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
public IInputDialogInputValidator getValidator() {
|
||||
return validator;
|
||||
}
|
||||
|
||||
public interface IInputDialogInputValidator {
|
||||
|
||||
public String isValid(String newText);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,134 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.runtime.custom;
|
||||
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
|
||||
/**
|
||||
* DOC cmeng class global comment. Detailled comment
|
||||
*/
|
||||
public class MessageDialogBusinessHandler extends AbsBusinessHandler {
|
||||
|
||||
/**
|
||||
* Constant for no image (value 0).
|
||||
*
|
||||
* @see #MessageDialog(Shell, String, Image, String, int, int, String...)
|
||||
*/
|
||||
public static final int NONE = ICommonUIHandler.NONE;
|
||||
|
||||
/**
|
||||
* Constant for the error image, or a simple dialog with the error image and
|
||||
* a single OK button (value 1).
|
||||
*
|
||||
* @see #MessageDialog(Shell, String, Image, String, int, int, String...)
|
||||
* @see #open(int, Shell, String, String, int)
|
||||
*/
|
||||
public static final int ERROR = ICommonUIHandler.ERROR;
|
||||
|
||||
/**
|
||||
* Constant for the info image, or a simple dialog with the info image and a
|
||||
* single OK button (value 2).
|
||||
*
|
||||
* @see #MessageDialog(Shell, String, Image, String, int, int, String...)
|
||||
* @see #open(int, Shell, String, String, int)
|
||||
*/
|
||||
public static final int INFORMATION = ICommonUIHandler.INFORMATION;
|
||||
|
||||
/**
|
||||
* Constant for the question image, or a simple dialog with the question
|
||||
* image and Yes/No buttons (value 3).
|
||||
*
|
||||
* @see #MessageDialog(Shell, String, Image, String, int, int, String...)
|
||||
* @see #open(int, Shell, String, String, int)
|
||||
*/
|
||||
public static final int QUESTION = ICommonUIHandler.QUESTION;
|
||||
|
||||
/**
|
||||
* Constant for the warning image, or a simple dialog with the warning image
|
||||
* and a single OK button (value 4).
|
||||
*
|
||||
* @see #MessageDialog(Shell, String, Image, String, int, int, String...)
|
||||
* @see #open(int, Shell, String, String, int)
|
||||
*/
|
||||
public static final int WARNING = ICommonUIHandler.WARNING;
|
||||
|
||||
/**
|
||||
* Constant for a simple dialog with the question image and OK/Cancel buttons (value 5).
|
||||
*
|
||||
* @see #open(int, Shell, String, String, int)
|
||||
* @since 3.5
|
||||
*/
|
||||
public static final int CONFIRM = ICommonUIHandler.CONFIRM;
|
||||
|
||||
/**
|
||||
* Constant for a simple dialog with the question image and Yes/No/Cancel buttons (value 6).
|
||||
*
|
||||
* @see #open(int, Shell, String, String, int)
|
||||
* @since 3.5
|
||||
*/
|
||||
public static final int QUESTION_WITH_CANCEL = ICommonUIHandler.QUESTION_WITH_CANCEL;
|
||||
|
||||
private static final String UI_KEY = "MessageDialog";
|
||||
|
||||
private String title;
|
||||
|
||||
private String message;
|
||||
|
||||
private int dialogType;
|
||||
|
||||
private boolean isModalDialog = true;
|
||||
|
||||
public MessageDialogBusinessHandler(int dialogType) {
|
||||
super();
|
||||
this.dialogType = dialogType;
|
||||
}
|
||||
|
||||
public int getDialogType() {
|
||||
return dialogType;
|
||||
}
|
||||
|
||||
public void setDialogType(int dialogType) {
|
||||
this.dialogType = dialogType;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUiKey() {
|
||||
return UI_KEY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isModalDialog() {
|
||||
return this.isModalDialog;
|
||||
}
|
||||
|
||||
public void setModalDialog(boolean modal) {
|
||||
this.isModalDialog = modal;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,105 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.runtime.custom;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.jface.dialogs.MessageDialog;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
|
||||
/**
|
||||
* DOC cmeng class global comment. Detailled comment
|
||||
*/
|
||||
public class MessageDialogCustomUI extends AbstractCustomUI<MessageDialogBusinessHandler> {
|
||||
|
||||
public MessageDialogCustomUI(MessageDialogBusinessHandler businessHandler) {
|
||||
super(businessHandler);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected IUIEvent createOpenEvent() {
|
||||
IUIEvent openEvent = super.createOpenEvent();
|
||||
Map<String, Object> params = openEvent.getParams();
|
||||
MessageDialogBusinessHandler bh = getBusinessHandler();
|
||||
params.put(BuiltinParams.title.name(), bh.getTitle());
|
||||
params.put(BuiltinParams.message.name(), bh.getMessage());
|
||||
params.put("dialogType", mapDialogType(bh.getDialogType()));
|
||||
return openEvent;
|
||||
}
|
||||
|
||||
private String mapDialogType(int type) {
|
||||
switch (type) {
|
||||
case MessageDialog.CONFIRM:
|
||||
return "confirm";
|
||||
case MessageDialog.ERROR:
|
||||
return "error";
|
||||
case MessageDialog.INFORMATION:
|
||||
return "info";
|
||||
case MessageDialog.QUESTION:
|
||||
return "question";
|
||||
case MessageDialog.QUESTION_WITH_CANCEL:
|
||||
return "questionWithCancel";
|
||||
case MessageDialog.WARNING:
|
||||
return "warning";
|
||||
default:
|
||||
return "none";
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected MessageDialogBusinessHandler collectDialogData() {
|
||||
MessageDialogBusinessHandler businessHandler = getBusinessHandler();
|
||||
try {
|
||||
businessHandler.setOpenResult(getDialogOpenResult());
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
return businessHandler;
|
||||
}
|
||||
|
||||
private Object getDialogOpenResult() {
|
||||
Object result = null;
|
||||
boolean isCancelled = isCancelled();
|
||||
switch (getBusinessHandler().getDialogType()) {
|
||||
case MessageDialog.CONFIRM:
|
||||
case MessageDialog.ERROR:
|
||||
case MessageDialog.INFORMATION:
|
||||
case MessageDialog.WARNING:
|
||||
if (isCancelled) {
|
||||
result = Boolean.FALSE;
|
||||
} else {
|
||||
result = Boolean.TRUE;
|
||||
}
|
||||
break;
|
||||
case MessageDialog.QUESTION:
|
||||
if (isCancelled) {
|
||||
result = Boolean.FALSE;
|
||||
} else {
|
||||
result = Boolean.TRUE;
|
||||
}
|
||||
break;
|
||||
case MessageDialog.QUESTION_WITH_CANCEL:
|
||||
if (isCancelled) {
|
||||
result = Boolean.FALSE;
|
||||
} else {
|
||||
result = Boolean.TRUE;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
result = getOpenResult();
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,95 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2023 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.runtime.custom;
|
||||
|
||||
public class MessageDialogWithToggleBusinessHandler extends MessageDialogBusinessHandler {
|
||||
|
||||
private static final String UI_KEY = "MessageDialogWithToggle";
|
||||
|
||||
private String toggleMessage;
|
||||
|
||||
private boolean toggleState;
|
||||
|
||||
private ICrossPlatformPreferenceStore preferenceStore;
|
||||
|
||||
private String prefKey;
|
||||
|
||||
private String[] buttonLabels;
|
||||
|
||||
private int defaultBtnIndex = 0;
|
||||
|
||||
public MessageDialogWithToggleBusinessHandler(int dialogType, String title, String message, String[] buttonLabels,
|
||||
int defaultBtnIndex, String toggleMessage, boolean toggleState) {
|
||||
super(dialogType);
|
||||
this.setTitle(title);
|
||||
this.setMessage(message);
|
||||
this.buttonLabels = buttonLabels;
|
||||
this.defaultBtnIndex = defaultBtnIndex;
|
||||
this.toggleMessage = toggleMessage;
|
||||
this.toggleState = toggleState;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUiKey() {
|
||||
return UI_KEY;
|
||||
}
|
||||
|
||||
public String getToggleMessage() {
|
||||
return toggleMessage;
|
||||
}
|
||||
|
||||
public void setToggleMessage(String toggleMessage) {
|
||||
this.toggleMessage = toggleMessage;
|
||||
}
|
||||
|
||||
public boolean getToggleState() {
|
||||
return toggleState;
|
||||
}
|
||||
|
||||
public void setToggleState(boolean toggleState) {
|
||||
this.toggleState = toggleState;
|
||||
}
|
||||
|
||||
public ICrossPlatformPreferenceStore getPreferenceStore() {
|
||||
return preferenceStore;
|
||||
}
|
||||
|
||||
public void setPreferenceStore(ICrossPlatformPreferenceStore preferenceStore) {
|
||||
this.preferenceStore = preferenceStore;
|
||||
}
|
||||
|
||||
public String getPrefKey() {
|
||||
return prefKey;
|
||||
}
|
||||
|
||||
public void setPrefKey(String prefKey) {
|
||||
this.prefKey = prefKey;
|
||||
}
|
||||
|
||||
public String[] getButtonLabels() {
|
||||
return buttonLabels;
|
||||
}
|
||||
|
||||
public void setButtonLabels(String[] buttonLabels) {
|
||||
this.buttonLabels = buttonLabels;
|
||||
}
|
||||
|
||||
public int getDefaultBtnIndex() {
|
||||
return defaultBtnIndex;
|
||||
}
|
||||
|
||||
public void setDefaultBtnIndex(int defaultBtnIndex) {
|
||||
this.defaultBtnIndex = defaultBtnIndex;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2023 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.runtime.custom;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
import org.eclipse.jface.dialogs.MessageDialog;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
|
||||
public class MessageDialogWithToggleCustomUI extends AbstractCustomUI<MessageDialogWithToggleBusinessHandler> {
|
||||
|
||||
public MessageDialogWithToggleCustomUI(MessageDialogWithToggleBusinessHandler businessHandler) {
|
||||
super(businessHandler);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected IUIEvent createOpenEvent() {
|
||||
IUIEvent openEvent = super.createOpenEvent();
|
||||
Map<String, Object> params = openEvent.getParams();
|
||||
MessageDialogWithToggleBusinessHandler bh = getBusinessHandler();
|
||||
params.put(BuiltinParams.title.name(), bh.getTitle());
|
||||
params.put(BuiltinParams.message.name(), bh.getMessage());
|
||||
params.put("toggleMsg", bh.getToggleMessage());
|
||||
params.put("toggleState", bh.getToggleState());
|
||||
params.put("dialogImageType", mapDialogImageType(bh.getDialogType()));
|
||||
params.put("buttons", bh.getButtonLabels());
|
||||
params.put("defaultBtnIndex", bh.getDefaultBtnIndex());
|
||||
return openEvent;
|
||||
}
|
||||
|
||||
private String mapDialogImageType(int type) {
|
||||
switch (type) {
|
||||
case MessageDialog.CONFIRM:
|
||||
return "confirm";
|
||||
case MessageDialog.ERROR:
|
||||
return "error";
|
||||
case MessageDialog.INFORMATION:
|
||||
return "info";
|
||||
case MessageDialog.QUESTION:
|
||||
return "question";
|
||||
case MessageDialog.QUESTION_WITH_CANCEL:
|
||||
return "questionWithCancel";
|
||||
case MessageDialog.WARNING:
|
||||
return "warning";
|
||||
default:
|
||||
return "none";
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected MessageDialogWithToggleBusinessHandler collectDialogData() {
|
||||
DefaultUIData toggleStateReq = createUIDataEvent("toggleState");
|
||||
MessageDialogWithToggleBusinessHandler businessHandler = getBusinessHandler();
|
||||
try {
|
||||
CompletableFuture<Object> toggleStateResp = requestUIData(toggleStateReq);
|
||||
businessHandler.setOpenResult(getOpenResult());
|
||||
boolean toggleState = Boolean.valueOf(toggleStateResp.get().toString());
|
||||
if (toggleState != businessHandler.getToggleState()) {
|
||||
businessHandler.setToggleState(toggleState);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
return businessHandler;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,73 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2023 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.runtime.custom;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
|
||||
import org.osgi.framework.BundleContext;
|
||||
import org.osgi.framework.FrameworkUtil;
|
||||
import org.osgi.framework.ServiceReference;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
|
||||
/**
|
||||
* DOC cmeng class global comment. Detailled comment
|
||||
*/
|
||||
public class UIHandlerFactories implements IUIHandlerFactory {
|
||||
|
||||
private static UIHandlerFactories inst;
|
||||
|
||||
private Collection<IUIHandlerFactory> factories;
|
||||
|
||||
public static UIHandlerFactories inst() {
|
||||
if (inst == null) {
|
||||
inst = new UIHandlerFactories();
|
||||
}
|
||||
return inst;
|
||||
}
|
||||
|
||||
private UIHandlerFactories() {
|
||||
factories = new HashSet<>();
|
||||
init();
|
||||
}
|
||||
|
||||
private void init() {
|
||||
try {
|
||||
BundleContext bc = FrameworkUtil.getBundle(UIHandlerFactories.class).getBundleContext();
|
||||
Collection<ServiceReference<IUIHandlerFactory>> serviceReferences = bc.getServiceReferences(IUIHandlerFactory.class,
|
||||
null);
|
||||
for (ServiceReference<IUIHandlerFactory> sr : serviceReferences) {
|
||||
IUIHandlerFactory impl = bc.getService(sr);
|
||||
factories.add(impl);
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T extends IUIHandler> T getUIHandler(Class<T> clz) {
|
||||
for (IUIHandlerFactory factory : factories) {
|
||||
T ui = factory.getUIHandler(clz);
|
||||
if (ui != null) {
|
||||
return ui;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public ICommonUIHandler getCommonUIHandler() {
|
||||
return getUIHandler(ICommonUIHandler.class);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,96 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.runtime.custom;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
import java.io.StringWriter;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* DOC cmeng class global comment. Detailled comment
|
||||
*/
|
||||
public class UnsupportedCustomUI<T extends IBusinessHandler> extends AbstractCustomUI<T> {
|
||||
|
||||
UnsupportedBusinessHandler realHandler;
|
||||
|
||||
public UnsupportedCustomUI(T bh, String name) {
|
||||
super(bh);
|
||||
realHandler = new UnsupportedBusinessHandler(name);
|
||||
}
|
||||
|
||||
public UnsupportedCustomUI(T bh, String name, String message) {
|
||||
super(bh);
|
||||
realHandler = new UnsupportedBusinessHandler(name, message);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected IUIEvent createOpenEvent() {
|
||||
IUIEvent openEvent = super.createOpenEvent();
|
||||
Map<String, Object> params = openEvent.getParams();
|
||||
params.put(BuiltinParams.name.name(), realHandler.getDialogName());
|
||||
params.put(BuiltinParams.message.name(), realHandler.getDialogName());
|
||||
return openEvent;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected T collectDialogData() {
|
||||
return getBusinessHandler();
|
||||
}
|
||||
|
||||
public static class UnsupportedBusinessHandler extends AbsBusinessHandler {
|
||||
|
||||
private static final String UI_KEY = "UnsupportedDialog";
|
||||
|
||||
private String dialogName;
|
||||
|
||||
private String message;
|
||||
|
||||
public UnsupportedBusinessHandler(String name) {
|
||||
super();
|
||||
this.dialogName = name;
|
||||
StringWriter sw = new StringWriter();
|
||||
PrintWriter pw = new PrintWriter(sw);
|
||||
new Exception().printStackTrace(pw);
|
||||
this.message = sw.toString();
|
||||
}
|
||||
|
||||
public UnsupportedBusinessHandler(String name, String message) {
|
||||
super();
|
||||
this.dialogName = name;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUiKey() {
|
||||
return UI_KEY;
|
||||
}
|
||||
|
||||
public String getDialogName() {
|
||||
return dialogName;
|
||||
}
|
||||
|
||||
public void setDialogName(String dialogName) {
|
||||
this.dialogName = dialogName;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -72,27 +72,12 @@ public final class MessageBoxExceptionHandler {
|
||||
}
|
||||
}
|
||||
|
||||
public static void process(Throwable ex, Shell shell, boolean wrapMessage) {
|
||||
CommonExceptionHandler.process(ex);
|
||||
|
||||
if (CommonsPlugin.isHeadless() || CommonsPlugin.isJUnitTest()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (shell != null) {
|
||||
showMessage(ex, shell, wrapMessage);
|
||||
}
|
||||
}
|
||||
|
||||
public static void showMessage(Throwable ex, Shell shell) {
|
||||
showMessage(ex, shell, true);
|
||||
}
|
||||
/**
|
||||
* Open a message box showing a generic message and exception message.
|
||||
*
|
||||
* @param ex - exception to show
|
||||
*/
|
||||
public static void showMessage(Throwable ex, Shell shell, boolean wrapMessage) {
|
||||
public static void showMessage(Throwable ex, Shell shell) {
|
||||
if (ex.equals(lastShowedAction)) {
|
||||
return;
|
||||
}
|
||||
@@ -100,14 +85,10 @@ public final class MessageBoxExceptionHandler {
|
||||
|
||||
// TODO smallet use ErrorDialogWidthDetailArea ?
|
||||
String title = Messages.getString("commons.error"); //$NON-NLS-1$
|
||||
String excepMsg = ex.getMessage();
|
||||
String msg = Messages.getString("exception.errorOccured", ex.getMessage()); //$NON-NLS-1$
|
||||
//add for tup-19726/19790, as for exception detailMessage will show more details on log area.
|
||||
if(ex.getCause()!=null) {
|
||||
excepMsg = ex.getCause().getMessage();
|
||||
}
|
||||
String msg = Messages.getString("exception.errorOccured", excepMsg); //$NON-NLS-1$
|
||||
if (!wrapMessage) {
|
||||
msg = Messages.getString("exception.message", excepMsg); //$NON-NLS-1$
|
||||
msg = Messages.getString("exception.errorOccured", ex.getCause().getMessage()); //$NON-NLS-1$
|
||||
}
|
||||
Priority priority = CommonExceptionHandler.getPriority(ex);
|
||||
|
||||
|
||||
@@ -114,7 +114,6 @@ TableViewerCreator.Table.BeNull=table is null
|
||||
TableViewerCreator.TableColumn.AssertMsg=The TableColumn of TableEditorColumn with idProperty '{0}' has not the correct Table parent
|
||||
TreeToTablesLinker.Type.Unsupported=This type of currentControl is unsupported
|
||||
commons.error=Error
|
||||
exception.message={0}\nSee log for more details.
|
||||
exception.errorOccured=An error occured ({0}).\nSee log for more details.
|
||||
ModelSelectionDialog.Message=Please choose one option, or cancel.
|
||||
ModelSelectionDialog.Option=option
|
||||
|
||||
@@ -0,0 +1,132 @@
|
||||
AccessorUtils.Assert0=The 'BeanPropertyAccessors' of the column (with title '{0}' and id '{1}') is not configured correctly. {2} is required for bean <B>
|
||||
AccessorUtils.Assert1=The 'BeanPropertyAccessors' of the column (with title '{0}' and id '{1}') is not configured correctly or the value set has not the correct type.
|
||||
AccessorUtils.NoClassDef=NoClassDefFoundError ({0})\:{1}
|
||||
AccessorUtils.isReq=\ is required for the bean (<B>).
|
||||
AccessorUtils.isReqValue=\ is required for the value (<V>), but the value could be adapted with CellEditorValueAdapter.
|
||||
AddPushButton.AddButton.Tip=Add
|
||||
AddAllPushButton.AddAllButton.Tip=Add All
|
||||
CellEditorDialogBehavior.textContent=...
|
||||
CellEditorValueAdapterFactory.valueNotStringType=Bean value should be a class of String type \!
|
||||
ColorStyledText.RedoItem.Text=Redo
|
||||
ColorStyledText.UndoItem.Text=Undo
|
||||
ColorStyledText.CopyItem.Text=Copy
|
||||
ColorStyledText.PasteItem.Text=Paste
|
||||
ColorStyledText.SelectAllItem.Text=Select All
|
||||
ContentProposalAdapterExtended.close=close
|
||||
ContentProposalAdapterExtended.closeFocusout=close focusout
|
||||
ControlUtils.Unsupported1=This control ({0}) is not supported, add case if you want...
|
||||
CopyPushButton.CopyButton.Tip=Copy selected items
|
||||
Curve2D.MaxNum.Be0=maximumSegments must be positive or 0
|
||||
Curve2D.MinNum.Be0=minimumSegments must be positive or 0
|
||||
DateDialog.textContent=Select Date & Time
|
||||
DefaultCellModifier.tableItemDispose=TableItem disposed
|
||||
DialogErrorForCellEditorListener.Error.MsgDialogTitle=Error
|
||||
ErrorDialogWidthDetailArea.ErrorMessage.Text=Error Message
|
||||
ErrorDialogWidthDetailArea.ErrorMessage.ColumnText=Column can not be empty
|
||||
ErrorDialogWidthDetailArea.ErrorMessage.ColumnText.NotValid=The input '{0}' is not valid, will use the original value '{1}' instead of it.
|
||||
ErrorDialogWithContinue.setParameter=Set parameters and continue
|
||||
EventUtil.activate=activate
|
||||
EventUtil.arm=arm
|
||||
EventUtil.close=close
|
||||
EventUtil.collapse=collapse
|
||||
EventUtil.deactivate=deactivate
|
||||
EventUtil.defaultSelection=default selection
|
||||
EventUtil.deiconify=deiconify
|
||||
EventUtil.detailNull=null
|
||||
EventUtil.dispose=dispose
|
||||
EventUtil.dragDetect=drag detect
|
||||
EventUtil.expand=expand
|
||||
EventUtil.focusIn=focus in
|
||||
EventUtil.focusOut=focus out
|
||||
EventUtil.hardKeyDown=hard key down
|
||||
EventUtil.hardKeyUp=hard key up
|
||||
EventUtil.help=help
|
||||
EventUtil.hide=hide
|
||||
EventUtil.iconify=iconify
|
||||
EventUtil.keyDown=key down
|
||||
EventUtil.keyUp=key up
|
||||
EventUtil.menuDetect=menu detect
|
||||
EventUtil.modify=modify
|
||||
EventUtil.mouseDoubleClick=mouse double click
|
||||
EventUtil.mouseDown=mouse down
|
||||
EventUtil.mouseEnter=mouse enter
|
||||
EventUtil.mouseExit=mouse exit
|
||||
EventUtil.mouseHover=mouse hover
|
||||
EventUtil.mouseMove=mouse move
|
||||
EventUtil.mouseUp=mouse up
|
||||
EventUtil.move=move
|
||||
EventUtil.paint=paint
|
||||
EventUtil.resize=resize
|
||||
EventUtil.selectedEqual=SELECTED=
|
||||
EventUtil.selection=selection
|
||||
EventUtil.show=show
|
||||
EventUtil.traverse=traverse
|
||||
EventUtil.typeNull=null
|
||||
EventUtil.UnknowDetail=unkown ??? value of event detail \:
|
||||
EventUtil.UnknowType=unkown ??? value of event type \:
|
||||
EventUtil.verify=verify
|
||||
ExceptionHandler.Parameter.BeNull=ex param cannot be null
|
||||
ExceptionMessageDialog.Cancel=Cancel
|
||||
ExceptionMessageDialog.log=log
|
||||
ExceptionMessageDialog.No=No
|
||||
ExceptionMessageDialog.OK=OK
|
||||
ExceptionMessageDialog.Yes=Yes
|
||||
ExportPushButton.ExportButton.Tip=Export all rows into XML file
|
||||
ExportPushButtonForExtendedTable.ErrorMsg.Text=Error occurred
|
||||
ExtendedTableAddCommand.Add.Label=Add one or more table entries
|
||||
ExtendedTableCopyCommand.Copy.Label=Copy one or more table entries in the internal clipboard
|
||||
ExtendedTableModel.ModifiedObject.Error=ModifiedBeanListenable object must be set before use this method
|
||||
ExtendedTableMoveCommand.MoveLabel=Move up or down, one or more table entries
|
||||
ExtendedTablePasteCommand.Paste.Label=Paste data from the internal clipoard
|
||||
ExtendedTableRemoveCommand.Romve.Label=Remove table entries
|
||||
ExtendedTableResetDBTypesCommand.ResetDBTypes.Label=Reset all DB Types to get the defaults
|
||||
ImportPushButton.ImportButton.Tip=Replace all rows by import from xml file
|
||||
ImportPushButtonForExtendedTable.ErrorMsg.Text=Error occurred
|
||||
LabelledFileField.BrowseButton.Text=Browse...
|
||||
LabelledFileField.FileDialog.Text=Select a
|
||||
Mode.Mode.ToString=Mode [{0}]
|
||||
ModeReader.IgnoreElement=Ignore unknown element
|
||||
ModelSelectionDialog.Title=Edit parameter using repository
|
||||
ModifyBeanValueCommand.ModifyCell.Label=Modify cell value
|
||||
MoveDownPushButton.MoveDownTip=Move down selected items
|
||||
MoveUpPushButton.MoveUpButton.Tip=Move up selected items
|
||||
PastePushButton.PasteButton.Label=Paste
|
||||
ProposalUtils.CellProposal.Error=Proposal of this type of CellEditor is unsupported \:
|
||||
ProposalUtils.CtrlProposal.ErrorMsg=Proposal for this type of Control is unsupported \:
|
||||
RemovePushButton.RemoveButton.Tip=Remove selected items
|
||||
ResetDBTypesButton.ResetDBTypesButton.Tip=Reset DB Types
|
||||
Rule.rule=Rule [{0}]
|
||||
SaveAsGenericSchemaPushButton.saveAsSchema=Save as generic schema
|
||||
SelectContextVariablesPushButton.Label=Select context variables
|
||||
SWTCalendarWithTime.contentEvening=Evening
|
||||
SWTCalendarWithTime.contentHr=Hr:
|
||||
SWTCalendarWithTime.contentMin=Min:
|
||||
SWTCalendarWithTime.contentMorning=Morning
|
||||
SWTCalendarWithTime.contentNoon=Noon
|
||||
SWTCalendarWithTime.contentNow=Now
|
||||
SWTCalendarWithTime.contnetSec=Sec:
|
||||
TableViewerCreator.CallMethod.ErrorMsg=You can call this method only if you have already called createTable()
|
||||
TableViewerCreator.CellModifier.ExError=The current CellModifier does'nt support this operation. \n Use '{0}' or a class which extends it to use this feature
|
||||
TableViewerCreator.columnNoIBeanProperty=The column '{0}' ('{1}') has a CellEditor set but does'nt have a IBeanPropertyAccessors \!
|
||||
TableViewerCreator.columnNullId=Column '{0}' has null id \!
|
||||
TableViewerCreator.IdProperty.AssertMsg=You must change the idProperty of one of your column, the idProperty must be unique for each column for one Table.
|
||||
TableViewerCreator.Table.BeNull=table is null
|
||||
TableViewerCreator.TableColumn.AssertMsg=The TableColumn of TableEditorColumn with idProperty '{0}' has not the correct Table parent
|
||||
TreeToTablesLinker.Type.Unsupported=This type of currentControl is unsupported
|
||||
commons.error=Error
|
||||
exception.errorOccured=An error occured ({0}).\nSee log for more details.
|
||||
ModelSelectionDialog.Message=Please choose one option, or cancel.
|
||||
ModelSelectionDialog.Option=option
|
||||
ModelSelectionDialog.BuiltIn=Change to built-in property.
|
||||
ModelSelectionDialog.ViewSchema=View schema (read only).
|
||||
ModelSelectionDialog.newViewSchema=View schema
|
||||
ModelSelectionDialog.ViewQuery=View query (read only).
|
||||
ModelSelectionDialog.Update=Update repository connection.
|
||||
FileStep2.previewFailure=Preview error. Some settings must be changed.\nNote\: Preview errors are generally due to a wrong encoding setting.
|
||||
GlobalServiceRegister.ServiceNotRegistered=The service {0} has not been registered.
|
||||
MessageBoxExceptionHandler.showMessageForSchemaImportXml.unParseXML.title=The xml can't parse.
|
||||
MessageBoxExceptionHandler.showMessageForSchemaImportXml.unParseXML.msg=The xml can't parse in this format.
|
||||
SSLConfirmDialog.KeyStore=please input keyStore
|
||||
SSLConfirmDialog.TrustStore=please input trustStore
|
||||
SSLConfirmDialog.Password=please input password
|
||||
HibernateUtils.auditDBIsNotUsable=The audit database must be empty or only contains tables related to audit.
|
||||
@@ -114,7 +114,6 @@ TableViewerCreator.Table.BeNull=la table est null.
|
||||
TableViewerCreator.TableColumn.AssertMsg=La TableColumn de TableEditorColumn avec idProperty '{0}' n'a pas la bonne Table parente
|
||||
TreeToTablesLinker.Type.Unsupported=Ce type de currentControl n'est pas support\u00E9
|
||||
commons.error=Erreur
|
||||
exception.message={0}\nConsultez le log pour plus de d\u00E9tails.
|
||||
exception.errorOccured=Une erreur est survenue ({0}).\nConsultez le log pour plus de d\u00E9tails.
|
||||
ModelSelectionDialog.Message=S\u00E9lectionnez une option ou annulez.
|
||||
ModelSelectionDialog.Option=Option
|
||||
|
||||
@@ -65,7 +65,7 @@ EventUtil.typeNull=NULL
|
||||
EventUtil.UnknowDetail=\u30A4\u30D9\u30F3\u30C8\u8A73\u7D30\u306E\u4E0D\u660E\u306A???\u5024:
|
||||
EventUtil.UnknowType=\u30A4\u30D9\u30F3\u30C8\u30BF\u30A4\u30D7\u306E\u4E0D\u660E\u306A???\u5024:
|
||||
EventUtil.verify=\u78BA\u8A8D
|
||||
ExceptionHandler.Parameter.BeNull=ex \u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u306B\u306Fnull\u3092\u8A2D\u5B9A\u3067\u304D\u307E\u305B\u3093
|
||||
ExceptionHandler.Parameter.BeNull=ex \u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u306B\u306Fnull\u3092\u8A2D\u5B9A\u51FA\u6765\u307E\u305B\u3093
|
||||
ExceptionMessageDialog.Cancel=\u30AD\u30E3\u30F3\u30BB\u30EB
|
||||
ExceptionMessageDialog.log=\u30ED\u30B0
|
||||
ExceptionMessageDialog.No=\u3044\u3044\u3048
|
||||
@@ -73,12 +73,12 @@ ExceptionMessageDialog.OK=OK
|
||||
ExceptionMessageDialog.Yes=\u306F\u3044
|
||||
ExportPushButton.ExportButton.Tip=\u3059\u3079\u3066\u306E\u884C\u3092XML\u30D5\u30A1\u30A4\u30EB\u306B\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8
|
||||
ExportPushButtonForExtendedTable.ErrorMsg.Text=\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F
|
||||
ExtendedTableAddCommand.Add.Label=\u30C6\u30FC\u30D6\u30EB\u30A8\u30F3\u30C8\u30EA\u30FC\u30921\u3064\u4EE5\u4E0A\u8FFD\u52A0
|
||||
ExtendedTableCopyCommand.Copy.Label=\u5185\u90E8\u30AF\u30EA\u30FC\u30F3\u30DC\u30FC\u30C9\u306B\u30C6\u30FC\u30D6\u30EB\u30A8\u30F3\u30C8\u30EA\u30FC\u30921\u3064\u4EE5\u4E0A\u30B3\u30D4\u30FC
|
||||
ExtendedTableAddCommand.Add.Label=\u30C6\u30FC\u30D6\u30EB\u30A8\u30F3\u30C8\u30EA\u30921\u3064\u4EE5\u4E0A\u8FFD\u52A0
|
||||
ExtendedTableCopyCommand.Copy.Label=\u5185\u90E8\u30AF\u30EA\u30FC\u30F3\u30DC\u30FC\u30C9\u306B\u30C6\u30FC\u30D6\u30EB\u30A8\u30F3\u30C8\u30EA\u30921\u3064\u4EE5\u4E0A\u30B3\u30D4\u30FC
|
||||
ExtendedTableModel.ModifiedObject.Error=\u3053\u306E\u30E1\u30BD\u30C3\u30C9\u3092\u4F7F\u7528\u3059\u308B\u524D\u306BModifiedBeanListenable\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u3092\u8A2D\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
|
||||
ExtendedTableMoveCommand.MoveLabel=\u8907\u6570\u306E\u30C6\u30FC\u30D6\u30EB\u30A8\u30F3\u30C8\u30EA\u30FC\u3092\u4E0A\u4E0B\u306B\u79FB\u52D5
|
||||
ExtendedTableMoveCommand.MoveLabel=\u8907\u6570\u306E\u30C6\u30FC\u30D6\u30EB\u30A8\u30F3\u30C8\u30EA\u3092\u4E0A\u4E0B\u306B\u79FB\u52D5
|
||||
ExtendedTablePasteCommand.Paste.Label=\u5185\u90E8\u30AF\u30EA\u30C3\u30D7\u30DC\u30FC\u30C9\u304B\u3089\u30C7\u30FC\u30BF\u3092\u8CBC\u308A\u4ED8\u3051\u308B
|
||||
ExtendedTableRemoveCommand.Romve.Label=\u30C6\u30FC\u30D6\u30EB\u30A8\u30F3\u30C8\u30EA\u30FC\u3092\u524A\u9664
|
||||
ExtendedTableRemoveCommand.Romve.Label=\u30C6\u30FC\u30D6\u30EB\u30A8\u30F3\u30C8\u30EA\u3092\u524A\u9664
|
||||
ExtendedTableResetDBTypesCommand.ResetDBTypes.Label=DB\u30BF\u30A4\u30D7\u3092\u3059\u3079\u3066\u30EA\u30BB\u30C3\u30C8\u3057\u3066\u30C7\u30D5\u30A9\u30EB\u30C8\u3092\u53D6\u5F97
|
||||
ImportPushButton.ImportButton.Tip=\u884C\u3092\u3059\u3079\u3066XML\u30D5\u30A1\u30A4\u30EB\u304B\u3089\u306E\u30A4\u30F3\u30DD\u30FC\u30C8\u306B\u7F6E\u63DB
|
||||
ImportPushButtonForExtendedTable.ErrorMsg.Text=\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F
|
||||
@@ -96,7 +96,7 @@ ProposalUtils.CtrlProposal.ErrorMsg=\u3053\u306E\u30BF\u30A4\u30D7\u306E\u5236\u
|
||||
RemovePushButton.RemoveButton.Tip=\u9078\u629E\u3057\u305F\u30A2\u30A4\u30C6\u30E0\u3092\u524A\u9664
|
||||
ResetDBTypesButton.ResetDBTypesButton.Tip=DB\u30BF\u30A4\u30D7\u3092\u30EA\u30BB\u30C3\u30C8
|
||||
Rule.rule=\u30EB\u30FC\u30EB[{0}]
|
||||
SaveAsGenericSchemaPushButton.saveAsSchema=\u30B8\u30A7\u30CD\u30EA\u30C3\u30AF\u30B9\u30AD\u30FC\u30DE\u3068\u3057\u3066\u4FDD\u5B58
|
||||
SaveAsGenericSchemaPushButton.saveAsSchema=\u6C4E\u7528\u30B9\u30AD\u30FC\u30DE\u3068\u3057\u3066\u4FDD\u5B58
|
||||
SelectContextVariablesPushButton.Label=\u30B3\u30F3\u30C6\u30AF\u30B9\u30C8\u5909\u6570\u3092\u9078\u629E
|
||||
SWTCalendarWithTime.contentEvening=\u5915\u65B9
|
||||
SWTCalendarWithTime.contentHr=\u6642:
|
||||
@@ -106,7 +106,7 @@ SWTCalendarWithTime.contentNoon=\u5348\u5F8C
|
||||
SWTCalendarWithTime.contentNow=\u73FE\u5728
|
||||
SWTCalendarWithTime.contnetSec=\u79D2:
|
||||
TableViewerCreator.CallMethod.ErrorMsg=\u3053\u306E\u30E1\u30BD\u30C3\u30C9\u306F\u3001createTable()\u3092\u65E2\u306B\u547C\u3073\u51FA\u3057\u3066\u3044\u308B\u5834\u5408\u306E\u307F\u547C\u3073\u51FA\u305B\u307E\u3059
|
||||
TableViewerCreator.CellModifier.ExError=\u73FE\u5728\u306ECellModifier\u306F\u3053\u306E\u64CD\u4F5C\u3092\u30B5\u30DD\u30FC\u30C8\u3057\u3066\u3044\u307E\u305B\u3093\u3002 \n \u3053\u306E\u6A5F\u80FD\u3092\u4F7F\u7528\u3059\u308B\u306B\u306F\u3001'{0}'\u304B\u3001\u62E1\u5F35\u3059\u308B\u30AF\u30E9\u30B9\u3092\u4F7F\u3044\u307E\u3059\u3002
|
||||
TableViewerCreator.CellModifier.ExError=\u73FE\u5728\u306ECellModifier\u306F\u3053\u306E\u64CD\u4F5C\u3092\u30B5\u30DD\u30FC\u30C8\u3057\u3066\u3044\u307E\u305B\u3093\u3002\n\u3053\u306E\u6A5F\u80FD\u3092\u4F7F\u3046\u306B\u306F\u3001'{0}'\u304B\u62E1\u5F35\u30AF\u30E9\u30B9\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044
|
||||
TableViewerCreator.columnNoIBeanProperty=\u30AB\u30E9\u30E0'{0}' ('{1}')\u306B\u306FCellEditor\u30BB\u30C3\u30C8\u304C\u3042\u308A\u307E\u3059\u304C\u3001IBeanPropertyAccessors\u304C\u3042\u308A\u307E\u305B\u3093!
|
||||
TableViewerCreator.columnNullId=\u30AB\u30E9\u30E0'{0}'\u304Cnull\u3067\u3059\uFF01
|
||||
TableViewerCreator.IdProperty.AssertMsg=\u30AB\u30E9\u30E0\u306EidProperty\u306E\u5909\u66F4\u304C\u5FC5\u8981\u3067\u3059\u3001idProperty\u306F\uFF11\u3064\u306E\u30C6\u30FC\u30D6\u30EB\u3067\u30E6\u30CB\u30FC\u30AF\u3067\u306A\u304F\u3066\u306F\u306A\u308A\u307E\u305B\u3093\u3002
|
||||
@@ -114,7 +114,6 @@ TableViewerCreator.Table.BeNull=\u30C6\u30FC\u30D6\u30EB\u304CNULL\u3067\u3059
|
||||
TableViewerCreator.TableColumn.AssertMsg=idProperty'{0}'\u304C\u3042\u308BTableEditorColumn\u306ETableColumn\u306B\u306F\u3001\u6B63\u3057\u3044\u89AA\u30C6\u30FC\u30D6\u30EB\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u305B\u3093
|
||||
TreeToTablesLinker.Type.Unsupported=currentControl\u306E\u3053\u306E\u30BF\u30A4\u30D7\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
|
||||
commons.error=\u30A8\u30E9\u30FC
|
||||
exception.message={0}\n\u8A73\u7D30\u306F\u30ED\u30B0\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002
|
||||
exception.errorOccured=\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F({0})\u3002\n\u8A73\u7D30\u306F\u30ED\u30B0\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002
|
||||
ModelSelectionDialog.Message=\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\uFF11\u3064\u9078\u629E\u3059\u308B\u304B\u3001\u30AD\u30E3\u30F3\u30BB\u30EB\u3057\u3066\u304F\u3060\u3055\u3044\u3002
|
||||
ModelSelectionDialog.Option=\u30AA\u30D7\u30B7\u30E7\u30F3
|
||||
@@ -122,11 +121,11 @@ ModelSelectionDialog.BuiltIn=\u7D44\u307F\u8FBC\u307F\u30D7\u30ED\u30D1\u30C6\u3
|
||||
ModelSelectionDialog.ViewSchema=\u30B9\u30AD\u30FC\u30DE\u3092\u8868\u793A\u3057\u307E\u3059(\u8AAD\u307F\u53D6\u308A\u5C02\u7528)\u3002
|
||||
ModelSelectionDialog.newViewSchema=\u30B9\u30AD\u30FC\u30DE\u3092\u8868\u793A
|
||||
ModelSelectionDialog.ViewQuery=\u30AF\u30A8\u30EA\u30FC\u3046\u3092\u8868\u793A\u3057\u307E\u3059(\u8AAD\u307F\u53D6\u308A\u5C02\u7528)\u3002
|
||||
ModelSelectionDialog.Update=\u30EA\u30DD\u30B8\u30C8\u30EA\u30FC\u63A5\u7D9A\u3092\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u3057\u307E\u3059\u3002
|
||||
ModelSelectionDialog.Update=\u30EA\u30DD\u30B8\u30C8\u30EA\u30FC\u63A5\u7D9A\u3092\u66F4\u65B0\u3057\u307E\u3059\u3002
|
||||
SSLConfirmDialog.KeyStore=KeyStore\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044
|
||||
SSLConfirmDialog.TrustStore=TrustStore\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044
|
||||
SSLConfirmDialog.Password=\u30D1\u30B9\u30EF\u30FC\u30C9\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044
|
||||
FileStep2.previewFailure=\u30D7\u30EC\u30D3\u30E5\u30FC\u30A8\u30E9\u30FC\u3002\u4E00\u90E8\u306E\u8A2D\u5B9A\u3092\u5909\u66F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n\u6CE8: \u30D7\u30EC\u30D3\u30E5\u30FC\u30A8\u30E9\u30FC\u306F\u4E00\u822C\u7684\u306B\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u8A2D\u5B9A\u306E\u8AA4\u308A\u304C\u539F\u56E0\u3067\u3059\u3002
|
||||
FileStep2.previewFailure=\u30D7\u30EC\u30D3\u30E5\u30FC\u30A8\u30E9\u30FC\u3002\u3044\u304F\u3064\u304B\u306E\u8A2D\u5B9A\u5909\u66F4\u304C\u5FC5\u8981\u3067\u3059\u3002\n\u6CE8: \u30D7\u30EC\u30D3\u30E5\u30FC\u30A8\u30E9\u30FC\u306F\u4E00\u822C\u306B\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u8A2D\u5B9A\u306E\u8AA4\u308A\u304C\u539F\u56E0\u3067\u3059\u3002
|
||||
GlobalServiceRegister.ServiceNotRegistered=\u30B5\u30FC\u30D3\u30B9{0}\u304C\u767B\u9332\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
|
||||
MessageBoxExceptionHandler.showMessageForSchemaImportXml.unParseXML.title=XML\u306B\u89E3\u6790\u3067\u304D\u307E\u305B\u3093.
|
||||
MessageBoxExceptionHandler.showMessageForSchemaImportXml.unParseXML.msg=\u3053\u306E\u5F62\u5F0F\u3067\u306F\u3001XML\u306B\u89E3\u6790\u3067\u304D\u307E\u305B\u3093.
|
||||
|
||||
@@ -106,7 +106,7 @@ SWTCalendarWithTime.contentNoon=\u4E2D\u5348
|
||||
SWTCalendarWithTime.contentNow=\u73B0\u5728
|
||||
SWTCalendarWithTime.contnetSec=\u79D2:
|
||||
TableViewerCreator.CallMethod.ErrorMsg=\u53EA\u6709\u60A8\u5DF2\u7ECF\u8C03\u7528\u4E86 createTable() \u65B9\u6CD5\u540E\uFF0C\u624D\u80FD\u8C03\u7528\u6B64\u65B9\u6CD5\u3002
|
||||
TableViewerCreator.CellModifier.ExError=\u5F53\u524D CellModifier \u4E0D\u652F\u6301\u6B64\u64CD\u4F5C\u3002 \n \u4F7F\u7528 '{0}' \u6216\u6269\u5C55\u5B83\u7684\u7C7B\u6765\u4F7F\u7528\u6B64\u529F\u80FD
|
||||
TableViewerCreator.CellModifier.ExError=\u5F53\u524D CellModifier \u4E0D\u652F\u6301\u6B64\u64CD\u4F5C\u3002\n \u4F7F\u7528 '{0}' \u6216\u80FD\u591F\u5BF9\u5176\u8FDB\u884C\u6269\u5C55\u7684\u7C7B\u6765\u4F7F\u7528\u6B64\u529F\u80FD
|
||||
TableViewerCreator.columnNoIBeanProperty=\u5217 '{0}' ('{1}') \u8BBE\u7F6E\u4E86 CellEditor\uFF0C\u4F46\u6CA1\u6709 IBeanPropertyAccessors\uFF01
|
||||
TableViewerCreator.columnNullId=\u5217 '{0}' \u7684 id \u4E3A null\uFF01
|
||||
TableViewerCreator.IdProperty.AssertMsg=\u4F60\u5FC5\u987B\u6539\u53D8\u5176\u4E2D\u4E00\u4E2A\u5217\u7684 idProperty\uFF0C\u4E00\u4E2A\u8868\u4E2D\u7684\u6BCF\u4E2A\u5217\u7684 idProperty \u5FC5\u987B\u552F\u4E00\u3002
|
||||
@@ -114,8 +114,7 @@ TableViewerCreator.Table.BeNull=\u8868\u4E3A null
|
||||
TableViewerCreator.TableColumn.AssertMsg=TableEditorColumn \u7684 idProperty \u4E3A '{0}' \u7684 TableColumn \u6CA1\u6709\u6B63\u786E\u7684 Table \u7236\u9879
|
||||
TreeToTablesLinker.Type.Unsupported=\u4E0D\u652F\u6301\u8FD9\u79CD\u7C7B\u578B\u7684 currentControl
|
||||
commons.error=\u9519\u8BEF
|
||||
exception.message={0}\n\u8BF7\u67E5\u770B\u65E5\u5FD7\u4EE5\u83B7\u53D6\u66F4\u591A\u8BE6\u7EC6\u4FE1\u606F\u3002
|
||||
exception.errorOccured=\u51FA\u73B0\u9519\u8BEF ({0})\u3002\n\u8BF7\u67E5\u770B\u65E5\u5FD7\u4EE5\u83B7\u53D6\u66F4\u591A\u8BE6\u7EC6\u4FE1\u606F\u3002
|
||||
exception.errorOccured=\u53D1\u751F\u9519\u8BEF ({0})\u3002\n\u8BF7\u67E5\u770B\u65E5\u5FD7\u4EE5\u83B7\u53D6\u66F4\u591A\u8BE6\u7EC6\u4FE1\u606F\u3002
|
||||
ModelSelectionDialog.Message=\u8BF7\u9009\u62E9\u4E00\u4E2A\u9009\u9879\u6216\u53D6\u6D88\u3002
|
||||
ModelSelectionDialog.Option=\u9009\u9879
|
||||
ModelSelectionDialog.BuiltIn=\u66F4\u6539\u4E3A\u5185\u7F6E\u5C5E\u6027\u3002
|
||||
@@ -126,7 +125,7 @@ ModelSelectionDialog.Update=\u66F4\u65B0\u5B58\u50A8\u5E93\u8FDE\u63A5\u3002
|
||||
SSLConfirmDialog.KeyStore=\u8BF7\u8F93\u5165\u5BC6\u94A5\u5E93
|
||||
SSLConfirmDialog.TrustStore=\u8BF7\u8F93\u5165\u4FE1\u4EFB\u5E93
|
||||
SSLConfirmDialog.Password=\u8BF7\u8F93\u5165\u5BC6\u7801
|
||||
FileStep2.previewFailure=\u9884\u89C8\u9519\u8BEF\u3002\u5FC5\u987B\u66F4\u6539\u67D0\u4E9B\u8BBE\u7F6E\u3002\n\u6CE8\u610F\uFF1A\u9884\u89C8\u9519\u8BEF\u901A\u5E38\u662F\u7531\u4E8E\u9519\u8BEF\u7684\u7F16\u7801\u8BBE\u7F6E\u5BFC\u81F4\u3002
|
||||
FileStep2.previewFailure=\u9884\u89C8\u9519\u8BEF\u3002\u987B\u6539\u53D8\u4E00\u4E9B\u8BBE\u7F6E\u3002\n\u6CE8\u610F\uFF1A\u9884\u89C8\u9519\u8BEF\u53EF\u80FD\u662F\u56E0\u4E3A\u9519\u8BEF\u7684\u7F16\u7801\u8BBE\u7F6E\u9020\u6210\u7684\u3002
|
||||
GlobalServiceRegister.ServiceNotRegistered=\u670D\u52A1 {0} \u8FD8\u672A\u6CE8\u518C\u3002
|
||||
MessageBoxExceptionHandler.showMessageForSchemaImportXml.unParseXML.title=xml \u65E0\u6CD5\u89E3\u6790\u3002
|
||||
MessageBoxExceptionHandler.showMessageForSchemaImportXml.unParseXML.msg=xml \u65E0\u6CD5\u4EE5\u8FD9\u79CD\u683C\u5F0F\u89E3\u6790\u3002
|
||||
|
||||
@@ -74,7 +74,6 @@ public enum ECoreImage implements IImage {
|
||||
CONTEXT_WIZ("/icons1/context_wiz.png"), //$NON-NLS-1$
|
||||
CODE_ICON("/icons1/code.png"), //$NON-NLS-1$
|
||||
ROUTES_ICON("/icons1/routes_icon.png"), //$NON-NLS-1$
|
||||
ROUTELET_ICON("/icons1/routelet.png"), //$NON-NLS-1$
|
||||
ROUTINE_ICON("/icons1/routine.png"), //$NON-NLS-1$
|
||||
ROUTINE_EDITOR_ICON("/icons1/routine_editor.png"), //$NON-NLS-1$
|
||||
ROUTINESJAR_ICON("/icons1/routinesjar.png"), //$NON-NLS-1$
|
||||
|
||||
@@ -39,10 +39,6 @@ public enum EImage implements IImage {
|
||||
EDIT_ICON("/icons/write_obj.gif"), //$NON-NLS-1$
|
||||
READ_ICON("/icons/read_obj.gif"), //$NON-NLS-1$
|
||||
|
||||
QUESTION_ICON("/icons/question.gif"), //$NON-NLS-1$
|
||||
HELP_ICON("/icons/help.png"), //$NON-NLS-1$
|
||||
MOREINFO_ICON("/icons/moreInfo.png"), //$NON-NLS-1$
|
||||
|
||||
CREATE_CONNECTION_ICON("/icons/connection.gif"), //$NON-NLS-1$
|
||||
|
||||
RESET_DBTYPES_ICON("/icons/reset_dbtypes.jpg"), //$NON-NLS-1$
|
||||
|
||||
@@ -16,14 +16,8 @@ import java.io.BufferedOutputStream;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.eclipse.jface.resource.ImageDescriptor;
|
||||
import org.eclipse.swt.SWT;
|
||||
@@ -164,35 +158,8 @@ public class ImageUtils {
|
||||
return imageDes;
|
||||
}
|
||||
|
||||
private static Map<byte[], ImageDataProvider> imageFromDataCachedImages = Collections.synchronizedMap(new HashMap<byte[], ImageDataProvider>());
|
||||
private static Map<Long, byte[]> cachedImagesTimeKeeping = Collections.synchronizedMap(new HashMap<Long, byte[]>());
|
||||
|
||||
private static Thread clearImageFromDataCachedImages = new Thread() {
|
||||
@SuppressWarnings("static-access")
|
||||
public void run() {
|
||||
long timeout = 5 * 60 * 1000;
|
||||
while(true) {//remove older than 5 mins
|
||||
Set<Entry<Long, byte[]>> collect = cachedImagesTimeKeeping.entrySet().stream()
|
||||
.filter(entry -> (System.currentTimeMillis() - entry.getKey()) > timeout).collect(Collectors.toSet());
|
||||
for(Entry<Long, byte[]> entry: collect) {
|
||||
Long key = entry.getKey();
|
||||
cachedImagesTimeKeeping.remove(key);
|
||||
imageFromDataCachedImages.remove(entry.getValue());
|
||||
}
|
||||
|
||||
try {
|
||||
sleep(timeout);
|
||||
} catch (InterruptedException e) {//
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
private static Map<byte[], ImageDataProvider> imageFromDataCachedImages = new HashMap<byte[], ImageDataProvider>();
|
||||
|
||||
static {
|
||||
clearImageFromDataCachedImages.setDaemon(true);
|
||||
clearImageFromDataCachedImages.start();
|
||||
}
|
||||
|
||||
/**
|
||||
* By default, keep in memory the .
|
||||
*
|
||||
@@ -202,17 +169,12 @@ public class ImageUtils {
|
||||
*/
|
||||
public static ImageDescriptor createImageFromData(byte[] data, boolean... keepInMemory) {
|
||||
if (data != null) {
|
||||
ImageDataProvider imageProvider = null;
|
||||
Optional<byte[]> findKey = imageFromDataCachedImages.keySet().stream().filter(key->Arrays.equals(key, data)).findAny();
|
||||
if(findKey.isPresent()) {
|
||||
imageProvider = imageFromDataCachedImages.get(findKey.get());
|
||||
}
|
||||
ImageDataProvider imageProvider = imageFromDataCachedImages.get(data);
|
||||
if (imageProvider == null) {
|
||||
ByteArrayInputStream bais = new ByteArrayInputStream(data);
|
||||
ImageData img = new ImageData(bais);
|
||||
imageProvider = new TalendImageProvider(img);
|
||||
imageFromDataCachedImages.put(data, imageProvider);
|
||||
cachedImagesTimeKeeping.put(System.currentTimeMillis(), data);
|
||||
}
|
||||
return ImageDescriptor.createFromImageDataProvider(imageProvider);
|
||||
}
|
||||
@@ -221,9 +183,8 @@ public class ImageUtils {
|
||||
|
||||
public static void disposeImages(byte[] data) {
|
||||
if (data != null) {
|
||||
Optional<byte[]> findKey = imageFromDataCachedImages.keySet().stream().filter(key->Arrays.equals(key, data)).findAny();
|
||||
if(findKey.isPresent()) {
|
||||
imageFromDataCachedImages.remove(findKey.get());
|
||||
if (imageFromDataCachedImages.get(data) != null) {
|
||||
imageFromDataCachedImages.remove(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,8 +57,6 @@ import org.eclipse.swt.widgets.Listener;
|
||||
import org.eclipse.swt.widgets.Table;
|
||||
import org.eclipse.swt.widgets.TableColumn;
|
||||
import org.eclipse.swt.widgets.TableItem;
|
||||
import org.talend.commons.ui.runtime.ColorConstants;
|
||||
import org.talend.commons.ui.runtime.ITalendThemeService;
|
||||
import org.talend.commons.ui.runtime.i18n.Messages;
|
||||
import org.talend.commons.ui.runtime.swt.proposal.IShowInvisibleCellEditorMethods;
|
||||
import org.talend.commons.ui.runtime.swt.tableviewer.behavior.DefaultHeaderColumnSelectionListener;
|
||||
@@ -293,8 +291,7 @@ public class TableViewerCreatorNotModifiable<B> {
|
||||
public TableViewerCreatorNotModifiable(Composite compositeParent) {
|
||||
super();
|
||||
this.compositeParent = compositeParent;
|
||||
this.emptyZoneColor = ITalendThemeService.getColor("org.talend.commons.ui.BgColorForEmptyArea")
|
||||
.orElse(compositeParent.getDisplay().getSystemColor(SWT.COLOR_WHITE));
|
||||
this.emptyZoneColor = compositeParent.getDisplay().getSystemColor(SWT.COLOR_WHITE);
|
||||
|
||||
}
|
||||
|
||||
@@ -672,22 +669,8 @@ public class TableViewerCreatorNotModifiable<B> {
|
||||
table.addListener(SWTFacade.Paint, paintListener);
|
||||
}
|
||||
|
||||
Color prefBackgroundColor = backgroundColor;
|
||||
if (prefBackgroundColor == null) {
|
||||
prefBackgroundColor = ColorConstants.getTableBackgroundColor();
|
||||
if (prefBackgroundColor == null) {
|
||||
prefBackgroundColor = table.getDisplay().getSystemColor(SWT.COLOR_WHITE);
|
||||
}
|
||||
}
|
||||
Color prefForegroundColor = foregroundColor;
|
||||
if (prefForegroundColor == null) {
|
||||
prefForegroundColor = ColorConstants.getTableForegroundColor();
|
||||
if (prefForegroundColor == null) {
|
||||
prefForegroundColor = table.getDisplay().getSystemColor(SWT.COLOR_BLACK);
|
||||
}
|
||||
}
|
||||
setBackgroundColor(prefBackgroundColor);
|
||||
setForegroundColor(prefForegroundColor);
|
||||
setBackgroundColor(backgroundColor != null ? backgroundColor : table.getDisplay().getSystemColor(SWT.COLOR_WHITE));
|
||||
setForegroundColor(foregroundColor != null ? foregroundColor : table.getDisplay().getSystemColor(SWT.COLOR_BLACK));
|
||||
|
||||
if (useCustomItemColoring) {
|
||||
setUseCustomItemColoring(true);
|
||||
|
||||
@@ -12,14 +12,9 @@
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.runtime.utils;
|
||||
|
||||
import org.eclipse.jface.resource.ColorRegistry;
|
||||
import org.eclipse.jface.resource.DataFormatException;
|
||||
import org.eclipse.jface.resource.JFaceResources;
|
||||
import org.eclipse.jface.resource.StringConverter;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.graphics.Device;
|
||||
import org.eclipse.swt.graphics.RGB;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
|
||||
/**
|
||||
@@ -107,16 +102,4 @@ public class TalendColorPalette {
|
||||
public static final java.awt.Color TERTIARY_ORANGE_AWT = new java.awt.Color(244, 175, 128);
|
||||
|
||||
public static final java.awt.Color TERTIARY_YELLOW_AWT = new java.awt.Color(255, 217, 143);
|
||||
|
||||
public static Color convertToColor(String rgbStr) throws DataFormatException {
|
||||
ColorRegistry colorRegistry = JFaceResources.getColorRegistry();
|
||||
Color color = colorRegistry.get(rgbStr);
|
||||
if (color != null) {
|
||||
return color;
|
||||
}
|
||||
RGB rgb = StringConverter.asRGB(rgbStr);
|
||||
colorRegistry.put(rgbStr, rgb);
|
||||
return colorRegistry.get(rgbStr);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -24,7 +24,6 @@ import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Enumeration;
|
||||
import java.util.jar.JarEntry;
|
||||
import java.util.jar.JarFile;
|
||||
import java.util.jar.JarOutputStream;
|
||||
|
||||
import org.apache.tools.zip.ZipEntry;
|
||||
@@ -170,52 +169,8 @@ public class ZipFileUtils {
|
||||
inputStream.close();
|
||||
}
|
||||
}
|
||||
|
||||
public static void unZipFileEntry(File destFile, java.util.zip.ZipFile zipFile, java.util.zip.ZipEntry entry) throws IOException {
|
||||
InputStream inputStream;
|
||||
FileOutputStream fileOut;
|
||||
if (entry.isDirectory()) {
|
||||
destFile.mkdirs();
|
||||
} else {
|
||||
File parent = destFile.getParentFile();
|
||||
if (parent != null && !parent.exists()) {
|
||||
parent.mkdirs();
|
||||
}
|
||||
|
||||
inputStream = zipFile.getInputStream(entry);
|
||||
|
||||
fileOut = new FileOutputStream(destFile);
|
||||
byte[] buf = new byte[bufSize];
|
||||
int readedBytes;
|
||||
while ((readedBytes = inputStream.read(buf)) > 0) {
|
||||
fileOut.write(buf, 0, readedBytes);
|
||||
}
|
||||
fileOut.close();
|
||||
|
||||
inputStream.close();
|
||||
}
|
||||
}
|
||||
|
||||
public void setBufSize(int bufSize) {
|
||||
ZipFileUtils.bufSize = bufSize;
|
||||
}
|
||||
|
||||
public static boolean isValidJarFile(String moduleFilePath) {
|
||||
if (moduleFilePath == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!new File(moduleFilePath).exists()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
try (JarFile zip = new JarFile(moduleFilePath)) {
|
||||
zip.getManifest();
|
||||
} catch (IOException e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,13 +2,12 @@ Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Common Runtime Plug-in
|
||||
Bundle-SymbolicName: org.talend.commons.runtime;singleton:=true
|
||||
Automatic-Module-Name: org.talend.commons.runtime
|
||||
Bundle-Version: 8.8.8.qualifier
|
||||
Require-Bundle: org.apache.log4j,
|
||||
Bundle-Version: 8.0.1.qualifier
|
||||
Require-Bundle: org.apache.log4j;visibility:=reexport,
|
||||
org.apache.commons.commons-beanutils,
|
||||
org.apache.commons.collections,
|
||||
org.apache.commons.httpclient,
|
||||
org.apache.commons.lang,
|
||||
org.apache.commons.lang;visibility:=reexport,
|
||||
org.eclipse.core.runtime,
|
||||
org.eclipse.emf.ecore.xmi,
|
||||
org.talend.libraries.apache,
|
||||
@@ -18,11 +17,7 @@ Require-Bundle: org.apache.log4j,
|
||||
org.eclipse.core.net,
|
||||
org.eclipse.m2e.core,
|
||||
org.eclipse.m2e.maven.runtime,
|
||||
org.eclipse.core.resources,
|
||||
org.talend.studio.studio-utils,
|
||||
org.talend.daikon,
|
||||
org.apache.commons.codec,
|
||||
org.apache.commons.lang3
|
||||
org.eclipse.core.resources
|
||||
Export-Package: org.talend.commons,
|
||||
org.talend.commons.exception,
|
||||
org.talend.commons.i18n,
|
||||
|
||||
@@ -283,7 +283,6 @@
|
||||
<KEYWORD1>smallint</KEYWORD1>
|
||||
<KEYWORD1>smallmoney</KEYWORD1>
|
||||
<KEYWORD1>text</KEYWORD1>
|
||||
<KEYWORD1>TIME</KEYWORD1>
|
||||
<KEYWORD1>timestamp</KEYWORD1>
|
||||
<KEYWORD1>tinyint</KEYWORD1>
|
||||
<KEYWORD1>uniqueidentifier</KEYWORD1>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>8.8.8-SNAPSHOT</version>
|
||||
<version>8.0.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.commons.runtime</artifactId>
|
||||
|
||||
@@ -92,12 +92,13 @@
|
||||
<dependency>
|
||||
<groupId>xerces</groupId>
|
||||
<artifactId>xercesImpl</artifactId>
|
||||
<version>2.12.2</version>
|
||||
<version>2.12.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ch.qos.reload4j</groupId>
|
||||
<artifactId>reload4j</artifactId>
|
||||
<version>1.2.22</version>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.2.16</version>
|
||||
<type>bundle</type>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
@@ -125,7 +126,7 @@
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
<version>32.0.1-jre</version>
|
||||
<version>30.0-jre</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<configuration>
|
||||
|
||||
@@ -58,14 +58,10 @@ public class CommonsPlugin implements BundleActivator {
|
||||
// TESB-17856: For commandline builds ESB Micorservice bundle
|
||||
private static boolean isESBMicorservice = false;
|
||||
|
||||
private static Boolean isJunitWorking;
|
||||
|
||||
private static Boolean isDevMode = null;
|
||||
|
||||
private static ServiceTracker proxyTracker;
|
||||
|
||||
private static Boolean isDebugP2 = null;
|
||||
|
||||
public static boolean isWorkbenchCreated() {
|
||||
return isWorkbenchCreated;
|
||||
}
|
||||
@@ -128,17 +124,6 @@ public class CommonsPlugin implements BundleActivator {
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isDebugP2() {
|
||||
try {
|
||||
if (isDebugP2 == null) {
|
||||
isDebugP2 = Boolean.getBoolean("talend.studio.lite.p2.debug");
|
||||
}
|
||||
return isDebugP2;
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isDebugMode() {
|
||||
return Boolean.getBoolean("talendDebug") //$NON-NLS-1$
|
||||
|| ArrayUtils.contains(Platform.getApplicationArgs(), TalendDebugHandler.TALEND_DEBUG);
|
||||
@@ -152,35 +137,6 @@ public class CommonsPlugin implements BundleActivator {
|
||||
return "org.talend.rcp.branding.tuj.product".equals(Platform.getProduct().getId()); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
public static boolean isJunitWorking() {
|
||||
if (isJunitWorking == null) {
|
||||
try {
|
||||
String[] args = Platform.getCommandLineArgs();
|
||||
String applicationId = null;
|
||||
|
||||
for (int i = 0; i < args.length - 1; i++) {
|
||||
if (args[i].equalsIgnoreCase("-application")) { //$NON-NLS-1$
|
||||
applicationId = args[i + 1];
|
||||
}
|
||||
}
|
||||
|
||||
if (applicationId != null
|
||||
&& (applicationId.equals("org.eclipse.swtbot.eclipse.junit.headless.swtbottestapplication") //$NON-NLS-1$
|
||||
|| applicationId.equals("org.eclipse.pde.junit.runtime.uitestapplication"))) { //$NON-NLS-1$
|
||||
isJunitWorking = true;
|
||||
} else {
|
||||
isJunitWorking = false;
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
isJunitWorking = false;
|
||||
}
|
||||
}
|
||||
if (isJunitWorking == null) {
|
||||
isJunitWorking = false;
|
||||
}
|
||||
return isJunitWorking;
|
||||
}
|
||||
|
||||
/**
|
||||
* Answer the file associated with name. This handles the case of running as a plugin and running standalone which
|
||||
* happens during testing.
|
||||
|
||||
@@ -36,11 +36,6 @@ public final class CommonExceptionHandler {
|
||||
Priority priority = getPriority(ex);
|
||||
process(ex, priority);
|
||||
}
|
||||
|
||||
public static void process(Throwable ex, String msg) {
|
||||
Priority priority = getPriority(ex);
|
||||
process(ex, msg, priority);
|
||||
}
|
||||
|
||||
public static void process(Throwable ex, Priority priority) {
|
||||
String message = ex.getMessage();
|
||||
@@ -48,13 +43,6 @@ public final class CommonExceptionHandler {
|
||||
log.log(priority, message, ex);
|
||||
|
||||
}
|
||||
|
||||
public static void process(Throwable ex, String msg, Priority priority) {
|
||||
String message = ex.getMessage() + ": " + msg;
|
||||
|
||||
log.log(priority, message, ex);
|
||||
|
||||
}
|
||||
|
||||
public static void log(String message) {
|
||||
log.log(Level.INFO, message);
|
||||
@@ -64,10 +52,6 @@ public final class CommonExceptionHandler {
|
||||
log.log(Level.WARN, message);
|
||||
}
|
||||
|
||||
public static void error(String message) {
|
||||
log.log(Level.ERROR, message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return priority corresponding to the exception implementation.
|
||||
*
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
DatabaseContentRetriever.PRODUCTNAME=Database Product Name:
|
||||
DatabaseContentRetriever.PRODUCTVERSION=Database Product Version:
|
||||
DB2ForZosResultSet.outofRange=\ is out of range.
|
||||
DB2ForZosResultSet.parameterIndex=Invalid argument\: parameter index
|
||||
DB2ForZosResultSet.unknowCloumn=Invalid argument\: unknown column name
|
||||
SybaseResultSet.outofRange=\ is out of range.
|
||||
SybaseResultSet.parameterIndex=Invalid argument\: parameter index
|
||||
SybaseResultSet.unknowCloumn=Invalid argument\: unknown column name
|
||||
AbstractFakeResultSet.unknowCloumn=Invalid argument\: {0} is unknown column name
|
||||
AbstractFakeResultSet.parameterIndexOutOfRange=Invalid argument\: parameter index {0} is out of range
|
||||
EntryLocation.returnTableName={tableName={0}, columnName={1}}
|
||||
ExceptionHandler.Parameter.BeNull=ex param cannot be null
|
||||
ExtensionImplementationProviders.ExtensionPointError=Extension point must authorize a single instance
|
||||
ListenableList.IndexSameLength.Error=indexOrigin and indexDestination must have same length
|
||||
ReflectionPropertyException.Access.ErrorMsg3=Error when trying to access to the {0} of the property ' of the property '{1}' of the class '{2}'
|
||||
ResourceUtils.canMove1=Can move
|
||||
ResourceUtils.canMove2=Can move {0} -> {1}
|
||||
ResourceUtils.cannotMoveRule3=Cannot move {0} -> {1} (Rule 3-Descendant)
|
||||
ResourceUtils.cnanotMoveRule1=Cannot move {0} -> {1} (Rule 1-Test if source & target are differents)
|
||||
ResourceUtils.go=\ ->
|
||||
ResourceUtils.streamNull=stream is null
|
||||
ReusableMultiKey.Keys.BeNull=The array of keys must not be null
|
||||
StringUtils.IllegalArgument0=only support the \\uxxxx or \\xhh encoding.
|
||||
StringUtils.IllegalArgument1=Malformed \\uxxxx encoding.
|
||||
StringUtils.IllegalArgument2=Malformed \\uxxxx encoding.
|
||||
StringUtils.IllegalArgument3=Malformed \\0xxx encoding.
|
||||
VersionUtils.Version.Error2=Malformed string {0} (expecting M{1}m)
|
||||
FilesUtils.operationCanceled=Operation is canceled during copying folders or files.
|
||||
resources.file.notCreated=File "{0}" cannot be created ({1})
|
||||
resources.file.notDeleted=File "{0}" cannot be deleted
|
||||
resources.file.notGet=Required file "{0}" not found in folder "{1}"
|
||||
resources.fileContent.notGet=Content of file "{0}" cannot be retrieve
|
||||
resources.folder.notCreated=Folder "{0}" cannot be created
|
||||
resources.folder.notDeleted=Folder "{0}" cannot be deleted
|
||||
resources.folder.notEmptied=Folder "{0}" cannot be emptied
|
||||
resources.folder.notGet=Required folder "{0}" not found in project "{1}"
|
||||
resources.members.notGet=Members of container "{0}" cannot be retrieve
|
||||
resources.project.notGet=Required project "{0}" not found
|
||||
resources.resource.notMoved=Resource "{0}" cannot be moved to "{1}"
|
||||
utils.data.container=Id {0} already used in container
|
||||
utils.workbench.extensions.badNumberOfExtension=Bad number of extensions found on {0}. Expecting between {1} and {2} but found {3}.
|
||||
utils.workbench.extensions.noExtension=No plug-in extending extension point ID "{0}" can be found.
|
||||
XmlNodeRetriever.countResult=Count result \:
|
||||
XmlNodeRetriever.field2Node=field2Node=
|
||||
XmlNodeRetriever.filed1Node=field1Node=
|
||||
XmlNodeRetriever.mainExpression=main expression =
|
||||
XmlNodeRetriever.mainNode=mainNode=
|
||||
XmlNodeRetriever.proposal2Node=proposal2Nodes \:
|
||||
XmlNodeRetriever.prposal1Node=proposal1Nodes \:
|
||||
XmlNodeRetriever.singleQuotes='
|
||||
XmlNodeRetriever.xPathExpression=xPathExpression = '
|
||||
VersionUtils.readPropertyFileError=Error to read property in talend.properties file.
|
||||
SoftwareSystemManager.NULL_CONN_INSTANCE=null connection instance.
|
||||
SoftwareSystemManager.NULL_INSTANCE_SOFTWARE_SYS=null software system instance.
|
||||
AS400ResultSet.unknowCloumn=Invalid argument\: unknown column name
|
||||
AS400ResultSet.parameterIndex=Invalid argument\: parameter index
|
||||
AS400ResultSet.outofRange=\ is out of range.
|
||||
ITaCoKitService.exception.multipleInstance=More than one instance found: {0}
|
||||
TalendProxySelector.exception.badUriMap=Bad uri map: {0}
|
||||
TalendProxySelector.exception.proxySelectionError=Error occurs when selecting proxy for {0}
|
||||
@@ -11,7 +11,7 @@ SybaseResultSet.unknowCloumn=\u7121\u52B9\u306A\u5F15\u6570: \u30AB\u30E9\u30E0\
|
||||
AbstractFakeResultSet.unknowCloumn=\u7121\u52B9\u306A\u5F15\u6570: {0}\u304C\u4E0D\u660E\u306A\u30AB\u30E9\u30E0\u540D
|
||||
AbstractFakeResultSet.parameterIndexOutOfRange=\u7121\u52B9\u306A\u5F15\u6570: \u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9{0}\u304C\u7BC4\u56F2\u5916
|
||||
EntryLocation.returnTableName={tableName={0}, \u30AB\u30E9\u30E0\u540D={1}}
|
||||
ExceptionHandler.Parameter.BeNull=ex \u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u306B\u306Fnull\u3092\u8A2D\u5B9A\u3067\u304D\u307E\u305B\u3093
|
||||
ExceptionHandler.Parameter.BeNull=ex \u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u306B\u306Fnull\u3092\u8A2D\u5B9A\u51FA\u6765\u307E\u305B\u3093
|
||||
ExtensionImplementationProviders.ExtensionPointError=\u62E1\u5F35\u30DD\u30A4\u30F3\u30C8\u306F1\u3064\u306E\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u3092\u8A8D\u8A3C\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
|
||||
ListenableList.IndexSameLength.Error=indexOrigin\u3068indexDestination\u304C\u540C\u3058\u9577\u3055\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
|
||||
ReflectionPropertyException.Access.ErrorMsg3=\u30AF\u30E9\u30B9'{2}'\u306E\u30D7\u30ED\u30D1\u30C6\u30A3'{1}'\u306E{0}\u3078\u306E\u30A2\u30AF\u30BB\u30B9\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F
|
||||
|
||||
@@ -1,85 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2023 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.runtime.model.emf;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.StringJoiner;
|
||||
|
||||
import org.eclipse.emf.common.util.URI;
|
||||
import org.eclipse.emf.ecore.xmi.XMLHelper;
|
||||
import org.eclipse.emf.ecore.xmi.XMLResource;
|
||||
import org.eclipse.emf.ecore.xmi.XMLSave;
|
||||
import org.eclipse.emf.ecore.xmi.impl.XMISaveImpl;
|
||||
import org.eclipse.emf.ecore.xmi.impl.XMLString;
|
||||
|
||||
/**
|
||||
* DOC jding class global comment. Detailled comment
|
||||
*/
|
||||
public class CustomXMIResource extends TalendXMIResource {
|
||||
|
||||
public static final String ENCODING = "UTF-8"; //$NON-NLS-1$
|
||||
|
||||
CustomXMISave xmiSave;
|
||||
|
||||
public CustomXMIResource() {
|
||||
super();
|
||||
}
|
||||
|
||||
public CustomXMIResource(URI uri) {
|
||||
super(uri);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void init() {
|
||||
super.init();
|
||||
encoding = ENCODING;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected XMLSave createXMLSave() {
|
||||
xmiSave = new CustomXMISave(createXMLHelper());
|
||||
return xmiSave;
|
||||
}
|
||||
|
||||
public String getResourceContent(Map<?, ?> options) {
|
||||
if (xmiSave == null) {
|
||||
createXMLSave();
|
||||
}
|
||||
return xmiSave.getXMLContent(this, options);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class CustomXMISave extends XMISaveImpl {
|
||||
|
||||
public CustomXMISave(XMLHelper helper) {
|
||||
super(helper);
|
||||
}
|
||||
|
||||
public String getXMLContent(XMLResource resource, Map<?, ?> options) {
|
||||
StringJoiner strJoin = new StringJoiner("");
|
||||
super.init(resource, options);
|
||||
super.traverse(resource.getContents());
|
||||
XMLString xmlString = this.doc;
|
||||
Iterator<String> iterator = xmlString.stringIterator();
|
||||
while (iterator.hasNext()) {
|
||||
String string = (String) iterator.next();
|
||||
if (string != null) {
|
||||
strJoin.add(string);
|
||||
}
|
||||
}
|
||||
return strJoin.toString();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -16,7 +16,6 @@ import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
@@ -264,12 +263,4 @@ public class EmfHelper {
|
||||
return result;
|
||||
}
|
||||
|
||||
public static String getEmfModelContent(EObject model) throws Exception {
|
||||
String content = "";
|
||||
CustomXMIResource xmiResource = new CustomXMIResource();
|
||||
xmiResource.getContents().add(model);
|
||||
content = xmiResource.getResourceContent(Collections.EMPTY_MAP);
|
||||
return content;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -46,12 +46,6 @@ public interface ITaCoKitService {
|
||||
|
||||
boolean isTaCoKitType(Object repoType);
|
||||
|
||||
Object getDatastoreFromDataset(Object repositoryViewObject);
|
||||
|
||||
String getParentItemIdFromItem(Object Item);
|
||||
|
||||
boolean isValueSelectionParameter(Object parameter);
|
||||
|
||||
public static ITaCoKitService getInstance() {
|
||||
BundleContext bc = FrameworkUtil.getBundle(ITaCoKitService.class).getBundleContext();
|
||||
Collection<ServiceReference<ITaCoKitService>> tacokitServices = Collections.emptyList();
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2023 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.utils;
|
||||
|
||||
import org.osgi.framework.BundleContext;
|
||||
import org.osgi.framework.FrameworkUtil;
|
||||
import org.osgi.framework.ServiceReference;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
|
||||
public class OsgiServices {
|
||||
|
||||
public static <T> T get(Class<T> clz) {
|
||||
try {
|
||||
BundleContext bc = FrameworkUtil.getBundle(OsgiServices.class).getBundleContext();
|
||||
ServiceReference<T> serviceReference = bc.getServiceReference(clz);
|
||||
if (serviceReference != null) {
|
||||
return bc.getService(serviceReference);
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -145,30 +145,7 @@ public class DB2ForZosDataBaseMetadata extends PackageFakeDatabaseMetadata {
|
||||
*/
|
||||
@Override
|
||||
public ResultSet getPrimaryKeys(String catalog, String schema, String table) throws SQLException {
|
||||
ResultSet rs = super.getPrimaryKeys(catalog, schema, table);
|
||||
if (rs == null) {
|
||||
rs = new DB2ForZosResultSet();
|
||||
}
|
||||
return rs;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.talend.commons.utils.database.FakeDatabaseMetaData#getExportedKeys(java.lang.String, java.lang.String,
|
||||
* java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public ResultSet getExportedKeys(String catalog, String schema, String table) throws SQLException {
|
||||
ResultSet rs = super.getExportedKeys(catalog, schema, table);
|
||||
if (rs == null) {
|
||||
if (this.metaData != null) {
|
||||
rs = this.metaData.getExportedKeys(catalog, schema, table);
|
||||
} else {
|
||||
rs = new DB2ForZosResultSet();
|
||||
}
|
||||
}
|
||||
return rs;
|
||||
return new DB2ForZosResultSet();
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -197,6 +174,17 @@ public class DB2ForZosDataBaseMetadata extends PackageFakeDatabaseMetadata {
|
||||
return tableResultSet;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.talend.commons.utils.database.FakeDatabaseMetaData#getExportedKeys(java.lang.String, java.lang.String,
|
||||
* java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public ResultSet getExportedKeys(String catalog, String schema, String table) throws SQLException {
|
||||
return new DB2ForZosResultSet();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
|
||||
@@ -1,21 +1,18 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2023 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.runtime.custom;
|
||||
|
||||
|
||||
/**
|
||||
* DOC cmeng class global comment. Detailled comment
|
||||
*/
|
||||
public interface IUIHandler {
|
||||
|
||||
}
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2021 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.utils.network;
|
||||
|
||||
public interface ITalendNexusPrefConstants {
|
||||
|
||||
public static final String NEXUS_TIMEOUT = "NEXUS_TIMEOUT"; //$NON-NLS-1$
|
||||
}
|
||||
@@ -33,7 +33,6 @@ import java.util.regex.Pattern;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
|
||||
import org.eclipse.core.runtime.preferences.InstanceScope;
|
||||
import org.talend.commons.exception.CommonExceptionHandler;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.runtime.utils.io.FileCopyUtils;
|
||||
|
||||
@@ -51,16 +50,13 @@ public class NetworkUtil {
|
||||
|
||||
private static final String TALEND_DISABLE_INTERNET = "talend.disable.internet";//$NON-NLS-1$
|
||||
|
||||
private static final String HTTP_NETWORK_URL = "https://talend-update.talend.com";
|
||||
|
||||
private static final int DEFAULT_TIMEOUT = 4000;
|
||||
|
||||
private static final int DEFAULT_NEXUS_TIMEOUT = 20000;// same as preference value
|
||||
|
||||
public static final String ORG_TALEND_DESIGNER_CORE = "org.talend.designer.core"; //$NON-NLS-1$
|
||||
|
||||
/*
|
||||
* see ITalendCorePrefConstants.PERFORMANCE_TAC_READ_TIMEOUT
|
||||
*/
|
||||
private static final String PERFORMANCE_TAC_READ_TIMEOUT = "PERFORMANCE_TAC_READ_TIMEOUT"; //$NON-NLS-1$
|
||||
|
||||
private static final String PROP_DISABLEDSCHEMES_USE_DEFAULT = "talend.studio.jdk.http.auth.tunneling.disabledSchemes.useDefault";
|
||||
|
||||
@@ -93,7 +89,7 @@ public class NetworkUtil {
|
||||
}
|
||||
HttpURLConnection conn = null;
|
||||
try {
|
||||
URL url = new URL(getCheckUrl());
|
||||
URL url = new URL(HTTP_NETWORK_URL);
|
||||
conn = (HttpURLConnection) url.openConnection();
|
||||
conn.setDefaultUseCaches(false);
|
||||
conn.setUseCaches(false);
|
||||
@@ -109,7 +105,6 @@ public class NetworkUtil {
|
||||
return true;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
CommonExceptionHandler.process(e, getCheckUrl());
|
||||
return false;
|
||||
} finally {
|
||||
conn.disconnect();
|
||||
@@ -117,15 +112,6 @@ public class NetworkUtil {
|
||||
return true;
|
||||
}
|
||||
|
||||
private static String getCheckUrl() {
|
||||
String customUrl = System.getProperty("talend.studio.network.checkUrlPath");
|
||||
if (StringUtils.isNotBlank(customUrl)) {
|
||||
return customUrl;
|
||||
} else {
|
||||
return "https://talend-update.talend.com/nexus/content/groups/studio-libraries/";
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isNetworkValid(String url, Integer timeout) {
|
||||
if (url == null) {
|
||||
return isNetworkValid(timeout);
|
||||
@@ -146,7 +132,6 @@ public class NetworkUtil {
|
||||
conn.setRequestMethod("HEAD"); //$NON-NLS-1$
|
||||
conn.getResponseMessage();
|
||||
} catch (Exception e) {
|
||||
CommonExceptionHandler.process(e, urlString);
|
||||
// if not reachable , will throw exception(time out/unknown host) .So if catched exception, make it a
|
||||
// invalid server
|
||||
return false;
|
||||
@@ -157,10 +142,10 @@ public class NetworkUtil {
|
||||
}
|
||||
|
||||
public static int getNexusTimeout() {
|
||||
int timeout = Integer.getInteger("nexus.timeout.min", DEFAULT_NEXUS_TIMEOUT);
|
||||
int timeout = DEFAULT_NEXUS_TIMEOUT;
|
||||
try {
|
||||
IEclipsePreferences node = InstanceScope.INSTANCE.getNode(ORG_TALEND_DESIGNER_CORE);
|
||||
timeout = Math.max(timeout, node.getInt(PERFORMANCE_TAC_READ_TIMEOUT, 0) * 1000);
|
||||
timeout = node.getInt(ITalendNexusPrefConstants.NEXUS_TIMEOUT, DEFAULT_NEXUS_TIMEOUT);
|
||||
} catch (Throwable e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
|
||||
@@ -139,16 +139,11 @@ public class TalendProxySelector extends ProxySelector {
|
||||
private boolean updateSystemPropertiesForJre = true;
|
||||
|
||||
private boolean excludeLoopbackAddressAutomatically = false;
|
||||
|
||||
|
||||
private ProxySelector getStardardJreProxySelector() {
|
||||
if (this.jreDefaultSelector != null) {
|
||||
return this.jreDefaultSelector;
|
||||
}
|
||||
Object o = System.getProperties().get(SYS_JRE_PROXY_SELECTOR);
|
||||
if (o != null && o instanceof ProxySelector) {
|
||||
this.jreDefaultSelector = (ProxySelector) o;
|
||||
System.getProperties().remove(SYS_JRE_PROXY_SELECTOR);
|
||||
return this.jreDefaultSelector;
|
||||
return (ProxySelector) o;
|
||||
}
|
||||
return getDefault();
|
||||
}
|
||||
|
||||
@@ -88,17 +88,13 @@ public class EclipseCommandLine {
|
||||
static public final String TALEND_CONTINUE_LOGON = "-talendContinueLogon";
|
||||
|
||||
static public final String TALEND_CONTINUE_UPDATE = "-talendContinueUpdate";
|
||||
|
||||
static public final String TALEND_CLEAN_M2 = "-talendCleanM2";
|
||||
|
||||
static public final String TALEND_CLEAN_UNINSTALLED_BUNDLES = "-talendCleanUninstalledBundles";
|
||||
|
||||
static public final String PROP_KEY_PROFILE_ID = "eclipse.p2.profile";
|
||||
|
||||
static public final String ARG_BRANCH = "-branch";
|
||||
|
||||
static public final String ARG_PROJECT = "-project";
|
||||
|
||||
|
||||
static public final String LOGIN_ONLINE_UPDATE = "--loginOnlineUpdate";
|
||||
|
||||
static public final String ARG_TALEND_BUNDLES_CLEANED = "-talend.studio.bundles.cleaned"; //$NON-NLS-1$
|
||||
@@ -398,7 +394,7 @@ public class EclipseCommandLine {
|
||||
+ (isValueNull ? "" : value + EclipseCommandLine.NEW_LINE)
|
||||
+ currentProperty.substring(indexOfVmArgs);
|
||||
} else {// vmargs command not found so don't know where to set it to throw Exception
|
||||
currentProperty = currentProperty + command + EclipseCommandLine.NEW_LINE
|
||||
currentProperty = currentProperty.substring(0, indexOfVmArgs) + command + EclipseCommandLine.NEW_LINE
|
||||
+ (isValueNull ? "" : value + EclipseCommandLine.NEW_LINE);
|
||||
// throw new IllegalArgumentException("the property :" + org.eclipse.equinox.app.IApplicationContext.EXIT_DATA_PROPERTY + "must constain " + EclipseCommandLine.CMD_VMARGS);
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
talend.version=8.8.8
|
||||
talend.version=8.0.1
|
||||
|
||||
@@ -2,8 +2,7 @@ Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Common UI Plug-in
|
||||
Bundle-SymbolicName: org.talend.commons.ui;singleton:=true
|
||||
Automatic-Module-Name: org.talend.commons.ui
|
||||
Bundle-Version: 8.8.8.qualifier
|
||||
Bundle-Version: 8.0.1.qualifier
|
||||
Require-Bundle: org.eclipse.core.runtime,
|
||||
org.eclipse.core.resources,
|
||||
org.eclipse.jface.text,
|
||||
@@ -11,7 +10,7 @@ Require-Bundle: org.eclipse.core.runtime,
|
||||
org.eclipse.ui.intro,
|
||||
org.eclipse.ui.ide,
|
||||
org.eclipse.gef,
|
||||
org.eclipse.jface,
|
||||
org.eclipse.jface;visibility:=reexport,
|
||||
org.apache.log4j,
|
||||
org.apache.xalan,
|
||||
org.apache.commons.lang,
|
||||
@@ -19,11 +18,9 @@ Require-Bundle: org.eclipse.core.runtime,
|
||||
org.talend.libraries.dom4j-jaxen,
|
||||
org.talend.utils,
|
||||
org.talend.commons.runtime,
|
||||
org.talend.common.ui.runtime,
|
||||
org.talend.libraries.ui,
|
||||
org.eclipse.ui.workbench,
|
||||
org.talend.studio.studio-utils,
|
||||
org.apache.commons.lang3
|
||||
org.talend.common.ui.runtime;visibility:=reexport,
|
||||
org.talend.libraries.ui;visibility:=reexport,
|
||||
org.eclipse.ui.workbench
|
||||
Eclipse-LazyStart: true
|
||||
Bundle-Vendor: .Talend SA.
|
||||
Export-Package: org.talend.commons.ui.command,
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>8.8.8-SNAPSHOT</version>
|
||||
<version>8.0.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.commons.ui</artifactId>
|
||||
|
||||
@@ -0,0 +1,137 @@
|
||||
commons.error=Error
|
||||
TableViewerCreator.TableColumn.AssertMsg=The TableColumn of TableEditorColumn with idProperty '{0}' has not the correct Table parent
|
||||
ColorStyledText.PasteItem.Text=Paste
|
||||
EventUtil.UnknowDetail=unkown ??? value of event detail :
|
||||
ImportPushButtonForExtendedTable.ErrorMsg.Text=Error occurred
|
||||
ResetDBTypesButton.ResetDBTypesButton.Tip=Reset DB Types
|
||||
ExportPushButtonForExtendedTable.ErrorMsg.Text=Error occurred
|
||||
TableViewerCreator.IdProperty.AssertMsg=You must change the idProperty of one of your column, the idProperty must be unique for each column for one Table.
|
||||
TableViewerCreator.CallMethod.ErrorMsg=You can call this method only if you have already called createTable()
|
||||
ModelSelectionDialog.BuiltIn=Change to built-in property.
|
||||
ExtendedTablePasteCommand.Paste.Label=Paste data from the internal clipoard
|
||||
SelectContextVariablesPushButton.Label=Select context variables
|
||||
ExtendedTableModel.ModifiedObject.Error=ModifiedBeanListenable object must be set before use this method
|
||||
ImportPushButton.ImportButton.Tip=Replace all rows by import from xml file
|
||||
LabelledFileField.FileDialog.Text=Select a
|
||||
ModelSelectionDialog.Option=option
|
||||
ModelSelectionDialog.Update=Update repository connection.
|
||||
TableViewerCreator.Table.BeNull=table is null
|
||||
ModelSelectionDialog.Title=Edit parameter using repository
|
||||
AddAllPushButton.AddAllButton.Tip=Add All
|
||||
ExtendedTableRemoveCommand.Romve.Label=Remove table entries
|
||||
AddPushButton.AddButton.Tip=Add
|
||||
MoveDownPushButton.MoveDownTip=Move down selected items
|
||||
ExtendedTableCopyCommand.Copy.Label=Copy one or more table entries in the internal clipboard
|
||||
ProposalUtils.CtrlProposal.ErrorMsg=Proposal for this type of Control is unsupported :
|
||||
AccessorUtils.isReq= is required for the bean (<B>).
|
||||
EventUtil.UnknowType=unkown ??? value of event type :
|
||||
ProposalUtils.CellProposal.Error=Proposal of this type of CellEditor is unsupported:
|
||||
RemovePushButton.RemoveButton.Tip=Remove selected items
|
||||
FileStep2.previewFailure=Preview error. Some settings must be changed.\nNote: Preview errors are generally due to a wrong encoding setting.
|
||||
PastePushButton.PasteButton.Label=Paste
|
||||
ModelSelectionDialog.ViewSchema=View schema (read only).
|
||||
LabelledFileField.BrowseButton.Text=Browse...
|
||||
ModelSelectionDialog.ViewQuery=View query (read only).
|
||||
MoveUpPushButton.MoveUpButton.Tip=Move up selected items
|
||||
AccessorUtils.Assert1=The 'BeanPropertyAccessors' of the column (with title '{0}' and id '{1}') is not configured correctly or the value set has not the correct type.
|
||||
exception.errorOccured=An error occured ({0}).\nSee log for more details.
|
||||
ColorStyledText.CopyItem.Text=Copy
|
||||
AccessorUtils.Assert0=The 'BeanPropertyAccessors' of the column (with title '{0}' and id '{1}') is not configured correctly. {2} is required for bean <B>
|
||||
ExtendedTableMoveCommand.MoveLabel=Move up or down, one or more table entries
|
||||
CopyPushButton.CopyButton.Tip=Copy selected items
|
||||
ExtendedTableResetDBTypesCommand.ResetDBTypes.Label=Reset all DB Types to get the defaults
|
||||
ExtendedTableAddCommand.Add.Label=Add one or more table entries
|
||||
ControlUtils.Unsupported1=This control ({0}) is not supported, add case if you want...
|
||||
AccessorUtils.isReqValue= is required for the value (<V>), but the value could be adapted with CellEditorValueAdapter.
|
||||
AccessorUtils.NoClassDef=NoClassDefFoundError ({0}):
|
||||
ErrorDialogWidthDetailArea.ErrorMessage.Text=Error Message
|
||||
ExceptionHandler.Parameter.BeNull=ex param cannot be null
|
||||
ModelSelectionDialog.Message=Please choose one option, or cancel.
|
||||
TreeToTablesLinker.Type.Unsupported=This type of currentControl is unsupported
|
||||
Mode.Mode.ToString=Mode [{0}]
|
||||
ModifyBeanValueCommand.ModifyCell.Label=Modify cell value
|
||||
ColorStyledText.SelectAllItem.Text=Select All
|
||||
DialogErrorForCellEditorListener.Error.MsgDialogTitle=Error
|
||||
ExportPushButton.ExportButton.Tip=Export all rows into XML file
|
||||
TableViewerCreator.CellModifier.ExError=The current CellModifier does'nt support this operation. \n Use '{0}' or a class which extends it to use this feature
|
||||
Curve2D.MinNum.Be0=minimumSegments be must positive or 0
|
||||
ModeReader.IgnoreElement=Ignore unknown element
|
||||
Curve2D.MaxNum.Be0=maximumSegments must be positive or 0
|
||||
CellEditorDialogBehavior.textContent=...
|
||||
CellEditorValueAdapterFactory.valueNotStringType=Bean value should be a class of String type \!
|
||||
ColorStyledText.RedoItem.Text=Redo
|
||||
ColorStyledText.UndoItem.Text=Undo
|
||||
ContentProposalAdapterExtended.close=close
|
||||
ContentProposalAdapterExtended.closeFocusout=close focusout
|
||||
DateDialog.textContent=Select Date & Time
|
||||
DefaultCellModifier.tableItemDispose=TableItem disposed
|
||||
ErrorDialogWithContinue.setParameter=Set parameters and continue
|
||||
EventUtil.activate=activate
|
||||
EventUtil.arm=arm
|
||||
EventUtil.close=close
|
||||
EventUtil.collapse=collapse
|
||||
EventUtil.deactivate=deactivate
|
||||
EventUtil.defaultSelection=default selection
|
||||
EventUtil.deiconify=deiconify
|
||||
EventUtil.detailNull=null
|
||||
EventUtil.dispose=dispose
|
||||
EventUtil.dragDetect=drag detect
|
||||
EventUtil.expand=expand
|
||||
EventUtil.focusIn=focus in
|
||||
EventUtil.focusOut=focus out
|
||||
EventUtil.hardKeyDown=hard key down
|
||||
EventUtil.hardKeyUp=hard key up
|
||||
EventUtil.help=help
|
||||
EventUtil.hide=hide
|
||||
EventUtil.iconify=iconify
|
||||
EventUtil.keyDown=key down
|
||||
EventUtil.keyUp=key up
|
||||
EventUtil.menuDetect=menu detect
|
||||
EventUtil.modify=modify
|
||||
EventUtil.mouseDoubleClick=mouse double click
|
||||
EventUtil.mouseDown=mouse down
|
||||
EventUtil.mouseEnter=mouse enter
|
||||
EventUtil.mouseExit=mouse exit
|
||||
EventUtil.mouseHover=mouse hover
|
||||
EventUtil.mouseMove=mouse move
|
||||
EventUtil.mouseUp=mouse up
|
||||
EventUtil.move=move
|
||||
EventUtil.paint=paint
|
||||
EventUtil.resize=resize
|
||||
EventUtil.selectedEqual=SELECTED
|
||||
EventUtil.selection=selection
|
||||
EventUtil.show=show
|
||||
EventUtil.traverse=traverse
|
||||
EventUtil.typeNull=null
|
||||
EventUtil.verify=verify
|
||||
ExceptionMessageDialog.log=log
|
||||
Rule.rule=Rule [{0}]
|
||||
SaveAsGenericSchemaPushButton.saveAsSchema=Save as generic schema
|
||||
SWTCalendarWithTime.contentEvening=Evening
|
||||
SWTCalendarWithTime.contentHr=Hr:
|
||||
SWTCalendarWithTime.contentMin=Min:
|
||||
SWTCalendarWithTime.contentMorning=Morning
|
||||
SWTCalendarWithTime.contentNoon=Noon
|
||||
SWTCalendarWithTime.contentNow=Now
|
||||
SWTCalendarWithTime.contnetSec=Sec:
|
||||
TableViewerCreator.columnNoIBeanProperty=The column '{0}' ('{1}') has a CellEditor set but does'nt have a IBeanPropertyAccessors \!
|
||||
TableViewerCreator.columnNullId=Column '{0}' has null id \!
|
||||
StateComposite.FLL_DB_INFOR=Fill DB Information
|
||||
StateComposite.HELP_MESSAGE=Help Messages
|
||||
StateComposite.MESSAGE1=It's possible to create dynamic jobs and set a file name or table name who depends on the input table.
|
||||
StateComposite.MESSAGE2=For this it just needs to use the text
|
||||
StateComposite.MESSAGE3=\ in the file name or table name.
|
||||
StateComposite.MESSAGE4=For example for one table:
|
||||
StateComposite.MESSAGE5=For example for one file:
|
||||
StateComposite.MESSAGE6=\ or maybe
|
||||
StateComposite.OUTPUT_SELECTION=Output Selection
|
||||
StateComposite.SEL_JOBNAME=Set Jobs Name
|
||||
StateComposite.STATE=State
|
||||
StateComposite.TABLE_SELECTION=Table Selection
|
||||
StateComposite.TEMPLATE_SELECTION=Template Selection
|
||||
ArchiveDirectoryChooser.WizardProjectsImportPage_RootSelectTitle=Select roo&t directory:
|
||||
ArchiveDirectoryChooser.DataTransfer_browse=B&rowse...
|
||||
ArchiveDirectoryChooser.WizardProjectsImportPage_ArchiveSelectTitle=Select &archive file:
|
||||
ArchiveDirectoryChooser.FileExport_selectDestinationMessage=Select a directory to export to.
|
||||
ArchiveDirectoryChooser.ArchiveExport_description=Export resources to an archive file on the local file system.
|
||||
DisplayUtils.NotSupportedExceptionOnLinux=Linux/Unit doesn't support multiple display.
|
||||
@@ -63,16 +63,16 @@ EventUtil.typeNull=NULL
|
||||
EventUtil.UnknowDetail=\u30A4\u30D9\u30F3\u30C8\u8A73\u7D30\u306E\u4E0D\u660E\u306A???\u5024:
|
||||
EventUtil.UnknowType=\u30A4\u30D9\u30F3\u30C8\u30BF\u30A4\u30D7\u306E\u4E0D\u660E\u306A???\u5024:
|
||||
EventUtil.verify=\u78BA\u8A8D
|
||||
ExceptionHandler.Parameter.BeNull=ex \u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u306B\u306Fnull\u3092\u8A2D\u5B9A\u3067\u304D\u307E\u305B\u3093
|
||||
ExceptionHandler.Parameter.BeNull=ex \u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u306B\u306Fnull\u3092\u8A2D\u5B9A\u51FA\u6765\u307E\u305B\u3093
|
||||
ExceptionMessageDialog.log=\u30ED\u30B0
|
||||
ExportPushButton.ExportButton.Tip=\u3059\u3079\u3066\u306E\u884C\u3092XML\u30D5\u30A1\u30A4\u30EB\u306B\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8
|
||||
ExportPushButtonForExtendedTable.ErrorMsg.Text=\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F
|
||||
ExtendedTableAddCommand.Add.Label=\u30C6\u30FC\u30D6\u30EB\u30A8\u30F3\u30C8\u30EA\u30FC\u30921\u3064\u4EE5\u4E0A\u8FFD\u52A0
|
||||
ExtendedTableCopyCommand.Copy.Label=\u5185\u90E8\u30AF\u30EA\u30FC\u30F3\u30DC\u30FC\u30C9\u306B\u30C6\u30FC\u30D6\u30EB\u30A8\u30F3\u30C8\u30EA\u30FC\u30921\u3064\u4EE5\u4E0A\u30B3\u30D4\u30FC
|
||||
ExtendedTableAddCommand.Add.Label=\u30C6\u30FC\u30D6\u30EB\u30A8\u30F3\u30C8\u30EA\u30921\u3064\u4EE5\u4E0A\u8FFD\u52A0
|
||||
ExtendedTableCopyCommand.Copy.Label=\u5185\u90E8\u30AF\u30EA\u30FC\u30F3\u30DC\u30FC\u30C9\u306B\u30C6\u30FC\u30D6\u30EB\u30A8\u30F3\u30C8\u30EA\u30921\u3064\u4EE5\u4E0A\u30B3\u30D4\u30FC
|
||||
ExtendedTableModel.ModifiedObject.Error=\u3053\u306E\u30E1\u30BD\u30C3\u30C9\u3092\u4F7F\u7528\u3059\u308B\u524D\u306BModifiedBeanListenable\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u3092\u8A2D\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
|
||||
ExtendedTableMoveCommand.MoveLabel=\u8907\u6570\u306E\u30C6\u30FC\u30D6\u30EB\u30A8\u30F3\u30C8\u30EA\u30FC\u3092\u4E0A\u4E0B\u306B\u79FB\u52D5
|
||||
ExtendedTableMoveCommand.MoveLabel=\u8907\u6570\u306E\u30C6\u30FC\u30D6\u30EB\u30A8\u30F3\u30C8\u30EA\u3092\u4E0A\u4E0B\u306B\u79FB\u52D5
|
||||
ExtendedTablePasteCommand.Paste.Label=\u5185\u90E8\u30AF\u30EA\u30C3\u30D7\u30DC\u30FC\u30C9\u304B\u3089\u30C7\u30FC\u30BF\u3092\u8CBC\u308A\u4ED8\u3051\u308B
|
||||
ExtendedTableRemoveCommand.Romve.Label=\u30C6\u30FC\u30D6\u30EB\u30A8\u30F3\u30C8\u30EA\u30FC\u3092\u524A\u9664
|
||||
ExtendedTableRemoveCommand.Romve.Label=\u30C6\u30FC\u30D6\u30EB\u30A8\u30F3\u30C8\u30EA\u3092\u524A\u9664
|
||||
ExtendedTableResetDBTypesCommand.ResetDBTypes.Label=DB\u30BF\u30A4\u30D7\u3092\u3059\u3079\u3066\u30EA\u30BB\u30C3\u30C8\u3057\u3066\u30C7\u30D5\u30A9\u30EB\u30C8\u3092\u53D6\u5F97
|
||||
ExtendedTableCaseCommand.case.Label=\u9078\u629E\u3055\u308C\u305FDB\u30AB\u30E9\u30E0\u3092\u5927\u6587\u5B57/\u5C0F\u6587\u5B57\u306B\u5909\u66F4
|
||||
ExtendedTableQuoteCommand.Quote.Label=\u9078\u629E\u3055\u308C\u305FDB\u30AB\u30E9\u30E0\u3092\u56F2\u3080
|
||||
@@ -92,7 +92,7 @@ ProposalUtils.CtrlProposal.ErrorMsg=\u3053\u306E\u30BF\u30A4\u30D7\u306E\u5236\u
|
||||
RemovePushButton.RemoveButton.Tip=\u9078\u629E\u3057\u305F\u30A2\u30A4\u30C6\u30E0\u3092\u524A\u9664
|
||||
ResetDBTypesButton.ResetDBTypesButton.Tip=DB\u30BF\u30A4\u30D7\u3092\u30EA\u30BB\u30C3\u30C8
|
||||
Rule.rule=\u30EB\u30FC\u30EB[{0}]
|
||||
SaveAsGenericSchemaPushButton.saveAsSchema=\u30B8\u30A7\u30CD\u30EA\u30C3\u30AF\u30B9\u30AD\u30FC\u30DE\u3068\u3057\u3066\u4FDD\u5B58
|
||||
SaveAsGenericSchemaPushButton.saveAsSchema=\u6C4E\u7528\u30B9\u30AD\u30FC\u30DE\u3068\u3057\u3066\u4FDD\u5B58
|
||||
SelectContextVariablesPushButton.Label=\u30B3\u30F3\u30C6\u30AF\u30B9\u30C8\u5909\u6570\u3092\u9078\u629E
|
||||
SWTCalendarWithTime.contentEvening=\u5915\u65B9
|
||||
SWTCalendarWithTime.contentHr=\u6642:
|
||||
@@ -102,7 +102,7 @@ SWTCalendarWithTime.contentNoon=\u5348\u5F8C
|
||||
SWTCalendarWithTime.contentNow=\u73FE\u5728
|
||||
SWTCalendarWithTime.contnetSec=\u79D2:
|
||||
TableViewerCreator.CallMethod.ErrorMsg=\u3053\u306E\u30E1\u30BD\u30C3\u30C9\u306F\u3001createTable()\u3092\u65E2\u306B\u547C\u3073\u51FA\u3057\u3066\u3044\u308B\u5834\u5408\u306E\u307F\u547C\u3073\u51FA\u305B\u307E\u3059
|
||||
TableViewerCreator.CellModifier.ExError=\u73FE\u5728\u306ECellModifier\u306F\u3053\u306E\u64CD\u4F5C\u3092\u30B5\u30DD\u30FC\u30C8\u3057\u3066\u3044\u307E\u305B\u3093\u3002 \n \u3053\u306E\u6A5F\u80FD\u3092\u4F7F\u7528\u3059\u308B\u306B\u306F\u3001'{0}'\u304B\u3001\u62E1\u5F35\u3059\u308B\u30AF\u30E9\u30B9\u3092\u4F7F\u3044\u307E\u3059\u3002
|
||||
TableViewerCreator.CellModifier.ExError=\u73FE\u5728\u306ECellModifier\u306F\u3053\u306E\u64CD\u4F5C\u3092\u30B5\u30DD\u30FC\u30C8\u3057\u3066\u3044\u307E\u305B\u3093\u3002\n\u3053\u306E\u6A5F\u80FD\u3092\u4F7F\u3046\u306B\u306F\u3001'{0}'\u304B\u62E1\u5F35\u30AF\u30E9\u30B9\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044
|
||||
TableViewerCreator.columnNoIBeanProperty=\u30AB\u30E9\u30E0'{0}' ('{1}')\u306B\u306FCellEditor\u30BB\u30C3\u30C8\u304C\u3042\u308A\u307E\u3059\u304C\u3001IBeanPropertyAccessors\u304C\u3042\u308A\u307E\u305B\u3093!
|
||||
TableViewerCreator.columnNullId=\u30AB\u30E9\u30E0'{0}'\u304Cnull\u3067\u3059\uFF01
|
||||
TableViewerCreator.IdProperty.AssertMsg=\u30AB\u30E9\u30E0\u306EidProperty\u306E\u5909\u66F4\u304C\u5FC5\u8981\u3067\u3059\u3001idProperty\u306F\uFF11\u3064\u306E\u30C6\u30FC\u30D6\u30EB\u3067\u30E6\u30CB\u30FC\u30AF\u3067\u306A\u304F\u3066\u306F\u306A\u308A\u307E\u305B\u3093\u3002
|
||||
@@ -116,8 +116,8 @@ ModelSelectionDialog.Option=\u30AA\u30D7\u30B7\u30E7\u30F3
|
||||
ModelSelectionDialog.BuiltIn=\u7D44\u307F\u8FBC\u307F\u30D7\u30ED\u30D1\u30C6\u30A3\u306B\u5909\u66F4\u3057\u307E\u3059\u3002
|
||||
ModelSelectionDialog.ViewSchema=\u30B9\u30AD\u30FC\u30DE\u3092\u8868\u793A\u3057\u307E\u3059(\u8AAD\u307F\u53D6\u308A\u5C02\u7528)\u3002
|
||||
ModelSelectionDialog.ViewQuery=\u30AF\u30A8\u30EA\u30FC\u3046\u3092\u8868\u793A\u3057\u307E\u3059(\u8AAD\u307F\u53D6\u308A\u5C02\u7528)\u3002
|
||||
ModelSelectionDialog.Update=\u30EA\u30DD\u30B8\u30C8\u30EA\u30FC\u63A5\u7D9A\u3092\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u3057\u307E\u3059\u3002
|
||||
FileStep2.previewFailure=\u30D7\u30EC\u30D3\u30E5\u30FC\u30A8\u30E9\u30FC\u3002\u4E00\u90E8\u306E\u8A2D\u5B9A\u3092\u5909\u66F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n\u6CE8: \u30D7\u30EC\u30D3\u30E5\u30FC\u30A8\u30E9\u30FC\u306F\u4E00\u822C\u7684\u306B\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u8A2D\u5B9A\u306E\u8AA4\u308A\u304C\u539F\u56E0\u3067\u3059\u3002
|
||||
ModelSelectionDialog.Update=\u30EA\u30DD\u30B8\u30C8\u30EA\u30FC\u63A5\u7D9A\u3092\u66F4\u65B0\u3057\u307E\u3059\u3002
|
||||
FileStep2.previewFailure=\u30D7\u30EC\u30D3\u30E5\u30FC\u30A8\u30E9\u30FC\u3002\u3044\u304F\u3064\u304B\u306E\u8A2D\u5B9A\u5909\u66F4\u304C\u5FC5\u8981\u3067\u3059\u3002\n\u6CE8: \u30D7\u30EC\u30D3\u30E5\u30FC\u30A8\u30E9\u30FC\u306F\u4E00\u822C\u306B\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u8A2D\u5B9A\u306E\u8AA4\u308A\u304C\u539F\u56E0\u3067\u3059\u3002
|
||||
StateComposite.FLL_DB_INFOR=DB\u60C5\u5831\u3092\u5165\u529B
|
||||
StateComposite.HELP_MESSAGE=\u30D8\u30EB\u30D7\u30E1\u30C3\u30BB\u30FC\u30B8
|
||||
StateComposite.MESSAGE1=\u30C0\u30A4\u30CA\u30DF\u30C3\u30AF\u30B8\u30E7\u30D6\u3092\u8A2D\u5B9A\u3057\u3066\u3001\u5165\u529B\u30C6\u30FC\u30D6\u30EB\u306B\u4F9D\u5B58\u3059\u308B\u30D5\u30A1\u30A4\u30EB\u540D\u307E\u305F\u306F\u30C6\u30FC\u30D6\u30EB\u540D\u3092\u8A2D\u5B9A\u3067\u304D\u307E\u3059\u3002
|
||||
|
||||
@@ -102,7 +102,7 @@ SWTCalendarWithTime.contentNoon=\u4E2D\u5348
|
||||
SWTCalendarWithTime.contentNow=\u73B0\u5728
|
||||
SWTCalendarWithTime.contnetSec=\u79D2:
|
||||
TableViewerCreator.CallMethod.ErrorMsg=\u53EA\u6709\u60A8\u5DF2\u7ECF\u8C03\u7528\u4E86 createTable() \u65B9\u6CD5\u540E\uFF0C\u624D\u80FD\u8C03\u7528\u6B64\u65B9\u6CD5\u3002
|
||||
TableViewerCreator.CellModifier.ExError=\u5F53\u524D CellModifier \u4E0D\u652F\u6301\u6B64\u64CD\u4F5C\u3002 \n \u4F7F\u7528 '{0}' \u6216\u6269\u5C55\u5B83\u7684\u7C7B\u6765\u4F7F\u7528\u6B64\u529F\u80FD
|
||||
TableViewerCreator.CellModifier.ExError=\u5F53\u524D CellModifier \u4E0D\u652F\u6301\u6B64\u64CD\u4F5C\u3002\n \u4F7F\u7528 '{0}' \u6216\u80FD\u591F\u5BF9\u5176\u8FDB\u884C\u6269\u5C55\u7684\u7C7B\u6765\u4F7F\u7528\u6B64\u529F\u80FD
|
||||
TableViewerCreator.columnNoIBeanProperty=\u5217 '{0}' ('{1}') \u8BBE\u7F6E\u4E86 CellEditor\uFF0C\u4F46\u6CA1\u6709 IBeanPropertyAccessors\uFF01
|
||||
TableViewerCreator.columnNullId=\u5217 '{0}' \u7684 id \u4E3A null\uFF01
|
||||
TableViewerCreator.IdProperty.AssertMsg=\u4F60\u5FC5\u987B\u6539\u53D8\u5176\u4E2D\u4E00\u4E2A\u5217\u7684 idProperty\uFF0C\u4E00\u4E2A\u8868\u4E2D\u7684\u6BCF\u4E2A\u5217\u7684 idProperty \u5FC5\u987B\u552F\u4E00\u3002
|
||||
@@ -110,14 +110,14 @@ TableViewerCreator.Table.BeNull=\u8868\u4E3A null
|
||||
TableViewerCreator.TableColumn.AssertMsg=TableEditorColumn \u7684 idProperty \u4E3A '{0}' \u7684 TableColumn \u6CA1\u6709\u6B63\u786E\u7684 Table \u7236\u9879
|
||||
TreeToTablesLinker.Type.Unsupported=\u4E0D\u652F\u6301\u8FD9\u79CD\u7C7B\u578B\u7684 currentControl
|
||||
commons.error=\u9519\u8BEF
|
||||
exception.errorOccured=\u51FA\u73B0\u9519\u8BEF ({0})\u3002\n\u8BF7\u67E5\u770B\u65E5\u5FD7\u4EE5\u83B7\u53D6\u66F4\u591A\u8BE6\u7EC6\u4FE1\u606F\u3002
|
||||
exception.errorOccured=\u53D1\u751F\u9519\u8BEF ({0})\u3002\n\u8BF7\u67E5\u770B\u65E5\u5FD7\u4EE5\u83B7\u53D6\u66F4\u591A\u8BE6\u7EC6\u4FE1\u606F\u3002
|
||||
ModelSelectionDialog.Message=\u8BF7\u9009\u62E9\u4E00\u4E2A\u9009\u9879\u6216\u53D6\u6D88\u3002
|
||||
ModelSelectionDialog.Option=\u9009\u9879
|
||||
ModelSelectionDialog.BuiltIn=\u66F4\u6539\u4E3A\u5185\u7F6E\u5C5E\u6027\u3002
|
||||
ModelSelectionDialog.ViewSchema=\u67E5\u770B schema (\u53EA\u8BFB)\u3002
|
||||
ModelSelectionDialog.ViewQuery=\u67E5\u770B\u67E5\u8BE2 (\u53EA\u8BFB)\u3002
|
||||
ModelSelectionDialog.Update=\u66F4\u65B0\u5B58\u50A8\u5E93\u8FDE\u63A5\u3002
|
||||
FileStep2.previewFailure=\u9884\u89C8\u9519\u8BEF\u3002\u5FC5\u987B\u66F4\u6539\u67D0\u4E9B\u8BBE\u7F6E\u3002\n\u6CE8\u610F\uFF1A\u9884\u89C8\u9519\u8BEF\u901A\u5E38\u662F\u7531\u4E8E\u9519\u8BEF\u7684\u7F16\u7801\u8BBE\u7F6E\u5BFC\u81F4\u3002
|
||||
FileStep2.previewFailure=\u9884\u89C8\u9519\u8BEF\u3002\u987B\u6539\u53D8\u4E00\u4E9B\u8BBE\u7F6E\u3002\n\u6CE8\u610F\uFF1A\u9884\u89C8\u9519\u8BEF\u53EF\u80FD\u662F\u56E0\u4E3A\u9519\u8BEF\u7684\u7F16\u7801\u8BBE\u7F6E\u9020\u6210\u7684\u3002
|
||||
StateComposite.FLL_DB_INFOR=\u586B\u5199\u6570\u636E\u5E93\u4FE1\u606F
|
||||
StateComposite.HELP_MESSAGE=\u5E2E\u52A9\u6D88\u606F
|
||||
StateComposite.MESSAGE1=\u53EF\u4EE5\u521B\u5EFA\u52A8\u6001\u4F5C\u4E1A\u5E76\u8BBE\u7F6E\u4F9D\u8D56\u4E8E\u8F93\u5165\u8868\u7684\u6587\u4EF6\u540D\u6216\u8868\u540D\u3002
|
||||
|
||||
@@ -130,10 +130,11 @@ public abstract class ExportPushButtonForExtendedTable extends ExportPushButton
|
||||
AbstractExtendedTableViewer extendedTableViewer = (AbstractExtendedTableViewer) extendedControlViewer;
|
||||
ExtendedTableModel extendedTableModel = extendedTableViewer.getExtendedTableModel();
|
||||
boolean enabled = false;
|
||||
if (extendedTableModel != null && extendedTableModel.isDataRegistered() && extendedTableModel.getBeansList().size() > 0) {
|
||||
if (extendedTableModel != null && extendedTableModel.isDataRegistered()
|
||||
&& extendedTableModel.getBeansList().size() > 0) {
|
||||
enabled = true;
|
||||
}
|
||||
return extendedTableModel != null || enabled;
|
||||
return super.getEnabledState() && enabled;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -19,7 +19,6 @@ import org.talend.commons.ui.runtime.image.EImage;
|
||||
import org.talend.commons.ui.runtime.image.ImageProvider;
|
||||
import org.talend.commons.ui.swt.advanced.dataeditor.control.ExtendedPushButton;
|
||||
import org.talend.commons.ui.swt.extended.table.AbstractExtendedTableViewer;
|
||||
import org.talend.commons.ui.swt.extended.table.ExtendedTableModel;
|
||||
|
||||
/**
|
||||
* DOC Administrator class global comment. Detailled comment <br/>
|
||||
@@ -34,11 +33,4 @@ public abstract class SaveAsGenericSchemaPushButton extends ExtendedPushButton {
|
||||
|
||||
@Override
|
||||
protected abstract Command getCommandToExecute();
|
||||
|
||||
@Override
|
||||
public boolean getEnabledState() {
|
||||
AbstractExtendedTableViewer extendedTableViewer = (AbstractExtendedTableViewer) extendedControlViewer;
|
||||
ExtendedTableModel extendedTableModel = extendedTableViewer.getExtendedTableModel();
|
||||
return extendedTableModel != null;
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user