Compare commits
14 Commits
release/8.
...
bhe/bugfix
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d4c0c17cdd | ||
|
|
b1f148565e | ||
|
|
48fbc6588b | ||
|
|
659a089bef | ||
|
|
312299fc2d | ||
|
|
76c1b6f942 | ||
|
|
3c29998973 | ||
|
|
9af6a950ba | ||
|
|
46f5337dca | ||
|
|
33a207ceaa | ||
|
|
26ab3f97a4 | ||
|
|
f6ea29ec76 | ||
|
|
51a436b552 | ||
|
|
0ab9b617f5 |
@@ -69,6 +69,10 @@ public class DefaultTableLabelProvider implements ITableLabelProvider, ITableCol
|
||||
returnValue = defaultValue;
|
||||
}
|
||||
} else {
|
||||
if ("ID_COLUMN_ROW_NUM".equals(column.getId())) {
|
||||
int indexOf = this.tableViewerCreator.getInputList().indexOf(element);
|
||||
AccessorUtils.set(column, element, indexOf + 1);
|
||||
}
|
||||
Object value = AccessorUtils.get(element, column);
|
||||
CellEditor cellEditor = column.getCellEditor();
|
||||
CellEditorValueAdapter retrieverValue = column.getCellEditorValueAdapter();
|
||||
|
||||
@@ -109,6 +109,10 @@ public interface IMetadataColumn {
|
||||
|
||||
public void setComment(String comment);
|
||||
|
||||
public int getRowNum();
|
||||
|
||||
public void setRowNum(int value);
|
||||
|
||||
public IMetadataColumn clone();
|
||||
|
||||
public IMetadataColumn clone(boolean withCustoms);
|
||||
|
||||
@@ -346,6 +346,15 @@ public class MetadataColumn implements IMetadataColumn, Cloneable {
|
||||
return this.comment;
|
||||
}
|
||||
|
||||
int rowNum = 0;
|
||||
|
||||
public int getRowNum() {
|
||||
return rowNum;
|
||||
};
|
||||
|
||||
public void setRowNum(int value) {
|
||||
this.rowNum = value;
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
|
||||
@@ -18,6 +18,7 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.eclipse.jface.preference.IPersistentPreferenceStore;
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
import org.eclipse.ui.PlatformUI;
|
||||
@@ -229,6 +230,11 @@ public final class PreferenceManipulator implements ITalendCorePrefConstants {
|
||||
}
|
||||
|
||||
public void setLastProject(String project) {
|
||||
if (StringUtils.isEmpty(project)) {
|
||||
RuntimeException e = new RuntimeException("setLastProject project is empty!");
|
||||
ExceptionHandler.process(e);
|
||||
throw e;
|
||||
}
|
||||
store.setValue(LAST_USED_PROJECT, project);
|
||||
save();
|
||||
}
|
||||
|
||||
@@ -492,8 +492,8 @@ EUpdateResult.Reload=Recharger les composants
|
||||
EUpdateResult.Rename=Changer le nom
|
||||
EUpdateResult.Add=Ajouter \u00E0 partir du r\u00E9f\u00E9rentiel
|
||||
EUpdateResult.Delete=Supprimer du r\u00E9f\u00E9rentiel
|
||||
UpdatesConstants.Context=Contexte
|
||||
UpdatesConstants.ContextGroup=Groupe de contextes
|
||||
UpdatesConstants.ContextVariable=Variable de contexte
|
||||
UpdatesConstants.ContextEnvironment=Environnement de contexte
|
||||
UpdatesConstants.Component=Composant
|
||||
UpdatesConstants.Joblet=Joblet
|
||||
UpdatesConstants.Spark_Joblet=Spark_Joblet
|
||||
|
||||
@@ -492,8 +492,8 @@ EUpdateResult.Reload=\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u3092\u30EA\u30E
|
||||
EUpdateResult.Rename=\u540D\u524D\u3092\u5909\u66F4
|
||||
EUpdateResult.Add=\u30EA\u30DD\u30B8\u30C8\u30EA\u30FC\u304B\u3089\u8FFD\u52A0
|
||||
EUpdateResult.Delete=\u30EA\u30DD\u30B8\u30C8\u30EA\u30FC\u304B\u3089\u524A\u9664
|
||||
UpdatesConstants.Context=\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8
|
||||
UpdatesConstants.ContextGroup=\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30B0\u30EB\u30FC\u30D7
|
||||
UpdatesConstants.ContextVariable=\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u5909\u6570
|
||||
UpdatesConstants.ContextEnvironment=\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u74B0\u5883
|
||||
UpdatesConstants.Component=\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8
|
||||
UpdatesConstants.Joblet=\u30B8\u30E7\u30D6\u30EC\u30C3\u30C8
|
||||
UpdatesConstants.Spark_Joblet=Spark_Joblet
|
||||
|
||||
@@ -492,8 +492,8 @@ EUpdateResult.Reload=\u91CD\u65B0\u52A0\u8F7D\u7EC4\u4EF6
|
||||
EUpdateResult.Rename=\u66F4\u6539\u540D\u79F0
|
||||
EUpdateResult.Add=\u4ECE\u5B58\u50A8\u5E93\u6DFB\u52A0
|
||||
EUpdateResult.Delete=\u4ECE\u5B58\u50A8\u5E93\u4E2D\u5220\u9664
|
||||
UpdatesConstants.Context=\u4E0A\u4E0B\u6587
|
||||
UpdatesConstants.ContextGroup=\u4E0A\u4E0B\u6587\u7EC4
|
||||
UpdatesConstants.ContextVariable=\u4E0A\u4E0B\u6587\u53D8\u91CF
|
||||
UpdatesConstants.ContextEnvironment=\u4E0A\u4E0B\u6587\u73AF\u5883
|
||||
UpdatesConstants.Component=\u7EC4\u4EF6
|
||||
UpdatesConstants.Joblet=Joblet
|
||||
UpdatesConstants.Spark_Joblet=Spark_Joblet
|
||||
|
||||
@@ -586,3 +586,11 @@ I18nPreferencePage.wait_process=Le processus va prendre plusieurs minutes, patie
|
||||
MetadataPreferencePage.EnableBasic.name=Autorise l'en-t\u00EAte d'authentification basique
|
||||
MetadataPreferencePage.MessageDialog.Restart=Le Studio doit red\u00E9marrer pour que ce param\u00E8tre soit pris en compte.\nContinuer malgr\u00E9 tout ?
|
||||
TalendTabbedPropertyTitle.componentHelpTooltip=Ouvrir l'aide en ligne
|
||||
Java17NotificationPopup.title=Compatibilit\u00E9 avec Java 17
|
||||
Java17NotificationPopup.info=Activez la compatibilit\u00E9 avec Java 17 pour tirer parti de votre Studio au maximum.\n<a>Ouvrir les param\u00E8tres du projet</a>
|
||||
CapabilityCheckDialog.title=Compatibilit\u00E9 avec le moteur d'ex\u00E9cution
|
||||
CapabilityCheckDialog.message=Avant de publier, assurez-vous que votre moteur d'ex\u00E9cution utilise Java 11 ou une version sup\u00E9rieure.
|
||||
CapabilityCheckDialog.link=<a>En savoir plus</a>
|
||||
CapabilityCheckDialog.toggle=Ne plus afficher ce message
|
||||
CapabilityCheckDialog.cancel=Annuler
|
||||
CapabilityCheckDialog.publish=Publier quand m\u00EAme
|
||||
|
||||
@@ -586,3 +586,11 @@ I18nPreferencePage.wait_process=\u3053\u306E\u51E6\u7406\u306B\u306F\u6570\u5206
|
||||
MetadataPreferencePage.EnableBasic.name=\u57FA\u672C\u8A8D\u8A3C\u30D8\u30C3\u30C0\u30FC\u3092\u6709\u52B9\u5316
|
||||
MetadataPreferencePage.MessageDialog.Restart=\u3053\u306E\u8A2D\u5B9A\u304C\u6709\u52B9\u306B\u306A\u308B\u3088\u3046\u3001Studio\u3092\u518D\u8D77\u52D5\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n\u7D9A\u884C\u3057\u307E\u3059\u304B?
|
||||
TalendTabbedPropertyTitle.componentHelpTooltip=\u30AA\u30F3\u30E9\u30A4\u30F3\u30D8\u30EB\u30D7\u3092\u958B\u304F
|
||||
Java17NotificationPopup.title=Java 17\u3068\u306E\u4E92\u63DB\u6027
|
||||
Java17NotificationPopup.info=Java 17\u3068\u306E\u4E92\u63DB\u6027\u3092\u6709\u52B9\u306B\u3057\u3066Studio\u3092\u6700\u5927\u9650\u306B\u6D3B\u7528\u3057\u307E\u3057\u3087\u3046\u3002\n<a>\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u8A2D\u5B9A\u3092\u958B\u304F</a>
|
||||
CapabilityCheckDialog.title=\u30E9\u30F3\u30BF\u30A4\u30E0\u306E\u4E92\u63DB\u6027
|
||||
CapabilityCheckDialog.message=\u516C\u958B\u3059\u308B\u524D\u306B\u3001\u30E9\u30F3\u30BF\u30A4\u30E0\u304CJava 11\u4EE5\u964D\u3067\u3042\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002
|
||||
CapabilityCheckDialog.link=<a>\u8A73\u7D30</a>
|
||||
CapabilityCheckDialog.toggle=\u6B21\u56DE\u304B\u3089\u3053\u306E\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u8868\u793A\u3057\u306A\u3044
|
||||
CapabilityCheckDialog.cancel=\u30AD\u30E3\u30F3\u30BB\u30EB
|
||||
CapabilityCheckDialog.publish=\u516C\u958B\u3059\u308B
|
||||
|
||||
@@ -586,3 +586,11 @@ I18nPreferencePage.wait_process=\u8FD9\u4E2A\u8FC7\u7A0B\u5C06\u6301\u7EED\u51E0
|
||||
MetadataPreferencePage.EnableBasic.name=\u542F\u7528\u57FA\u672C\u8EAB\u4EFD\u9A8C\u8BC1\u6807\u5934
|
||||
MetadataPreferencePage.MessageDialog.Restart=\u6B64\u8BBE\u7F6E\u5C06\u5728 Studio \u91CD\u542F\u540E\u751F\u6548\u3002\n\u662F\u5426\u786E\u5B9A\uFF1F
|
||||
TalendTabbedPropertyTitle.componentHelpTooltip=\u6253\u5F00\u5728\u7EBF\u5E2E\u52A9
|
||||
Java17NotificationPopup.title=Java 17 \u517C\u5BB9\u6027
|
||||
Java17NotificationPopup.info=\u542F\u7528 Java 17 \u517C\u5BB9\u6027\u4EE5\u5145\u5206\u5229\u7528\u60A8\u7684 Studio\u3002\n<a>\u6253\u5F00\u5DE5\u7A0B\u8BBE\u7F6E</a>
|
||||
CapabilityCheckDialog.title=\u8FD0\u884C\u65F6\u517C\u5BB9\u6027
|
||||
CapabilityCheckDialog.message=\u53D1\u5E03\u4E4B\u524D\uFF0C\u786E\u4FDD\u8FD0\u884C\u65F6\u4F7F\u7528\u7684\u662F Java 11 \u6216\u66F4\u9AD8\u7248\u672C\u3002
|
||||
CapabilityCheckDialog.link=<a>\u4E86\u89E3\u66F4\u591A</a>
|
||||
CapabilityCheckDialog.toggle=\u4E0D\u518D\u663E\u793A\u6B64\u6D88\u606F
|
||||
CapabilityCheckDialog.cancel=\u53D6\u6D88
|
||||
CapabilityCheckDialog.publish=\u4ECD\u7136\u53D1\u5E03
|
||||
|
||||
@@ -109,6 +109,8 @@ public abstract class AbstractMetadataTableEditorView<B> extends AbstractDataTab
|
||||
|
||||
public static final String ID_COLUMN_USEFUL = "ID_COLUMN_USEFUL";
|
||||
|
||||
public static final String ID_COLUMN_ROW_NUM = "ID_COLUMN_ROW_NUM";
|
||||
|
||||
protected boolean showDbColumnName, showOriginalLength;
|
||||
|
||||
protected boolean showDbTypeColumn;
|
||||
@@ -231,12 +233,7 @@ public abstract class AbstractMetadataTableEditorView<B> extends AbstractDataTab
|
||||
@Override
|
||||
protected void createColumns(TableViewerCreator<B> tableViewerCreator, Table table) {
|
||||
// //////////////////////////////////////////////////////////////////////////////////////
|
||||
tableViewerCreator.setReadOnly(false);
|
||||
TableViewerCreatorColumn column = new TableViewerCreatorColumn(tableViewerCreator);
|
||||
column.setTitle(""); //$NON-NLS-1$
|
||||
column.setDefaultInternalValue(""); //$NON-NLS-1$
|
||||
column.setWidth(15);
|
||||
|
||||
configureRowNumColumn(tableViewerCreator);
|
||||
if (isRepository) {
|
||||
configureUsefulColumn(tableViewerCreator);
|
||||
}
|
||||
@@ -333,6 +330,21 @@ public abstract class AbstractMetadataTableEditorView<B> extends AbstractDataTab
|
||||
}
|
||||
}
|
||||
|
||||
protected abstract IBeanPropertyAccessors<B, Integer> getRowNumAccessor();
|
||||
|
||||
protected void configureRowNumColumn(TableViewerCreator<B> tableViewerCreator) {
|
||||
TableViewerCreatorColumn column;
|
||||
column = new TableViewerCreatorColumn(tableViewerCreator);
|
||||
column.setTitle("");
|
||||
column.setToolTipHeader("");
|
||||
column.setId(ID_COLUMN_ROW_NUM);
|
||||
column.setBeanPropertyAccessors(getRowNumAccessor());
|
||||
column.setWeight(5);
|
||||
column.setModifiable(false);
|
||||
column.setMinimumWidth(10);
|
||||
column.setSortable(true);
|
||||
}
|
||||
|
||||
protected void configureUsefulColumn(TableViewerCreator<B> tableViewerCreator) {
|
||||
TableViewerCreatorColumn column;
|
||||
column = new TableViewerCreatorColumn(tableViewerCreator);
|
||||
|
||||
@@ -29,6 +29,7 @@ import org.talend.core.model.metadata.builder.connection.impl.MetadataColumnImpl
|
||||
import org.talend.core.model.metadata.types.TypesManager;
|
||||
import org.talend.core.runtime.CoreRuntimePlugin;
|
||||
import org.talend.core.ui.proposal.JavaSimpleDateFormatProposalProvider;
|
||||
|
||||
import orgomg.cwm.objectmodel.core.TaggedValue;
|
||||
|
||||
/**
|
||||
@@ -574,4 +575,22 @@ public class MetadataEmfTableEditorView extends AbstractMetadataTableEditorView<
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected IBeanPropertyAccessors<MetadataColumn, Integer> getRowNumAccessor() {
|
||||
return new IBeanPropertyAccessors<MetadataColumn, Integer>() {
|
||||
|
||||
@Override
|
||||
public Integer get(MetadataColumn bean) {
|
||||
return bean.getRowNum();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void set(MetadataColumn bean, Integer value) {
|
||||
bean.setRowNum(value);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -181,6 +181,25 @@ public class MetadataTableEditorView extends AbstractMetadataTableEditorView<IMe
|
||||
};
|
||||
}
|
||||
|
||||
int rowNum = 0;
|
||||
|
||||
@Override
|
||||
protected IBeanPropertyAccessors<IMetadataColumn, Integer> getRowNumAccessor() {
|
||||
return new IBeanPropertyAccessors<IMetadataColumn, Integer>() {
|
||||
|
||||
@Override
|
||||
public Integer get(IMetadataColumn bean) {
|
||||
return bean.getRowNum();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void set(IMetadataColumn bean, Integer value) {
|
||||
bean.setRowNum(value);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
protected IBeanPropertyAccessors<IMetadataColumn, String> getCommentAccessor() {
|
||||
return new IBeanPropertyAccessors<IMetadataColumn, String>() {
|
||||
|
||||
@@ -122,7 +122,7 @@ public class Java17NotificationPopup extends ArrangedNotificationPopup {
|
||||
return false;
|
||||
}
|
||||
version = TalendQuoteUtils.removeQuotesIfExist(version);
|
||||
if (Integer.parseInt(version.split("\\.")[0]) > 8) {
|
||||
if (Integer.parseInt(version.split("[^\\d]+")[0]) > 8) {
|
||||
// since Java 9
|
||||
return true;
|
||||
}
|
||||
@@ -135,7 +135,7 @@ public class Java17NotificationPopup extends ArrangedNotificationPopup {
|
||||
private static boolean isJava17() {
|
||||
boolean isJava17 = false;
|
||||
String javaVersion = System.getProperty("java.version");
|
||||
String[] arr = javaVersion.split("\\.");
|
||||
String[] arr = javaVersion.split("[^\\d]+");
|
||||
try {
|
||||
isJava17 = Integer.parseInt(arr[0]) >= 17;
|
||||
} catch (NumberFormatException e) {
|
||||
@@ -144,5 +144,5 @@ public class Java17NotificationPopup extends ArrangedNotificationPopup {
|
||||
}
|
||||
return isJava17;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ ConnectionContextHelper.InConextMessages=La connexion est en mode Contexte.
|
||||
ConnectionContextHelper.OutConextMessages=La connexion n'est pas en mode Contexte.
|
||||
ConnectionContextHelper.UpdateMessages=Voulez-vous mettre \u00E0 jour les param\u00E8tres de contexte ?
|
||||
ConnectionContextHelper.UpdateTitle=Mise \u00E0 jour du contexte
|
||||
ContextSetsSelectionDialog.ContextSets=Jeux de contextes
|
||||
ContextSetsSelectionDialog.ContextEnvironments=Environnement
|
||||
ContextSetsSelectionDialog.Messages=La connexion en cours est en mode contexte.
|
||||
ContextSetsSelectionDialog.ReportMessages=Le rapport est en mode contexte.
|
||||
ContextSetsSelectionDialog.Source=Source du contexte du r\u00E9f\u00E9rentiel :
|
||||
@@ -522,10 +522,10 @@ ContextModeSelectPage.contextModes=Cr\u00E9er un contexte ou r\u00E9utiliser le
|
||||
ContextModeSelectPage.createContext=Cr\u00E9er un contexte dans le r\u00E9f\u00E9rentiel
|
||||
ContextModeSelectPage.reuseContext=R\u00E9utiliser un contexte existant dans le r\u00E9f\u00E9rentiel
|
||||
ReuseRepositoryContext.name=Contexte
|
||||
ShowRepositoryContextPage.title=S\u00E9lectionnez un groupe de contextes
|
||||
ShowRepositoryContextPage.warnMsg=S\u00E9lectionnez un groupe de contextes.
|
||||
ShowRepositoryContextPage.aviableContexts=Groupes de contextes disponibles
|
||||
ShowRepositoryContextPage.SelectReuseContext=S\u00E9lectionnez un groupe de contextes et cliquez sur Suivant.
|
||||
ShowRepositoryContextPage.context.title=S\u00E9lectionner le contexte
|
||||
ShowRepositoryContextPage.context.warnMsg=S\u00E9lectionnez un contexte.
|
||||
ShowRepositoryContextPage.context.aviableContexts=Contextes disponibles
|
||||
ShowRepositoryContextPage.context.SelectReuseContext=S\u00E9lectionnez un contexte et cliquez sur Suivant.
|
||||
ContextAdaptConectionSelectPage.selectOrCustomVariable=S\u00E9lectionnez un champ de connexion pour les variables de contexte existantes
|
||||
ContextAdaptConectionSelectPage.selectOrCustomVariableNew=S\u00E9lectionnez un champ de param\u00E8tre de contexte pour la variable de contexte existante
|
||||
ContextAdaptConectionSelectPage.title=S\u00E9lectionnez les champs de connexion
|
||||
|
||||
@@ -38,7 +38,7 @@ ConnectionContextHelper.InConextMessages=\u63A5\u7D9A\u306F\u30B3\u30F3\u30C6\u3
|
||||
ConnectionContextHelper.OutConextMessages=\u63A5\u7D9A\u306F\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30E2\u30FC\u30C9\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
|
||||
ConnectionContextHelper.UpdateMessages=\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u3092\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u3057\u307E\u3059\u304B?
|
||||
ConnectionContextHelper.UpdateTitle=\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3092\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8
|
||||
ContextSetsSelectionDialog.ContextSets=\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30BB\u30C3\u30C8
|
||||
ContextSetsSelectionDialog.ContextEnvironments=\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u74B0\u5883
|
||||
ContextSetsSelectionDialog.Messages=\u73FE\u5728\u306E\u63A5\u7D9A\u306F\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30E2\u30FC\u30C9\u3067\u3059\u3002
|
||||
ContextSetsSelectionDialog.ReportMessages=\u73FE\u5728\u306E\u30EC\u30DD\u30FC\u30C8\u306F\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30E2\u30FC\u30C9\u3067\u3059\u3002
|
||||
ContextSetsSelectionDialog.Source=\u30EA\u30DD\u30B8\u30C8\u30EA\u30FC\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30BD\u30FC\u30B9:
|
||||
@@ -522,10 +522,10 @@ ContextModeSelectPage.contextModes=\u65B0\u898F\u30B3\u30F3\u30C6\u30AD\u30B9\u3
|
||||
ContextModeSelectPage.createContext=\u65B0\u898F\u30EA\u30DD\u30B8\u30C8\u30EA\u30FC\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3092\u4F5C\u6210
|
||||
ContextModeSelectPage.reuseContext=\u65E2\u5B58\u306E\u30EA\u30DD\u30B8\u30C8\u30EA\u30FC\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3092\u518D\u4F7F\u7528
|
||||
ReuseRepositoryContext.name=\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8
|
||||
ShowRepositoryContextPage.title=\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30B0\u30EB\u30FC\u30D7\u3092\u9078\u629E
|
||||
ShowRepositoryContextPage.warnMsg=\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30B0\u30EB\u30FC\u30D7\u3092\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044\u3002
|
||||
ShowRepositoryContextPage.aviableContexts=\u4F7F\u7528\u3067\u304D\u308B\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30B0\u30EB\u30FC\u30D7
|
||||
ShowRepositoryContextPage.SelectReuseContext=\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30B0\u30EB\u30FC\u30D7\u3092\u9078\u629E\u3057\u3001[\u6B21\u3078]\u3092\u30AF\u30EA\u30C3\u30AF\u3057\u307E\u3059\u3002
|
||||
ShowRepositoryContextPage.context.title=\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3092\u9078\u629E
|
||||
ShowRepositoryContextPage.context.warnMsg=\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3092\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044\u3002
|
||||
ShowRepositoryContextPage.context.aviableContexts=\u5229\u7528\u53EF\u80FD\u306A\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8
|
||||
ShowRepositoryContextPage.context.SelectReuseContext=\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3092\u9078\u629E\u3057\u3001[\u6B21\u3078]\u3092\u30AF\u30EA\u30C3\u30AF\u3057\u307E\u3059\u3002
|
||||
ContextAdaptConectionSelectPage.selectOrCustomVariable=\u5B58\u5728\u3059\u308B\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306E\u5909\u6570\u306E\u63A5\u7D9A\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u9078\u629E
|
||||
ContextAdaptConectionSelectPage.selectOrCustomVariableNew=\u5B58\u5728\u3059\u308B\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306E\u5909\u6570\u306E\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u9078\u629E
|
||||
ContextAdaptConectionSelectPage.title=\u63A5\u7D9A\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u9078\u629E
|
||||
|
||||
@@ -38,7 +38,7 @@ ConnectionContextHelper.InConextMessages=\u8FDE\u63A5\u5DF2\u5728\u4E0A\u4E0B\u6
|
||||
ConnectionContextHelper.OutConextMessages=\u8FDE\u63A5\u4E0D\u5728\u4E0A\u4E0B\u6587\u6A21\u5F0F\u3002
|
||||
ConnectionContextHelper.UpdateMessages=\u662F\u5426\u66F4\u65B0\u4E0A\u4E0B\u6587\u53C2\u6570\uFF1F
|
||||
ConnectionContextHelper.UpdateTitle=\u66F4\u65B0\u4E0A\u4E0B\u6587
|
||||
ContextSetsSelectionDialog.ContextSets=\u4E0A\u4E0B\u6587\u96C6
|
||||
ContextSetsSelectionDialog.ContextEnvironments=\u4E0A\u4E0B\u6587\u73AF\u5883
|
||||
ContextSetsSelectionDialog.Messages=\u5F53\u524D\u8FDE\u63A5\u4E3A\u4E0A\u4E0B\u6587\u6A21\u5F0F\u3002
|
||||
ContextSetsSelectionDialog.ReportMessages=\u5F53\u524D\u62A5\u544A\u662F\u5728\u5168\u5C40\u6A21\u5F0F\u4E0B
|
||||
ContextSetsSelectionDialog.Source=\u5B58\u50A8\u5E93\u4E0A\u4E0B\u6587\u6E90:
|
||||
@@ -522,10 +522,10 @@ ContextModeSelectPage.contextModes=\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u73AF\u5
|
||||
ContextModeSelectPage.createContext=\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u5B58\u50A8\u5E93\u73AF\u5883
|
||||
ContextModeSelectPage.reuseContext=\u91CD\u7528\u73B0\u6709\u5B58\u50A8\u5E93\u4E0A\u4E0B\u6587
|
||||
ReuseRepositoryContext.name=\u4E0A\u4E0B\u6587
|
||||
ShowRepositoryContextPage.title=\u9009\u62E9\u4E0A\u4E0B\u6587\u7EC4
|
||||
ShowRepositoryContextPage.warnMsg=\u8BF7\u9009\u62E9\u4E0A\u4E0B\u6587\u7EC4\u3002
|
||||
ShowRepositoryContextPage.aviableContexts=\u53EF\u7528\u7684\u4E0A\u4E0B\u6587\u7EC4
|
||||
ShowRepositoryContextPage.SelectReuseContext=\u9009\u62E9\u4E0A\u4E0B\u6587\u7EC4\u5E76\u5355\u51FB\u4E0B\u4E00\u6B65\u3002
|
||||
ShowRepositoryContextPage.context.title=\u9009\u62E9\u4E0A\u4E0B\u6587
|
||||
ShowRepositoryContextPage.context.warnMsg=\u8BF7\u9009\u62E9\u4E0A\u4E0B\u6587\u3002
|
||||
ShowRepositoryContextPage.context.aviableContexts=\u53EF\u7528\u4E0A\u4E0B\u6587
|
||||
ShowRepositoryContextPage.context.SelectReuseContext=\u9009\u62E9\u4E0A\u4E0B\u6587\u5E76\u5355\u51FB\u201C\u4E0B\u4E00\u6B65\u201D\u3002
|
||||
ContextAdaptConectionSelectPage.selectOrCustomVariable=\u4E3A\u73B0\u6709\u4E0A\u4E0B\u6587\u7684\u53D8\u91CF\u9009\u62E9\u4E00\u4E2A\u8FDE\u63A5\u5B57\u6BB5
|
||||
ContextAdaptConectionSelectPage.selectOrCustomVariableNew=\u4E3A\u5B58\u5728\u7684\u4E0A\u4E0B\u6587\u53D8\u91CF\u9009\u62E9\u4E00\u4E2A\u4E0A\u4E0B\u6587\u53C2\u6570\u5B57\u6BB5
|
||||
ContextAdaptConectionSelectPage.title=\u9009\u62E9\u8FDE\u63A5\u5B57\u6BB5
|
||||
|
||||
@@ -2287,7 +2287,7 @@ public final class ConnectionContextHelper {
|
||||
Assert.isNotNull(context);
|
||||
// Prompt for context values ?
|
||||
for (IContextParameter parameter : context.getContextParameterList()) {
|
||||
if (parameter.isPromptNeeded()) {
|
||||
if (parameter.isPromptNeeded() || ContextUtils.isPromptNeeded(contexts, parameter.getName())) {
|
||||
nbValues++;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -370,4 +370,8 @@ public interface MetadataColumn extends AbstractMetadataObject, Field {
|
||||
*/
|
||||
void setRelationshipType(String value);
|
||||
|
||||
Integer getRowNum();
|
||||
|
||||
void setRowNum(Integer value);
|
||||
|
||||
} // MetadataColumn
|
||||
|
||||
@@ -21,6 +21,7 @@ import org.talend.core.model.metadata.builder.connection.MetadataColumn;
|
||||
import org.talend.core.model.metadata.builder.connection.MetadataTable;
|
||||
import org.talend.cwm.helper.ColumnHelper;
|
||||
import org.talend.cwm.helper.SwitchHelpers;
|
||||
|
||||
import orgomg.cwm.analysis.transformation.ClassifierFeatureMap;
|
||||
import orgomg.cwm.analysis.transformation.FeatureMap;
|
||||
import orgomg.cwm.analysis.transformation.TransformationPackage;
|
||||
@@ -2020,4 +2021,17 @@ public class MetadataColumnImpl extends AbstractMetadataObjectImpl implements Me
|
||||
// MOD yyi 2011-06-23 22700: override the method for flatfile column
|
||||
return null == super.getName() ? this.getId() : super.getName();
|
||||
}
|
||||
|
||||
// didn't add rowNum into emf model attribute because it's not used for emf value .only used to set row number when
|
||||
// show in the meta table. It will still be kept when re-generate emf model . PLEASE DON'T REMOVE IT MANUALLY
|
||||
int rowNum = 0;
|
||||
@Override
|
||||
public Integer getRowNum() {
|
||||
return rowNum;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRowNum(Integer value) {
|
||||
rowNum = value;
|
||||
}
|
||||
} // MetadataColumnImpl
|
||||
|
||||
@@ -12,8 +12,12 @@
|
||||
// ============================================================================
|
||||
package org.talend.rcp.exportLogs;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.FileReader;
|
||||
import java.io.FileWriter;
|
||||
import java.io.FilenameFilter;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
@@ -259,7 +263,7 @@ public class ExportLogsWizardPage extends WizardPage {
|
||||
File configFolder = new File(Platform.getConfigurationLocation().getURL().toURI());
|
||||
File configIniFile = new File(configFolder, "config.ini");
|
||||
if (configIniFile.exists()) {
|
||||
zipLogFile(zipFile, tmpFolder, configIniFile.getCanonicalPath());
|
||||
zipLogFileWithSensitiveDataHidden(zipFile, tmpFolder, configIniFile.getCanonicalPath());
|
||||
}
|
||||
|
||||
File installFolder = new File(Platform.getInstallLocation().getURL().toURI());
|
||||
@@ -292,10 +296,39 @@ public class ExportLogsWizardPage extends WizardPage {
|
||||
}
|
||||
});
|
||||
for (File file : matchedFiles) {
|
||||
zipLogFile(zipFile, tmpFolder, file.getCanonicalPath());
|
||||
zipLogFileWithSensitiveDataHidden(zipFile, tmpFolder, file.getCanonicalPath());
|
||||
}
|
||||
} else {
|
||||
zipLogFile(zipFile, tmpFolder, launcherIniFile.getCanonicalPath());
|
||||
zipLogFileWithSensitiveDataHidden(zipFile, tmpFolder, launcherIniFile.getCanonicalPath());
|
||||
}
|
||||
}
|
||||
|
||||
private void zipLogFileWithSensitiveDataHidden(String zipFile, String tmpFolder, String logFile) {
|
||||
String destFile = new File(tmpFolder + File.separator + new File(logFile).getName()).getAbsolutePath();
|
||||
try (BufferedReader reader = new BufferedReader(new FileReader(logFile));
|
||||
BufferedWriter writer = new BufferedWriter(new FileWriter(destFile))) {
|
||||
|
||||
String line;
|
||||
while ((line = reader.readLine()) != null) {
|
||||
String processedLine = line;
|
||||
int equalsIndex = line.indexOf('=');
|
||||
if (equalsIndex != -1) {
|
||||
String key = line.substring(0, equalsIndex).trim();
|
||||
if (key.toLowerCase().contains("password")) {
|
||||
processedLine = key + "=" + "***";
|
||||
}
|
||||
}
|
||||
writer.write(processedLine);
|
||||
writer.newLine();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
|
||||
try {
|
||||
ZipToFile.zipFile(tmpFolder, zipFile);
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -521,7 +554,41 @@ public class ExportLogsWizardPage extends WizardPage {
|
||||
for (Entry<Object, Object> en : p.entrySet()) {
|
||||
sb.append(en.getKey() + "=" + en.getValue() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
writeToFile(dest, ".sysConfig", sb); //$NON-NLS-1$
|
||||
StringBuffer processedData = processSensitiveDataHidden(sb.toString());
|
||||
writeToFile(dest, ".sysConfig", processedData); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
private StringBuffer processSensitiveDataHidden(String data) {
|
||||
StringBuffer processedData = new StringBuffer();
|
||||
while (true) {
|
||||
String line;
|
||||
int index = data.indexOf("\n");
|
||||
if (index == -1) {
|
||||
line = data.toString();
|
||||
String processedLine = line;
|
||||
int equalsIndex = line.indexOf('=');
|
||||
if (equalsIndex != -1) {
|
||||
String key = line.substring(0, equalsIndex).trim();
|
||||
if (key.toLowerCase().contains("password")) {
|
||||
processedLine = key + "=" + "***";
|
||||
}
|
||||
}
|
||||
processedData.append(processedLine);
|
||||
break;
|
||||
}
|
||||
line = data.substring(0, index);
|
||||
String processedLine = line;
|
||||
int equalsIndex = line.indexOf('=');
|
||||
if (equalsIndex != -1) {
|
||||
String key = line.substring(0, equalsIndex).trim();
|
||||
if (key.toLowerCase().contains("password")) {
|
||||
processedLine = key + "=" + "***";
|
||||
}
|
||||
}
|
||||
processedData.append(processedLine).append("\n");
|
||||
data = data.substring(index + 1);
|
||||
}
|
||||
return processedData;
|
||||
}
|
||||
|
||||
private void writeToFile(File dest, String fileName, StringBuffer sb) {
|
||||
|
||||
@@ -43,7 +43,7 @@ public class ProxyRepositoryFactoryTest {
|
||||
public void testGetFolderItem4LowerCase() {
|
||||
// make uniquely for folder. Else, if the folder existed, will be some problem for test.
|
||||
final long timeStamp = System.currentTimeMillis();
|
||||
final String prePath = String.valueOf(timeStamp) + '/';
|
||||
final String prePath = String.valueOf(timeStamp) + "L/";
|
||||
|
||||
// case 1
|
||||
IPath path1 = new Path(prePath + "DATA_SOURCES/Gini/Extract/v2_IPER/v1_temp_solution");
|
||||
@@ -94,7 +94,7 @@ public class ProxyRepositoryFactoryTest {
|
||||
|
||||
// make uniquely for folder. Else, if the folder existed, will be some problem for test.
|
||||
final long timeStamp = System.currentTimeMillis();
|
||||
final String prePath = String.valueOf(timeStamp) + '/';
|
||||
final String prePath = String.valueOf(timeStamp) + "U/";
|
||||
|
||||
// case 1
|
||||
IPath path1 = new Path(prePath + "DATA_SOURCES/GINI/Extract/v2_IPER/v1_temp_solution");
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
// ============================================================================
|
||||
package org.talend.core.model.utils;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.talend.core.model.metadata.builder.connection.ConnectionFactory;
|
||||
@@ -81,7 +81,7 @@ public class UpdateRepositoryHelperTest {
|
||||
contextItem.setState(contextItemState);
|
||||
contextItem.setDefaultContext("Default");
|
||||
|
||||
assertEquals("Context:testContext", UpdateRepositoryHelper.getRepositorySourceName(contextItem));
|
||||
assertEquals("Context variable:testContext", UpdateRepositoryHelper.getRepositorySourceName(contextItem));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.talend.core.model.context.ContextUtils;
|
||||
import org.talend.core.model.context.JobContextManager;
|
||||
import org.talend.core.model.context.JobContextParameter;
|
||||
import org.talend.core.model.metadata.builder.connection.ConnectionPackage;
|
||||
@@ -26,8 +25,6 @@ import org.talend.core.model.metadata.builder.connection.DatabaseConnection;
|
||||
import org.talend.core.model.metadata.types.JavaTypesManager;
|
||||
import org.talend.core.model.process.IContext;
|
||||
import org.talend.core.model.process.IContextParameter;
|
||||
import org.talend.core.model.properties.ContextItem;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ContextType;
|
||||
|
||||
/**
|
||||
* created by mzhao on Nov 12, 2012 Detailled comment
|
||||
@@ -77,17 +74,8 @@ public class JavaSqlFactoryTest {
|
||||
public void testPromptPassword() {
|
||||
DatabaseConnection conn = getConnection();
|
||||
JobContextManager contextManager = getContextManager();
|
||||
ContextItem contextItem = ContextUtils.getContextItemById2(conn.getContextId());
|
||||
List<ContextType> contexts = contextItem.getContext();
|
||||
List<IContext> iContextLs = new ArrayList<IContext>();
|
||||
if (contexts != null) {
|
||||
for (ContextType contxType : contexts) {
|
||||
IContext context = ContextUtils.convert2IContext(contxType);
|
||||
iContextLs.add(context);
|
||||
}
|
||||
}
|
||||
for (IContextParameter contextParam : contextManager.getDefaultContext().getContextParameterList()) {
|
||||
JavaSqlFactory.savePromptConVars2Cache(conn, contextParam, iContextLs);
|
||||
JavaSqlFactory.savePromptConVars2Cache(conn, contextParam, new ArrayList<IContext>());
|
||||
}
|
||||
JavaSqlFactory.haveSetPromptContextVars = true;
|
||||
String pwd = JavaSqlFactory.getPassword(conn);
|
||||
|
||||
Reference in New Issue
Block a user