Compare commits
37 Commits
test/bumpT
...
release/8.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
82174dc5ea | ||
|
|
c942e2ee35 | ||
|
|
51f3e07528 | ||
|
|
1af34cb93f | ||
|
|
d575088589 | ||
|
|
cbd9486931 | ||
|
|
c2511328fd | ||
|
|
5c629d27b8 | ||
|
|
b63ff6f17f | ||
|
|
e6d3e2b37a | ||
|
|
d5716b9d63 | ||
|
|
aa3e090f18 | ||
|
|
6e31236ae2 | ||
|
|
ae5f950a78 | ||
|
|
23b5df5c4f | ||
|
|
98ee4f4ba1 | ||
|
|
ffc70af105 | ||
|
|
5e59f89dea | ||
|
|
0e697d0ef6 | ||
|
|
9a2e7c2381 | ||
|
|
8b4f177efc | ||
|
|
4ff907bf75 | ||
|
|
abfd3b7c1b | ||
|
|
4ef6f6a95e | ||
|
|
0ae7943cf2 | ||
|
|
a2ce928d6a | ||
|
|
85f2664512 | ||
|
|
452ef9896a | ||
|
|
81da114430 | ||
|
|
8b34d91c2a | ||
|
|
14673efa17 | ||
|
|
efd8c964b8 | ||
|
|
fc0aa30340 | ||
|
|
3c056baeb7 | ||
|
|
e0d5352efa | ||
|
|
440effae2d | ||
|
|
0e399e778f |
@@ -16,7 +16,7 @@
|
||||
<import plugin="org.apache.commons.lang" version="0.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.apache.commons.lang3" version="0.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.apache.log4j" version="0.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.apache.servicemix.bundles.avro" version="0.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="avro" version="0.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.junit" version="4.13.2" match="greaterOrEqual"/>
|
||||
<import plugin="org.slf4j.api" version="0.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.slf4j.binding.log4j12" version="0.0.0" match="greaterOrEqual"/>
|
||||
|
||||
@@ -20,7 +20,8 @@ Require-Bundle: org.eclipse.core.runtime,
|
||||
org.talend.commons.runtime,
|
||||
org.talend.common.ui.runtime;visibility:=reexport,
|
||||
org.talend.libraries.ui;visibility:=reexport,
|
||||
org.eclipse.ui.workbench
|
||||
org.eclipse.ui.workbench,
|
||||
org.eclipse.jface.notifications
|
||||
Eclipse-LazyStart: true
|
||||
Bundle-Vendor: .Talend SA.
|
||||
Export-Package: org.talend.commons.ui.command,
|
||||
@@ -28,6 +29,7 @@ Export-Package: org.talend.commons.ui.command,
|
||||
org.talend.commons.ui.gmf.util,
|
||||
org.talend.commons.ui.html,
|
||||
org.talend.commons.ui.i18n,
|
||||
org.talend.commons.ui.nofitication,
|
||||
org.talend.commons.ui.swt.actions,
|
||||
org.talend.commons.ui.swt.advanced.composite,
|
||||
org.talend.commons.ui.swt.advanced.dataeditor,
|
||||
|
||||
@@ -0,0 +1,133 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.nofitication;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.jface.notifications.AbstractNotificationPopup;
|
||||
import org.eclipse.jface.window.Window;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.graphics.Point;
|
||||
import org.eclipse.swt.graphics.Rectangle;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.eclipse.swt.widgets.Monitor;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
|
||||
public abstract class ArrangedNotificationPopup extends AbstractNotificationPopup {
|
||||
|
||||
protected static final int MAX_WIDTH = 400;
|
||||
|
||||
protected static final int MIN_HEIGHT = 100;
|
||||
|
||||
protected static final int PADDING_EDGE = 5;
|
||||
|
||||
private static NotificationManager manager;
|
||||
|
||||
public ArrangedNotificationPopup(Display display) {
|
||||
super(display);
|
||||
}
|
||||
|
||||
public ArrangedNotificationPopup(Display display, int style) {
|
||||
super(display, style);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void createContentArea(Composite parent) {
|
||||
createControl(parent);
|
||||
afterCreate();
|
||||
}
|
||||
|
||||
protected abstract void createControl(Composite parent);
|
||||
|
||||
@Override
|
||||
protected Shell getParentShell() {
|
||||
return getNotificationManager().getParentShell();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initializeBounds() {
|
||||
Rectangle clArea = getPrimaryClientArea();
|
||||
Point initialSize = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT);
|
||||
int height = Math.max(initialSize.y, MIN_HEIGHT);
|
||||
int width = Math.min(initialSize.x, MAX_WIDTH);
|
||||
|
||||
Point size = new Point(width, height);
|
||||
getShell().setLocation(clArea.width + clArea.x - size.x - PADDING_EDGE, clArea.height + clArea.y - size.y - PADDING_EDGE);
|
||||
getShell().setSize(size);
|
||||
}
|
||||
|
||||
private Rectangle getPrimaryClientArea() {
|
||||
Shell parentShell = getParentShell();
|
||||
if (parentShell != null) {
|
||||
// calculate client area in display-relative coordinates
|
||||
// (i.e. without window border / decorations)
|
||||
Rectangle bounds = parentShell.getBounds();
|
||||
Rectangle trim = parentShell.computeTrim(0, 0, 0, 0);
|
||||
List<Window> toasts = getNotificationManager().getWindows();
|
||||
Rectangle rect = new Rectangle(bounds.x - trim.x, bounds.y - trim.y, bounds.width - trim.width,
|
||||
bounds.height - trim.height);
|
||||
if (!toasts.isEmpty()) {
|
||||
int index = 0;
|
||||
if (toasts.contains(this)) {
|
||||
// parent shell resize or move
|
||||
index = toasts.indexOf(this);
|
||||
if (index == 0) {
|
||||
// return parent shell rectangle if it's the first one at bottom
|
||||
return rect;
|
||||
}
|
||||
// the one under current toast
|
||||
index -= 1;
|
||||
} else {
|
||||
// toast creation
|
||||
// the one on the top
|
||||
index = toasts.size() - 1;
|
||||
}
|
||||
Rectangle toastRect = toasts.get(index).getShell().getBounds();
|
||||
rect = new Rectangle(rect.x, rect.y, rect.width, toastRect.y - rect.y);
|
||||
}
|
||||
return rect;
|
||||
}
|
||||
// else display on primary monitor
|
||||
Monitor primaryMonitor = this.getShell().getDisplay().getPrimaryMonitor();
|
||||
return (primaryMonitor != null) ? primaryMonitor.getClientArea() : this.getShell().getDisplay().getClientArea();
|
||||
}
|
||||
|
||||
protected void afterCreate() {
|
||||
//
|
||||
}
|
||||
|
||||
@Override
|
||||
public int open() {
|
||||
int open = super.open();
|
||||
// add after open
|
||||
getNotificationManager().add(this);
|
||||
return open;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean close() {
|
||||
boolean close = super.close();
|
||||
getNotificationManager().remove(this);
|
||||
getNotificationManager().refresh();
|
||||
return close;
|
||||
}
|
||||
|
||||
private NotificationManager getNotificationManager() {
|
||||
if (manager == null) {
|
||||
manager = NotificationManager.getInstance();
|
||||
}
|
||||
return manager;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2023 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.nofitication;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import org.eclipse.jface.window.Window;
|
||||
import org.eclipse.jface.window.WindowManager;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.widgets.Event;
|
||||
import org.eclipse.swt.widgets.Listener;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.ui.PlatformUI;
|
||||
|
||||
public class NotificationManager implements Listener {
|
||||
|
||||
private static NotificationManager notificationManager;
|
||||
|
||||
private WindowManager windowManager = new WindowManager();
|
||||
|
||||
private NotificationManager() {
|
||||
Shell shell = getParentShell();
|
||||
if (shell != null) {
|
||||
shell.addListener(SWT.Resize, this);
|
||||
shell.addListener(SWT.Move, this);
|
||||
}
|
||||
}
|
||||
|
||||
public static NotificationManager getInstance() {
|
||||
if (notificationManager == null) {
|
||||
notificationManager = new NotificationManager();
|
||||
}
|
||||
return notificationManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleEvent(Event event) {
|
||||
refresh();
|
||||
}
|
||||
|
||||
public void refresh() {
|
||||
Stream.of(windowManager.getWindows()).map(ArrangedNotificationPopup.class::cast)
|
||||
.forEach(ArrangedNotificationPopup::initializeBounds);
|
||||
}
|
||||
|
||||
public List<Window> getWindows() {
|
||||
return Stream.of(windowManager.getWindows()).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public void add(Window window) {
|
||||
windowManager.add(window);
|
||||
}
|
||||
|
||||
public void remove(Window window) {
|
||||
windowManager.remove(window);
|
||||
}
|
||||
|
||||
public Shell getParentShell() {
|
||||
Shell shell = null;
|
||||
if (PlatformUI.getWorkbench().getActiveWorkbenchWindow() != null) {
|
||||
shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
|
||||
if (shell == null) {
|
||||
shell = PlatformUI.getWorkbench().getDisplay().getActiveShell();
|
||||
}
|
||||
}
|
||||
return shell;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -127,14 +127,13 @@ JobletReferenceDialog.NodeTotalsTip=The totals of node reference
|
||||
JobletReferenceDialog.project=Project
|
||||
JobletReferenceDialog.ReferenceJob=Reference Job
|
||||
JobletReferenceDialog.Title=Delete the joblet failure
|
||||
ContextReferenceDialog.Title=Delete Context Group
|
||||
ContextReferenceDialog.DeleteContext.Title=Delete Context
|
||||
ContextReferenceDialog.Recycle=in Recycle Bin
|
||||
ContextReferenceDialog.ReferenceJob=Reference Objects
|
||||
ContextReferenceDialog.Types=Type
|
||||
ContextReferenceDialog.NodeTypeTip=The type of node reference
|
||||
ContextReferenceDialog.Messages=Context({0} {1}) is referenced from\:\n
|
||||
ContextReferenceDialog.kindMessages=The context group of {0} {1} is referred by the following list, if you really want to delete it, the context group is used in job will be changed to built-in when job is opened again. Would you still like to delete it?
|
||||
ContextReferenceDialog.kindMessages1=The context group of {0} {1} is referred by the following list, Would you still like to delete it?
|
||||
ContextReferenceDialog.kindMessages2=The context of {0} {1} is referred by the following list, would you still like to delete it?
|
||||
CopyToGenericSchemaHelper.cannotGenarateItem=Cannot generate pasted item label.
|
||||
ProxyRepositoryFactory.ReplaceJobHazardDescription=\nDependence on the original connection may be lost\!
|
||||
ItemReferenceDialog.title=Items which cannot be deleted
|
||||
|
||||
@@ -127,14 +127,13 @@ JobletReferenceDialog.NodeTotalsTip=Total des r\u00E9f\u00E9rences des noeuds
|
||||
JobletReferenceDialog.project=Projet
|
||||
JobletReferenceDialog.ReferenceJob=Job de r\u00E9f\u00E9rence
|
||||
JobletReferenceDialog.Title=Supprimer l'\u00E9chec du Joblet
|
||||
ContextReferenceDialog.Title=Supprimer le groupe de contextes
|
||||
ContextReferenceDialog.DeleteContext.Title=Supprimer le contexte
|
||||
ContextReferenceDialog.Recycle=dans la Corbeille
|
||||
ContextReferenceDialog.ReferenceJob=Objets de r\u00E9f\u00E9rence
|
||||
ContextReferenceDialog.Types=Type
|
||||
ContextReferenceDialog.NodeTypeTip=Type de r\u00E9f\u00E9rences du n\u0153ud
|
||||
ContextReferenceDialog.Messages=Le contexte({0} {1}) est r\u00E9f\u00E9renc\u00E9 dans :\n
|
||||
ContextReferenceDialog.kindMessages=Le groupe de contextes de {0} {1} est r\u00E9f\u00E9renc\u00E9 par la liste suivante. Si vous souhaitez le supprimer, le groupe de contextes du Job sera chang\u00E9 en Built-In \u00E0 la prochaine ouverture du Job. Le supprimer malgr\u00E9 tout ?
|
||||
ContextReferenceDialog.kindMessages1=Le groupe de contextes {0} {1} est r\u00E9f\u00E9renc\u00E9 par la liste suivante. Le supprimer malgr\u00E9 tout ?
|
||||
ContextReferenceDialog.kindMessages2=Les \u00E9l\u00E9ments de la liste suivante font r\u00E9f\u00E9rence au contexte de {0} {1} . Souhaitez-vous quand m\u00EAme le supprimer\u00A0?
|
||||
CopyToGenericSchemaHelper.cannotGenarateItem=Impossible de g\u00E9n\u00E9rer le libell\u00E9 de l'\u00E9l\u00E9ment coll\u00E9.
|
||||
ProxyRepositoryFactory.ReplaceJobHazardDescription=\nLes d\u00E9pendances envers la connexion originale peuvent \u00EAtre perdues.
|
||||
ItemReferenceDialog.title=\u00C9lements ne pouvant \u00EAtre supprim\u00E9s
|
||||
@@ -156,7 +155,7 @@ ProjectRepositoryNode.invalidItem=\u00C9l\u00E9ment invalide
|
||||
ProjectRepositoryNode.columns=Colonnes
|
||||
ProjectRepositoryNode.validationRules=R\u00E8gles de validation
|
||||
ProjectRepositoryNode.cdcFoundation=Fondation CDC
|
||||
ProjectRepositoryNode.cdcFoundation.deprecated=CDC Foundation (d\u00E9pr\u00E9ci\u00E9)
|
||||
ProjectRepositoryNode.cdcFoundation.deprecated=Fondation CDC (d\u00E9pr\u00E9ci\u00E9)
|
||||
ProjectRepositoryNode.genericSchema=Sch\u00E9mas g\u00E9n\u00E9riques
|
||||
ProjectRepositoryNode.queries=Requ\u00EAtes
|
||||
ProjectRepositoryNode.synonymSchemas=Sch\u00E9mas synonymes
|
||||
|
||||
@@ -127,14 +127,13 @@ JobletReferenceDialog.NodeTotalsTip=\u30CE\u30FC\u30C9\u53C2\u7167\u306E\u5408\u
|
||||
JobletReferenceDialog.project=\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8
|
||||
JobletReferenceDialog.ReferenceJob=\u53C2\u7167\u30B8\u30E7\u30D6
|
||||
JobletReferenceDialog.Title=\u30B8\u30E7\u30D6\u30EC\u30C3\u30C8\u306E\u5931\u6557\u3092\u524A\u9664
|
||||
ContextReferenceDialog.Title=\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30B0\u30EB\u30FC\u30D7\u3092\u524A\u9664
|
||||
ContextReferenceDialog.DeleteContext.Title=\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306E\u524A\u9664
|
||||
ContextReferenceDialog.Recycle=\u3054\u307F\u7BB1\u5185
|
||||
ContextReferenceDialog.ReferenceJob=\u53C2\u7167\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8
|
||||
ContextReferenceDialog.Types=\u30BF\u30A4\u30D7
|
||||
ContextReferenceDialog.NodeTypeTip=\u30CE\u30FC\u30C9\u53C2\u7167\u306E\u30BF\u30A4\u30D7
|
||||
ContextReferenceDialog.Messages=\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8({0} {1})\u306E\u53C2\u7167\u5143:\n
|
||||
ContextReferenceDialog.kindMessages={0} {1}\u306E\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30B0\u30EB\u30FC\u30D7\u306F\u6B21\u306E\u30EA\u30B9\u30C8\u306B\u53C2\u7167\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u524A\u9664\u3057\u305F\u3044\u5834\u5408\u306F\u3001\u30B8\u30E7\u30D6\u304C\u3082\u3046\u4E00\u5EA6\u958B\u304B\u308C\u305F\u6642\u306B\u3001\u30B8\u30E7\u30D6\u3067\u4F7F\u7528\u3055\u308C\u308B\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30B0\u30EB\u30FC\u30D7\u306F\u7D44\u307F\u8FBC\u307F\u306B\u5909\u63DB\u3055\u308C\u307E\u3059\u3002\u524A\u9664\u3057\u307E\u3059\u304B?
|
||||
ContextReferenceDialog.kindMessages1={0} {1}\u306E\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30B0\u30EB\u30FC\u30D7\u304C\u4EE5\u4E0B\u306E\u30EA\u30B9\u30C8\u306B\u53C2\u7167\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u524A\u9664\u3057\u307E\u3059\u304B?
|
||||
ContextReferenceDialog.kindMessages2={0}{1}\u306E\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304C\u6B21\u306E\u30EA\u30B9\u30C8\u306B\u53C2\u7167\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u524A\u9664\u3057\u307E\u3059\u304B?
|
||||
CopyToGenericSchemaHelper.cannotGenarateItem=\u8CBC\u4ED8\u3051\u3055\u308C\u305F\u30A2\u30A4\u30C6\u30E0\u30E9\u30D9\u30EB\u3092\u751F\u6210\u3067\u304D\u307E\u305B\u3093\u3002
|
||||
ProxyRepositoryFactory.ReplaceJobHazardDescription=\n\u5143\u306E\u63A5\u7D9A\u3078\u306E\u4F9D\u5B58\u304C\u5931\u308F\u308C\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059!
|
||||
ItemReferenceDialog.title=\u524A\u9664\u3067\u304D\u306A\u3044\u30A2\u30A4\u30C6\u30E0
|
||||
|
||||
@@ -127,14 +127,13 @@ JobletReferenceDialog.NodeTotalsTip=\u8282\u70B9\u5F15\u7528\u603B\u6570
|
||||
JobletReferenceDialog.project=\u5DE5\u7A0B
|
||||
JobletReferenceDialog.ReferenceJob=\u5F15\u7528\u4F5C\u4E1A
|
||||
JobletReferenceDialog.Title=\u5220\u9664\u5C0F\u4F5C\u4E1A\u5931\u8D25
|
||||
ContextReferenceDialog.Title=\u5220\u9664\u73AF\u5883\u7EC4
|
||||
ContextReferenceDialog.DeleteContext.Title=\u5220\u9664\u4E0A\u4E0B\u6587
|
||||
ContextReferenceDialog.Recycle=\u5728\u56DE\u6536\u7AD9
|
||||
ContextReferenceDialog.ReferenceJob=\u5F15\u7528\u5BF9\u8C61
|
||||
ContextReferenceDialog.Types=\u7C7B\u578B
|
||||
ContextReferenceDialog.NodeTypeTip=\u8282\u70B9\u5F15\u7528\u7684\u7C7B\u578B
|
||||
ContextReferenceDialog.Messages=\u4E0A\u4E0B\u6587 ({0} {1}) \u5F15\u7528\u81EA\uFF1A\n
|
||||
ContextReferenceDialog.kindMessages={0} {1} \u7684\u4E0A\u4E0B\u6587\u7EC4\u88AB\u4EE5\u4E0B\u5217\u8868\u5F15\u7528\uFF0C\u5982\u679C\u786E\u5B9E\u60F3\u8981\u5C06\u5176\u5220\u9664\uFF0C\u518D\u6B21\u6253\u5F00\u4F5C\u4E1A\u65F6\uFF0C\u4F5C\u4E1A\u4E2D\u6240\u7528\u7684\u4E0A\u4E0B\u6587\u7EC4\u5C06\u6539\u4E3A\u5185\u7F6E\u3002\u662F\u5426\u4ECD\u60F3\u5C06\u5176\u5220\u9664\uFF1F
|
||||
ContextReferenceDialog.kindMessages1={0} {1} \u7684\u4E0A\u4E0B\u6587\u7EC4\u88AB\u4EE5\u4E0B\u5217\u8868\u5F15\u7528\uFF0C\u662F\u5426\u4ECD\u60F3\u5C06\u5176\u5220\u9664\uFF1F
|
||||
ContextReferenceDialog.kindMessages2={0} {1} \u7684\u4E0A\u4E0B\u6587\u7EC4\u4EE5\u4E0B\u5217\u8868\u5F15\u7528\uFF0C\u662F\u5426\u4ECD\u60F3\u5C06\u5176\u5220\u9664\uFF1F
|
||||
CopyToGenericSchemaHelper.cannotGenarateItem=\u65E0\u6CD5\u751F\u6210\u7C98\u8D34\u9879\u76EE\u6807\u7B7E\u3002
|
||||
ProxyRepositoryFactory.ReplaceJobHazardDescription=\n\u5BF9\u539F\u59CB\u8FDE\u63A5\u7684\u4F9D\u8D56\u53EF\u80FD\u4F1A\u4E22\u5931\uFF01
|
||||
ItemReferenceDialog.title=\u65E0\u6CD5\u5220\u9664\u7684\u9879\u76EE
|
||||
|
||||
@@ -129,7 +129,7 @@ public class ContextReferenceDialog extends SelectionDialog {
|
||||
Item item = objToDelete.getProperty().getItem();
|
||||
if (item != null) {
|
||||
setMessage(Messages.getString(
|
||||
"ContextReferenceDialog.kindMessages1", item.getProperty().getLabel(), item.getProperty().getVersion())); //$NON-NLS-1$
|
||||
"ContextReferenceDialog.kindMessages2", item.getProperty().getLabel(), item.getProperty().getVersion())); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
setHelpAvailable(false);
|
||||
@@ -138,7 +138,7 @@ public class ContextReferenceDialog extends SelectionDialog {
|
||||
@Override
|
||||
protected void configureShell(Shell newShell) {
|
||||
super.configureShell(newShell);
|
||||
newShell.setText(Messages.getString("ContextReferenceDialog.Title")); //$NON-NLS-1$
|
||||
newShell.setText(Messages.getString("ContextReferenceDialog.DeleteContext.Title")); //$NON-NLS-1$
|
||||
newShell.setSize(650, 250);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Manifest-Version: 1.0
|
||||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Core Runtime Plug-in
|
||||
Bundle-SymbolicName: org.talend.core.runtime;singleton:=true
|
||||
@@ -125,12 +125,25 @@ Require-Bundle: org.eclipse.jdt.core,
|
||||
org.talend.commons.ui,
|
||||
org.ops4j.pax.url.mvn,
|
||||
org.talend.components.api,
|
||||
org.apache.servicemix.bundles.avro,
|
||||
jackson-core-asl,
|
||||
org.talend.libraries.jackson,
|
||||
org.eclipse.m2e.core,
|
||||
org.talend.libraries.apache.common,
|
||||
org.talend.signon.util
|
||||
org.talend.signon.util,
|
||||
org.eclipse.core.runtime,
|
||||
org.talend.studio.studio-utils,
|
||||
org.eclipse.emf.ecore,
|
||||
org.eclipse.core.resources,
|
||||
org.eclipse.emf.ecore.xmi,
|
||||
org.talend.common.ui.runtime,
|
||||
org.talend.cwm.mip,
|
||||
org.talend.daikon,
|
||||
org.talend.libraries.apache,
|
||||
org.apache.commons.lang3,
|
||||
com.fasterxml.jackson.core.jackson-annotations,
|
||||
com.fasterxml.jackson.core.jackson-databind,
|
||||
com.fasterxml.jackson.core.jackson-core,
|
||||
avro;bundle-version="1.11.2"
|
||||
Bundle-Activator: org.talend.core.runtime.CoreRuntimePlugin
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-ClassPath: .,
|
||||
|
||||
@@ -273,10 +273,6 @@ public class PluginChecker {
|
||||
return isPluginLoaded(MDM_PLUGIN_ID);
|
||||
}
|
||||
|
||||
public static boolean isExchangeSystemLoaded() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isRulesPluginLoaded() { // added by hyWang
|
||||
return isPluginLoaded(RULES_PLUGIN_ID);
|
||||
}
|
||||
|
||||
@@ -79,8 +79,8 @@ public enum EDatabaseVersion4Drivers {
|
||||
MSSQL_PROP(new DbVersion4Drivers(EDatabaseTypeName.MSSQL,
|
||||
"Microsoft", "MSSQL_PROP", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
new String[] { "mssql-jdbc.jar", "slf4j-api-1.7.34.jar", "slf4j-reload4j-1.7.34.jar", "msal4j-1.11.0.jar", //$NON-NLS-1$
|
||||
"oauth2-oidc-sdk-9.7.jar", "reload4j-1.2.22.jar", "jackson-core-2.13.4.jar",
|
||||
"jackson-databind-2.13.4.2.jar", "jackson-annotations-2.13.4.jar", "jcip-annotations-1.0-1.jar",
|
||||
"oauth2-oidc-sdk-9.7.jar", "reload4j-1.2.22.jar", "jackson-core-2.14.3.jar",
|
||||
"jackson-databind-2.14.3.jar", "jackson-annotations-2.14.3.jar", "jcip-annotations-1.0-1.jar",
|
||||
"json-smart-2.4.11.jar", "nimbus-jose-jwt-9.22.jar", "accessors-smart-2.4.11.jar", "asm-9.5.jar",
|
||||
"content-type-2.1.jar", "lang-tag-1.5.jar" })),
|
||||
|
||||
@@ -93,12 +93,12 @@ public enum EDatabaseVersion4Drivers {
|
||||
GREENPLUM_PSQL(new DbVersion4Drivers(EDatabaseTypeName.GREENPLUM,"PostgreSQL", "POSTGRESQL", "postgresql-8.4-703.jdbc4.jar")), //$NON-NLS-1$
|
||||
GREENPLUM(new DbVersion4Drivers(EDatabaseTypeName.GREENPLUM,"Greenplum", "GREENPLUM", "greenplum-5.1.4.000275.jar")), //$NON-NLS-1$
|
||||
// PSQL_V10(new DbVersion4Drivers(EDatabaseTypeName.PSQL, "v10", "V10", "postgresql-42.2.5.jar")),
|
||||
PSQL_V9_X(new DbVersion4Drivers(EDatabaseTypeName.PSQL, "v9 and later", "V9_X", "postgresql-42.2.26.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
PSQL_PRIOR_TO_V9(new DbVersion4Drivers(EDatabaseTypeName.PSQL, "Prior to v9", "PRIOR_TO_V9", "postgresql-8.4-703.jdbc4.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
PSQL_V9_X(new DbVersion4Drivers(EDatabaseTypeName.PSQL, "v9 and later", "V9_X", "postgresql-42.6.0.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
PSQL_PRIOR_TO_V9(new DbVersion4Drivers(EDatabaseTypeName.PSQL, "Prior to v9 (Deprecated)", "PRIOR_TO_V9", "postgresql-8.4-703.jdbc4.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
|
||||
PLUSPSQL_PRIOR_TO_V9(new DbVersion4Drivers(EDatabaseTypeName.PLUSPSQL,
|
||||
"Prior to v9", "PRIOR_TO_V9", "postgresql-8.4-703.jdbc4.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
PLUSPSQL_V9_X(new DbVersion4Drivers(EDatabaseTypeName.PLUSPSQL, "v9 and later", "V9_X", "postgresql-42.2.26.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
"Prior to v9 (Deprecated)", "PRIOR_TO_V9", "postgresql-8.4-703.jdbc4.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
PLUSPSQL_V9_X(new DbVersion4Drivers(EDatabaseTypeName.PLUSPSQL, "v9 and later", "V9_X", "postgresql-42.6.0.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
IBMDB2(new DbVersion4Drivers(EDatabaseTypeName.IBMDB2, new String[] { "db2jcc4.jar", "db2jcc_license_cu.jar", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
"db2jcc_license_cisuz.jar" })), //$NON-NLS-1$
|
||||
IBMDB2ZOS(new DbVersion4Drivers(EDatabaseTypeName.IBMDB2ZOS, new String[] { "db2jcc4.jar", "db2jcc_license_cu.jar", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
@@ -153,9 +153,9 @@ public enum EDatabaseVersion4Drivers {
|
||||
REDSHIFT(new DbVersion4Drivers(EDatabaseTypeName.REDSHIFT, "redshift", "REDSHIFT", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
new String[]{ "redshift-jdbc42-no-awssdk-1.2.55.1083.jar", "antlr4-runtime-4.8-1.jar" })), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
REDSHIFT_SSO(new DbVersion4Drivers(EDatabaseTypeName.REDSHIFT_SSO, "redshift sso", "REDSHIFT_SSO", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
new String[] { "redshift-jdbc42-no-awssdk-1.2.55.1083.jar", "antlr4-runtime-4.8-1.jar", "jackson-core-2.13.4.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
"jackson-databind-2.13.4.2.jar", "jackson-annotations-2.13.4.jar", "httpcore-4.4.13.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
"httpclient-4.5.13.jar", "joda-time-2.8.1.jar", "commons-logging-1.2.jar", "commons-codec-1.14.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$//$NON-NLS-4$
|
||||
new String[] { "redshift-jdbc42-no-awssdk-1.2.55.1083.jar", "antlr4-runtime-4.8-1.jar", "jackson-core-2.14.3.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
"jackson-databind-2.14.3.jar", "jackson-annotations-2.14.3.jar", "httpcore-4.4.13.jar", "httpclient-4.5.13.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$//$NON-NLS-4$
|
||||
"joda-time-2.8.1.jar", "commons-logging-1.2.jar", "commons-codec-1.14.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
"aws-java-sdk-redshift-internal-1.12.x.jar", "aws-java-sdk-core-1.12.315.jar", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
"aws-java-sdk-sts-1.12.315.jar", "aws-java-sdk-redshift-1.12.315.jar", "jmespath-java-1.12.315.jar" })), //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
|
||||
|
||||
|
||||
@@ -93,8 +93,8 @@ public final class ComponentUtilities {
|
||||
// TODO SML Use getNodeProperty
|
||||
EList elementParameter = node.getElementParameter();
|
||||
Iterator iterator = elementParameter.iterator();
|
||||
for (Object o = iterator.next(); iterator.hasNext(); o = iterator.next()) {
|
||||
ElementParameterType t = (ElementParameterType) o;
|
||||
while (iterator.hasNext()) {
|
||||
ElementParameterType t = (ElementParameterType) iterator.next();
|
||||
if (t.getName().equals(property)) {
|
||||
iterator.remove();
|
||||
}
|
||||
|
||||
@@ -39,6 +39,8 @@ public interface IComponent {
|
||||
String SPARK_JOBLET_STREAMING_PID = "org.talend.designer.sparkstreamingjoblet"; //$NON-NLS-1$
|
||||
|
||||
String PROP_NAME = "NAME"; //$NON-NLS-1$
|
||||
|
||||
String PROP_DESCRIPTION = "DESCRIPTION"; //$NON-NLS-1$
|
||||
|
||||
String PROP_LONG_NAME = "LONG_NAME"; //$NON-NLS-1$
|
||||
|
||||
|
||||
@@ -1207,5 +1207,23 @@ public class ContextUtils {
|
||||
}
|
||||
return jobContext;
|
||||
}
|
||||
|
||||
public static boolean isPromptNeeded(List<IContext> contexts, String contextParaName) {
|
||||
for (IContext context : contexts) {
|
||||
List<IContextParameter> list = context.getContextParameterList();
|
||||
if (list != null && list.size() > 0) {
|
||||
for (IContextParameter contextPara : list) {
|
||||
String tempContextParaName = contextPara.getName();
|
||||
if (tempContextParaName.equals(contextParaName)) {
|
||||
if (contextPara.isPromptNeeded()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -30,6 +30,8 @@ public class JobContext implements IContext, Cloneable {
|
||||
|
||||
boolean confirmationNeeded;
|
||||
|
||||
boolean hide;
|
||||
|
||||
public JobContext(String name) {
|
||||
this.name = name;
|
||||
if (this.name == null) {
|
||||
@@ -66,6 +68,14 @@ public class JobContext implements IContext, Cloneable {
|
||||
this.confirmationNeeded = confirmationNeeded;
|
||||
}
|
||||
|
||||
public boolean isHide() {
|
||||
return this.hide;
|
||||
}
|
||||
|
||||
public void setHide(boolean hide) {
|
||||
this.hide = hide;
|
||||
}
|
||||
|
||||
public IContext clone() {
|
||||
IContext clonedContext = null;
|
||||
try {
|
||||
@@ -131,14 +141,16 @@ public class JobContext implements IContext, Cloneable {
|
||||
* @return
|
||||
*/
|
||||
public IContextParameter getContextParameter(String sourceId, String paraName) {
|
||||
if (sourceId == null || paraName == null)
|
||||
if (sourceId == null || paraName == null) {
|
||||
return null;
|
||||
}
|
||||
if (contextParameterList != null && contextParameterList.size() > 0) {
|
||||
for (IContextParameter contextParam : contextParameterList) {
|
||||
String tempSouceId = contextParam.getSource();
|
||||
String tempParaName = contextParam.getName();
|
||||
if (sourceId.equals(tempSouceId) && paraName.equals(tempParaName))
|
||||
if (sourceId.equals(tempSouceId) && paraName.equals(tempParaName)) {
|
||||
return contextParam;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
@@ -156,8 +168,9 @@ public class JobContext implements IContext, Cloneable {
|
||||
if (contextParameterList != null && contextParameterList.size() > 0) {
|
||||
for (IContextParameter contextParam : contextParameterList) {
|
||||
String tempParaName = contextParam.getName();
|
||||
if (tempParaName.equals(paraName))
|
||||
if (tempParaName.equals(paraName)) {
|
||||
list.add(contextParam);
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
|
||||
@@ -33,7 +33,6 @@ import org.talend.core.model.properties.ContextItem;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.utils.ContextParameterUtils;
|
||||
import org.talend.cwm.helper.ResourceHelper;
|
||||
import org.talend.cwm.helper.StudioEncryptionHelper;
|
||||
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.TalendFileFactory;
|
||||
@@ -57,6 +56,11 @@ public class JobContextManager implements IContextManager {
|
||||
*/
|
||||
private Map<String, String> nameMap = new HashMap<String, String>();
|
||||
|
||||
/*
|
||||
* record rename context for node
|
||||
*/
|
||||
private Map<String, String> nameMapNode = new HashMap<String, String>();
|
||||
|
||||
private Map<ContextItem, Map<String, String>> repositoryRenamedMap = new HashMap<ContextItem, Map<String, String>>();
|
||||
|
||||
/*
|
||||
@@ -309,6 +313,7 @@ public class JobContextManager implements IContextManager {
|
||||
}
|
||||
context = new JobContext(name);
|
||||
context.setConfirmationNeeded(contextType.isConfirmationNeeded());
|
||||
context.setHide(contextType.isHide());
|
||||
contextParamList = new ArrayList<IContextParameter>();
|
||||
contextTypeParamList = contextType.getContextParameter();
|
||||
Set<String> paramNamesInCurrentContext = new HashSet<String>();
|
||||
@@ -405,6 +410,18 @@ public class JobContextManager implements IContextManager {
|
||||
updateNewParameters(newName, oldName);
|
||||
}
|
||||
|
||||
public void addNameMapForNode(String newName, String oldName) {
|
||||
nameMapNode.put(newName, oldName);
|
||||
}
|
||||
|
||||
public void clearNameMapForNode() {
|
||||
nameMapNode.clear();
|
||||
}
|
||||
|
||||
public Map<String, String> getNameMapNode() {
|
||||
return nameMapNode;
|
||||
}
|
||||
|
||||
public Map<String, String> getNameMap() {
|
||||
return nameMap;
|
||||
}
|
||||
@@ -543,6 +560,7 @@ public class JobContextManager implements IContextManager {
|
||||
}
|
||||
contextType.setName(context.getName());
|
||||
contextType.setConfirmationNeeded(context.isConfirmationNeeded());
|
||||
contextType.setHide(context.isHide());
|
||||
newcontextTypeList.add(contextType);
|
||||
|
||||
EList contextTypeParamList = contextType.getContextParameter();
|
||||
|
||||
@@ -210,6 +210,8 @@ public final class MetadataToolAvroHelper {
|
||||
// FIXME - this one should go away
|
||||
type = AvroUtils._date();
|
||||
}
|
||||
|
||||
defaultValue = null;
|
||||
}
|
||||
// String-ish types.
|
||||
else if (JavaTypesManager.STRING.getId().equals(tt) || JavaTypesManager.FILE.getId().equals(tt)
|
||||
@@ -466,7 +468,7 @@ public final class MetadataToolAvroHelper {
|
||||
TaggedValue tv = TaggedValueHelper.createTaggedValue(DiSchemaConstants.TALEND6_IS_READ_ONLY, prop);
|
||||
table.getTaggedValue().add(tv);
|
||||
}
|
||||
for (String key : in.getJsonProps().keySet()) {
|
||||
for (String key : in.getObjectProps().keySet()) {
|
||||
if (key.startsWith(DiSchemaConstants.TALEND6_ADDITIONAL_PROPERTIES)) {
|
||||
String originalKey = key.substring(DiSchemaConstants.TALEND6_ADDITIONAL_PROPERTIES.length());
|
||||
TaggedValue tv = TaggedValueHelper.createTaggedValue(originalKey, in.getProp(key));
|
||||
@@ -512,7 +514,7 @@ public final class MetadataToolAvroHelper {
|
||||
TaggedValue tv = TaggedValueHelper.createTaggedValue(DiSchemaConstants.TALEND6_IS_READ_ONLY, prop);
|
||||
col.getTaggedValue().add(tv);
|
||||
}
|
||||
for (String key : schema.getJsonProps().keySet()) {
|
||||
for (String key : schema.getObjectProps().keySet()) {
|
||||
if (key.startsWith(DiSchemaConstants.TALEND6_ADDITIONAL_PROPERTIES)) {
|
||||
String originalKey = key.substring(DiSchemaConstants.TALEND6_ADDITIONAL_PROPERTIES.length());
|
||||
TaggedValue tv = TaggedValueHelper.createTaggedValue(originalKey, schema.getProp(key));
|
||||
@@ -688,7 +690,7 @@ public final class MetadataToolAvroHelper {
|
||||
TaggedValue tv = TaggedValueHelper.createTaggedValue(DiSchemaConstants.TALEND6_IS_READ_ONLY, prop);
|
||||
col.getTaggedValue().add(tv);
|
||||
}
|
||||
for (String key : field.getJsonProps().keySet()) {
|
||||
for (String key : field.getObjectProps().keySet()) {
|
||||
if (key.startsWith(DiSchemaConstants.TALEND6_ADDITIONAL_PROPERTIES)) {
|
||||
String originalKey = key.substring(DiSchemaConstants.TALEND6_ADDITIONAL_PROPERTIES.length());
|
||||
TaggedValue tv = TaggedValueHelper.createTaggedValue(originalKey, field.getProp(key));
|
||||
|
||||
@@ -32,6 +32,10 @@ public interface IContext {
|
||||
|
||||
public void setConfirmationNeeded(boolean confirmationNeeded);
|
||||
|
||||
public boolean isHide();
|
||||
|
||||
public void setHide(boolean hide);
|
||||
|
||||
public List<IContextParameter> getContextParameterList();
|
||||
|
||||
public void setContextParameterList(List<IContextParameter> contextParameterList);
|
||||
|
||||
@@ -239,4 +239,8 @@ public interface IElementParameter {
|
||||
public String getOrignEncryptedValue();
|
||||
|
||||
public void setOrignEncryptedValue(String value);
|
||||
|
||||
public void setDescription (String description);
|
||||
|
||||
public String getDescription ();
|
||||
}
|
||||
|
||||
@@ -729,7 +729,7 @@ public final class ProcessUtils {
|
||||
return null;
|
||||
}
|
||||
|
||||
private static boolean isRoute(Property property) {
|
||||
public static boolean isRoute(Property property) {
|
||||
return property!= null && (ERepositoryObjectType.getType(property).equals(ERepositoryObjectType.PROCESS_ROUTE) ||
|
||||
ERepositoryObjectType.getType(property).equals(ERepositoryObjectType.PROCESS_ROUTE_MICROSERVICE));
|
||||
}
|
||||
@@ -768,6 +768,39 @@ public final class ProcessUtils {
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
public static boolean isRouteWithRoutelets(Item item) {
|
||||
if (item!= null && item instanceof ProcessItem) {
|
||||
for (Object obj : ((ProcessItem) item).getProcess().getNode()) {
|
||||
if (obj instanceof NodeType) {
|
||||
if (isRouteletNode((NodeType) obj)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isRouteletNode(NodeType node) {
|
||||
String jobIds = getParameterValue(node.getElementParameter(), "PROCESS_TYPE:PROCESS_TYPE_PROCESS");
|
||||
String jobVersion = getParameterValue(node.getElementParameter(), "PROCESS_TYPE:PROCESS_TYPE_VERSION"); //$NON-NLS-1$
|
||||
ProcessItem processItem = ItemCacheManager.getProcessItem(jobIds, jobVersion);
|
||||
if (processItem != null) {
|
||||
return ERepositoryObjectType.getType(processItem.getProperty()).equals(
|
||||
ERepositoryObjectType.PROCESS_ROUTELET);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static String getParameterValue(EList<ElementParameterType> listParamType, String paramName) {
|
||||
for (ElementParameterType pType : listParamType) {
|
||||
if (pType != null && paramName.equals(pType.getName())) {
|
||||
return pType.getValue();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static int getAssertAmount(IProcess process) {
|
||||
int count = 0;
|
||||
@@ -1058,6 +1091,28 @@ public final class ProcessUtils {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isChildRouteProcess(Item item) {
|
||||
|
||||
if (item!= null && item instanceof ProcessItem) {
|
||||
for (Object obj : ((ProcessItem) item).getProcess().getNode()) {
|
||||
if (obj instanceof NodeType) {
|
||||
if (((NodeType) obj).getComponentName().equals("tRouteInput")) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
public static boolean isRoutelet(Property p) {
|
||||
if (p != null) {
|
||||
return ERepositoryObjectType.getType(p).equals(ERepositoryObjectType.PROCESS_ROUTELET);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static String escapeJava(String input) {
|
||||
return StringEscapeUtils.escapeJava(input);
|
||||
|
||||
@@ -335,10 +335,6 @@ public class ERepositoryObjectType extends DynaEnum<ERepositoryObjectType> {
|
||||
"SYSTEM_INDICATORS_TEXT_STATISTICS", 97, true, "repository.systemIndicators.textStatistics.alias",
|
||||
new String[] { PROD_DQ }, new String[] {}, false);
|
||||
|
||||
public final static ERepositoryObjectType TDQ_EXCHANGE = new ERepositoryObjectType("repository.tdqExchange", //$NON-NLS-1$
|
||||
"TDQ_Libraries/Exchange", "TDQ_EXCHANGE", 98, true, "repository.tdqExchange.alias", new String[] { PROD_DQ }, //$NON-NLS-1$
|
||||
new String[] {});
|
||||
|
||||
public final static ERepositoryObjectType METADATA_SALESFORCE_MODULE = new ERepositoryObjectType(
|
||||
"repository.metadataSalesforceModule", "METADATA_SALESFORCE_MODULE", 99, true, true, new String[] { PROD_DI }, //$NON-NLS-1$ //$NON-NLS-2$
|
||||
new String[] {}, false);
|
||||
|
||||
@@ -52,9 +52,9 @@ public final class UpdatesConstants {
|
||||
* Category
|
||||
*/
|
||||
|
||||
public static final String CONTEXT = Messages.getString("UpdatesConstants.Context"); //$NON-NLS-1$
|
||||
public static final String CONTEXT = Messages.getString("UpdatesConstants.ContextVariable"); //$NON-NLS-1$
|
||||
|
||||
public static final String CONTEXT_GROUP = Messages.getString("UpdatesConstants.ContextGroup"); //$NON-NLS-1$
|
||||
public static final String CONTEXT_GROUP = Messages.getString("UpdatesConstants.ContextEnvironment"); //$NON-NLS-1$
|
||||
|
||||
public static final String COMPONENT = Messages.getString("UpdatesConstants.Component"); //$NON-NLS-1$
|
||||
|
||||
|
||||
@@ -27,17 +27,6 @@ public final class TalendPropertiesUtil {
|
||||
return Boolean.parseBoolean(value);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* DOC ggu Comment method "isHideExchange".
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static boolean isHideExchange() {
|
||||
return true; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* DOC ggu Comment method "isHideBuildNumber".
|
||||
|
||||
@@ -15,6 +15,7 @@ package org.talend.core.runtime.evaluator;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.StringEscapeUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.talend.core.model.utils.ContextParameterUtils;
|
||||
import org.talend.core.runtime.util.GenericTypeUtils;
|
||||
import org.talend.core.utils.TalendQuoteUtils;
|
||||
@@ -127,6 +128,9 @@ public abstract class AbstractPropertyValueEvaluator implements PropertyValueEva
|
||||
|
||||
if (GenericTypeUtils.isStringType(property)) {
|
||||
if (property.isFlag(Property.Flags.ENCRYPT)) {
|
||||
if (!StringUtils.isEmpty(stringValue)) {
|
||||
stringValue = stringValue.replace("\\\"", "\"");
|
||||
}
|
||||
return TalendQuoteUtils.removeQuotes(stringValue);
|
||||
}
|
||||
return TalendQuoteUtils.removeQuotes(StringEscapeUtils.unescapeJava(stringValue));
|
||||
|
||||
@@ -492,8 +492,8 @@ EUpdateResult.Reload=Reload components
|
||||
EUpdateResult.Rename=Change the name
|
||||
EUpdateResult.Add=Add from repository
|
||||
EUpdateResult.Delete=Delete from repository
|
||||
UpdatesConstants.Context=Context
|
||||
UpdatesConstants.ContextGroup=Context Group
|
||||
UpdatesConstants.ContextVariable=Context variable
|
||||
UpdatesConstants.ContextEnvironment=Context environment
|
||||
UpdatesConstants.Component=Component
|
||||
UpdatesConstants.Joblet=Joblet
|
||||
UpdatesConstants.Spark_Joblet=Spark_Joblet
|
||||
|
||||
@@ -78,5 +78,7 @@ public interface MavenConstants {
|
||||
static final String PACKAGING_JAR = "jar";
|
||||
|
||||
static final String PACKAGING_POM = "pom";
|
||||
|
||||
static final String PACKAGING_BUNDLE = "bundle";
|
||||
|
||||
}
|
||||
|
||||
@@ -42,6 +42,8 @@ public class JobInfoProperties extends Properties {
|
||||
public static final String PROJECT_NAME = "project"; //$NON-NLS-1$
|
||||
|
||||
public static final String JOB_ID = "jobId"; //$NON-NLS-1$
|
||||
|
||||
public static final String JOB_PARENT_ID = "jobParentId"; //$NON-NLS-1$
|
||||
|
||||
public static final String JOB_NAME = "job"; //$NON-NLS-1$
|
||||
|
||||
@@ -98,6 +100,10 @@ public class JobInfoProperties extends Properties {
|
||||
setProperty(BRANCH, branchSelection);
|
||||
}
|
||||
|
||||
if (processItem.getProperty() != null && processItem.getProperty().getParentItem() != null) {
|
||||
setProperty(JOB_PARENT_ID, processItem.getProperty().getParentItem().getProperty().getId());
|
||||
}
|
||||
|
||||
setProperty(JOB_ID, jobInfo.getJobId());
|
||||
setProperty(JOB_NAME, jobInfo.getJobName());
|
||||
String jobType = processItem.getProcess().getJobType();
|
||||
|
||||
@@ -22,6 +22,8 @@ public interface IBuildParametes {
|
||||
static final String SERVICE = "Service"; //$NON-NLS-1$
|
||||
|
||||
static final String ITEM = "Item"; //$NON-NLS-1$
|
||||
|
||||
static final String PARENT_ITEM = "ParentItem"; //$NON-NLS-1$
|
||||
|
||||
static final String VERSION = "Version"; //$NON-NLS-1$
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ public class ModuleAccessHelper {
|
||||
return Collections.emptySet();
|
||||
}
|
||||
|
||||
private static boolean allowJavaInternalAcess(Property property) {
|
||||
public static boolean allowJavaInternalAcess(Property property) {
|
||||
String allow = System.getProperty(JavaUtils.ALLOW_JAVA_INTERNAL_ACCESS);
|
||||
if (allow != null) {
|
||||
return Boolean.valueOf(allow);
|
||||
|
||||
@@ -44,8 +44,26 @@ public interface IMetadataManagmentUiService extends IService {
|
||||
|
||||
public IContext promptConfirmLauch(Shell shell, List<IContext> contexts, IContext defaultContext);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param shell
|
||||
* @param context
|
||||
* @return
|
||||
* @deprecated use instead promptConfirmLauchIterateContexts
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean promptConfirmLauch(Shell shell, IContext context);
|
||||
|
||||
/**
|
||||
* Iterate all variables from each context to check prompt needed
|
||||
*
|
||||
* @param shell
|
||||
* @param contexts
|
||||
* @param context
|
||||
* @return
|
||||
*/
|
||||
public boolean promptConfirmLauchIterateContexts(Shell shell, List<IContext> contexts, IContext context);
|
||||
|
||||
public boolean isPromptNeeded(List<IContext> contexts);
|
||||
|
||||
}
|
||||
|
||||
@@ -149,6 +149,8 @@ public interface IRepositoryService extends IService {
|
||||
|
||||
String getStandardNodeLabel();
|
||||
|
||||
void openProjectSettingsDialog(String pageId);
|
||||
|
||||
public static IRepositoryService get() {
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IRepositoryService.class)) {
|
||||
return GlobalServiceRegister.getDefault().getService(IRepositoryService.class);
|
||||
|
||||
@@ -36,7 +36,9 @@ Require-Bundle: org.apache.commons.lang,
|
||||
org.apache.httpcomponents.httpclient,
|
||||
org.slf4j.api,
|
||||
org.apache.ant,
|
||||
org.eclipse.m2e.maven.runtime
|
||||
org.eclipse.m2e.maven.runtime,
|
||||
org.eclipse.jface.notifications,
|
||||
org.eclipse.swt
|
||||
Import-Package: org.eclipse.jdt.internal.ui.workingsets
|
||||
Export-Package: org.talend.core.ui,
|
||||
org.talend.core.ui.actions,
|
||||
@@ -56,6 +58,7 @@ Export-Package: org.talend.core.ui,
|
||||
org.talend.core.ui.context.model.tree,
|
||||
org.talend.core.ui.context.nattableTree,
|
||||
org.talend.core.ui.context.view,
|
||||
org.talend.core.ui.dialog,
|
||||
org.talend.core.ui.documentation.generation,
|
||||
org.talend.core.ui.editor,
|
||||
org.talend.core.ui.editor.command,
|
||||
|
||||
@@ -104,4 +104,8 @@
|
||||
class="org.talend.core.ui.perspective.RemoveQuickAccessProcessor">
|
||||
</processor>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.ui.startup">
|
||||
<startup class="org.talend.core.ui.notification.Java17NotificationStartupTask" />
|
||||
</extension>
|
||||
</plugin>
|
||||
|
||||
@@ -19,8 +19,8 @@ ContextComposite.treeValue=Values as tree
|
||||
ContextComposite.variable=Variables
|
||||
ContextValueErrorChecker.ErrorTitile=Context value error:
|
||||
ContextProcessSection.1=menuTable
|
||||
ContextProcessSection.12=Rename Context
|
||||
ContextProcessSection.13=Give a new name for the context {0}
|
||||
ContextProcessSection.renameEnvironment.Title=Rename context environment
|
||||
ContextProcessSection.renameEnvironment.Text=New environment name
|
||||
ContextProcessSection.2=Ask for confirmation?
|
||||
ContextProcessSection.29=Error
|
||||
ContextProcessSection.30=This name already exists
|
||||
@@ -28,15 +28,15 @@ ContextProcessSection.4=Add New Context based on ->(
|
||||
ContextProcessSection.49=Default Context
|
||||
ContextProcessSection.50=ContextProcessSection.14
|
||||
ContextProcessSection.51=ContextProcessSection.15
|
||||
ContextProcessSection.6=New Context
|
||||
ContextProcessSection.7=Give a name for the new context
|
||||
ContextProcessSection.createEnvironment.Title=Create context environment
|
||||
ContextProcessSection.createEnvironment.Text=Environment name
|
||||
ContextProcessSection.ParameterNameIsNotValid=Parameter name is not valid.
|
||||
ContextProcessSection.RemoveInformation={0} is default context, it can not be removed.
|
||||
ContextProcessSection.errorTitle=Error
|
||||
ConextTableValuesComposite.nameLabel=Name
|
||||
ConextTemplateComposite.OrderMessages=If you want reorder the variables, it must be selected.
|
||||
ConextTemplateComposite.OrderText=Original order
|
||||
ContextSetConfigurationDialog.nameNotValid=the name is not valid
|
||||
ContextSetConfigurationDialog.required.validName=A valid name is required.
|
||||
ContextTemplateComposite.CommentLabel=Comment
|
||||
ContextTemplateComposite.nameLabel=Name
|
||||
ContextTemplateComposite.scriptCodeLabel=Script code
|
||||
@@ -267,8 +267,8 @@ SelectRepositoryContextDialog.ExpandAll=Expand All
|
||||
SelectRepositoryContextDialog.Title=Select Context Variables
|
||||
SelectRepositoryContextDialog.View=View...
|
||||
SelectRepositoryContextGroupDialog.Default=default
|
||||
SelectRepositoryContextGroupDialog.Messages=In the Job, add a nonexistent context group from the repository context
|
||||
SelectRepositoryContextGroupDialog.Title=Add Context Group
|
||||
SelectRepositoryContextGroupDialog.defaultMessages=In the Job, add a nonexistent context from the repository context
|
||||
SelectRepositoryContextGroupDialog.addTitle=Add Context
|
||||
TalendTabbedPropertyComposite.compactButton.toolTip=compact view
|
||||
TalendTabbedPropertyComposite.tableButton.toolTip=table view
|
||||
TalendType.TypeName=Type name {0}
|
||||
@@ -540,8 +540,8 @@ ContextParameterProposal.ContextVariable.v1=Default context environment: {1}
|
||||
ContextParameterProposal.Type.v1=Type: {2}
|
||||
ContextParameterProposal.VariableName.v1=Value: {3}
|
||||
ArchiveFileExportOperationFullPath.cannotCreateDir=unable to create directory '{0}'
|
||||
WorkingSetConfigurationDialog_new_label=&New...
|
||||
WorkingSetConfigurationDialog_edit_label=&Edit...
|
||||
WorkingSetConfigurationDialog_create_label=&Create...
|
||||
WorkingSetConfigurationDialog_rename_label=&Rename...
|
||||
WorkingSetConfigurationDialog_remove_label=&Remove
|
||||
WorkingSetConfigurationDialog_up_label=&Up
|
||||
WorkingSetConfigurationDialog_down_label=&Down
|
||||
@@ -558,6 +558,9 @@ ContextTreeTable.AddToBuildIn_label=Add to build-in
|
||||
ContextTreeTable.AddToRepository_label=Add to repository context
|
||||
ContextNebulaComposite.ContextsUnAvailable=Context view is not available.
|
||||
ContextNebulaComposite.ContextGroupLabel=Default context environment
|
||||
ContextNebulaComposite.ManageVariablesButtonLabel=Manage variables
|
||||
ContextNebulaComposite.ViewEnvironmentsGroupLabel=View environments
|
||||
ContextNebulaComposite.ManageEnvironmentsGroupLabel=Manage environments
|
||||
ContextTreeTable.PromptToolTips=activate prompt on variable
|
||||
ContextValidator.ParameterNotValid=parameter name is not valid
|
||||
ContextValidator.ParameterValueNotMatch=Type/value mismatch: the value of a variable must match its type
|
||||
@@ -583,3 +586,11 @@ I18nPreferencePage.wait_process=The process will hold for several minutes, pleas
|
||||
MetadataPreferencePage.EnableBasic.name=Enable Basic Authentication Header
|
||||
MetadataPreferencePage.MessageDialog.Restart=The Studio needs to restart for this setting to take effect.\nAre you sure?
|
||||
TalendTabbedPropertyTitle.componentHelpTooltip=Open online help
|
||||
Java17NotificationPopup.title=Java 17 compatibility
|
||||
Java17NotificationPopup.info=Enable Java 17 compatibility to take full advantage of your Studio.\n<a>Open Project settings</a>
|
||||
CapabilityCheckDialog.title=Runtime compatibility
|
||||
CapabilityCheckDialog.message=Before publishing, ensure your runtime is using Java 11 or higher.
|
||||
CapabilityCheckDialog.link=<a>Learn more</a>
|
||||
CapabilityCheckDialog.toggle=Don't show this message again
|
||||
CapabilityCheckDialog.cancel=Cancel
|
||||
CapabilityCheckDialog.publish=Publish anyway
|
||||
|
||||
@@ -19,8 +19,8 @@ ContextComposite.treeValue=Valeurs en arbre
|
||||
ContextComposite.variable=Variables
|
||||
ContextValueErrorChecker.ErrorTitile=Erreur de la valeur de contexte\u00A0:
|
||||
ContextProcessSection.1=menuTable
|
||||
ContextProcessSection.12=Renommer le contexte
|
||||
ContextProcessSection.13=Donner un nouveau nom au contexte {0}
|
||||
ContextProcessSection.renameEnvironment.Title=Renommer l'environnement du contexte
|
||||
ContextProcessSection.renameEnvironment.Text=Nom du nouvel environnement
|
||||
ContextProcessSection.2=Demander confirmation ?
|
||||
ContextProcessSection.29=Erreur
|
||||
ContextProcessSection.30=Ce nom existe d\u00E9j\u00E0
|
||||
@@ -28,15 +28,15 @@ ContextProcessSection.4=Ajouter un contexte \u00E0 partir de ->(
|
||||
ContextProcessSection.49=Contexte par d\u00E9faut
|
||||
ContextProcessSection.50=ContextProcessSection.14
|
||||
ContextProcessSection.51=ContextProcessSection.15
|
||||
ContextProcessSection.6=Nouveau contexte
|
||||
ContextProcessSection.7=Nommez le nouveau contexte
|
||||
ContextProcessSection.createEnvironment.Title=Cr\u00E9er l'environnement du contexte
|
||||
ContextProcessSection.createEnvironment.Text=Nom de l'environnement
|
||||
ContextProcessSection.ParameterNameIsNotValid=Le nom du param\u00E8tre est invalide.
|
||||
ContextProcessSection.RemoveInformation={0} est le contexte par d\u00E9faut et ne peut \u00EAtre supprim\u00E9.
|
||||
ContextProcessSection.errorTitle=Erreur
|
||||
ConextTableValuesComposite.nameLabel=Nom
|
||||
ConextTemplateComposite.OrderMessages=Si vous souhaitez r\u00E9organiser les variables, cela doit \u00EAtre s\u00E9lectionn\u00E9.
|
||||
ConextTemplateComposite.OrderText=Ordre d'origine
|
||||
ContextSetConfigurationDialog.nameNotValid=le nom est invalide
|
||||
ContextSetConfigurationDialog.required.validName=Un nom valide est requis.
|
||||
ContextTemplateComposite.CommentLabel=Commentaire
|
||||
ContextTemplateComposite.nameLabel=Nom
|
||||
ContextTemplateComposite.scriptCodeLabel=Code script
|
||||
@@ -267,8 +267,8 @@ SelectRepositoryContextDialog.ExpandAll=Tout d\u00E9velopper
|
||||
SelectRepositoryContextDialog.Title=S\u00E9lectionner les variables de contexte
|
||||
SelectRepositoryContextDialog.View=Voir...
|
||||
SelectRepositoryContextGroupDialog.Default=Par d\u00E9faut
|
||||
SelectRepositoryContextGroupDialog.Messages=Dans le Job, ajoute le groupe de contextes inexistant au Job \u00E0 partir du contexte du R\u00E9f\u00E9rentiel
|
||||
SelectRepositoryContextGroupDialog.Title=Ajouter un groupe de contextes
|
||||
SelectRepositoryContextGroupDialog.defaultMessages=Dans le Job, ajoute un contexte inexistant au Job \u00E0 partir du contexte du R\u00E9f\u00E9rentiel
|
||||
SelectRepositoryContextGroupDialog.addTitle=Ajouter un contexte
|
||||
TalendTabbedPropertyComposite.compactButton.toolTip=vue compacte
|
||||
TalendTabbedPropertyComposite.tableButton.toolTip=vue de la table
|
||||
TalendType.TypeName=Nom du type {0}
|
||||
@@ -540,8 +540,8 @@ ContextParameterProposal.ContextVariable.v1=Environnement du contexte par d\u00E
|
||||
ContextParameterProposal.Type.v1=Type : {2}
|
||||
ContextParameterProposal.VariableName.v1=Valeur : {3}
|
||||
ArchiveFileExportOperationFullPath.cannotCreateDir=impossible de cr\u00E9er le r\u00E9pertoire '{0}'
|
||||
WorkingSetConfigurationDialog_new_label=&Nouveau...
|
||||
WorkingSetConfigurationDialog_edit_label=&Editer
|
||||
WorkingSetConfigurationDialog_create_label=&Cr\u00E9er...
|
||||
WorkingSetConfigurationDialog_rename_label=&Renommer...
|
||||
WorkingSetConfigurationDialog_remove_label=Supp&rimer
|
||||
WorkingSetConfigurationDialog_up_label=Ha&ut
|
||||
WorkingSetConfigurationDialog_down_label=&Descendre
|
||||
@@ -558,6 +558,9 @@ ContextTreeTable.AddToBuildIn_label=Ajouter \u00E0 built-in
|
||||
ContextTreeTable.AddToRepository_label=Ajouter au contexte du r\u00E9f\u00E9rentiel
|
||||
ContextNebulaComposite.ContextsUnAvailable=La vue Contextes n'est pas disponible.
|
||||
ContextNebulaComposite.ContextGroupLabel=Environnement du contexte par d\u00E9faut
|
||||
ContextNebulaComposite.ManageVariablesButtonLabel=G\u00E9rer les variables
|
||||
ContextNebulaComposite.ViewEnvironmentsGroupLabel=Voir les environnements
|
||||
ContextNebulaComposite.ManageEnvironmentsGroupLabel=G\u00E9rer les environnements
|
||||
ContextTreeTable.PromptToolTips=activer le prompt sur variable
|
||||
ContextValidator.ParameterNotValid=le nom du param\u00E8tre n'est pas valide
|
||||
ContextValidator.ParameterValueNotMatch=Mauvaise correspondance de type/valeur\u00A0: la valeur d'une variable doit correspondre \u00E0 son type
|
||||
|
||||
@@ -19,8 +19,8 @@ ContextComposite.treeValue=\u30C4\u30EA\u30FC\u3068\u3057\u3066\u306E\u5024
|
||||
ContextComposite.variable=\u5909\u6570
|
||||
ContextValueErrorChecker.ErrorTitile=\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306E\u5024\u30A8\u30E9\u30FC:
|
||||
ContextProcessSection.1=menuTable
|
||||
ContextProcessSection.12=\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306E\u540D\u524D\u3092\u5909\u66F4
|
||||
ContextProcessSection.13=\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8{0}\u306B\u65B0\u3057\u3044\u540D\u524D\u3092\u4ED8\u3051\u308B
|
||||
ContextProcessSection.renameEnvironment.Title=\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u74B0\u5883\u540D\u3092\u5909\u66F4
|
||||
ContextProcessSection.renameEnvironment.Text=\u65B0\u3057\u3044\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u74B0\u5883\u540D
|
||||
ContextProcessSection.2=\u78BA\u8A8D\u3057\u307E\u3059\u304B?
|
||||
ContextProcessSection.29=\u30A8\u30E9\u30FC
|
||||
ContextProcessSection.30=\u3053\u306E\u540D\u524D\u306F\u65E2\u306B\u5B58\u5728\u3057\u307E\u3059
|
||||
@@ -28,15 +28,15 @@ ContextProcessSection.4=Add New Context based on ->(
|
||||
ContextProcessSection.49=\u30C7\u30D5\u30A9\u30EB\u30C8\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8
|
||||
ContextProcessSection.50=ContextProcessSection.14
|
||||
ContextProcessSection.51=ContextProcessSection.15
|
||||
ContextProcessSection.6=\u65B0\u3057\u3044\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8
|
||||
ContextProcessSection.7=\u65B0\u898F\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306E\u540D\u524D\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044
|
||||
ContextProcessSection.createEnvironment.Title=\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u74B0\u5883\u3092\u4F5C\u6210
|
||||
ContextProcessSection.createEnvironment.Text=\u74B0\u5883\u540D
|
||||
ContextProcessSection.ParameterNameIsNotValid=\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u540D\u304C\u7121\u52B9\u3067\u3059\u3002
|
||||
ContextProcessSection.RemoveInformation={0}\u304C\u30C7\u30D5\u30A9\u30EB\u30C8\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3067\u3042\u308B\u305F\u3081\u3001\u524A\u9664\u3067\u304D\u307E\u305B\u3093\u3002
|
||||
ContextProcessSection.errorTitle=\u30A8\u30E9\u30FC
|
||||
ConextTableValuesComposite.nameLabel=\u540D\u524D
|
||||
ConextTemplateComposite.OrderMessages=\u5909\u6570\u3092\u4E26\u3079\u66FF\u3048\u308B\u5834\u5408\u306F\u3001\u9078\u629E\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
|
||||
ConextTemplateComposite.OrderText=\u5143\u306E\u9806\u5E8F
|
||||
ContextSetConfigurationDialog.nameNotValid=\u540D\u524D\u304C\u7121\u52B9\u3067\u3059
|
||||
ContextSetConfigurationDialog.required.validName=\u6709\u52B9\u306A\u540D\u524D\u304C\u5FC5\u8981\u3067\u3059\u3002
|
||||
ContextTemplateComposite.CommentLabel=\u30B3\u30E1\u30F3\u30C8
|
||||
ContextTemplateComposite.nameLabel=\u540D\u524D
|
||||
ContextTemplateComposite.scriptCodeLabel=\u30B9\u30AF\u30EA\u30D7\u30C8\u30B3\u30FC\u30C9
|
||||
@@ -267,8 +267,8 @@ SelectRepositoryContextDialog.ExpandAll=\u3059\u3079\u3066\u5C55\u958B
|
||||
SelectRepositoryContextDialog.Title=\u30B3\u30F3\u30C6\u30AF\u30B9\u30C8\u5909\u6570\u3092\u9078\u629E
|
||||
SelectRepositoryContextDialog.View=\u8868\u793A...
|
||||
SelectRepositoryContextGroupDialog.Default=\u30C7\u30D5\u30A9\u30EB\u30C8
|
||||
SelectRepositoryContextGroupDialog.Messages=\u30B8\u30E7\u30D6\u3067\u3001\u5B58\u5728\u3057\u306A\u3044\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30B0\u30EB\u30FC\u30D7\u3092\u30EA\u30DD\u30B8\u30C8\u30EA\u30FC\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u8FFD\u52A0\u3057\u307E\u3059
|
||||
SelectRepositoryContextGroupDialog.Title=\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30B0\u30EB\u30FC\u30D7\u3092\u8FFD\u52A0
|
||||
SelectRepositoryContextGroupDialog.defaultMessages=\u30B8\u30E7\u30D6\u3067\u3001\u5B58\u5728\u3057\u306A\u3044\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3092\u30EA\u30DD\u30B8\u30C8\u30EA\u30FC\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u8FFD\u52A0
|
||||
SelectRepositoryContextGroupDialog.addTitle=\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3092\u8FFD\u52A0
|
||||
TalendTabbedPropertyComposite.compactButton.toolTip=\u30B3\u30F3\u30D1\u30AF\u30C8\u30D3\u30E5\u30FC
|
||||
TalendTabbedPropertyComposite.tableButton.toolTip=\u30C6\u30FC\u30D6\u30EB\u30D3\u30E5\u30FC
|
||||
TalendType.TypeName=\u30BF\u30A4\u30D7\u540D{0}
|
||||
@@ -540,8 +540,8 @@ ContextParameterProposal.ContextVariable.v1=\u30C7\u30D5\u30A9\u30EB\u30C8\u306E
|
||||
ContextParameterProposal.Type.v1=\u30BF\u30A4\u30D7: {2}
|
||||
ContextParameterProposal.VariableName.v1=\u5024: {3}
|
||||
ArchiveFileExportOperationFullPath.cannotCreateDir='{0}'\u3068\u3044\u3046\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u30FC\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093
|
||||
WorkingSetConfigurationDialog_new_label=\u65B0\u898F(&N)...
|
||||
WorkingSetConfigurationDialog_edit_label=\u7DE8\u96C6(&E)
|
||||
WorkingSetConfigurationDialog_create_label=\u4F5C\u6210(&C)...
|
||||
WorkingSetConfigurationDialog_rename_label=\u540D\u524D\u3092\u5909\u66F4(&R)...
|
||||
WorkingSetConfigurationDialog_remove_label=\u524A\u9664(&R)
|
||||
WorkingSetConfigurationDialog_up_label=\u4E0A\u3078(&U)
|
||||
WorkingSetConfigurationDialog_down_label=\u4E0B\u3078(&D)
|
||||
@@ -558,6 +558,9 @@ ContextTreeTable.AddToBuildIn_label=\u8FFD\u52A0\u3057\u3066\u7D44\u307F\u8FBC\u
|
||||
ContextTreeTable.AddToRepository_label=\u30EA\u30DD\u30B8\u30C8\u30EA\u30FC\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306B\u8FFD\u52A0
|
||||
ContextNebulaComposite.ContextsUnAvailable=\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30D3\u30E5\u30FC\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002
|
||||
ContextNebulaComposite.ContextGroupLabel=\u30C7\u30D5\u30A9\u30EB\u30C8\u306E\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u74B0\u5883
|
||||
ContextNebulaComposite.ManageVariablesButtonLabel=\u5909\u6570\u3092\u7BA1\u7406
|
||||
ContextNebulaComposite.ViewEnvironmentsGroupLabel=\u74B0\u5883\u3092\u8868\u793A
|
||||
ContextNebulaComposite.ManageEnvironmentsGroupLabel=\u74B0\u5883\u3092\u7BA1\u7406
|
||||
ContextTreeTable.PromptToolTips=\u5909\u6570\u306E\u30D7\u30ED\u30F3\u30D7\u30C8\u3092\u6709\u52B9\u5316
|
||||
ContextValidator.ParameterNotValid=\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u540D\u304C\u7121\u52B9\u3067\u3059\u3002
|
||||
ContextValidator.ParameterValueNotMatch=\u578B\u3068\u5024\u306E\u4E0D\u4E00\u81F4: \u5909\u6570\u306E\u5024\u306F\u305D\u306E\u578B\u3068\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
|
||||
|
||||
@@ -19,8 +19,8 @@ ContextComposite.treeValue=\u6811\u683C\u5F0F\u503C
|
||||
ContextComposite.variable=\u53D8\u91CF
|
||||
ContextValueErrorChecker.ErrorTitile=\u4E0A\u4E0B\u6587\u503C\u9519\u8BEF:
|
||||
ContextProcessSection.1=menuTable
|
||||
ContextProcessSection.12=\u91CD\u547D\u540D\u4E0A\u4E0B\u6587
|
||||
ContextProcessSection.13=\u4E3A\u4E0A\u4E0B\u6587\u6307\u5B9A\u65B0\u540D\u79F0 {0}
|
||||
ContextProcessSection.renameEnvironment.Title=\u91CD\u547D\u540D\u4E0A\u4E0B\u6587\u73AF\u5883
|
||||
ContextProcessSection.renameEnvironment.Text=\u65B0\u73AF\u5883\u540D\u79F0
|
||||
ContextProcessSection.2=\u8981\u6C42\u786E\u8BA4\uFF1F
|
||||
ContextProcessSection.29=\u9519\u8BEF
|
||||
ContextProcessSection.30=\u6B64\u540D\u79F0\u5DF2\u5B58\u5728
|
||||
@@ -28,15 +28,15 @@ ContextProcessSection.4=\u6DFB\u52A0\u65B0\u7684\u4E0A\u4E0B\u6587\uFF0C\u57FA\u
|
||||
ContextProcessSection.49=\u9ED8\u8BA4\u4E0A\u4E0B\u6587
|
||||
ContextProcessSection.50=ContextProcessSection.14
|
||||
ContextProcessSection.51=ContextProcessSection.15
|
||||
ContextProcessSection.6=\u65B0\u7684\u4E0A\u4E0B\u6587
|
||||
ContextProcessSection.7=\u4E3A\u65B0\u7684\u4E0A\u4E0B\u6587\u6307\u5B9A\u540D\u79F0
|
||||
ContextProcessSection.createEnvironment.Title=\u521B\u5EFA\u4E0A\u4E0B\u6587\u73AF\u5883
|
||||
ContextProcessSection.createEnvironment.Text=\u73AF\u5883\u540D\u79F0
|
||||
ContextProcessSection.ParameterNameIsNotValid=\u53C2\u6570\u540D\u79F0\u65E0\u6548\u3002
|
||||
ContextProcessSection.RemoveInformation={0} \u4E3A\u9ED8\u8BA4\u4E0A\u4E0B\u6587\uFF0C\u4E0D\u80FD\u79FB\u9664\u3002
|
||||
ContextProcessSection.errorTitle=\u9519\u8BEF
|
||||
ConextTableValuesComposite.nameLabel=\u540D\u79F0
|
||||
ConextTemplateComposite.OrderMessages=\u5982\u679C\u60A8\u60F3\u91CD\u65B0\u6392\u5217\u53D8\u91CF\uFF0C\u5219\u5FC5\u987B\u9009\u4E2D\u5B83\u3002
|
||||
ConextTemplateComposite.OrderText=\u539F\u59CB\u987A\u5E8F
|
||||
ContextSetConfigurationDialog.nameNotValid=\u540D\u79F0\u65E0\u6548
|
||||
ContextSetConfigurationDialog.required.validName=\u9700\u8981\u6709\u6548\u540D\u79F0\u3002
|
||||
ContextTemplateComposite.CommentLabel=\u6CE8\u91CA
|
||||
ContextTemplateComposite.nameLabel=\u540D\u79F0
|
||||
ContextTemplateComposite.scriptCodeLabel=\u811A\u672C\u4EE3\u7801
|
||||
@@ -267,8 +267,8 @@ SelectRepositoryContextDialog.ExpandAll=\u5C55\u5F00\u5168\u90E8
|
||||
SelectRepositoryContextDialog.Title=\u9009\u62E9\u4E0A\u4E0B\u6587\u53D8\u91CF
|
||||
SelectRepositoryContextDialog.View=\u67E5\u770B...
|
||||
SelectRepositoryContextGroupDialog.Default=\u9ED8\u8BA4
|
||||
SelectRepositoryContextGroupDialog.Messages=\u5728\u4F5C\u4E1A\u4E2D\uFF0C\u4ECE\u5B58\u50A8\u5E93\u4E0A\u4E0B\u6587\u6DFB\u52A0\u4E00\u4E2A\u4E0D\u5B58\u5728\u7684\u4E0A\u4E0B\u6587\u7EC4
|
||||
SelectRepositoryContextGroupDialog.Title=\u6DFB\u52A0\u4E0A\u4E0B\u6587\u7EC4
|
||||
SelectRepositoryContextGroupDialog.defaultMessages=\u5728\u4F5C\u4E1A\u4E2D\uFF0C\u4ECE\u5B58\u50A8\u5E93\u4E0A\u4E0B\u6587\u6DFB\u52A0\u4E00\u4E2A\u4E0D\u5B58\u5728\u7684\u4E0A\u4E0B\u6587\u7EC4
|
||||
SelectRepositoryContextGroupDialog.addTitle=\u6DFB\u52A0\u4E0A\u4E0B\u6587
|
||||
TalendTabbedPropertyComposite.compactButton.toolTip=\u7F29\u653E\u89C6\u56FE
|
||||
TalendTabbedPropertyComposite.tableButton.toolTip=\u8868\u89C6\u56FE
|
||||
TalendType.TypeName=\u7C7B\u578B\u540D\u79F0 {0}
|
||||
@@ -540,8 +540,8 @@ ContextParameterProposal.ContextVariable.v1=\u9ED8\u8BA4\u4E0A\u4E0B\u6587\u73AF
|
||||
ContextParameterProposal.Type.v1=\u7C7B\u578B\uFF1A {2}
|
||||
ContextParameterProposal.VariableName.v1=\u503C: {3}
|
||||
ArchiveFileExportOperationFullPath.cannotCreateDir=\u65E0\u6CD5\u521B\u5EFA\u76EE\u5F55 '{0}'
|
||||
WorkingSetConfigurationDialog_new_label=\u65B0\u5EFA(&N)...
|
||||
WorkingSetConfigurationDialog_edit_label=\u7F16\u8F91
|
||||
WorkingSetConfigurationDialog_create_label=&\u521B\u5EFA...
|
||||
WorkingSetConfigurationDialog_rename_label=&\u91CD\u547D\u540D...
|
||||
WorkingSetConfigurationDialog_remove_label=\u79FB\u9664(&R)
|
||||
WorkingSetConfigurationDialog_up_label=\u5411\u4E0A(&U)
|
||||
WorkingSetConfigurationDialog_down_label=\u5411\u4E0B(&D)
|
||||
@@ -558,6 +558,9 @@ ContextTreeTable.AddToBuildIn_label=\u6DFB\u52A0\u5230\u6784\u5EFA\u4E2D
|
||||
ContextTreeTable.AddToRepository_label=\u6DFB\u52A0\u5230\u5B58\u50A8\u5E93\u4E0A\u4E0B\u6587
|
||||
ContextNebulaComposite.ContextsUnAvailable=\u4E0A\u4E0B\u6587\u89C6\u56FE\u4E0D\u53EF\u7528
|
||||
ContextNebulaComposite.ContextGroupLabel=\u9ED8\u8BA4\u4E0A\u4E0B\u6587\u73AF\u5883
|
||||
ContextNebulaComposite.ManageVariablesButtonLabel=\u7BA1\u7406\u53D8\u91CF
|
||||
ContextNebulaComposite.ViewEnvironmentsGroupLabel=\u67E5\u770B\u73AF\u5883
|
||||
ContextNebulaComposite.ManageEnvironmentsGroupLabel=\u7BA1\u7406\u73AF\u5883
|
||||
ContextTreeTable.PromptToolTips=\u6FC0\u6D3B\u63D0\u793A\u53D8\u91CF
|
||||
ContextValidator.ParameterNotValid=\u53C2\u6570\u540D\u65E0\u6548
|
||||
ContextValidator.ParameterValueNotMatch=\u7C7B\u578B/\u503C\u4E0D\u5339\u914D\uFF1A\u53D8\u91CF\u7684\u503C\u4E0E\u5176\u7C7B\u578B\u4E0D\u5339\u914D
|
||||
|
||||
@@ -20,16 +20,26 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.eclipse.gef.commands.Command;
|
||||
import org.eclipse.jface.action.Action;
|
||||
import org.eclipse.jface.action.IAction;
|
||||
import org.eclipse.jface.action.MenuManager;
|
||||
import org.eclipse.jface.dialogs.Dialog;
|
||||
import org.eclipse.jface.layout.GridDataFactory;
|
||||
import org.eclipse.jface.layout.GridLayoutFactory;
|
||||
import org.eclipse.jface.resource.ImageDescriptor;
|
||||
import org.eclipse.jface.viewers.IStructuredSelection;
|
||||
import org.eclipse.jface.viewers.TreeViewer;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.custom.CCombo;
|
||||
import org.eclipse.swt.events.MouseEvent;
|
||||
import org.eclipse.swt.events.MouseListener;
|
||||
import org.eclipse.swt.events.SelectionAdapter;
|
||||
import org.eclipse.swt.events.SelectionEvent;
|
||||
import org.eclipse.swt.events.SelectionListener;
|
||||
import org.eclipse.swt.graphics.Image;
|
||||
import org.eclipse.swt.graphics.Point;
|
||||
import org.eclipse.swt.graphics.Rectangle;
|
||||
import org.eclipse.swt.layout.GridData;
|
||||
import org.eclipse.swt.layout.GridLayout;
|
||||
import org.eclipse.swt.widgets.Button;
|
||||
@@ -39,6 +49,7 @@ import org.eclipse.swt.widgets.Control;
|
||||
import org.eclipse.swt.widgets.Event;
|
||||
import org.eclipse.swt.widgets.Label;
|
||||
import org.eclipse.swt.widgets.Listener;
|
||||
import org.eclipse.swt.widgets.Menu;
|
||||
import org.eclipse.ui.IWorkbenchPage;
|
||||
import org.eclipse.ui.PlatformUI;
|
||||
import org.talend.commons.ui.runtime.image.ECoreImage;
|
||||
@@ -56,11 +67,19 @@ import org.talend.core.model.metadata.types.ContextParameterJavaTypeManager;
|
||||
import org.talend.core.model.process.IContext;
|
||||
import org.talend.core.model.process.IContextManager;
|
||||
import org.talend.core.model.process.IContextParameter;
|
||||
import org.talend.core.model.process.IProcess2;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.update.EUpdateItemType;
|
||||
import org.talend.core.model.update.IUpdateItemType;
|
||||
import org.talend.core.model.update.IUpdateManager;
|
||||
import org.talend.core.model.update.UpdateManagerHelper;
|
||||
import org.talend.core.model.update.UpdateResult;
|
||||
import org.talend.core.model.update.extension.UpdateManagerProviderDetector;
|
||||
import org.talend.core.prefs.ITalendCorePrefConstants;
|
||||
import org.talend.core.ui.CoreUIPlugin;
|
||||
import org.talend.core.ui.context.ContextTreeTable.ContextTreeNode;
|
||||
import org.talend.core.ui.context.model.ContextTabChildModel;
|
||||
import org.talend.core.ui.context.model.table.ContextTableConstants;
|
||||
import org.talend.core.ui.context.model.table.ContextTableTabChildModel;
|
||||
import org.talend.core.ui.context.model.table.ContextTableTabParentModel;
|
||||
import org.talend.core.ui.context.nattableTree.ContextNatTableUtils;
|
||||
@@ -81,11 +100,13 @@ public class ContextNebulaGridComposite extends AbstractContextTabEditComposite
|
||||
|
||||
private IContextModelManager modelManager = null;
|
||||
|
||||
private ConfigureContextAction configContext;
|
||||
private ConfigureContextAction manageEnvironmentsContext;
|
||||
|
||||
private Combo contextsCombo;
|
||||
|
||||
private Button contextConfigButton;
|
||||
private CCombo viewEnvironmentsCombo;
|
||||
|
||||
private Button manageEnvironmentsButton;
|
||||
|
||||
private ContextManagerHelper helper;
|
||||
|
||||
@@ -99,7 +120,7 @@ public class ContextNebulaGridComposite extends AbstractContextTabEditComposite
|
||||
|
||||
private Button moveDownButton;
|
||||
|
||||
private Button selectContextVariablesButton;
|
||||
private Button manageVariablesButton;
|
||||
|
||||
private Composite contextTableComp;
|
||||
|
||||
@@ -107,12 +128,11 @@ public class ContextNebulaGridComposite extends AbstractContextTabEditComposite
|
||||
|
||||
private Composite messageComp;
|
||||
|
||||
private Composite contextsSelectComp;
|
||||
|
||||
private Composite buttonsComp;
|
||||
|
||||
private ContextTreeTable treeTable;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
@@ -157,12 +177,20 @@ public class ContextNebulaGridComposite extends AbstractContextTabEditComposite
|
||||
if (!ContextNatTableUtils.checkIsInstallExternalJar()) {
|
||||
createMessageGroup(this);
|
||||
} else {
|
||||
createNatTableGroup(this);
|
||||
boolean isRepositoryContext = (modelManager instanceof ContextComposite)
|
||||
&& ((ContextComposite) modelManager).isRepositoryContext();
|
||||
if (isRepositoryContext) {
|
||||
createNatTableGroup(this);
|
||||
|
||||
createButtonsGroup(this);
|
||||
} else {
|
||||
createButtonsGroup(this);
|
||||
|
||||
createNatTableGroup(this);
|
||||
}
|
||||
|
||||
createNatTable();
|
||||
|
||||
createButtonsGroup(this);
|
||||
|
||||
addListener(SWT.Resize, resizeListener);
|
||||
}
|
||||
}
|
||||
@@ -198,26 +226,11 @@ public class ContextNebulaGridComposite extends AbstractContextTabEditComposite
|
||||
private void createNatTable() {
|
||||
ContextTreeTable.TControl tControl = treeTable.createTable(contextTableComp);
|
||||
GridDataFactory.fillDefaults().grab(true, true).applyTo(tControl.getControl());
|
||||
|
||||
configContext = new ConfigureContextAction(modelManager, this.getShell());
|
||||
contextConfigButton = new Button(contextTableComp, SWT.NULL);
|
||||
GridData addContextGridData = new GridData();
|
||||
addContextGridData.verticalAlignment = SWT.TOP;
|
||||
contextConfigButton.setLayoutData(addContextGridData);
|
||||
contextConfigButton.setImage(ImageProvider.getImage(EImage.ADD_ICON));
|
||||
contextConfigButton.setToolTipText(configContext.getText());
|
||||
contextConfigButton.addSelectionListener(new SelectionAdapter() {
|
||||
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
configContext.run();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void createButtonsGroup(Composite parentComposite) {
|
||||
buttonsComp = new Composite(parentComposite, SWT.NULL);
|
||||
buttonsComp.setLayout(GridLayoutFactory.swtDefaults().spacing(0, 0).margins(0, 0).numColumns(7).create());
|
||||
buttonsComp.setLayout(GridLayoutFactory.swtDefaults().spacing(5, 0).margins(5, 0).numColumns(7).create());
|
||||
GridDataFactory.swtDefaults().align(SWT.FILL, SWT.DOWN).grab(true, false).applyTo(buttonsComp);
|
||||
buttonList.clear();
|
||||
addButton = createAddPushButton(buttonsComp);
|
||||
@@ -233,59 +246,154 @@ public class ContextNebulaGridComposite extends AbstractContextTabEditComposite
|
||||
moveDownButton = createMoveDownPushButton(buttonsComp);
|
||||
buttonList.add(moveDownButton);
|
||||
}
|
||||
|
||||
if ((modelManager instanceof ContextComposite) && !((ContextComposite) modelManager).isRepositoryContext()
|
||||
&& !PluginChecker.isOnlyTopLoaded()) {
|
||||
selectContextVariablesButton = createSelectContextVariablesPushButton(buttonsComp);
|
||||
buttonList.add(selectContextVariablesButton);
|
||||
manageVariablesButton = createManageVariablesPushButton(buttonsComp);
|
||||
buttonList.add(manageVariablesButton);
|
||||
}
|
||||
// move the context group from the top to the bottom
|
||||
Composite layoutComposite = new Composite(buttonsComp, SWT.NULL);
|
||||
layoutComposite.setLayout(GridLayoutFactory.swtDefaults().spacing(0, 0).numColumns(1).create());
|
||||
GridDataFactory.swtDefaults().align(SWT.CENTER, SWT.DOWN).grab(true, false).applyTo(layoutComposite);
|
||||
|
||||
createContextsGroup(layoutComposite);
|
||||
createEnvironmentsGroup(buttonsComp);
|
||||
}
|
||||
|
||||
private void createContextsGroup(Composite parentComposite) {
|
||||
contextsSelectComp = new Composite(parentComposite, SWT.NULL);
|
||||
contextsSelectComp.setLayout(GridLayoutFactory.swtDefaults().spacing(10, 0).margins(0, 0).numColumns(2).create());
|
||||
GridDataFactory.swtDefaults().align(SWT.RIGHT, SWT.DOWN).grab(true, false).applyTo(contextsSelectComp);
|
||||
GridLayout layout2 = (GridLayout) contextsSelectComp.getLayout();
|
||||
layout2.marginHeight = 0;
|
||||
layout2.marginTop = 0;
|
||||
layout2.marginBottom = 0;
|
||||
private void createEnvironmentsGroup(Composite parentComposite) {
|
||||
Composite environmentsComp = new Composite(parentComposite, SWT.NULL);
|
||||
environmentsComp.setLayout(new GridLayout(2, false));
|
||||
GridData contextComboData = new GridData();
|
||||
contextComboData.grabExcessHorizontalSpace = true;
|
||||
contextComboData.horizontalAlignment = GridData.END;
|
||||
environmentsComp.setLayoutData(contextComboData);
|
||||
|
||||
Label contextSeletLabel = new Label(contextsSelectComp, SWT.NULL);
|
||||
contextSeletLabel.setText(Messages.getString("ContextNebulaComposite.ContextGroupLabel")); //$NON-NLS-1$
|
||||
contextsCombo = new Combo(contextsSelectComp, SWT.READ_ONLY);
|
||||
contextsCombo.addSelectionListener(new SelectionListener() {
|
||||
viewEnvironmentsCombo = new CCombo(environmentsComp, SWT.BORDER);
|
||||
viewEnvironmentsCombo.setVisibleItemCount(0);
|
||||
viewEnvironmentsCombo.setListVisible(false);
|
||||
viewEnvironmentsCombo.setText(Messages.getString("ContextNebulaComposite.ViewEnvironmentsGroupLabel")); //$NON-NLS-1$
|
||||
viewEnvironmentsCombo.addMouseListener(new MouseListener() {
|
||||
|
||||
@Override
|
||||
public void mouseDoubleClick(MouseEvent e) {
|
||||
updateViewEnvironments(viewEnvironmentsCombo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseDown(MouseEvent e) {
|
||||
updateViewEnvironments(viewEnvironmentsCombo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseUp(MouseEvent e) {
|
||||
}
|
||||
});
|
||||
|
||||
manageEnvironmentsContext = new ConfigureContextAction(modelManager, this.getShell());
|
||||
manageEnvironmentsButton = new Button(environmentsComp, SWT.NULL);
|
||||
manageEnvironmentsButton.setText(Messages.getString("ContextNebulaComposite.ManageEnvironmentsGroupLabel")); //$NON-NLS-1$
|
||||
manageEnvironmentsButton.addSelectionListener(new SelectionAdapter() {
|
||||
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
Object obj = e.getSource();
|
||||
String selectContext = ((Combo) obj).getText();
|
||||
IContext defaultContext = modelManager.getContextManager().getDefaultContext();
|
||||
if (selectContext.equals(defaultContext.getName())) {
|
||||
} else {
|
||||
IContext newSelContext = null;
|
||||
for (IContext enviroContext : modelManager.getContextManager().getListContext()) {
|
||||
if (selectContext.equals(enviroContext.getName())) {
|
||||
newSelContext = enviroContext;
|
||||
}
|
||||
}
|
||||
modelManager.onContextChangeDefault(modelManager.getContextManager(), newSelContext);
|
||||
refresh();
|
||||
}
|
||||
|
||||
manageEnvironmentsContext.run();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void updateViewEnvironments(CCombo combo) {
|
||||
MenuManager menuMgr = new MenuManager(""); //$NON-NLS-1$
|
||||
List<IContext> contexts = modelManager.getContextManager().getListContext();
|
||||
IContext defaultContext = modelManager.getContextManager().getDefaultContext();
|
||||
for (IContext context : contexts) {
|
||||
String contextName = context.getName();
|
||||
if (contextName.equalsIgnoreCase(defaultContext.getName())) {
|
||||
contextName = contextName + ContextTableConstants.CONTEXT_DEFAULT;
|
||||
}
|
||||
StagingAction action = new StagingAction(contextName, IAction.AS_CHECK_BOX) {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
viewEnvironmentsCombo.setVisibleItemCount(0);
|
||||
viewEnvironmentsCombo.setListVisible(false);
|
||||
String name = getText();
|
||||
if (StringUtils.isNotBlank(name)) {
|
||||
updateContextStatus(name, isChecked());
|
||||
}
|
||||
}
|
||||
};
|
||||
action.setChecked(!context.isHide());
|
||||
menuMgr.add(action);
|
||||
}
|
||||
Menu menu = menuMgr.createContextMenu(combo);
|
||||
combo.setMenu(menu);
|
||||
Rectangle bounds = combo.getBounds();
|
||||
Point point = combo.getParent().toDisplay(bounds.x, bounds.y + bounds.height);
|
||||
menu.setLocation(point);
|
||||
menu.setVisible(true);
|
||||
}
|
||||
|
||||
private void updateContextStatus(String name, boolean isChecked) {
|
||||
List<IContext> contexts = modelManager.getContextManager().getListContext();
|
||||
for (IContext context : contexts) {
|
||||
if (name.equalsIgnoreCase(context.getName())
|
||||
|| name.equalsIgnoreCase(context.getName() + ContextTableConstants.CONTEXT_DEFAULT)) {
|
||||
context.setHide(!isChecked);
|
||||
break;
|
||||
}
|
||||
}
|
||||
refreshContextView();
|
||||
}
|
||||
|
||||
private void refreshContextView() {
|
||||
Command command = new Command() {
|
||||
|
||||
@Override
|
||||
public void widgetDefaultSelected(SelectionEvent e) {
|
||||
|
||||
public void execute() {
|
||||
if (modelManager.getProcess() != null && modelManager.getProcess() instanceof IProcess2) {
|
||||
IUpdateManager updateManager = modelManager.getProcess().getUpdateManager();
|
||||
if (updateManager != null) {
|
||||
List<UpdateResult> updatesNeeded = new ArrayList<UpdateResult>();
|
||||
updatesNeeded.addAll(updateManager.getUpdatesNeeded(EUpdateItemType.CONTEXT));
|
||||
final IUpdateItemType jobletContextType = UpdateManagerProviderDetector.INSTANCE
|
||||
.getUpdateItemType(UpdateManagerHelper.TYPE_JOBLET_CONTEXT);
|
||||
if (jobletContextType != null) {
|
||||
updatesNeeded.addAll(updateManager.getUpdatesNeeded(jobletContextType));
|
||||
}
|
||||
updateManager.executeUpdates(updatesNeeded);
|
||||
}
|
||||
} else {
|
||||
// set the report editor dirty according to the manager(TdqContextViewComposite)
|
||||
IContextManager contextManager = modelManager.getContextManager();
|
||||
if (contextManager instanceof JobContextManager) {
|
||||
JobContextManager jobContextManager = (JobContextManager) contextManager;
|
||||
jobContextManager.setModified(true);
|
||||
}
|
||||
}
|
||||
// refresh both
|
||||
modelManager.refresh();
|
||||
}
|
||||
};
|
||||
|
||||
});
|
||||
if (modelManager.getCommandStack() == null) {
|
||||
command.execute();
|
||||
} else {
|
||||
modelManager.getCommandStack().execute(command);
|
||||
}
|
||||
}
|
||||
|
||||
private class StagingAction extends Action {
|
||||
|
||||
protected StagingAction() {
|
||||
super();
|
||||
}
|
||||
|
||||
protected StagingAction(String text, ImageDescriptor image) {
|
||||
super(text, image);
|
||||
}
|
||||
|
||||
protected StagingAction(String text) {
|
||||
super(text);
|
||||
}
|
||||
|
||||
protected StagingAction(String text, int style) {
|
||||
super(text, style);
|
||||
}
|
||||
}
|
||||
|
||||
private Button createAddPushButton(final Composite parent) {
|
||||
@@ -404,7 +512,7 @@ public class ContextNebulaGridComposite extends AbstractContextTabEditComposite
|
||||
return moveDownPushButton;
|
||||
}
|
||||
|
||||
private Button createSelectContextVariablesPushButton(final Composite parent) {
|
||||
private Button createManageVariablesPushButton(final Composite parent) {
|
||||
Button selectContextVariablesPushButton = new Button(parent, SWT.PUSH);
|
||||
Image image = ImageProvider.getImage(ECoreImage.CONTEXT_ICON);
|
||||
selectContextVariablesPushButton.addSelectionListener(new SelectionAdapter() {
|
||||
@@ -435,6 +543,7 @@ public class ContextNebulaGridComposite extends AbstractContextTabEditComposite
|
||||
|
||||
});
|
||||
selectContextVariablesPushButton.setImage(image);
|
||||
selectContextVariablesPushButton.setText(Messages.getString("ContextNebulaComposite.ManageVariablesButtonLabel")); //$NON-NLS-1$
|
||||
return selectContextVariablesPushButton;
|
||||
}
|
||||
|
||||
@@ -452,11 +561,11 @@ public class ContextNebulaGridComposite extends AbstractContextTabEditComposite
|
||||
if (this.moveDownButton != null) {
|
||||
this.moveDownButton.setEnabled(enableState);
|
||||
}
|
||||
if (this.selectContextVariablesButton != null) {
|
||||
this.selectContextVariablesButton.setEnabled(enableState);
|
||||
if (this.manageVariablesButton != null) {
|
||||
this.manageVariablesButton.setEnabled(enableState);
|
||||
}
|
||||
if (contextConfigButton != null) {
|
||||
this.contextConfigButton.setEnabled(enableState);
|
||||
if (manageEnvironmentsButton != null) {
|
||||
this.manageEnvironmentsButton.setEnabled(enableState);
|
||||
}
|
||||
if (contextsCombo != null) {
|
||||
this.contextsCombo.setEnabled(enableState);
|
||||
@@ -542,8 +651,8 @@ public class ContextNebulaGridComposite extends AbstractContextTabEditComposite
|
||||
|
||||
@Override
|
||||
public void setEnabled(boolean enabled) {
|
||||
if (configContext != null) {
|
||||
configContext.setEnabled(enabled);
|
||||
if (manageEnvironmentsContext != null) {
|
||||
manageEnvironmentsContext.setEnabled(enabled);
|
||||
}
|
||||
if (contextTableComp != null && !contextTableComp.isDisposed()) {
|
||||
contextTableComp.setEnabled(enabled);
|
||||
@@ -648,7 +757,6 @@ public class ContextNebulaGridComposite extends AbstractContextTabEditComposite
|
||||
helper.initHelper(contextManager);
|
||||
Map<String, Item> items = new HashMap<String, Item>();
|
||||
boolean needRefresh = false;
|
||||
ContextUtils.clearMissingContextCache();
|
||||
for (IContextParameter param : contextManager.getDefaultContext().getContextParameterList()) {
|
||||
if (!param.isBuiltIn()) {
|
||||
String source = param.getSource();
|
||||
@@ -709,9 +817,6 @@ public class ContextNebulaGridComposite extends AbstractContextTabEditComposite
|
||||
}
|
||||
|
||||
private void disposeNatTableComp() {
|
||||
if (contextsSelectComp != null && !contextsSelectComp.isDisposed()) {
|
||||
contextsSelectComp.dispose();
|
||||
}
|
||||
if (contextTableComp != null && !contextTableComp.isDisposed()) {
|
||||
contextTableComp.dispose();
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ import org.talend.repository.model.RepositoryConstants;
|
||||
*/
|
||||
public class ContextSetConfigurationDialog extends ObjectSelectionDialog<IContext> {
|
||||
|
||||
private static String defaultMesage = "Configure Contexts for Job. Click to Set Default Context. "; //$NON-NLS-1$
|
||||
private static String defaultMesage = "Create as many environments as necessary and select a default one:"; //$NON-NLS-1$
|
||||
|
||||
IContextModelManager manager = null;
|
||||
|
||||
@@ -77,7 +77,7 @@ public class ContextSetConfigurationDialog extends ObjectSelectionDialog<IContex
|
||||
|
||||
@SuppressWarnings("restriction")
|
||||
public ContextSetConfigurationDialog(Shell parentShell, IContextModelManager manager) {
|
||||
super(parentShell, "Configure Contexts", defaultMesage, null); //$NON-NLS-1$
|
||||
super(parentShell, "Manage context environments", defaultMesage, null); //$NON-NLS-1$
|
||||
this.manager = manager;
|
||||
setLabelProvider(getLabelProvider());
|
||||
List<IContext> list = new ArrayList<IContext>(manager.getContextManager().getListContext());
|
||||
@@ -135,7 +135,7 @@ public class ContextSetConfigurationDialog extends ObjectSelectionDialog<IContex
|
||||
|
||||
private String toValid(String newText) {
|
||||
if (newText.equals("") || !newText.matches(RepositoryConstants.CODE_ITEM_PATTERN)) { //$NON-NLS-1$
|
||||
return Messages.getString("ContextSetConfigurationDialog.nameNotValid"); //$NON-NLS-1$
|
||||
return Messages.getString("ContextSetConfigurationDialog.required.validName"); //$NON-NLS-1$
|
||||
}
|
||||
for (IContext context : getAllContexts()) {
|
||||
if (context.getName().equalsIgnoreCase(newText)) {
|
||||
@@ -156,8 +156,8 @@ public class ContextSetConfigurationDialog extends ObjectSelectionDialog<IContex
|
||||
}
|
||||
};
|
||||
|
||||
InputDialog inputDial = new InputDialog(getShell(), Messages.getString("ContextProcessSection.6"), //$NON-NLS-1$
|
||||
Messages.getString("ContextProcessSection.7"), "", validator); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
InputDialog inputDial = new InputDialog(getShell(), Messages.getString("ContextProcessSection.createEnvironment.Title"), //$NON-NLS-1$
|
||||
Messages.getString("ContextProcessSection.createEnvironment.Text"), "", validator); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
|
||||
inputDial.open();
|
||||
String returnValue = inputDial.getValue();
|
||||
@@ -278,8 +278,8 @@ public class ContextSetConfigurationDialog extends ObjectSelectionDialog<IContex
|
||||
|
||||
IContext selectedContext = (IContext) (getSelection()).getFirstElement();
|
||||
String contextName = selectedContext.getName();
|
||||
InputDialog inputDial = new InputDialog(getShell(), Messages.getString("ContextProcessSection.12"), //$NON-NLS-1$
|
||||
Messages.getString("ContextProcessSection.13", contextName), "", validator); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
InputDialog inputDial = new InputDialog(getShell(), Messages.getString("ContextProcessSection.renameEnvironment.Title"), //$NON-NLS-1$
|
||||
Messages.getString("ContextProcessSection.renameEnvironment.Text"), "", validator); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
inputDial.open();
|
||||
String returnValue = inputDial.getValue();
|
||||
if (returnValue == null || "".equals(returnValue)) {
|
||||
|
||||
@@ -56,7 +56,6 @@ import org.eclipse.nebula.widgets.nattable.group.ColumnGroupModel.ColumnGroup;
|
||||
import org.eclipse.nebula.widgets.nattable.group.ColumnGroupReorderLayer;
|
||||
import org.eclipse.nebula.widgets.nattable.hideshow.ColumnHideShowLayer;
|
||||
import org.eclipse.nebula.widgets.nattable.hideshow.RowHideShowLayer;
|
||||
import org.eclipse.nebula.widgets.nattable.hideshow.command.ColumnHideCommand;
|
||||
import org.eclipse.nebula.widgets.nattable.layer.DataLayer;
|
||||
import org.eclipse.nebula.widgets.nattable.layer.cell.ColumnOverrideLabelAccumulator;
|
||||
import org.eclipse.nebula.widgets.nattable.layer.cell.ILayerCell;
|
||||
@@ -94,7 +93,6 @@ import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.commons.ui.runtime.ColorConstants;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.model.process.IContext;
|
||||
import org.talend.core.model.process.IContextManager;
|
||||
import org.talend.core.model.process.IContextParameter;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
import org.talend.core.model.repository.IRepositoryViewObject;
|
||||
@@ -104,7 +102,6 @@ import org.talend.core.ui.context.model.ContextTabChildModel;
|
||||
import org.talend.core.ui.context.model.table.ContextTableConstants;
|
||||
import org.talend.core.ui.context.model.table.ContextTableTabParentModel;
|
||||
import org.talend.core.ui.context.nattableTree.ContextAutoResizeTextPainter;
|
||||
import org.talend.core.ui.context.nattableTree.ContextColumnGroupConfiguration;
|
||||
import org.talend.core.ui.context.nattableTree.ContextColumnHeaderDecorator;
|
||||
import org.talend.core.ui.context.nattableTree.ContextNatTableBackGroudPainter;
|
||||
import org.talend.core.ui.context.nattableTree.ContextNatTableConfiguration;
|
||||
@@ -148,11 +145,9 @@ public class ContextTreeTable {
|
||||
|
||||
private IContextModelManager manager;
|
||||
|
||||
private final static int fixedCheckBoxWidth = 90;
|
||||
private final static int fixedCheckBoxWidth = 100;
|
||||
|
||||
private final static int fixedTypeWidth = 90;
|
||||
|
||||
private final static int fixedHidePromptWidth = 1;
|
||||
private final static int fixedTypeWidth = 100;
|
||||
|
||||
public ContextTreeTable(IContextModelManager manager) {
|
||||
this.manager = manager;
|
||||
@@ -172,14 +167,6 @@ public class ContextTreeTable {
|
||||
currentNatTabSel = null;
|
||||
}
|
||||
|
||||
public List<IContext> getContexts(IContextManager contextManger) {
|
||||
List<IContext> contexts = new ArrayList<IContext>();
|
||||
if (contextManger != null) {
|
||||
contexts = contextManger.getListContext();
|
||||
}
|
||||
return contexts;
|
||||
}
|
||||
|
||||
public void refresh() {
|
||||
if (natTable == null) {
|
||||
return;
|
||||
@@ -197,7 +184,7 @@ public class ContextTreeTable {
|
||||
ConfigRegistry configRegistry = new ConfigRegistry();
|
||||
ColumnGroupModel columnGroupModel = new ColumnGroupModel();
|
||||
configRegistry.registerConfigAttribute(SortConfigAttributes.SORT_COMPARATOR, DefaultComparator.getInstance());
|
||||
String[] propertyNames = ContextRowDataListFixture.getPropertyNames(manager);
|
||||
String[] propertyNames = ContextRowDataListFixture.getPropertyNameToLabels(manager);
|
||||
int comWidth = parent.getParent().getClientArea().width - 15;
|
||||
// the data source for the context
|
||||
if (propertyNames.length > 0) {
|
||||
@@ -251,9 +238,6 @@ public class ContextTreeTable {
|
||||
|
||||
ColumnGroupHeaderLayer columnGroupHeaderLayer = new ColumnGroupHeaderLayer(columnHeaderLayer, selectionLayer,
|
||||
columnGroupModel);
|
||||
addContextColumnGroupsBehaviour(columnGroupHeaderLayer,
|
||||
ContextRowDataListFixture.getContexts(manager.getContextManager()));
|
||||
columnGroupHeaderLayer.addConfiguration(new ContextColumnGroupConfiguration(columnGroupModel));
|
||||
|
||||
// Register labels
|
||||
SortHeaderLayer<ContextTreeNode> sortHeaderLayer = new SortHeaderLayer<ContextTreeNode>(columnGroupHeaderLayer,
|
||||
@@ -274,7 +258,8 @@ public class ContextTreeTable {
|
||||
final GridLayer gridLayer = new GridLayer(viewportLayer, sortHeaderLayer, rowHeaderLayer, cornerLayer);
|
||||
|
||||
// config the column edit configuration
|
||||
ContextValueLabelAccumulator labelAccumulator = new ContextValueLabelAccumulator(bodyDataLayer, bodyDataProvider, manager.getContextManager(), columnGroupModel);
|
||||
ContextValueLabelAccumulator labelAccumulator = new ContextValueLabelAccumulator(bodyDataLayer, bodyDataProvider,
|
||||
manager.getContextManager(), manager);
|
||||
bodyDataLayer.setConfigLabelAccumulator(labelAccumulator);
|
||||
registerColumnLabels(labelAccumulator, ContextRowDataListFixture.getContexts(manager.getContextManager()));
|
||||
|
||||
@@ -293,8 +278,6 @@ public class ContextTreeTable {
|
||||
|
||||
addCustomColumnHeaderStyleBehaviour();
|
||||
|
||||
List<Integer> hideColumnsPos = addCustomHideColumnsBehaviour(manager, columnGroupModel, bodyDataLayer);
|
||||
|
||||
List<Integer> checkColumnPos = getAllCheckPosBehaviour(manager, columnGroupModel);
|
||||
|
||||
int dataColumnsWidth = bodyDataLayer.getWidth();
|
||||
@@ -303,7 +286,7 @@ public class ContextTreeTable {
|
||||
|
||||
// for caculate the suitable column size for when maxmum or minmum the context tab
|
||||
|
||||
addCustomColumnsResizeBehaviour(bodyDataLayer, hideColumnsPos, checkColumnPos, cornerLayer.getWidth(), maxWidth);
|
||||
addCustomColumnsResizeBehaviour(bodyDataLayer, checkColumnPos, cornerLayer.getWidth(), maxWidth);
|
||||
|
||||
NatGridLayerPainter layerPainter = new NatGridLayerPainter(natTable);
|
||||
natTable.setLayerPainter(layerPainter);
|
||||
@@ -352,7 +335,7 @@ public class ContextTreeTable {
|
||||
}
|
||||
|
||||
private void constructContextTreeNodes() {
|
||||
List<IContext> contextList = getContexts(manager.getContextManager());
|
||||
List<IContext> contextList = ContextRowDataListFixture.getContexts(manager.getContextManager());
|
||||
List<IContextParameter> contextDatas = ContextTemplateComposite.computeContextTemplate(contextList);
|
||||
List<ContextTableTabParentModel> listofData = ContextNatTableUtils.constructContextDatas(contextDatas);
|
||||
contructContextTrees(listofData);
|
||||
@@ -443,18 +426,19 @@ public class ContextTreeTable {
|
||||
private List<Integer> getAllCheckPosBehaviour(IContextModelManager manager, ColumnGroupModel contextGroupModel) {
|
||||
List<Integer> checkPos = new ArrayList<Integer>();
|
||||
if (manager.getContextManager() != null) {
|
||||
List<IContext> contexts = manager.getContextManager().getListContext();
|
||||
List<IContext> contexts = ContextRowDataListFixture.getContexts(manager.getContextManager());
|
||||
for (IContext envContext : contexts) {
|
||||
ColumnGroup group = contextGroupModel.getColumnGroupByName(envContext.getName());
|
||||
int checkIndex = group.getMembers().get(1);
|
||||
checkPos.add(checkIndex);
|
||||
if (group != null) {
|
||||
checkPos.add(3);
|
||||
}
|
||||
}
|
||||
}
|
||||
return checkPos;
|
||||
}
|
||||
|
||||
private void addCustomColumnsResizeBehaviour(DataLayer dataLayer, List<Integer> hideColumnsPos,
|
||||
List<Integer> checkColumnsPos, int cornerWidth, int maxWidth) {
|
||||
private void addCustomColumnsResizeBehaviour(DataLayer dataLayer, List<Integer> checkColumnsPos, int cornerWidth,
|
||||
int maxWidth) {
|
||||
dataLayer.setColumnsResizableByDefault(true);
|
||||
int dataColumnsCount = dataLayer.getPreferredColumnCount();
|
||||
|
||||
@@ -466,10 +450,9 @@ public class ContextTreeTable {
|
||||
} else {
|
||||
int typeColumnPos = dataLayer.getColumnPositionByIndex(1);
|
||||
|
||||
int leftWidth = maxWidth - fixedTypeWidth - fixedCheckBoxWidth * checkColumnsPos.size() - cornerWidth * 2
|
||||
- fixedHidePromptWidth;
|
||||
int leftWidth = maxWidth - fixedTypeWidth - fixedCheckBoxWidth * checkColumnsPos.size() - cornerWidth * 2;
|
||||
|
||||
int currentColumnsCount = dataColumnsCount - hideColumnsPos.size() - checkColumnsPos.size() - 1;
|
||||
int currentColumnsCount = dataColumnsCount - checkColumnsPos.size() - 1;
|
||||
int averageWidth = leftWidth / currentColumnsCount;
|
||||
for (int i = 0; i < dataLayer.getColumnCount(); i++) {
|
||||
boolean findHide = false;
|
||||
@@ -479,12 +462,6 @@ public class ContextTreeTable {
|
||||
findType = true;
|
||||
dataLayer.setColumnWidthByPosition(i, fixedTypeWidth);
|
||||
}
|
||||
for (int hidePos : hideColumnsPos) {
|
||||
if (hidePos == i) {
|
||||
findHide = true;
|
||||
dataLayer.setColumnWidthByPosition(i, fixedHidePromptWidth);
|
||||
}
|
||||
}
|
||||
for (int checkPos : checkColumnsPos) {
|
||||
if (checkPos == i) {
|
||||
findCheck = true;
|
||||
@@ -523,35 +500,6 @@ public class ContextTreeTable {
|
||||
return colWidth > max ? colWidth : max;
|
||||
}
|
||||
|
||||
private List<Integer> addCustomHideColumnsBehaviour(IContextModelManager modelManager, ColumnGroupModel contextGroupModel,
|
||||
DataLayer dataLayer) {
|
||||
List<Integer> hidePos = new ArrayList<Integer>();
|
||||
if (modelManager.getContextManager() != null) {
|
||||
List<IContext> contexts = modelManager.getContextManager().getListContext();
|
||||
for (IContext envContext : contexts) {
|
||||
boolean needHidePrompt = true;
|
||||
ColumnGroup group = contextGroupModel.getColumnGroupByName(envContext.getName());
|
||||
// get every context's prompt to see if need to hide or not,decide by the check of prompt
|
||||
int promptIndex = group.getMembers().get(2);
|
||||
List<IContextParameter> list = envContext.getContextParameterList();
|
||||
if (list != null && list.size() > 0) {
|
||||
for (IContextParameter contextPara : list) {
|
||||
if (contextPara.isPromptNeeded()) {
|
||||
needHidePrompt = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (needHidePrompt) {
|
||||
int hidePosition = dataLayer.getColumnPositionByIndex(promptIndex);
|
||||
hidePos.add(hidePosition);
|
||||
natTable.doCommand(new ColumnHideCommand(dataLayer, hidePosition));
|
||||
}
|
||||
}
|
||||
}
|
||||
return hidePos;
|
||||
}
|
||||
|
||||
private void addCustomSelectionBehaviour(SelectionLayer layer) {
|
||||
// need control the selection style when select the rows.
|
||||
DefaultSelectionStyleConfiguration selectStyleConfig = new DefaultSelectionStyleConfiguration();
|
||||
@@ -583,26 +531,14 @@ public class ContextTreeTable {
|
||||
natTable.addConfiguration(new ContextParaModeChangeMenuConfiguration(natTable, bodyDataProvider, selection));
|
||||
}
|
||||
|
||||
private void addContextColumnGroupsBehaviour(ColumnGroupHeaderLayer columnHeaderLayer, List<IContext> contexts) {
|
||||
// 0=Name,1=Type,2=Comment.
|
||||
int i = 2;
|
||||
for (IContext context : contexts) {
|
||||
String evnContext = context.getName();
|
||||
columnHeaderLayer.addColumnsIndexesToGroup(evnContext, new int[] { ++i, ++i, ++i });
|
||||
}
|
||||
}
|
||||
|
||||
private void registerColumnLabels(ColumnOverrideLabelAccumulator columnLabelAccumulator, List<IContext> contexts) {
|
||||
columnLabelAccumulator.registerColumnOverrides(0, new String[] { ContextTableConstants.COLUMN_NAME_PROPERTY });
|
||||
columnLabelAccumulator.registerColumnOverrides(1, new String[] { ContextTableConstants.COLUMN_TYPE_PROPERTY });
|
||||
columnLabelAccumulator.registerColumnOverrides(2, new String[] { ContextTableConstants.COLUMN_COMMENT_PROPERTY });
|
||||
// the columns after "type" will caculated by the contexts
|
||||
// 0=Name,1=Type,2=Comment.
|
||||
int j = 3;
|
||||
columnLabelAccumulator.registerColumnOverrides(3, new String[] { ContextTableConstants.COLUMN_CHECK_PROPERTY });
|
||||
int j = 4;
|
||||
for (IContext context : contexts) {
|
||||
columnLabelAccumulator.registerColumnOverrides(j++, new String[] { ContextTableConstants.COLUMN_CONTEXT_VALUE });
|
||||
columnLabelAccumulator.registerColumnOverrides(j++, new String[] { ContextTableConstants.COLUMN_CHECK_PROPERTY });
|
||||
columnLabelAccumulator.registerColumnOverrides(j++, new String[] { ContextTableConstants.COLUMN_PROMPT_PROPERTY });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -166,7 +166,8 @@ public abstract class ObjectSelectionDialog<B> extends SelectionDialog {
|
||||
// fNewButton = createButton(buttonComposite, nextButtonId++,
|
||||
// WorkingSetMessages.WorkingSetConfigurationDialog_new_label,
|
||||
// false);
|
||||
fNewButton = createButton(buttonComposite, nextButtonId++, Messages.getString("WorkingSetConfigurationDialog_new_label"), //$NON-NLS-1$
|
||||
fNewButton = createButton(buttonComposite, nextButtonId++,
|
||||
Messages.getString("WorkingSetConfigurationDialog_create_label"), //$NON-NLS-1$
|
||||
false);
|
||||
fNewButton.setFont(composite.getFont());
|
||||
fNewButton.addSelectionListener(new SelectionAdapter() {
|
||||
@@ -181,7 +182,7 @@ public abstract class ObjectSelectionDialog<B> extends SelectionDialog {
|
||||
// WorkingSetMessages.WorkingSetConfigurationDialog_edit_label,
|
||||
// false);
|
||||
fEditButton = createButton(buttonComposite, nextButtonId++,
|
||||
Messages.getString("WorkingSetConfigurationDialog_edit_label"), false); //$NON-NLS-1$
|
||||
Messages.getString("WorkingSetConfigurationDialog_rename_label"), false); //$NON-NLS-1$
|
||||
fEditButton.setFont(composite.getFont());
|
||||
fEditButton.addSelectionListener(new SelectionAdapter() {
|
||||
|
||||
|
||||
@@ -52,9 +52,9 @@ import org.talend.designer.core.model.utils.emf.talendfile.ContextType;
|
||||
*/
|
||||
public class SelectRepositoryContextGroupDialog extends SelectionDialog {
|
||||
|
||||
private static final String DEFAULTMESAGE = Messages.getString("SelectRepositoryContextGroupDialog.Messages"); //$NON-NLS-1$
|
||||
private static final String DEFAULTMESAGE = Messages.getString("SelectRepositoryContextGroupDialog.defaultMessages"); //$NON-NLS-1$
|
||||
|
||||
private static final String TITILE = Messages.getString("SelectRepositoryContextGroupDialog.Title"); //$NON-NLS-1$
|
||||
private static final String TITILE = Messages.getString("SelectRepositoryContextGroupDialog.addTitle"); //$NON-NLS-1$
|
||||
|
||||
private static final String LEFTBRACKET = " ("; //$NON-NLS-1$
|
||||
|
||||
|
||||
@@ -34,4 +34,6 @@ public class ContextTableConstants {
|
||||
public static final String LABEL_VALUE_NOT_MATCH_TYPE = "LABEL_VALUE_NOT_MATCH_TYPE";
|
||||
|
||||
public static final int DEFAULT_COLUMN_COUNT = 8;
|
||||
|
||||
public static final String CONTEXT_DEFAULT = " (Default)";//$NON-NLS-1$
|
||||
}
|
||||
|
||||
@@ -1,92 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2021 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.core.ui.context.nattableTree;
|
||||
|
||||
import org.eclipse.nebula.widgets.nattable.config.CellConfigAttributes;
|
||||
import org.eclipse.nebula.widgets.nattable.config.IConfigRegistry;
|
||||
import org.eclipse.nebula.widgets.nattable.grid.GridRegion;
|
||||
import org.eclipse.nebula.widgets.nattable.group.ColumnGroupModel;
|
||||
import org.eclipse.nebula.widgets.nattable.group.action.ColumnGroupExpandCollapseAction;
|
||||
import org.eclipse.nebula.widgets.nattable.group.action.ColumnGroupHeaderReorderDragMode;
|
||||
import org.eclipse.nebula.widgets.nattable.group.action.ColumnHeaderReorderDragMode;
|
||||
import org.eclipse.nebula.widgets.nattable.group.action.CreateColumnGroupAction;
|
||||
import org.eclipse.nebula.widgets.nattable.group.action.UngroupColumnsAction;
|
||||
import org.eclipse.nebula.widgets.nattable.group.config.DefaultColumnGroupHeaderLayerConfiguration;
|
||||
import org.eclipse.nebula.widgets.nattable.group.painter.ColumnGroupHeaderTextPainter;
|
||||
import org.eclipse.nebula.widgets.nattable.style.DisplayMode;
|
||||
import org.eclipse.nebula.widgets.nattable.ui.action.AggregateDragMode;
|
||||
import org.eclipse.nebula.widgets.nattable.ui.action.CellDragMode;
|
||||
import org.eclipse.nebula.widgets.nattable.ui.action.NoOpMouseAction;
|
||||
import org.eclipse.nebula.widgets.nattable.ui.binding.UiBindingRegistry;
|
||||
import org.eclipse.nebula.widgets.nattable.ui.matcher.KeyEventMatcher;
|
||||
import org.eclipse.nebula.widgets.nattable.ui.matcher.MouseEventMatcher;
|
||||
import org.eclipse.swt.SWT;
|
||||
|
||||
/**
|
||||
* created by ldong on Sep 19, 2014 Detailled comment
|
||||
*
|
||||
*/
|
||||
public class ContextColumnGroupConfiguration extends DefaultColumnGroupHeaderLayerConfiguration {
|
||||
|
||||
private final ColumnGroupModel columnGroupModel;
|
||||
|
||||
/**
|
||||
* DOC ldong ContextColumnGroupConfiguration constructor comment.
|
||||
*
|
||||
* @param columnGroupModel
|
||||
*/
|
||||
public ContextColumnGroupConfiguration(ColumnGroupModel columnGroupModel) {
|
||||
super(columnGroupModel);
|
||||
this.columnGroupModel = columnGroupModel;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.nebula.widgets.nattable.group.config.DefaultColumnGroupHeaderLayerConfiguration#configureRegistry
|
||||
* (org.eclipse.nebula.widgets.nattable.config.IConfigRegistry)
|
||||
*/
|
||||
@Override
|
||||
public void configureRegistry(IConfigRegistry configRegistry) {
|
||||
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_PAINTER, new ContextColumnHeaderDecorator(
|
||||
new ColumnGroupHeaderTextPainter()), DisplayMode.NORMAL, GridRegion.COLUMN_GROUP_HEADER);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.nebula.widgets.nattable.group.config.DefaultColumnGroupHeaderLayerConfiguration#configureUiBindings
|
||||
* (org.eclipse.nebula.widgets.nattable.ui.binding.UiBindingRegistry)
|
||||
*/
|
||||
@Override
|
||||
public void configureUiBindings(UiBindingRegistry uiBindingRegistry) {
|
||||
uiBindingRegistry.registerMouseDragMode(MouseEventMatcher.columnGroupHeaderLeftClick(SWT.NONE), new AggregateDragMode(
|
||||
new CellDragMode(), new ColumnGroupHeaderReorderDragMode(columnGroupModel)));
|
||||
|
||||
uiBindingRegistry.registerMouseDragMode(MouseEventMatcher.columnHeaderLeftClick(SWT.NONE),
|
||||
new ColumnHeaderReorderDragMode(columnGroupModel));
|
||||
|
||||
uiBindingRegistry.registerDoubleClickBinding(MouseEventMatcher.columnGroupHeaderLeftClick(SWT.NONE),
|
||||
new NoOpMouseAction());
|
||||
// just switch the action for the double click and single click
|
||||
uiBindingRegistry.registerFirstSingleClickBinding(MouseEventMatcher.columnGroupHeaderLeftClick(SWT.NONE),
|
||||
new ColumnGroupExpandCollapseAction());
|
||||
|
||||
uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.CTRL, 'g'), new CreateColumnGroupAction());
|
||||
uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.CTRL, 'u'), new UngroupColumnsAction());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -27,17 +27,10 @@ import org.eclipse.swt.graphics.Rectangle;
|
||||
*/
|
||||
public class ContextColumnHeaderDecorator extends CellPainterWrapper {
|
||||
|
||||
private boolean uplift = true;
|
||||
|
||||
public ContextColumnHeaderDecorator(ICellPainter interiorPainter) {
|
||||
super(interiorPainter);
|
||||
}
|
||||
|
||||
public ContextColumnHeaderDecorator(ICellPainter interiorPainter, boolean uplift) {
|
||||
super(interiorPainter);
|
||||
this.uplift = uplift;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
@@ -54,14 +47,14 @@ public class ContextColumnHeaderDecorator extends CellPainterWrapper {
|
||||
// Save GC settings
|
||||
Color originalForeground = gc.getForeground();
|
||||
|
||||
gc.setForeground(uplift ? GUIHelper.COLOR_WIDGET_LIGHT_SHADOW : GUIHelper.COLOR_WIDGET_DARK_SHADOW);
|
||||
gc.setForeground(GUIHelper.COLOR_WIDGET_LIGHT_SHADOW);
|
||||
gc.drawLine(adjustedCellBounds.x, adjustedCellBounds.y, adjustedCellBounds.x + adjustedCellBounds.width - 1,
|
||||
adjustedCellBounds.y);
|
||||
gc.drawLine(adjustedCellBounds.x, adjustedCellBounds.y, adjustedCellBounds.x, adjustedCellBounds.y
|
||||
+ adjustedCellBounds.height - 1);
|
||||
|
||||
// Down
|
||||
gc.setForeground(uplift ? GUIHelper.COLOR_WIDGET_DARK_SHADOW : GUIHelper.COLOR_WIDGET_LIGHT_SHADOW);
|
||||
gc.setForeground(GUIHelper.COLOR_WIDGET_LIGHT_SHADOW);
|
||||
gc.drawLine(adjustedCellBounds.x, adjustedCellBounds.y + adjustedCellBounds.height - 1, adjustedCellBounds.x
|
||||
+ adjustedCellBounds.width - 1, adjustedCellBounds.y + adjustedCellBounds.height - 1);
|
||||
gc.drawLine(adjustedCellBounds.x + adjustedCellBounds.width - 1, adjustedCellBounds.y, adjustedCellBounds.x
|
||||
|
||||
@@ -107,8 +107,6 @@ public class ContextNatTableConfiguration extends AbstractRegistryConfiguration
|
||||
ContextTableConstants.COLUMN_COMMENT_PROPERTY);
|
||||
configRegistry.registerConfigAttribute(EditConfigAttributes.CELL_EDITABLE_RULE, getEditRule(), DisplayMode.EDIT,
|
||||
ContextTableConstants.COLUMN_CHECK_PROPERTY);
|
||||
configRegistry.registerConfigAttribute(EditConfigAttributes.CELL_EDITABLE_RULE, getEditRule(), DisplayMode.EDIT,
|
||||
ContextTableConstants.COLUMN_PROMPT_PROPERTY);
|
||||
configRegistry.registerConfigAttribute(EditConfigAttributes.CELL_EDITABLE_RULE, getEditRule(), DisplayMode.EDIT,
|
||||
ContextTableConstants.COLUMN_CONTEXT_VALUE);
|
||||
}
|
||||
@@ -123,15 +121,13 @@ public class ContextNatTableConfiguration extends AbstractRegistryConfiguration
|
||||
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyleDefault, DisplayMode.NORMAL,
|
||||
ContextTableConstants.COLUMN_NAME_PROPERTY);
|
||||
|
||||
|
||||
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyleDefault, DisplayMode.NORMAL,
|
||||
ContextTableConstants.COLUMN_COMMENT_PROPERTY);
|
||||
|
||||
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyleDefault, DisplayMode.NORMAL,
|
||||
ContextTableConstants.COLUMN_CHECK_PROPERTY);
|
||||
|
||||
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyleDefault, DisplayMode.NORMAL,
|
||||
ContextTableConstants.COLUMN_PROMPT_PROPERTY);
|
||||
|
||||
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyleDefault, DisplayMode.NORMAL,
|
||||
ContextTableConstants.COLUMN_CONTEXT_VALUE);
|
||||
|
||||
@@ -150,9 +146,6 @@ public class ContextNatTableConfiguration extends AbstractRegistryConfiguration
|
||||
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyleSelect, DisplayMode.SELECT,
|
||||
ContextTableConstants.COLUMN_CHECK_PROPERTY);
|
||||
|
||||
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyleSelect, DisplayMode.SELECT,
|
||||
ContextTableConstants.COLUMN_PROMPT_PROPERTY);
|
||||
|
||||
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyleSelect, DisplayMode.SELECT,
|
||||
ContextTableConstants.COLUMN_CONTEXT_VALUE);
|
||||
}
|
||||
@@ -161,7 +154,8 @@ public class ContextNatTableConfiguration extends AbstractRegistryConfiguration
|
||||
configRegistry.registerConfigAttribute(EditConfigAttributes.DATA_VALIDATOR,
|
||||
new EventDataValidator(dataProvider, manager), DisplayMode.EDIT, ContextTableConstants.COLUMN_NAME_PROPERTY);
|
||||
configRegistry.registerConfigAttribute(EditConfigAttributes.DATA_VALIDATOR,
|
||||
new EventDataValueValidator(dataProvider, manager, columnGroupModel), DisplayMode.EDIT, ContextTableConstants.COLUMN_CONTEXT_VALUE);
|
||||
new EventDataValueValidator(dataProvider, manager, modelManager), DisplayMode.EDIT,
|
||||
ContextTableConstants.COLUMN_CONTEXT_VALUE);
|
||||
}
|
||||
|
||||
private void registerErrorHandlingStrategies(IConfigRegistry configRegistry) {
|
||||
@@ -176,7 +170,7 @@ public class ContextNatTableConfiguration extends AbstractRegistryConfiguration
|
||||
|
||||
@Override
|
||||
public boolean isEditable(int columnIndex, int rowIndex) {
|
||||
if (columnIndex == 4) {
|
||||
if (columnIndex == 3) {
|
||||
// active the prompt when export as context
|
||||
return true;
|
||||
}
|
||||
@@ -204,7 +198,6 @@ public class ContextNatTableConfiguration extends AbstractRegistryConfiguration
|
||||
registerColumnThreeCheckBoxEditor(configRegistry);
|
||||
registerColumnFourTextEditor(configRegistry);
|
||||
registerColumnFiveTextEditor(configRegistry);
|
||||
registerColumnSixTextEditor(configRegistry);
|
||||
}
|
||||
|
||||
private void registerColumnFirstTextEditor(IConfigRegistry configRegistry) {
|
||||
@@ -321,17 +314,12 @@ public class ContextNatTableConfiguration extends AbstractRegistryConfiguration
|
||||
}
|
||||
|
||||
private void registerColumnFourTextEditor(IConfigRegistry configRegistry) {
|
||||
configRegistry.registerConfigAttribute(EditConfigAttributes.CELL_EDITOR, new TextCellEditor(true, true),
|
||||
DisplayMode.NORMAL, ContextTableConstants.COLUMN_PROMPT_PROPERTY);
|
||||
}
|
||||
|
||||
private void registerColumnFiveTextEditor(IConfigRegistry configRegistry) {
|
||||
ProxyDynamicCellEditor cutomCellEditor = new ProxyDynamicCellEditor(dataProvider, columnGroupModel, manager);
|
||||
ProxyDynamicCellEditor cutomCellEditor = new ProxyDynamicCellEditor(dataProvider, manager, modelManager);
|
||||
configRegistry.registerConfigAttribute(EditConfigAttributes.CELL_EDITOR, cutomCellEditor, DisplayMode.EDIT,
|
||||
ContextTableConstants.COLUMN_CONTEXT_VALUE);
|
||||
}
|
||||
|
||||
private void registerColumnSixTextEditor(IConfigRegistry configRegistry) {
|
||||
private void registerColumnFiveTextEditor(IConfigRegistry configRegistry) {
|
||||
configRegistry.registerConfigAttribute(EditConfigAttributes.CELL_EDITOR, new TextCellEditor(true, true),
|
||||
DisplayMode.NORMAL, ContextTableConstants.COLUMN_COMMENT_PROPERTY);
|
||||
}
|
||||
|
||||
@@ -40,24 +40,51 @@ public class ContextRowDataListFixture {
|
||||
public static List<IContext> getContexts(IContextManager contextManger) {
|
||||
List<IContext> contexts = new ArrayList<IContext>();
|
||||
if (contextManger != null) {
|
||||
contexts = contextManger.getListContext();
|
||||
for (IContext context : contextManger.getListContext()) {
|
||||
if (!context.isHide()) {
|
||||
contexts.add(context);
|
||||
}
|
||||
}
|
||||
}
|
||||
return contexts;
|
||||
}
|
||||
|
||||
public static String[] getPropertyNames(IContextModelManager manager) {
|
||||
public static String[] getPropertyNameToLabels(IContextModelManager manager) {
|
||||
List<IContext> contexts = getContexts(manager.getContextManager());
|
||||
int columnCount = contexts.size() * 3 + 3;
|
||||
IContext defaultContext = manager.getContextManager().getDefaultContext();
|
||||
int columnCount = contexts.size() + 4;
|
||||
String[] columnsName = new String[columnCount];
|
||||
int i = 0;
|
||||
columnsName[i++] = ContextTableConstants.COLUMN_NAME_PROPERTY;
|
||||
columnsName[i++] = ContextTableConstants.COLUMN_TYPE_PROPERTY;
|
||||
columnsName[i++] = ContextTableConstants.COLUMN_COMMENT_PROPERTY;
|
||||
columnsName[i++] = ContextTableConstants.COLUMN_CHECK_PROPERTY;
|
||||
if (contexts.size() > 0) {
|
||||
for (IContext context : contexts) {
|
||||
columnsName[i++] = ContextTableConstants.COLUMN_CONTEXT_VALUE;
|
||||
columnsName[i++] = ContextTableConstants.COLUMN_CHECK_PROPERTY;
|
||||
columnsName[i++] = ContextTableConstants.COLUMN_PROMPT_PROPERTY;
|
||||
String contextName = context.getName();
|
||||
if (contextName.equalsIgnoreCase(defaultContext.getName()) && !contextName.equalsIgnoreCase("Default")) { //$NON-NLS-1$
|
||||
contextName = contextName + ContextTableConstants.CONTEXT_DEFAULT;
|
||||
}
|
||||
columnsName[i++] = contextName;
|
||||
}
|
||||
return columnsName;
|
||||
}
|
||||
return columnsName;
|
||||
}
|
||||
|
||||
public static String[] getPropertyNames(IContextModelManager manager) {
|
||||
List<IContext> contexts = getContexts(manager.getContextManager());
|
||||
int columnCount = contexts.size() + 4;
|
||||
String[] columnsName = new String[columnCount];
|
||||
int i = 0;
|
||||
columnsName[i++] = ContextTableConstants.COLUMN_NAME_PROPERTY;
|
||||
columnsName[i++] = ContextTableConstants.COLUMN_TYPE_PROPERTY;
|
||||
columnsName[i++] = ContextTableConstants.COLUMN_COMMENT_PROPERTY;
|
||||
columnsName[i++] = ContextTableConstants.COLUMN_CHECK_PROPERTY;
|
||||
if (contexts.size() > 0) {
|
||||
for (IContext context : contexts) {
|
||||
String contextName = context.getName();
|
||||
columnsName[i++] = contextName;
|
||||
}
|
||||
return columnsName;
|
||||
}
|
||||
@@ -69,7 +96,6 @@ public class ContextRowDataListFixture {
|
||||
List<IContext> contexts = getContexts(manager.getContextManager());
|
||||
propertyToLabelMap.put(ContextTableConstants.COLUMN_NAME_PROPERTY, ContextTableConstants.COLUMN_NAME_PROPERTY);
|
||||
propertyToLabelMap.put(ContextTableConstants.COLUMN_TYPE_PROPERTY, ContextTableConstants.COLUMN_TYPE_PROPERTY);
|
||||
propertyToLabelMap.put(ContextTableConstants.COLUMN_PROMPT_PROPERTY, ContextTableConstants.COLUMN_PROMPT_PROPERTY);
|
||||
propertyToLabelMap.put(ContextTableConstants.COLUMN_CONTEXT_VALUE, ContextTableConstants.COLUMN_CONTEXT_VALUE);
|
||||
for (IContext context : contexts) {
|
||||
propertyToLabelMap.put(context.getName(), context.getName());
|
||||
|
||||
@@ -14,50 +14,51 @@ package org.talend.core.ui.context.nattableTree;
|
||||
|
||||
import org.eclipse.nebula.widgets.nattable.data.IDataProvider;
|
||||
import org.eclipse.nebula.widgets.nattable.extension.glazedlists.GlazedListsDataProvider;
|
||||
import org.eclipse.nebula.widgets.nattable.group.ColumnGroupModel;
|
||||
import org.eclipse.nebula.widgets.nattable.layer.ILayer;
|
||||
import org.eclipse.nebula.widgets.nattable.layer.LabelStack;
|
||||
import org.eclipse.nebula.widgets.nattable.layer.cell.ColumnOverrideLabelAccumulator;
|
||||
import org.talend.core.model.process.IContextManager;
|
||||
import org.talend.core.model.process.IContextParameter;
|
||||
import org.talend.core.ui.context.ContextTreeTable.ContextTreeNode;
|
||||
import org.talend.core.ui.context.IContextModelManager;
|
||||
import org.talend.core.ui.context.model.ContextTabChildModel;
|
||||
import org.talend.core.ui.context.model.table.ContextTableConstants;
|
||||
import org.talend.core.ui.context.model.table.ContextTableTabParentModel;
|
||||
import org.talend.core.ui.context.model.table.ContextTableTabParentModel;
|
||||
import org.talend.core.ui.utils.ContextTypeValidator;
|
||||
|
||||
|
||||
public class ContextValueLabelAccumulator extends ColumnOverrideLabelAccumulator {
|
||||
|
||||
private IDataProvider dataProvider;
|
||||
private ColumnGroupModel columnGroupModel;
|
||||
|
||||
private IContextManager manager;
|
||||
|
||||
public ContextValueLabelAccumulator(ILayer layer, IDataProvider dataProvider, IContextManager manager, ColumnGroupModel columnGroupModel) {
|
||||
private IContextModelManager modelManager;
|
||||
|
||||
public ContextValueLabelAccumulator(ILayer layer, IDataProvider dataProvider, IContextManager manager,
|
||||
IContextModelManager modelManager) {
|
||||
super(layer);
|
||||
this.dataProvider = dataProvider;
|
||||
this.manager = manager;
|
||||
this.columnGroupModel = columnGroupModel;
|
||||
this.modelManager = modelManager;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void accumulateConfigLabels(LabelStack configLabels, int columnPosition, int rowPosition) {
|
||||
super.accumulateConfigLabels(configLabels, columnPosition, rowPosition);
|
||||
boolean isAddedValueNotMatchStyle = false;
|
||||
boolean isAddedValueNotMatchStyle = false;
|
||||
String currentColumnName = ContextRowDataListFixture.getPropertyNamesAsList(modelManager).get(columnPosition);
|
||||
ContextTreeNode rowNode = ((GlazedListsDataProvider<ContextTreeNode>) dataProvider).getList().get(rowPosition);
|
||||
if (configLabels.contains(ContextTableConstants.COLUMN_CONTEXT_VALUE)) {
|
||||
if (columnGroupModel != null && columnGroupModel.isPartOfAGroup(columnPosition)) {
|
||||
String columnGroupName = columnGroupModel.getColumnGroupByIndex(columnPosition).getName();
|
||||
IContextParameter realPara = ContextNatTableUtils.getRealParameter(manager, columnGroupName, rowNode.getTreeData());
|
||||
if (realPara != null) {
|
||||
boolean isValid = ContextTypeValidator.isMatchType(realPara.getType(), realPara.getValue());
|
||||
if (isValid) {
|
||||
configLabels.remove(ContextTableConstants.LABEL_VALUE_NOT_MATCH_TYPE);
|
||||
} else {
|
||||
configLabels.addLabel(ContextTableConstants.LABEL_VALUE_NOT_MATCH_TYPE);
|
||||
isAddedValueNotMatchStyle = true;
|
||||
}
|
||||
IContextParameter realPara = ContextNatTableUtils.getRealParameter(manager, currentColumnName, rowNode.getTreeData());
|
||||
if (realPara != null) {
|
||||
boolean isValid = ContextTypeValidator.isMatchType(realPara.getType(), realPara.getValue());
|
||||
if (isValid) {
|
||||
configLabels.remove(ContextTableConstants.LABEL_VALUE_NOT_MATCH_TYPE);
|
||||
} else {
|
||||
configLabels.addLabel(ContextTableConstants.LABEL_VALUE_NOT_MATCH_TYPE);
|
||||
isAddedValueNotMatchStyle = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,38 +16,37 @@ import org.eclipse.nebula.widgets.nattable.data.IDataProvider;
|
||||
import org.eclipse.nebula.widgets.nattable.data.validate.DataValidator;
|
||||
import org.eclipse.nebula.widgets.nattable.data.validate.ValidationFailedException;
|
||||
import org.eclipse.nebula.widgets.nattable.extension.glazedlists.GlazedListsDataProvider;
|
||||
import org.eclipse.nebula.widgets.nattable.group.ColumnGroupModel;
|
||||
import org.talend.core.model.process.IContextManager;
|
||||
import org.talend.core.model.process.IContextParameter;
|
||||
import org.talend.core.ui.context.ContextTreeTable.ContextTreeNode;
|
||||
import org.talend.core.ui.context.IContextModelManager;
|
||||
import org.talend.core.ui.i18n.Messages;
|
||||
import org.talend.core.ui.utils.ContextTypeValidator;
|
||||
|
||||
public class EventDataValueValidator extends DataValidator {
|
||||
|
||||
private ColumnGroupModel columnGroupModel;
|
||||
private IDataProvider dataProvider;
|
||||
|
||||
private IContextManager manager;
|
||||
|
||||
EventDataValueValidator(IDataProvider bodyDataProvider, IContextManager manager, ColumnGroupModel columnGroupModel) {
|
||||
private IContextModelManager modelManager;
|
||||
|
||||
EventDataValueValidator(IDataProvider bodyDataProvider, IContextManager manager, IContextModelManager modelManager) {
|
||||
this.dataProvider = bodyDataProvider;
|
||||
this.manager = manager;
|
||||
this.columnGroupModel = columnGroupModel;
|
||||
this.modelManager = modelManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean validate(int columnIndex, int rowIndex, Object newValue) {
|
||||
boolean isValid = true;
|
||||
String currentColumnName = ContextRowDataListFixture.getPropertyNamesAsList(modelManager).get(columnIndex);
|
||||
ContextTreeNode rowNode = ((GlazedListsDataProvider<ContextTreeNode>) dataProvider).getList().get(rowIndex);
|
||||
if (columnGroupModel != null && columnGroupModel.isPartOfAGroup(columnIndex)) {
|
||||
String columnGroupName = columnGroupModel.getColumnGroupByIndex(columnIndex).getName();
|
||||
IContextParameter realPara = ContextNatTableUtils.getRealParameter(manager, columnGroupName, rowNode.getTreeData());
|
||||
if (realPara != null) {
|
||||
isValid = ContextTypeValidator.isMatchType(realPara.getType(), newValue);
|
||||
if (!isValid) {
|
||||
throw new ValidationFailedException(Messages.getString("ContextValidator.ParameterValueNotMatch")); //$NON-NLS-1$
|
||||
}
|
||||
IContextParameter realPara = ContextNatTableUtils.getRealParameter(manager, currentColumnName, rowNode.getTreeData());
|
||||
if (realPara != null) {
|
||||
isValid = ContextTypeValidator.isMatchType(realPara.getType(), newValue);
|
||||
if (!isValid) {
|
||||
throw new ValidationFailedException(Messages.getString("ContextValidator.ParameterValueNotMatch")); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
return isValid;
|
||||
|
||||
@@ -20,6 +20,7 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.eclipse.gef.commands.Command;
|
||||
@@ -146,6 +147,10 @@ public class ExtendedContextColumnPropertyAccessor<R> implements IColumnProperty
|
||||
}
|
||||
String contextParaName = ContextNatTableUtils.getCurrentContextModelName(element);
|
||||
String currentColumnName = getColumnProperty(columnIndex);
|
||||
if (currentColumnName.endsWith(ContextTableConstants.CONTEXT_DEFAULT)) {
|
||||
currentColumnName = currentColumnName.substring(0,
|
||||
currentColumnName.length() - ContextTableConstants.CONTEXT_DEFAULT.length());
|
||||
}
|
||||
if (currentColumnName.equals(ContextTableConstants.COLUMN_NAME_PROPERTY)) {
|
||||
if (element instanceof ContextTableTabParentModel) {
|
||||
String sourceId = ((ContextTableTabParentModel) element).getSourceId();
|
||||
@@ -177,35 +182,31 @@ public class ExtendedContextColumnPropertyAccessor<R> implements IColumnProperty
|
||||
} else {
|
||||
return contextParaType;
|
||||
}
|
||||
} else if (currentColumnName.equals(ContextTableConstants.COLUMN_CHECK_PROPERTY)) {
|
||||
if (manager != null && manager.getContextManager() != null) {
|
||||
List<IContext> contexts = manager.getContextManager().getListContext();
|
||||
return ContextUtils.isPromptNeeded(contexts, contextParaName);
|
||||
}
|
||||
return currentParam.isPromptNeeded();
|
||||
} else if (currentColumnName.equals(ContextTableConstants.COLUMN_COMMENT_PROPERTY)) {
|
||||
return currentParam.getComment();
|
||||
} else {
|
||||
if (this.groupModel.isPartOfAGroup(columnIndex)) {
|
||||
String columnGroupName = this.groupModel.getColumnGroupByIndex(columnIndex).getName();
|
||||
if (manager.getContextManager() != null) {
|
||||
List<IContext> contexts = manager.getContextManager().getListContext();
|
||||
IContextParameter currentPara = findContextPara(contexts, columnGroupName, contextParaName);
|
||||
if (currentPara == null) {
|
||||
return "";
|
||||
}
|
||||
if (currentColumnName.equals(ContextTableConstants.COLUMN_CHECK_PROPERTY)) {
|
||||
return currentPara.isPromptNeeded();
|
||||
} else if (currentColumnName.equals(ContextTableConstants.COLUMN_PROMPT_PROPERTY)) {
|
||||
return currentPara.getPrompt();
|
||||
} else if (currentColumnName.equals(ContextTableConstants.COLUMN_CONTEXT_VALUE)) {
|
||||
// because it's raw value, so need display * for password type.
|
||||
if (PasswordEncryptUtil.isPasswordType(currentPara.getType())) {
|
||||
return PasswordEncryptUtil.getPasswordDisplay(currentPara.getValue());
|
||||
}
|
||||
String displayValue = ContextNatTableUtils.getSpecialTypeDisplayValue(currentPara.getType(),
|
||||
currentPara.getValue());
|
||||
if (displayValue != null) {
|
||||
return displayValue;
|
||||
}
|
||||
return currentPara.getDisplayValue();
|
||||
|
||||
}
|
||||
if (manager.getContextManager() != null) {
|
||||
List<IContext> contexts = manager.getContextManager().getListContext();
|
||||
IContextParameter currentPara = findContextPara(contexts, currentColumnName, contextParaName);
|
||||
if (currentPara == null) {
|
||||
return "";
|
||||
}
|
||||
// because it's raw value, so need display * for password type.
|
||||
if (PasswordEncryptUtil.isPasswordType(currentPara.getType())) {
|
||||
return PasswordEncryptUtil.getPasswordDisplay(currentPara.getValue());
|
||||
}
|
||||
String displayValue = ContextNatTableUtils.getSpecialTypeDisplayValue(currentPara.getType(),
|
||||
currentPara.getValue());
|
||||
if (displayValue != null) {
|
||||
return displayValue;
|
||||
}
|
||||
return currentPara.getDisplayValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -233,57 +234,73 @@ public class ExtendedContextColumnPropertyAccessor<R> implements IColumnProperty
|
||||
private void setPropertyValue(IContextModelManager manager, Object dataElement, String contextParaName, int columnIndex,
|
||||
Object newValue) {
|
||||
String currentColumnName = getColumnProperty(columnIndex);
|
||||
if (this.groupModel.isPartOfAGroup(columnIndex)) {
|
||||
String columnGroupName = this.groupModel.getColumnGroupByIndex(columnIndex).getName();
|
||||
if (currentColumnName.endsWith(ContextTableConstants.CONTEXT_DEFAULT)) {
|
||||
currentColumnName = currentColumnName.substring(0,
|
||||
currentColumnName.length() - ContextTableConstants.CONTEXT_DEFAULT.length());
|
||||
}
|
||||
if (currentColumnName.equals(ContextTableConstants.COLUMN_TYPE_PROPERTY)) {
|
||||
ContextTableTabParentModel parent = (ContextTableTabParentModel) dataElement;
|
||||
IContextParameter contextPara = parent.getContextParameter();
|
||||
if (contextPara.getType() == ((String) newValue)) {
|
||||
return;
|
||||
}
|
||||
String newType = getRealType((String) newValue);
|
||||
|
||||
Command cmd = new SetContextTypeCommand(manager, contextPara, newType);
|
||||
runCommand(cmd, manager);
|
||||
} else if (currentColumnName.equals(ContextTableConstants.COLUMN_NAME_PROPERTY)) {
|
||||
ContextTableTabParentModel parent = (ContextTableTabParentModel) dataElement;
|
||||
IContextParameter contextPara = parent.getContextParameter();
|
||||
String sourceId = contextPara.getSource();
|
||||
String newParaName = (String) newValue;
|
||||
|
||||
if (manager.getContextManager() instanceof JobContextManager) {
|
||||
// in case joblet rename will propagate to the job,just record it
|
||||
JobContextManager contextManager = (JobContextManager) manager.getContextManager();
|
||||
contextManager.addNewName(newParaName, contextPara.getName());
|
||||
contextManager.setModified(true);
|
||||
}
|
||||
Command cmd = new SetContextNameCommand(manager, contextPara, newParaName, sourceId);
|
||||
runCommand(cmd, manager);
|
||||
} else if (currentColumnName.equals(ContextTableConstants.COLUMN_COMMENT_PROPERTY)) {
|
||||
ContextTableTabParentModel parent = (ContextTableTabParentModel) dataElement;
|
||||
IContextParameter contextPara = parent.getContextParameter();
|
||||
if (contextPara.getComment() == ((String) newValue)) {
|
||||
return;
|
||||
}
|
||||
Command cmd = new setContextCommentCommand(manager, contextPara, (String) newValue);
|
||||
runCommand(cmd, manager);
|
||||
} else if (currentColumnName.equals(ContextTableConstants.COLUMN_CHECK_PROPERTY)) {
|
||||
IContextParameter contextPara = null;
|
||||
if (dataElement instanceof ContextTableTabChildModel) {
|
||||
contextPara = ((ContextTableTabChildModel) dataElement).getContextParameter();
|
||||
} else if (dataElement instanceof ContextTableTabParentModel) {
|
||||
contextPara = ((ContextTableTabParentModel) dataElement).getContextParameter();
|
||||
}
|
||||
if (contextPara == null) {
|
||||
return;
|
||||
}
|
||||
boolean isPromptNeeded = contextPara.isPromptNeeded();
|
||||
if (manager != null && manager.getContextManager() != null) {
|
||||
List<IContext> contexts = manager.getContextManager().getListContext();
|
||||
isPromptNeeded = ContextUtils.isPromptNeeded(contexts, contextParaName);
|
||||
}
|
||||
if (isPromptNeeded == ((boolean) newValue)) {
|
||||
return;
|
||||
}
|
||||
Command cmd = new setContextEnablePromptCommand(manager, contextPara, ((boolean) newValue));
|
||||
runCommand(cmd, manager);
|
||||
} else {
|
||||
IContextManager contextManger = manager.getContextManager();
|
||||
if (contextManger != null) {
|
||||
// change the property of context such as prompt,promptyNeeded,value etc.
|
||||
// change the property of context value.
|
||||
List<Object> list = new ArrayList<Object>();
|
||||
list.add(dataElement);
|
||||
|
||||
IContextParameter para = null;
|
||||
para = getRealParameter(contextManger, columnGroupName, dataElement);
|
||||
if (para == null) {
|
||||
IContextParameter para = getRealParameter(contextManger, currentColumnName, dataElement);
|
||||
if (para == null || (StringUtils.isBlank(para.getValue()) && newValue == null)) {
|
||||
return;
|
||||
}
|
||||
Command cmd = new SetContextGroupParameterCommand(manager, para, currentColumnName, newValue);
|
||||
runCommand(cmd, manager);
|
||||
if (currentColumnName.equals(ContextTableConstants.COLUMN_CHECK_PROPERTY)) {
|
||||
manager.refresh();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (currentColumnName.equals(ContextTableConstants.COLUMN_TYPE_PROPERTY)) {
|
||||
ContextTableTabParentModel parent = (ContextTableTabParentModel) dataElement;
|
||||
IContextParameter contextPara = parent.getContextParameter();
|
||||
if (contextPara.getType() == ((String) newValue)) {
|
||||
return;
|
||||
}
|
||||
String newType = getRealType((String) newValue);
|
||||
|
||||
Command cmd = new SetContextTypeCommand(manager, contextPara, newType);
|
||||
runCommand(cmd, manager);
|
||||
} else if (currentColumnName.equals(ContextTableConstants.COLUMN_NAME_PROPERTY)) {
|
||||
ContextTableTabParentModel parent = (ContextTableTabParentModel) dataElement;
|
||||
IContextParameter contextPara = parent.getContextParameter();
|
||||
String sourceId = contextPara.getSource();
|
||||
String newParaName = (String) newValue;
|
||||
|
||||
if (manager.getContextManager() instanceof JobContextManager) {
|
||||
// in case joblet rename will propagate to the job,just record it
|
||||
JobContextManager contextManager = (JobContextManager) manager.getContextManager();
|
||||
contextManager.addNewName(newParaName, contextPara.getName());
|
||||
contextManager.setModified(true);
|
||||
}
|
||||
Command cmd = new SetContextNameCommand(manager, contextPara, newParaName, sourceId);
|
||||
runCommand(cmd, manager);
|
||||
} else if (currentColumnName.equals(ContextTableConstants.COLUMN_COMMENT_PROPERTY)) {
|
||||
ContextTableTabParentModel parent = (ContextTableTabParentModel) dataElement;
|
||||
IContextParameter contextPara = parent.getContextParameter();
|
||||
if (contextPara.getComment() == ((String) newValue)) {
|
||||
return;
|
||||
}
|
||||
Command cmd = new setContextCommentCommand(manager, contextPara, (String)newValue);
|
||||
Command cmd = new SetContextParameterValueCommand(manager, para, currentColumnName, newValue);
|
||||
runCommand(cmd, manager);
|
||||
}
|
||||
}
|
||||
@@ -334,7 +351,7 @@ public class ExtendedContextColumnPropertyAccessor<R> implements IColumnProperty
|
||||
return para;
|
||||
}
|
||||
|
||||
class SetContextGroupParameterCommand extends Command {
|
||||
class SetContextParameterValueCommand extends Command {
|
||||
|
||||
IContextParameter param;
|
||||
|
||||
@@ -344,7 +361,7 @@ public class ExtendedContextColumnPropertyAccessor<R> implements IColumnProperty
|
||||
|
||||
String property;
|
||||
|
||||
public SetContextGroupParameterCommand(IContextModelManager modelManager, IContextParameter param, String property,
|
||||
public SetContextParameterValueCommand(IContextModelManager modelManager, IContextParameter param, String property,
|
||||
Object newValue) {
|
||||
super();
|
||||
this.modelManager = modelManager;
|
||||
@@ -360,34 +377,12 @@ public class ExtendedContextColumnPropertyAccessor<R> implements IColumnProperty
|
||||
*/
|
||||
@Override
|
||||
public void execute() {
|
||||
boolean modified = false;
|
||||
if (property.equals(ContextTableConstants.COLUMN_CHECK_PROPERTY)) {
|
||||
if (param.isPromptNeeded() == (Boolean) newValue) {
|
||||
return;
|
||||
}
|
||||
oldValue = param.isPromptNeeded();
|
||||
param.setPromptNeeded((Boolean) newValue);
|
||||
modified = true;
|
||||
} else if (property.equals(ContextTableConstants.COLUMN_PROMPT_PROPERTY)) {
|
||||
if (param.getPrompt() != null && param.getPrompt().equals(newValue)) {
|
||||
return;
|
||||
}
|
||||
oldValue = param.getPrompt();
|
||||
param.setPrompt((String) newValue);
|
||||
modified = true;
|
||||
} else if (property.equals(ContextTableConstants.COLUMN_CONTEXT_VALUE)) {
|
||||
if (param.getValue() != null && param.getValue().equals(newValue)) {
|
||||
return;
|
||||
}
|
||||
oldValue = param.getValue();
|
||||
// if (newValue != null) {
|
||||
param.setValue(newValue == null ? "" : (String) newValue);
|
||||
modified = true;
|
||||
// }
|
||||
}
|
||||
if (modified) {
|
||||
updateRelation();
|
||||
if (param.getValue() != null && param.getValue().equals(newValue)) {
|
||||
return;
|
||||
}
|
||||
oldValue = param.getValue();
|
||||
param.setValue(newValue == null ? "" : (String) newValue);
|
||||
updateRelation();
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -397,22 +392,9 @@ public class ExtendedContextColumnPropertyAccessor<R> implements IColumnProperty
|
||||
*/
|
||||
@Override
|
||||
public void undo() {
|
||||
boolean modified = false;
|
||||
if (property.equals(ContextTableConstants.COLUMN_CHECK_PROPERTY)) {
|
||||
param.setPromptNeeded((Boolean) oldValue);
|
||||
modified = true;
|
||||
} else if (property.equals(ContextTableConstants.COLUMN_PROMPT_PROPERTY)) {
|
||||
param.setPrompt((String) oldValue);
|
||||
modified = true;
|
||||
} else if (property.equals(ContextTableConstants.COLUMN_CONTEXT_VALUE)) {
|
||||
param.setValue((String) oldValue);
|
||||
modified = true;
|
||||
}
|
||||
|
||||
if (modified) {
|
||||
updateRelation();
|
||||
modelManager.refresh();
|
||||
}
|
||||
param.setValue((String) oldValue);
|
||||
updateRelation();
|
||||
modelManager.refresh();
|
||||
}
|
||||
|
||||
private void updateRelation() {
|
||||
@@ -516,6 +498,83 @@ public class ExtendedContextColumnPropertyAccessor<R> implements IColumnProperty
|
||||
|
||||
}
|
||||
|
||||
class setContextEnablePromptCommand extends Command {
|
||||
|
||||
IContextParameter param;
|
||||
|
||||
IContextModelManager modelManager;
|
||||
|
||||
boolean newValue, oldValue;
|
||||
|
||||
public setContextEnablePromptCommand(IContextModelManager modelManager, IContextParameter param, boolean newValue) {
|
||||
super();
|
||||
this.modelManager = modelManager;
|
||||
this.param = param;
|
||||
this.newValue = newValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
boolean modified = false;
|
||||
if (modelManager.getContextManager() != null) {
|
||||
for (IContext context : modelManager.getContextManager().getListContext()) {
|
||||
for (IContextParameter contextParameter : context.getContextParameterList()) {
|
||||
if (param.getName().equals(contextParameter.getName())) {
|
||||
oldValue = param.isPromptNeeded();
|
||||
param.setPromptNeeded(newValue);
|
||||
contextParameter.setPromptNeeded(newValue);
|
||||
modified = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (modified) {
|
||||
updateRelation();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.gef.commands.Command#undo()
|
||||
*/
|
||||
@Override
|
||||
public void undo() {
|
||||
boolean modified = false;
|
||||
if (modelManager.getContextManager() != null) {
|
||||
for (IContext context : modelManager.getContextManager().getListContext()) {
|
||||
for (IContextParameter contextParameter : context.getContextParameterList()) {
|
||||
if (param.getName().equals(contextParameter.getName())) {
|
||||
param.setPromptNeeded(oldValue);
|
||||
contextParameter.setPromptNeeded(oldValue);
|
||||
modified = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (modified) {
|
||||
updateRelation();
|
||||
modelManager.refresh();
|
||||
}
|
||||
}
|
||||
|
||||
private void updateRelation() {
|
||||
// set updated flag.
|
||||
if (param != null) {
|
||||
IContextManager manager = modelManager.getContextManager();
|
||||
if (manager != null && manager instanceof JobContextManager) {
|
||||
JobContextManager jobContextManager = (JobContextManager) manager;
|
||||
// not added new
|
||||
if (!modelManager.isRepositoryContext()
|
||||
|| modelManager.isRepositoryContext() && jobContextManager.isOriginalParameter(param.getName())) {
|
||||
jobContextManager.setModified(true);
|
||||
manager.fireContextsChangedEvent();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class setContextCommentCommand extends Command {
|
||||
|
||||
|
||||
|
||||
@@ -22,13 +22,13 @@ import org.eclipse.nebula.widgets.nattable.edit.editor.AbstractCellEditor;
|
||||
import org.eclipse.nebula.widgets.nattable.edit.editor.ComboBoxCellEditor;
|
||||
import org.eclipse.nebula.widgets.nattable.edit.editor.ICellEditor;
|
||||
import org.eclipse.nebula.widgets.nattable.extension.glazedlists.GlazedListsDataProvider;
|
||||
import org.eclipse.nebula.widgets.nattable.group.ColumnGroupModel;
|
||||
import org.eclipse.nebula.widgets.nattable.selection.SelectionLayer.MoveDirectionEnum;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Control;
|
||||
import org.talend.core.model.process.IContextManager;
|
||||
import org.talend.core.model.process.IContextParameter;
|
||||
import org.talend.core.ui.context.ContextTreeTable.ContextTreeNode;
|
||||
import org.talend.core.ui.context.IContextModelManager;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -40,22 +40,15 @@ public class ProxyDynamicCellEditor extends AbstractCellEditor {
|
||||
|
||||
private IDataProvider dataProvider;
|
||||
|
||||
private ColumnGroupModel columnGroupModel;
|
||||
|
||||
private IContextManager manager;
|
||||
|
||||
/**
|
||||
* DOC ldong ProxyDynamicCellEditor constructor comment.
|
||||
*
|
||||
* @param dataProvider
|
||||
* @param columnGroupModel
|
||||
* @param manager
|
||||
*/
|
||||
public ProxyDynamicCellEditor(IDataProvider dataProvider, ColumnGroupModel columnGroupModel, IContextManager manager) {
|
||||
private IContextModelManager modelManager;
|
||||
|
||||
public ProxyDynamicCellEditor(IDataProvider dataProvider, IContextManager manager, IContextModelManager modelManager) {
|
||||
super();
|
||||
this.dataProvider = dataProvider;
|
||||
this.columnGroupModel = columnGroupModel;
|
||||
this.manager = manager;
|
||||
this.modelManager = modelManager;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -117,32 +110,25 @@ public class ProxyDynamicCellEditor extends AbstractCellEditor {
|
||||
this.layerCell.getRowPosition());
|
||||
int cellColumnIndex = this.layerCell.getColumnIndex();
|
||||
int cellRowIndex = this.layerCell.getRowIndex();
|
||||
if (columnGroupModel != null && columnGroupModel.isPartOfAGroup(cellColumnIndex)) {
|
||||
String columnGroupName = columnGroupModel.getColumnGroupByIndex(cellColumnIndex).getName();
|
||||
|
||||
ContextTreeNode rowNode = ((GlazedListsDataProvider<ContextTreeNode>) dataProvider).getRowObject(cellRowIndex);
|
||||
|
||||
IContextParameter realPara = ContextNatTableUtils.getRealParameter(manager, columnGroupName, rowNode.getTreeData());
|
||||
|
||||
if (NatTableCellEditorFactory.isBoolean(realPara.getType())) {
|
||||
final List<String> list = Arrays.asList(NatTableCellEditorFactory.BOOLEANS);
|
||||
ComboBoxCellEditor comboBoxCellEditor = new ComboBoxCellEditor(list);
|
||||
comboBoxCellEditor.setFreeEdit(false);
|
||||
dynamicEditor = comboBoxCellEditor;
|
||||
Object displayDefaultValue = false;
|
||||
// the combox need a default value at least
|
||||
if (!originalCanonicalValue.equals("")) {
|
||||
displayDefaultValue = originalCanonicalValue;
|
||||
}
|
||||
return dynamicEditor.activateCell(parent, displayDefaultValue, editMode, editHandler, layerCell, configRegistry);
|
||||
} else {
|
||||
dynamicEditor = new CustomTextCellEditor(realPara, this.cellStyle, true, true);
|
||||
((CustomTextCellEditor) dynamicEditor).setFreeEdit(true);
|
||||
return dynamicEditor.activateCell(parent, originalCanonicalValue, editMode, editHandler, layerCell,
|
||||
configRegistry);
|
||||
String currentColumnName = ContextRowDataListFixture.getPropertyNamesAsList(modelManager).get(cellColumnIndex);
|
||||
ContextTreeNode rowNode = ((GlazedListsDataProvider<ContextTreeNode>) dataProvider).getRowObject(cellRowIndex);
|
||||
IContextParameter realPara = ContextNatTableUtils.getRealParameter(manager, currentColumnName, rowNode.getTreeData());
|
||||
if (NatTableCellEditorFactory.isBoolean(realPara.getType())) {
|
||||
final List<String> list = Arrays.asList(NatTableCellEditorFactory.BOOLEANS);
|
||||
ComboBoxCellEditor comboBoxCellEditor = new ComboBoxCellEditor(list);
|
||||
comboBoxCellEditor.setFreeEdit(false);
|
||||
dynamicEditor = comboBoxCellEditor;
|
||||
Object displayDefaultValue = false;
|
||||
// the combox need a default value at least
|
||||
if (!originalCanonicalValue.equals("")) {
|
||||
displayDefaultValue = originalCanonicalValue;
|
||||
}
|
||||
return dynamicEditor.activateCell(parent, displayDefaultValue, editMode, editHandler, layerCell, configRegistry);
|
||||
} else {
|
||||
dynamicEditor = new CustomTextCellEditor(realPara, this.cellStyle, true, true);
|
||||
((CustomTextCellEditor) dynamicEditor).setFreeEdit(true);
|
||||
return dynamicEditor.activateCell(parent, originalCanonicalValue, editMode, editHandler, layerCell, configRegistry);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -319,10 +319,10 @@ public abstract class AbstractContextView extends ViewPart {
|
||||
|
||||
@Override
|
||||
public void setPartName(String title) {
|
||||
String viewName = "Contexts"; //$NON-NLS-1$
|
||||
String viewName = "Context"; //$NON-NLS-1$
|
||||
|
||||
if (!title.equals("")) { //$NON-NLS-1$
|
||||
viewName = viewName + "(" + title + ")"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
viewName = viewName + " (" + title + ")"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
super.setTitleToolTip(title);
|
||||
}
|
||||
super.setPartName(viewName);
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2023 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.core.ui.dialog;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
|
||||
import org.eclipse.jface.dialogs.MessageDialogWithToggle;
|
||||
import org.eclipse.jface.window.Window;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.SelectionListener;
|
||||
import org.eclipse.swt.program.Program;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Control;
|
||||
import org.eclipse.swt.widgets.Link;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.talend.commons.exception.LoginException;
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.core.repository.model.ProxyRepositoryFactory;
|
||||
import org.talend.core.runtime.projectsetting.ProjectPreferenceManager;
|
||||
import org.talend.core.runtime.util.ModuleAccessHelper;
|
||||
import org.talend.core.ui.CoreUIPlugin;
|
||||
import org.talend.core.ui.i18n.Messages;
|
||||
import org.talend.repository.RepositoryWorkUnit;
|
||||
|
||||
public class CapabilityCheckDialog {
|
||||
|
||||
private static final String KEY_NEVER_SHOW = "runtime.capability.check";
|
||||
|
||||
private static final String LINK_FIX = "https://document-link.us.cloud.talend.com/ig_compatible_java_environments?version=80&lang=en&env=prd";
|
||||
|
||||
private static ProjectPreferenceManager prefManager = new ProjectPreferenceManager(CoreUIPlugin.PLUGIN_ID, false);
|
||||
|
||||
public static boolean open(Shell shell) {
|
||||
if (ModuleAccessHelper.allowJavaInternalAcess(null) && !prefManager.getBoolean(KEY_NEVER_SHOW)) {
|
||||
String title = Messages.getString("CapabilityCheckDialog.title");
|
||||
String message = Messages.getString("CapabilityCheckDialog.message");
|
||||
String toggle = Messages.getString("CapabilityCheckDialog.toggle");
|
||||
LinkedHashMap<String, Integer> buttonLabelToIdMap = new LinkedHashMap<>();
|
||||
buttonLabelToIdMap.put(Messages.getString("CapabilityCheckDialog.cancel"), Window.CANCEL);
|
||||
buttonLabelToIdMap.put(Messages.getString("CapabilityCheckDialog.publish"), Window.OK);
|
||||
MessageDialogWithToggle dialog = new MessageDialogWithToggle(shell, title, null, message, 0, buttonLabelToIdMap, 1,
|
||||
toggle, false) {
|
||||
|
||||
@Override
|
||||
protected Control createCustomArea(Composite parent) {
|
||||
Link link = new Link(parent, SWT.NONE);
|
||||
link.setText(Messages.getString("CapabilityCheckDialog.link"));
|
||||
link.addSelectionListener(SelectionListener.widgetSelectedAdapter((e) -> Program.launch(LINK_FIX)));
|
||||
return link;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void buttonPressed(int buttonId) {
|
||||
if (getToggleState()) {
|
||||
RepositoryWorkUnit<Object> workUnit = new RepositoryWorkUnit<Object>(
|
||||
"Store runtime capability check setup") {
|
||||
|
||||
@Override
|
||||
protected void run() throws LoginException, PersistenceException {
|
||||
prefManager.setValue(KEY_NEVER_SHOW, true);
|
||||
prefManager.save();
|
||||
}
|
||||
|
||||
};
|
||||
workUnit.setAvoidUnloadResources(true);
|
||||
ProxyRepositoryFactory.getInstance().executeRepositoryWorkUnit(workUnit);
|
||||
|
||||
}
|
||||
super.buttonPressed(buttonId);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean customShouldTakeFocus() {
|
||||
return false;
|
||||
}
|
||||
|
||||
};
|
||||
return dialog.open() == Window.OK ? true : false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -124,7 +124,10 @@ public class RepositoryChangeMetadataForSAPBapi extends Command {
|
||||
if (properties != null) {
|
||||
properties.put(ISINPUT, TRUE);
|
||||
}
|
||||
createNewSchema(paramValues, ConvertionHelper.convert(table), MetadataSchemaType.INPUT.name());
|
||||
IMetadataTable convertTable = ConvertionHelper.convert(table);
|
||||
// escape "-"
|
||||
convertTable.setLabel(MetadataToolHelper.validateValue(convertTable.getLabel()));
|
||||
createNewSchema(paramValues, convertTable, MetadataSchemaType.INPUT.name());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,148 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.core.ui.notification;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.SelectionListener;
|
||||
import org.eclipse.swt.layout.GridData;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Link;
|
||||
import org.eclipse.ui.PlatformUI;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.exception.LoginException;
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.commons.ui.nofitication.ArrangedNotificationPopup;
|
||||
import org.talend.core.CorePlugin;
|
||||
import org.talend.core.prefs.ITalendCorePrefConstants;
|
||||
import org.talend.core.repository.model.ProxyRepositoryFactory;
|
||||
import org.talend.core.runtime.projectsetting.ProjectPreferenceManager;
|
||||
import org.talend.core.runtime.util.ModuleAccessHelper;
|
||||
import org.talend.core.ui.CoreUIPlugin;
|
||||
import org.talend.core.ui.i18n.Messages;
|
||||
import org.talend.core.utils.TalendQuoteUtils;
|
||||
import org.talend.repository.RepositoryWorkUnit;
|
||||
import org.talend.repository.model.IRepositoryService;
|
||||
|
||||
public class Java17NotificationPopup extends ArrangedNotificationPopup {
|
||||
|
||||
private static final long DELAY_CLOSE_DURATION = 60 * 60 * 1000;
|
||||
|
||||
private static final String PREF_SHOW_ONCE = "java17.compatibility.check";
|
||||
|
||||
private static ProjectPreferenceManager prefManager = new ProjectPreferenceManager(CoreUIPlugin.PLUGIN_ID, false);
|
||||
|
||||
public Java17NotificationPopup() {
|
||||
super(PlatformUI.getWorkbench().getDisplay(), SWT.NO_TRIM | SWT.NO_FOCUS | SWT.TOOL);
|
||||
super.setDelayClose(DELAY_CLOSE_DURATION);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getPopupShellTitle() {
|
||||
return Messages.getString("Java17NotificationPopup.title");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void createControl(Composite parent) {
|
||||
Link link = new Link(parent, SWT.WRAP);
|
||||
link.setBackground(parent.getBackground());
|
||||
link.setText(getNotificationText());
|
||||
GridData gridData = new GridData(SWT.FILL, SWT.BEGINNING, true, false);
|
||||
gridData.widthHint = 380; // only expand further if anyone else requires it
|
||||
link.setLayoutData(gridData);
|
||||
link.addSelectionListener(SelectionListener.widgetSelectedAdapter((e) -> {
|
||||
close();
|
||||
IRepositoryService.get().openProjectSettingsDialog("projectsetting.JavaVersion");
|
||||
setShowOnce();
|
||||
}));
|
||||
}
|
||||
|
||||
private String getNotificationText() {
|
||||
return Messages.getString("Java17NotificationPopup.info");
|
||||
}
|
||||
|
||||
public static boolean show() {
|
||||
return !showOnce() && isJava17() && (!ModuleAccessHelper.allowJavaInternalAcess(null) || !checkInterpreter());
|
||||
}
|
||||
|
||||
private static boolean showOnce() {
|
||||
return prefManager.getBoolean(PREF_SHOW_ONCE);
|
||||
}
|
||||
|
||||
private void setShowOnce() {
|
||||
RepositoryWorkUnit<Object> workUnit = new RepositoryWorkUnit<Object>(
|
||||
"Store Java 17 compatibility check notification setup") {
|
||||
|
||||
@Override
|
||||
protected void run() throws LoginException, PersistenceException {
|
||||
prefManager.setValue(PREF_SHOW_ONCE, true);
|
||||
prefManager.save();
|
||||
}
|
||||
|
||||
};
|
||||
workUnit.setAvoidUnloadResources(true);
|
||||
ProxyRepositoryFactory.getInstance().executeRepositoryWorkUnit(workUnit);
|
||||
}
|
||||
|
||||
private static boolean checkInterpreter() {
|
||||
IPreferenceStore prefStore = CorePlugin.getDefault().getPreferenceStore();
|
||||
String javaInterpreter = prefStore.getString(ITalendCorePrefConstants.JAVA_INTERPRETER);
|
||||
if (javaInterpreter == null || javaInterpreter.length() == 0) {
|
||||
return false;
|
||||
}
|
||||
File releaseFile = new File(new File(javaInterpreter).getParentFile().getParentFile(), "release");
|
||||
if (!releaseFile.exists()) {
|
||||
return false;
|
||||
}
|
||||
Properties props = new Properties();
|
||||
try (InputStream in = new FileInputStream(releaseFile)) {
|
||||
props.load(in);
|
||||
String version = props.getProperty("JAVA_VERSION");
|
||||
if (StringUtils.isBlank(version)) {
|
||||
version = props.getProperty("OPENJDK_VERSION");
|
||||
}
|
||||
if (StringUtils.isBlank(version)) {
|
||||
return false;
|
||||
}
|
||||
version = TalendQuoteUtils.removeQuotesIfExist(version);
|
||||
if (Integer.parseInt(version.split("[^\\d]+")[0]) > 8) {
|
||||
// since Java 9
|
||||
return true;
|
||||
}
|
||||
} catch (IOException | NumberFormatException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private static boolean isJava17() {
|
||||
boolean isJava17 = false;
|
||||
String javaVersion = System.getProperty("java.version");
|
||||
String[] arr = javaVersion.split("[^\\d]+");
|
||||
try {
|
||||
isJava17 = Integer.parseInt(arr[0]) >= 17;
|
||||
} catch (NumberFormatException e) {
|
||||
ExceptionHandler.process(e);
|
||||
isJava17 = false;
|
||||
}
|
||||
return isJava17;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.core.ui.notification;
|
||||
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.Status;
|
||||
import org.eclipse.core.runtime.jobs.Job;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.eclipse.ui.IStartup;
|
||||
import org.talend.commons.CommonsPlugin;
|
||||
import org.talend.commons.ui.runtime.CommonUIPlugin;
|
||||
|
||||
public class Java17NotificationStartupTask implements IStartup {
|
||||
|
||||
@Override
|
||||
public void earlyStartup() {
|
||||
if (CommonUIPlugin.isFullyHeadless() || CommonsPlugin.isTUJTest() || CommonsPlugin.isJUnitTest()
|
||||
|| CommonsPlugin.isJunitWorking()) {
|
||||
return;
|
||||
}
|
||||
new Job("Java 17 compatibility Notification") {
|
||||
|
||||
@Override
|
||||
protected IStatus run(IProgressMonitor monitor) {
|
||||
if (Java17NotificationPopup.show()) {
|
||||
Display.getDefault().asyncExec(() -> new Java17NotificationPopup().open());
|
||||
}
|
||||
return Status.OK_STATUS;
|
||||
}
|
||||
|
||||
}.schedule(8000);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
Manifest-Version: 1.0
|
||||
Manifest-Version: 1.0
|
||||
Automatic-Module-Name: org.talend.core
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Core Plug-in
|
||||
|
||||
@@ -78,12 +78,5 @@
|
||||
serviceId="ICoreService">
|
||||
</Service>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.talend.core.runtime.service">
|
||||
<Service
|
||||
class="org.talend.core.services.NotificationService"
|
||||
serviceId="INotificationService">
|
||||
</Service>
|
||||
</extension>
|
||||
|
||||
</plugin>
|
||||
|
||||
@@ -1065,4 +1065,16 @@ public class ObjectElementParameter implements IElementParameter {
|
||||
this.originEncryptedValue = value;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDescription(String description) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.core.services;
|
||||
|
||||
import org.eclipse.jface.window.WindowManager;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.IService;
|
||||
|
||||
/**
|
||||
* @author bhe created on Oct 27, 2022
|
||||
*
|
||||
*/
|
||||
public interface INotificationService extends IService {
|
||||
|
||||
WindowManager getNotificationWindowManager();
|
||||
|
||||
public static INotificationService get() {
|
||||
GlobalServiceRegister register = GlobalServiceRegister.getDefault();
|
||||
if (!register.isServiceRegistered(INotificationService.class)) {
|
||||
return null;
|
||||
}
|
||||
return register.getService(INotificationService.class);
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.core.services;
|
||||
|
||||
import org.eclipse.jface.window.WindowManager;
|
||||
|
||||
/**
|
||||
* @author bhe created on Oct 28, 2022
|
||||
*
|
||||
*/
|
||||
public class NotificationService implements INotificationService {
|
||||
|
||||
private WindowManager manager = new WindowManager();
|
||||
|
||||
@Override
|
||||
public WindowManager getNotificationWindowManager() {
|
||||
return manager;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1632,6 +1632,10 @@ public class ProcessorUtilities {
|
||||
subJobInfo.setContextName(defaultContext);
|
||||
}
|
||||
}
|
||||
|
||||
if (CommonsPlugin.isHeadless() && ("cTalendJob".equals(componentName) || "Routelets".equals(node.getComponent().getOriginalFamilyName())) && interpreter != null) {
|
||||
processItem.getProperty().setParentItem(ItemCacheManager.getProcessItem(currentProcess.getId(), currentProcess.getVersion()));
|
||||
}
|
||||
|
||||
int subJobOption = GENERATE_ALL_CHILDS;
|
||||
if (BitwiseOptionUtils.containOption(option, GENERATE_WITH_FIRST_CHILD)) {
|
||||
@@ -2553,7 +2557,7 @@ public class ProcessorUtilities {
|
||||
return jobInfos;
|
||||
}
|
||||
|
||||
private static boolean isRouteletNode(NodeType node) {
|
||||
public static boolean isRouteletNode(NodeType node) {
|
||||
String jobIds = getParameterValue(node.getElementParameter(), "PROCESS_TYPE:PROCESS_TYPE_PROCESS");
|
||||
String jobVersion = getParameterValue(node.getElementParameter(), "PROCESS_TYPE:PROCESS_TYPE_VERSION"); //$NON-NLS-1$
|
||||
ProcessItem processItem = ItemCacheManager.getProcessItem(jobIds, jobVersion);
|
||||
|
||||
@@ -25,7 +25,7 @@ _UI_ProcedureExpression_type=\u30D7\u30ED\u30B7\u30FC\u30B8\u30E3\u30FC\u30A8\u3
|
||||
_UI_Multiplicity_type=\u591A\u91CD\u5EA6
|
||||
_UI_MultiplicityRange_type=\u591A\u69D8\u6027\u30EC\u30F3\u30B8
|
||||
_UI_Stereotype_type=\u30B9\u30C6\u30EC\u30AA\u30BF\u30A4\u30D7
|
||||
_UI_TaggedValue_type=\u30BF\u30B0\u4ED8\u3051\u3055\u308C\u305F\u5024
|
||||
_UI_TaggedValue_type=\u30BF\u30B0\u5024
|
||||
_UI_Argument_type=\u5F15\u6570
|
||||
_UI_BehavioralFeature_type=\u6A5F\u80FD
|
||||
_UI_CallAction_type=\u547C\u3073\u51FA\u3057\u30A2\u30AF\u30B7\u30E7\u30F3
|
||||
@@ -207,7 +207,7 @@ _UI_ForeignKey_type=\u5916\u90E8\u30AD\u30FC
|
||||
_UI_Domain_type=\u30C9\u30E1\u30A4\u30F3
|
||||
_UI_Attribute_type=\u5C5E\u6027
|
||||
_UI_Relationship_type=\u95A2\u4FC2
|
||||
_UI_RelationshipEnd_type=\u95A2\u4FC2\u7D42\u4E86
|
||||
_UI_RelationshipEnd_type=\u30EA\u30EC\u30FC\u30B7\u30E7\u30F3\u30B7\u30C3\u30D7\u30A8\u30F3\u30C9
|
||||
_UI_ModelLibrary_type=\u30E2\u30C7\u30EB\u30E9\u30A4\u30D6\u30E9\u30EA\u30FC
|
||||
_UI_SubjectArea_type=\u30B5\u30D6\u30B8\u30A7\u30AF\u30C8\u30A8\u30EA\u30A2
|
||||
_UI_COBOLFD_type=COBOLFD
|
||||
@@ -331,7 +331,7 @@ _UI_ModelElement_constraint_feature=\u5236\u7D04
|
||||
_UI_ModelElement_namespace_feature=\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9
|
||||
_UI_ModelElement_importer_feature=\u30A4\u30F3\u30DD\u30FC\u30BF\u30FC
|
||||
_UI_ModelElement_stereotype_feature=\u30B9\u30C6\u30EC\u30AA\u30BF\u30A4\u30D7
|
||||
_UI_ModelElement_taggedValue_feature=\u30BF\u30B0\u4ED8\u3051\u3055\u308C\u305F\u5024
|
||||
_UI_ModelElement_taggedValue_feature=\u30BF\u30B0\u5024
|
||||
_UI_ModelElement_document_feature=\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8
|
||||
_UI_ModelElement_description_feature=\u8AAC\u660E
|
||||
_UI_ModelElement_responsibleParty_feature=\u8CAC\u4EFB\u8005
|
||||
@@ -840,7 +840,7 @@ _UI_ActivityExecution_stepExecution_feature=\u30B9\u30C6\u30C3\u30D7\u5B9F\u884C
|
||||
_UI_StepExecution_transformationStep_feature=\u5909\u63DB\u30B9\u30C6\u30C3\u30D7
|
||||
_UI_StepExecution_activityExecution_feature=\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u5B9F\u884C
|
||||
_UI_StepExecution_callAction_feature=\u547C\u3073\u51FA\u3057\u30A2\u30AF\u30B7\u30E7\u30F3
|
||||
_UI_ForeignKey_relationshipEnd_feature=\u95A2\u4FC2\u7D42\u4E86
|
||||
_UI_ForeignKey_relationshipEnd_feature=\u30EA\u30EC\u30FC\u30B7\u30E7\u30F3\u30B7\u30C3\u30D7\u30A8\u30F3\u30C9
|
||||
_UI_Domain_default_feature=\u30C7\u30D5\u30A9\u30EB\u30C8
|
||||
_UI_Domain_validationRule_feature=\u691C\u8A3C\u30EB\u30FC\u30EB
|
||||
_UI_Domain_baseType_feature=\u30D9\u30FC\u30B9\u30BF\u30A4\u30D7
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.avro</groupId>
|
||||
<artifactId>avro</artifactId>
|
||||
<version>1.8.2</version>
|
||||
<version>1.11.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
<properties>
|
||||
<tcomp.version>${component-runtime.version}</tcomp.version>
|
||||
<cxf.version>3.5.5</cxf.version>
|
||||
<cxf.version>3.5.6</cxf.version>
|
||||
<geronimo.version>1.0.2</geronimo.version>
|
||||
<jcache.version>1.0.5</jcache.version>
|
||||
<jcache_spec.version>1.0-alpha-1</jcache_spec.version>
|
||||
@@ -20,7 +20,7 @@
|
||||
<microprofile.version>1.2.1</microprofile.version>
|
||||
<owb.version>2.0.27</owb.version>
|
||||
<slf4j.version>1.7.34</slf4j.version>
|
||||
<tomcat.version>9.0.75</tomcat.version>
|
||||
<tomcat.version>9.0.80</tomcat.version>
|
||||
<xbean.version>4.20</xbean.version>
|
||||
<reload4j.version>1.2.22</reload4j.version>
|
||||
<log4j2.version>2.20.0</log4j2.version>
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<version>2.13.4.2</version>
|
||||
<version>2.14.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<version>2.13.4.2</version>
|
||||
<version>2.14.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.thoughtworks.xstream</groupId>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<properties>
|
||||
<tcomp.version>1.59.0</tcomp.version>
|
||||
<tcomp.version>1.61.2</tcomp.version>
|
||||
<slf4j.version>1.7.34</slf4j.version>
|
||||
<reload4j.version>1.2.22</reload4j.version>
|
||||
</properties>
|
||||
|
||||
@@ -34,12 +34,12 @@
|
||||
<artifactId>commons-configuration2</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<!--crypto-utils 7.0.5 dependencies begin -->
|
||||
</dependency>
|
||||
<!--crypto-utils 7.1.16 dependencies begin -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-dependencies</artifactId>
|
||||
<version>2.7.3</version>
|
||||
<version>2.7.7</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@@ -51,13 +51,13 @@
|
||||
<dependency>
|
||||
<groupId>org.codehaus.groovy</groupId>
|
||||
<artifactId>groovy-bom</artifactId>
|
||||
<version>3.0.12</version>
|
||||
<version>3.0.13</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson</groupId>
|
||||
<artifactId>jackson-bom</artifactId>
|
||||
<version>2.13.3</version>
|
||||
<version>2.14.3</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@@ -69,7 +69,7 @@
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-bom</artifactId>
|
||||
<version>9.4.48.v20220622</version>
|
||||
<version>9.4.50.v20221201</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@@ -93,13 +93,13 @@
|
||||
<dependency>
|
||||
<groupId>io.micrometer</groupId>
|
||||
<artifactId>micrometer-bom</artifactId>
|
||||
<version>1.9.3</version>
|
||||
<version>1.9.6</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-bom</artifactId>
|
||||
<version>4.1.79.Final</version>
|
||||
<version>4.1.86.Final</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@@ -123,43 +123,43 @@
|
||||
<dependency>
|
||||
<groupId>io.r2dbc</groupId>
|
||||
<artifactId>r2dbc-bom</artifactId>
|
||||
<version>Borca-SR1</version>
|
||||
<version>Borca-SR2</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.projectreactor</groupId>
|
||||
<artifactId>reactor-bom</artifactId>
|
||||
<version>2020.0.22</version>
|
||||
<version>2020.0.26</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.rsocket</groupId>
|
||||
<artifactId>rsocket-bom</artifactId>
|
||||
<version>1.1.2</version>
|
||||
<version>1.1.3</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.data</groupId>
|
||||
<artifactId>spring-data-bom</artifactId>
|
||||
<version>2021.2.2</version>
|
||||
<version>2021.2.6</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-framework-bom</artifactId>
|
||||
<version>5.3.22</version>
|
||||
<version>5.3.24</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-bom</artifactId>
|
||||
<version>5.5.14</version>
|
||||
<version>5.5.16</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.security</groupId>
|
||||
<artifactId>spring-security-bom</artifactId>
|
||||
<version>5.7.3</version>
|
||||
<version>5.7.6</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@@ -171,25 +171,25 @@
|
||||
<dependency>
|
||||
<groupId>io.dropwizard.metrics</groupId>
|
||||
<artifactId>metrics-bom</artifactId>
|
||||
<version>4.2.11</version>
|
||||
<version>4.2.14</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dropwizard.metrics</groupId>
|
||||
<artifactId>metrics-parent</artifactId>
|
||||
<version>4.2.11</version>
|
||||
<version>4.2.14</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.infinispan</groupId>
|
||||
<artifactId>infinispan-bom</artifactId>
|
||||
<version>13.0.10.Final</version>
|
||||
<version>13.0.14.Final</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.infinispan</groupId>
|
||||
<artifactId>infinispan-build-configuration-parent</artifactId>
|
||||
<version>13.0.10.Final</version>
|
||||
<version>13.0.14.Final</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@@ -216,11 +216,11 @@
|
||||
<version>4.5.1</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<!--crypto-utils 7.0.5 dependencies end -->
|
||||
<!--crypto-utils 7.1.16 dependencies end -->
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-configuration2</artifactId>
|
||||
<version>2.8.0</version>
|
||||
<version>2.9.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
@@ -323,7 +323,7 @@
|
||||
<extraArtifact>org.junit:junit-bom:5.7.1:pom</extraArtifact>
|
||||
<extraArtifact>org.junit:junit-bom:5.8.2:pom</extraArtifact>
|
||||
<extraArtifact>org.junit:junit-bom:5.9.1:pom</extraArtifact>
|
||||
<extraArtifact>com.fasterxml.jackson:jackson-bom:2.13.3:pom</extraArtifact>
|
||||
<extraArtifact>com.fasterxml.jackson:jackson-bom:2.14.3:pom</extraArtifact>
|
||||
</extraArtifacts>
|
||||
<pomIncludes>
|
||||
<pomInclude>*/*.pom</pomInclude>
|
||||
|
||||
@@ -16,7 +16,7 @@ ProjectPomProjectSettingPage.warningTip=\u9ED8\u8BA4\u8BBE\u7F6E\u5C06\u88AB\u89
|
||||
ProjectPomProjectSettingPage.errorTip=\u65E0\u6CD5\u8986\u76D6\u9ED8\u8BA4\u8BBE\u7F6E\u3002\n
|
||||
ProjectPomProjectSettingPage.preview=\u9884\u89C8
|
||||
AbstractPersistentProjectSettingPage.syncAllPoms=\u662F\u5426\u66F4\u65B0\u6240\u6709 POM \u6587\u4EF6? \n \u6B64\u64CD\u4F5C\u53EF\u80FD\u9700\u8981\u5F88\u957F\u65F6\u95F4\uFF0C\u5177\u4F53\u53D6\u51B3\u4E8E\u60A8\u7684\u5DE5\u7A0B\u5927\u5C0F\u3002
|
||||
MavenProjectSettingPage.filterExampleMessage=\u7B5B\u9009\u5668\u793A\u4F8B\uFF1A\nlabel=myJob \t\t\t\t=> \u4EC5\u751F\u6210\u540D\u4E3A "myJob" \u7684\u4F5C\u4E1A\n!(label=myJob) \t\t\t\t=> \u751F\u6210\u540D\u4E3A "myJob" \u9664\u5916\u7684\u4EFB\u610F\u4F5C\u4E1A\n(path=folder1/folder2) \t\t\t=> \u751F\u6210\u6587\u4EF6\u5939 "folder1/folder2" \u4E2D\u4EFB\u610F\u4F5C\u4E1A\n(path=folder1/folder2)or(label=myJob)\t=> \u751F\u6210\u6587\u4EF6\u5939 "folder1/folder2" \u4E2D\u7684\u4EFB\u610F\u4F5C\u4E1A\u6216\u4EFB\u610F\u540D\u4E3A "myJob" \u7684\u4F5C\u4E1A\n(label=myJob)and(version=0.2)\t\t=> \u4EC5\u751F\u6210\u7248\u672C 0.2 \u4E14\u540D\u4E3A "myJob" \u7684\u4F5C\u4E1A\n!((label=myJob)and(version=0.1))\t\t=> \u751F\u6210\u4EFB\u610F\u540D\u79F0\u4E0D\u4E3A "myJob" \u4E14\u7248\u672C\u4E0D\u4E3A 0.1 \u7684\u4F5C\u4E1A
|
||||
MavenProjectSettingPage.filterExampleMessage=\u7B5B\u9009\u5668\u793A\u4F8B\uFF1A\nlabel=myJob \t\t\t\t=> \u4EC5\u751F\u6210\u540D\u4E3A "myJob" \u7684\u4F5C\u4E1A\n!(label=myJob) \t\t\t\t=> \u751F\u6210\u540D\u4E3A "myJob" \u9664\u5916\u7684\u4EFB\u610F\u4F5C\u4E1A\n\uFF08\u8DEF\u5F84=\u6587\u4EF6\u5939 1/\u6587\u4EF6\u5939 2\uFF09 \t\t\t=> \u751F\u6210\u6587\u4EF6\u5939 "folder1/folder2" \u4E2D\u4EFB\u610F\u4F5C\u4E1A\n(path=folder1/folder2)or(label=myJob)\t=> \u751F\u6210\u6587\u4EF6\u5939 "folder1/folder2" \u4E2D\u7684\u4EFB\u610F\u4F5C\u4E1A\u6216\u4EFB\u610F\u540D\u4E3A "myJob" \u7684\u4F5C\u4E1A\n(label=myJob)and(version=0.2)\t\t=> \u4EC5\u751F\u6210\u7248\u672C 0.2 \u4E14\u540D\u4E3A "myJob" \u7684\u4F5C\u4E1A\n!((label=myJob)and(version=0.1))\t\t=> \u751F\u6210\u4EFB\u610F\u540D\u79F0\u4E0D\u4E3A "myJob" \u4E14\u7248\u672C\u4E0D\u4E3A 0.1 \u7684\u4F5C\u4E1A
|
||||
MavenProjectSettingPage.refModuleText=\u5728\u914D\u7F6E\u6587\u4EF6\u4E2D\u8BBE\u7F6E\u5F15\u7528\u5DE5\u7A0B\u6A21\u5757
|
||||
MavenProjectSettingPage.excludeDeletedItems=\u6392\u9664\u5DF2\u5220\u9664\u9879
|
||||
MavenProjectSettingPage.syncAllPomsWarning=\u5355\u51FB \u201C\u5F3A\u5236\u5B8C\u5168\u91CD\u65B0\u540C\u6B65 POM\u201D \u6309\u94AE\u4EE5\u5E94\u7528\u65B0\u7684\u8BBE\u7F6E\u3002
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Manifest-Version: 1.0
|
||||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Designer Maven
|
||||
Bundle-SymbolicName: org.talend.designer.maven;singleton:=true
|
||||
|
||||
@@ -45,6 +45,7 @@ public enum ETalendMavenVariables {
|
||||
JobletName,
|
||||
|
||||
JobId,
|
||||
JobParentId,
|
||||
JobName,
|
||||
JobType,
|
||||
JobFinalName,
|
||||
|
||||
@@ -29,7 +29,6 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.maven.model.Activation;
|
||||
import org.apache.maven.model.Model;
|
||||
@@ -55,6 +54,7 @@ import org.slf4j.LoggerFactory;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.commons.utils.MojoType;
|
||||
import org.talend.commons.utils.VersionUtils;
|
||||
import org.talend.commons.utils.workbench.resources.ResourceUtils;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.IESBService;
|
||||
@@ -110,7 +110,7 @@ public class AggregatorPomsHelper {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(AggregatorPomsHelper.class);
|
||||
|
||||
private String projectTechName;
|
||||
|
||||
|
||||
public AggregatorPomsHelper() {
|
||||
projectTechName = ProjectManager.getInstance().getCurrentProject().getTechnicalLabel();
|
||||
}
|
||||
@@ -389,9 +389,37 @@ public class AggregatorPomsHelper {
|
||||
public String getJobProjectName(Property property) {
|
||||
return projectTechName + "_" + getJobProjectFolderName(property).toUpperCase(); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
public static String getJobLabel(Property property) {
|
||||
|
||||
if (property == null) {
|
||||
return "";
|
||||
}
|
||||
|
||||
if (property.getParentItem() != null) {
|
||||
Property parentProperty = property.getParentItem().getProperty();
|
||||
return parentProperty.getLabel() + "_" + parentProperty.getVersion().replace(".", "_") + "_" + property.getLabel();
|
||||
}
|
||||
|
||||
return property.getLabel();
|
||||
}
|
||||
|
||||
public static String getJobId(Property property) {
|
||||
|
||||
if (property == null) {
|
||||
return "";
|
||||
}
|
||||
|
||||
if (property.getParentItem() != null) {
|
||||
Property parentProperty = property.getParentItem().getProperty();
|
||||
return property.getId() + "_" + parentProperty.getId() + "_" + parentProperty.getVersion().replace(".", "_");
|
||||
}
|
||||
|
||||
return property.getId();
|
||||
}
|
||||
|
||||
public static String getJobProjectFolderName(Property property) {
|
||||
return getJobProjectFolderName(property.getLabel(), property.getVersion());
|
||||
return getJobProjectFolderName(getJobLabel(property), property.getVersion());
|
||||
}
|
||||
|
||||
public static String getJobProjectFolderName(String label, String version) {
|
||||
@@ -400,7 +428,7 @@ public class AggregatorPomsHelper {
|
||||
|
||||
public static String getJobProjectId(Property property) {
|
||||
String _projectTechName = ProjectManager.getInstance().getProject(property).getTechnicalLabel();
|
||||
return getJobProjectId(_projectTechName, property.getId(), property.getVersion());
|
||||
return getJobProjectId(_projectTechName, getJobId(property), property.getVersion());
|
||||
}
|
||||
|
||||
public static String getJobProjectId(String projectTechName, String id, String version) {
|
||||
@@ -441,7 +469,7 @@ public class AggregatorPomsHelper {
|
||||
AggregatorPomsHelper helper = new AggregatorPomsHelper(projectTechName);
|
||||
IPath itemRelativePath = getItemRelativePath.apply(property);
|
||||
String version = realVersion == null ? property.getVersion() : realVersion;
|
||||
String jobFolderName = getJobProjectFolderName(property.getLabel(), version);
|
||||
String jobFolderName = getJobProjectFolderName(getJobLabel(property), version);
|
||||
ERepositoryObjectType type = ERepositoryObjectType.getItemType(property.getItem());
|
||||
IFolder jobFolder = null;
|
||||
if (PomIdsHelper.skipFolders()) {
|
||||
@@ -626,7 +654,8 @@ public class AggregatorPomsHelper {
|
||||
syncAllPomsWithoutProgress(monitor, PomIdsHelper.getPomFilter(), false);
|
||||
}
|
||||
|
||||
public void syncAllPomsWithoutProgress(IProgressMonitor monitor, String pomFilter, boolean withDependencies)
|
||||
@SuppressWarnings("unchecked")
|
||||
public void syncAllPomsWithoutProgress(IProgressMonitor monitor, String pomFilter, boolean withDependencies)
|
||||
throws Exception {
|
||||
LOGGER.info("syncAllPomsWithoutProgress, pomFilter: " + pomFilter);
|
||||
IRunProcessService runProcessService = IRunProcessService.get();
|
||||
@@ -716,19 +745,110 @@ public class AggregatorPomsHelper {
|
||||
List<Property> serviceRefJobs = getAllServiceReferencedJobs();
|
||||
for (Item item : allItems) {
|
||||
if (ProjectManager.getInstance().isInCurrentMainProject(item)) {
|
||||
|
||||
// remove original child jobs/routelets projects as they will be created during parent Route generation
|
||||
if (ProcessUtils.isRoutelet(item.getProperty()) || ProcessUtils.isChildRouteProcess(item)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
monitor.subTask("Synchronize job pom: " + item.getProperty().getLabel() //$NON-NLS-1$
|
||||
+ "_" + item.getProperty().getVersion()); //$NON-NLS-1$
|
||||
runProcessService.generatePom(item, TalendProcessOptionConstants.GENERATE_POM_NO_FILTER);
|
||||
|
||||
IFile pomFile = getItemPomFolder(item.getProperty()).getFile(TalendMavenConstants.POM_FILE_NAME);
|
||||
// filter esb data service node
|
||||
// FIXME use serviceRefJobs.contains(item.getProperty()) if isSOAPServiceProvider() doesn't work.
|
||||
if (isCIMode && !isSOAPServiceProvider(item.getProperty()) && pomFile.exists()) {
|
||||
modules.add(getModulePath(pomFile));
|
||||
}
|
||||
}
|
||||
monitor.worked(1);
|
||||
if (monitor.isCanceled()) {
|
||||
return;
|
||||
monitor.worked(1);
|
||||
if (monitor.isCanceled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Generate individual child job projects/poms for each Route (CI mode only)
|
||||
|
||||
if (isCIMode && ProcessUtils.isRoute(item.getProperty()) && (ProcessUtils.isRouteWithChildJobs(item) || ProcessUtils.isRouteWithRoutelets(item))) {
|
||||
|
||||
Set<JobInfo> allJobInfos = ProcessorUtilities.getChildrenJobInfo(item, true, true);
|
||||
|
||||
for (JobInfo childJob : allJobInfos) {
|
||||
|
||||
if (childJob.getProcessItem() != null && childJob.getProcessItem().getProperty() != null ) {
|
||||
|
||||
Property childJobProperty = childJob.getProcessItem().getProperty();
|
||||
String jobGroupID = (String) childJob.getProcessItem().getProperty().getAdditionalProperties().get(MavenConstants.NAME_GROUP_ID);
|
||||
String jobCustomVersion = (String) childJob.getProcessItem().getProperty().getAdditionalProperties().get(MavenConstants.NAME_USER_VERSION);
|
||||
String jobBuildType = (String) childJob.getProcessItem().getProperty().getAdditionalProperties().get(TalendProcessArgumentConstant.ARG_BUILD_TYPE);
|
||||
boolean jobUseSnapshot = childJob.getProcessItem().getProperty().getAdditionalProperties().containsKey(MavenConstants.NAME_PUBLISH_AS_SNAPSHOT);
|
||||
|
||||
Property routeProperty = item.getProperty();
|
||||
String routeGroupID = PomIdsHelper.getJobGroupId(routeProperty);
|
||||
String routeVersion = VersionUtils.getPublishVersion(routeProperty.getVersion());
|
||||
String routeCustomVersion = (String) routeProperty.getAdditionalProperties().get(MavenConstants.NAME_USER_VERSION);
|
||||
boolean routeUseSnapshot = routeProperty.getAdditionalProperties().containsKey(MavenConstants.NAME_PUBLISH_AS_SNAPSHOT);
|
||||
String routeBuildType = (String) routeProperty.getAdditionalProperties().get(TalendProcessArgumentConstant.ARG_BUILD_TYPE);
|
||||
|
||||
|
||||
// Inherit child job parameters from parent route
|
||||
|
||||
childJobProperty.setParentItem(item);
|
||||
childJobProperty.getAdditionalProperties().put(MavenConstants.NAME_GROUP_ID, routeGroupID);
|
||||
|
||||
if (routeCustomVersion != null) {
|
||||
childJobProperty.getAdditionalProperties().put(MavenConstants.NAME_USER_VERSION, routeCustomVersion);
|
||||
} else {
|
||||
childJobProperty.getAdditionalProperties().put(MavenConstants.NAME_USER_VERSION, routeVersion);
|
||||
}
|
||||
|
||||
if (routeUseSnapshot) {
|
||||
childJobProperty.getAdditionalProperties().put(MavenConstants.NAME_PUBLISH_AS_SNAPSHOT, "true");
|
||||
} else {
|
||||
childJobProperty.getAdditionalProperties().remove(MavenConstants.NAME_PUBLISH_AS_SNAPSHOT);
|
||||
}
|
||||
|
||||
if ("ROUTE".equalsIgnoreCase(routeBuildType) || null == routeBuildType) {
|
||||
childJobProperty.getAdditionalProperties().put(TalendProcessArgumentConstant.ARG_BUILD_TYPE, "OSGI");
|
||||
} else {
|
||||
childJobProperty.getAdditionalProperties().put(TalendProcessArgumentConstant.ARG_BUILD_TYPE, "Standalone");
|
||||
}
|
||||
|
||||
runProcessService.generatePom(childJob.getProcessItem(), TalendProcessOptionConstants.GENERATE_POM_NO_FILTER);
|
||||
|
||||
IFile childPomFile = getItemPomFolder(childJobProperty).getFile(TalendMavenConstants.POM_FILE_NAME);
|
||||
modules.add(getModulePath(childPomFile));
|
||||
|
||||
// restore original Job parameters
|
||||
childJobProperty.setParentItem(null);
|
||||
|
||||
if ( jobGroupID!= null) {
|
||||
childJobProperty.getAdditionalProperties().put(MavenConstants.NAME_GROUP_ID, jobGroupID);
|
||||
}else {
|
||||
childJobProperty.getAdditionalProperties().remove(MavenConstants.NAME_GROUP_ID);
|
||||
}
|
||||
|
||||
if (jobUseSnapshot) {
|
||||
childJobProperty.getAdditionalProperties().put(MavenConstants.NAME_PUBLISH_AS_SNAPSHOT, "true");
|
||||
}else {
|
||||
childJobProperty.getAdditionalProperties().remove(MavenConstants.NAME_PUBLISH_AS_SNAPSHOT);
|
||||
}
|
||||
|
||||
if (jobCustomVersion!=null) {
|
||||
childJobProperty.getAdditionalProperties().put(MavenConstants.NAME_USER_VERSION, jobCustomVersion);
|
||||
} else {
|
||||
childJobProperty.getAdditionalProperties().remove(MavenConstants.NAME_USER_VERSION);
|
||||
}
|
||||
|
||||
if (jobBuildType == null) {
|
||||
childJobProperty.getAdditionalProperties().remove(TalendProcessArgumentConstant.ARG_BUILD_TYPE);
|
||||
} else {
|
||||
childJobProperty.getAdditionalProperties().put(TalendProcessArgumentConstant.ARG_BUILD_TYPE, jobBuildType);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// sync project pom again with all modules.
|
||||
|
||||
@@ -149,11 +149,34 @@ public abstract class AbstractMavenProcessorPom extends CreateMavenBundleTemplat
|
||||
variablesValuesMap.put(ETalendMavenVariables.JobGroupId, PomIdsHelper.getJobGroupId(property));
|
||||
variablesValuesMap.put(ETalendMavenVariables.JobVersion, PomIdsHelper.getJobVersion(property));
|
||||
}
|
||||
variablesValuesMap.put(ETalendMavenVariables.JobArtifactId, PomIdsHelper.getJobArtifactId(property));
|
||||
|
||||
|
||||
variablesValuesMap.put(ETalendMavenVariables.TalendJobVersion, property.getVersion());
|
||||
final String jobName = JavaResourcesHelper.escapeFileName(process.getName());
|
||||
variablesValuesMap.put(ETalendMavenVariables.JobName, jobName);
|
||||
|
||||
|
||||
if(ProcessUtils.isChildRouteProcess(process) || ProcessUtils.isRoutelet(property)) {
|
||||
if(property.getParentItem() != null) {
|
||||
String routeArtifactID = PomIdsHelper.getJobArtifactId(property.getParentItem().getProperty());
|
||||
String jobArtifactID = PomIdsHelper.getJobArtifactId(property);
|
||||
String routeVersion = property.getParentItem().getProperty().getVersion().replace(".", "_");
|
||||
|
||||
String jobName = (jobArtifactID.startsWith(routeArtifactID))? jobArtifactID :
|
||||
routeArtifactID + "_" + routeVersion + "_" + jobArtifactID;
|
||||
|
||||
variablesValuesMap.put(ETalendMavenVariables.JobArtifactId, jobName);
|
||||
variablesValuesMap.put(ETalendMavenVariables.JobName, jobName);
|
||||
variablesValuesMap.put(ETalendMavenVariables.JobVersion, PomIdsHelper.getJobVersion(property.getParentItem().getProperty()));
|
||||
} else {
|
||||
variablesValuesMap.put(ETalendMavenVariables.JobArtifactId, PomIdsHelper.getJobArtifactId(property));
|
||||
final String jobName = JavaResourcesHelper.escapeFileName(process.getName());
|
||||
variablesValuesMap.put(ETalendMavenVariables.JobName, jobName);
|
||||
}
|
||||
} else {
|
||||
variablesValuesMap.put(ETalendMavenVariables.JobArtifactId, PomIdsHelper.getJobArtifactId(property));
|
||||
final String jobName = JavaResourcesHelper.escapeFileName(process.getName());
|
||||
variablesValuesMap.put(ETalendMavenVariables.JobName, jobName);
|
||||
}
|
||||
|
||||
if (property != null) {
|
||||
Project currentProject = ProjectManager.getInstance().getProject(property);
|
||||
variablesValuesMap.put(ETalendMavenVariables.ProjectName,
|
||||
|
||||
@@ -282,6 +282,9 @@ public class CreateMavenJobPom extends AbstractMavenProcessorPom {
|
||||
String jobId = jobInfoProp.getProperty(JobInfoProperties.JOB_ID, process.getId());
|
||||
checkPomProperty(properties, "talend.job.id", ETalendMavenVariables.JobId,
|
||||
jobId);
|
||||
String jobParentId = jobInfoProp.getProperty(JobInfoProperties.JOB_PARENT_ID, "");
|
||||
checkPomProperty(properties, "talend.job.parent.id", ETalendMavenVariables.JobParentId,
|
||||
jobParentId);
|
||||
checkPomProperty(properties, "talend.job.type", ETalendMavenVariables.JobType,
|
||||
jobInfoProp.getProperty(JobInfoProperties.JOB_TYPE));
|
||||
|
||||
|
||||
@@ -4,12 +4,10 @@ Bundle-Name: Jfreechart Plug-in
|
||||
Bundle-SymbolicName: org.talend.libraries.jfreechart;singleton:=true
|
||||
Bundle-Version: 8.0.1.qualifier
|
||||
Bundle-Vendor: .Talend SA.
|
||||
Bundle-ClassPath: lib/jcommon-1.0.15.jar,
|
||||
lib/gnujaxp.jar,
|
||||
lib/jfreechart-1.0.12-experimental.jar,
|
||||
lib/jfreechart-1.0.12-swt.jar,
|
||||
lib/jfreechart-1.0.12.jar,
|
||||
lib/swtgraphics2d.jar,
|
||||
Bundle-ClassPath: lib/jcommon-1.0.17.jar;mvn:org.jfree/jcommon/1.0.17,
|
||||
lib/jfreechart-swt-1.0.17.jar;mvn:jfree/jfreechart-swt/1.0.17,
|
||||
lib/jfreechart-1.0.14.jar;mvn:org.jfree/jfreechart/1.0.14,
|
||||
lib/swtgraphics2d-1.1.0.jar;mvn:org.jfree/swtgraphics2d/1.1.0,
|
||||
.
|
||||
Export-Package: org.jfree,
|
||||
org.jfree.base,
|
||||
|
||||
@@ -6,35 +6,28 @@
|
||||
context="plugin:org.talend.libraries.jfreechart"
|
||||
language="java"
|
||||
message="Needed for jfreechart plugin"
|
||||
name="jcommon-1.0.15.jar" mvn_uri="mvn:org.talend.libraries/jcommon-1.0.15/6.0.0"
|
||||
name="jcommon-1.0.17.jar" mvn_uri="mvn:org.jfree/jcommon/1.0.17"
|
||||
required="true">
|
||||
</libraryNeeded>
|
||||
<libraryNeeded
|
||||
context="plugin:org.talend.libraries.jfreechart"
|
||||
language="java"
|
||||
message="Needed for jfreechart plugin"
|
||||
name="jfreechart-1.0.12.jar" mvn_uri="mvn:org.talend.libraries/jfreechart-1.0.12/6.0.0"
|
||||
name="jfreechart-1.0.14.jar" mvn_uri="mvn:org.jfree/jfreechart/1.0.14"
|
||||
required="true">
|
||||
</libraryNeeded>
|
||||
<libraryNeeded
|
||||
context="plugin:org.talend.libraries.jfreechart"
|
||||
language="java"
|
||||
message="Needed for jfreechart plugin"
|
||||
name="jfreechart-1.0.12-experimental.jar" mvn_uri="mvn:org.talend.libraries/jfreechart-1.0.12-experimental/6.0.0"
|
||||
name="jfreechart-swt-1.0.17.jar" mvn_uri="mvn:jfree/jfreechart-swt/1.0.17"
|
||||
required="true">
|
||||
</libraryNeeded>
|
||||
<libraryNeeded
|
||||
context="plugin:org.talend.libraries.jfreechart"
|
||||
language="java"
|
||||
message="Needed for jfreechart plugin"
|
||||
name="jfreechart-1.0.12-swt.jar" mvn_uri="mvn:org.talend.libraries/jfreechart-1.0.12-swt/6.0.0"
|
||||
required="true">
|
||||
</libraryNeeded>
|
||||
<libraryNeeded
|
||||
context="plugin:org.talend.libraries.jfreechart"
|
||||
language="java"
|
||||
message="Needed for jfreechart plugin"
|
||||
name="swtgraphics2d.jar" mvn_uri="mvn:org.talend.libraries/swtgraphics2d/6.0.0"
|
||||
name="swtgraphics2d-1.1.0.jar" mvn_uri="mvn:org.jfree/swtgraphics2d/1.1.0"
|
||||
required="true">
|
||||
</libraryNeeded>
|
||||
</extension>
|
||||
|
||||
@@ -319,7 +319,8 @@ public class LibraryDataService {
|
||||
libraryObj.setPomMissing(true);
|
||||
}
|
||||
if (!is4Parent) {
|
||||
libraryObj.setType(String.valueOf(properties.get("type"))); //$NON-NLS-1$
|
||||
String type = String.valueOf(properties.get("type"));
|
||||
libraryObj.setType(MavenConstants.PACKAGING_BUNDLE.equalsIgnoreCase(type) ? MavenConstants.PACKAGING_JAR : type); //$NON-NLS-1$
|
||||
}
|
||||
int licenseCount = 0;
|
||||
if (properties.containsKey("license.count")) { //$NON-NLS-1$
|
||||
|
||||
@@ -18,6 +18,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.talend.core.runtime.maven.MavenArtifact;
|
||||
import org.talend.core.runtime.maven.MavenUrlHelper;
|
||||
@@ -76,8 +77,9 @@ public class VersionUtil {
|
||||
return ret;
|
||||
}
|
||||
|
||||
private static final String PATTERN_LibNAME_With_TIMESTAMP = ".*-[0-9]{8}\\.[0-9]{6}-[0-9]";
|
||||
public static boolean isSnapshot(String v) {
|
||||
if (v != null && (v.contains("-") || v.toUpperCase().endsWith(MavenUrlHelper.VERSION_SNAPSHOT))) {
|
||||
if (v != null && ((v.contains("-") && Pattern.matches(PATTERN_LibNAME_With_TIMESTAMP, v)) || v.toUpperCase().endsWith(MavenUrlHelper.VERSION_SNAPSHOT))) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -23,7 +23,18 @@ Require-Bundle: org.eclipse.ui,
|
||||
org.eclipse.jdt.core,
|
||||
org.talend.core.ui,
|
||||
org.talend.components.api,
|
||||
org.apache.servicemix.bundles.avro
|
||||
org.talend.commons.runtime,
|
||||
org.eclipse.core.resources,
|
||||
org.eclipse.equinox.common,
|
||||
org.eclipse.core.jobs,
|
||||
org.eclipse.osgi,
|
||||
org.talend.common.ui.runtime,
|
||||
org.eclipse.core.runtime,
|
||||
org.talend.cwm.mip,
|
||||
org.talend.daikon,
|
||||
org.talend.libraries.apache,
|
||||
org.talend.studio.studio-utils,
|
||||
avro;bundle-version="1.11.2"
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-Vendor: .Talend SA.
|
||||
Bundle-Localization: plugin
|
||||
|
||||
@@ -38,7 +38,7 @@ ConnectionContextHelper.InConextMessages=The connection have been in context mod
|
||||
ConnectionContextHelper.OutConextMessages=The connection is not in context mode.
|
||||
ConnectionContextHelper.UpdateMessages=Do you want to update the context parameters?
|
||||
ConnectionContextHelper.UpdateTitle=Update context
|
||||
ContextSetsSelectionDialog.ContextSets=Context Sets
|
||||
ContextSetsSelectionDialog.ContextEnvironments=Context environments
|
||||
ContextSetsSelectionDialog.Messages=Current connection is in context mode.
|
||||
ContextSetsSelectionDialog.ReportMessages=Current report is in context mode.
|
||||
ContextSetsSelectionDialog.Source=Repository context source\:
|
||||
@@ -47,12 +47,12 @@ CommonWizard.cancel=Cancel
|
||||
CommonWizard.exception=Exception
|
||||
CommonWizard.nameAlreadyExist=This name already exists
|
||||
CommonWizard.persistenceException=Access to the data failure{0}\n
|
||||
ContextWizard.Title=Create / Edit a context group
|
||||
ContextWizard.contextPageDescription=Define the contexts, variables and values
|
||||
ContextWizard.createEditTitle=Create / Edit context
|
||||
ContextWizard.defineContext.Description=Define context variables and environments
|
||||
ContextWizard.contextPageTitle=Step 2 of 2
|
||||
ContextWizard.step0Description=Add any required information
|
||||
ContextWizard.step0Title=Step 1 of 2
|
||||
ContextModeWizard.Title=Create / Reuse a context group
|
||||
ContextModeWizard.CreateReuseTitle=Create / Reuse context
|
||||
CreateTableAction.action.createTitle=Retrieve Schema
|
||||
DatabaseForm.AddParams=Additional parameters
|
||||
DatabaseForm.alert=DB Type must be specified
|
||||
@@ -522,10 +522,10 @@ ContextModeSelectPage.contextModes=Create a new context or reuse the existing on
|
||||
ContextModeSelectPage.createContext=Create a new repository context
|
||||
ContextModeSelectPage.reuseContext=Reuse an existing repository context
|
||||
ReuseRepositoryContext.name=Context
|
||||
ShowRepositoryContextPage.title=Select context group
|
||||
ShowRepositoryContextPage.warnMsg=Please select a context group.
|
||||
ShowRepositoryContextPage.aviableContexts=Available Context Groups
|
||||
ShowRepositoryContextPage.SelectReuseContext=Select a context group and click Next.
|
||||
ShowRepositoryContextPage.context.title=Select context
|
||||
ShowRepositoryContextPage.context.warnMsg=Please select a context.
|
||||
ShowRepositoryContextPage.context.aviableContexts=Available Contexts
|
||||
ShowRepositoryContextPage.context.SelectReuseContext=Select a context and click Next.
|
||||
ContextAdaptConectionSelectPage.selectOrCustomVariable=Select a connection field for the exist context's variable
|
||||
ContextAdaptConectionSelectPage.selectOrCustomVariableNew=Select a context parameter field for the exist context's variable
|
||||
ContextAdaptConectionSelectPage.title=Select connection fields
|
||||
|
||||
@@ -47,12 +47,12 @@ CommonWizard.cancel=Annuler
|
||||
CommonWizard.exception=Exception
|
||||
CommonWizard.nameAlreadyExist=Ce nom existe d\u00E9j\u00E0
|
||||
CommonWizard.persistenceException=\u00C9chec de l'acc\u00E8s aux donn\u00E9es{0}\n
|
||||
ContextWizard.Title=Cr\u00E9er/Modifier un groupe de contextes
|
||||
ContextWizard.contextPageDescription=D\u00E9finir les contextes, variables et valeurs
|
||||
ContextWizard.createEditTitle=Cr\u00E9er/Modifier un contexte
|
||||
ContextWizard.defineContext.Description=D\u00E9finir les variables et les environnements de contexte
|
||||
ContextWizard.contextPageTitle=\u00C9tape 2 sur 2
|
||||
ContextWizard.step0Description=Renseigner les informations requises
|
||||
ContextWizard.step0Title=\u00C9tape 1 sur 2
|
||||
ContextModeWizard.Title=Cr\u00E9er/R\u00E9utiliser un groupe de contextes
|
||||
ContextModeWizard.CreateReuseTitle=Cr\u00E9er/R\u00E9utiliser un contexte
|
||||
CreateTableAction.action.createTitle=R\u00E9cup\u00E9rer le sch\u00E9ma
|
||||
DatabaseForm.AddParams=Param\u00E8tres suppl\u00E9mentaires
|
||||
DatabaseForm.alert=Le type de base de donn\u00E9es doit \u00EAtre sp\u00E9cifi\u00E9
|
||||
|
||||
@@ -47,12 +47,12 @@ CommonWizard.cancel=\u30AD\u30E3\u30F3\u30BB\u30EB
|
||||
CommonWizard.exception=\u4F8B\u5916
|
||||
CommonWizard.nameAlreadyExist=\u3053\u306E\u540D\u524D\u306F\u65E2\u306B\u5B58\u5728\u3057\u307E\u3059
|
||||
CommonWizard.persistenceException=\u30C7\u30FC\u30BF\u30A2\u30AF\u30BB\u30B9\u5931\u6557{0}\n
|
||||
ContextWizard.Title=\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30B0\u30EB\u30FC\u30D7\u3092\u4F5C\u6210/\u7DE8\u96C6
|
||||
ContextWizard.contextPageDescription=\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3001\u5909\u6570\u3001\u5024\u3092\u5B9A\u7FA9
|
||||
ContextWizard.createEditTitle=\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3092\u4F5C\u6210/\u7DE8\u96C6
|
||||
ContextWizard.defineContext.Description=\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u5909\u6570\u3068\u74B0\u5883\u3092\u5B9A\u7FA9
|
||||
ContextWizard.contextPageTitle=\u30B9\u30C6\u30C3\u30D72/2
|
||||
ContextWizard.step0Description=\u5FC5\u8981\u306A\u60C5\u5831\u3092\u8FFD\u52A0
|
||||
ContextWizard.step0Title=\u30B9\u30C6\u30C3\u30D71/2
|
||||
ContextModeWizard.Title=\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30B0\u30EB\u30FC\u30D7\u3092\u4F5C\u6210/\u518D\u4F7F\u7528
|
||||
ContextModeWizard.CreateReuseTitle=\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3092\u4F5C\u6210/\u518D\u4F7F\u7528
|
||||
CreateTableAction.action.createTitle=\u30B9\u30AD\u30FC\u30DE\u3092\u53D6\u5F97
|
||||
DatabaseForm.AddParams=\u8FFD\u52A0\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC
|
||||
DatabaseForm.alert=DB\u30BF\u30A4\u30D7\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044
|
||||
|
||||
@@ -47,12 +47,12 @@ CommonWizard.cancel=\u53D6\u6D88
|
||||
CommonWizard.exception=\u5F02\u5E38
|
||||
CommonWizard.nameAlreadyExist=\u6B64\u540D\u79F0\u5DF2\u5B58\u5728
|
||||
CommonWizard.persistenceException=\u8BBF\u95EE\u6570\u636E\u5931\u8D25 {0}\n
|
||||
ContextWizard.Title=\u521B\u5EFA/\u7F16\u8F91\u4E0A\u4E0B\u6587\u7EC4
|
||||
ContextWizard.contextPageDescription=\u5B9A\u4E49\u4E0A\u4E0B\u6587\u3001\u53D8\u91CF\u548C\u503C
|
||||
ContextWizard.createEditTitle=\u521B\u5EFA/\u7F16\u8F91\u4E0A\u4E0B\u6587
|
||||
ContextWizard.defineContext.Description=\u5B9A\u4E49\u4E0A\u4E0B\u6587\u53D8\u91CF\u548C\u73AF\u5883
|
||||
ContextWizard.contextPageTitle=\u7B2C 2 \u6B65 (\u5171 2 \u6B65)
|
||||
ContextWizard.step0Description=\u6DFB\u52A0\u4EFB\u4F55\u6240\u9700\u4FE1\u606F
|
||||
ContextWizard.step0Title=\u7B2C 1 \u6B65 (\u5171 2 \u6B65)
|
||||
ContextModeWizard.Title=\u521B\u5EFA/\u91CD\u7528\u4E0A\u4E0B\u6587\u7EC4
|
||||
ContextModeWizard.CreateReuseTitle=\u521B\u5EFA/\u91CD\u7528\u4E0A\u4E0B\u6587
|
||||
CreateTableAction.action.createTitle=\u83B7\u53D6 Schema
|
||||
DatabaseForm.AddParams=\u9644\u52A0\u53C2\u6570
|
||||
DatabaseForm.alert=\u5FC5\u987B\u6307\u5B9A\u6570\u636E\u5E93\u7C7B\u578B
|
||||
|
||||
@@ -87,6 +87,7 @@ public class MetadataManagmentUiService implements IMetadataManagmentUiService {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public boolean promptConfirmLauch(Shell shell, IContext context) {
|
||||
return ConnectionContextHelper.promptConfirmLauch(shell, context);
|
||||
}
|
||||
@@ -96,4 +97,9 @@ public class MetadataManagmentUiService implements IMetadataManagmentUiService {
|
||||
return ConnectionContextHelper.isPromptNeeded(contexts);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean promptConfirmLauchIterateContexts(Shell shell, List<IContext> contexts, IContext context) {
|
||||
return ConnectionContextHelper.promptConfirmLauchIterateContexts(shell, contexts, context);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -92,6 +92,8 @@ public class PromptDialog extends SelectionDialog {
|
||||
|
||||
private Composite child;
|
||||
|
||||
private List<IContext> iContexts = new ArrayList<IContext>();
|
||||
|
||||
public PromptDialog(Shell parentShell, IContext context) {
|
||||
super(parentShell);
|
||||
initDialog(context, canCancel, Messages.getString("ContextSetsSelectionDialog.Messages")); //$NON-NLS-1$
|
||||
@@ -123,22 +125,26 @@ public class PromptDialog extends SelectionDialog {
|
||||
|
||||
private void initSets() {
|
||||
if (source != null) {
|
||||
iContexts.clear();
|
||||
if (source instanceof ContextItem) {
|
||||
ContextItem contextItem = (ContextItem) source;
|
||||
List<ContextType> contexts = contextItem.getContext();
|
||||
String repositoryContextId = contextItem.getProperty().getId();
|
||||
defalutContext = contextItem.getDefaultContext();
|
||||
for (ContextType contextType : contexts) {
|
||||
IContext iContext = ContextUtils.convert2IContext(contextType, repositoryContextId).clone();
|
||||
iContexts.add(iContext);
|
||||
String name = contextType.getName();
|
||||
if (name.equalsIgnoreCase(defalutContext)) {
|
||||
name = name + DEFAULT_FLAG;
|
||||
selectedContext = name;
|
||||
currentContext = ContextUtils.convert2IContext(contextType, repositoryContextId).clone();
|
||||
currentContext = iContext;
|
||||
}
|
||||
contextSetsList.add(name);
|
||||
}
|
||||
} else if (source instanceof List) {
|
||||
List<IContext> contexts = (List<IContext>) source;
|
||||
iContexts = contexts;
|
||||
for (IContext context : contexts) {
|
||||
String name = context.getName();
|
||||
if (name.equalsIgnoreCase(defalutContext)) {
|
||||
@@ -150,6 +156,7 @@ public class PromptDialog extends SelectionDialog {
|
||||
}
|
||||
} else if (source instanceof IContext) {
|
||||
currentContext = (IContext) source;
|
||||
iContexts.add(currentContext);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -234,7 +241,14 @@ public class PromptDialog extends SelectionDialog {
|
||||
promptGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||
// Prompt for context values ?
|
||||
for (final IContextParameter parameter : currentContext.getContextParameterList()) {
|
||||
boolean isPromptNeeded = false;
|
||||
if (parameter.isPromptNeeded()) {
|
||||
isPromptNeeded = true;
|
||||
} else if (ContextUtils.isPromptNeeded(iContexts, parameter.getName())) {
|
||||
parameter.setPromptNeeded(true);
|
||||
isPromptNeeded = true;
|
||||
}
|
||||
if (isPromptNeeded) {
|
||||
if (DefaultCellEditorFactory.isBoolean(parameter.getType())) {
|
||||
final Composite composite2 = new Composite(promptGroup, SWT.NONE);
|
||||
final GridLayout gridLayout = new GridLayout(2, false);
|
||||
@@ -492,6 +506,9 @@ public class PromptDialog extends SelectionDialog {
|
||||
for (IContextParameter parameter : currentContext.getContextParameterList()) {
|
||||
if (parameter.isPromptNeeded()) {
|
||||
nbParams++;
|
||||
} else if (ContextUtils.isPromptNeeded(iContexts, parameter.getName())) {
|
||||
parameter.setPromptNeeded(true);
|
||||
nbParams++;
|
||||
}
|
||||
}
|
||||
Point dialogSize = new Point(X_POSITION, Math.min((height * nbParams) + Y_POSITION, 400));
|
||||
@@ -535,4 +552,12 @@ public class PromptDialog extends SelectionDialog {
|
||||
return currentContext;
|
||||
}
|
||||
|
||||
public List<IContext> getiContexts() {
|
||||
return iContexts;
|
||||
}
|
||||
|
||||
public void setiContexts(List<IContext> iContexts) {
|
||||
this.iContexts = iContexts;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2160,7 +2160,7 @@ public final class ConnectionContextHelper {
|
||||
if (contexts != null) {
|
||||
for (IContext context : contexts) {
|
||||
for (IContextParameter parameter : context.getContextParameterList()) {
|
||||
if (parameter.isPromptNeeded()) {
|
||||
if (parameter.isPromptNeeded() || ContextUtils.isPromptNeeded(contexts, parameter.getName())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -2175,7 +2175,7 @@ public final class ConnectionContextHelper {
|
||||
// Prompt for context values ?
|
||||
for (IContext context : contexts) {
|
||||
for (IContextParameter parameter : context.getContextParameterList()) {
|
||||
if (parameter.isPromptNeeded()) {
|
||||
if (parameter.isPromptNeeded() || ContextUtils.isPromptNeeded(contexts, parameter.getName())) {
|
||||
nbValues++;
|
||||
break;
|
||||
}
|
||||
@@ -2197,10 +2197,16 @@ public final class ConnectionContextHelper {
|
||||
Assert.isNotNull(contextItem);
|
||||
// Prompt for context values ?
|
||||
List<ContextType> contexts = contextItem.getContext();
|
||||
List<IContext> iContexts = new ArrayList<IContext>();
|
||||
for (ContextType contextType : contexts) {
|
||||
IContext jobContext = ContextUtils.convert2IContext(contextType, contextItem.getProperty().getId());
|
||||
for (IContextParameter parameter : jobContext.getContextParameterList()) {
|
||||
if (parameter.isPromptNeeded()) {
|
||||
if (jobContext != null) {
|
||||
iContexts.add(jobContext);
|
||||
}
|
||||
}
|
||||
for (IContext context : iContexts) {
|
||||
for (IContextParameter parameter : context.getContextParameterList()) {
|
||||
if (parameter.isPromptNeeded() || ContextUtils.isPromptNeeded(iContexts, parameter.getName())) {
|
||||
nbValues++;
|
||||
break;
|
||||
}
|
||||
@@ -2214,7 +2220,7 @@ public final class ConnectionContextHelper {
|
||||
connection.setContextName(selectedContext.getName());
|
||||
// save the input prompt context values to cache
|
||||
for (IContextParameter param : selectedContext.getContextParameterList()) {
|
||||
JavaSqlFactory.savePromptConVars2Cache(connection, param);
|
||||
JavaSqlFactory.savePromptConVars2Cache(connection, param, iContexts);
|
||||
}
|
||||
// set the input values to connection
|
||||
JavaSqlFactory.setPromptContextValues(connection);
|
||||
@@ -2226,6 +2232,12 @@ public final class ConnectionContextHelper {
|
||||
return continueLaunch;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use instead promptConfirmLauchIterateContexts(Shell shell, List<IContext> contexts, IContext context)
|
||||
* @param shell
|
||||
* @param context
|
||||
* @return
|
||||
*/
|
||||
public static boolean promptConfirmLauch(Shell shell, IContext context) {
|
||||
boolean continueLaunch = true;
|
||||
|
||||
@@ -2259,4 +2271,49 @@ public final class ConnectionContextHelper {
|
||||
}
|
||||
return continueLaunch;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set contexts for 'PromptDialog' and Iterate all contexts to check and confirm prompt
|
||||
*
|
||||
* @param shell
|
||||
* @param contexts
|
||||
* @param context
|
||||
* @return
|
||||
*/
|
||||
public static boolean promptConfirmLauchIterateContexts(Shell shell, List<IContext> contexts, IContext context) {
|
||||
boolean continueLaunch = true;
|
||||
|
||||
int nbValues = 0;
|
||||
Assert.isNotNull(context);
|
||||
// Prompt for context values ?
|
||||
for (IContextParameter parameter : context.getContextParameterList()) {
|
||||
if (parameter.isPromptNeeded() || ContextUtils.isPromptNeeded(contexts, parameter.getName())) {
|
||||
nbValues++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (nbValues > 0) {
|
||||
IContext contextCopy = context.clone();
|
||||
PromptDialog promptDialog = new PromptDialog(shell, contextCopy);
|
||||
if (!contexts.isEmpty()) {
|
||||
promptDialog.setiContexts(contexts);
|
||||
}
|
||||
if (promptDialog.open() == PromptDialog.OK) {
|
||||
for (IContextParameter param : context.getContextParameterList()) {
|
||||
boolean found = false;
|
||||
IContextParameter paramCopy = null;
|
||||
for (int i = 0; i < contextCopy.getContextParameterList().size() & !found; i++) {
|
||||
paramCopy = contextCopy.getContextParameterList().get(i);
|
||||
if (param.getName().equals(paramCopy.getName())) {
|
||||
param.setInternalValue(paramCopy.getValue());
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
continueLaunch = false;
|
||||
}
|
||||
}
|
||||
return continueLaunch;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ public class ContextModeSelectPage extends WizardPage {
|
||||
|
||||
ContextPage contextPage = new ContextPage("test", contextManager, !isRepositoryObjectEditable); //$NON-NLS-1$
|
||||
contextPage.setTitle(Messages.getString("ContextWizard.contextPageTitle")); //$NON-NLS-1$
|
||||
contextPage.setDescription(Messages.getString("ContextWizard.contextPageDescription")); //$NON-NLS-1$
|
||||
contextPage.setDescription(Messages.getString("ContextWizard.defineContext.Description")); //$NON-NLS-1$
|
||||
dynamicPages.add(contextPage);
|
||||
contextPage.setPageComplete(true);
|
||||
contextPage.setWizard(getWizard());
|
||||
|
||||
@@ -214,7 +214,7 @@ public class ContextModeWizard extends CheckLastVersionRepositoryWizard implemen
|
||||
*/
|
||||
@Override
|
||||
public void addPages() {
|
||||
setWindowTitle(Messages.getString("ContextModeWizard.Title")); //$NON-NLS-1$
|
||||
setWindowTitle(Messages.getString("ContextModeWizard.CreateReuseTitle")); //$NON-NLS-1$
|
||||
contextModePage = new ContextModeSelectPage(contextManager, contextItem, connectionVariables, creation,
|
||||
isRepositoryObjectEditable(), pathToSave);
|
||||
addPage(contextModePage);
|
||||
@@ -357,7 +357,7 @@ public class ContextModeWizard extends CheckLastVersionRepositoryWizard implemen
|
||||
ITDQRepositoryService tdqRepService = null;
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(ITDQRepositoryService.class)) {
|
||||
tdqRepService =
|
||||
(ITDQRepositoryService) GlobalServiceRegister.getDefault().getService(
|
||||
GlobalServiceRegister.getDefault().getService(
|
||||
ITDQRepositoryService.class);
|
||||
}
|
||||
if (tdqRepService != null && CoreRuntimePlugin.getInstance().isDataProfilePerspectiveSelected()) {
|
||||
|
||||
@@ -194,7 +194,7 @@ public class ContextWizard extends CheckLastVersionRepositoryWizard implements I
|
||||
*/
|
||||
@Override
|
||||
public void addPages() {
|
||||
setWindowTitle(Messages.getString("ContextWizard.Title")); //$NON-NLS-1$
|
||||
setWindowTitle(Messages.getString("ContextWizard.createEditTitle")); //$NON-NLS-1$
|
||||
contextWizardPage0 = new Step0WizardPage(contextProperty, pathToSave, ERepositoryObjectType.CONTEXT,
|
||||
!isRepositoryObjectEditable(), creation);
|
||||
contextWizardPage0.setTitle(Messages.getString("ContextWizard.step0Title")); //$NON-NLS-1$
|
||||
@@ -206,7 +206,7 @@ public class ContextWizard extends CheckLastVersionRepositoryWizard implements I
|
||||
|
||||
ContextPage contextPage = new ContextPage("test", contextManager, !isRepositoryObjectEditable()); //$NON-NLS-1$
|
||||
contextPage.setTitle(Messages.getString("ContextWizard.contextPageTitle")); //$NON-NLS-1$
|
||||
contextPage.setDescription(Messages.getString("ContextWizard.contextPageDescription")); //$NON-NLS-1$
|
||||
contextPage.setDescription(Messages.getString("ContextWizard.defineContext.Description")); //$NON-NLS-1$
|
||||
addPage(contextPage);
|
||||
if (!isRepositoryObjectEditable()) {
|
||||
contextPage.setPageComplete(false);
|
||||
@@ -349,7 +349,7 @@ public class ContextWizard extends CheckLastVersionRepositoryWizard implements I
|
||||
// Refresh DQ view if it is on DQ perspective
|
||||
ITDQRepositoryService tdqRepService = null;
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(ITDQRepositoryService.class)) {
|
||||
tdqRepService = (ITDQRepositoryService) GlobalServiceRegister.getDefault()
|
||||
tdqRepService = GlobalServiceRegister.getDefault()
|
||||
.getService(ITDQRepositoryService.class);
|
||||
}
|
||||
if (tdqRepService != null) {
|
||||
|
||||
@@ -66,7 +66,7 @@ public class ShowRepositoryContextsPage extends WizardPage {
|
||||
|
||||
public ShowRepositoryContextsPage(Set<ContextItem> contextItems, int step) {
|
||||
super(Messages.getString("ReuseRepositoryContext.name")); //$NON-NLS-1$
|
||||
setTitle(Messages.getString("ShowRepositoryContextPage.title")); //$NON-NLS-1$
|
||||
setTitle(Messages.getString("ShowRepositoryContextPage.context.title")); //$NON-NLS-1$
|
||||
this.contextItemList = contextItems;
|
||||
this.step = step;
|
||||
}
|
||||
@@ -110,14 +110,14 @@ public class ShowRepositoryContextsPage extends WizardPage {
|
||||
setErrorMessage(null);
|
||||
} else {
|
||||
setPageComplete(false);
|
||||
setErrorMessage(Messages.getString("ShowRepositoryContextPage.warnMsg")); //$NON-NLS-1$
|
||||
setErrorMessage(Messages.getString("ShowRepositoryContextPage.context.warnMsg")); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void createDescriptionIn(Composite sashForm) {
|
||||
Text descriptionText = new Text(sashForm, SWT.BORDER | SWT.WRAP);
|
||||
descriptionText.setText(Messages.getString("ShowRepositoryContextPage.SelectReuseContext")); //$NON-NLS-1$
|
||||
descriptionText.setText(Messages.getString("ShowRepositoryContextPage.context.SelectReuseContext")); //$NON-NLS-1$
|
||||
descriptionText.setEditable(false);
|
||||
GridData gd = new GridData(GridData.FILL_BOTH);
|
||||
gd.widthHint = 100;
|
||||
@@ -126,7 +126,7 @@ public class ShowRepositoryContextsPage extends WizardPage {
|
||||
|
||||
private void createTreeViewer(Composite parent) {
|
||||
Group treeViewrGroup = new Group(parent, SWT.NONE);
|
||||
treeViewrGroup.setText(Messages.getString("ShowRepositoryContextPage.aviableContexts")); //$NON-NLS-1$
|
||||
treeViewrGroup.setText(Messages.getString("ShowRepositoryContextPage.context.aviableContexts")); //$NON-NLS-1$
|
||||
GridLayout layoutGroup = new GridLayout();
|
||||
layoutGroup.numColumns = 1;
|
||||
treeViewrGroup.setLayout(layoutGroup);
|
||||
|
||||
@@ -227,7 +227,7 @@ public class ContextSetsSelectionDialog extends SelectionDialog {
|
||||
inner.setLayoutData(gridData);
|
||||
|
||||
Group group = new Group(inner, SWT.NONE);
|
||||
group.setText(Messages.getString("ContextSetsSelectionDialog.ContextSets")); //$NON-NLS-1$
|
||||
group.setText(Messages.getString("ContextSetsSelectionDialog.ContextEnvironments")); //$NON-NLS-1$
|
||||
gridLayout = new GridLayout();
|
||||
gridLayout.horizontalSpacing = 10;
|
||||
group.setLayout(new GridLayout(2, false));
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<!-- Seems those 3 are not useful -->
|
||||
<classloader
|
||||
index="HIVE:HORTONWORKS:HDP_1_0:EMBEDDED"
|
||||
libraries="hive-hbase-handler-0.9.0.jar;hbase-0.92.0.jar;hadoop-core-1.0.3.jar;commons-logging-1.0.4.jar;datanucleus-api-jdo-3.0.7.jar;datanucleus-core-3.0.9.jar;datanucleus-rdbms-3.0.8.jar;hive-builtins-0.9.0.jar;hive-exec-0.9.0_hdp.jar;hive-jdbc-0.9.0_hdp.jar;hive-metastore-0.9.0_hdp.jar;hive-service-0.9.0_hdp.jar;libfb303-0.7.0.jar;libthrift-0.7.0.jar;commons-lang-2.4.jar;antlr-runtime-3.0.1.jar;commons-dbcp-1.4.jar;commons-pool-1.5.4.jar;derby-10.4.2.0.jar;commons-configuration2-2.8.0.jar;jdo2-api-2.3-ec.jar;reload4j-1.2.22.jar;slf4j-api-1.6.1.jar;slf4j-log4j12-1.6.1.jar;jackson-core-asl-1.8.8.jar;jackson-mapper-asl-1.8.8.jar">
|
||||
libraries="hive-hbase-handler-0.9.0.jar;hbase-0.92.0.jar;hadoop-core-1.0.3.jar;commons-logging-1.0.4.jar;datanucleus-api-jdo-3.0.7.jar;datanucleus-core-3.0.9.jar;datanucleus-rdbms-3.0.8.jar;hive-builtins-0.9.0.jar;hive-exec-0.9.0_hdp.jar;hive-jdbc-0.9.0_hdp.jar;hive-metastore-0.9.0_hdp.jar;hive-service-0.9.0_hdp.jar;libfb303-0.7.0.jar;libthrift-0.7.0.jar;commons-lang-2.4.jar;antlr-runtime-3.0.1.jar;commons-dbcp-1.4.jar;commons-pool-1.5.4.jar;derby-10.4.2.0.jar;commons-configuration2-2.9.0.jar;jdo2-api-2.3-ec.jar;reload4j-1.2.22.jar;slf4j-api-1.6.1.jar;slf4j-log4j12-1.6.1.jar;jackson-core-asl-1.8.8.jar;jackson-mapper-asl-1.8.8.jar">
|
||||
</classloader>
|
||||
<classloader
|
||||
index="HIVE:AMAZON_EMR:MapR_EMR:STANDALONE"
|
||||
@@ -86,14 +86,38 @@
|
||||
name="ojdbc6.jar"
|
||||
required="true">
|
||||
</libraryNeeded>
|
||||
<libraryNeeded
|
||||
context="plugin:org.talend.libraries.jdbc.oracle"
|
||||
language="java"
|
||||
message="Needed for Oracle jdbc plugin National Language Support (NLS)."
|
||||
mvn_uri="mvn:com.oracle.database.nls/orai18n/19.3.0.0/jar"
|
||||
name="orai18n-19.3.0.0.jar"
|
||||
required="true">
|
||||
</libraryNeeded>
|
||||
<libraryNeeded
|
||||
context="plugin:org.talend.libraries.jdbc.oracle"
|
||||
language="java"
|
||||
message="Needed for Oracle jdbc plugin National Language Support (NLS)."
|
||||
mvn_uri="mvn:com.oracle.database.nls/orai18n/19.3.0.0/jar"
|
||||
name="orai18n-19.3.0.0.jar"
|
||||
required="true">
|
||||
</libraryNeeded>
|
||||
<libraryNeeded
|
||||
context="plugin:org.talend.libraries.jdbc.oracle"
|
||||
language="java"
|
||||
message="Needed for Oracle SSL Support."
|
||||
mvn_uri="mvn:com.oracle.database.security/oraclepki/19.19.0.0/jar"
|
||||
name="oraclepki-19.19.0.0.jar"
|
||||
required="true">
|
||||
</libraryNeeded>
|
||||
<libraryNeeded
|
||||
context="plugin:org.talend.libraries.jdbc.oracle"
|
||||
language="java"
|
||||
message="Needed for Oracle SSL Support."
|
||||
mvn_uri="mvn:com.oracle.database.security/osdt_cert/19.19.0.0/jar"
|
||||
name="osdt_cert-19.19.0.0.jar"
|
||||
required="true">
|
||||
</libraryNeeded>
|
||||
<libraryNeeded
|
||||
context="plugin:org.talend.libraries.jdbc.oracle"
|
||||
language="java"
|
||||
message="Needed for Oracle SSL Support."
|
||||
mvn_uri="mvn:com.oracle.database.security/osdt_core/19.19.0.0/jar"
|
||||
name="osdt_core-19.19.0.0.jar"
|
||||
required="true">
|
||||
</libraryNeeded>
|
||||
<libraryNeeded
|
||||
context="plugin:org.talend.libraries.jdbc.as400"
|
||||
language="java"
|
||||
@@ -112,8 +136,8 @@
|
||||
context="PostgresPlus wizard"
|
||||
language="java"
|
||||
message="wizard for PostgresPlus"
|
||||
mvn_uri="mvn:org.postgresql/postgresql/42.2.26"
|
||||
name="postgresql-42.2.26.jar"
|
||||
mvn_uri="mvn:org.postgresql/postgresql/42.6.0"
|
||||
name="postgresql-42.6.0.jar"
|
||||
required="true">
|
||||
</libraryNeeded>
|
||||
<libraryNeeded
|
||||
|
||||
@@ -14,8 +14,11 @@ package org.talend.core.model.metadata.builder.database;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.nio.charset.Charset;
|
||||
import java.security.Provider;
|
||||
import java.sql.Connection;
|
||||
import java.sql.DatabaseMetaData;
|
||||
import java.sql.Driver;
|
||||
@@ -79,6 +82,7 @@ import org.talend.core.prefs.SSLPreferenceConstants;
|
||||
import org.talend.core.runtime.CoreRuntimePlugin;
|
||||
import org.talend.core.runtime.maven.MavenArtifact;
|
||||
import org.talend.core.runtime.maven.MavenUrlHelper;
|
||||
import org.talend.core.utils.ReflectionUtils;
|
||||
import org.talend.core.utils.TalendQuoteUtils;
|
||||
import org.talend.designer.core.IDesignerCoreService;
|
||||
import org.talend.metadata.managment.connection.manager.HiveConnectionManager;
|
||||
@@ -119,8 +123,12 @@ public class ExtractMetaDataUtils {
|
||||
|
||||
private boolean ignoreTimeout = false;
|
||||
|
||||
private String[] ORACLE_SSL_JARS = new String[] { "oraclepki-12.2.0.1.jar", "osdt_cert-12.2.0.1.jar", //$NON-NLS-1$//$NON-NLS-2$
|
||||
public static String[] ORACLE_SSL_JARS = new String[] { "oraclepki-12.2.0.1.jar", "osdt_cert-12.2.0.1.jar", //$NON-NLS-1$//$NON-NLS-2$
|
||||
"osdt_core-12.2.0.1.jar" }; //$NON-NLS-1$
|
||||
|
||||
public static String[] ORACLE_SSL_JARS_18_ABOVE =
|
||||
new String[] { "oraclepki-19.19.0.0.jar", "osdt_cert-19.19.0.0.jar", //$NON-NLS-1$//$NON-NLS-2$
|
||||
"osdt_core-19.19.0.0.jar" }; //$NON-NLS-1$
|
||||
|
||||
private String ORACLE_NLS_JARS = "orai18n-19.19.0.0.jar";
|
||||
|
||||
@@ -969,7 +977,12 @@ public class ExtractMetaDataUtils {
|
||||
if (EDatabaseTypeName.ORACLE_CUSTOM.getDisplayName().equals(dbType)
|
||||
&& StringUtils.isNotEmpty(additionalParams)) {
|
||||
if (additionalParams.contains(SSLPreferenceConstants.TRUSTSTORE_TYPE)) {
|
||||
driverNames.addAll(Arrays.asList(ORACLE_SSL_JARS));
|
||||
//check oracle version to add different jars, ORACLE_SSL_JARS or ORACLE_SSL_JARS_18_ABOVE
|
||||
if(EDatabaseVersion4Drivers.ORACLE_18.getVersionValue().equals(dbVersion)) {
|
||||
driverNames.addAll(Arrays.asList(ORACLE_SSL_JARS_18_ABOVE));
|
||||
} else {
|
||||
driverNames.addAll(Arrays.asList(ORACLE_SSL_JARS));
|
||||
}
|
||||
}
|
||||
|
||||
} else if (SNOWFLAKE.equals(dbType)) { // $NON-NLS-1$
|
||||
@@ -1213,6 +1226,11 @@ public class ExtractMetaDataUtils {
|
||||
if (systemCharset != null && systemCharset.displayName() != null) {
|
||||
info.put("charSet", systemCharset.displayName()); //$NON-NLS-1$
|
||||
}
|
||||
} else if (EDatabaseTypeName.ORACLE_CUSTOM.getDisplayName().equals(dbType)
|
||||
&& !additionalParams.isEmpty()
|
||||
&& additionalParams.contains(SSLPreferenceConstants.TRUSTSTORE_TYPE)) {
|
||||
// TDQ-21334 For tdqReportRun with Analysis on Custom_Oracle
|
||||
initOracleCustProperty(additionalParams, info);
|
||||
}
|
||||
connection = ((Driver) klazz.newInstance()).connect(url, info);
|
||||
} catch (ClassNotFoundException e) {
|
||||
@@ -1240,6 +1258,19 @@ public class ExtractMetaDataUtils {
|
||||
return conList;
|
||||
}
|
||||
|
||||
private void initOracleCustProperty(String additionalParams, Properties info)
|
||||
throws ClassNotFoundException, NoSuchMethodException, InstantiationException, IllegalAccessException,
|
||||
InvocationTargetException, IOException {
|
||||
System.setProperty("jsse.enableCBCProtection", "false");//$NON-NLS-1$//$NON-NLS-2$
|
||||
Object pki = ReflectionUtils.newInstance("oracle.security.pki.OraclePKIProvider", //$NON-NLS-1$
|
||||
this.getClass().getClassLoader(),
|
||||
new Object[] {});
|
||||
ReflectionUtils.invokeStaticMethod("java.security.Security", "insertProviderAt", //$NON-NLS-1$//$NON-NLS-2$
|
||||
new Object[] { pki, 3 }, Provider.class, int.class);
|
||||
additionalParams = additionalParams.replaceAll("&", "\n");//$NON-NLS-1$//$NON-NLS-2$
|
||||
info.load(new java.io.ByteArrayInputStream(additionalParams.getBytes()));
|
||||
}
|
||||
|
||||
private void setDriverPath(ILibraryManagerService librairesManagerService, List<String> jarPathList, String mvnURI)
|
||||
throws Exception {
|
||||
if (mvnURI != null) {
|
||||
|
||||
@@ -149,6 +149,13 @@ public class JDBCDriverLoader {
|
||||
Connection connection = null;
|
||||
try {
|
||||
HotClassLoader loader = (HotClassLoader) classLoadersMap.get(dbType, dbVersion);
|
||||
if(loader != null) {//for example, oracle custom connection, using ssl or not using different jars
|
||||
URL[] urLs = loader.getURLs();
|
||||
if(urLs != null && jarPath != null && urLs.length != jarPath.length) {
|
||||
driverShimCacheMap.remove(driverClassName, dbType, dbVersion);
|
||||
driverShimCacheMap.remove(driverClassName, dbType, dbVersion);
|
||||
}
|
||||
}
|
||||
if(driverShimCacheMap.containsKey(driverClassName, dbType, dbVersion)) {
|
||||
wapperDriver = (DriverShim) driverShimCacheMap.get(driverClassName, dbType, dbVersion);
|
||||
} else {
|
||||
|
||||
@@ -14,6 +14,7 @@ package org.talend.core.model.metadata.builder.database;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
|
||||
@@ -27,12 +28,14 @@ import org.talend.core.IRepositoryContextService;
|
||||
import org.talend.core.database.conn.ConnParameterKeys;
|
||||
import org.talend.core.database.conn.DatabaseConnStrUtil;
|
||||
import org.talend.core.database.conn.HiveConfKeysForTalend;
|
||||
import org.talend.core.model.context.ContextUtils;
|
||||
import org.talend.core.model.metadata.builder.connection.Connection;
|
||||
import org.talend.core.model.metadata.builder.connection.DatabaseConnection;
|
||||
import org.talend.core.model.metadata.builder.connection.DelimitedFileConnection;
|
||||
import org.talend.core.model.metadata.builder.connection.MDMConnection;
|
||||
import org.talend.core.model.metadata.builder.database.dburl.SupportDBUrlStore;
|
||||
import org.talend.core.model.metadata.builder.database.dburl.SupportDBUrlType;
|
||||
import org.talend.core.model.process.IContext;
|
||||
import org.talend.core.model.process.IContextParameter;
|
||||
import org.talend.core.repository.model.ProxyRepositoryFactory;
|
||||
import org.talend.core.runtime.CoreRuntimePlugin;
|
||||
@@ -81,8 +84,8 @@ public final class JavaSqlFactory {
|
||||
return contextGroupName + "-" + uniqueId + "-" + variableName; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
|
||||
public static void savePromptConVars2Cache(Connection conn, IContextParameter param) {
|
||||
if (param != null && param.isPromptNeeded()) {
|
||||
public static void savePromptConVars2Cache(Connection conn, IContextParameter param, List<IContext> iContexts) {
|
||||
if (param != null && (param.isPromptNeeded() || ContextUtils.isPromptNeeded(iContexts, param.getName()))) {
|
||||
String promptConVarsMapKey = getPromptConVarsMapKey(conn, "context." + param.getName()); //$NON-NLS-1$
|
||||
String paramValue = param.getValue();
|
||||
if (PasswordEncryptUtil.isPasswordType(param.getType())) {
|
||||
@@ -102,8 +105,9 @@ public final class JavaSqlFactory {
|
||||
}
|
||||
}
|
||||
|
||||
public static void saveReportPromptConVars2Cache(String groupName, IContextParameter param) {
|
||||
if (param != null && param.isPromptNeeded()) {
|
||||
public static void saveReportPromptConVars2Cache(String groupName, IContextParameter param,
|
||||
List<IContext> iContexts) {
|
||||
if (param != null && (param.isPromptNeeded() || ContextUtils.isPromptNeeded(iContexts, param.getName()))) {
|
||||
String promptConVarsMapKey =
|
||||
getPromptConVarsMapKey(groupName, param.getSource(), "context." + param.getName()); //$NON-NLS-1$
|
||||
String paramValue = param.getValue();
|
||||
|
||||
@@ -47,6 +47,7 @@ import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.IRepositoryContextService;
|
||||
import org.talend.core.database.EDatabase4DriverClassName;
|
||||
import org.talend.core.database.EDatabaseTypeName;
|
||||
import org.talend.core.database.conn.ConnParameterKeys;
|
||||
import org.talend.core.database.conn.version.EDatabaseVersion4Drivers;
|
||||
import org.talend.core.model.context.ContextUtils;
|
||||
import org.talend.core.model.metadata.IMetadataConnection;
|
||||
@@ -530,11 +531,17 @@ public class MetadataConnectionUtils {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isOracleCustomSSL(Connection connection) {
|
||||
/**
|
||||
* Judge if Oracle custom version supports SSL
|
||||
*
|
||||
* @param connection
|
||||
* @return
|
||||
*/
|
||||
public static boolean isOracleCustomSupportSSL(Connection connection) {
|
||||
if (connection != null && connection instanceof DatabaseConnection) {
|
||||
DatabaseConnection dbConn = (DatabaseConnection) connection;
|
||||
if (EDatabaseTypeName.ORACLE_CUSTOM.getDisplayName().equals(dbConn.getDatabaseType())) {
|
||||
if (EDatabaseVersion4Drivers.ORACLE_12.name().equals(dbConn.getDbVersionString())) {
|
||||
if (EDatabaseVersion4Drivers.ORACLE_12.name().equals(dbConn.getDbVersionString()) || EDatabaseVersion4Drivers.ORACLE_18.name().equals(dbConn.getDbVersionString())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -542,6 +549,20 @@ public class MetadataConnectionUtils {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Judge if it is Oracle custom and selects SSL
|
||||
*
|
||||
* @param connection
|
||||
* @return
|
||||
*/
|
||||
public static boolean isOracleCustomSSLUsed(Connection connection) {
|
||||
if (isOracleCustomSupportSSL(connection)) {
|
||||
DatabaseConnection dbConn = (DatabaseConnection) connection;
|
||||
return Boolean.parseBoolean(dbConn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_USE_SSL));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static Map<String, String> getSnowflakeDBTypeMap(){
|
||||
if(SNOWFLACK_DBTYPEMap.isEmpty()){
|
||||
SNOWFLACK_DBTYPEMap.put("TIMESTAMPLTZ", "TIMESTAMP_LTZ");
|
||||
@@ -1469,12 +1490,18 @@ public class MetadataConnectionUtils {
|
||||
// only when have context
|
||||
if (jobContext != null) {
|
||||
boolean promptConfirmLauch = false;
|
||||
List<IContext> iContextLs = new ArrayList<IContext>();
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IMetadataManagmentUiService.class)) {
|
||||
IMetadataManagmentUiService mmUIService = GlobalServiceRegister.getDefault()
|
||||
.getService(IMetadataManagmentUiService.class);
|
||||
Shell shell = PlatformUI.getWorkbench().getDisplay().getActiveShell();
|
||||
if (isDefaultContext) {
|
||||
promptConfirmLauch = mmUIService.promptConfirmLauch(shell, jobContext);
|
||||
List<ContextType> contexts = contextItem.getContext();
|
||||
for (ContextType contxType : contexts) {
|
||||
IContext context = ContextUtils.convert2IContext(contxType);
|
||||
iContextLs.add(context);
|
||||
}
|
||||
promptConfirmLauch = mmUIService.promptConfirmLauchIterateContexts(shell, iContextLs, jobContext);
|
||||
} else {
|
||||
promptConfirmLauch = mmUIService.promptConfirmLauch(shell, copyConnection, contextItem);
|
||||
}
|
||||
@@ -1485,7 +1512,7 @@ public class MetadataConnectionUtils {
|
||||
if (isDefaultContext) {
|
||||
// save the input prompt context values to cache
|
||||
for (IContextParameter param : jobContext.getContextParameterList()) {
|
||||
JavaSqlFactory.savePromptConVars2Cache(connection, param);
|
||||
JavaSqlFactory.savePromptConVars2Cache(connection, param, iContextLs);
|
||||
}
|
||||
// set the input values to connection
|
||||
JavaSqlFactory.setPromptContextValues(copyConnection);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Manifest-Version: 1.0
|
||||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: %pluginName
|
||||
Bundle-SymbolicName: org.talend.model;singleton:=true
|
||||
|
||||
@@ -284,6 +284,14 @@
|
||||
<details key="namespace" value="##targetNamespace"/>
|
||||
</eAnnotations>
|
||||
</eStructuralFeatures>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="hide" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//Boolean"
|
||||
unsettable="true">
|
||||
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
|
||||
<details key="kind" value="attribute"/>
|
||||
<details key="name" value="confirmationNeeded"/>
|
||||
<details key="namespace" value="##targetNamespace"/>
|
||||
</eAnnotations>
|
||||
</eStructuralFeatures>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
|
||||
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
|
||||
<details key="kind" value="attribute"/>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user