Compare commits

..

1 Commits

Author SHA1 Message Date
bhe-talendbj
001a87fd8c feat(TUP-29700): move preference settings to libraries page (#3990) (#3998) 2021-01-15 14:25:52 +08:00
66 changed files with 120 additions and 955 deletions

View File

@@ -26,7 +26,6 @@ import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Text;
import org.talend.commons.ui.runtime.ws.WindowSystem;
/**
* Create a Label and a Text.
@@ -154,14 +153,7 @@ public class LabelledText {
});
GridDataFactory.swtDefaults().applyTo(label);
// For Big Sur, to avoid the password autofill dialog.
if (WindowSystem.isBigSurOrLater() && ((styleField & SWT.PASSWORD) != 0)) {
styleField ^= SWT.PASSWORD;
text = new Text(composite, styleField);
text.setEchoChar('*');
} else {
text = new Text(composite, styleField);
}
text = new Text(composite, styleField);
text.selectAll(); // enable fast erase use
int gridDataStyle = SWT.NONE;
if (isFill) {

View File

@@ -15,7 +15,6 @@ package org.talend.commons.ui.swt.linking;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
@@ -78,8 +77,6 @@ public class TreeToTablesLinker<D1, D2> extends BgDrawableComposite implements I
private List<LinkableTable> linkableTableList;
private HashMap<Table, Point> tableToCommonPointMap = new HashMap<Table, Point>();
/**
* DOC amaumont TreeToTableLinker constructor comment.
*
@@ -261,34 +258,8 @@ public class TreeToTablesLinker<D1, D2> extends BgDrawableComposite implements I
Point offset = getOffset();
if (WindowSystem.isBigSurOrLater()) {
if (yStraight < tree.getBounds().y + treeItemHeight) {
yStraight = tree.getBounds().y + treeItemHeight;
}
if (yStraight > tree.getBounds().height + tree.getBounds().y + treeItemHeight) {
yStraight = tree.getBounds().height + tree.getBounds().y + treeItemHeight;
}
pointEndStraight = new Point(treeToCommonPoint.x + tree.getClientArea().width, yStraight);
if (tableToCommonPointMap.get(table) == null) {
tableToCommonPointMap.put(table, display.map(table, getBgDrawableComposite(), new Point(0, 0)));
}
// scroll issue for table
if (tableToCommonPoint.y != tableToCommonPointMap.get(table).y) {
pointEndCentralCurve.y = tableToCommonPoint.y + tableItemBounds.y
+ table.getItemHeight() / 2;
}
if (pointEndCentralCurve.y < tableToCommonPointMap.get(table).y) {
pointEndCentralCurve.y = tableToCommonPointMap.get(table).y;
}
if (pointEndCentralCurve.y > tableToCommonPointMap.get(table).y + tableBounds.height - table.getBorderWidth()
- table.getHeaderHeight()) {
pointEndCentralCurve.y = tableToCommonPointMap.get(table).y + tableBounds.height - table.getBorderWidth()
- table.getHeaderHeight();
}
} else {
gc.drawLine(pointStartStraight.x + offset.x, pointStartStraight.y + offset.y, pointEndStraight.x + offset.x,
pointEndStraight.y + offset.y);
}
gc.drawLine(pointStartStraight.x + offset.x, pointStartStraight.y + offset.y, pointEndStraight.x + offset.x,
pointEndStraight.y + offset.y);
pointEndStraight.x += offset.x;
pointEndStraight.y += offset.y;

View File

@@ -109,8 +109,4 @@ public interface FileConstants {
String SPRING_FOLDER_NAME = "META-INF/spring"; //$NON-NLS-1$
String TALEND_FOLDER_NAME = "TALEND-INF"; //$NON-NLS-1$
String MAVEN_FOLDER_NAME = "MAVEN-INF";
}

View File

@@ -205,27 +205,6 @@ public class StandaloneConnectionContextUtils {
cloneConn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_ADDITIONAL_JDBC_SETTINGS,
getOriginalValue(contextProperties, additionalJDBCSettings));
String dataprocProjectId = cloneConn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_PROJECT_ID);
cloneConn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_PROJECT_ID,
getOriginalValue(contextProperties, dataprocProjectId));
String dataprocClusterId = cloneConn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_CLUSTER_ID);
cloneConn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_CLUSTER_ID,
getOriginalValue(contextProperties, dataprocClusterId));
String dataprocRegion = cloneConn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_REGION);
cloneConn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_REGION,
getOriginalValue(contextProperties, dataprocRegion));
String dataprocJarsBucket = cloneConn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_JARS_BUCKET);
cloneConn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_JARS_BUCKET,
getOriginalValue(contextProperties, dataprocJarsBucket));
String dataprocPathToCredentials = cloneConn.getParameters()
.get(ConnParameterKeys.CONN_PARA_KEY_HIVE_AUTHENTICATION_PATH_TO_GOOGLE_CREDENTIALS);
cloneConn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_AUTHENTICATION_PATH_TO_GOOGLE_CREDENTIALS,
getOriginalValue(contextProperties, dataprocPathToCredentials));
String hiveEnableHa = cloneConn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_ENABLE_HA);
cloneConn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_ENABLE_HA,
getOriginalValue(contextProperties, hiveEnableHa));

View File

@@ -163,18 +163,6 @@ public class ConnParameterKeys {
public static final String CONN_PARA_KEY_HIVE_AUTHENTICATION_MAPRTICKET_DURATION = "CONN_PARA_KEY_HIVE_AUTHENTICATION_MAPRTICKET_DURATION";//$NON-NLS-1$
public static final String CONN_PARA_KEY_HIVE_GOOGLE_PROJECT_ID = "CONN_PARA_KEY_HIVE_GOOGLE_PROJECT_ID";//$NON-NLS-1$
public static final String CONN_PARA_KEY_HIVE_GOOGLE_CLUSTER_ID = "CONN_PARA_KEY_HIVE_GOOGLE_CLUSTER_ID";//$NON-NLS-1$
public static final String CONN_PARA_KEY_HIVE_GOOGLE_REGION = "CONN_PARA_KEY_HIVE_GOOGLE_REGION";//$NON-NLS-1$
public static final String CONN_PARA_KEY_HIVE_GOOGLE_JARS_BUCKET = "CONN_PARA_KEY_HIVE_GOOGLE_JARS_BUCKET";//$NON-NLS-1$
public static final String CONN_PARA_KEY_HIVE_AUTHENTICATION_DEFINE_PATH_TO_GOOGLE_CREDENTIALS = "CONN_PARA_KEY_HIVE_AUTHENTICATION_DEFINE_PATH_TO_GOOGLE_CREDENTIALS";//$NON-NLS-1$
public static final String CONN_PARA_KEY_HIVE_AUTHENTICATION_PATH_TO_GOOGLE_CREDENTIALS = "CONN_PARA_KEY_HIVE_AUTHENTICATION_PATH_TO_GOOGLE_CREDENTIALS";//$NON-NLS-1$
/**
* The key is for metastore server.
*/

View File

@@ -20,8 +20,6 @@ package org.talend.core.hadoop;
public class HadoopConstants {
public static final String SPARK_LOCAL_MODE = "SPARK_LOCAL_MODE";
public static final String SPARK_LOCAL_VERSION = "SPARK_LOCAL_VERSION";
public static final String SPARK_MODE = "SPARK_MODE";

View File

@@ -1769,38 +1769,6 @@ public class RepositoryToComponentProperty {
if ("IMPALA_DRIVER".equals(value)) {
return connection.getParameters().get(ConnParameterKeys.IMPALA_DRIVER);
}
if (value.equals("GOOGLE_PROJECT_ID")) {
String projectId = connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_PROJECT_ID);
return getAppropriateValue(connection, projectId);
}
if (value.equals("GOOGLE_CLUSTER_ID")) {
String clusterId = connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_CLUSTER_ID);
return getAppropriateValue(connection, clusterId);
}
if (value.equals("GOOGLE_REGION")) {
String region = connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_REGION);
return getAppropriateValue(connection, region);
}
if (value.equals("GOOGLE_JARS_BUCKET")) {
String jarsBucket = connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_JARS_BUCKET);
return getAppropriateValue(connection, jarsBucket);
}
if (value.equals("DEFINE_PATH_TO_GOOGLE_CREDENTIALS")) {
String usePathToCredentials = connection.getParameters()
.get(ConnParameterKeys.CONN_PARA_KEY_HIVE_AUTHENTICATION_DEFINE_PATH_TO_GOOGLE_CREDENTIALS);
return Boolean.parseBoolean(usePathToCredentials);
}
if (value.equals("PATH_TO_GOOGLE_CREDENTIALS")) {
String pathToCredentials = connection.getParameters()
.get(ConnParameterKeys.CONN_PARA_KEY_HIVE_AUTHENTICATION_PATH_TO_GOOGLE_CREDENTIALS);
return getAppropriateValue(connection, pathToCredentials);
}
return null;
}

View File

@@ -232,6 +232,4 @@ public interface IElementParameter {
public boolean isSerialized();
public void setSerialized(boolean isSerialized);
public boolean isSelectedFromItemValue();
}

View File

@@ -131,6 +131,4 @@ public interface IProcess extends IElement {
public void checkStartNodes();
public String getComponentsType();
public INode getNodeByUniqueName(String uniqueName);
}

View File

@@ -21,7 +21,6 @@ import java.util.List;
import java.util.Map;
import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.exception.PersistenceException;
import org.talend.commons.utils.VersionUtils;
@@ -54,7 +53,6 @@ import org.talend.core.utils.BitwiseOptionUtils;
import org.talend.designer.core.IDesignerCoreService;
import org.talend.designer.core.model.utils.emf.talendfile.ContextParameterType;
import org.talend.designer.core.model.utils.emf.talendfile.ContextType;
import org.talend.designer.core.model.utils.emf.talendfile.ElementParameterType;
import org.talend.designer.core.model.utils.emf.talendfile.MetadataType;
import org.talend.designer.core.model.utils.emf.talendfile.NodeType;
import org.talend.designer.core.model.utils.emf.talendfile.ProcessType;
@@ -1006,7 +1004,7 @@ public final class ProcessUtils {
}
return false;
}
public static boolean isChildRouteProcess(IProcess process) {
if (process != null) {
for (INode node : process.getGraphicalNodes()) {
@@ -1023,32 +1021,4 @@ public final class ProcessUtils {
return StringEscapeUtils.escapeJava(input);
}
public static boolean hasJettyEndpoint(ProcessType process) {
EList<NodeType> nodesList = process.getNode();
boolean hasJettyEndpoint = hasJettyEndpoint(nodesList);
return hasJettyEndpoint;
}
private static boolean hasJettyEndpoint(EList<NodeType> nodesList) {
for (NodeType node : nodesList) {
if ("cMessagingEndpoint".equals(node.getComponentName())) {
for (Object elementParameter : node.getElementParameter()) {
ElementParameterType elementParameterType = (ElementParameterType)elementParameter;
String name = elementParameterType.getName();
String value = elementParameterType.getValue();
if ("URI".equals(name) && (value != null && StringUtils.startsWith(value.trim(), "\"jetty:"))) {
return true;
}
}
}
}
return false;
}
}

View File

@@ -30,7 +30,5 @@ public interface IHDistribution {
IHDistributionVersion getHDVersion(String v, boolean byDisplay);
boolean useCustom();
boolean isSparkLocal();
}

View File

@@ -46,8 +46,6 @@ public interface MavenConstants {
static final String EXCLUDE_DELETED_ITEMS = "EXCLUDE_DELETED_ITEMS";
static final String SKIP_FOLDERS = "SKIP_FOLDERS";
/*
* for lib
*/

View File

@@ -51,8 +51,6 @@ public interface TalendProcessArgumentConstant {
static final String ARG_NEED_XMLMAPPINGS = "NEED_XMLMAPPINGS";
static final String ARG_NEED_RULES = "NEED_RULES";
static final String ARG_NEED_JETTY_SERVER = "NEED_JETTY_SERVER";
static final String ARG_ENABLE_WATCH = "ENABLE_WATCH";

View File

@@ -17,11 +17,9 @@ import java.nio.file.Path;
import java.util.Set;
import java.util.stream.Stream;
import org.eclipse.swt.graphics.Image;
import org.talend.core.IService;
import org.talend.core.model.components.IComponent;
import org.talend.core.model.properties.Item;
import org.talend.core.model.repository.ERepositoryObjectType;
/**
* For documentation, see implementation in org.talend.sdk.component.studio-integration plugin
@@ -35,6 +33,4 @@ public interface ITaCoKitDependencyService extends IService {
Stream<IComponent> getJobComponents(Item item);
Path findM2Path();
Image getTaCoKitImageByRepositoryType(ERepositoryObjectType repObjType);
}

View File

@@ -1046,10 +1046,4 @@ public class ObjectElementParameter implements IElementParameter {
public void setSerialized(boolean isSerialized) {
// TODO Auto-generated method stub
}
@Override
public boolean isSelectedFromItemValue() {
// TODO Auto-generated method stub
return false;
}
}

View File

@@ -1012,8 +1012,7 @@ public class ProcessorUtilities {
checkedContext = checkCleanSecureContextParameterValue(checkedContext, jobInfo);
processor.setContext(checkedContext); // generate current context.
} else {
IContext checkedContext = checkCleanSecureContextParameterValue(context, jobInfo);
processor.setContext(checkedContext);
processor.setContext(context);
}
LastGenerationInfo.getInstance().getContextPerJob(jobInfo.getJobId(), jobInfo.getJobVersion()).add(
context.getName());

View File

@@ -135,12 +135,6 @@
<groupId>org.talend.components</groupId>
<artifactId>components-marketo-runtime</artifactId>
<version>${components.version}</version>
<exclusions>
<exclusion>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>txw2</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.talend.components</groupId>

View File

@@ -11,7 +11,7 @@
<packaging>pom</packaging>
<properties>
<tcomp.version>1.29.1</tcomp.version>
<tcomp.version>1.28.1</tcomp.version>
<slf4j.version>1.7.25</slf4j.version>
</properties>

View File

@@ -14,5 +14,4 @@ AbstractPersistentProjectSettingPage.syncAllPoms=Do you want to update all poms?
MavenProjectSettingPage.filterExampleMessage=Filter examples:\nlabel=myJob \t\t\t\t=> Generate only the job named "myJob"\n!(label=myJob) \t\t\t\t=> Generate any job except the one named "myJob"\n(path=folder1/folder2) \t\t\t=> Generate any job in the folder "folder1/folder2"\n(path=folder1/folder2)or(label=myJob)\t=> Generate any job in the folder "folder1/folder2" or named "myJob"\n(label=myJob)and(version=0.2) \t=> Generate only the job named "myJob" with version 0.2\n!((label=myJob)and(version=0.1)) \t=> Generate every jobs except the "myJob" version 0.1
MavenProjectSettingPage.refModuleText=Set reference project modules in profile
MavenProjectSettingPage.excludeDeletedItems=Exclude deleted items
MavenProjectSettingPage.syncAllPomsWarning=Click the Force full re-synchronize poms button to apply the new settings.
MavenProjectSettingPage.skipFolders=Skip folders
MavenProjectSettingPage.syncAllPomsWarning=Click the Force full re-synchronize poms button to apply the new settings.

View File

@@ -55,8 +55,6 @@ public class MavenProjectSettingPage extends AbstractProjectSettingPage {
private Button excludeDeletedItemsCheckbox;
private Button skipFoldersCheckbox;
public MavenProjectSettingPage() {
noDefaultAndApplyButton();
}
@@ -113,17 +111,6 @@ public class MavenProjectSettingPage extends AbstractProjectSettingPage {
}
});
skipFoldersCheckbox = new Button(parent, SWT.CHECK);
skipFoldersCheckbox.setText(Messages.getString("MavenProjectSettingPage.skipFolders")); //$NON-NLS-1$
skipFoldersCheckbox.setSelection(preferenceStore.getBoolean(MavenConstants.SKIP_FOLDERS));
skipFoldersCheckbox.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
addSyncWarning();
}
});
filterText.setText(filter);
filterText.addModifyListener(new ModifyListener() {
@@ -182,7 +169,6 @@ public class MavenProjectSettingPage extends AbstractProjectSettingPage {
preferenceStore.setValue(MavenConstants.POM_FILTER, getRealVersionFilter(filter));
preferenceStore.setValue(MavenConstants.USE_PROFILE_MODULE, useProfileModuleCheckbox.getSelection());
preferenceStore.setValue(MavenConstants.EXCLUDE_DELETED_ITEMS, excludeDeletedItemsCheckbox.getSelection());
preferenceStore.setValue(MavenConstants.SKIP_FOLDERS, skipFoldersCheckbox.getSelection());
}
return ok;
}

View File

@@ -607,12 +607,7 @@ public class AggregatorPomsHelper {
String version = realVersion == null ? property.getVersion() : realVersion;
String jobFolderName = getJobProjectFolderName(property.getLabel(), version);
ERepositoryObjectType type = ERepositoryObjectType.getItemType(property.getItem());
IFolder jobFolder = null;
if (PomIdsHelper.skipFolders()) {
jobFolder = helper.getProcessFolder(type).getFolder(jobFolderName);
} else {
jobFolder = helper.getProcessFolder(type).getFolder(itemRelativePath).getFolder(jobFolderName);
}
IFolder jobFolder = helper.getProcessFolder(type).getFolder(itemRelativePath).getFolder(jobFolderName);
List<ERepositoryObjectType> allTypesOfProcess2 = ERepositoryObjectType.getAllTypesOfProcess2();
if (allTypesOfProcess2.contains(type)) {
createFoldersIfNeeded(jobFolder);

View File

@@ -317,12 +317,6 @@ public class PomIdsHelper {
return PREFIX_DEFAULT_GROUPID + projectName.toLowerCase();
}
public static boolean skipFolders() {
String projectTechName = ProjectManager.getInstance().getCurrentProject().getTechnicalLabel();
ProjectPreferenceManager manager = getPreferenceManager(projectTechName);
return manager.getBoolean(MavenConstants.SKIP_FOLDERS);
}
public static boolean isValidGroupId(String text) {
if (text != null && text.matches("[\\w\\.]+")) { //$NON-NLS-1$
return true;

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.talend.libraries.apache.google</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@@ -0,0 +1,6 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Google
Bundle-SymbolicName: org.talend.libraries.apache.google
Bundle-Version: 7.3.1.qualifier
Eclipse-BundleShape: dir

View File

@@ -0,0 +1 @@
jarprocessor.exclude.children=true

View File

@@ -0,0 +1,4 @@
output.. = bin/
bin.includes = META-INF/,\
.,\
lib/

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.3.1-PATCH</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.libraries.apache.google</artifactId>
<packaging>eclipse-plugin</packaging>
</project>

View File

@@ -15,7 +15,11 @@ package org.talend.librariesmanager.ui.startup;
import org.eclipse.ui.IStartup;
import java.util.logging.Logger;
import org.talend.librariesmanager.prefs.LibrariesManagerUtils;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.core.runtime.preferences.InstanceScope;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.utils.network.NetworkUtil;
import org.talend.core.prefs.ITalendCorePrefConstants;
/**
* created by wchen on 2015-6-15 Detailled comment
@@ -37,11 +41,21 @@ public class ShareLibsSynchronizer implements IStartup {
ShareCILibsJob ciJob = new ShareCILibsJob();
ciJob.schedule();
if (LibrariesManagerUtils.shareLibsAtStartup()) {
if (shareLibsAtStartup()) {
ShareLibsJob job = new ShareLibsJob();
job.schedule();
} else {
LOGGER.info("Skip sharing libraries");
}
}
public boolean shareLibsAtStartup() {
boolean ret = ITalendCorePrefConstants.NEXUS_SHARE_LIBS_DEFAULT;
try {
IEclipsePreferences node = InstanceScope.INSTANCE.getNode(NetworkUtil.ORG_TALEND_DESIGNER_CORE);
ret = node.getBoolean(ITalendCorePrefConstants.NEXUS_SHARE_LIBS, ITalendCorePrefConstants.NEXUS_SHARE_LIBS_DEFAULT);
} catch (Throwable e) {
ExceptionHandler.process(e);
}
LOGGER.info("shareLibsAtStartup: " + ret);
return ret;
}
}

View File

@@ -16,8 +16,6 @@ import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.lang.String;
import java.util.Dictionary;
public final class BundleUtils {
@@ -63,23 +61,6 @@ public final class BundleUtils {
}
}
public static Object getService(String svcClass) {
if (BUNDLE == null) {
return null;
}
try {
Method getBundleContext = BUNDLE.getClass().getMethod("getBundleContext");
Object context = getBundleContext.invoke(BUNDLE);
Class<?> ctxClass = context.getClass();
Method getServiceReference = ctxClass.getMethod("getServiceReference", String.class);
Object serviceReference = getServiceReference.invoke(context, svcClass);
Method getService = ctxClass.getMethod("getService", SERVICE_REFERENCE_CLASS);
return (Object)getService.invoke(context, serviceReference);
} catch (Exception e) {
return null;
}
}
public static <T> T getService(Class<T> svcClass, Object bundleContext) {
if (BUNDLE_CONTEXT_CLASS == null || bundleContext == null) {
return null;
@@ -121,25 +102,7 @@ public final class BundleUtils {
return services;
}
}
public static Dictionary<String, Object> getJobProperties(String jobName) {
try {
Object configAdminObject = getService("org.osgi.service.cm.ConfigurationAdmin");
Method getConfigurationMethod = configAdminObject.getClass().getMethod("getConfiguration", String.class);
Object configAdminJobConfiguration = getConfigurationMethod.invoke(configAdminObject, jobName);
Method getPropertiesMethod = configAdminJobConfiguration.getClass().getMethod("getProperties", null);
Dictionary<String, Object> jobProperties = (Dictionary<String, Object>)getPropertiesMethod.invoke(configAdminJobConfiguration, null);
return jobProperties;
} catch(Exception e) {
return null;
}
}
public static boolean inOSGi() {
return BUNDLE != null;

View File

@@ -1,23 +0,0 @@
<%
EXTRACT(__GROUPBY__);
EXTRACT(__OPERATION__);
String operation = "";
boolean flag=false;
for(int i=0; i < __OPERATION_INPUT_COLUMN__.length; i++){
if(flag){
operation += ",";
}else{
flag=true;
}
if (__OPERATION_FUNCTION__[i]!= null && __OPERATION_FUNCTION__[i].indexOf("@COLUMN") != -1) {
operation += __OPERATION_FUNCTION__[i].replaceAll("@COLUMN", __OPERATION_INPUT_COLUMN__[i]);
} else {
operation += (__OPERATION_FUNCTION__[i] + "(" + __OPERATION_INPUT_COLUMN__[i] + ")");
}
}
%>
INSERT INTO <%=__DATABASE_NAME__%>.<%=__TABLE_NAME_TARGET__%>
SELECT <%= operation %>, <%= StringUtils.list(__GROUPBY_INPUT_COLUMN__, ",") %> FROM <%=__DATABASE_NAME__%>.<%= __TABLE_NAME__ %>
GROUP BY <%=StringUtils.list(__GROUPBY_INPUT_COLUMN__, ",", "", "") %>;

View File

@@ -1,29 +0,0 @@
<%
EXTRACT(__SCHEMA__);
String fieldsCreated = "";
boolean flagCreated=false;
for(int i=0; i < __SCHEMA__.length; i++){
if(flagCreated){
fieldsCreated += ",";
}else{
flagCreated=true;
}
if(__SCHEMA_DBTYPE__[i].contains("VARCHAR")) {
__SCHEMA_DBTYPE__[i] = "STRING";
}
if( __SCHEMA_DBTYPE__[i].equals("DECIMAL")){
fieldsCreated += (__SCHEMA_NAME__[i] + " " + __SCHEMA_DBTYPE__[i] +" ("+ __SCHEMA_LENGTH__[i] +","+ __SCHEMA_PRECISION__[i] +") ");
} else {
fieldsCreated += (__SCHEMA_NAME__[i] + " " + __SCHEMA_DBTYPE__[i]);
}
if(__SCHEMA_NULLABLE__[i].equals("false")){
fieldsCreated += " NOT NULL";
}
}
%>
CREATE TABLE <%=__DATABASE_NAME__%>.<%= __TABLE_NAME__ %>
(
<%= fieldsCreated %>
) USING DELTA;

View File

@@ -1,29 +0,0 @@
<%
EXTRACT(__SCHEMA__);
String fieldsCreated = "";
boolean flagCreated=false;
for(int i=0; i < __SCHEMA__.length; i++){
if(flagCreated){
fieldsCreated += ",";
}else{
flagCreated=true;
}
if(__SCHEMA_DBTYPE__[i].contains("VARCHAR")) {
__SCHEMA_DBTYPE__[i] = "STRING";
}
if( __SCHEMA_DBTYPE__[i].equals("DECIMAL")){
fieldsCreated += (__SCHEMA_NAME__[i] + " " + __SCHEMA_DBTYPE__[i] +" ("+ __SCHEMA_LENGTH__[i] +","+ __SCHEMA_PRECISION__[i] +") ");
} else {
fieldsCreated += (__SCHEMA_NAME__[i] + " " + __SCHEMA_DBTYPE__[i]);
}
if(__SCHEMA_NULLABLE__[i].equals("false")){
fieldsCreated += " NOT NULL";
}
}
%>
CREATE TABLE <%=__DATABASE_NAME__%>.<%= __TABLE_NAME__ %>
(
<%= fieldsCreated %>
);

View File

@@ -1,2 +0,0 @@
-- DROP SOURCE TABLE
DROP TABLE <%=__DATABASE_NAME__%>.<%= __TABLE_NAME__ %>;

View File

@@ -1,15 +0,0 @@
<%
EXTRACT(__TABLE_SCHEMA__);
String fields = "";
boolean flag=false;
for(int i=0; i < __TABLE_SCHEMA_LENGTH__; i++){
if(__TABLE_SCHEMA_KEY_ATTRIBUTE__[i].equals("true")){
fields += __TABLE_SCHEMA_SCHEMA_COLUMN__[i] +",";
}
}
if(!fields.equals("") && fields.length()>0){
fields = fields.substring(0,fields.length()-1);
}
%>
INSERT INTO <%=__DATABASE_NAME__%>.<%=__TABLE_NAME_TARGET__%>
SELECT <%= fields %> FROM <%=__DATABASE_NAME__%>.<%= __TABLE_NAME__ %>;

View File

@@ -1,7 +0,0 @@
<%
EXTRACT(__SCHEMA__);
EXTRACT(__SCHEMA_TARGET__);
%>
INSERT INTO <%=__DATABASE_NAME__%>.<%=__TABLE_NAME_TARGET__%>
SELECT <%= StringUtils.list(__SCHEMA_NAME__, ",") %> FROM <%=__DATABASE_NAME__%>.<%= __TABLE_NAME__ %>
WHERE <%=__WHERE_CLAUSE__%>;

View File

@@ -1,101 +0,0 @@
-- This pattern generates a merge statement for Snowflake
--(c) 2019 Talend Inc.
<%
EXTRACT(__MERGE_ON__);
EXTRACT(__UPDATE_MAPPING__);
EXTRACT(__ADDITIONAL_UPDATE_COLUMNS__);
EXTRACT(__INSERT_MAPPING__);
EXTRACT(__ADDITIONAL_INSERT_COLUMNS__);
String dbType = "__DBTYPE__";
boolean hasUpdateClause = __USE_UPDATE__;
boolean hasAddtionalUpdateColumns = __SPECIFY_ADDITIONAL_UPDATE_COLUMNS__;
boolean hasUpdateWhereClause = __SPECIFY_UPDATE_WHERE_CLAUSE__;
boolean hasInsertClause = __USE_INSERT__;
boolean hasAdditionalInsertColumns = __SPECIFY_ADDITIONAL_INSERT_COLUMNS__;
boolean hasInsertWhereClause = __SPECIFY_INSERT_WHERE_CLAUSE__;
boolean flag = false;
String mergeOnStr = "";
for(int i=0; i < __MERGE_ON_SRC_COLUMN__.length; i++){
if (flag) {
mergeOnStr += " AND ";
} else {
flag = true;
}
mergeOnStr += (__TARGET_TABLE__ + "." + __MERGE_ON_TRG_COLUMN__[i] + " = " + __SOURCE_TABLE__ + "." + __MERGE_ON_SRC_COLUMN__[i]);
}
String updateStr = "";
String updateWhereStr = "";
flag = false;
if (hasUpdateClause) {
for(int i=0; i < __UPDATE_MAPPING_SRC_COLUMN__.length; i++) {
if (flag) {
updateStr += ",";
} else {
flag = true;
}
updateStr += (__TARGET_TABLE__ + "." + __UPDATE_MAPPING_TRG_COLUMN__[i] + " = " + __SOURCE_TABLE__ + "." + __UPDATE_MAPPING_SRC_COLUMN__[i]);
}
if (hasAddtionalUpdateColumns) {
for(int i=0; i < __ADDITIONAL_UPDATE_COLUMNS_TRG_COLUMN_VALUE__.length; i++) {
if (flag) {
updateStr += ",";
} else {
flag = true;
}
updateStr += (__TARGET_TABLE__ + "." + __ADDITIONAL_UPDATE_COLUMNS_TRG_COLUMN_NAME__[i] + " = " + __ADDITIONAL_UPDATE_COLUMNS_TRG_COLUMN_VALUE__[i]);
}
}
if (hasUpdateWhereClause) {
updateWhereStr = " " + __UPDATE_WHERE_CLAUSE__ + " ";
}
}
String insertColumnsStr = "";
String insertValuesStr = "";
String insertWhereStr = "";
String insertStr = "";
flag = false;
if (hasInsertClause) {
for(int i=0; i < __INSERT_MAPPING_TRG_COLUMN__.length; i++) {
if (flag) {
insertColumnsStr += ",";
insertValuesStr += ",";
} else {
flag = true;
}
insertColumnsStr += (__TARGET_TABLE__ + "." + __INSERT_MAPPING_TRG_COLUMN__[i]);
insertValuesStr += (__SOURCE_TABLE__ + "." + __INSERT_MAPPING_SRC_COLUMN__[i]);
}
if (hasAdditionalInsertColumns) {
for(int i=0; i < __ADDITIONAL_INSERT_COLUMNS_TRG_COLUMN_NAME__.length; i++) {
if (flag) {
insertColumnsStr += ",";
insertValuesStr += ",";
} else {
flag = true;
}
insertColumnsStr += (__TARGET_TABLE__ + "." + __ADDITIONAL_INSERT_COLUMNS_TRG_COLUMN_NAME__[i]);
insertValuesStr += (__ADDITIONAL_INSERT_COLUMNS_TRG_COLUMN_VALUE__[i]);
}
}
if (hasInsertWhereClause) {
insertWhereStr = " " + __INSERT_WHERE_CLAUSE__ + " ";
}
insertStr = "(" + insertColumnsStr + ") VALUES (" + insertValuesStr + ")";
}
String mergeString = "";
if (hasInsertClause || hasUpdateClause) {
mergeString = "MERGE INTO " + __TARGET_TABLE__ + " USING " + __SOURCE_TABLE__ +
" ON (" + mergeOnStr + ")" +
(hasUpdateClause ? (" WHEN MATCHED " + (hasUpdateWhereClause ? ("AND " + updateWhereStr) : "") + " THEN UPDATE SET " + updateStr) : "") +
(hasInsertClause ? (" WHEN NOT MATCHED " + (hasInsertWhereClause ? ("AND " + insertWhereStr) : "") + " THEN INSERT " + insertStr) : "");
} else {
mergeString = "DELETE FROM " + __TARGET_TABLE__ + " WHERE 1=0";
}
%>
<%=mergeString%>;

View File

@@ -1359,13 +1359,7 @@ public class LocalLibraryManager implements ILibraryManagerService, IChangedLibr
}
private void deployLibsFromCustomComponents(IComponentsService service, Map<String, String> platformURLMap) {
boolean deployToRemote = true;
if (!LibrariesManagerUtils.shareLibsAtStartup()) {
log.info("Skip deploying libs from custom components");
deployToRemote = false;
}
Set<File> needToDeploy = new HashSet<>();
Set<File> needToDeploy = new HashSet<>();
List<ComponentProviderInfo> componentsFolders = service.getComponentsFactory().getComponentsProvidersInfo();
for (ComponentProviderInfo providerInfo : componentsFolders) {
String id = providerInfo.getId();
@@ -1396,19 +1390,6 @@ public class LocalLibraryManager implements ILibraryManagerService, IChangedLibr
}
}
if (!deployToRemote) {
needToDeploy.forEach(libFile -> {
try {
// install as release version if can't find mvn url from index
install(libFile, null, false, true);
} catch (Exception e) {
ExceptionHandler.process(e);
}
});
return;
}
// deploy needed jars for User and Exchange component providers
Map<String, List<MavenArtifact>> snapshotArtifactMap = new HashMap<String, List<MavenArtifact>>();
Map<String, List<MavenArtifact>> releaseArtifactMap = new HashMap<String, List<MavenArtifact>>();

View File

@@ -18,16 +18,11 @@ import java.util.List;
import java.util.Set;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.core.runtime.preferences.InstanceScope;
import org.talend.commons.exception.ExceptionHandler;
import org.talend.commons.utils.network.NetworkUtil;
import org.talend.core.GlobalServiceRegister;
import org.talend.core.language.ECodeLanguage;
import org.talend.core.model.general.ModuleNeeded;
import org.talend.core.model.general.ModuleNeeded.ELibraryInstallStatus;
import org.talend.core.model.process.INode;
import org.talend.core.prefs.ITalendCorePrefConstants;
import org.talend.designer.core.IDesignerCoreService;
import org.talend.librariesmanager.model.ModulesNeededProvider;
@@ -127,15 +122,4 @@ public class LibrariesManagerUtils {
}
return false;
}
public static boolean shareLibsAtStartup() {
boolean ret = ITalendCorePrefConstants.NEXUS_SHARE_LIBS_DEFAULT;
try {
IEclipsePreferences node = InstanceScope.INSTANCE.getNode(NetworkUtil.ORG_TALEND_DESIGNER_CORE);
ret = node.getBoolean(ITalendCorePrefConstants.NEXUS_SHARE_LIBS, ITalendCorePrefConstants.NEXUS_SHARE_LIBS_DEFAULT);
} catch (Throwable e) {
ExceptionHandler.process(e);
}
return ret;
}
}

View File

@@ -112,11 +112,6 @@ public final class DBConnectionContextUtils {
hiveUseSSL,
hiveSSLTrustStorePath,
hiveSSLTrustStorePassword,
HiveDataprocProjectId,
HiveDataprocClusterId,
HiveDataprocRegion,
HiveDataprocJarsBucket,
HiveDataprocPathToCredentials,
// hbase
MasterPrincipal,
@@ -394,27 +389,6 @@ public final class DBConnectionContextUtils {
value = conn.getValue(value, false);
ConnectionContextHelper.createParameters(varList, paramName, value, JavaTypesManager.PASSWORD);
break;
case HiveDataprocProjectId:
value = conn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_PROJECT_ID);
ConnectionContextHelper.createParameters(varList, paramName, value);
break;
case HiveDataprocClusterId:
value = conn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_CLUSTER_ID);
ConnectionContextHelper.createParameters(varList, paramName, value);
break;
case HiveDataprocRegion:
value = conn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_REGION);
ConnectionContextHelper.createParameters(varList, paramName, value);
break;
case HiveDataprocJarsBucket:
value = conn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_JARS_BUCKET);
ConnectionContextHelper.createParameters(varList, paramName, value);
break;
case HiveDataprocPathToCredentials:
value = conn.getParameters()
.get(ConnParameterKeys.CONN_PARA_KEY_HIVE_AUTHENTICATION_PATH_TO_GOOGLE_CREDENTIALS);
ConnectionContextHelper.createParameters(varList, paramName, value);
break;
default:
}
}
@@ -796,26 +770,6 @@ public final class DBConnectionContextUtils {
conn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_SSL_KEY_STORE_PASSWORD,
ContextParameterUtils.getNewScriptCode(originalVariableName, LANGUAGE));
break;
case HiveDataprocProjectId:
conn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_PROJECT_ID,
ContextParameterUtils.getNewScriptCode(originalVariableName, LANGUAGE));
break;
case HiveDataprocClusterId:
conn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_CLUSTER_ID,
ContextParameterUtils.getNewScriptCode(originalVariableName, LANGUAGE));
break;
case HiveDataprocRegion:
conn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_REGION,
ContextParameterUtils.getNewScriptCode(originalVariableName, LANGUAGE));
break;
case HiveDataprocJarsBucket:
conn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_JARS_BUCKET,
ContextParameterUtils.getNewScriptCode(originalVariableName, LANGUAGE));
break;
case HiveDataprocPathToCredentials:
conn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_AUTHENTICATION_PATH_TO_GOOGLE_CREDENTIALS,
ContextParameterUtils.getNewScriptCode(originalVariableName, LANGUAGE));
break;
default:
}
}
@@ -1151,27 +1105,6 @@ public final class DBConnectionContextUtils {
cloneConn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_ADDITIONAL_JDBC_SETTINGS,
getOriginalValue(hadoopClusterContextType, contextType, additionalJDBCSettings));
String dataprocProjectId = cloneConn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_PROJECT_ID);
cloneConn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_PROJECT_ID,
getOriginalValue(hadoopClusterContextType, contextType, dataprocProjectId));
String dataprocClusterId = cloneConn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_CLUSTER_ID);
cloneConn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_CLUSTER_ID,
getOriginalValue(hadoopClusterContextType, contextType, dataprocClusterId));
String dataprocRegion = cloneConn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_REGION);
cloneConn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_REGION,
getOriginalValue(hadoopClusterContextType, contextType, dataprocRegion));
String dataprocJarsBucket = cloneConn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_JARS_BUCKET);
cloneConn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_JARS_BUCKET,
getOriginalValue(hadoopClusterContextType, contextType, dataprocJarsBucket));
String dataprocPathToCredentials = cloneConn.getParameters()
.get(ConnParameterKeys.CONN_PARA_KEY_HIVE_AUTHENTICATION_PATH_TO_GOOGLE_CREDENTIALS);
cloneConn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_AUTHENTICATION_PATH_TO_GOOGLE_CREDENTIALS,
getOriginalValue(hadoopClusterContextType, contextType, dataprocPathToCredentials));
String hiveEnableHa = cloneConn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_ENABLE_HA);
cloneConn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_ENABLE_HA,
getOriginalValue(hadoopClusterContextType, contextType, hiveEnableHa));
@@ -1613,28 +1546,6 @@ public final class DBConnectionContextUtils {
conn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_AUTHENTICATION_MAPRTICKET_DURATION);
conn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_AUTHENTICATION_MAPRTICKET_DURATION,
ContextParameterUtils.getOriginalValue(contextType, maprticket_Duration));
String dataprocProjectId = conn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_PROJECT_ID);
conn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_PROJECT_ID,
ContextParameterUtils.getOriginalValue(contextType, dataprocProjectId));
String dataprocClusterId = conn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_CLUSTER_ID);
conn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_CLUSTER_ID,
ContextParameterUtils.getOriginalValue(contextType, dataprocClusterId));
String dataprocRegion = conn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_REGION);
conn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_REGION,
ContextParameterUtils.getOriginalValue(contextType, dataprocRegion));
String dataprocJarsBucket = conn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_JARS_BUCKET);
conn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_JARS_BUCKET,
ContextParameterUtils.getOriginalValue(contextType, dataprocJarsBucket));
String dataprocPathToCredentials = conn.getParameters()
.get(ConnParameterKeys.CONN_PARA_KEY_HIVE_AUTHENTICATION_PATH_TO_GOOGLE_CREDENTIALS);
conn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_AUTHENTICATION_PATH_TO_GOOGLE_CREDENTIALS,
ContextParameterUtils.getOriginalValue(contextType, dataprocPathToCredentials));
}
// for Hbase
if (EDatabaseTypeName.HBASE.equals(EDatabaseTypeName.getTypeFromDbType(conn.getDatabaseType()))) {

View File

@@ -22,7 +22,6 @@ import org.talend.core.model.repository.ERepositoryObjectType;
import org.talend.core.model.repository.RepositoryNodeProviderRegistryReader;
import org.talend.core.runtime.services.IGenericDBService;
import org.talend.core.runtime.services.IGenericWizardService;
import org.talend.core.service.ITaCoKitDependencyService;
import org.talend.core.ui.images.CoreImageProvider;
import org.talend.repository.items.importexport.wizard.models.FolderImportNode;
import org.talend.repository.items.importexport.wizard.models.ImportNode;
@@ -94,18 +93,10 @@ public class ImportItemsViewerLabelProvider extends LabelProvider {
wizardService = (IGenericWizardService) GlobalServiceRegister.getDefault().getService(
IGenericWizardService.class);
}
if (wizardService != null && wizardService.isGenericType(itemType)) {
image = wizardService.getNodeImage(itemType.getType());
} else {
if (GlobalServiceRegister.getDefault().isServiceRegistered(ITaCoKitDependencyService.class)) {
ITaCoKitDependencyService service = GlobalServiceRegister.getDefault()
.getService(ITaCoKitDependencyService.class);
image = service.getTaCoKitImageByRepositoryType(itemType);
}
if (image == null) {
image = RepositoryNodeProviderRegistryReader.getInstance().getImage(itemType);
}
image = RepositoryNodeProviderRegistryReader.getInstance().getImage(itemType);
}
if (image == null) {
image = CoreImageProvider.getImage(itemType);

View File

@@ -19,7 +19,6 @@ import java.util.List;
import java.util.Map;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.emf.common.util.EList;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IMenuListener;
@@ -53,7 +52,6 @@ import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeColumn;
import org.eclipse.swt.widgets.TreeItem;
import org.talend.commons.ui.runtime.ws.WindowSystem;
import org.talend.commons.ui.swt.drawing.link.IExtremityLink;
import org.talend.commons.ui.swt.drawing.link.LinkDescriptor;
import org.talend.commons.ui.swt.drawing.link.LinksManager;
@@ -196,9 +194,6 @@ public class MDMOutputSchemaForm extends AbstractMDMFileStepForm {
addSchemaViewer(mainSashFormComposite, 300, 100);
addXmlFileViewer(mainSashFormComposite, 400, 100);
mainSashFormComposite.setWeights(new int[] { 40, 60 });
if (Platform.OS_MACOSX.equals(Platform.getOS())) {
mainSashFormComposite.setSashWidth((mainSashFormComposite.getShell().getBounds().width) / 6);
}
linker = new MDMSchema2TreeLinker(mainSashFormComposite);
linker.setForm(this);
@@ -466,9 +461,6 @@ public class MDMOutputSchemaForm extends AbstractMDMFileStepForm {
column.setText(Messages.getString("MDMOutputSchemaForm_schema_list")); //$NON-NLS-1$
column.setWidth(100);
table.setLayoutData(gridData);
if (WindowSystem.isBigSurOrLater()) {
table.setLinesVisible(true);
}
}
private void fillContextMenu(IMenuManager manager) {
@@ -508,9 +500,6 @@ public class MDMOutputSchemaForm extends AbstractMDMFileStepForm {
schemaViewer.setInput(columns);
schemaViewer.refresh();
if (WindowSystem.isBigSurOrLater()) {
schemaViewer.getTable().redraw();
}
//
// EList columnList = ((MetadataTable) getConnection().getTables().get(0)).getColumns();
// columnList.clear();

View File

@@ -30,7 +30,6 @@ import org.apache.commons.beanutils.BeanUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.emf.common.util.EList;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
@@ -225,9 +224,6 @@ public class MDMXSDFileForm extends AbstractMDMFileStepForm {
this.xmlToSchemaSash = new SashForm(mainComposite, SWT.HORIZONTAL | SWT.SMOOTH);
xmlToSchemaSash.setLayoutData(new GridData(GridData.FILL_BOTH));
xmlToSchemaSash.setBackgroundMode(SWT.INHERIT_FORCE);
if (Platform.OS_MACOSX.equals(Platform.getOS())) {
xmlToSchemaSash.setSashWidth((mainComposite.getShell().getBounds().width) / 6);
}
addGroupXmlFileSettings(xmlToSchemaSash, 400, 110);
addGroupSchemaTarget(xmlToSchemaSash, 300, 110);

View File

@@ -30,7 +30,6 @@ import org.apache.commons.beanutils.BeanUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.emf.common.util.EList;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
@@ -251,9 +250,6 @@ public class MdmReceiveForm extends AbstractMDMFileStepForm {
this.xmlToSchemaSash = new SashForm(mainComposite, SWT.HORIZONTAL | SWT.SMOOTH);
xmlToSchemaSash.setLayoutData(new GridData(GridData.FILL_BOTH));
xmlToSchemaSash.setBackgroundMode(SWT.INHERIT_FORCE);
if (Platform.OS_MACOSX.equals(Platform.getOS())) {
xmlToSchemaSash.setSashWidth((mainComposite.getShell().getBounds().width) / 6);
}
addGroupXmlFileSettings(xmlToSchemaSash, 400, 110);
addGroupSchemaTarget(xmlToSchemaSash, 300, 110);

View File

@@ -204,11 +204,6 @@ public class MDMLinker extends TreeToTablesLinker<Object, Object> {
initListeners();
createLinks();
if (WindowSystem.isBigSurOrLater()) {
getBackgroundRefresher().setBackgroundColor(getBgDrawableComposite().getBackground());
getBgDrawableComposite().setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_TRANSPARENT));
this.getTree().setLinesVisible(true);
}
}
/**

View File

@@ -39,7 +39,6 @@ import org.eclipse.swt.widgets.TreeItem;
import org.eclipse.swt.widgets.Widget;
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
import org.talend.commons.ui.runtime.utils.TableUtils;
import org.talend.commons.ui.runtime.ws.WindowSystem;
import org.talend.commons.ui.swt.dialogs.EventLoopProgressMonitor;
import org.talend.commons.ui.swt.dialogs.ProgressDialog;
import org.talend.commons.ui.swt.drawing.link.ExtremityLink;
@@ -94,11 +93,6 @@ public class MDMSchema2TreeLinker extends TableToTreeLinker<Object, Object> {
getSelectedRelativeStyleLink();
initListeners();
if (WindowSystem.isBigSurOrLater()) {
getBackgroundRefresher().setBackgroundColor(getBgDrawableComposite().getBackground());
getBgDrawableComposite().setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_TRANSPARENT));
}
}
public AbstractXmlStepForm getForm() {

View File

@@ -174,7 +174,7 @@ public class ExtractionFieldsWithMDMEditorView extends AbstractDataTableEditorVi
column.setBeanPropertyAccessors(new IBeanPropertyAccessors<ConceptTarget, String>() {
public String get(ConceptTarget bean) {
return bean != null ? bean.getRelativeLoopExpression() : null;
return bean.getRelativeLoopExpression();
}
public void set(ConceptTarget bean, String value) {
@@ -333,7 +333,6 @@ public class ExtractionFieldsWithMDMEditorView extends AbstractDataTableEditorVi
if (conflictNames.contains(name)) {
getTable().getItem(i).setBackground(Display.getDefault().getSystemColor(SWT.COLOR_RED));
} else {
getTable().getItem(i).getText(); // can not display content without it for Big Sur
getTable().getItem(i).setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
}
}

View File

@@ -893,14 +893,6 @@ DatabaseForm.dbType=DB Type
DatabaseForm.dbTypeTip=Database Type defined the String of Connection and the driver
DatabaseForm.dbversion=Db Version
DatabaseForm.dbversion.tip=Please choose Db version
DatabaseForm.dataproc.projectId=Project ID
DatabaseForm.dataproc.clusterId=Cluster ID
DatabaseForm.dataproc.region=Region
DatabaseForm.dataproc.jarsBucket=Google Storage staging bucket
DatabaseForm.dataproc.button.authentication.credentials=Provide Google Credentials in file
DatabaseForm.dataproc.text.authentication.credentials=Path to Google Credentials file
DatabaseForm.general.classname=Class name
DatabaseForm.general.jarfile=Driver jar
DatabaseForm.general.mapping=Mapping file

View File

@@ -553,20 +553,6 @@ public class DatabaseForm extends AbstractForm {
private static final String DISTRIBUTION_QUBOLE = "Qubole";
private LabelledText dataprocProjectIdForHiveTxt;
private LabelledText dataprocClusterIdForHiveTxt;
private LabelledText dataprocRegionForHiveTxt;
private LabelledText dataprocJarsBucketForHiveTxt;
private Button useDataprocCredentialsForHive;
private Composite dataprocCredentialsForHiveComp;
private LabelledFileField dataprocPathToCredentialsForHiveTxt;
/**
* Constructor to use by a Wizard to create a new database connection.
*
@@ -1009,8 +995,6 @@ public class DatabaseForm extends AbstractForm {
setHideVersionInfoWidgets(true);
createHiveDataprocField(typeDbCompositeParent);
// Field connectionString
urlConnectionStringText = new LabelledText(typeDbCompositeParent, Messages.getString("DatabaseForm.stringConnection"), 2); //$NON-NLS-1$
urlConnectionStringText.setEditable(false);
@@ -1062,67 +1046,6 @@ public class DatabaseForm extends AbstractForm {
createHivePropertiesFields(typeDbCompositeParent);
}
private void createHiveDataprocField(Composite parent) {
dataprocProjectIdForHiveTxt = new LabelledText(parent, Messages.getString("DatabaseForm.dataproc.projectId"), 2);//$NON-NLS-1$
dataprocClusterIdForHiveTxt = new LabelledText(parent, Messages.getString("DatabaseForm.dataproc.clusterId"), 2); //$NON-NLS-1$
dataprocRegionForHiveTxt = new LabelledText(parent, Messages.getString("DatabaseForm.dataproc.region"), 2);//$NON-NLS-1$
dataprocJarsBucketForHiveTxt = new LabelledText(parent,
Messages.getString("DatabaseForm.dataproc.jarsBucket"), 2);//$NON-NLS-1$
addListenerForHiveDataproc();
initForHiveDataproc();
}
private void addListenerForHiveDataproc() {
dataprocProjectIdForHiveTxt.getTextControl().addModifyListener(new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
if (!isContextMode()) {
getConnection().getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_PROJECT_ID,
dataprocProjectIdForHiveTxt.getText());
}
}
});
dataprocClusterIdForHiveTxt.getTextControl().addModifyListener(new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
if (!isContextMode()) {
getConnection().getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_CLUSTER_ID,
dataprocClusterIdForHiveTxt.getText());
}
}
});
dataprocRegionForHiveTxt.getTextControl().addModifyListener(new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
if (!isContextMode()) {
getConnection().getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_REGION,
dataprocRegionForHiveTxt.getText());
}
}
});
dataprocJarsBucketForHiveTxt.getTextControl().addModifyListener(new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
if (!isContextMode()) {
getConnection().getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_JARS_BUCKET,
dataprocJarsBucketForHiveTxt.getText());
}
}
});
}
private void initForHiveDataproc() {
dataprocProjectIdForHiveTxt.hide();
dataprocClusterIdForHiveTxt.hide();
dataprocRegionForHiveTxt.hide();
dataprocJarsBucketForHiveTxt.hide();
}
private void createZnodeParent(Composite parent) {
GridLayout parentLayout = (GridLayout) parent.getLayout();
znodeparentGrp = new Group(parent, SWT.NONE);
@@ -1603,19 +1526,6 @@ public class DatabaseForm extends AbstractForm {
maprTDurationForHiveTxt = new LabelledText(authenticationMaprTComForHive,
Messages.getString("DatabaseForm.hive.MaprTDurationTxt.label"), 2); //$NON-NLS-1$
useDataprocCredentialsForHive = new Button(authenticationGrp, SWT.CHECK);
useDataprocCredentialsForHive.setText(Messages.getString("DatabaseForm.dataproc.button.authentication.credentials")); //$NON-NLS-1$
data = new GridData(GridData.FILL_HORIZONTAL);
data.horizontalSpan = 4;
useDataprocCredentialsForHive.setLayoutData(data);
dataprocCredentialsForHiveComp = new Composite(authenticationGrp, SWT.NONE);
dataprocCredentialsForHiveComp.setLayout(new GridLayout(3, false));
dataprocCredentialsForHiveComp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
dataprocPathToCredentialsForHiveTxt = new LabelledFileField(dataprocCredentialsForHiveComp,
Messages.getString("DatabaseForm.dataproc.text.authentication.credentials"), extensions); //$NON-NLS-1$
addListenerForAuthentication();
initForAuthentication();
}
@@ -1947,38 +1857,12 @@ public class DatabaseForm extends AbstractForm {
hideControl(useMaprTForHive, !doSupportTicket());
hideControl(authenticationMaprTComForHive, !(useMaprTForHive.getSelection() && doSupportTicket()));
hideControl(authenticationUserPassComForHive, doSupportKerb() && useKerberos.getSelection() && doSupportTicket());
hideControl(useDataprocCredentialsForHive, !doSupportHiveDataproc());
hideControl(dataprocCredentialsForHiveComp, !(useDataprocCredentialsForHive.getSelection() && doSupportHiveDataproc()));
}
private void showIfAdditionalJDBCSettings() {
setHidAdditionalJDBCSettings(!isSupportHiveAdditionalSettings() && !isSupportImpalaAdditionalSettings());
}
private void showIfHiveDataprocSettings() {
setHideHiveDataprocSettings(!doSupportHiveDataproc());
}
private void setHideHiveDataprocSettings(boolean hide) {
if (hide) {
dataprocProjectIdForHiveTxt.hide();
dataprocClusterIdForHiveTxt.hide();
dataprocRegionForHiveTxt.hide();
dataprocJarsBucketForHiveTxt.hide();
} else {
urlConnectionStringText.hide();
usernameText.hide();
passwordText.hide();
serverText.hide();
portText.hide();
additionalJDBCSettingsText.hide();
dataprocProjectIdForHiveTxt.show();
dataprocClusterIdForHiveTxt.show();
dataprocRegionForHiveTxt.show();
dataprocJarsBucketForHiveTxt.show();
}
}
private void showIfHiveMetastore() {
if (isHiveDBConnSelected()) {
hiveMetastoreGroup.setVisible(true);
@@ -2905,36 +2789,6 @@ public class DatabaseForm extends AbstractForm {
}
}
});
useDataprocCredentialsForHive.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
if (useDataprocCredentialsForHive.getSelection()) {
hideControl(dataprocCredentialsForHiveComp, false);
getConnection().getParameters()
.put(ConnParameterKeys.CONN_PARA_KEY_HIVE_AUTHENTICATION_DEFINE_PATH_TO_GOOGLE_CREDENTIALS, "true"); //$NON-NLS-1$
} else {
hideControl(dataprocCredentialsForHiveComp, true);
getConnection().getParameters()
.put(ConnParameterKeys.CONN_PARA_KEY_HIVE_AUTHENTICATION_DEFINE_PATH_TO_GOOGLE_CREDENTIALS, "false"); //$NON-NLS-1$
}
authenticationGrp.layout();
authenticationGrp.getParent().layout();
}
});
dataprocPathToCredentialsForHiveTxt.getTextControl().addModifyListener(new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
if (!isContextMode()) {
getConnection().getParameters().put(
ConnParameterKeys.CONN_PARA_KEY_HIVE_AUTHENTICATION_PATH_TO_GOOGLE_CREDENTIALS,
dataprocPathToCredentialsForHiveTxt.getText());
}
}
});
}
private void addListenersForEncryptionGroup() {
@@ -3474,13 +3328,6 @@ public class DatabaseForm extends AbstractForm {
} else {
maprTPasswordForHiveTxt.getTextControl().setEchoChar('*');
}
dataprocProjectIdForHiveTxt.setEditable(!isContextMode());
dataprocClusterIdForHiveTxt.setEditable(!isContextMode());
dataprocRegionForHiveTxt.setEditable(!isContextMode());
dataprocJarsBucketForHiveTxt.setEditable(!isContextMode());
useDataprocCredentialsForHive.setEnabled(!isContextMode());
dataprocPathToCredentialsForHiveTxt.setEditable(!isContextMode());
}
private void adaptHiveDBHadoopPartEditable() {
@@ -6625,7 +6472,6 @@ public class DatabaseForm extends AbstractForm {
hideImpalaSettings(!isImpala);
updateHadoopPropertiesFieldsState();
updateHiveJDBCPropertiesFieldsState();
showIfHiveDataprocSettings();
showIfAdditionalJDBCSettings();
showIfHiveMetastore();
showIfSupportEncryption();
@@ -6919,7 +6765,6 @@ public class DatabaseForm extends AbstractForm {
hideMappingFileRelatedWidgets(true);
}
schemaText.hide();
showIfHiveDataprocSettings();
}
}
doHiveUIContentsLayout();
@@ -6946,44 +6791,35 @@ public class DatabaseForm extends AbstractForm {
// recollect context params for hive
if (isHiveDBConnSelected()) {
getConetxtParams().clear();
addContextParams(EDBParamName.Login, true);
addContextParams(EDBParamName.Server, true);
addContextParams(EDBParamName.Port, true);
addContextParams(EDBParamName.Database, true);
boolean isHiveDataproc = doSupportHiveDataproc();
if (isHiveDataproc) {
addContextParams(EDBParamName.HiveDataprocProjectId, true);
addContextParams(EDBParamName.HiveDataprocClusterId, true);
addContextParams(EDBParamName.HiveDataprocRegion, true);
addContextParams(EDBParamName.HiveDataprocJarsBucket, true);
addContextParams(EDBParamName.HiveDataprocPathToCredentials, useDataprocCredentialsForHive.getSelection());
} else {
addContextParams(EDBParamName.Login, true);
addContextParams(EDBParamName.Server, true);
addContextParams(EDBParamName.Port, true);
addContextParams(EDBParamName.NameNode, useHadoopRepositoryParam());
addContextParams(EDBParamName.JobTrackerOrResourceManager, useHadoopRepositoryParam());
addContextParams(EDBParamName.Password, !isHiveEmbeddedMode());
boolean isHivePrincipal = isHiveDBConnSelected() && doSupportSecurity() && useKerberos.getSelection();
addContextParams(EDBParamName.HivePrincipal, isHivePrincipal);
boolean hasAuthentication = isHivePrincipal && isHiveEmbeddedMode();
addContextParams(EDBParamName.HiveMetastore, hasAuthentication);
addContextParams(EDBParamName.HiveDriverJar, hasAuthentication);
addContextParams(EDBParamName.HiveDriveClass, hasAuthentication);
addContextParams(EDBParamName.HiveUserName, hasAuthentication);
addContextParams(EDBParamName.HivePassword, hasAuthentication);
addContextParams(EDBParamName.HiveKeyTabPrincipal, isHivePrincipal && useKeyTab.getSelection());
addContextParams(EDBParamName.HiveKeyTab, isHivePrincipal && useKeyTab.getSelection());
addContextParams(EDBParamName.hiveAdditionalJDBCParameters, isSupportHiveAdditionalSettings());
boolean addSSLEncryptionContext = isSupportSSLEncryption() && isSupportSSLTrustStore();
addContextParams(EDBParamName.hiveSSLTrustStorePath, addSSLEncryptionContext);
addContextParams(EDBParamName.hiveSSLTrustStorePassword, addSSLEncryptionContext);
boolean isEnableHiveHa = hiveEnableHaBtn.getSelection();
addContextParams(EDBParamName.hiveMetastoreUris, isEnableHiveHa);
addContextParams(EDBParamName.HiveMetastorePort, !isEnableHiveHa);
addContextParams(EDBParamName.NameNode, useHadoopRepositoryParam());
addContextParams(EDBParamName.JobTrackerOrResourceManager, useHadoopRepositoryParam());
addContextParams(EDBParamName.Password, !isHiveEmbeddedMode());
boolean isHivePrincipal = isHiveDBConnSelected() && doSupportSecurity() && useKerberos.getSelection();
addContextParams(EDBParamName.HivePrincipal, isHivePrincipal);
boolean hasAuthentication = isHivePrincipal && isHiveEmbeddedMode();
addContextParams(EDBParamName.HiveMetastore, hasAuthentication);
addContextParams(EDBParamName.HiveDriverJar, hasAuthentication);
addContextParams(EDBParamName.HiveDriveClass, hasAuthentication);
addContextParams(EDBParamName.HiveUserName, hasAuthentication);
addContextParams(EDBParamName.HivePassword, hasAuthentication);
addContextParams(EDBParamName.HiveKeyTabPrincipal, isHivePrincipal && useKeyTab.getSelection());
addContextParams(EDBParamName.HiveKeyTab, isHivePrincipal && useKeyTab.getSelection());
addContextParams(EDBParamName.hiveAdditionalJDBCParameters, isSupportHiveAdditionalSettings());
boolean addSSLEncryptionContext = isSupportSSLEncryption() && isSupportSSLTrustStore();
addContextParams(EDBParamName.hiveSSLTrustStorePath, addSSLEncryptionContext);
addContextParams(EDBParamName.hiveSSLTrustStorePassword, addSSLEncryptionContext);
boolean isEnableHiveHa = hiveEnableHaBtn.getSelection();
addContextParams(EDBParamName.hiveMetastoreUris, isEnableHiveHa);
addContextParams(EDBParamName.HiveMetastorePort, !isEnableHiveHa);
addContextParams(EDBParamName.Username, !useKerberos.getSelection() && useMaprTForHive.getSelection());
addContextParams(EDBParamName.Maprticket_Password, !useKerberos.getSelection() && useMaprTForHive.getSelection());
addContextParams(EDBParamName.Maprticket_Cluster, useMaprTForHive.getSelection());
addContextParams(EDBParamName.Maprticket_Duration, useMaprTForHive.getSelection());
}
addContextParams(EDBParamName.Username, !useKerberos.getSelection() && useMaprTForHive.getSelection());
addContextParams(EDBParamName.Maprticket_Password, !useKerberos.getSelection() && useMaprTForHive.getSelection());
addContextParams(EDBParamName.Maprticket_Cluster, useMaprTForHive.getSelection());
addContextParams(EDBParamName.Maprticket_Duration, useMaprTForHive.getSelection());
}
}
@@ -7617,53 +7453,6 @@ public class DatabaseForm extends AbstractForm {
hideControl(useMaprTForHive, !doSupportMapRTicket);
hideControl(authenticationMaprTComForHive, !(checkMaprTForHive && doSupportMapRTicket));
hideControl(authenticationUserPassComForHive, Boolean.valueOf(useKrb) && doSupportMapRTicket);
//
String dataprocProjectIdForHive = connection.getParameters()
.get(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_PROJECT_ID);
if (!connection.isContextMode() && ContextParameterUtils.isContainContextParam(dataprocProjectIdForHive)) {
dataprocProjectIdForHive = (String) metadataconnection
.getParameter(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_PROJECT_ID);
}
dataprocProjectIdForHiveTxt.setText(dataprocProjectIdForHive == null ? "" : dataprocProjectIdForHive);
String dataprocClusterIdForHive = connection.getParameters()
.get(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_CLUSTER_ID);
if (!connection.isContextMode() && ContextParameterUtils.isContainContextParam(dataprocClusterIdForHive)) {
dataprocClusterIdForHive = (String) metadataconnection
.getParameter(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_CLUSTER_ID);
}
dataprocClusterIdForHiveTxt.setText(dataprocClusterIdForHive == null ? "" : dataprocClusterIdForHive);
String dataprocRegionForHive = connection.getParameters()
.get(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_REGION);
if (!connection.isContextMode() && ContextParameterUtils.isContainContextParam(dataprocRegionForHive)) {
dataprocRegionForHive = (String) metadataconnection
.getParameter(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_REGION);
}
dataprocRegionForHiveTxt.setText(dataprocRegionForHive == null ? "" : dataprocRegionForHive);
String dataprocJarsBucketForHive = connection.getParameters()
.get(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_JARS_BUCKET);
if (!connection.isContextMode() && ContextParameterUtils.isContainContextParam(dataprocJarsBucketForHive)) {
dataprocJarsBucketForHive = (String) metadataconnection
.getParameter(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_JARS_BUCKET);
}
dataprocJarsBucketForHiveTxt.setText(dataprocJarsBucketForHive == null ? "" : dataprocJarsBucketForHive);
String useDataprocCredentialsForHiveString = connection.getParameters()
.get(ConnParameterKeys.CONN_PARA_KEY_HIVE_AUTHENTICATION_DEFINE_PATH_TO_GOOGLE_CREDENTIALS);
String dataprocPathToCredentialsForHive = connection.getParameters()
.get(ConnParameterKeys.CONN_PARA_KEY_HIVE_AUTHENTICATION_PATH_TO_GOOGLE_CREDENTIALS);
if (!connection.isContextMode() && ContextParameterUtils.isContainContextParam(dataprocPathToCredentialsForHive)) {
dataprocPathToCredentialsForHive = (String) metadataconnection
.getParameter(ConnParameterKeys.CONN_PARA_KEY_HIVE_AUTHENTICATION_PATH_TO_GOOGLE_CREDENTIALS);
}
boolean checkDataprocCredentialsForHive = Boolean.valueOf(useDataprocCredentialsForHiveString);
useDataprocCredentialsForHive.setSelection(checkDataprocCredentialsForHive);
if (checkDataprocCredentialsForHive) {
dataprocPathToCredentialsForHiveTxt.setText(StringUtils.trimToEmpty(dataprocPathToCredentialsForHive));
}
showIfHiveDataprocSettings();
hideControl(useDataprocCredentialsForHive, !doSupportHiveDataproc());
hideControl(dataprocCredentialsForHiveComp, !(checkDataprocCredentialsForHive && doSupportHiveDataproc()));
authenticationGrp.layout();
authenticationGrp.getParent().layout();
@@ -7773,7 +7562,6 @@ public class DatabaseForm extends AbstractForm {
@Override
public void widgetSelected(SelectionEvent e) {
doHiveDistributionModify();
showIfHiveDataprocSettings();
showIfAdditionalJDBCSettings();
showIfHiveMetastore();
showIfSupportEncryption();
@@ -7794,7 +7582,6 @@ public class DatabaseForm extends AbstractForm {
@Override
public void widgetSelected(SelectionEvent e) {
doHiveVersionModify();
showIfHiveDataprocSettings();
showIfAdditionalJDBCSettings();
showIfHiveMetastore();
showIfSupportEncryption();
@@ -7824,7 +7611,6 @@ public class DatabaseForm extends AbstractForm {
@Override
public void widgetSelected(SelectionEvent e) {
doHiveModeModify();
showIfHiveDataprocSettings();
showIfAdditionalJDBCSettings();
showIfHiveMetastore();
showIfSupportEncryption();
@@ -7868,7 +7654,6 @@ public class DatabaseForm extends AbstractForm {
@Override
public void widgetSelected(SelectionEvent e) {
doHiveServerSelected();
showIfHiveDataprocSettings();
showIfAdditionalJDBCSettings();
showIfHiveMetastore();
showIfSupportEncryption();
@@ -8166,44 +7951,6 @@ public class DatabaseForm extends AbstractForm {
if (template != null) {
serverText.setText(template.getDefaultServer(null));
}
// default values for hive dataproc
String dataprocProjectId = getConnection().getParameters()
.get(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_PROJECT_ID);
String defaultDataprocProjectId = hiveVersion.getDefaultConfig(distribution,
EHadoopProperties.GOOGLE_PROJECT_ID.getName());
if (StringUtils.isNotEmpty(dataprocProjectId)) {
dataprocProjectIdForHiveTxt.setText(dataprocProjectId);
} else if (defaultDataprocProjectId != null) {
dataprocProjectIdForHiveTxt.setText(defaultDataprocProjectId);
}
String dataprocClusterId = getConnection().getParameters()
.get(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_CLUSTER_ID);
String defaultDataprocClusterId = hiveVersion.getDefaultConfig(distribution,
EHadoopProperties.GOOGLE_CLUSTER_ID.getName());
if (StringUtils.isNotEmpty(dataprocClusterId)) {
dataprocClusterIdForHiveTxt.setText(dataprocClusterId);
} else if (defaultDataprocClusterId != null) {
dataprocClusterIdForHiveTxt.setText(defaultDataprocClusterId);
}
String dataprocRegion = getConnection().getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_REGION);
String defaultDataprocRegion = hiveVersion.getDefaultConfig(distribution, EHadoopProperties.GOOGLE_REGION.getName());
if (StringUtils.isNotEmpty(dataprocRegion)) {
dataprocRegionForHiveTxt.setText(dataprocRegion);
} else if (defaultDataprocRegion != null) {
dataprocRegionForHiveTxt.setText(defaultDataprocRegion);
}
String dataprocJarsBucket = getConnection().getParameters()
.get(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_JARS_BUCKET);
String defaultDataprocJarsBucket = hiveVersion.getDefaultConfig(distribution,
EHadoopProperties.GOOGLE_JARS_BUCKET.getName());
if (StringUtils.isNotEmpty(dataprocJarsBucket)) {
dataprocJarsBucketForHiveTxt.setText(dataprocJarsBucket);
} else if (defaultDataprocJarsBucket != null) {
dataprocJarsBucketForHiveTxt.setText(defaultDataprocJarsBucket);
}
}
}
@@ -9063,7 +8810,7 @@ public class DatabaseForm extends AbstractForm {
}
private boolean doSupportSecurity() {
return doSupportKerb() || doSupportTicket() || doSupportHiveDataproc();
return doSupportKerb() || doSupportTicket();
}
private boolean doSupportKerb() {
@@ -9105,10 +8852,6 @@ public class DatabaseForm extends AbstractForm {
return false;
}
private boolean doSupportHiveDataproc() {
return HiveMetadataHelper.isHiveWizardCheckEnabled(hiveDistributionCombo.getText(), hiveVersionCombo.getText(), true);
}
private boolean canLinkToHadoopCluster() {
IHadoopClusterService hadoopClusterService = HadoopRepositoryUtil.getHadoopClusterService();
return hadoopClusterService != null;

View File

@@ -16,7 +16,6 @@ import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.draw2d.ColorConstants;
import org.eclipse.emf.common.util.EList;
import org.eclipse.jface.action.IAction;
@@ -181,9 +180,6 @@ public class XmlFileOutputStep2Form extends AbstractXmlFileStepForm {
addSchemaViewer(mainSashFormComposite, 300, 100);
addXmlFileViewer(mainSashFormComposite, 400, 100);
mainSashFormComposite.setWeights(new int[] { 40, 60 });
if (Platform.OS_MACOSX.equals(Platform.getOS())) {
mainSashFormComposite.setSashWidth((mainSashFormComposite.getShell().getBounds().width) / 6);
}
linker = new XmlFileSchema2TreeLinker(mainSashFormComposite);
linker.setForm(this);

View File

@@ -30,7 +30,6 @@ import org.apache.log4j.Logger;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CTabFolder;
@@ -267,9 +266,6 @@ public class XmlFileStep2Form extends AbstractXmlFileStepForm implements IRefres
this.xmlToSchemaSash = new SashForm(mainComposite, SWT.HORIZONTAL | SWT.SMOOTH);
xmlToSchemaSash.setLayoutData(new GridData(GridData.FILL_BOTH));
xmlToSchemaSash.setBackgroundMode(SWT.INHERIT_FORCE);
if (Platform.OS_MACOSX.equals(Platform.getOS())) {
xmlToSchemaSash.setSashWidth((mainComposite.getShell().getBounds().width) / 6);
}
addGroupXmlFileSettings(xmlToSchemaSash, 400, 110);
addGroupSchemaTarget(xmlToSchemaSash, 300, 110);

View File

@@ -192,11 +192,6 @@ public class XmlToXPathLinker extends TreeToTablesLinker<Object, Object> {
initListeners();
createLinks();
if (WindowSystem.isBigSurOrLater()) {
getBackgroundRefresher().setBackgroundColor(getBgDrawableComposite().getBackground());
getBgDrawableComposite().setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_TRANSPARENT));
this.getTree().setLinesVisible(true);
}
}

View File

@@ -14,15 +14,12 @@ package org.talend.repository.ui.wizards.metadata.connection.files.xml.view;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.Widget;
import org.talend.commons.ui.runtime.ws.WindowSystem;
import org.talend.commons.ui.swt.drawing.background.IBackgroundRefresher;
import org.talend.commons.ui.swt.linking.TreeToTablesLinker;
import org.talend.core.model.metadata.builder.connection.XmlFileConnection;
@@ -56,11 +53,6 @@ public class XmlTree2SchemaLinker extends TreeToTablesLinker<Object, Object> {
init(tree, new Table[] { table }, delegateLinker.getBackgroundRefresher());
initListeners();
if (WindowSystem.isBigSurOrLater()) {
getBackgroundRefresher().setBackgroundColor(getBgDrawableComposite().getBackground());
getBgDrawableComposite().setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_TRANSPARENT));
this.getTree().setLinesVisible(true);
}
}
public void init(final Tree tree, Table[] tables, IBackgroundRefresher backgroundRefresher) {

View File

@@ -27,7 +27,6 @@ import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Link;
import org.eclipse.swt.widgets.Text;
import org.talend.commons.ui.runtime.ws.WindowSystem;
/**
* This class provides utility methods to create SWT widgets for LDAP.
@@ -157,13 +156,7 @@ public class BaseWidgetUtils {
* @return the created text
*/
public static Text createPasswordText(Composite parent, String text, int span) {
Text t;
if (WindowSystem.isBigSurOrLater()) {
t = new Text(parent, SWT.NONE | SWT.BORDER);
t.setEchoChar('*');
} else {
t = new Text(parent, SWT.NONE | SWT.BORDER | SWT.PASSWORD);
}
Text t = new Text(parent, SWT.NONE | SWT.BORDER | SWT.PASSWORD);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = span;
t.setLayoutData(gd);

View File

@@ -101,7 +101,7 @@ public class PatchP2InstallManager {
toInstall.stream().forEach(iu -> {
if (installedBundles.contains(iu.getId()) || extraBundles.containsKey(iu.getId())) {
validInstall.add(iu);
} else if (!iu.getId().startsWith("PATCH.Patch_")){
} else {
invalidInstall.add(iu);
if (invalidBundleInfoList != null) {
invalidBundleInfoList.add(iu.toString());
@@ -109,7 +109,7 @@ public class PatchP2InstallManager {
}
});
if (!invalidInstall.isEmpty()) {
log.debug("Some patches are not compatible with current product, then won't install them:\n " + invalidInstall);
log.error("Some patches are not compatible with current product, then won't install them:\n " + invalidInstall);
}
// install
InstallOperation installOperation = new InstallOperation(getProvisioningSession(), validInstall);
@@ -125,11 +125,7 @@ public class PatchP2InstallManager {
}
provisioningJob.setPhaseSet(talendPhaseSet);
IStatus status = provisioningJob.run(monitor);
if (status != null && IStatus.ERROR == status.getSeverity()) {
log.info("provisionning status is :" + status);
} else {
log.debug("provisionning status is :" + status);
}
log.info("provisionning status is :" + status);
if (status != null) {
switch (status.getSeverity()) {
case IStatus.OK:

View File

@@ -98,6 +98,7 @@
<module>main/plugins/org.talend.libraries.apache.chemistry</module>
<module>main/plugins/org.talend.libraries.apache.common</module>
<module>main/plugins/org.talend.libraries.apache.cxf</module>
<module>main/plugins/org.talend.libraries.apache.google</module>
<module>main/plugins/org.talend.libraries.apache.http</module>
<module>main/plugins/org.talend.libraries.apache.lucene</module>
<module>main/plugins/org.talend.libraries.apache.lucene4</module>

View File

@@ -1165,10 +1165,4 @@ public class TestElementParameter implements IElementParameter {
public void setSerialized(boolean isSerialized) {
// TODO Auto-generated method stub
}
@Override
public boolean isSelectedFromItemValue() {
// TODO Auto-generated method stub
return false;
}
}

View File

@@ -576,12 +576,6 @@ public class RepositoryObjectTypeBuildProviderTest {
}
@Override
public INode getNodeByUniqueName(String uniqueName) {
// TODO Auto-generated method stub
return null;
}
}
@Before