Compare commits
4 Commits
maintenanc
...
release/8.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1730e58442 | ||
|
|
8861b88828 | ||
|
|
92674ad9e4 | ||
|
|
c845b98228 |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
|
Before Width: | Height: | Size: 229 B |
@@ -40,8 +40,6 @@ public class ExceptionMessageDialog extends MessageDialog {
|
||||
private String exceptionString = null;
|
||||
|
||||
private int[] diabledButtonIndex = new int[] {};
|
||||
|
||||
private boolean expandedOnOpen = false;
|
||||
|
||||
public ExceptionMessageDialog(Shell parentShell, String dialogTitle, Image dialogTitleImage, String dialogMessage,
|
||||
int dialogImageType, String[] dialogButtonLabels, int defaultIndex, Throwable ex) {
|
||||
@@ -87,8 +85,6 @@ public class ExceptionMessageDialog extends MessageDialog {
|
||||
text.setText(exceptionString);
|
||||
text.setEditable(false);
|
||||
errorComposite.setClient(text);
|
||||
|
||||
errorComposite.setExpanded(expandedOnOpen);
|
||||
|
||||
return errorComposite;
|
||||
}
|
||||
@@ -154,22 +150,6 @@ public class ExceptionMessageDialog extends MessageDialog {
|
||||
this.exceptionString = exceptionString;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return the expandedOnOpen
|
||||
*/
|
||||
public boolean isExpandedOnOpen() {
|
||||
return expandedOnOpen;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param expandedOnOpen the expandedOnOpen to set
|
||||
*/
|
||||
public void setExpandedOnOpen(boolean expandedOnOpen) {
|
||||
this.expandedOnOpen = expandedOnOpen;
|
||||
}
|
||||
|
||||
public void setDisabledButtons(int[] index) {
|
||||
this.diabledButtonIndex = index;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ ColorStyledText.SelectAllItem.Text=\u3059\u3079\u3066\u9078\u629E
|
||||
ContentProposalAdapterExtended.close=\u9589\u3058\u308B
|
||||
ContentProposalAdapterExtended.closeFocusout=\u30D5\u30A9\u30FC\u30AB\u30B9\u30A2\u30A6\u30C8\u3092\u9589\u3058\u308B
|
||||
ControlUtils.Unsupported1=\u3053\u306E\u30B3\u30F3\u30C8\u30ED\u30FC\u30EB({0})\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u5FC5\u8981\u3067\u3042\u308C\u3070\u3001\u30B1\u30FC\u30B9\u3092\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044...
|
||||
CopyPushButton.CopyButton.Tip=\u9078\u629E\u9805\u76EE\u3092\u30B3\u30D4\u30FC
|
||||
CopyPushButton.CopyButton.Tip=\u9078\u629E\u3057\u305F\u30A2\u30A4\u30C6\u30E0\u3092\u30B3\u30D4\u30FC
|
||||
Curve2D.MaxNum.Be0=maximumSegments\u306F\u6B63\u6570\u304B0\u306B\u3057\u3066\u304F\u3060\u3055\u3044
|
||||
Curve2D.MinNum.Be0=minimumSegments\u306F\u6B63\u6570\u307E\u305F\u306F0\u306B\u3057\u3066\u304F\u3060\u3055\u3044
|
||||
DateDialog.textContent=\u65E5\u6642\u3092\u9078\u629E
|
||||
|
||||
@@ -39,7 +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$
|
||||
|
||||
WRAP_ICON("/icons/wrap.png"), //$NON-NLS-1$
|
||||
QUESTION_ICON("/icons/question.gif"), //$NON-NLS-1$
|
||||
HELP_ICON("/icons/help.png"), //$NON-NLS-1$
|
||||
MOREINFO_ICON("/icons/moreInfo.png"), //$NON-NLS-1$
|
||||
|
||||
@@ -23,19 +23,10 @@ public class FatalException extends RuntimeException {
|
||||
@SuppressWarnings("unused")//$NON-NLS-1$
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public static final int CODE_INCOMPATIBLE_UPDATE = 10;
|
||||
|
||||
private int code;
|
||||
|
||||
public FatalException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
|
||||
public FatalException(int code, String message) {
|
||||
super(message);
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public FatalException(String message) {
|
||||
super(message);
|
||||
}
|
||||
@@ -43,9 +34,4 @@ public class FatalException extends RuntimeException {
|
||||
public FatalException(Throwable cause) {
|
||||
super(cause);
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -31,9 +31,7 @@ import javax.xml.transform.stream.StreamResult;
|
||||
|
||||
import org.talend.utils.xml.XmlUtils;
|
||||
import org.w3c.dom.Document;
|
||||
import org.xml.sax.ErrorHandler;
|
||||
import org.xml.sax.SAXException;
|
||||
import org.xml.sax.SAXParseException;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -52,23 +50,6 @@ public final class XMLFileUtil {
|
||||
public static Document loadDoc(InputStream stream) throws ParserConfigurationException, SAXException, IOException {
|
||||
try {
|
||||
DocumentBuilder db = DOCBUILDER_FACTORY.newDocumentBuilder();
|
||||
db.setErrorHandler(new ErrorHandler() {
|
||||
|
||||
@Override
|
||||
public void warning(SAXParseException exception) throws SAXException {
|
||||
throw exception;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fatalError(SAXParseException exception) throws SAXException {
|
||||
throw exception;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void error(SAXParseException exception) throws SAXException {
|
||||
throw exception;
|
||||
}
|
||||
});
|
||||
return db.parse(stream);
|
||||
} finally {
|
||||
try {
|
||||
|
||||
@@ -24,7 +24,6 @@ import java.net.URI;
|
||||
import java.net.URL;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Enumeration;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
@@ -32,10 +31,6 @@ import java.util.Set;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.eclipse.core.internal.net.ProxyManager;
|
||||
import org.eclipse.core.net.proxy.IProxyData;
|
||||
import org.eclipse.core.net.proxy.IProxyService;
|
||||
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
|
||||
import org.eclipse.core.runtime.preferences.InstanceScope;
|
||||
import org.talend.commons.exception.CommonExceptionHandler;
|
||||
@@ -47,8 +42,6 @@ import org.talend.commons.runtime.utils.io.FileCopyUtils;
|
||||
*/
|
||||
public class NetworkUtil {
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(NetworkUtil.class);
|
||||
|
||||
private static final String[] windowsCommand = { "ipconfig", "/all" }; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
|
||||
private static final String[] linuxCommand = { "/sbin/ifconfig", "-a" }; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
@@ -79,136 +72,6 @@ public class NetworkUtil {
|
||||
|
||||
private static final String PROP_NETWORK_STATUS = "network.status"; //$NON-NLS-1$
|
||||
|
||||
private static final String SYSTEM_PROXY_ENABLED = "talend.studio.proxy.enableSystemProxyByDefault";
|
||||
|
||||
public static void applyProxyFromSystemProperties() throws Exception {
|
||||
if (!Boolean.valueOf(System.getProperty("talend.studio.proxy.applySystemProps", Boolean.FALSE.toString()))) {
|
||||
return;
|
||||
}
|
||||
final String passwordMask = "***";
|
||||
String httpProxyHost = System.getProperty("http.proxyHost");
|
||||
String httpProxyPort = System.getProperty("http.proxyPort");
|
||||
String httpUser = System.getProperty("http.proxyUser");
|
||||
String httpPassword = System.getProperty("http.proxyPassword");
|
||||
if (StringUtils.isNotBlank(httpPassword)) {
|
||||
System.setProperty("http.proxyPassword", passwordMask);
|
||||
}
|
||||
String httpNonProxyHosts = System.getProperty("http.nonProxyHosts");
|
||||
String httpsProxyHost = System.getProperty("https.proxyHost");
|
||||
String httpsProxyPort = System.getProperty("https.proxyPort");
|
||||
String httpsUser = System.getProperty("https.proxyUser");
|
||||
String httpsPassword = System.getProperty("https.proxyPassword");
|
||||
if (StringUtils.isNotBlank(httpsPassword)) {
|
||||
System.setProperty("https.proxyPassword", passwordMask);
|
||||
}
|
||||
String httpsNonProxyHosts = System.getProperty("https.nonProxyHosts");
|
||||
String socksProxyHost = System.getProperty("socksProxyHost");
|
||||
String socksProxyPort = System.getProperty("socksProxyPort");
|
||||
String socksProxyUser = System.getProperty("socksProxyUser");
|
||||
if (socksProxyUser == null) {
|
||||
socksProxyUser = System.getProperty("java.net.socks.username");
|
||||
}
|
||||
String socksProxyPassword = System.getProperty("socksProxyPassword");
|
||||
if (StringUtils.isNotBlank(socksProxyPassword)) {
|
||||
System.setProperty("socksProxyPassword", passwordMask);
|
||||
}
|
||||
if (socksProxyPassword == null) {
|
||||
socksProxyPassword = System.getProperty("java.net.socks.password");
|
||||
}
|
||||
IProxyService proxyService = ProxyManager.getProxyManager();
|
||||
boolean isHttpProxyEnabled = StringUtils.isNotBlank(httpProxyHost) && StringUtils.isNotBlank(httpProxyPort);
|
||||
boolean isHttpsProxyEnabled = StringUtils.isNotBlank(httpsProxyHost) && StringUtils.isNotBlank(httpsProxyPort);
|
||||
boolean isSocksProxyEnabled = StringUtils.isNotBlank(socksProxyHost) && StringUtils.isNotBlank(socksProxyPort);
|
||||
if (!isHttpProxyEnabled && !isHttpsProxyEnabled && !isSocksProxyEnabled) {
|
||||
proxyService
|
||||
.setSystemProxiesEnabled(Boolean.valueOf(System.getProperty(SYSTEM_PROXY_ENABLED, Boolean.TRUE.toString())));
|
||||
proxyService.setProxiesEnabled(false);
|
||||
LOGGER.info("No proxy specified, disabled.");
|
||||
} else {
|
||||
proxyService.setSystemProxiesEnabled(false);
|
||||
proxyService.setProxiesEnabled(true);
|
||||
List<IProxyData> proxies = new ArrayList<>();
|
||||
String initedProxyTypes = "";
|
||||
if (isHttpProxyEnabled) {
|
||||
try {
|
||||
IProxyData httpProxy = proxyService.getProxyData(IProxyData.HTTP_PROXY_TYPE);
|
||||
httpProxy.setHost(httpProxyHost);
|
||||
httpProxy.setPort(Integer.valueOf(httpProxyPort));
|
||||
if (StringUtils.isNotBlank(httpUser)) {
|
||||
httpProxy.setUserid(httpUser);
|
||||
if (httpPassword == null) {
|
||||
httpPassword = "";
|
||||
}
|
||||
httpProxy.setPassword(httpPassword);
|
||||
}
|
||||
proxies.add(httpProxy);
|
||||
initedProxyTypes += IProxyData.HTTP_PROXY_TYPE + " ";
|
||||
} catch (Throwable e) {
|
||||
LOGGER.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
if (isHttpsProxyEnabled) {
|
||||
try {
|
||||
IProxyData httpsProxy = proxyService.getProxyData(IProxyData.HTTPS_PROXY_TYPE);
|
||||
httpsProxy.setHost(httpsProxyHost);
|
||||
httpsProxy.setPort(Integer.valueOf(httpsProxyPort));
|
||||
if (StringUtils.isNotBlank(httpsUser)) {
|
||||
httpsProxy.setUserid(httpsUser);
|
||||
if (httpsPassword == null) {
|
||||
httpsPassword = "";
|
||||
}
|
||||
httpsProxy.setPassword(httpsPassword);
|
||||
}
|
||||
proxies.add(httpsProxy);
|
||||
initedProxyTypes += IProxyData.HTTPS_PROXY_TYPE + " ";
|
||||
} catch (Throwable e) {
|
||||
LOGGER.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
if (isSocksProxyEnabled) {
|
||||
try {
|
||||
IProxyData socksProxy = proxyService.getProxyData(IProxyData.SOCKS_PROXY_TYPE);
|
||||
socksProxy.setHost(socksProxyHost);
|
||||
socksProxy.setPort(Integer.valueOf(socksProxyPort));
|
||||
if (StringUtils.isNotBlank(socksProxyUser)) {
|
||||
socksProxy.setUserid(socksProxyUser);
|
||||
if (socksProxyPassword == null) {
|
||||
socksProxyPassword = "";
|
||||
}
|
||||
socksProxy.setPassword(socksProxyPassword);
|
||||
}
|
||||
proxies.add(socksProxy);
|
||||
initedProxyTypes += IProxyData.SOCKS_PROXY_TYPE;
|
||||
} catch (Throwable e) {
|
||||
LOGGER.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
proxyService.setProxyData(proxies.toArray(new IProxyData[0]));
|
||||
List<String> nonProxyHosts = new ArrayList<>();
|
||||
if (StringUtils.isNotBlank(httpNonProxyHosts)) {
|
||||
String[] split = httpNonProxyHosts.split("|");
|
||||
nonProxyHosts.addAll(Arrays.asList(split));
|
||||
}
|
||||
if (StringUtils.isNotBlank(httpsNonProxyHosts)) {
|
||||
String[] split = httpsNonProxyHosts.split("|");
|
||||
nonProxyHosts.addAll(Arrays.asList(split));
|
||||
}
|
||||
proxyService.setNonProxiedHosts(nonProxyHosts.toArray(new String[0]));
|
||||
|
||||
if (passwordMask.equals(System.getProperty("http.proxyPassword"))) {
|
||||
System.setProperty("http.proxyPassword", httpPassword);
|
||||
}
|
||||
if (passwordMask.equals(System.getProperty("https.proxyPassword"))) {
|
||||
System.setProperty("https.proxyPassword", httpsPassword);
|
||||
}
|
||||
if (passwordMask.equals(System.getProperty("socksProxyPassword"))) {
|
||||
System.setProperty("socksProxyPassword", socksProxyPassword);
|
||||
}
|
||||
|
||||
LOGGER.info("Succeed to init proxy: " + initedProxyTypes);
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isNetworkValid() {
|
||||
return isNetworkValid(DEFAULT_TIMEOUT);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ ColorStyledText.SelectAllItem.Text=\u3059\u3079\u3066\u9078\u629E
|
||||
ContentProposalAdapterExtended.close=\u9589\u3058\u308B
|
||||
ContentProposalAdapterExtended.closeFocusout=\u30D5\u30A9\u30FC\u30AB\u30B9\u30A2\u30A6\u30C8\u3092\u9589\u3058\u308B
|
||||
ControlUtils.Unsupported1=\u3053\u306E\u30B3\u30F3\u30C8\u30ED\u30FC\u30EB({0})\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u5FC5\u8981\u3067\u3042\u308C\u3070\u3001\u30B1\u30FC\u30B9\u3092\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044...
|
||||
CopyPushButton.CopyButton.Tip=\u9078\u629E\u9805\u76EE\u3092\u30B3\u30D4\u30FC
|
||||
CopyPushButton.CopyButton.Tip=\u9078\u629E\u3057\u305F\u30A2\u30A4\u30C6\u30E0\u3092\u30B3\u30D4\u30FC
|
||||
Curve2D.MaxNum.Be0=maximumSegments\u306F\u6B63\u6570\u304B0\u306B\u3057\u3066\u304F\u3060\u3055\u3044
|
||||
Curve2D.MinNum.Be0=minimumSegments\u306F\u6B63\u307E\u305F\u306F0\u306B\u3057\u3066\u304F\u3060\u3055\u3044
|
||||
DateDialog.textContent=\u65E5\u6642\u3092\u9078\u629E
|
||||
|
||||
@@ -52,7 +52,7 @@ public abstract class ExtendedTableCaseCommand extends Command implements IExten
|
||||
@Override
|
||||
public void execute() {
|
||||
convertCase(extendedTable, beansToCovertCase, selectionIndices, isUpperCase);
|
||||
extendedTable.getTableViewer().refresh();
|
||||
|
||||
}
|
||||
|
||||
public abstract void convertCase(ExtendedTableModel extendedTable, List copiedObjectsList, int[] selectionIndices, boolean isUpperCase);
|
||||
|
||||
@@ -17,7 +17,6 @@ import java.util.List;
|
||||
|
||||
import org.eclipse.gef.commands.Command;
|
||||
import org.talend.commons.ui.runtime.i18n.Messages;
|
||||
import org.talend.commons.ui.runtime.swt.tableviewer.TableViewerCreatorNotModifiable;
|
||||
import org.talend.commons.ui.swt.extended.table.ExtendedTableModel;
|
||||
import org.talend.commons.ui.utils.SimpleClipboard;
|
||||
import org.talend.commons.utils.data.list.UniqueStringGenerator;
|
||||
@@ -66,11 +65,6 @@ public abstract class ExtendedTablePasteCommand extends Command implements IExte
|
||||
List list = new ArrayList((List) data);
|
||||
list = createPastableBeansList(extendedTable, list);
|
||||
extendedTable.addAll(indexStart, list);
|
||||
// when not lazy load need to do refresh to refresh the row number
|
||||
if (!TableViewerCreatorNotModifiable.getRecommandLazyLoad()
|
||||
&& !TableViewerCreatorNotModifiable.isLazyLoadingEnabled()) {
|
||||
extendedTable.getTableViewer().refresh();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -14,7 +14,6 @@ package org.talend.commons.ui.swt.advanced.dataeditor.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.gef.commands.Command;
|
||||
import org.talend.commons.ui.runtime.i18n.Messages;
|
||||
import org.talend.commons.ui.swt.extended.table.ExtendedTableModel;
|
||||
@@ -55,7 +54,7 @@ public abstract class ExtendedTableQuoteCommand extends Command implements IExte
|
||||
@Override
|
||||
public void execute() {
|
||||
toQuote(extendedTable, beansToQuote, selectionIndices, quote, isAddingQuote);
|
||||
extendedTable.getTableViewer().refresh();
|
||||
|
||||
}
|
||||
|
||||
public abstract void toQuote(ExtendedTableModel extendedTable, List copiedObjectsList, int[] selectionIndices, String quote, boolean isAddingQuote);
|
||||
|
||||
@@ -1,178 +1,178 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2021 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.utils.loader;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipFile;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
|
||||
|
||||
/**
|
||||
* ggu class global comment. Detailled comment
|
||||
*/
|
||||
public class MyURLClassLoader extends URLClassLoader {
|
||||
|
||||
public static interface IAssignableClassFilter {
|
||||
|
||||
public boolean filter(URL[] urls);
|
||||
|
||||
public boolean filter(Class clazz);
|
||||
|
||||
public boolean filter(String clazzName);
|
||||
}
|
||||
|
||||
private static Logger log = Logger.getLogger(MyURLClassLoader.class);
|
||||
|
||||
private Map pclasses = new HashMap();
|
||||
|
||||
public MyURLClassLoader(String fileName) throws IOException {
|
||||
this(new File(fileName).toURI().toURL());
|
||||
}
|
||||
|
||||
public MyURLClassLoader(URL url) {
|
||||
this(new URL[] { url });
|
||||
}
|
||||
|
||||
public MyURLClassLoader(URL[] urls) {
|
||||
super(urls, Class.class.getClassLoader());
|
||||
}
|
||||
|
||||
public MyURLClassLoader(URL[] urls, ClassLoader parentLoader) {
|
||||
super(urls, parentLoader);
|
||||
}
|
||||
|
||||
public Class[] getAssignableClasses(Class type) throws IOException {
|
||||
return getAssignableClasses(type, null);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Class[] getAssignableClasses(Class type, IAssignableClassFilter filter) throws IOException {
|
||||
List classes = new ArrayList();
|
||||
URL[] urls = getURLs();
|
||||
for (URL url : urls) {
|
||||
if (filter != null && filter.filter(new URL[] { url })) {
|
||||
continue;
|
||||
}
|
||||
File file = new File(url.getFile());
|
||||
if (!file.isDirectory() && file.exists() && file.canRead()) {
|
||||
ZipFile zipFile = null;
|
||||
try {
|
||||
zipFile = new ZipFile(file);
|
||||
} catch (IOException ex) {
|
||||
ExceptionHandler.process(ex);
|
||||
}
|
||||
Enumeration<? extends ZipEntry> entries = zipFile.entries();
|
||||
while (entries.hasMoreElements()) {
|
||||
Class cls = null;
|
||||
String entryName = entries.nextElement().getName();
|
||||
String className = changeFileNameToClassName(entryName);
|
||||
if (className != null) {
|
||||
if (filter != null && filter.filter(className)) {
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
cls = loadClass(className);
|
||||
} catch (Throwable th) {
|
||||
log.warn(th);
|
||||
}
|
||||
if (cls != null) {
|
||||
if (filter != null && filter.filter(cls)) {
|
||||
continue;
|
||||
}
|
||||
if (isAssignableType(type, cls)) {
|
||||
classes.add(cls);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return (Class[]) classes.toArray(new Class[classes.size()]);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private boolean isAssignableType(Class type, Class current) {
|
||||
if (type == null || current == null || current.equals(Object.class)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (type.isAssignableFrom(current)) {
|
||||
return true;
|
||||
} else
|
||||
// sometimes can not assign the java generic, use the class url
|
||||
if (type.getName() != null && type.getName().equals(current.getName())) {
|
||||
return true;
|
||||
} else {
|
||||
//
|
||||
if (type.isInterface()) {//
|
||||
for (Class interfaceClazz : current.getInterfaces()) {
|
||||
if (interfaceClazz.equals(type)) {
|
||||
return true;
|
||||
} else {
|
||||
if (isAssignableType(type, interfaceClazz)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isAssignableType(type, current.getSuperclass())) {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
return isAssignableType(type, current.getSuperclass());
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see java.net.URLClassLoader#findClass(java.lang.String)
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
protected synchronized Class findCslass(String className) throws ClassNotFoundException {
|
||||
Class cls = (Class) pclasses.get(className);
|
||||
if (cls == null) {
|
||||
cls = super.findClass(className);
|
||||
pclasses.put(className, cls);
|
||||
}
|
||||
return cls;
|
||||
}
|
||||
|
||||
public static String changeFileNameToClassName(String name) {
|
||||
if (name == null) {
|
||||
throw new IllegalArgumentException("File Name == null");
|
||||
}
|
||||
String className = null;
|
||||
if (name.toLowerCase().endsWith(".class")) {
|
||||
className = name.replace('/', '.');
|
||||
className = className.replace('\\', '.');
|
||||
className = className.substring(0, className.length() - 6);
|
||||
}
|
||||
return className;
|
||||
}
|
||||
|
||||
protected void classHasBeenLoaded(Class cls) {
|
||||
}
|
||||
|
||||
}
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2021 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.utils.loader;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipFile;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
|
||||
|
||||
/**
|
||||
* ggu class global comment. Detailled comment
|
||||
*/
|
||||
public class MyURLClassLoader extends URLClassLoader {
|
||||
|
||||
public static interface IAssignableClassFilter {
|
||||
|
||||
public boolean filter(URL[] urls);
|
||||
|
||||
public boolean filter(Class clazz);
|
||||
|
||||
public boolean filter(String clazzName);
|
||||
}
|
||||
|
||||
private static Logger log = Logger.getLogger(MyURLClassLoader.class);
|
||||
|
||||
private Map pclasses = new HashMap();
|
||||
|
||||
public MyURLClassLoader(String fileName) throws IOException {
|
||||
this(new File(fileName).toURL());
|
||||
}
|
||||
|
||||
public MyURLClassLoader(URL url) {
|
||||
this(new URL[] { url });
|
||||
}
|
||||
|
||||
public MyURLClassLoader(URL[] urls) {
|
||||
super(urls, Class.class.getClassLoader());
|
||||
}
|
||||
|
||||
public MyURLClassLoader(URL[] urls, ClassLoader parentLoader) {
|
||||
super(urls, parentLoader);
|
||||
}
|
||||
|
||||
public Class[] getAssignableClasses(Class type) throws IOException {
|
||||
return getAssignableClasses(type, null);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Class[] getAssignableClasses(Class type, IAssignableClassFilter filter) throws IOException {
|
||||
List classes = new ArrayList();
|
||||
URL[] urls = getURLs();
|
||||
for (URL url : urls) {
|
||||
if (filter != null && filter.filter(new URL[] { url })) {
|
||||
continue;
|
||||
}
|
||||
File file = new File(url.getFile());
|
||||
if (!file.isDirectory() && file.exists() && file.canRead()) {
|
||||
ZipFile zipFile = null;
|
||||
try {
|
||||
zipFile = new ZipFile(file);
|
||||
} catch (IOException ex) {
|
||||
ExceptionHandler.process(ex);
|
||||
}
|
||||
Enumeration<? extends ZipEntry> entries = zipFile.entries();
|
||||
while (entries.hasMoreElements()) {
|
||||
Class cls = null;
|
||||
String entryName = entries.nextElement().getName();
|
||||
String className = changeFileNameToClassName(entryName);
|
||||
if (className != null) {
|
||||
if (filter != null && filter.filter(className)) {
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
cls = loadClass(className);
|
||||
} catch (Throwable th) {
|
||||
log.warn(th);
|
||||
}
|
||||
if (cls != null) {
|
||||
if (filter != null && filter.filter(cls)) {
|
||||
continue;
|
||||
}
|
||||
if (isAssignableType(type, cls)) {
|
||||
classes.add(cls);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return (Class[]) classes.toArray(new Class[classes.size()]);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private boolean isAssignableType(Class type, Class current) {
|
||||
if (type == null || current == null || current.equals(Object.class)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (type.isAssignableFrom(current)) {
|
||||
return true;
|
||||
} else
|
||||
// sometimes can not assign the java generic, use the class url
|
||||
if (type.getName() != null && type.getName().equals(current.getName())) {
|
||||
return true;
|
||||
} else {
|
||||
//
|
||||
if (type.isInterface()) {//
|
||||
for (Class interfaceClazz : current.getInterfaces()) {
|
||||
if (interfaceClazz.equals(type)) {
|
||||
return true;
|
||||
} else {
|
||||
if (isAssignableType(type, interfaceClazz)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isAssignableType(type, current.getSuperclass())) {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
return isAssignableType(type, current.getSuperclass());
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see java.net.URLClassLoader#findClass(java.lang.String)
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
protected synchronized Class findCslass(String className) throws ClassNotFoundException {
|
||||
Class cls = (Class) pclasses.get(className);
|
||||
if (cls == null) {
|
||||
cls = super.findClass(className);
|
||||
pclasses.put(className, cls);
|
||||
}
|
||||
return cls;
|
||||
}
|
||||
|
||||
public static String changeFileNameToClassName(String name) {
|
||||
if (name == null) {
|
||||
throw new IllegalArgumentException("File Name == null");
|
||||
}
|
||||
String className = null;
|
||||
if (name.toLowerCase().endsWith(".class")) {
|
||||
className = name.replace('/', '.');
|
||||
className = className.replace('\\', '.');
|
||||
className = className.substring(0, className.length() - 6);
|
||||
}
|
||||
return className;
|
||||
}
|
||||
|
||||
protected void classHasBeenLoaded(Class cls) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -155,6 +155,7 @@ ProjectRepositoryNode.invalidItem=Invalid item
|
||||
ProjectRepositoryNode.columns=Columns
|
||||
ProjectRepositoryNode.validationRules=Validation Rules
|
||||
ProjectRepositoryNode.cdcFoundation=CDC Foundation
|
||||
ProjectRepositoryNode.cdcFoundation.deprecated=CDC Foundation (deprecated)
|
||||
ProjectRepositoryNode.genericSchema=Generic schemas
|
||||
ProjectRepositoryNode.queries=Queries
|
||||
ProjectRepositoryNode.synonymSchemas=Synonym schemas
|
||||
|
||||
@@ -155,6 +155,7 @@ ProjectRepositoryNode.invalidItem=\u00C9l\u00E9ment invalide
|
||||
ProjectRepositoryNode.columns=Colonnes
|
||||
ProjectRepositoryNode.validationRules=R\u00E8gles de validation
|
||||
ProjectRepositoryNode.cdcFoundation=Fondation CDC
|
||||
ProjectRepositoryNode.cdcFoundation.deprecated=Fondation CDC (d\u00E9pr\u00E9ci\u00E9)
|
||||
ProjectRepositoryNode.genericSchema=Sch\u00E9mas g\u00E9n\u00E9riques
|
||||
ProjectRepositoryNode.queries=Requ\u00EAtes
|
||||
ProjectRepositoryNode.synonymSchemas=Sch\u00E9mas synonymes
|
||||
|
||||
@@ -155,6 +155,7 @@ ProjectRepositoryNode.invalidItem=\u7121\u52B9\u306A\u30A2\u30A4\u30C6\u30E0
|
||||
ProjectRepositoryNode.columns=\u30AB\u30E9\u30E0
|
||||
ProjectRepositoryNode.validationRules=\u691C\u8A3C\u30EB\u30FC\u30EB
|
||||
ProjectRepositoryNode.cdcFoundation=CDC Foundation
|
||||
ProjectRepositoryNode.cdcFoundation.deprecated=CDC Foundation (\u975E\u63A8\u5968)
|
||||
ProjectRepositoryNode.genericSchema=\u30B8\u30A7\u30CD\u30EA\u30C3\u30AF\u30B9\u30AD\u30FC\u30DE
|
||||
ProjectRepositoryNode.queries=\u30AF\u30A8\u30EA\u30FC
|
||||
ProjectRepositoryNode.synonymSchemas=\u30B7\u30CE\u30CB\u30E0\u30B9\u30AD\u30FC\u30DE
|
||||
|
||||
@@ -155,6 +155,7 @@ ProjectRepositoryNode.invalidItem=\u65E0\u6548\u9879\u76EE
|
||||
ProjectRepositoryNode.columns=\u5217
|
||||
ProjectRepositoryNode.validationRules=\u9A8C\u8BC1\u89C4\u5219
|
||||
ProjectRepositoryNode.cdcFoundation=CDC Foundation
|
||||
ProjectRepositoryNode.cdcFoundation.deprecated=CDC Foundation (\u5DF2\u5F03\u7528)
|
||||
ProjectRepositoryNode.genericSchema=\u901A\u7528 schema
|
||||
ProjectRepositoryNode.queries=\u67E5\u8BE2
|
||||
ProjectRepositoryNode.synonymSchemas=\u540C\u4E49\u5B57 schema
|
||||
|
||||
@@ -35,7 +35,6 @@ import org.eclipse.jface.preference.IPreferenceStore;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.commons.runtime.model.repository.ERepositoryStatus;
|
||||
import org.talend.commons.runtime.service.ITaCoKitService;
|
||||
import org.talend.commons.ui.runtime.exception.RuntimeExceptionHandler;
|
||||
import org.talend.commons.ui.runtime.image.ECoreImage;
|
||||
import org.talend.commons.ui.runtime.repository.IExtendRepositoryNode;
|
||||
@@ -824,8 +823,7 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
|
||||
* @return
|
||||
*/
|
||||
private RepositoryNode getFolder(ERepositoryObjectType currentType, String path, List<IRepositoryNode> rootNodes) {
|
||||
if (RepositoryNodeUtilities.isGenericDBExtraType(currentType) || RepositoryNodeManager.isSnowflake(currentType)
|
||||
|| (ITaCoKitService.getInstance() != null && ITaCoKitService.getInstance().isTaCoKitType(currentType))) {
|
||||
if (RepositoryNodeUtilities.isGenericDBExtraType(currentType) || RepositoryNodeManager.isSnowflake(currentType)) {
|
||||
currentType = ERepositoryObjectType.METADATA_CONNECTIONS;
|
||||
}
|
||||
if (path == null || path.isEmpty()) {
|
||||
@@ -1723,11 +1721,11 @@ public class ProjectRepositoryNode extends RepositoryNode implements IProjectRep
|
||||
DatabaseConnectionItem connectionItem = (DatabaseConnectionItem) item;
|
||||
DatabaseConnection connection = (DatabaseConnection) connectionItem.getConnection();
|
||||
if (PluginChecker.isCDCPluginLoaded()) {
|
||||
ICDCProviderService service = GlobalServiceRegister.getDefault()
|
||||
.getService(ICDCProviderService.class);
|
||||
ICDCProviderService service = GlobalServiceRegister.getDefault().getService(ICDCProviderService.class);
|
||||
|
||||
if (service != null && service.canCreateCDCConnection(connection)) {
|
||||
RepositoryNode cdcNode = new StableRepositoryNode(node,
|
||||
Messages.getString("ProjectRepositoryNode.cdcFoundation"), //$NON-NLS-1$
|
||||
Messages.getString("ProjectRepositoryNode.cdcFoundation.deprecated"), //$NON-NLS-1$
|
||||
ECoreImage.FOLDER_CLOSE_ICON);
|
||||
node.getChildren().add(cdcNode);
|
||||
service.createCDCTypes(recBinNode, cdcNode, connection.getCdcConns());
|
||||
|
||||
@@ -147,11 +147,7 @@ public class LDAPCATruster implements X509TrustManager {
|
||||
} catch (IOException ex) {
|
||||
}
|
||||
try {
|
||||
if (in != null) {
|
||||
ks.load(in, certStorePwd);
|
||||
} else {
|
||||
ks = null;
|
||||
}
|
||||
ks.load(in, certStorePwd);
|
||||
} catch (Exception e) {
|
||||
log.error(Messages.getString("LDAPCATruster.failedLoadCert") + e.getMessage()); //$NON-NLS-1$
|
||||
return;
|
||||
|
||||
@@ -856,13 +856,13 @@ public class XmiResourceManager {
|
||||
URI orgPropertyResourceURI = EcoreUtil.getURI(originalItem.getProperty());
|
||||
URI orgRelativePlateformDestUri = orgPropertyResourceURI.trimFileExtension().appendFileExtension(
|
||||
FileConstants.SCREENSHOT_EXTENSION);
|
||||
URL orgFileURL = FileLocator.resolve(new java.net.URL(
|
||||
URL orgFileURL = FileLocator.toFileURL(new java.net.URL(
|
||||
"platform:/resource" + orgRelativePlateformDestUri.toPlatformString(true))); //$NON-NLS-1$
|
||||
|
||||
URI newPropertyResourceURI = EcoreUtil.getURI(newItem.getProperty());
|
||||
URI newRelativePlateformDestUri = newPropertyResourceURI.trimFileExtension().appendFileExtension(
|
||||
FileConstants.SCREENSHOT_EXTENSION);
|
||||
URL newFileURL = FileLocator.resolve(new java.net.URL(
|
||||
URL newFileURL = FileLocator.toFileURL(new java.net.URL(
|
||||
"platform:/resource" + newRelativePlateformDestUri.toPlatformString(true))); //$NON-NLS-1$
|
||||
|
||||
os = new FileOutputStream(newFileURL.getFile());
|
||||
|
||||
@@ -144,7 +144,7 @@ Require-Bundle: org.eclipse.jdt.core,
|
||||
com.fasterxml.jackson.core.jackson-annotations,
|
||||
com.fasterxml.jackson.core.jackson-databind,
|
||||
com.fasterxml.jackson.core.jackson-core,
|
||||
avro
|
||||
avro;bundle-version="1.11.2"
|
||||
Bundle-Activator: org.talend.core.runtime.CoreRuntimePlugin
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-ClassPath: .,
|
||||
|
||||
@@ -49,10 +49,8 @@ tDqReportRun=java.base/java.lang,java.base/java.nio
|
||||
tWebService=java.base/java.lang
|
||||
tWebServiceInput=java.base/java.lang
|
||||
|
||||
tRESTClient=java.base/sun.net.www.protocol.https,java.base/java.net
|
||||
|
||||
# TCK framework
|
||||
TCK_COMMON_ARGS=java.base/java.io,java.base/java.lang.invoke,java.base/java.lang.reflect,java.base/java.lang,java.base/java.net,java.base/java.nio,java.base/java.util,java.base/sun.nio.ch,java.base/sun.net.www.protocol.https
|
||||
TCK_COMMON_ARGS=java.base/java.io,java.base/java.lang.invoke,java.base/java.lang.reflect,java.base/java.lang,java.base/java.net,java.base/java.nio,java.base/java.util,java.base/sun.nio.ch
|
||||
|
||||
# BigData distribution
|
||||
SPARK_3_4_x=java.base/java.nio,java.base/sun.nio.ch,java.base/java.util,java.base/java.lang.invoke,java.base/sun.util.calendar
|
||||
|
||||
@@ -39,9 +39,6 @@ import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.runtime.CoreRuntimePlugin;
|
||||
import org.talend.core.runtime.projectsetting.ProjectPreferenceManager;
|
||||
import org.talend.designer.runprocess.IRunProcessService;
|
||||
import org.talend.utils.JavaVersion;
|
||||
import org.talend.utils.StudioKeysFileCheck;
|
||||
import org.talend.utils.VersionException;
|
||||
|
||||
/**
|
||||
* Utilities around perl stuff. <br/>
|
||||
@@ -251,7 +248,7 @@ public final class JavaUtils {
|
||||
setProjectJavaVserion(javaVersion);
|
||||
applyCompilerCompliance(javaVersion);
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IRunProcessService.class)) {
|
||||
IRunProcessService service = GlobalServiceRegister.getDefault().getService(IRunProcessService.class);
|
||||
IRunProcessService service = (IRunProcessService) GlobalServiceRegister.getDefault().getService(IRunProcessService.class);
|
||||
service.updateProjectPomWithTemplate();
|
||||
}
|
||||
}
|
||||
@@ -287,10 +284,6 @@ public final class JavaUtils {
|
||||
if (version == null) {
|
||||
return defaultCompliance;
|
||||
}
|
||||
JavaVersion ver = new JavaVersion(version);
|
||||
if (ver.getMajor() > 8) {
|
||||
return String.valueOf(ver.getMajor());
|
||||
}
|
||||
if (version.startsWith(JavaCore.VERSION_1_8)) {
|
||||
return JavaCore.VERSION_1_8;
|
||||
}
|
||||
@@ -371,39 +364,5 @@ public final class JavaUtils {
|
||||
monitor.worked(1);
|
||||
}
|
||||
}
|
||||
|
||||
public static void validateJavaVersion() {
|
||||
try {
|
||||
// validate jvm which is used to start studio
|
||||
StudioKeysFileCheck.validateJavaVersion();
|
||||
|
||||
// validate default complier's compliance level
|
||||
IVMInstall install = JavaRuntime.getDefaultVMInstall();
|
||||
String ver = getCompilerCompliance((IVMInstall2) install, JavaCore.VERSION_1_8);
|
||||
if (new JavaVersion(ver).compareTo(new JavaVersion(StudioKeysFileCheck.JAVA_VERSION_MAXIMUM_STRING)) > 0) {
|
||||
VersionException e = new VersionException(VersionException.ERR_JAVA_VERSION_NOT_SUPPORTED,
|
||||
"The maximum Java version supported by Studio is " + StudioKeysFileCheck.JAVA_VERSION_MAXIMUM_STRING + ". Your compiler's compliance level is " + ver);
|
||||
throw e;
|
||||
}
|
||||
} catch (Exception e1) {
|
||||
if (e1 instanceof VersionException) {
|
||||
throw e1;
|
||||
}
|
||||
ExceptionHandler.process(e1);
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isJava17() {
|
||||
boolean isJava17 = false;
|
||||
String javaVersion = System.getProperty("java.version");
|
||||
String[] arr = javaVersion.split("[^\\d]+");
|
||||
try {
|
||||
isJava17 = Integer.parseInt(arr[0]) >= 17;
|
||||
} catch (NumberFormatException e) {
|
||||
ExceptionHandler.process(e);
|
||||
isJava17 = false;
|
||||
}
|
||||
return isJava17;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -54,6 +54,4 @@ public interface ILibraryManagerUIService extends IService {
|
||||
public boolean confirmDialog(String originalJarFileName);
|
||||
|
||||
public IConfigModuleDialog getConfigModuleDialog(Shell parentShell, String initValue, boolean allowDetectDependencies);
|
||||
|
||||
public String getLicenseUrlByName(String licenceName);
|
||||
}
|
||||
|
||||
@@ -60,6 +60,8 @@ public interface ITDQRepositoryService extends IService {
|
||||
*/
|
||||
public void notifySQLExplorer(Item... items);
|
||||
|
||||
public void fillMetadata(ConnectionItem connItem);
|
||||
|
||||
public void refresh();
|
||||
|
||||
// Added 20120503 yyin
|
||||
|
||||
@@ -22,7 +22,7 @@ import org.talend.core.database.EDatabaseTypeName;
|
||||
*/
|
||||
public class DbVersion4DriversForOracle11 extends DbVersion4Drivers {
|
||||
|
||||
public static final String DRIVER_1_6 = "ojdbc6-11.2.0.4.jar"; //$NON-NLS-1$
|
||||
public static final String DRIVER_1_6 = "ojdbc6.jar"; //$NON-NLS-1$
|
||||
|
||||
public static final String DRIVER_1_5 = "ojdbc5.jar"; //$NON-NLS-1$
|
||||
|
||||
|
||||
@@ -54,12 +54,12 @@ public enum EDatabaseVersion4Drivers {
|
||||
H2(new DbVersion4Drivers(EDatabaseTypeName.H2, "h2-2.1.214.jar")), //$NON-NLS-1$
|
||||
|
||||
//
|
||||
JAVADB_EMBEDED(new DbVersion4Drivers(EDatabaseTypeName.JAVADB_EMBEDED, "derby-10.14.2.0.jar")), //$NON-NLS-1$
|
||||
SQLITE(new DbVersion4Drivers(EDatabaseTypeName.SQLITE, new String[] { "slf4j-api-1.7.34.jar", "sqlite-jdbc-3.44.1.0.jar" })), //$NON-NLS-1$
|
||||
FIREBIRD(new DbVersion4Drivers(EDatabaseTypeName.FIREBIRD, "jaybird-2.1.1.jar")), //$NON-NLS-1$
|
||||
JAVADB_EMBEDED(new DbVersion4Drivers(EDatabaseTypeName.JAVADB_EMBEDED, "derby.jar")), //$NON-NLS-1$
|
||||
SQLITE(new DbVersion4Drivers(EDatabaseTypeName.SQLITE, "sqlite-jdbc-3.40.0.0.jar")), //$NON-NLS-1$
|
||||
FIREBIRD(new DbVersion4Drivers(EDatabaseTypeName.FIREBIRD, "jaybird-full-2.1.1.jar")), //$NON-NLS-1$
|
||||
TERADATA(new DbVersion4Drivers(EDatabaseTypeName.TERADATA,
|
||||
new String[] { "terajdbc4-17.10.00.27.jar" })), //$NON-NLS-1$
|
||||
JAVADB_DERBYCLIENT(new DbVersion4Drivers(EDatabaseTypeName.JAVADB_DERBYCLIENT, "derbyclient-10.14.2.0.jar")), //$NON-NLS-1$
|
||||
JAVADB_DERBYCLIENT(new DbVersion4Drivers(EDatabaseTypeName.JAVADB_DERBYCLIENT, "derbyclient.jar")), //$NON-NLS-1$
|
||||
NETEZZA(new DbVersion4Drivers(EDatabaseTypeName.NETEZZA, "nzjdbc.jar")), //$NON-NLS-1$
|
||||
INFORMIX(new DbVersion4Drivers(EDatabaseTypeName.INFORMIX, "ifxjdbc.jar")), //$NON-NLS-1$
|
||||
|
||||
|
||||
@@ -45,8 +45,6 @@ import org.talend.designer.core.model.utils.emf.talendfile.TalendFileFactory;
|
||||
*/
|
||||
public class JobContextManager implements IContextManager {
|
||||
|
||||
private boolean isWrapContextText;
|
||||
|
||||
private IContext defaultContext = new JobContext(IContext.DEFAULT);
|
||||
|
||||
private List<IContext> listContext = new ArrayList<IContext>();
|
||||
@@ -104,14 +102,6 @@ public class JobContextManager implements IContextManager {
|
||||
|
||||
private Map<ContextItem, List<IContext>> renameContextGroupMap = new HashMap<ContextItem, List<IContext>>();
|
||||
|
||||
public boolean isWrapContextText() {
|
||||
return isWrapContextText;
|
||||
}
|
||||
|
||||
public void setWrapContextText(boolean isWrapContextText) {
|
||||
this.isWrapContextText = isWrapContextText;
|
||||
}
|
||||
|
||||
public Map<ContextItem, List<IContext>> getAddContextGroupMap() {
|
||||
return this.addContextGroupMap;
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ import org.apache.commons.lang.StringUtils;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
import org.eclipse.core.runtime.Platform;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.core.pendo.PendoDataTrackFactory;
|
||||
import org.talend.core.runtime.i18n.Messages;
|
||||
import org.talend.core.service.ICloudSignOnService;
|
||||
import org.talend.repository.model.RepositoryConstants;
|
||||
@@ -253,13 +254,7 @@ public class ConnectionBean implements Cloneable {
|
||||
String user = conDetails.getString(USER);
|
||||
if (isToken()) {
|
||||
String url = getDynamicFields().get(RepositoryConstants.REPOSITORY_URL);
|
||||
if (ICloudSignOnService.get() != null) {
|
||||
try {
|
||||
user = ICloudSignOnService.get().getTokenUser(url, getPassword());
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
user = PendoDataTrackFactory.getInstance().getTmcUser(url, getPassword());
|
||||
if (StringUtils.isNotBlank(user)) {
|
||||
setUser(user);
|
||||
}
|
||||
|
||||
@@ -63,4 +63,11 @@ public class PendoDataTrackFactory {
|
||||
}
|
||||
}
|
||||
|
||||
public String getTmcUser(String url, String token) {
|
||||
if (coreRuntimeService != null) {
|
||||
return coreRuntimeService.getTmcUser(url, token);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -640,7 +640,7 @@ TalendLibsServerManager.cannotGetUserLibraryServer=Impossible d'obtenir le serve
|
||||
MigrationReportAccessDialog.title=Migration des \u00E9l\u00E9ments du projet
|
||||
MigrationReportAccessDialog.migrateSuccess=Les \u00E9l\u00E9ments du projet ont bien \u00E9t\u00E9 migr\u00E9s.
|
||||
MigrationReportAccessDialog.completeReportAvailable=Consulter le rapport
|
||||
MigrationReportAccessDialog.accessBrowse=Parcourir...
|
||||
MigrationReportAccessDialog.accessReport=ici
|
||||
MigrationReportAccessDialog.provideAnalysisTool=Vous pouvez ex\u00E9cuter une analyse de projet pour analyser votre projet migr\u00E9. Cet outil exp\u00E9rimental va g\u00E9n\u00E9rer un rapport contenant\u00A0:
|
||||
MigrationReportAccessDialog.listOfProblems=- la liste des \u00E9l\u00E9ments \u00E0 corriger manuellement,
|
||||
MigrationReportAccessDialog.listItems=- la liste des \u00E9l\u00E9ments \u00E0 v\u00E9rifier.
|
||||
@@ -655,7 +655,7 @@ ItemAnalysisReportManager.Warning.message=Impossible d'ex\u00E9cuter une analyse
|
||||
AnalysisReportAccessDialog.shellTitle=Analyse du projet
|
||||
AnalysisReportAccessDialog.generateSuccess=Analyse du projet termin\u00E9e.
|
||||
AnalysisReportAccessDialog.completeReportAvailable=Consulter le rapport
|
||||
AnalysisReportAccessDialog.accessBrowse=Parcourir...
|
||||
AnalysisReportAccessDialog.accessReport=ici
|
||||
AbstractPomTemplateProjectSettingPage.defaultTabLabel=Par d\u00E9faut
|
||||
AbstractPomTemplateProjectSettingPage.customTabLabel=Personnalis\u00E9
|
||||
AbstractPomTemplateProjectSettingPage.previewButton=Aper\u00E7u
|
||||
|
||||
@@ -640,7 +640,7 @@ TalendLibsServerManager.cannotGetUserLibraryServer=\u30EA\u30E2\u30FC\u30C8\u7BA
|
||||
MigrationReportAccessDialog.title=\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u9805\u76EE\u3092\u79FB\u884C
|
||||
MigrationReportAccessDialog.migrateSuccess=\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u9805\u76EE\u304C\u6B63\u3057\u304F\u79FB\u884C\u3055\u308C\u307E\u3057\u305F\u3002
|
||||
MigrationReportAccessDialog.completeReportAvailable=\u30EC\u30DD\u30FC\u30C8\u3092\u30C1\u30A7\u30C3\u30AF
|
||||
MigrationReportAccessDialog.accessBrowse=\u53C2\u7167...
|
||||
MigrationReportAccessDialog.accessReport=\u3053\u3061\u3089
|
||||
MigrationReportAccessDialog.provideAnalysisTool=\u4ECA\u3059\u3050\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u5206\u6790\u3092\u5B9F\u884C\u3057\u3066\u3001\u79FB\u884C\u3055\u308C\u305F\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u3092\u5206\u6790\u3067\u304D\u307E\u3059\u3002\u3053\u306E\u8A66\u9A13\u7684\u306A\u30C4\u30FC\u30EB\u306B\u3088\u3063\u3066\u3001\u4EE5\u4E0B\u304C\u542B\u307E\u308C\u308B\u30EC\u30DD\u30FC\u30C8\u304C\u751F\u6210\u3055\u308C\u307E\u3059:
|
||||
MigrationReportAccessDialog.listOfProblems=- \u624B\u52D5\u3067\u4FEE\u6B63\u3059\u308B\u30A2\u30A4\u30C6\u30E0\u306E\u30EA\u30B9\u30C8\u3002
|
||||
MigrationReportAccessDialog.listItems=- \u30C1\u30A7\u30C3\u30AF\u3059\u308B\u30A2\u30A4\u30C6\u30E0\u306E\u30EA\u30B9\u30C8\u3002
|
||||
@@ -655,7 +655,7 @@ ItemAnalysisReportManager.Warning.message=\u65B0\u3057\u3044\u5206\u6790\u3092\u
|
||||
AnalysisReportAccessDialog.shellTitle=\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u5206\u6790
|
||||
AnalysisReportAccessDialog.generateSuccess=\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u5206\u6790\u304C\u6B63\u3057\u304F\u5B8C\u4E86\u3057\u307E\u3057\u305F\u3002
|
||||
AnalysisReportAccessDialog.completeReportAvailable=\u30EC\u30DD\u30FC\u30C8\u3092\u30C1\u30A7\u30C3\u30AF
|
||||
AnalysisReportAccessDialog.accessBrowse=\u53C2\u7167...
|
||||
AnalysisReportAccessDialog.accessReport=\u3053\u3061\u3089
|
||||
AbstractPomTemplateProjectSettingPage.defaultTabLabel=\u30C7\u30D5\u30A9\u30EB\u30C8
|
||||
AbstractPomTemplateProjectSettingPage.customTabLabel=\u30AB\u30B9\u30BF\u30E0
|
||||
AbstractPomTemplateProjectSettingPage.previewButton=\u30D7\u30EC\u30D3\u30E5\u30FC
|
||||
|
||||
@@ -640,7 +640,7 @@ TalendLibsServerManager.cannotGetUserLibraryServer=\u65E0\u6CD5\u4ECE\u8FDC\u7A0
|
||||
MigrationReportAccessDialog.title=\u5DE5\u7A0B\u9879\u76EE\u8FC1\u79FB
|
||||
MigrationReportAccessDialog.migrateSuccess=\u5DE5\u7A0B\u9879\u76EE\u8FC1\u79FB\u6210\u529F\u3002
|
||||
MigrationReportAccessDialog.completeReportAvailable=\u8BF7\u68C0\u67E5\u62A5\u544A
|
||||
MigrationReportAccessDialog.accessBrowse=\u6D4F\u89C8...
|
||||
MigrationReportAccessDialog.accessReport=\u6B64\u5904
|
||||
MigrationReportAccessDialog.provideAnalysisTool=\u60A8\u73B0\u5728\u53EF\u4EE5\u8FD0\u884C\u5DE5\u7A0B\u5206\u6790\u4EE5\u5206\u6790\u8FC1\u79FB\u7684\u5DE5\u7A0B\u3002\u6B64\u5B9E\u9A8C\u6027\u5DE5\u5177\u5C06\u751F\u6210\u4E00\u4EFD\u5206\u6790\u62A5\u544A\uFF0C\u5176\u4E2D\u5305\u542B:
|
||||
MigrationReportAccessDialog.listOfProblems=- \u9700\u8981\u624B\u52A8\u4FEE\u590D\u7684\u9879\u76EE\u6E05\u5355\u3002
|
||||
MigrationReportAccessDialog.listItems=- \u9700\u8981\u68C0\u67E5\u7684\u9879\u76EE\u6E05\u5355\u3002
|
||||
@@ -655,7 +655,7 @@ ItemAnalysisReportManager.Warning.message=\u73B0\u5728\u65E0\u6CD5\u8FD0\u884C\u
|
||||
AnalysisReportAccessDialog.shellTitle=\u5DE5\u7A0B\u5206\u6790
|
||||
AnalysisReportAccessDialog.generateSuccess=\u5DE5\u7A0B\u5206\u6790\u6210\u529F\u5B8C\u6210\u3002
|
||||
AnalysisReportAccessDialog.completeReportAvailable=\u8BF7\u68C0\u67E5\u62A5\u544A
|
||||
AnalysisReportAccessDialog.accessBrowse=\u6D4F\u89C8...
|
||||
AnalysisReportAccessDialog.accessReport=\u6B64\u5904
|
||||
AbstractPomTemplateProjectSettingPage.defaultTabLabel=\u9ED8\u8BA4
|
||||
AbstractPomTemplateProjectSettingPage.customTabLabel=\u81EA\u5B9A\u4E49
|
||||
AbstractPomTemplateProjectSettingPage.previewButton=\u9884\u89C8
|
||||
|
||||
@@ -211,9 +211,6 @@ public class ModuleAccessHelper {
|
||||
}
|
||||
|
||||
private static boolean hasExtraSettings(EList<ElementParameterType> parameters) {
|
||||
if (parameters == null) {
|
||||
return false;
|
||||
}
|
||||
Map<String, String> paramMap = parameters.stream().filter(p -> p.getName() != null && p.getValue() != null)
|
||||
.collect(Collectors.toMap(ElementParameterType::getName, ElementParameterType::getValue, (a1, a2) -> a1));
|
||||
// Implicit context
|
||||
@@ -246,11 +243,6 @@ public class ModuleAccessHelper {
|
||||
if ("ID".equals(property.getId()) && "Mock_job_for_Guess_schema".equals(property.getLabel())) {
|
||||
return true;
|
||||
}
|
||||
// TDQ-21668: only for fix generate ThresholdViolationAlert job failed
|
||||
if (property.getLabel().startsWith("ThresholdViolationAlert")) { //$NON-NLS-1$
|
||||
return true;
|
||||
}
|
||||
// TDQ-21668~
|
||||
Class<?> clazz = process.getClass();
|
||||
// preview process
|
||||
if (CLASS_PREVIEW_PROCESS.equals(clazz.getName()) || CLASS_PREVIEW_PROCESS.equals(clazz.getSuperclass().getName())) {
|
||||
|
||||
@@ -14,7 +14,6 @@ package org.talend.core.service;
|
||||
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.IService;
|
||||
import org.talend.signon.util.PAT;
|
||||
import org.talend.signon.util.TokenMode;
|
||||
import org.talend.signon.util.listener.LoginEventListener;
|
||||
|
||||
@@ -28,7 +27,7 @@ public interface ICloudSignOnService extends IService {
|
||||
|
||||
boolean hasValidToken() throws Exception;
|
||||
|
||||
String getTokenUser(String url, String token) throws Exception;
|
||||
String getTokenUser(String url, TokenMode token) throws Exception;
|
||||
|
||||
void signonCloud(LoginEventListener listener) throws Exception;
|
||||
|
||||
@@ -54,21 +53,4 @@ public interface ICloudSignOnService extends IService {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Introspect PAT to retrieve the pat_created date and user info
|
||||
* @param pat Personal access token of TMC
|
||||
* @param dataCenter data center of TMC
|
||||
* @return Introspected PAT
|
||||
*/
|
||||
PAT introspectPAT(String pat, String dataCenter) throws Exception;
|
||||
|
||||
/**
|
||||
* Introspect pat and check whether pat is allowed
|
||||
*
|
||||
* @param pat Personal access token
|
||||
* @param tmcUrl tmc url
|
||||
* @return valid or not
|
||||
*/
|
||||
boolean validatePAT(String pat, String tmcUrl) throws Exception;
|
||||
}
|
||||
|
||||
@@ -23,6 +23,8 @@ import org.talend.core.pendo.properties.IPendoDataProperties;
|
||||
*/
|
||||
public interface ICoreTisRuntimeService extends IService {
|
||||
|
||||
String getTmcUser(String url, String token);
|
||||
|
||||
AbstractPendoTrackManager getPendoProjectLoginManager();
|
||||
|
||||
AbstractPendoTrackManager getPendoGenericManager(TrackEvent event, IPendoDataProperties peoperties);
|
||||
|
||||
@@ -149,10 +149,6 @@ public interface IStudioLiteP2Service extends IService {
|
||||
|
||||
void cleanM2(IProgressMonitor monitor);
|
||||
|
||||
boolean isCompatibleUpdate() throws Exception;
|
||||
|
||||
String getCompatibleMessage() throws Exception;
|
||||
|
||||
public static IStudioLiteP2Service get() {
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IStudioLiteP2Service.class)) {
|
||||
return GlobalServiceRegister.getDefault().getService(IStudioLiteP2Service.class);
|
||||
|
||||
@@ -36,7 +36,4 @@ public interface IReferenceProjectProvider {
|
||||
public void initSettings() throws BusinessException, PersistenceException;
|
||||
|
||||
public boolean isHasConfigurationFile();
|
||||
|
||||
void resetReferenceProjectList();
|
||||
|
||||
}
|
||||
|
||||
@@ -251,12 +251,6 @@ public class ReferenceProjectProvider implements IReferenceProjectProvider {
|
||||
public static void removeTacReferenceList(String projectLabel) {
|
||||
tacReferenceMap.remove(projectLabel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resetReferenceProjectList() {
|
||||
referenceProjectList = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class ReferenceProjectConfiguration {
|
||||
|
||||
@@ -22,7 +22,6 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.properties.ProcessItem;
|
||||
@@ -42,7 +41,6 @@ import org.talend.repository.model.IRepositoryNode;
|
||||
*
|
||||
*/
|
||||
public class ExportFileResource {
|
||||
private static Logger LOGGER = Logger.getLogger(ExportFileResource.class);
|
||||
|
||||
private Item item;
|
||||
|
||||
@@ -103,7 +101,7 @@ public class ExportFileResource {
|
||||
String decodeStr = URLDecoder.decode(url.toString(), "UTF-8"); //$NON-NLS-1$
|
||||
url = new URL(decodeStr);
|
||||
} catch (Exception e) {
|
||||
LOGGER.warn(e);
|
||||
e.printStackTrace(); // only for debug.
|
||||
}
|
||||
|
||||
return url;
|
||||
|
||||
@@ -499,7 +499,6 @@ public class RepositoryNodeUtilities {
|
||||
|| curType == ERepositoryObjectType.METADATA_CON_SYNONYM
|
||||
|| curType == ERepositoryObjectType.METADATA_CON_QUERY
|
||||
|| curType == ERepositoryObjectType.METADATA_CONNECTIONS
|
||||
|| curType == ERepositoryObjectType.METADATA_TACOKIT_JDBC
|
||||
|| curType == ERepositoryObjectType.METADATA_FILE_DELIMITED
|
||||
|| curType == ERepositoryObjectType.METADATA_FILE_POSITIONAL
|
||||
|| curType == ERepositoryObjectType.METADATA_FILE_REGEXP
|
||||
@@ -526,13 +525,12 @@ public class RepositoryNodeUtilities {
|
||||
tmpType = ERepositoryObjectType.DOCUMENTATION;
|
||||
}
|
||||
|
||||
if (tmpType != null && (tmpType == rootContextType || rootContextType.isChildTypeOf(tmpType))) {
|
||||
if (tmpType != null && tmpType == rootContextType) {
|
||||
expandParentNode(view, rootNode);
|
||||
}
|
||||
// expand the parent node
|
||||
|
||||
if ((curType == rootContextType || curType.isChildTypeOf(rootContextType))
|
||||
&& isRepositoryFolder(rootNode)) {
|
||||
if (curType == rootContextType && isRepositoryFolder(rootNode)) {
|
||||
if (rootContextType == ERepositoryObjectType.SQLPATTERNS
|
||||
&& !(rootNode.getParent() instanceof IProjectRepositoryNode)) {
|
||||
// sql pattern
|
||||
|
||||
@@ -108,8 +108,6 @@ public class ContextNebulaGridComposite extends AbstractContextTabEditComposite
|
||||
|
||||
private Button manageEnvironmentsButton;
|
||||
|
||||
private Button wrapButton;
|
||||
|
||||
private ContextManagerHelper helper;
|
||||
|
||||
private List<Button> buttonList;
|
||||
@@ -231,11 +229,8 @@ public class ContextNebulaGridComposite extends AbstractContextTabEditComposite
|
||||
}
|
||||
|
||||
private void createButtonsGroup(Composite parentComposite) {
|
||||
boolean isRepositoryContext = (modelManager instanceof ContextComposite)
|
||||
&& ((ContextComposite) modelManager).isRepositoryContext();
|
||||
int columnNum = isRepositoryContext ? 5 : 7;
|
||||
buttonsComp = new Composite(parentComposite, SWT.NULL);
|
||||
buttonsComp.setLayout(GridLayoutFactory.swtDefaults().spacing(10, 0).margins(5, 0).numColumns(columnNum).create());
|
||||
buttonsComp.setLayout(GridLayoutFactory.swtDefaults().spacing(5, 0).margins(5, 0).numColumns(7).create());
|
||||
GridDataFactory.swtDefaults().align(SWT.FILL, SWT.DOWN).grab(true, false).applyTo(buttonsComp);
|
||||
buttonList.clear();
|
||||
addButton = createAddPushButton(buttonsComp);
|
||||
@@ -243,6 +238,8 @@ public class ContextNebulaGridComposite extends AbstractContextTabEditComposite
|
||||
removeButton = createRemovePushButton(buttonsComp);
|
||||
buttonList.add(removeButton);
|
||||
|
||||
boolean isRepositoryContext = (modelManager instanceof ContextComposite)
|
||||
&& ((ContextComposite) modelManager).isRepositoryContext();
|
||||
if (!isRepositoryContext) {// for bug 7393
|
||||
moveUpButton = createMoveUpPushButton(buttonsComp);
|
||||
buttonList.add(moveUpButton);
|
||||
@@ -256,16 +253,14 @@ public class ContextNebulaGridComposite extends AbstractContextTabEditComposite
|
||||
}
|
||||
|
||||
createEnvironmentsGroup(buttonsComp);
|
||||
wrapButton = createWrapButton(buttonsComp);
|
||||
}
|
||||
|
||||
private void createEnvironmentsGroup(Composite parentComposite) {
|
||||
Composite environmentsComp = new Composite(parentComposite, SWT.NULL);
|
||||
GridLayout gridLayout = new GridLayout(2, false);
|
||||
gridLayout.horizontalSpacing = 10;
|
||||
environmentsComp.setLayout(gridLayout);
|
||||
environmentsComp.setLayout(new GridLayout(2, false));
|
||||
GridData contextComboData = new GridData();
|
||||
contextComboData.grabExcessHorizontalSpace = true;
|
||||
contextComboData.horizontalAlignment = GridData.END;
|
||||
environmentsComp.setLayoutData(contextComboData);
|
||||
|
||||
viewEnvironmentsCombo = new CCombo(environmentsComp, SWT.BORDER);
|
||||
@@ -552,35 +547,6 @@ public class ContextNebulaGridComposite extends AbstractContextTabEditComposite
|
||||
return selectContextVariablesPushButton;
|
||||
}
|
||||
|
||||
private Button createWrapButton(final Composite parent) {
|
||||
Button wrapToggleButton = new Button(parent, SWT.TOGGLE);
|
||||
wrapToggleButton.setBackground(parent.getBackground());
|
||||
GridData gridData = new GridData();
|
||||
gridData.grabExcessHorizontalSpace = true;
|
||||
gridData.horizontalAlignment = GridData.END;
|
||||
Image image = ImageProvider.getImage(EImage.WRAP_ICON);
|
||||
IContextManager contextManager = getContextManager();
|
||||
if (contextManager instanceof JobContextManager) {
|
||||
JobContextManager jobContextManager = (JobContextManager) contextManager;
|
||||
wrapToggleButton.setSelection(jobContextManager.isWrapContextText());
|
||||
}
|
||||
wrapToggleButton.setImage(image);
|
||||
wrapToggleButton.addSelectionListener(new SelectionAdapter() {
|
||||
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
IContextManager contextManager = getContextManager();
|
||||
if (contextManager instanceof JobContextManager) {
|
||||
JobContextManager jobContextManager = (JobContextManager) contextManager;
|
||||
jobContextManager.setWrapContextText(wrapToggleButton.getSelection());
|
||||
}
|
||||
refresh();
|
||||
}
|
||||
|
||||
});
|
||||
return wrapToggleButton;
|
||||
}
|
||||
|
||||
private void setButtonEnableState() {
|
||||
boolean enableState = !modelManager.isReadOnly();
|
||||
if (this.addButton != null) {
|
||||
@@ -604,13 +570,6 @@ public class ContextNebulaGridComposite extends AbstractContextTabEditComposite
|
||||
if (contextsCombo != null) {
|
||||
this.contextsCombo.setEnabled(enableState);
|
||||
}
|
||||
if (wrapButton != null) {
|
||||
IContextManager contextManager = getContextManager();
|
||||
if (contextManager instanceof JobContextManager) {
|
||||
JobContextManager jobContextManager = (JobContextManager) contextManager;
|
||||
wrapButton.setSelection(jobContextManager.isWrapContextText());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Object createNewEntry() {
|
||||
|
||||
@@ -20,7 +20,6 @@ import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.eclipse.jface.layout.GridDataFactory;
|
||||
import org.eclipse.jface.viewers.ISelectionChangedListener;
|
||||
import org.eclipse.jface.viewers.ISelectionProvider;
|
||||
@@ -35,7 +34,6 @@ import org.eclipse.nebula.widgets.nattable.config.DefaultComparator;
|
||||
import org.eclipse.nebula.widgets.nattable.config.IConfigRegistry;
|
||||
import org.eclipse.nebula.widgets.nattable.data.IColumnPropertyAccessor;
|
||||
import org.eclipse.nebula.widgets.nattable.data.IDataProvider;
|
||||
import org.eclipse.nebula.widgets.nattable.edit.event.DataUpdateEvent;
|
||||
import org.eclipse.nebula.widgets.nattable.extension.glazedlists.DetailGlazedListsEventLayer;
|
||||
import org.eclipse.nebula.widgets.nattable.extension.glazedlists.GlazedListsDataProvider;
|
||||
import org.eclipse.nebula.widgets.nattable.extension.glazedlists.GlazedListsSortModel;
|
||||
@@ -58,18 +56,10 @@ import org.eclipse.nebula.widgets.nattable.group.ColumnGroupModel.ColumnGroup;
|
||||
import org.eclipse.nebula.widgets.nattable.group.ColumnGroupReorderLayer;
|
||||
import org.eclipse.nebula.widgets.nattable.hideshow.ColumnHideShowLayer;
|
||||
import org.eclipse.nebula.widgets.nattable.hideshow.RowHideShowLayer;
|
||||
import org.eclipse.nebula.widgets.nattable.layer.AbstractIndexLayerTransform;
|
||||
import org.eclipse.nebula.widgets.nattable.layer.AbstractLayerTransform;
|
||||
import org.eclipse.nebula.widgets.nattable.layer.DataLayer;
|
||||
import org.eclipse.nebula.widgets.nattable.layer.ILayer;
|
||||
import org.eclipse.nebula.widgets.nattable.layer.ILayerListener;
|
||||
import org.eclipse.nebula.widgets.nattable.layer.cell.ColumnOverrideLabelAccumulator;
|
||||
import org.eclipse.nebula.widgets.nattable.layer.cell.ILayerCell;
|
||||
import org.eclipse.nebula.widgets.nattable.layer.config.DefaultColumnHeaderStyleConfiguration;
|
||||
import org.eclipse.nebula.widgets.nattable.layer.event.ILayerEvent;
|
||||
import org.eclipse.nebula.widgets.nattable.layer.event.RowDeleteEvent;
|
||||
import org.eclipse.nebula.widgets.nattable.layer.event.RowInsertEvent;
|
||||
import org.eclipse.nebula.widgets.nattable.layer.event.RowStructuralChangeEvent;
|
||||
import org.eclipse.nebula.widgets.nattable.painter.cell.TextPainter;
|
||||
import org.eclipse.nebula.widgets.nattable.painter.layer.NatGridLayerPainter;
|
||||
import org.eclipse.nebula.widgets.nattable.reorder.ColumnReorderLayer;
|
||||
@@ -102,9 +92,7 @@ import org.eclipse.swt.widgets.Event;
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.commons.ui.runtime.ColorConstants;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.model.context.JobContextManager;
|
||||
import org.talend.core.model.process.IContext;
|
||||
import org.talend.core.model.process.IContextManager;
|
||||
import org.talend.core.model.process.IContextParameter;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
import org.talend.core.model.repository.IRepositoryViewObject;
|
||||
@@ -161,10 +149,6 @@ public class ContextTreeTable {
|
||||
|
||||
private final static int fixedTypeWidth = 100;
|
||||
|
||||
private final static int minDefultHeight = 20;
|
||||
|
||||
private final static int maxDefaultWidth = 400;
|
||||
|
||||
public ContextTreeTable(IContextModelManager manager) {
|
||||
this.manager = manager;
|
||||
}
|
||||
@@ -437,101 +421,6 @@ public class ContextTreeTable {
|
||||
currentNatTabSel = (IStructuredSelection) event.getSelection();
|
||||
}
|
||||
});
|
||||
|
||||
this.natTable.addLayerListener(new ILayerListener() {
|
||||
|
||||
@Override
|
||||
public void handleLayerEvent(ILayerEvent event) {
|
||||
// DataUpdateEvent->Data change, RowInsertEvent->node expand, RowDeleteEvent->node collapse
|
||||
if (event instanceof DataUpdateEvent) {
|
||||
// data changed then execute here no need compare value
|
||||
DataUpdateEvent dataEvent = (DataUpdateEvent) event;
|
||||
ILayer layer = dataEvent.getLayer();
|
||||
DataLayer dataLayer = getDataLayer(layer);
|
||||
if (dataLayer == null) {
|
||||
return;
|
||||
}
|
||||
int rowPosition = dataEvent.getRowPosition();
|
||||
int columnPosition = dataEvent.getColumnPosition();
|
||||
if (layer instanceof GridLayer) {
|
||||
GridLayer gridLayer = (GridLayer) layer;
|
||||
rowPosition = rowPosition - gridLayer.getColumnHeaderLayer().getRowCount();
|
||||
columnPosition = columnPosition - gridLayer.getRowHeaderLayer().getColumnCount();
|
||||
}
|
||||
String text = dataEvent.getNewValue() == null ? "" : dataEvent.getNewValue().toString();
|
||||
GC gc = new GCFactory(natTable).createGC();
|
||||
Point point = gc.textExtent(text, SWT.DRAW_MNEMONIC);
|
||||
int textLength = point.x;
|
||||
int currentColumnWidth = layer.getColumnWidthByPosition(columnPosition);
|
||||
if (textLength > layer.getColumnWidthByPosition(columnPosition)) {
|
||||
if (textLength > maxDefaultWidth) {
|
||||
int columnWidth = Math.max(currentColumnWidth, maxDefaultWidth);
|
||||
dataLayer.setColumnWidthByPosition(columnPosition, columnWidth);
|
||||
} else {
|
||||
int columnWidth = getColumWidth(gc, dataLayer, columnPosition);
|
||||
dataLayer.setColumnWidthByPosition(columnPosition, columnWidth);
|
||||
}
|
||||
}
|
||||
int promptColPos = dataLayer.getColumnPositionByIndex(3);
|
||||
IContextManager contextManager = manager.getContextManager();
|
||||
if (contextManager instanceof JobContextManager) {
|
||||
JobContextManager jobContextManager = (JobContextManager) contextManager;
|
||||
if (jobContextManager.isWrapContextText()) {
|
||||
int rowHeight = getRowHeight(gc, dataLayer, rowPosition, promptColPos);
|
||||
dataLayer.setRowHeightByPosition(rowPosition, rowHeight);
|
||||
}
|
||||
}
|
||||
gc.dispose();
|
||||
} else if (event instanceof RowInsertEvent || event instanceof RowDeleteEvent) {
|
||||
RowStructuralChangeEvent changeEvent = (RowStructuralChangeEvent) event;
|
||||
ILayer layer = changeEvent.getLayer();
|
||||
DataLayer dataLayer = getDataLayer(layer);
|
||||
List<Integer> checkPos = new ArrayList<Integer>();
|
||||
checkPos.add(3);
|
||||
adjustCellWidthHeight(dataLayer, checkPos);
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private DataLayer getDataLayer(ILayer layer) {
|
||||
DataLayer dataLayer = null;
|
||||
if (layer instanceof GridLayer) {
|
||||
GridLayer gridLayer = (GridLayer) layer;
|
||||
ILayer bodyLayer = gridLayer.getBodyLayer();
|
||||
if (bodyLayer instanceof AbstractLayerTransform) {
|
||||
AbstractLayerTransform childLayer = (AbstractLayerTransform) bodyLayer;
|
||||
dataLayer = findDataLayerByUnderlyingLayer(childLayer);
|
||||
}
|
||||
} else if (layer instanceof DataLayer) {
|
||||
dataLayer = (DataLayer) layer;
|
||||
} else if (layer instanceof AbstractLayerTransform || layer instanceof AbstractIndexLayerTransform) {
|
||||
dataLayer = findDataLayerByUnderlyingLayer(layer);
|
||||
}
|
||||
return dataLayer;
|
||||
}
|
||||
|
||||
private DataLayer findDataLayerByUnderlyingLayer(ILayer layer) {
|
||||
// only 1 underlyingLayer set on AbstractLayerTransform / AbstractIndexLayerTransform
|
||||
ILayer underlyingLayer = null;
|
||||
if (layer instanceof AbstractLayerTransform) {
|
||||
AbstractLayerTransform layerTransform = (AbstractLayerTransform) layer;
|
||||
underlyingLayer = layerTransform.getUnderlyingLayerByPosition(0, 0);
|
||||
} else if (layer instanceof AbstractIndexLayerTransform) {
|
||||
AbstractIndexLayerTransform layerTransform = (AbstractIndexLayerTransform) layer;
|
||||
underlyingLayer = layerTransform.getUnderlyingLayerByPosition(0, 0);
|
||||
}
|
||||
if (underlyingLayer instanceof DataLayer) {
|
||||
return (DataLayer) underlyingLayer;
|
||||
} else if (underlyingLayer instanceof AbstractLayerTransform) {
|
||||
AbstractLayerTransform childLayer = (AbstractLayerTransform) underlyingLayer;
|
||||
return findDataLayerByUnderlyingLayer(childLayer);
|
||||
} else if (underlyingLayer instanceof AbstractIndexLayerTransform) {
|
||||
AbstractIndexLayerTransform childLayer = (AbstractIndexLayerTransform) underlyingLayer;
|
||||
return findDataLayerByUnderlyingLayer(childLayer);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private List<Integer> getAllCheckPosBehaviour(IContextModelManager manager, ColumnGroupModel contextGroupModel) {
|
||||
@@ -559,108 +448,58 @@ public class ContextTreeTable {
|
||||
dataLayer.setColumnWidthByPosition(i, averageWidth);
|
||||
}
|
||||
} else {
|
||||
adjustCellWidthHeight(dataLayer, checkColumnsPos);
|
||||
}
|
||||
}
|
||||
int typeColumnPos = dataLayer.getColumnPositionByIndex(1);
|
||||
|
||||
private void adjustCellWidthHeight(DataLayer dataLayer, List<Integer> checkColumnsPos) {
|
||||
int typeColumnPos = dataLayer.getColumnPositionByIndex(1);
|
||||
GC gc = new GCFactory(natTable).createGC();
|
||||
for (int i = 0; i < dataLayer.getColumnCount(); i++) {
|
||||
boolean findCheck = false;
|
||||
boolean findType = false;
|
||||
if (typeColumnPos == i) {
|
||||
findType = true;
|
||||
dataLayer.setColumnWidthByPosition(i, fixedTypeWidth);
|
||||
}
|
||||
for (int checkPos : checkColumnsPos) {
|
||||
if (checkPos == i) {
|
||||
findCheck = true;
|
||||
dataLayer.setColumnWidthByPosition(i, fixedCheckBoxWidth);
|
||||
int leftWidth = maxWidth - fixedTypeWidth - fixedCheckBoxWidth * checkColumnsPos.size() - cornerWidth * 2;
|
||||
|
||||
int currentColumnsCount = dataColumnsCount - checkColumnsPos.size() - 1;
|
||||
int averageWidth = leftWidth / currentColumnsCount;
|
||||
for (int i = 0; i < dataLayer.getColumnCount(); i++) {
|
||||
boolean findHide = false;
|
||||
boolean findCheck = false;
|
||||
boolean findType = false;
|
||||
if (typeColumnPos == i) {
|
||||
findType = true;
|
||||
dataLayer.setColumnWidthByPosition(i, fixedTypeWidth);
|
||||
}
|
||||
}
|
||||
if (!findCheck && !findType) {
|
||||
int colW = getColumWidth(gc, dataLayer, i);
|
||||
dataLayer.setColumnWidthByPosition(i, colW);
|
||||
}
|
||||
}
|
||||
// setColumnWidthByPosition final scaled by DPI, set height according final width
|
||||
int promptColPos = dataLayer.getColumnPositionByIndex(3);
|
||||
IContextManager contextManager = manager.getContextManager();
|
||||
if (contextManager instanceof JobContextManager) {
|
||||
JobContextManager jobContextManager = (JobContextManager) contextManager;
|
||||
if (jobContextManager.isWrapContextText()) {
|
||||
for (int i = 0; i < dataLayer.getPreferredRowCount(); i++) {
|
||||
int rowHeight = getRowHeight(gc, dataLayer, i, promptColPos);
|
||||
dataLayer.setRowHeightByPosition(i, rowHeight);
|
||||
for (int checkPos : checkColumnsPos) {
|
||||
if (checkPos == i) {
|
||||
findCheck = true;
|
||||
dataLayer.setColumnWidthByPosition(i, fixedCheckBoxWidth);
|
||||
}
|
||||
}
|
||||
if (!findHide && !findCheck && !findType) {
|
||||
int colW = getColumWidth(dataLayer, i, averageWidth);
|
||||
dataLayer.setColumnWidthByPosition(i, colW);
|
||||
}
|
||||
}
|
||||
}
|
||||
gc.dispose();
|
||||
}
|
||||
|
||||
private int getColumWidth(GC gc, DataLayer dataLayer, int colPos) {
|
||||
private int getColumWidth(DataLayer dataLayer, int colPos, int avgWidth) {
|
||||
int colWidth = fixedTypeWidth;
|
||||
GC gc = new GCFactory(natTable).createGC();
|
||||
int max = 0;
|
||||
String text = "";
|
||||
for (int i = 0; i < dataLayer.getPreferredRowCount(); i++) {
|
||||
Object dataValueByPosition = dataLayer.getDataValueByPosition(colPos, i);
|
||||
if (dataValueByPosition == null || StringUtils.isBlank(dataValueByPosition.toString())) {
|
||||
if (dataValueByPosition == null) {
|
||||
continue;
|
||||
}
|
||||
text = dataValueByPosition.toString();
|
||||
Point size = gc.textExtent(text, SWT.DRAW_MNEMONIC);
|
||||
int textWidth = size.x;
|
||||
if (textWidth > max) {
|
||||
max = textWidth;
|
||||
int temp = size.x;
|
||||
if (temp > max) {
|
||||
max = temp;
|
||||
}
|
||||
}
|
||||
gc.dispose();
|
||||
if (max > colWidth) {
|
||||
max = (int) (max - text.getBytes().length * 1.5);
|
||||
if (max > maxDefaultWidth) {
|
||||
max = maxDefaultWidth;
|
||||
}
|
||||
}
|
||||
return colWidth > max ? colWidth : max;
|
||||
}
|
||||
|
||||
private int getRowHeight(GC gc, DataLayer dataLayer, int rowPos, int promptColPos) {
|
||||
int maxHeight = minDefultHeight;
|
||||
for (int j = 0; j < dataLayer.getColumnCount(); j++) {
|
||||
// only check value column height
|
||||
if (j <= promptColPos) {
|
||||
continue;
|
||||
}
|
||||
Object dataValueByPosition = dataLayer.getDataValueByPosition(j, rowPos);
|
||||
if (dataValueByPosition == null || StringUtils.isBlank(dataValueByPosition.toString())) {
|
||||
continue;
|
||||
}
|
||||
String text = dataValueByPosition.toString();
|
||||
Point size = gc.textExtent(text, SWT.DRAW_MNEMONIC);
|
||||
int textWidth = size.x;
|
||||
int textHeight = size.y;
|
||||
String[] lines = text.split(TextPainter.NEW_LINE_REGEX);
|
||||
int columnWidth = dataLayer.getColumnWidthByPosition(j);
|
||||
if (textWidth >= columnWidth || lines.length > 1) {
|
||||
int heightCount = 0;
|
||||
for (String line : lines) {
|
||||
int lineWidth = gc.textExtent(line).x;
|
||||
if (lineWidth < columnWidth) {
|
||||
heightCount++;
|
||||
} else {
|
||||
heightCount += lineWidth / columnWidth;
|
||||
heightCount += lineWidth % columnWidth == 0 ? 0 : 1;
|
||||
}
|
||||
}
|
||||
int cellheight = textHeight * heightCount;
|
||||
maxHeight = Math.max(maxHeight, dataLayer.downScaleRowHeight(cellheight));
|
||||
} else {
|
||||
maxHeight = Math.max(maxHeight, textHeight);
|
||||
}
|
||||
}
|
||||
return maxHeight;
|
||||
}
|
||||
|
||||
private void addCustomSelectionBehaviour(SelectionLayer layer) {
|
||||
// need control the selection style when select the rows.
|
||||
DefaultSelectionStyleConfiguration selectStyleConfig = new DefaultSelectionStyleConfiguration();
|
||||
|
||||
@@ -1,84 +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.core.ui.context;
|
||||
|
||||
import org.eclipse.jface.dialogs.Dialog;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.ModifyEvent;
|
||||
import org.eclipse.swt.events.ModifyListener;
|
||||
import org.eclipse.swt.layout.GridData;
|
||||
import org.eclipse.swt.layout.GridLayout;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Control;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.swt.widgets.Text;
|
||||
import org.talend.commons.ui.runtime.ITalendThemeService;
|
||||
import org.talend.commons.ui.swt.colorstyledtext.ColorStyledText;
|
||||
|
||||
/**
|
||||
* DOC jding class global comment. Detailled comment
|
||||
*/
|
||||
public class StringTextDialog extends Dialog {
|
||||
|
||||
private String content;
|
||||
|
||||
private Text text;
|
||||
|
||||
public StringTextDialog(Shell parentShell) {
|
||||
super(parentShell);
|
||||
}
|
||||
|
||||
public StringTextDialog(Shell parentShell, String content) {
|
||||
super(parentShell);
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isResizable() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureShell(Shell shell) {
|
||||
super.configureShell(shell);
|
||||
shell.setText("Enter the value");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Control createDialogArea(Composite parent) {
|
||||
Composite composite = new Composite(parent, SWT.NONE);
|
||||
GridData gd = new GridData(GridData.FILL_BOTH);
|
||||
gd.widthHint = 640;
|
||||
gd.heightHint = 260;
|
||||
composite.setLayoutData(gd);
|
||||
composite.setLayout(new GridLayout());
|
||||
text = new Text(composite, SWT.WRAP | SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.LEFT);
|
||||
text.setForeground(ITalendThemeService.getColor(ColorStyledText.PREFERENCE_COLOR_FOREGROUND).orElse(null));
|
||||
text.setBackground(ITalendThemeService.getColor(ColorStyledText.PREFERENCE_COLOR_BACKGROUND).orElse(null));
|
||||
text.setLayoutData(new GridData(GridData.FILL_BOTH));
|
||||
text.setText(content);
|
||||
text.addModifyListener(new ModifyListener() {
|
||||
|
||||
@Override
|
||||
public void modifyText(ModifyEvent e) {
|
||||
content = text.getText();
|
||||
}
|
||||
});
|
||||
return composite;
|
||||
}
|
||||
|
||||
public String getTextContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -37,9 +37,7 @@ import org.eclipse.nebula.widgets.nattable.painter.cell.ImagePainter;
|
||||
import org.eclipse.nebula.widgets.nattable.style.CellStyleAttributes;
|
||||
import org.eclipse.nebula.widgets.nattable.style.CellStyleUtil;
|
||||
import org.eclipse.nebula.widgets.nattable.style.DisplayMode;
|
||||
import org.eclipse.nebula.widgets.nattable.style.HorizontalAlignmentEnum;
|
||||
import org.eclipse.nebula.widgets.nattable.style.Style;
|
||||
import org.eclipse.nebula.widgets.nattable.style.VerticalAlignmentEnum;
|
||||
import org.eclipse.nebula.widgets.nattable.ui.util.CellEdgeEnum;
|
||||
import org.eclipse.nebula.widgets.nattable.util.GUIHelper;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
@@ -130,11 +128,7 @@ public class ContextNatTableConfiguration extends AbstractRegistryConfiguration
|
||||
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyleDefault, DisplayMode.NORMAL,
|
||||
ContextTableConstants.COLUMN_CHECK_PROPERTY);
|
||||
|
||||
Style valueCellStyleDefault = new Style();
|
||||
valueCellStyleDefault.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR, ColorConstants.getTableBackgroundColor());
|
||||
valueCellStyleDefault.setAttributeValue(CellStyleAttributes.HORIZONTAL_ALIGNMENT, HorizontalAlignmentEnum.LEFT);
|
||||
valueCellStyleDefault.setAttributeValue(CellStyleAttributes.VERTICAL_ALIGNMENT, VerticalAlignmentEnum.TOP);
|
||||
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, valueCellStyleDefault, DisplayMode.NORMAL,
|
||||
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyleDefault, DisplayMode.NORMAL,
|
||||
ContextTableConstants.COLUMN_CONTEXT_VALUE);
|
||||
|
||||
Style cellStyleSelect = new Style();
|
||||
@@ -152,10 +146,6 @@ public class ContextNatTableConfiguration extends AbstractRegistryConfiguration
|
||||
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyleSelect, DisplayMode.SELECT,
|
||||
ContextTableConstants.COLUMN_CHECK_PROPERTY);
|
||||
|
||||
Style valueCellStyleSelect = new Style();
|
||||
valueCellStyleSelect.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR, GUIHelper.COLOR_TITLE_INACTIVE_BACKGROUND);
|
||||
valueCellStyleSelect.setAttributeValue(CellStyleAttributes.FONT, GUIHelper.DEFAULT_FONT);
|
||||
valueCellStyleSelect.setAttributeValue(CellStyleAttributes.HORIZONTAL_ALIGNMENT, HorizontalAlignmentEnum.LEFT);
|
||||
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyleSelect, DisplayMode.SELECT,
|
||||
ContextTableConstants.COLUMN_CONTEXT_VALUE);
|
||||
}
|
||||
@@ -327,13 +317,6 @@ public class ContextNatTableConfiguration extends AbstractRegistryConfiguration
|
||||
ProxyDynamicCellEditor cutomCellEditor = new ProxyDynamicCellEditor(dataProvider, manager, modelManager);
|
||||
configRegistry.registerConfigAttribute(EditConfigAttributes.CELL_EDITOR, cutomCellEditor, DisplayMode.EDIT,
|
||||
ContextTableConstants.COLUMN_CONTEXT_VALUE);
|
||||
ContextAutoResizeTextPainter customPainter = new ContextAutoResizeTextPainter(true, false, false);
|
||||
customPainter.setWordWrapping(true);
|
||||
ContextNatTableBackGroudPainter backGroudPainter = new ContextNatTableBackGroudPainter(customPainter, dataProvider);
|
||||
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_PAINTER, backGroudPainter, DisplayMode.NORMAL,
|
||||
ContextTableConstants.COLUMN_CONTEXT_VALUE);
|
||||
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_PAINTER, backGroudPainter, DisplayMode.SELECT,
|
||||
ContextTableConstants.COLUMN_CONTEXT_VALUE);
|
||||
}
|
||||
|
||||
private void registerColumnFiveTextEditor(IConfigRegistry configRegistry) {
|
||||
|
||||
@@ -15,7 +15,6 @@ package org.talend.core.ui.context.nattableTree;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.eclipse.nebula.widgets.nattable.style.CellStyleAttributes;
|
||||
import org.eclipse.nebula.widgets.nattable.style.HorizontalAlignmentEnum;
|
||||
import org.eclipse.nebula.widgets.nattable.style.IStyle;
|
||||
@@ -110,12 +109,9 @@ public class ContextValuesNatText extends Composite {
|
||||
if (NatTableCellEditorFactory.isPassword(realPara.getType())) {
|
||||
widgetStyle = SWT.PASSWORD | HorizontalAlignmentEnum.getSWTStyle(cellStyle);
|
||||
}
|
||||
if (NatTableCellEditorFactory.isResource(realPara.getType()) || NatTableCellEditorFactory.isList(realPara.getType())) {
|
||||
if (NatTableCellEditorFactory.isResource(realPara.getType())) {
|
||||
widgetStyle = SWT.READ_ONLY | HorizontalAlignmentEnum.getSWTStyle(cellStyle);
|
||||
}
|
||||
if (NatTableCellEditorFactory.isString(realPara.getType())) {
|
||||
widgetStyle = widgetStyle | SWT.WRAP | SWT.MULTI | SWT.V_SCROLL;
|
||||
}
|
||||
text = new Text(this, widgetStyle);
|
||||
text.setBackground(cellStyle.getAttributeValue(CellStyleAttributes.BACKGROUND_COLOR));
|
||||
text.setForeground(cellStyle.getAttributeValue(CellStyleAttributes.FOREGROUND_COLOR));
|
||||
@@ -239,7 +235,6 @@ public class ContextValuesNatText extends Composite {
|
||||
*/
|
||||
protected String getTransformedSelection(boolean focusOnText) {
|
||||
Object result = null;
|
||||
validateValue();
|
||||
result = cellFactory.openCustomCellEditor(realPara, getShell());
|
||||
String finalResult = "";
|
||||
if (result == null || result.equals("")) {
|
||||
@@ -256,14 +251,6 @@ public class ContextValuesNatText extends Composite {
|
||||
return finalResult;
|
||||
}
|
||||
|
||||
private void validateValue() {
|
||||
// possible value modified manually
|
||||
// notify focuslost to commit value might execute after dialog open in some os
|
||||
if (NatTableCellEditorFactory.isString(realPara.getType()) && !StringUtils.equals(realPara.getValue(), text.getText())) {
|
||||
realPara.setValue(text.getText());
|
||||
}
|
||||
}
|
||||
|
||||
protected String getTransformedTextForDialog(boolean focusOnText) {
|
||||
String result = "";
|
||||
result = getTransformedSelection(focusOnText);
|
||||
|
||||
@@ -25,8 +25,6 @@ import org.eclipse.nebula.widgets.nattable.style.Style;
|
||||
import org.eclipse.nebula.widgets.nattable.util.GUIHelper;
|
||||
import org.eclipse.nebula.widgets.nattable.widget.EditModeEnum;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.FocusAdapter;
|
||||
import org.eclipse.swt.events.FocusEvent;
|
||||
import org.eclipse.swt.events.KeyAdapter;
|
||||
import org.eclipse.swt.events.KeyEvent;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
@@ -80,33 +78,6 @@ public class CustomTextCellEditor extends AbstractCellEditor {
|
||||
this.cellStyle = cellStyle;
|
||||
this.commitOnUpDown = commitOnUpDown;
|
||||
this.moveSelectionOnEnter = moveSelectionOnEnter;
|
||||
this.focusListener = new FocusAdapter() {
|
||||
|
||||
@Override
|
||||
public void focusLost(FocusEvent e) {
|
||||
// overwrite org.eclipse.nebula.widgets.nattable.edit.editor.AbstractCellEditor.InlineFocusListener
|
||||
// set closeAfterCommit to false
|
||||
if (!commit(MoveDirectionEnum.NONE, false)) {
|
||||
if (!e.widget.isDisposed() && e.widget instanceof Control) {
|
||||
((Control) e.widget).forceFocus();
|
||||
}
|
||||
} else {
|
||||
if (!CustomTextCellEditor.this.parent.isDisposed()) {
|
||||
CustomTextCellEditor.this.parent.forceFocus();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addEditorControlListeners() {
|
||||
Control editorControl = getEditorControl();
|
||||
if (editorControl != null && !editorControl.isDisposed() && this.editMode == EditModeEnum.INLINE) {
|
||||
editorControl.addFocusListener(this.focusListener);
|
||||
editorControl.addTraverseListener(this.traverseListener);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -27,7 +27,6 @@ import org.talend.core.model.metadata.types.JavaTypesManager;
|
||||
import org.talend.core.model.process.IContextParameter;
|
||||
import org.talend.core.service.IResourcesDependenciesService;
|
||||
import org.talend.core.ui.context.MultiStringSelectionDialog;
|
||||
import org.talend.core.ui.context.StringTextDialog;
|
||||
import org.talend.core.utils.TalendQuoteUtils;
|
||||
|
||||
/**
|
||||
@@ -45,7 +44,7 @@ public class NatTableCellEditorFactory {
|
||||
String currentType = para.getType();
|
||||
if (currentType != null) {
|
||||
if (isFile(currentType) || isDate(currentType) || isDirectory(currentType) || isList(currentType)
|
||||
|| isResource(currentType) || isString(currentType)) {
|
||||
|| isResource(currentType)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -68,8 +67,6 @@ public class NatTableCellEditorFactory {
|
||||
defalutDataValue = para.getDisplayValue();
|
||||
} else if (isResource(currentType)) {
|
||||
transformResult = openResourcesDialogForCellEditor(parentShell, para);
|
||||
} else if (isString(currentType)) {
|
||||
transformResult = openStringDialogFoeCellEditor(parentShell, para);
|
||||
}
|
||||
}
|
||||
return transformResult;
|
||||
@@ -143,15 +140,6 @@ public class NatTableCellEditorFactory {
|
||||
return ContextNatTableUtils.getSpecialTypeDisplayValue(JavaTypesManager.RESOURCE.getId(), value);
|
||||
}
|
||||
|
||||
private String openStringDialogFoeCellEditor(Shell parentShell, IContextParameter para) {
|
||||
StringTextDialog stringTextDialog = new StringTextDialog(parentShell, para.getValue());
|
||||
int open = stringTextDialog.open();
|
||||
if (open == Dialog.OK) {
|
||||
return stringTextDialog.getTextContent();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public static String getAddQuoteString(String path) {
|
||||
ECodeLanguage codeLanguage = LanguageManager.getCurrentLanguage();
|
||||
if (codeLanguage == ECodeLanguage.PERL) {
|
||||
@@ -196,10 +184,6 @@ public class NatTableCellEditorFactory {
|
||||
return MetadataToolHelper.isResource(value);
|
||||
}
|
||||
|
||||
public static boolean isString(final String value) {
|
||||
return JavaTypesManager.STRING.getId().equals(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* For the different value between display value and real value, due to nattable model comes from context, if set
|
||||
* new context parameter value in this factory, then the UpdateDataCommandHandler of nattable will treat this as no
|
||||
|
||||
@@ -146,13 +146,4 @@ public class ProxyDynamicCellEditor extends AbstractCellEditor {
|
||||
return super.commit(direction, closeAfterCommit, skipValidation);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addEditorControlListeners() {
|
||||
if (dynamicEditor != null) {
|
||||
dynamicEditor.addEditorControlListeners();
|
||||
} else {
|
||||
super.addEditorControlListeners();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -16,7 +16,6 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.eclipse.core.runtime.Platform;
|
||||
import org.eclipse.jface.viewers.TextCellEditor;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.custom.CCombo;
|
||||
@@ -342,11 +341,7 @@ public abstract class AbstractMetadataTableEditorView<B> extends AbstractDataTab
|
||||
column.setBeanPropertyAccessors(getRowNumAccessor());
|
||||
column.setWeight(5);
|
||||
column.setModifiable(false);
|
||||
if (Platform.OS_MACOSX.equals(Platform.getOS())) {
|
||||
column.setMinimumWidth(10);
|
||||
} else {
|
||||
column.setMinimumWidth(30);
|
||||
}
|
||||
column.setMinimumWidth(10);
|
||||
column.setSortable(true);
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,6 @@ import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.exception.LoginException;
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.commons.ui.nofitication.ArrangedNotificationPopup;
|
||||
import org.talend.commons.utils.generation.JavaUtils;
|
||||
import org.talend.core.CorePlugin;
|
||||
import org.talend.core.prefs.ITalendCorePrefConstants;
|
||||
import org.talend.core.repository.model.ProxyRepositoryFactory;
|
||||
@@ -80,7 +79,7 @@ public class Java17NotificationPopup extends ArrangedNotificationPopup {
|
||||
}
|
||||
|
||||
public static boolean show() {
|
||||
return !showOnce() && JavaUtils.isJava17() && (!ModuleAccessHelper.allowJavaInternalAcess(null) || !checkInterpreter());
|
||||
return !showOnce() && isJava17() && (!ModuleAccessHelper.allowJavaInternalAcess(null) || !checkInterpreter());
|
||||
}
|
||||
|
||||
private static boolean showOnce() {
|
||||
@@ -133,4 +132,17 @@ public class Java17NotificationPopup extends ArrangedNotificationPopup {
|
||||
return false;
|
||||
}
|
||||
|
||||
private static boolean isJava17() {
|
||||
boolean isJava17 = false;
|
||||
String javaVersion = System.getProperty("java.version");
|
||||
String[] arr = javaVersion.split("[^\\d]+");
|
||||
try {
|
||||
isJava17 = Integer.parseInt(arr[0]) >= 17;
|
||||
} catch (NumberFormatException e) {
|
||||
ExceptionHandler.process(e);
|
||||
isJava17 = false;
|
||||
}
|
||||
return isJava17;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -30,8 +30,6 @@ public interface IGitUIProviderService extends IService {
|
||||
public String[] changeCredentials(Shell parent, Serializable uriIsh, String initUser, boolean canStoreCredentials);
|
||||
|
||||
boolean checkPendingChanges();
|
||||
|
||||
boolean checkUncommittedFiles();
|
||||
|
||||
public void openPushFailedDialog(Object pushResult);
|
||||
|
||||
|
||||
@@ -15,11 +15,8 @@ package org.talend.core.ui.token;
|
||||
import org.apache.commons.codec.digest.DigestUtils;
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
import org.talend.commons.utils.VersionUtils;
|
||||
import org.talend.commons.utils.generation.JavaUtils;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.prefs.ITalendCorePrefConstants;
|
||||
import org.talend.core.runtime.CoreRuntimePlugin;
|
||||
import org.talend.core.runtime.util.SharedStudioUtils;
|
||||
import org.talend.core.ui.CoreUIPlugin;
|
||||
import org.talend.core.ui.branding.IBrandingService;
|
||||
import org.talend.daikon.token.TokenGenerator;
|
||||
@@ -44,10 +41,6 @@ public class DefaultTokenCollector extends AbstractTokenCollector {
|
||||
|
||||
private static final TokenKey OS = new TokenKey("os"); //$NON-NLS-1$
|
||||
|
||||
private static final TokenKey SHARE_MODE = new TokenKey("share.mode"); //$NON-NLS-1$
|
||||
|
||||
private static final TokenKey ENABLED_JAVA17_COMPATIBILITY = new TokenKey("enabled.java17.compatibility"); //$NON-NLS-1$
|
||||
|
||||
public static final String COLLECTOR_SYNC_NB = "COLLECTOR_SYNC_NB"; //$NON-NLS-1$
|
||||
|
||||
public DefaultTokenCollector() {
|
||||
@@ -77,7 +70,7 @@ public class DefaultTokenCollector extends AbstractTokenCollector {
|
||||
|
||||
// typeStudio
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IBrandingService.class)) {
|
||||
IBrandingService brandingService = GlobalServiceRegister.getDefault().getService(
|
||||
IBrandingService brandingService = (IBrandingService) GlobalServiceRegister.getDefault().getService(
|
||||
IBrandingService.class);
|
||||
tokenStudioObject.put(TYPE_STUDIO.getKey(), brandingService.getAcronym());
|
||||
// tokenStudioObject.put(TYPE_STUDIO.getKey(), brandingService.getShortProductName());
|
||||
@@ -99,11 +92,6 @@ public class DefaultTokenCollector extends AbstractTokenCollector {
|
||||
tokenStudioObject.put(STOP_COLLECTOR.getKey(), "0"); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
// Share mode
|
||||
tokenStudioObject.put(SHARE_MODE.getKey(), SharedStudioUtils.isSharedStudioMode());
|
||||
// Enable Java 17 compatibility
|
||||
tokenStudioObject.put(ENABLED_JAVA17_COMPATIBILITY.getKey(), CoreRuntimePlugin.getInstance().getProjectPreferenceManager()
|
||||
.getPreferenceStore().getBoolean(JavaUtils.ALLOW_JAVA_INTERNAL_ACCESS));
|
||||
return tokenStudioObject;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,6 +50,7 @@ public class DisableLanguageActions implements IStartup {
|
||||
}
|
||||
|
||||
ECodeLanguage lan = LanguageManager.getCurrentLanguage();
|
||||
|
||||
switch (lan) {
|
||||
case JAVA:
|
||||
ids = Arrays.asList(new String[] { "org.talend.help.perl.OpenPerlHelpAction" }); //$NON-NLS-1$
|
||||
|
||||
@@ -1085,7 +1085,7 @@ public class ProcessorUtilities {
|
||||
if (childBuildType == null) {
|
||||
Property parentProperty = parentJobInfo.getProcessor().getProperty();
|
||||
String parentBuildType = (String)parentProperty.getAdditionalProperties().get(TalendProcessArgumentConstant.ARG_BUILD_TYPE);
|
||||
if (parentBuildType!= null && parentBuildType.contains("ROUTE")) {
|
||||
if ("ROUTE".equalsIgnoreCase(parentBuildType)) {
|
||||
childProperty.getAdditionalProperties().put(TalendProcessArgumentConstant.ARG_BUILD_TYPE, "OSGI");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -333,7 +333,7 @@ _UI_InformationsetModelWizard_description = Cr\u00E9er un mod\u00E8le Informatio
|
||||
|
||||
_UI_InformationsetEditor_label = \u00C9diteur de mod\u00E8le Informationset
|
||||
|
||||
_UI_InformationsetEditorFilenameDefaultBase = Mon
|
||||
_UI_InformationsetEditorFilenameDefaultBase = INVISIBLE dans l'interface
|
||||
_UI_InformationsetEditorFilenameExtension = informationset
|
||||
|
||||
_UI_InformationreportingModelWizard_label = Mod\u00E8le Informationreporting
|
||||
|
||||
@@ -12,12 +12,6 @@
|
||||
// ============================================================================
|
||||
package org.talend.designer.maven.aether.util;
|
||||
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.SocketAddress;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.aether.repository.Authentication;
|
||||
import org.eclipse.aether.repository.Proxy;
|
||||
import org.eclipse.aether.repository.ProxySelector;
|
||||
@@ -41,7 +35,6 @@ public class TalendAetherProxySelector implements ProxySelector {
|
||||
|
||||
@Override
|
||||
public Proxy getProxy(RemoteRepository repository) {
|
||||
|
||||
/**
|
||||
* Update each time in case the settings are changed
|
||||
*/
|
||||
@@ -60,37 +53,6 @@ public class TalendAetherProxySelector implements ProxySelector {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
if (proxy == null) {
|
||||
java.net.ProxySelector jreSelector = java.net.ProxySelector.getDefault();
|
||||
try {
|
||||
URI uri = new URI(repository.getUrl());
|
||||
List<java.net.Proxy> proxies = jreSelector.select(uri);
|
||||
if (proxies != null && !proxies.isEmpty() && proxies.get(0).type() == java.net.Proxy.Type.HTTP) {
|
||||
SocketAddress addr = proxies.get(0).address();
|
||||
if (addr instanceof InetSocketAddress) {
|
||||
InetSocketAddress iaddr = (InetSocketAddress) addr;
|
||||
proxy = new org.eclipse.aether.repository.Proxy(proxies.get(0).type().name().toLowerCase(), iaddr.getHostName(), iaddr.getPort(), null);
|
||||
}
|
||||
}
|
||||
} catch (URISyntaxException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
|
||||
if (isTalendDebug) {
|
||||
try {
|
||||
if (repository != null) {
|
||||
String proxyStr = "";
|
||||
if (proxy != null) {
|
||||
proxyStr = proxy.getType() + " " + proxy.toString() + ", proxy user: "
|
||||
+ (proxy.getAuthentication() != null ? "..." : "<empty>");
|
||||
}
|
||||
ExceptionHandler.log("Aether system proxy> host: " + repository.getHost() + ", proxy: " + proxyStr);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
return proxy;
|
||||
}
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.avro</groupId>
|
||||
<artifactId>avro</artifactId>
|
||||
<version>1.11.3</version>
|
||||
<version>1.11.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
<dependency>
|
||||
<groupId>org.json</groupId>
|
||||
<artifactId>json</artifactId>
|
||||
<version>20231013</version>
|
||||
<version>20230227</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
||||
|
||||
@@ -146,8 +146,8 @@
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
<artifactId>bcprov-jdk18on</artifactId>
|
||||
<version>1.74</version>
|
||||
<artifactId>bcprov-jdk15on</artifactId>
|
||||
<version>1.70</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
|
||||
@@ -97,8 +97,8 @@
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
<artifactId>bcprov-jdk18on</artifactId>
|
||||
<version>1.74</version>
|
||||
<artifactId>bcprov-jdk15on</artifactId>
|
||||
<version>1.70</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
|
||||
@@ -37,8 +37,8 @@
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
<artifactId>bcprov-jdk18on</artifactId>
|
||||
<version>1.74</version>
|
||||
<artifactId>bcprov-jdk15on</artifactId>
|
||||
<version>1.70</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<dependency>
|
||||
<groupId>org.json</groupId>
|
||||
<artifactId>json</artifactId>
|
||||
<version>20231013</version>
|
||||
<version>20230227</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<properties>
|
||||
<tcomp.version>1.63.0</tcomp.version>
|
||||
<tcomp.version>1.62.1</tcomp.version>
|
||||
<slf4j.version>1.7.34</slf4j.version>
|
||||
<reload4j.version>1.2.22</reload4j.version>
|
||||
</properties>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<packaging>pom</packaging>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>talend_open</id>
|
||||
<id>Talend OpenSource Release</id>
|
||||
<url>https://artifacts-oss.talend.com/nexus/content/repositories/TalendOpenSourceRelease/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
@@ -8,4 +8,3 @@ ProjectSettingPage_ProjectPom=Projet
|
||||
ProjectSettingPage_ProjectPomDesc=Param\u00E8tres des POM du projet
|
||||
ProjectSettingPage_MavenCustomSetup=Configurer les scripts personnalis\u00E9s par dossier
|
||||
ProjectSettingPage_MavenCustomSetupDesc=Configurer les scripts Maven personnalis\u00E9s par dossier
|
||||
TalendMavenPreferencePage=Maven
|
||||
|
||||
@@ -8,4 +8,3 @@ ProjectSettingPage_ProjectPom=\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8
|
||||
ProjectSettingPage_ProjectPomDesc=\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8POM\u8A2D\u5B9A
|
||||
ProjectSettingPage_MavenCustomSetup=\u30AB\u30B9\u30BF\u30E0\u30B9\u30AF\u30EA\u30D7\u30C8\u3092\u30D5\u30A9\u30EB\u30C0\u30FC\u3054\u3068\u306B\u8A2D\u5B9A
|
||||
ProjectSettingPage_MavenCustomSetupDesc=\u30AB\u30B9\u30BF\u30E0Maven\u30B9\u30AF\u30EA\u30D7\u30C8\u3092\u30D5\u30A9\u30EB\u30C0\u30FC\u3054\u3068\u306B\u8A2D\u5B9A
|
||||
TalendMavenPreferencePage=Maven
|
||||
|
||||
@@ -8,4 +8,3 @@ ProjectSettingPage_ProjectPom=\u5DE5\u7A0B
|
||||
ProjectSettingPage_ProjectPomDesc=\u5DE5\u7A0B POM \u8BBE\u7F6E
|
||||
ProjectSettingPage_MavenCustomSetup=\u6309\u6587\u4EF6\u5939\u8BBE\u7F6E\u81EA\u5B9A\u4E49\u811A\u672C
|
||||
ProjectSettingPage_MavenCustomSetupDesc=\u6309\u6587\u4EF6\u5939\u8BBE\u7F6E\u81EA\u5B9A\u4E49 Maven \u811A\u672C
|
||||
TalendMavenPreferencePage=Maven
|
||||
|
||||
@@ -23,5 +23,3 @@ MavenProjectSettingPage.syncAllPomsWarning=Cliquez sur Forcer la nouvelle synchr
|
||||
MavenProjectSettingPage.skipFolders=Ignorer les dossiers
|
||||
BuildProjectSettingPage.allowRecursiveJobsJoblets=Autorise les Jobs et Joblets r\u00E9cursifs (non support\u00E9 - pour des raisons de compatibilit\u00E9)
|
||||
BuildProjectSettingPage.allowRecursiveJobs=Autoriser les Jobs r\u00E9cursifs (non recommand\u00E9)
|
||||
TalendMavenPreferencePage.maven.offline=Hors ligne
|
||||
TalendMavenPreferencePage.maven.warn=Le mode en ligne n'est pas recommand\u00E9 dans le Studio.
|
||||
|
||||
@@ -23,5 +23,3 @@ MavenProjectSettingPage.syncAllPomsWarning=[\u5B8C\u5168\u306A\u518D\u540C\u671F
|
||||
MavenProjectSettingPage.skipFolders=\u30D5\u30A9\u30EB\u30C0\u30FC\u3092\u30B9\u30AD\u30C3\u30D7
|
||||
BuildProjectSettingPage.allowRecursiveJobsJoblets=\u518D\u5E30\u7684\u30B8\u30E7\u30D6\u3068\u30B8\u30E7\u30D6\u30EC\u30C3\u30C8\u3092\u8A31\u53EF(\u30B5\u30DD\u30FC\u30C8\u306A\u3057 - \u4E92\u63DB\u6027\u306E\u76EE\u7684\u306E\u307F)
|
||||
BuildProjectSettingPage.allowRecursiveJobs=\u518D\u5E30\u7684\u30B8\u30E7\u30D6\u3092\u8A31\u53EF(\u975E\u63A8\u5968)
|
||||
TalendMavenPreferencePage.maven.offline=\u30AA\u30D5\u30E9\u30A4\u30F3
|
||||
TalendMavenPreferencePage.maven.warn=Studio\u5185\u90E8\u3067\u306E\u30AA\u30F3\u30E9\u30A4\u30F3\u30E2\u30FC\u30C9\u306F\u304A\u52E7\u3081\u3067\u304D\u307E\u305B\u3093\u3002
|
||||
|
||||
@@ -23,5 +23,3 @@ MavenProjectSettingPage.syncAllPomsWarning=\u5355\u51FB \u201C\u5F3A\u5236\u5B8C
|
||||
MavenProjectSettingPage.skipFolders=\u8DF3\u8FC7\u6587\u4EF6\u5939
|
||||
BuildProjectSettingPage.allowRecursiveJobsJoblets=\u5141\u8BB8\u9012\u5F52\u4F5C\u4E1A\u548C\u5C0F\u4F5C\u4E1A (\u4E0D\u652F\u6301 - \u4EC5\u7528\u4E8E\u517C\u5BB9\u6027)
|
||||
BuildProjectSettingPage.allowRecursiveJobs=\u5141\u8BB8\u9012\u5F52\u4F5C\u4E1A (\u4E0D\u63A8\u8350)
|
||||
TalendMavenPreferencePage.maven.offline=\u79BB\u7EBF
|
||||
TalendMavenPreferencePage.maven.warn=Studio \u5185\u4E0D\u5EFA\u8BAE\u4F7F\u7528\u5728\u7EBF\u6A21\u5F0F\u3002
|
||||
|
||||
@@ -26,9 +26,7 @@ import java.util.List;
|
||||
import java.util.Properties;
|
||||
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.maven.cli.configuration.SettingsXmlConfigurationProcessor;
|
||||
import org.apache.maven.settings.Profile;
|
||||
import org.apache.maven.settings.Proxy;
|
||||
@@ -68,8 +66,6 @@ import org.w3c.dom.Node;
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
public class M2eUserSettingForTalendLoginTask extends AbstractLoginTask {
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(M2eUserSettingForTalendLoginTask.class);
|
||||
|
||||
public static final String MAVEN_REPO_CONFIG = "maven.repository"; //$NON-NLS-1$
|
||||
|
||||
public static final String VERSION_KEY = "version"; //$NON-NLS-1$
|
||||
@@ -448,8 +444,6 @@ public class M2eUserSettingForTalendLoginTask extends AbstractLoginTask {
|
||||
proxyService.setNonProxiedHosts(bypassHosts.toArray(new String[bypassHosts.size()]));
|
||||
}
|
||||
}
|
||||
|
||||
LOGGER.info("Updated studio proxy settings from maven settings.");
|
||||
}
|
||||
|
||||
private boolean updateProfileSettings(IProgressMonitor monitor, IMaven maven, Settings settings, Path configPath,
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
#Eclipse modern messages class
|
||||
#Sat Apr 19 16:43:19 MSK 2014
|
||||
ExecutePomAction_dialog_debug_message=S\u00E9lectionnez une configuration de d\u00E9marrage pour le d\u00E9bogage\u00A0:
|
||||
ExecutePomAction_dialog_run_message=S\u00E9lectionnez une configuration de d\u00E9marrage pour l'ex\u00E9cution\u00A0:
|
||||
ExecutePomAction_dialog_title=S\u00E9lectionner une configuration
|
||||
ExecutePomAction_executing=Ex\u00E9cution de {0} dans {1}
|
||||
MavenLaunchDelegate_error_cannot_create_conf=Impossible de cr\u00E9er m2.conf
|
||||
MavenLaunchDelegate_job_name=Actualisation des ressources...
|
||||
MavenLaunchDelegate_error_cannot_read_jvmConfig=Impossible de lire la configuration de la JVM depuis {0}
|
||||
MavenLaunchExtensionsTab_lblExtensions=D\u00E9marrer les extensions Maven
|
||||
MavenLaunchExtensionsTab_name=D\u00E9marrer les extensions
|
||||
MavenLaunchMainTab_btnAfterClean=S\u00E9lec&tionner...
|
||||
MavenLaunchMainTab_btnAutoBuild=&S\u00E9lectionner...
|
||||
MavenLaunchMainTab_btnCleanBuild=S\u00E9&lectionner...
|
||||
MavenLaunchMainTab_btnConfigure=Configurer...
|
||||
MavenLaunchMainTab_btnDebugOutput=D\u00E9bo&guer la sortie
|
||||
MavenLaunchMainTab_btnManualBuild=S&\u00E9lectionner...
|
||||
MavenLaunchMainTab_btnNotRecursive=Non r\u00E9cursif
|
||||
MavenLaunchMainTab_btnOffline=Hors ligne (&O)
|
||||
MavenLaunchMainTab_btnResolveWorkspace=R\u00E9soudre les artefacts de l'espace de travail
|
||||
MavenLaunchMainTab_btnSkipTests=Ignorer les tests (&k)
|
||||
MavenLaunchMainTab_btnUpdateSnapshots=Mettre \u00E0 jour les Snapshots (&U)
|
||||
MavenLaunchMainTab_lblAfterClean=Goals apr\u00E8s Clean (&f)\u00A0:
|
||||
MavenLaunchMainTab_lblAutoBuildGoals=Goals &Build Auto\u00A0:
|
||||
MavenLaunchMainTab_lblCleanBuild=Goals au cours d'un Clean (&D)\u00A0:
|
||||
MavenLaunchMainTab_lblManualGoals=Goals du Build ma&nuel\u00A0:
|
||||
MavenLaunchMainTab_lblRuntime=Runt&ime Maven\u00A0:
|
||||
MavenLaunchMainTab_lblThreads=&Threads\u00A0:
|
||||
MavenLaunchMainTab_lblEnableColorOutput=&Colorer la sortie\u00A0:
|
||||
MavenLaunchMainTab_lblEnableColorOutput_Auto=Auto
|
||||
MavenLaunchMainTab_lblEnableColorOutput_Always=Toujours
|
||||
MavenLaunchMainTab_lblEnableColorOutput_Never=Jamais
|
||||
MavenLaunchMainTab_lblUserSettings_text=Param\u00E8tres utilisateur\u00A0:
|
||||
MavenLaunchMainTab_property_dialog_edit_title=Modifier le param\u00E8tre
|
||||
MavenLaunchMainTab_property_dialog_title=Ajouter un param\u00E8tre
|
||||
MavenJRETab_lblDefault=JRE d'ex\u00E9cution Maven par d\u00E9faut\u00A0: {0}
|
||||
MavenJRETab_lblDefaultDetailsRequiredJavaVersion={0} (s\u00E9lection auto dans l'intervalle de versions Java requis {1})
|
||||
MavenLaunchUtils_error_no_maven_install=L'installation de Maven est introuvable {0}
|
||||
MavenLaynchDelegate_unsupported_source_locator=Locator de source inconnu on non support\u00E9 {0}
|
||||
launchBrowseFs=Syst\u00E8&me de fichiers...
|
||||
launchBrowseVariables=&Variables...
|
||||
launchBrowseWorkspace=Espace de travail... (&W)
|
||||
launchChoosePomDir=S\u00E9lectionner le r\u00E9pertoire de &Base
|
||||
launchChooseSettingsFile=S\u00E9lectionner le fichier des param\u00E8tre&S
|
||||
launchGoals=&S\u00E9lectionner...
|
||||
launchGoalsLabel=&Goals\u00A0:
|
||||
launchMainTabName=Main
|
||||
launchPomDirectoryDoesntExist=Le r\u00E9pertoire de base n'existe pas ou ne peut \u00EAtre lu
|
||||
launchErrorEvaluatingBaseDirectory=Le nom du r\u00E9pertoire de base ne peut \u00EAtre \u00E9valu\u00E9
|
||||
launchPomDirectoryEmpty=Le r\u00E9pertoire de base doit \u00EAtre sp\u00E9cifi\u00E9
|
||||
launchPomGroup=R\u00E9pertoire de base\u00A0:
|
||||
launchProfilesLabel=&Profils\u00A0:
|
||||
launchPropAddButton=&Ajouter...
|
||||
launchPropEditButton=Mo&difier...
|
||||
launchPropName=Nom du param\u00E8tre
|
||||
launchPropRemoveButton=Supp&rimer
|
||||
launchPropValue=Valeur
|
||||
launchPropertyDialogBrowseVariables=Varia&bles...
|
||||
@@ -1,58 +0,0 @@
|
||||
#Eclipse modern messages class
|
||||
#Sat Apr 19 16:43:19 MSK 2014
|
||||
ExecutePomAction_dialog_debug_message=\u30C7\u30D0\u30C3\u30B0\u3059\u308B\u8D77\u52D5\u8A2D\u5B9A\u3092\u9078\u629E:
|
||||
ExecutePomAction_dialog_run_message=\u5B9F\u884C\u3059\u308B\u8D77\u52D5\u8A2D\u5B9A\u3092\u9078\u629E:
|
||||
ExecutePomAction_dialog_title=\u8A2D\u5B9A\u3092\u9078\u629E
|
||||
ExecutePomAction_executing={1}\u3067{0}\u3092\u5B9F\u884C
|
||||
MavenLaunchDelegate_error_cannot_create_conf=m2.conf\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093
|
||||
MavenLaunchDelegate_job_name=\u30EA\u30BD\u30FC\u30B9\u3092\u66F4\u65B0...
|
||||
MavenLaunchDelegate_error_cannot_read_jvmConfig={0}\u304B\u3089JVM\u8A2D\u5B9A\u3092\u8AAD\u307F\u53D6\u308C\u307E\u305B\u3093
|
||||
MavenLaunchExtensionsTab_lblExtensions=Maven\u8D77\u52D5\u62E1\u5F35\u6A5F\u80FD
|
||||
MavenLaunchExtensionsTab_name=\u8D77\u52D5\u62E1\u5F35\u6A5F\u80FD
|
||||
MavenLaunchMainTab_btnAfterClean=\u9078\u629E(&T)...
|
||||
MavenLaunchMainTab_btnAutoBuild=\u9078\u629E(&S)...
|
||||
MavenLaunchMainTab_btnCleanBuild=\u9078\u629E(&L)...
|
||||
MavenLaunchMainTab_btnConfigure=\u8A2D\u5B9A...
|
||||
MavenLaunchMainTab_btnDebugOutput=\u51FA\u529B\u3092\u30C7\u30D0\u30C3\u30B0(&G)
|
||||
MavenLaunchMainTab_btnManualBuild=\u9078\u629E(&E)...
|
||||
MavenLaunchMainTab_btnNotRecursive=\u975E\u518D\u5E30\u7684
|
||||
MavenLaunchMainTab_btnOffline=\u30AA\u30D5\u30E9\u30A4\u30F3(&O)
|
||||
MavenLaunchMainTab_btnResolveWorkspace=\u30EF\u30FC\u30AF\u30B9\u30DA\u30FC\u30B9\u30A2\u30FC\u30C6\u30A3\u30D5\u30A1\u30AF\u30C8\u3092\u89E3\u6C7A
|
||||
MavenLaunchMainTab_btnSkipTests=\u30C6\u30B9\u30C8\u3092\u30B9\u30AD\u30C3\u30D7(&K)
|
||||
MavenLaunchMainTab_btnUpdateSnapshots=\u30B9\u30CA\u30C3\u30D7\u30B7\u30E7\u30C3\u30C8\u3092\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8(&U)
|
||||
MavenLaunchMainTab_lblAfterClean=\u30AF\u30EA\u30FC\u30F3\u76EE\u6A19\u5F8C(&F):
|
||||
MavenLaunchMainTab_lblAutoBuildGoals=\u81EA\u52D5\u30D3\u30EB\u30C9\u76EE\u6A19(&B):
|
||||
MavenLaunchMainTab_lblCleanBuild=\u30AF\u30EA\u30FC\u30F3\u76EE\u6A19\u4E2D(&D):
|
||||
MavenLaunchMainTab_lblManualGoals=\u624B\u52D5\u30D3\u30EB\u30C9\u76EE\u6A19(&N):
|
||||
MavenLaunchMainTab_lblRuntime=Maven\u30E9\u30F3\u30BF\u30A4\u30E0(&I):
|
||||
MavenLaunchMainTab_lblThreads=\u30B9\u30EC\u30C3\u30C9(&T):
|
||||
MavenLaunchMainTab_lblEnableColorOutput=\u8272\u306E\u51FA\u529B(&C):
|
||||
MavenLaunchMainTab_lblEnableColorOutput_Auto=\u81EA\u52D5
|
||||
MavenLaunchMainTab_lblEnableColorOutput_Always=\u5E38\u6642
|
||||
MavenLaunchMainTab_lblEnableColorOutput_Never=\u3057\u306A\u3044
|
||||
MavenLaunchMainTab_lblUserSettings_text=\u30E6\u30FC\u30B6\u30FC\u8A2D\u5B9A:
|
||||
MavenLaunchMainTab_property_dialog_edit_title=\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u3092\u7DE8\u96C6
|
||||
MavenLaunchMainTab_property_dialog_title=\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u3092\u8FFD\u52A0
|
||||
MavenJRETab_lblDefault=\u30C7\u30D5\u30A9\u30EB\u30C8\u306EMaven\u5B9F\u884CJRE: {0}
|
||||
MavenJRETab_lblDefaultDetailsRequiredJavaVersion={0} (\u5FC5\u8981\u306AJava\u30D0\u30FC\u30B8\u30E7\u30F3\u7BC4\u56F2{1}\u304B\u3089\u81EA\u52D5\u9078\u629E)
|
||||
MavenLaunchUtils_error_no_maven_install=Maven\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB{0}\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
|
||||
MavenLaynchDelegate_unsupported_source_locator=\u4E0D\u660E\u307E\u305F\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u306A\u3044\u30BD\u30FC\u30B9\u30ED\u30B1\u30FC\u30BF\u30FC{0}
|
||||
launchBrowseFs=\u30D5\u30A1\u30A4\u30EB\u30B7\u30B9\u30C6\u30E0(&M)...
|
||||
launchBrowseVariables=\u5909\u6570(&V)...
|
||||
launchBrowseWorkspace=\u30EF\u30FC\u30AF\u30B9\u30DA\u30FC\u30B9(&W)...
|
||||
launchChoosePomDir=\u30D9\u30FC\u30B9\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u30FC\u3092\u9078\u629E(&B)
|
||||
launchChooseSettingsFile=\u8A2D\u5B9A\u30D5\u30A1\u30A4\u30EB\u3092\u9078\u629E(&S)
|
||||
launchGoals=\u9078\u629E(&S)...
|
||||
launchGoalsLabel=\u76EE\u6A19(&G):
|
||||
launchMainTabName=\u30E1\u30A4\u30F3
|
||||
launchPomDirectoryDoesntExist=\u30D9\u30FC\u30B9\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u30FC\u304C\u5B58\u5728\u3057\u306A\u3044\u304B\u8AAD\u307F\u53D6\u308C\u307E\u305B\u3093
|
||||
launchErrorEvaluatingBaseDirectory=\u30D9\u30FC\u30B9\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u30FC\u540D\u3092\u8A55\u4FA1\u3067\u304D\u307E\u305B\u3093
|
||||
launchPomDirectoryEmpty=\u30D9\u30FC\u30B9\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u30FC\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
|
||||
launchPomGroup=\u30D9\u30FC\u30B9\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u30FC
|
||||
launchProfilesLabel=\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB(&P):
|
||||
launchPropAddButton=\u8FFD\u52A0(&A)...
|
||||
launchPropEditButton=\u7DE8\u96C6(&D)...
|
||||
launchPropName=\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u540D
|
||||
launchPropRemoveButton=\u524A\u9664(&R)
|
||||
launchPropValue=\u5024
|
||||
launchPropertyDialogBrowseVariables=\u5909\u6570(&B)...
|
||||
@@ -1,58 +0,0 @@
|
||||
#Eclipse modern messages class
|
||||
#Sat Apr 19 16:43:19 MSK 2014
|
||||
ExecutePomAction_dialog_debug_message=\u9009\u62E9\u8981\u8C03\u8BD5\u7684\u542F\u52A8\u914D\u7F6E\uFF1A
|
||||
ExecutePomAction_dialog_run_message=\u9009\u62E9\u8981\u8FD0\u884C\u7684\u542F\u52A8\u914D\u7F6E\uFF1A
|
||||
ExecutePomAction_dialog_title=\u9009\u62E9\u914D\u7F6E
|
||||
ExecutePomAction_executing=\u5728 {1} \u4E2D\u6267\u884C {0}
|
||||
MavenLaunchDelegate_error_cannot_create_conf=\u65E0\u6CD5\u521B\u5EFA m2.conf
|
||||
MavenLaunchDelegate_job_name=\u6B63\u5728\u5237\u65B0\u8D44\u6E90...
|
||||
MavenLaunchDelegate_error_cannot_read_jvmConfig=\u65E0\u6CD5\u4ECE {0} \u8BFB\u53D6 JVM \u914D\u7F6E
|
||||
MavenLaunchExtensionsTab_lblExtensions=Maven \u542F\u52A8\u6269\u5C55
|
||||
MavenLaunchExtensionsTab_name=\u542F\u52A8\u6269\u5C55
|
||||
MavenLaunchMainTab_btnAfterClean=\u9009\u62E9(&T)...
|
||||
MavenLaunchMainTab_btnAutoBuild=\u9009\u62E9(&S)...
|
||||
MavenLaunchMainTab_btnCleanBuild=\u9009\u62E9(&L)...
|
||||
MavenLaunchMainTab_btnConfigure=\u914D\u7F6E...
|
||||
MavenLaunchMainTab_btnDebugOutput=\u8C03\u8BD5\u8F93\u51FA(&G)
|
||||
MavenLaunchMainTab_btnManualBuild=\u9009\u62E9(&E)...
|
||||
MavenLaunchMainTab_btnNotRecursive=\u975E\u9012\u5F52
|
||||
MavenLaunchMainTab_btnOffline=\u79BB\u7EBF(&O)
|
||||
MavenLaunchMainTab_btnResolveWorkspace=\u89E3\u51B3\u5DE5\u4F5C\u533A\u4F5C\u54C1
|
||||
MavenLaunchMainTab_btnSkipTests=\u8DF3\u8FC7\u6D4B\u8BD5(&K)
|
||||
MavenLaunchMainTab_btnUpdateSnapshots=\u66F4\u65B0\u5FEB\u7167(&U)
|
||||
MavenLaunchMainTab_lblAfterClean=\u5728\u6E05\u7406\u76EE\u6807\u4E4B\u540E(&F)\uFF1A
|
||||
MavenLaunchMainTab_lblAutoBuildGoals=\u81EA\u52A8\u6784\u5EFA\u76EE\u6807(&B)\uFF1A
|
||||
MavenLaunchMainTab_lblCleanBuild=\u5728\u6E05\u7406\u76EE\u6807\u671F\u95F4(&D)\uFF1A
|
||||
MavenLaunchMainTab_lblManualGoals=\u624B\u52A8\u6784\u5EFA\u76EE\u6807(&N)\uFF1A
|
||||
MavenLaunchMainTab_lblRuntime=Maven \u8FD0\u884C\u65F6(&I)\uFF1A
|
||||
MavenLaunchMainTab_lblThreads=\u7EBF\u7A0B(&T)\uFF1A
|
||||
MavenLaunchMainTab_lblEnableColorOutput=\u989C\u8272\u8F93\u51FA(&C)\uFF1A
|
||||
MavenLaunchMainTab_lblEnableColorOutput_Auto=\u81EA\u52A8
|
||||
MavenLaunchMainTab_lblEnableColorOutput_Always=\u603B\u662F
|
||||
MavenLaunchMainTab_lblEnableColorOutput_Never=\u4ECE\u4E0D
|
||||
MavenLaunchMainTab_lblUserSettings_text=\u7528\u6237\u8BBE\u7F6E\uFF1A
|
||||
MavenLaunchMainTab_property_dialog_edit_title=\u7F16\u8F91\u53C2\u6570
|
||||
MavenLaunchMainTab_property_dialog_title=\u6DFB\u52A0\u53C2\u6570
|
||||
MavenJRETab_lblDefault=\u9ED8\u8BA4 Maven Execution JRE\uFF1A {0}
|
||||
MavenJRETab_lblDefaultDetailsRequiredJavaVersion={0} \uFF08\u4ECE\u6240\u9700\u7684 Java \u7248\u672C\u8303\u56F4 {1} \u4E2D\u81EA\u52A8\u9009\u62E9\uFF09
|
||||
MavenLaunchUtils_error_no_maven_install=\u65E0\u6CD5\u627E\u5230 Maven \u5B89\u88C5 {0}
|
||||
MavenLaynchDelegate_unsupported_source_locator=\u672A\u77E5\u6216\u4E0D\u652F\u6301\u7684\u6E90\u5B9A\u4F4D\u5668 {0}
|
||||
launchBrowseFs=\u6587\u4EF6\u7CFB\u7EDF(&M)...
|
||||
launchBrowseVariables=\u53D8\u91CF(&V)...
|
||||
launchBrowseWorkspace=\u5DE5\u4F5C\u533A(&W)...
|
||||
launchChoosePomDir=\u9009\u62E9\u57FA\u672C\u76EE\u5F55(&B)
|
||||
launchChooseSettingsFile=\u9009\u62E9\u8BBE\u7F6E\u6587\u4EF6(&S)
|
||||
launchGoals=\u9009\u62E9(&S)...
|
||||
launchGoalsLabel=\u76EE\u6807(&G)\uFF1A
|
||||
launchMainTabName=\u4E3B
|
||||
launchPomDirectoryDoesntExist=\u57FA\u672C\u76EE\u5F55\u4E0D\u5B58\u5728\u6216\u65E0\u6CD5\u8BFB\u53D6
|
||||
launchErrorEvaluatingBaseDirectory=\u65E0\u6CD5\u8BA1\u7B97\u57FA\u672C\u76EE\u5F55\u540D
|
||||
launchPomDirectoryEmpty=\u5E94\u6307\u5B9A\u57FA\u672C\u76EE\u5F55
|
||||
launchPomGroup=\u57FA\u672C\u76EE\u5F55\uFF1A
|
||||
launchProfilesLabel=\u914D\u7F6E\u6587\u4EF6(&P)\uFF1A
|
||||
launchPropAddButton=\u6DFB\u52A0(&A)...
|
||||
launchPropEditButton=\u7F16\u8F91(&D)...
|
||||
launchPropName=\u53C2\u6570\u540D\u79F0
|
||||
launchPropRemoveButton=\u79FB\u9664(&R)
|
||||
launchPropValue=\u503C
|
||||
launchPropertyDialogBrowseVariables=\u53D8\u91CF(&B)...
|
||||
@@ -135,31 +135,6 @@ public class CreateMavenBundleTemplatePom extends CreateMaven {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
protected Model createFeatureModel() {
|
||||
InputStream inputStream = null;
|
||||
try {
|
||||
Model model = null;
|
||||
inputStream = getFeatureTemplateStream();
|
||||
if (inputStream != null) {
|
||||
model = MODEL_MANAGER.readMavenModel(inputStream);
|
||||
}
|
||||
return model;
|
||||
} catch (IOException e) {
|
||||
ExceptionHandler.process(e);
|
||||
} catch (CoreException e) {
|
||||
ExceptionHandler.process(e);
|
||||
} finally {
|
||||
if (inputStream != null) {
|
||||
try {
|
||||
inputStream.close();
|
||||
} catch (IOException e) {
|
||||
//
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
protected InputStream getTemplateStream() throws IOException {
|
||||
try {
|
||||
@@ -168,16 +143,6 @@ public class CreateMavenBundleTemplatePom extends CreateMaven {
|
||||
throw new IOException(e);
|
||||
}
|
||||
}
|
||||
|
||||
protected InputStream getFeatureTemplateStream() throws IOException {
|
||||
try {
|
||||
return MavenTemplateManager.getBundleTemplateStream(JOB_TEMPLATE_BUNDLE, getBundleTemplatePath());
|
||||
} catch (Exception e) {
|
||||
throw new IOException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
|
||||
@@ -5,6 +5,6 @@ Bundle-SymbolicName: org.talend.libraries.javacsv;singleton:=true
|
||||
Bundle-Version: 8.0.1.qualifier
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-ClassPath: .,
|
||||
lib/javacsv-2.0.jar;mvn:net.sourceforge.javacsv/javacsv/2.0
|
||||
lib/javacsv.jar
|
||||
Export-Package: com.csvreader
|
||||
Eclipse-BundleShape: dir
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
context="plugin:org.talend.libraries.javacsv"
|
||||
language="java"
|
||||
message="Needed for Java CVS Reader and Writer"
|
||||
name="javacsv-2.0.jar" mvn_uri="mvn:net.sourceforge.javacsv/javacsv/2.0"
|
||||
name="javacsv.jar" mvn_uri="mvn:org.talend.libraries/javacsv/6.0.0"
|
||||
required="true">
|
||||
</libraryNeeded>
|
||||
</extension>
|
||||
|
||||
@@ -5,7 +5,7 @@ Bundle-Name: Jboss
|
||||
Bundle-SymbolicName: org.talend.libraries.jboss;singleton:=true
|
||||
Bundle-Version: 8.0.1.qualifier
|
||||
Bundle-ClassPath: .,
|
||||
lib/trove-1.0.2.jar;mvn:trove/trove/1.0.2,
|
||||
lib/trove.jar,
|
||||
lib/jboss-serialization.jar
|
||||
Eclipse-BuddyPolicy: registered
|
||||
Export-Package: org.jboss.serial,
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
context="plugin:org.talend.libraries.jboss"
|
||||
language="java"
|
||||
message="Needed for JBoss"
|
||||
name="jboss-serialization-1.0.3.GA.jar" mvn_uri="mvn:jboss/jboss-serialization/1.0.3.GA"
|
||||
name="jboss-serialization.jar" mvn_uri="mvn:org.talend.libraries/jboss-serialization/6.0.0"
|
||||
required="true">
|
||||
</libraryNeeded>
|
||||
<libraryNeeded
|
||||
context="plugin:org.talend.libraries.jboss"
|
||||
language="java"
|
||||
message="Needed for JBoss"
|
||||
name="trove-1.0.2.jar" mvn_uri="mvn:trove/trove/1.0.2"
|
||||
name="trove.jar" mvn_uri="mvn:org.talend.libraries/trove/6.0.0"
|
||||
required="true">
|
||||
</libraryNeeded>
|
||||
</extension>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
context="plugin:org.talend.libraries.jdbc.mysql"
|
||||
language="java"
|
||||
message="Needed for Mysql jdbc plugin"
|
||||
name="mysql-connector-java-5.1.30.jar" mvn_uri="mvn:mysql/mysql-connector-java/5.1.30"
|
||||
name="mysql-connector-java-5.1.30-bin.jar" mvn_uri="mvn:org.talend.libraries/mysql-connector-java-5.1.30-bin/6.0.0"
|
||||
required="true">
|
||||
</libraryNeeded>
|
||||
<libraryNeeded
|
||||
@@ -29,8 +29,8 @@
|
||||
context="plugin:org.talend.libraries.jdbc.mysql"
|
||||
language="java"
|
||||
message="Needed for Mysql jdbc plugin"
|
||||
mvn_uri="mvn:mysql/mysql-connector-java/3.1.14"
|
||||
name="mysql-connector-java-3.1.14.jar"
|
||||
mvn_uri="mvn:org.talend.libraries/mysql-connector-java-3.1.14-bin/6.0.0"
|
||||
name="mysql-connector-java-3.1.14-bin.jar"
|
||||
required="true">
|
||||
</libraryNeeded>
|
||||
</extension>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
context="plugin:org.talend.libraries.jexcel"
|
||||
language="java"
|
||||
message="Needed for jexcel component"
|
||||
name="jxl-2.6.12.jar" mvn_uri="mvn:net.sourceforge.jexcelapi/jxl/2.6.12"
|
||||
name="jxl.jar" mvn_uri="mvn:org.talend.libraries/jxl/6.0.0"
|
||||
required="true">
|
||||
</libraryNeeded>
|
||||
<libraryNeeded
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
|
||||
<!-- saved from url=(0042)http://www.apache.org/licenses/LICENSE-1.1 -->
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">/* ====================================================================
|
||||
* The Apache Software License, Version 1.1
|
||||
*
|
||||
* Copyright (c) 2000 The Apache Software Foundation. All rights
|
||||
* reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* 3. The end-user documentation included with the redistribution,
|
||||
* if any, must include the following acknowledgment:
|
||||
* "This product includes software developed by the
|
||||
* Apache Software Foundation (http://www.apache.org/)."
|
||||
* Alternately, this acknowledgment may appear in the software itself,
|
||||
* if and wherever such third-party acknowledgments normally appear.
|
||||
*
|
||||
* 4. The names "Apache" and "Apache Software Foundation" must
|
||||
* not be used to endorse or promote products derived from this
|
||||
* software without prior written permission. For written
|
||||
* permission, please contact apache@apache.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "Apache",
|
||||
* nor may "Apache" appear in their name, without prior written
|
||||
* permission of the Apache Software Foundation.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
|
||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
||||
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
* Portions of this software are based upon public domain software
|
||||
* originally written at the National Center for Supercomputing Applications,
|
||||
* University of Illinois, Urbana-Champaign.
|
||||
*/
|
||||
|
||||
</pre></body></html>
|
||||
@@ -1,7 +1,6 @@
|
||||
[
|
||||
{"licenseUrl":"http://www.talendforge.org/modules/licenses/PUBLIC_DOMAIN.txt","licenseName":"PUBLIC_DOMAIN"},
|
||||
{"licenseUrl":"http://www.talendforge.org/modules/licenses/APACHE_v2.txt","licenseName":"Apache-2.0"},
|
||||
{"licenseUrl":"http://www.talendforge.org/modules/licenses/APACHE_v1.1.txt","licenseName":"Apache-1.1"},
|
||||
{"licenseUrl":"http://www.talendforge.org/modules/licenses/Oracle-Binary.txt","licenseName":"Oracle-Binary"},
|
||||
{"licenseUrl":"http://www.talendforge.org/modules/licenses/BSD_v2.txt","licenseName":"BSD-2-Clause"},
|
||||
{"licenseUrl":"http://www.talendforge.org/modules/licenses/BSD_v3.txt","licenseName":"BSD-3-Clause"},
|
||||
|
||||
@@ -40,7 +40,6 @@ import org.talend.librariesmanager.prefs.LibrariesManagerUtils;
|
||||
import org.talend.librariesmanager.ui.dialogs.ConfigModuleDialog;
|
||||
import org.talend.librariesmanager.ui.i18n.Messages;
|
||||
import org.talend.librariesmanager.ui.service.RoutineProviderManager;
|
||||
import org.talend.librariesmanager.utils.LicenseTextUtil;
|
||||
import org.talend.librariesmanager.utils.ModulesInstaller;
|
||||
|
||||
/**
|
||||
@@ -189,8 +188,4 @@ public class LibraryManagerUIService implements ILibraryManagerUIService {
|
||||
public IConfigModuleDialog getConfigModuleDialog(Shell parentShell, String initValue, boolean allowDetectDependencies) {
|
||||
return new ConfigModuleDialog(parentShell, initValue, allowDetectDependencies);
|
||||
}
|
||||
|
||||
public String getLicenseUrlByName(String licenceName) {
|
||||
return LicenseTextUtil.getLicenseUrlByName(licenceName);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,15 +102,6 @@ public class LicenseTextUtil {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getLicenseUrlByName(String name) {
|
||||
for (String url : licenseMap.keySet()) {
|
||||
if (name != null && name.equalsIgnoreCase(licenseMap.get(url))) {
|
||||
return url;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
private static String getStringFromText(File file) throws Exception {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
List<String> lines = Files.readAllLines(file.toPath(), StandardCharsets.UTF_8);
|
||||
|
||||
@@ -622,17 +622,15 @@ public class RemoteModulesHelper {
|
||||
message.put("module", child);//$NON-NLS-1$
|
||||
String url = serviceUrl + "?data=" + message;
|
||||
JSONObject resultStr = readJsonFromUrl(url);
|
||||
if (resultStr != null) {
|
||||
JSONArray jsonArray = resultStr.getJSONArray("result");//$NON-NLS-1$
|
||||
if (jsonArray != null) {
|
||||
JSONObject object = jsonArray.getJSONObject(0);
|
||||
if (object != null) {
|
||||
String licenseText = object.getString("licenseText");//$NON-NLS-1$
|
||||
if (licenseText != null) {
|
||||
licenseText.replace("http://", "https://");//$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
return licenseText;
|
||||
JSONArray jsonArray = resultStr.getJSONArray("result");//$NON-NLS-1$
|
||||
if (jsonArray != null) {
|
||||
JSONObject object = jsonArray.getJSONObject(0);
|
||||
if (object != null) {
|
||||
String licenseText = object.getString("licenseText");//$NON-NLS-1$
|
||||
if (licenseText != null) {
|
||||
licenseText.replace("http://", "https://");//$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
return licenseText;
|
||||
}
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
|
||||
@@ -153,14 +153,8 @@ public class LibraryDataService {
|
||||
}
|
||||
|
||||
public void buildLibraryLicenseData(Set<String> mvnUrlList) {
|
||||
buildLibraryLicenseData(mvnUrlList, null);
|
||||
}
|
||||
|
||||
public void buildLibraryLicenseData(Set<String> mvnUrlList, Map<String, List<String[]>> licenseMap) {
|
||||
for (String mvnUrl : mvnUrlList) {
|
||||
Library libraryObj = getLicenseDataFromMap(mvnUrl, licenseMap);
|
||||
if (libraryObj == null)
|
||||
libraryObj = resolve(mvnUrl);
|
||||
Library libraryObj = resolve(mvnUrl);
|
||||
if (!libraryObj.isLicenseMissing() || !libraryObj.isPomMissing()) {
|
||||
mvnToLibraryMap.put(getShortMvnUrl(mvnUrl), libraryObj);
|
||||
}
|
||||
@@ -177,10 +171,10 @@ public class LibraryDataService {
|
||||
isRemoved = true;
|
||||
}
|
||||
}
|
||||
if (lib.isPomMissing()) {
|
||||
if(lib.isPomMissing()) {
|
||||
lib.getLicenses().clear();
|
||||
lib.getLicenses().add(unknownLicense);
|
||||
} else {
|
||||
}else {
|
||||
if ((isRemoved && licenses.size() == 0)) {
|
||||
licenses.add(unknownLicense);
|
||||
lib.setLicenseMissing(true);
|
||||
@@ -189,38 +183,6 @@ public class LibraryDataService {
|
||||
}
|
||||
dataProvider.saveLicenseData(mvnToLibraryMap);
|
||||
}
|
||||
|
||||
private Library getLicenseDataFromMap(String mvnUrl, Map<String, List<String[]>> licenseMap) {
|
||||
if (licenseMap == null)
|
||||
return null;
|
||||
MavenArtifact artifact = MavenUrlHelper.parseMvnUrl(mvnUrl);
|
||||
String shourtMvnUrl = getShortMvnUrl(mvnUrl);
|
||||
String gav = String.format("%s:%s:%s", artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion());
|
||||
List<String[]> licenses = licenseMap.get(gav);
|
||||
Library libraryObj = null;
|
||||
if (licenses != null && licenses.size() > 0) {
|
||||
libraryObj = new Library();
|
||||
libraryObj.setGroupId(artifact.getGroupId());
|
||||
libraryObj.setArtifactId(artifact.getArtifactId());
|
||||
libraryObj.setVersion(artifact.getVersion());
|
||||
libraryObj.setMvnUrl(shourtMvnUrl);
|
||||
libraryObj.setType(artifact.getType());
|
||||
libraryObj.setClassifier(artifact.getClassifier());
|
||||
libraryObj.setPomMissing(false);
|
||||
for (String[] licenseContent : licenses) {
|
||||
LibraryLicense license = new LibraryLicense();
|
||||
if (licenseContent != null && licenseContent.length == 2) {
|
||||
license.setName(licenseContent[0]);
|
||||
license.setUrl(licenseContent[1]);
|
||||
}
|
||||
libraryObj.getLicenses().add(license);
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
return libraryObj;
|
||||
}
|
||||
|
||||
private Library resolve(String mvnUrl) {
|
||||
MavenArtifact artifact = MavenUrlHelper.parseMvnUrl(mvnUrl);
|
||||
|
||||
@@ -34,7 +34,7 @@ Require-Bundle: org.eclipse.ui,
|
||||
org.talend.daikon,
|
||||
org.talend.libraries.apache,
|
||||
org.talend.studio.studio-utils,
|
||||
avro
|
||||
avro;bundle-version="1.11.2"
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-Vendor: .Talend SA.
|
||||
Bundle-Localization: plugin
|
||||
|
||||
@@ -48,6 +48,7 @@ import org.talend.core.model.context.JobContext;
|
||||
import org.talend.core.model.context.JobContextParameter;
|
||||
import org.talend.core.model.metadata.IMetadataConnection;
|
||||
import org.talend.core.model.metadata.MetadataTalendType;
|
||||
import org.talend.core.model.metadata.builder.connection.AdditionalConnectionProperty;
|
||||
import org.talend.core.model.metadata.builder.connection.Connection;
|
||||
import org.talend.core.model.metadata.builder.connection.DatabaseConnection;
|
||||
import org.talend.core.model.metadata.builder.connection.FTPConnection;
|
||||
@@ -381,7 +382,12 @@ public final class ConnectionContextHelper {
|
||||
} catch (JSONException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}else if (currentConnection instanceof DatabaseConnection && !(currentConnection instanceof TacokitDatabaseConnection)) {
|
||||
} else if (currentConnection instanceof SAPConnection) {
|
||||
SAPConnection sapConn = (SAPConnection) currentConnection;
|
||||
for (AdditionalConnectionProperty sapProperty : sapConn.getAdditionalProperties()) {
|
||||
varList.add(sapProperty.getPropertyName());
|
||||
}
|
||||
} else if (currentConnection instanceof DatabaseConnection && !(currentConnection instanceof TacokitDatabaseConnection)) {
|
||||
DatabaseConnection dbConn = (DatabaseConnection) currentConnection;
|
||||
List<Map<String, Object>> hadoopPropertiesList = DBConnectionContextUtils.getHiveOrHbaseHadoopProperties(dbConn);
|
||||
if (!hadoopPropertiesList.isEmpty()) {
|
||||
|
||||
@@ -620,6 +620,11 @@ public final class OtherConnectionContextUtils {
|
||||
}
|
||||
}
|
||||
}
|
||||
// Create sap context parameters for additional properties
|
||||
for (AdditionalConnectionProperty sapProperty : conn.getAdditionalProperties()) {
|
||||
String sapPropertyContextName = getValidSapContextName(sapProperty.getPropertyName());
|
||||
ConnectionContextHelper.createParameters(varList, sapPropertyContextName, sapProperty.getValue());
|
||||
}
|
||||
|
||||
return varList;
|
||||
}
|
||||
@@ -647,6 +652,7 @@ public final class OtherConnectionContextUtils {
|
||||
setSAPConnnectionBasicPropertiesForContextMode(sapCon, sapParam, sapVariableName);
|
||||
}
|
||||
}
|
||||
setSAPConnectionAdditionPropertiesForContextMode(sapCon);
|
||||
}
|
||||
|
||||
static void setSAPConnectionPropertiesForExistContextMode(SAPConnection sapConn, Set<IConnParamName> paramSet,
|
||||
@@ -676,6 +682,7 @@ public final class OtherConnectionContextUtils {
|
||||
setSAPConnnectionBasicPropertiesForContextMode(sapConn, sapParam, sapVariableName);
|
||||
}
|
||||
}
|
||||
setSAPConnectionAdditionPropertiesForContextMode(sapConn);
|
||||
}
|
||||
|
||||
static void setSAPConnnectionBasicPropertiesForContextMode(SAPConnection sapConn, EParamName sapParam,
|
||||
@@ -728,6 +735,12 @@ public final class OtherConnectionContextUtils {
|
||||
}
|
||||
}
|
||||
|
||||
static void setSAPConnectionAdditionPropertiesForContextMode(SAPConnection sapConn) {
|
||||
for (AdditionalConnectionProperty sapProperty : sapConn.getAdditionalProperties()) {
|
||||
String sapPropertyContextName = getValidSapContextName(sapProperty.getPropertyName());
|
||||
sapProperty.setValue(ContextParameterUtils.getNewScriptCode(sapPropertyContextName, LANGUAGE));
|
||||
}
|
||||
}
|
||||
|
||||
static void revertSAPPropertiesForContextMode(SAPConnection conn, ContextType contextType) {
|
||||
String client = TalendQuoteUtils.removeQuotes(ConnectionContextHelper.getOriginalValue(contextType, conn.getClient()));
|
||||
|
||||
@@ -28,7 +28,6 @@ import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
|
||||
import org.talend.commons.utils.VersionUtils;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.ITDQRepositoryService;
|
||||
import org.talend.core.model.metadata.builder.connection.MetadataTable;
|
||||
import org.talend.core.model.properties.ConnectionItem;
|
||||
import org.talend.core.model.properties.Item;
|
||||
@@ -177,34 +176,11 @@ public abstract class CheckLastVersionRepositoryWizard extends RepositoryWizard
|
||||
workspace.run(operation, schedulingRule, IWorkspace.AVOID_UPDATE, new NullProgressMonitor());
|
||||
}
|
||||
|
||||
|
||||
protected void updateDQDependency(boolean isModified, String originaleObjectLabel) {
|
||||
if (isModified) {
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(ITDQRepositoryService.class)) {
|
||||
ITDQRepositoryService tdqRepService = GlobalServiceRegister.getDefault()
|
||||
.getService(ITDQRepositoryService.class);
|
||||
if (tdqRepService != null) {
|
||||
// TDQ-6395, save all dependency of the connection when the name is changed.
|
||||
tdqRepService.saveConnectionWithDependency(connectionItem);
|
||||
|
||||
// TDQ-7438, If the analysis editor is opened, popup the dialog which ask user refresh
|
||||
// the editor or not once should enough(use hasReloaded to control,because the reload will refresh)
|
||||
tdqRepService.refreshCurrentAnalysisEditor(connectionItem);
|
||||
|
||||
tdqRepService.updateAliasInSQLExplorer(connectionItem, originaleObjectLabel);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void notifyDQSQLExplorer() {
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(ITDQRepositoryService.class)) {
|
||||
ITDQRepositoryService tdqRepService = GlobalServiceRegister.getDefault()
|
||||
.getService(ITDQRepositoryService.class);
|
||||
if (tdqRepService != null) {
|
||||
tdqRepService.notifySQLExplorer(connectionItem);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public boolean performCancel() {
|
||||
// connectionCopy = null;
|
||||
// metadataTableCopy = null;
|
||||
return super.performCancel();
|
||||
}
|
||||
|
||||
protected void refreshInFinish(boolean isModified) {
|
||||
|
||||
@@ -82,8 +82,8 @@
|
||||
context="plugin:org.talend.libraries.jdbc.oracle"
|
||||
language="java"
|
||||
message="Needed for Oracle jdbc plugin"
|
||||
mvn_uri="mvn:com.oracle.database.jdbc/ojdbc6/11.2.0.4"
|
||||
name="ojdbc6-11.2.0.4.jar"
|
||||
mvn_uri="mvn:org.talend.libraries/ojdbc6/6.0.0"
|
||||
name="ojdbc6.jar"
|
||||
required="true">
|
||||
</libraryNeeded>
|
||||
<libraryNeeded
|
||||
@@ -190,16 +190,8 @@
|
||||
context="plugin:org.talend.metadata.managment"
|
||||
language="java"
|
||||
message="Needed for create sqlite connection"
|
||||
mvn_uri="mvn:org.xerial/sqlite-jdbc/3.44.1.0"
|
||||
name="sqlite-jdbc-3.44.1.0.jar"
|
||||
required="true">
|
||||
</libraryNeeded>
|
||||
<libraryNeeded
|
||||
context="plugin:org.talend.metadata.managment"
|
||||
language="java"
|
||||
message="Needed for create sqlite connection"
|
||||
mvn_uri="mvn:org.slf4j/slf4j-api/1.7.34"
|
||||
name="slf4j-api-1.7.34.jar"
|
||||
mvn_uri="mvn:org.xerial/sqlite-jdbc/3.40.0.0"
|
||||
name="sqlite-jdbc-3.40.0.0.jar"
|
||||
required="true">
|
||||
</libraryNeeded>
|
||||
<libraryNeeded
|
||||
|
||||
@@ -1085,8 +1085,8 @@ public class ExtractMetaDataUtils {
|
||||
} else if (driverJarPathArg.contains("/")) {
|
||||
if (driverJarPathArg.contains(";")) {
|
||||
String jars[] = driverJarPathArg.split(";");
|
||||
List<String> jarNames = new ArrayList<>();
|
||||
for (String jar : jars) {
|
||||
jar = TalendQuoteUtils.removeQuotesIfExist(jar);
|
||||
if (jar.startsWith(MavenUrlHelper.MVN_PROTOCOL)) {
|
||||
setDriverPath(librairesManagerService, jarPathList, jar);
|
||||
} else {
|
||||
|
||||
@@ -1,111 +1,111 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2021 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.core.model.metadata.builder.database;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
|
||||
/**
|
||||
*
|
||||
* DOC YeXiaowei class global comment. Detailled comment <br/>
|
||||
*
|
||||
*/
|
||||
public class HotClassLoader extends URLClassLoader {
|
||||
|
||||
// Commentted by Marvin Wang on Feb. 4, 2012 for TDI-23833.
|
||||
// // qli modified to fix the bug 6281.
|
||||
// private static HotClassLoader instance;
|
||||
//
|
||||
// public static HotClassLoader getInstance() {
|
||||
// // bug 17800 fixed
|
||||
// // if (instance == null) {
|
||||
// instance = new HotClassLoader();
|
||||
// // }
|
||||
// return instance;
|
||||
// }
|
||||
|
||||
public HotClassLoader() {
|
||||
super(new URL[0], ClassLoader.getSystemClassLoader());
|
||||
}
|
||||
|
||||
public void addPath(String paths) {
|
||||
if (paths == null || paths.length() <= 0) {
|
||||
return;
|
||||
}
|
||||
String separator = System.getProperty("path.separator"); //$NON-NLS-1$
|
||||
String[] pathToAdds = paths.split(separator);
|
||||
for (String pathToAdd2 : pathToAdds) {
|
||||
if (pathToAdd2 != null && pathToAdd2.length() > 0) {
|
||||
try {
|
||||
File pathToAdd = new File(pathToAdd2).getCanonicalFile();
|
||||
addURL(pathToAdd.toURI().toURL());
|
||||
} catch (IOException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// public static String getClassFile(String name){
|
||||
// if(name != null && !"".equals(name))
|
||||
// return name.replace(".", "/").concat(".class");
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * "hive driver"
|
||||
// */
|
||||
// public Class findClass(String name) throws ClassNotFoundException{
|
||||
// Class clazz = null;
|
||||
// byte[] data = loadClassData(name);
|
||||
//
|
||||
// clazz = defineClass(name, data, 0, data.length);
|
||||
// URL url = clazz.getProtectionDomain().getCodeSource().getLocation();
|
||||
// return clazz;
|
||||
// }
|
||||
//
|
||||
//
|
||||
// public byte[] loadClassData(String name) throws ClassNotFoundException{
|
||||
// InputStream input = null;
|
||||
// ByteArrayOutputStream output = null;
|
||||
// byte[] data = null;
|
||||
// URL[] urls = this.getURLs();
|
||||
// if(urls != null){
|
||||
// boolean isFind = false;
|
||||
// for(URL url : urls){
|
||||
// try {
|
||||
// String newDriverName = HotClassLoader.getClassFile(name);
|
||||
// URL newURL = new URL("jar:" + url.toString() + "!/"+ newDriverName);
|
||||
// input = newURL.openStream();
|
||||
// output = new ByteArrayOutputStream();
|
||||
// int ch = 0;
|
||||
// while((ch = input.read()) != -1){
|
||||
// output.write(ch);
|
||||
// }
|
||||
// data = output.toByteArray();
|
||||
// isFind = true;
|
||||
// break;
|
||||
// } catch (IOException e) {
|
||||
// }
|
||||
// }
|
||||
// if(!isFind)
|
||||
// throw new ClassNotFoundException("Can not find " + name + "!");
|
||||
// }
|
||||
// return data;
|
||||
// }
|
||||
|
||||
}
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2021 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.core.model.metadata.builder.database;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
|
||||
/**
|
||||
*
|
||||
* DOC YeXiaowei class global comment. Detailled comment <br/>
|
||||
*
|
||||
*/
|
||||
public class HotClassLoader extends URLClassLoader {
|
||||
|
||||
// Commentted by Marvin Wang on Feb. 4, 2012 for TDI-23833.
|
||||
// // qli modified to fix the bug 6281.
|
||||
// private static HotClassLoader instance;
|
||||
//
|
||||
// public static HotClassLoader getInstance() {
|
||||
// // bug 17800 fixed
|
||||
// // if (instance == null) {
|
||||
// instance = new HotClassLoader();
|
||||
// // }
|
||||
// return instance;
|
||||
// }
|
||||
|
||||
public HotClassLoader() {
|
||||
super(new URL[0], ClassLoader.getSystemClassLoader());
|
||||
}
|
||||
|
||||
public void addPath(String paths) {
|
||||
if (paths == null || paths.length() <= 0) {
|
||||
return;
|
||||
}
|
||||
String separator = System.getProperty("path.separator"); //$NON-NLS-1$
|
||||
String[] pathToAdds = paths.split(separator);
|
||||
for (String pathToAdd2 : pathToAdds) {
|
||||
if (pathToAdd2 != null && pathToAdd2.length() > 0) {
|
||||
try {
|
||||
File pathToAdd = new File(pathToAdd2).getCanonicalFile();
|
||||
addURL(pathToAdd.toURL());
|
||||
} catch (IOException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// public static String getClassFile(String name){
|
||||
// if(name != null && !"".equals(name))
|
||||
// return name.replace(".", "/").concat(".class");
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * "hive driver"
|
||||
// */
|
||||
// public Class findClass(String name) throws ClassNotFoundException{
|
||||
// Class clazz = null;
|
||||
// byte[] data = loadClassData(name);
|
||||
//
|
||||
// clazz = defineClass(name, data, 0, data.length);
|
||||
// URL url = clazz.getProtectionDomain().getCodeSource().getLocation();
|
||||
// return clazz;
|
||||
// }
|
||||
//
|
||||
//
|
||||
// public byte[] loadClassData(String name) throws ClassNotFoundException{
|
||||
// InputStream input = null;
|
||||
// ByteArrayOutputStream output = null;
|
||||
// byte[] data = null;
|
||||
// URL[] urls = this.getURLs();
|
||||
// if(urls != null){
|
||||
// boolean isFind = false;
|
||||
// for(URL url : urls){
|
||||
// try {
|
||||
// String newDriverName = HotClassLoader.getClassFile(name);
|
||||
// URL newURL = new URL("jar:" + url.toString() + "!/"+ newDriverName);
|
||||
// input = newURL.openStream();
|
||||
// output = new ByteArrayOutputStream();
|
||||
// int ch = 0;
|
||||
// while((ch = input.read()) != -1){
|
||||
// output.write(ch);
|
||||
// }
|
||||
// data = output.toByteArray();
|
||||
// isFind = true;
|
||||
// break;
|
||||
// } catch (IOException e) {
|
||||
// }
|
||||
// }
|
||||
// if(!isFind)
|
||||
// throw new ClassNotFoundException("Can not find " + name + "!");
|
||||
// }
|
||||
// return data;
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@@ -223,6 +223,10 @@ public final class JavaSqlFactory {
|
||||
} // else we are ok
|
||||
return driverClassName;
|
||||
}
|
||||
MDMConnection mdmConn = SwitchHelpers.MDMCONNECTION_SWITCH.doSwitch(conn);
|
||||
if (mdmConn != null) {
|
||||
return ""; //$NON-NLS-1$
|
||||
}
|
||||
DelimitedFileConnection dfConn = SwitchHelpers.DELIMITEDFILECONNECTION_SWITCH.doSwitch(conn);
|
||||
if (dfConn != null) {
|
||||
return ""; //$NON-NLS-1$
|
||||
@@ -242,6 +246,10 @@ public final class JavaSqlFactory {
|
||||
if (dbConn != null) {
|
||||
dbConn.setURL(url);
|
||||
}
|
||||
MDMConnection mdmConn = SwitchHelpers.MDMCONNECTION_SWITCH.doSwitch(conn);
|
||||
if (mdmConn != null) {
|
||||
mdmConn.setPathname(url);
|
||||
}
|
||||
// MOD qiongli 2011-1-9 feature 16796
|
||||
DelimitedFileConnection dfConnection = SwitchHelpers.DELIMITEDFILECONNECTION_SWITCH.doSwitch(conn);
|
||||
if (dfConnection != null) {
|
||||
@@ -260,6 +268,11 @@ public final class JavaSqlFactory {
|
||||
DatabaseConnection dbConn = SwitchHelpers.DATABASECONNECTION_SWITCH.doSwitch(conn);
|
||||
if (dbConn != null) {
|
||||
userName = getOriginalValueConnection(dbConn).getUsername();// root
|
||||
} else {
|
||||
MDMConnection mdmConn = SwitchHelpers.MDMCONNECTION_SWITCH.doSwitch(conn);
|
||||
if (mdmConn != null) {
|
||||
userName = mdmConn.getUsername();
|
||||
}
|
||||
}
|
||||
if (userName == null) {
|
||||
userName = "";//$NON-NLS-1$
|
||||
@@ -283,6 +296,11 @@ public final class JavaSqlFactory {
|
||||
} else {
|
||||
psw = getOriginalValueConnection(dbConn).getRawPassword();// ""
|
||||
}
|
||||
} else {
|
||||
MDMConnection mdmConn = SwitchHelpers.MDMCONNECTION_SWITCH.doSwitch(conn);
|
||||
if (mdmConn != null) {
|
||||
psw = ConnectionHelper.getPassword(mdmConn);
|
||||
}
|
||||
}
|
||||
if (psw == null) {
|
||||
psw = "";//$NON-NLS-1$
|
||||
@@ -535,6 +553,10 @@ public final class JavaSqlFactory {
|
||||
}
|
||||
return url;
|
||||
}
|
||||
MDMConnection mdmConn = SwitchHelpers.MDMCONNECTION_SWITCH.doSwitch(conn);
|
||||
if (mdmConn != null) {
|
||||
return mdmConn.getPathname();
|
||||
}
|
||||
// MOD qiongli 2011-1-11 feature 16796.
|
||||
DelimitedFileConnection dfConnection = SwitchHelpers.DELIMITEDFILECONNECTION_SWITCH.doSwitch(conn);
|
||||
if (dfConnection != null) {
|
||||
@@ -698,6 +720,10 @@ public final class JavaSqlFactory {
|
||||
if (dbConn != null) {
|
||||
return getOriginalValueConnection(dbConn).getServerName();
|
||||
}
|
||||
MDMConnection mdmConn = SwitchHelpers.MDMCONNECTION_SWITCH.doSwitch(conn);
|
||||
if (mdmConn != null) {
|
||||
return mdmConn.getServer();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -725,6 +751,10 @@ public final class JavaSqlFactory {
|
||||
if (dbConn != null) {
|
||||
dbConn.setServerName(serverName);
|
||||
}
|
||||
MDMConnection mdmConn = SwitchHelpers.MDMCONNECTION_SWITCH.doSwitch(conn);
|
||||
if (mdmConn != null) {
|
||||
mdmConn.setServer(serverName);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -738,6 +768,10 @@ public final class JavaSqlFactory {
|
||||
if (dbConn != null) {
|
||||
return getOriginalValueConnection(dbConn).getPort();
|
||||
}
|
||||
MDMConnection mdmConn = SwitchHelpers.MDMCONNECTION_SWITCH.doSwitch(conn);
|
||||
if (mdmConn != null) {
|
||||
return mdmConn.getPort();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -752,6 +786,10 @@ public final class JavaSqlFactory {
|
||||
if (dbConn != null) {
|
||||
dbConn.setPort(port);
|
||||
}
|
||||
MDMConnection mdmConn = SwitchHelpers.MDMCONNECTION_SWITCH.doSwitch(conn);
|
||||
if (mdmConn != null) {
|
||||
mdmConn.setPort(port);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -765,6 +803,10 @@ public final class JavaSqlFactory {
|
||||
if (dbConn != null) {
|
||||
return getOriginalValueConnection(dbConn).getSID();
|
||||
}
|
||||
MDMConnection mdmConn = SwitchHelpers.MDMCONNECTION_SWITCH.doSwitch(conn);
|
||||
if (mdmConn != null) {
|
||||
return mdmConn.getContext();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -779,6 +821,10 @@ public final class JavaSqlFactory {
|
||||
if (dbConn != null) {
|
||||
dbConn.setSID(sid);
|
||||
}
|
||||
MDMConnection mdmConn = SwitchHelpers.MDMCONNECTION_SWITCH.doSwitch(conn);
|
||||
if (mdmConn != null) {
|
||||
mdmConn.setContext(sid);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -100,8 +100,6 @@ public class MigrationToolService implements IMigrationToolService {
|
||||
private static final String PROPERTIES_REDO_ENCRYPTION_MIGRATION_TASKS = "talend.property.migration.redoEncryption"; //$NON-NLS-1$
|
||||
|
||||
private static final String RELATION_TASK = "org.talend.repository.model.migration.AutoUpdateRelationsMigrationTask"; //$NON-NLS-1$
|
||||
|
||||
private static final String TACOKIT_METADATA_UPGRADE_TASK = "org.talend.sdk.component.studio.metadata.migration.UpgradeTacokitMetadataMigrationTask";
|
||||
|
||||
private List<IProjectMigrationTask> doneThisSession;
|
||||
|
||||
@@ -248,7 +246,7 @@ public class MigrationToolService implements IMigrationToolService {
|
||||
final List<MigrationTask> done = new ArrayList<MigrationTask>(storedMigrations);
|
||||
boolean hasTaskToExecute = toExecute.stream()
|
||||
.anyMatch(task -> !task.isDeprecated() && MigrationUtil.findMigrationTask(done, task) == null);
|
||||
|
||||
|
||||
// force to redo the migration task for the relations only if user ask for "clean" or if relations is empty
|
||||
// or if there is at least another migration to do.
|
||||
if (!beforeLogon && (!RelationshipItemBuilder.INDEX_VERSION.equals(project.getEmfProject().getItemsRelationVersion())
|
||||
@@ -522,7 +520,6 @@ public class MigrationToolService implements IMigrationToolService {
|
||||
needSave = true;
|
||||
}
|
||||
if (needSave) {
|
||||
MigrationUtil.removeMigrationTaskById(done, TACOKIT_METADATA_UPGRADE_TASK);
|
||||
saveProjectMigrationTasksDone(project, done);
|
||||
}
|
||||
if (!RelationshipItemBuilder.INDEX_VERSION.equals(project.getEmfProject().getItemsRelationVersion())) {
|
||||
@@ -599,7 +596,7 @@ public class MigrationToolService implements IMigrationToolService {
|
||||
}
|
||||
sortMigrationTasks(allMigrations);
|
||||
for (IProjectMigrationTask task : allMigrations) {
|
||||
if (RELATION_TASK.equals(task.getId()) || TACOKIT_METADATA_UPGRADE_TASK.equals(task.getId())) {
|
||||
if (RELATION_TASK.equals(task.getId())) {
|
||||
continue;
|
||||
}
|
||||
task.setStatus(ExecutionResult.NOTHING_TO_DO);
|
||||
|
||||
@@ -120,10 +120,7 @@ public class TacokitDatabaseConnectionImpl extends DatabaseConnectionImpl implem
|
||||
HashMap<String, Object> map = new HashMap<String, Object>();
|
||||
map.put(KEY_DRIVER_PATH, driverJar);
|
||||
map.put(KEY_DRIVER_NAME, null);
|
||||
// TDQ-21562: fix add twice when import the project from login
|
||||
if (!drivers.contains(map)) {
|
||||
drivers.add(map);
|
||||
}
|
||||
drivers.add(map);
|
||||
}
|
||||
this.getProperties().put(KEY_DRIVER, drivers.toString());
|
||||
}
|
||||
@@ -257,11 +254,7 @@ public class TacokitDatabaseConnectionImpl extends DatabaseConnectionImpl implem
|
||||
*/
|
||||
@Override
|
||||
public String getDbmsId() {
|
||||
String mappingFile = getDatabaseMappingFile();
|
||||
if ("null".equals(mappingFile)) {
|
||||
return null;
|
||||
}
|
||||
return mappingFile;
|
||||
return getDatabaseMappingFile();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user