Compare commits
10 Commits
patch/TPS-
...
release/5.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7f14a4cf1b | ||
|
|
04a7b6d2de | ||
|
|
50fbbb6cb2 | ||
|
|
a5a928e33f | ||
|
|
2900b474e4 | ||
|
|
d23810bab2 | ||
|
|
77d0cf119d | ||
|
|
adfb6724cb | ||
|
|
f8f1aefc14 | ||
|
|
f49fa77655 |
@@ -95,10 +95,10 @@
|
||||
boolean isAllRows = "ALL_ROWS".equals(matchingModeStr);
|
||||
|
||||
boolean includeParallelComps = false;
|
||||
List<? extends INode> listPartitions= node.getProcess().getNodesOfType("tPartitioner");
|
||||
if (listPartitions!=null && listPartitions.size() > 0 ) {
|
||||
includeParallelComps = true;
|
||||
}
|
||||
INode collectorNode = validTarget.getDesignSubjobStartNode();
|
||||
if ("tCollector".equals(collectorNode.getComponent().getName())) {
|
||||
includeParallelComps = true;
|
||||
}
|
||||
%>
|
||||
org.talend.designer.components.lookup.common.ICommonLookup.MATCHING_MODE matchingModeEnum_<%=connectionName%> =
|
||||
org.talend.designer.components.lookup.common.ICommonLookup.MATCHING_MODE.<%= matchingModeStr %>;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
org.talend.designer.codegen.config.CodeGeneratorArgument
|
||||
org.talend.core.model.process.ElementParameterParser
|
||||
java.util.List
|
||||
org.talend.core.model.process.EConnectionType
|
||||
org.talend.core.model.process.IHashableInputConnections
|
||||
org.talend.core.model.process.IHashConfiguration
|
||||
org.talend.core.model.process.IDataConnection
|
||||
@@ -49,12 +50,12 @@
|
||||
}
|
||||
}
|
||||
memoryStorage = !(hashConfiguration != null && hashConfiguration.isPersistent() || bSortOnDisk);
|
||||
}
|
||||
|
||||
boolean includeParallelComps = false;
|
||||
List<? extends INode> listPartitions= node.getProcess().getNodesOfType("tPartitioner");
|
||||
if (listPartitions!=null && listPartitions.size() > 0 ) {
|
||||
INode partitionNode = validTarget.getDesignSubjobStartNode();
|
||||
if ("tCollector".equals(partitionNode.getComponent().getName())) {
|
||||
includeParallelComps = true;
|
||||
partitionNode = partitionNode.getIncomingConnections(EConnectionType.STARTS).get(0).getSource();
|
||||
}
|
||||
%>
|
||||
tHash_Lookup_<%=connectionName%>.endPut();
|
||||
@@ -62,7 +63,7 @@ tHash_Lookup_<%=connectionName%>.endPut();
|
||||
if (includeParallelComps && memoryStorage && !isOneOfReloadLookupMode) {
|
||||
%>
|
||||
java.util.List<java.util.concurrent.ConcurrentHashMap<String,Object>> mapsList_<%=cid%> =
|
||||
(java.util.List<java.util.concurrent.ConcurrentHashMap<String,Object>>)globalMap.get("THREAD_MAPS_"+jobName);
|
||||
(java.util.List<java.util.concurrent.ConcurrentHashMap<String,Object>>)globalMap.get("THREAD_MAPS_<%=partitionNode.getUniqueName()%>_"+jobName);
|
||||
if (mapsList_<%=cid%> != null) {
|
||||
|
||||
|
||||
@@ -101,6 +102,8 @@ java.util.List<java.util.concurrent.ConcurrentHashMap<String,Object>> mapsList_<
|
||||
<%
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
%>
|
||||
|
||||
@@ -87,6 +87,9 @@
|
||||
REPOSITORY_VALUE="SID" REQUIRED="true">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
<PARAMETER NAME="DISTRIBUTION" FIELD="TEXT" NUM_ROW="14">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
</PARAMETERS>
|
||||
|
||||
<ADVANCED_PARAMETERS>
|
||||
@@ -125,35 +128,36 @@
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<!-- MICROSOFT HD INSIGHT 3.1 -->
|
||||
<IMPORT NAME="talend-webhcat-launcher-1.0.0" MODULE="talend-webhcat-launcher-1.0.0.jar"
|
||||
REQUIRED_IF="USE_EXISTING_CONNECTION=='false'" />
|
||||
<IMPORT NAME="cxf-api-2.7.7" MODULE="cxf-api-2.7.7.jar"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-api-2.7.7.jar"
|
||||
REQUIRED_IF="USE_EXISTING_CONNECTION=='false'" />
|
||||
<IMPORT NAME="cxf-rt-bindings-xml-2.7.7" MODULE="cxf-rt-bindings-xml-2.7.7.jar"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-bindings-xml-2.7.7.jar"
|
||||
REQUIRED_IF="USE_EXISTING_CONNECTION=='false'" />
|
||||
<IMPORT NAME="cxf-rt-core-2.7.7" MODULE="cxf-rt-core-2.7.7.jar"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-core-2.7.7.jar"
|
||||
REQUIRED_IF="USE_EXISTING_CONNECTION=='false'" />
|
||||
<IMPORT NAME="cxf-rt-frontend-jaxrs-2.7.7" MODULE="cxf-rt-frontend-jaxrs-2.7.7.jar"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-frontend-jaxrs-2.7.7.jar"
|
||||
REQUIRED_IF="USE_EXISTING_CONNECTION=='false'" />
|
||||
<IMPORT NAME="cxf-rt-transports-http-2.7.7" MODULE="cxf-rt-transports-http-2.7.7.jar"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-transports-http-2.7.7.jar"
|
||||
REQUIRED_IF="USE_EXISTING_CONNECTION=='false'" />
|
||||
<IMPORT NAME="json-simple" MODULE="json_simple-1.1.jar"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.jackson/lib/json_simple-1.1.jar"
|
||||
REQUIRED_IF="USE_EXISTING_CONNECTION=='false'" />
|
||||
<IMPORT NAME="javax.ws.rs-api-2.0-m10" MODULE="javax.ws.rs-api-2.0-m10.jar"
|
||||
REQUIRED_IF="USE_EXISTING_CONNECTION=='false'" />
|
||||
<IMPORT NAME="WSDL4J-1_6_2" MODULE="wsdl4j-1.6.2.jar"
|
||||
BundleID="org.apache.servicemix.bundles.wsdl4j" REQUIRED="true" />
|
||||
<IMPORT NAME="azure-storage-1.2.0" MODULE="azure-storage-1.2.0.jar"
|
||||
REQUIRED_IF="USE_EXISTING_CONNECTION=='false'" />
|
||||
<IMPORT NAME="talend-webhcat-launcher-1.0.0" MODULE="talend-webhcat-launcher-1.0.0.jar"
|
||||
REQUIRED_IF="(USE_EXISTING_CONNECTION=='false') AND (DISTRIBUTION=='MICROSOFT_HD_INSIGHT')" />
|
||||
<IMPORT NAME="cxf-api-2.7.7" MODULE="cxf-api-2.7.7.jar"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-api-2.7.7.jar"
|
||||
REQUIRED_IF="(USE_EXISTING_CONNECTION=='false') AND (DISTRIBUTION=='MICROSOFT_HD_INSIGHT')" />
|
||||
<IMPORT NAME="cxf-rt-bindings-xml-2.7.7" MODULE="cxf-rt-bindings-xml-2.7.7.jar"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-bindings-xml-2.7.7.jar"
|
||||
REQUIRED_IF="(USE_EXISTING_CONNECTION=='false') AND (DISTRIBUTION=='MICROSOFT_HD_INSIGHT')" />
|
||||
<IMPORT NAME="cxf-rt-core-2.7.7" MODULE="cxf-rt-core-2.7.7.jar"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-core-2.7.7.jar"
|
||||
REQUIRED_IF="(USE_EXISTING_CONNECTION=='false') AND (DISTRIBUTION=='MICROSOFT_HD_INSIGHT')" />
|
||||
<IMPORT NAME="cxf-rt-frontend-jaxrs-2.7.7" MODULE="cxf-rt-frontend-jaxrs-2.7.7.jar"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-frontend-jaxrs-2.7.7.jar"
|
||||
REQUIRED_IF="(USE_EXISTING_CONNECTION=='false') AND (DISTRIBUTION=='MICROSOFT_HD_INSIGHT')" />
|
||||
<IMPORT NAME="cxf-rt-transports-http-2.7.7" MODULE="cxf-rt-transports-http-2.7.7.jar"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.apache.cxf/lib/cxf-rt-transports-http-2.7.7.jar"
|
||||
REQUIRED_IF="(USE_EXISTING_CONNECTION=='false') AND (DISTRIBUTION=='MICROSOFT_HD_INSIGHT')" />
|
||||
<IMPORT NAME="json-simple" MODULE="json_simple-1.1.jar"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.jackson/lib/json_simple-1.1.jar"
|
||||
REQUIRED_IF="(USE_EXISTING_CONNECTION=='false') AND (DISTRIBUTION=='MICROSOFT_HD_INSIGHT')" />
|
||||
<IMPORT NAME="javax.ws.rs-api-2.0-m10" MODULE="javax.ws.rs-api-2.0-m10.jar"
|
||||
REQUIRED_IF="(USE_EXISTING_CONNECTION=='false') AND (DISTRIBUTION=='MICROSOFT_HD_INSIGHT')" />
|
||||
<IMPORT NAME="WSDL4J-1_6_2" MODULE="wsdl4j-1.6.2.jar"
|
||||
BundleID="org.apache.servicemix.bundles.wsdl4j" REQUIRED="false"
|
||||
REQUIRED_IF="(USE_EXISTING_CONNECTION=='false') AND (DISTRIBUTION=='MICROSOFT_HD_INSIGHT')" />
|
||||
<IMPORT NAME="azure-storage-1.2.0" MODULE="azure-storage-1.2.0.jar"
|
||||
REQUIRED_IF="(USE_EXISTING_CONNECTION=='false') AND (DISTRIBUTION=='MICROSOFT_HD_INSIGHT')" />
|
||||
<!-- #################### -->
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
<RETURNS />
|
||||
</COMPONENT>
|
||||
</COMPONENT>
|
||||
|
||||
@@ -642,13 +642,6 @@
|
||||
uripath="platform:/plugin/org.talend.libraries.hadoop.hdp.2.0/lib/datanucleus-rdbms-3.2.1.jar">
|
||||
</libraryNeeded>
|
||||
|
||||
<libraryNeeded
|
||||
context="plugin:org.talend.libraries.jdbc.h2"
|
||||
id="h2-1.3.160.jar"
|
||||
name="h2-1.3.160.jar"
|
||||
uripath="platform:/plugin/org.talend.libraries.jdbc.h2/lib/h2-1.3.160.jar">
|
||||
</libraryNeeded>
|
||||
|
||||
<libraryNeeded
|
||||
context="plugin:org.talend.libraries.jdbc.derby"
|
||||
id="derby-10.4.2.0.jar"
|
||||
|
||||
@@ -880,7 +880,9 @@ public class DataProcess implements IGeneratingProcess {
|
||||
}
|
||||
|
||||
// propagate metadataLists for output component. only apply to multi-input virtual component
|
||||
if (multipleComponentManager.isSetConnector() && multipleComponentManager.getOutputName().equals(curItem.getName())) {
|
||||
boolean isSAPBapi = graphicalNode.getComponent() != null && "tSAPBapi".equals(graphicalNode.getComponent().getName());//$NON-NLS-1$
|
||||
if (multipleComponentManager.isSetConnector()
|
||||
&& (multipleComponentManager.getOutputName().equals(curItem.getName()) || isSAPBapi)) {
|
||||
// deactivate dummy component
|
||||
if (curNode.getComponentName().equals("tDummyRow")) {// or use //$NON-NLS-1$
|
||||
// "!multipleComponentManager.existsLinkTo()"
|
||||
@@ -2546,10 +2548,11 @@ public class DataProcess implements IGeneratingProcess {
|
||||
}
|
||||
}
|
||||
for (IConnection connection : node.getOutgoingConnections()) {
|
||||
if(connection.getLineStyle() == EConnectionType.ON_SUBJOB_OK || connection.getLineStyle() == EConnectionType.ON_SUBJOB_ERROR) {
|
||||
if (connection.getLineStyle() == EConnectionType.ON_SUBJOB_OK
|
||||
|| connection.getLineStyle() == EConnectionType.ON_SUBJOB_ERROR) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (connection.isActivate()) {
|
||||
if (!hasSingleMergeComponent(connection.getTarget(), checkedNodes, mergeFound || merge)) {
|
||||
return false;
|
||||
|
||||
@@ -182,6 +182,11 @@ import org.talend.repository.ui.utils.Log4jPrefsSettingManager;
|
||||
*/
|
||||
public class Process extends Element implements IProcess2, IGEFProcess, ILastVersionChecker {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final String PROCESS_SCREENSHOT_KEY = "process"; //$NON-NLS-1$
|
||||
|
||||
protected List<INode> nodes = new ArrayList<INode>();
|
||||
|
||||
protected List<Element> elem = new ArrayList<Element>();
|
||||
@@ -1364,7 +1369,22 @@ public class Process extends Element implements IProcess2, IGEFProcess, ILastVer
|
||||
*/
|
||||
processType.setDefaultContext(contextManager.getDefaultContext().getName());
|
||||
if (getScreenshot() != null) {
|
||||
processType.getScreenshots().put("process", getScreenshot());
|
||||
processType.getScreenshots().put(PROCESS_SCREENSHOT_KEY, getScreenshot());
|
||||
// fix a bug (TUP-2278) of synch between inner process item and newly created process item during save, this
|
||||
// is very dirty but inherent to the current archi.
|
||||
// copy all the screenshot items appart from the "process" one that is already handled here.
|
||||
if (property != null && (property.getItem() != null) && (property.getItem() instanceof ProcessItem)) {
|
||||
ProcessItem pi = (ProcessItem) property.getItem();
|
||||
ProcessType pt = pi.getProcess();
|
||||
if (pt != null) {
|
||||
EMap delegateScreenshots = pt.getScreenshots();
|
||||
for (Object objkey : delegateScreenshots.keySet()) {
|
||||
if (!PROCESS_SCREENSHOT_KEY.equals(objkey)) {
|
||||
processType.getScreenshots().put(objkey, delegateScreenshots.get(objkey));
|
||||
}// else keep looking
|
||||
}
|
||||
}// else no process available so ignor
|
||||
}// else not a type we can handle so ignor
|
||||
}
|
||||
setScreenshot(null); // once be saved, set the screenshot to null to free memory
|
||||
contextManager.saveToEmf(processType.getContext());
|
||||
|
||||
@@ -319,6 +319,13 @@ public class ConnectionListController extends AbstractElementPropertySectionCont
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (elem instanceof INode) {
|
||||
INode node = (INode) elem;
|
||||
if (node.getComponent() != null && "tSAPBapi".equals(node.getComponent().getName())) {
|
||||
// not changed
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (connectionName.equals(oldConnectionName)) {
|
||||
curLine.put(param.getName(), newConnectionName);
|
||||
}
|
||||
|
||||
@@ -87,7 +87,12 @@ public class JSONDragAndDropHandler extends AbstractDragAndDropServiceHandler {
|
||||
return connection.getJSONFilePath();
|
||||
} else {
|
||||
Path p = new Path(connection.getJSONFilePath());
|
||||
return TalendQuoteUtils.addQuotes(p.toPortableString());
|
||||
if (p.toFile().isFile()) {
|
||||
return TalendQuoteUtils.addQuotes(p.toPortableString());
|
||||
} else {
|
||||
return TalendQuoteUtils.addQuotes(p.toString());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if (value.equals("OUT_FILE_PATH")) {
|
||||
@@ -98,7 +103,12 @@ public class JSONDragAndDropHandler extends AbstractDragAndDropServiceHandler {
|
||||
return connection.getOutputFilePath();
|
||||
} else {
|
||||
Path p = new Path(connection.getOutputFilePath());
|
||||
return TalendQuoteUtils.addQuotes(p.toPortableString());
|
||||
if (p.toFile().isFile()) {
|
||||
return TalendQuoteUtils.addQuotes(p.toPortableString());
|
||||
} else {
|
||||
return TalendQuoteUtils.addQuotes(p.toString());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if (value.equals("LIMIT")) { //$NON-NLS-1$
|
||||
|
||||
@@ -358,7 +358,12 @@ public class JSONFileOutputStep1Form extends AbstractJSONFileStepForm {
|
||||
} else {
|
||||
xsdPathChanged = false;
|
||||
}
|
||||
getConnection().setJSONFilePath(PathUtils.getPortablePath(jsonFilePath.getText()));
|
||||
if (Path.fromOSString(jsonFilePath.getText()).toFile().isFile()) {
|
||||
getConnection().setJSONFilePath(PathUtils.getPortablePath(jsonFilePath.getText()));
|
||||
} else {
|
||||
getConnection().setJSONFilePath(jsonFilePath.getText());
|
||||
}
|
||||
|
||||
// updateConnection(text);
|
||||
|
||||
StringBuilder fileContent = new StringBuilder();
|
||||
|
||||
@@ -33,6 +33,7 @@ import org.apache.oro.text.regex.Perl5Compiler;
|
||||
import org.apache.oro.text.regex.Perl5Matcher;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.FocusEvent;
|
||||
import org.eclipse.swt.events.FocusListener;
|
||||
@@ -171,8 +172,8 @@ public class JSONFileStep1Form extends AbstractJSONFileStepForm {
|
||||
jsonFilePath = TalendQuoteUtils.removeQuotes(ConnectionContextHelper.getOriginalValue(contextType,
|
||||
fileFieldJSON.getText()));
|
||||
}
|
||||
if (!new File(jsonFilePath).exists() && getConnection().getFileContent() != null
|
||||
&& getConnection().getFileContent().length > 0) {
|
||||
File file = new File(jsonFilePath);
|
||||
if (!file.exists() && getConnection().getFileContent() != null && getConnection().getFileContent().length > 0) {
|
||||
initFileContent();
|
||||
jsonFilePath = tempJSONXsdPath;
|
||||
}
|
||||
@@ -447,6 +448,11 @@ public class JSONFileStep1Form extends AbstractJSONFileStepForm {
|
||||
}
|
||||
// getConnection().setJSONFilePath(PathUtils.getPortablePath(JSONXsdFilePath.getText()));
|
||||
File file = new File(text);
|
||||
if (file.isDirectory()) {
|
||||
valid = false;
|
||||
checkFieldsValue();
|
||||
return;
|
||||
}
|
||||
// if (file.exists()) {
|
||||
// if (file.exists()) {
|
||||
String tempxml = JSONUtil.changeJsonToXml(text);
|
||||
@@ -472,7 +478,11 @@ public class JSONFileStep1Form extends AbstractJSONFileStepForm {
|
||||
} else {
|
||||
xsdPathChanged = false;
|
||||
}
|
||||
getConnection().setJSONFilePath(PathUtils.getPortablePath(jsonPath));
|
||||
if (Path.fromOSString(jsonPath).toFile().isFile()) {
|
||||
getConnection().setJSONFilePath(PathUtils.getPortablePath(jsonPath));
|
||||
} else {
|
||||
getConnection().setJSONFilePath(jsonPath);
|
||||
}
|
||||
|
||||
JSONWizard wizard = ((JSONWizard) getPage().getWizard());
|
||||
wizard.setTreeRootNode(treeNode);
|
||||
@@ -604,6 +614,12 @@ public class JSONFileStep1Form extends AbstractJSONFileStepForm {
|
||||
updateStatus(IStatus.ERROR, ""); //$NON-NLS-1$
|
||||
return false;
|
||||
}
|
||||
File file = new File(jsonFilePathText);
|
||||
if (file.isFile() && !file.exists()) {
|
||||
valid = false;
|
||||
} else if (file.isDirectory()) {
|
||||
valid = false;
|
||||
}
|
||||
if (!valid) {
|
||||
if (isContextMode()) {
|
||||
ContextType contextType = ConnectionContextHelper.getContextTypeForContextMode(connectionItem.getConnection());
|
||||
|
||||
@@ -19,6 +19,7 @@ import java.io.FileNotFoundException;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
@@ -133,18 +134,37 @@ public class JSONUtil {
|
||||
java.io.ByteArrayOutputStream outStream = new java.io.ByteArrayOutputStream();
|
||||
InputStream inStream = null;
|
||||
File file = new File(jsonPath);
|
||||
|
||||
// String filename = file.getName().replaceAll("\\.", "_");
|
||||
// filename = "tempTest";
|
||||
boolean isFromUrl = false;
|
||||
try {
|
||||
InputStream input = null;
|
||||
if (file.exists()) {
|
||||
input = new FileInputStream(file);
|
||||
boolean illegalURL = false;
|
||||
InputStream input = null;
|
||||
|
||||
} else {
|
||||
isFromUrl = true;
|
||||
input = new URL(jsonPath).openStream();
|
||||
if (file.exists()) {
|
||||
if (file.isDirectory()) {
|
||||
return "";
|
||||
}
|
||||
try {
|
||||
input = new FileInputStream(file);
|
||||
} catch (FileNotFoundException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
} else {
|
||||
isFromUrl = true;
|
||||
try {
|
||||
input = new URL(jsonPath).openStream();
|
||||
} catch (MalformedURLException e) {
|
||||
illegalURL = true;
|
||||
} catch (IOException e) {
|
||||
illegalURL = true;
|
||||
}
|
||||
if (illegalURL) {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
String jsonStr = IOUtils.toString(input);
|
||||
|
||||
convertJSON.setJsonString(jsonStr);
|
||||
@@ -172,10 +192,6 @@ public class JSONUtil {
|
||||
if (isFromUrl) {
|
||||
tempJSONXsdPath = temPath;
|
||||
}
|
||||
} catch (FileNotFoundException e1) {
|
||||
ExceptionHandler.process(e1);
|
||||
} catch (IOException e1) {
|
||||
ExceptionHandler.process(e1);
|
||||
} catch (java.lang.Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
} finally {
|
||||
|
||||
@@ -60,6 +60,7 @@ import org.talend.commons.exception.BusinessException;
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
|
||||
import org.talend.commons.ui.runtime.image.ImageProvider;
|
||||
import org.talend.commons.utils.system.EclipseCommandLine;
|
||||
import org.talend.commons.utils.system.EnvironmentUtils;
|
||||
import org.talend.core.CorePlugin;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
@@ -67,6 +68,7 @@ import org.talend.core.model.general.ConnectionBean;
|
||||
import org.talend.core.model.general.Project;
|
||||
import org.talend.core.repository.model.ProxyRepositoryFactory;
|
||||
import org.talend.core.ui.branding.IBrandingService;
|
||||
import org.talend.core.ui.workspace.ChooseWorkspaceData;
|
||||
import org.talend.repository.i18n.Messages;
|
||||
import org.talend.repository.ui.ERepositoryImages;
|
||||
import org.talend.repository.ui.actions.importproject.ImportDemoProjectAction;
|
||||
@@ -690,7 +692,15 @@ public class TOSLoginComposite extends Composite {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
LoginComposite.isRestart = true;
|
||||
perReader.saveLastConnectionBean(loginComposite.getConnection());
|
||||
ConnectionBean connection = loginComposite.getConnection();
|
||||
perReader.saveLastConnectionBean(connection);
|
||||
// update the restart command line to specify the workspace to launch
|
||||
// if relaunch, should delete the "disableLoginDialog" argument in eclipse data for bug TDI-19214
|
||||
EclipseCommandLine.updateOrCreateExitDataPropertyWithCommand("-data", connection.getWorkSpace(), false); //$NON-NLS-1$
|
||||
// store the workspace in the eclipse history so that it is rememebered on next studio launch
|
||||
ChooseWorkspaceData workspaceData = new ChooseWorkspaceData(""); //$NON-NLS-1$
|
||||
workspaceData.workspaceSelected(connection.getWorkSpace());
|
||||
workspaceData.writePersistedData();
|
||||
dialog.okPressed();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -201,6 +201,7 @@ public class JavaJobExportReArchieveCreator {
|
||||
if (libFolder != null) {
|
||||
File[] files = libFolder.listFiles(new FilenameFilter() {
|
||||
|
||||
@Override
|
||||
public boolean accept(File dir, String name) {
|
||||
return name.toLowerCase().endsWith(FileConstants.JAR_FILE_SUFFIX)
|
||||
|| name.toLowerCase().endsWith(FileConstants.ZIP_FILE_SUFFIX) ? true : false;
|
||||
@@ -221,6 +222,7 @@ public class JavaJobExportReArchieveCreator {
|
||||
if (drlFolder != null) {
|
||||
File[] files = drlFolder.listFiles(new FilenameFilter() {
|
||||
|
||||
@Override
|
||||
public boolean accept(File dir, String name) {
|
||||
return name.toLowerCase().endsWith(".drl") //$NON-NLS-1$
|
||||
? true
|
||||
@@ -240,6 +242,7 @@ public class JavaJobExportReArchieveCreator {
|
||||
if (xlsFolder != null) {
|
||||
File[] files = xlsFolder.listFiles(new FilenameFilter() {
|
||||
|
||||
@Override
|
||||
public boolean accept(File dir, String name) {
|
||||
return name.toLowerCase().endsWith(".xls") //$NON-NLS-1$
|
||||
? true
|
||||
@@ -257,6 +260,7 @@ public class JavaJobExportReArchieveCreator {
|
||||
private String[] getJobFolderJarFilenames() {
|
||||
File[] files = jobFolder.listFiles(new FilenameFilter() {
|
||||
|
||||
@Override
|
||||
public boolean accept(File dir, String name) {
|
||||
return name.toLowerCase().endsWith(FileConstants.JAR_FILE_SUFFIX)
|
||||
|| name.toLowerCase().endsWith(FileConstants.ZIP_FILE_SUFFIX) ? true : false;
|
||||
@@ -316,7 +320,17 @@ public class JavaJobExportReArchieveCreator {
|
||||
if (needjars != null) {
|
||||
for (String needjar : needjars) {
|
||||
if (".".equals(needjar)) {
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
boolean found = false;
|
||||
for (String jobJar : fs) {
|
||||
if (jobJar != null && jobJar.equals(needjar)) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (found) {
|
||||
continue;
|
||||
}
|
||||
sb.append(needjar + " ");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user