Compare commits
5 Commits
mhryb/test
...
patch/TPS-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2a68d00a4f | ||
|
|
1b43a5c3de | ||
|
|
0ac599445e | ||
|
|
442a56135c | ||
|
|
ff737a0897 |
48
PATCH_RELEASE_NOTE.md
Normal file
48
PATCH_RELEASE_NOTE.md
Normal file
@@ -0,0 +1,48 @@
|
||||
---
|
||||
version: 8.0.1
|
||||
module: https://talend.poolparty.biz/coretaxonomy/42
|
||||
product:
|
||||
- https://talend.poolparty.biz/coretaxonomy/183
|
||||
- https://talend.poolparty.biz/coretaxonomy/23
|
||||
---
|
||||
|
||||
# TPS-5506
|
||||
|
||||
| Info | Value |
|
||||
| ---------------- |-------------------------------------|
|
||||
| Patch Name | Patch\_20230515\_TPS-5506\_v1-8.0.1 |
|
||||
| Release date | 2023-05-15 |
|
||||
| Target version | 20211109\_1610-8.0.1 |
|
||||
| Product affected | Talend Studio |
|
||||
|
||||
## Introduction
|
||||
|
||||
This is a self-contained patch.
|
||||
|
||||
**NOTE**: For information on how to obtain this patch, reach out to your Support contact at Talend.
|
||||
|
||||
## Fixed issues
|
||||
|
||||
This patch contains the following fix:
|
||||
|
||||
- TDI-49752 [8.0.1] tMap performance issue after migration to v8.0
|
||||
|
||||
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Consider the following requirements for your system:
|
||||
|
||||
- Must install Talend Studio 8.0.1 with the monthly released patch, Patch\_20230421\_R2023-04\_v1-8.0.1.zip.
|
||||
- Or must update the Talend Studio 8.0.1 with the URL, https://update.talend.com/Studio/8/updates/R2023-04/.
|
||||
|
||||
## Installation
|
||||
|
||||
Installation On Studio:
|
||||
|
||||
1. Shut down Talend studio if it is opened.
|
||||
2. Extract the zip.
|
||||
3. Merge the folder "plugins" and its content to "{studio}/plugins" and overwrite the existing files.
|
||||
4. remove the folder "{studio}/configuration/org.eclipse.osgi".
|
||||
5. Start the Talend studio.
|
||||
6. Rebuild your jobs.
|
||||
@@ -1098,7 +1098,8 @@ public static class <%=conn.getName() %>Struct<%=templateOrigin %> implements ro
|
||||
<%
|
||||
} else if(javaType.isObjectBased() || typeToGenerate.equals("Geometry") || typeToGenerate.equals("Dynamic")) {
|
||||
%>
|
||||
dos.writeObject(this.<%=column.getLabel() %>);
|
||||
dos.clearInstanceCache();
|
||||
dos.writeObject(this.<%=column.getLabel() %>);
|
||||
<%
|
||||
} else {
|
||||
typeToGenerate =JavaTypesManager.getTypeToGenerate(column.getTalendType(), false);
|
||||
@@ -1430,7 +1431,8 @@ public static class <%=conn.getName() %>Struct<%=templateOrigin %> implements ro
|
||||
<%
|
||||
} else if(typeToGenerate.equals("Object") || typeToGenerate.equals("Geometry") || typeToGenerate.equals("BigDecimal") || typeToGenerate.equals("List") || typeToGenerate.equals("Dynamic") || typeToGenerate.equals("Document")) {
|
||||
%>
|
||||
objectOut.writeObject(this.<%=column.getLabel() %>);
|
||||
objectOut.clearInstanceCache();
|
||||
objectOut.writeObject(this.<%=column.getLabel() %>);
|
||||
<%
|
||||
} else {
|
||||
typeToGenerate =JavaTypesManager.getTypeToGenerate(column.getTalendType(), false);
|
||||
|
||||
@@ -876,7 +876,6 @@ for (int iInputTable = 0; iInputTable < sizeInputTables - 1; iInputTable++) { //
|
||||
hasAtLeastOneObjectType = true;
|
||||
%>
|
||||
this.<%= connection.getName() %>__<%= column.getLabel() %> = (<%= typeToGenerate %>) objectIn.readObject();
|
||||
|
||||
<%
|
||||
} else {
|
||||
typeToGenerate = JavaTypesManager.getTypeToGenerate(column.getTalendType(), false);
|
||||
@@ -961,7 +960,6 @@ for (int iInputTable = 0; iInputTable < sizeInputTables - 1; iInputTable++) { //
|
||||
hasAtLeastOneObjectType = true;
|
||||
%>
|
||||
this.exprKey_<%= nextInputTable.getName() %>__<%= column.getLabel() %> = (<%= typeToGenerate %>) objectIn.readObject();
|
||||
|
||||
<%
|
||||
} else {
|
||||
typeToGenerate = JavaTypesManager.getTypeToGenerate(column.getTalendType(), false);
|
||||
@@ -1236,7 +1234,8 @@ for (int iInputTable = 0; iInputTable < sizeInputTables - 1; iInputTable++) { //
|
||||
<%
|
||||
} else if(("Object").equals(typeToGenerate) || ("BigDecimal").equals(typeToGenerate) || ("List").equals(typeToGenerate)) {
|
||||
%>
|
||||
objectOut.writeObject(this.<%= connection.getName() %>__<%= column.getLabel() %>);
|
||||
objectOut.clearInstanceCache();
|
||||
objectOut.writeObject(this.<%= connection.getName() %>__<%= column.getLabel() %>);
|
||||
<%
|
||||
} else {
|
||||
typeToGenerate =JavaTypesManager.getTypeToGenerate(column.getTalendType(), false);
|
||||
@@ -1249,6 +1248,7 @@ for (int iInputTable = 0; iInputTable < sizeInputTables - 1; iInputTable++) { //
|
||||
<%
|
||||
if ("Dynamic".equals(typeToGenerate)) {
|
||||
%>
|
||||
objectOut.clearInstanceCache();
|
||||
objectOut.writeObject(this.<%= connection.getName() %>__<%= column.getLabel() %>);
|
||||
<%
|
||||
} else {
|
||||
@@ -1307,7 +1307,8 @@ for (int iInputTable = 0; iInputTable < sizeInputTables - 1; iInputTable++) { //
|
||||
<%
|
||||
} else if(("Object").equals(typeToGenerate) || ("BigDecimal").equals(typeToGenerate) || ("List").equals(typeToGenerate)) {
|
||||
%>
|
||||
objectOut.writeObject(this.exprKey_<%= nextInputTable.getName() %>__<%= column.getLabel() %>);
|
||||
objectOut.clearInstanceCache();
|
||||
objectOut.writeObject(this.exprKey_<%= nextInputTable.getName() %>__<%= column.getLabel() %>);
|
||||
<%
|
||||
} else {
|
||||
typeToGenerate =JavaTypesManager.getTypeToGenerate(column.getTalendType(), false);
|
||||
@@ -1320,6 +1321,7 @@ for (int iInputTable = 0; iInputTable < sizeInputTables - 1; iInputTable++) { //
|
||||
<%
|
||||
if ("Dynamic".equals(typeToGenerate)) {
|
||||
%>
|
||||
objectOut.clearInstanceCache();
|
||||
objectOut.writeObject(this.exprKey_<%= nextInputTable.getName() %>__<%= column.getLabel() %>);
|
||||
<%
|
||||
} else {
|
||||
|
||||
@@ -8,6 +8,7 @@ import java.util.Map.Entry;
|
||||
|
||||
import org.eclipse.draw2d.ActionEvent;
|
||||
import org.eclipse.draw2d.ActionListener;
|
||||
import org.eclipse.draw2d.Border;
|
||||
import org.eclipse.draw2d.ColorConstants;
|
||||
import org.eclipse.draw2d.Figure;
|
||||
import org.eclipse.draw2d.FreeformLayout;
|
||||
@@ -22,9 +23,13 @@ import org.eclipse.draw2d.ToolbarLayout;
|
||||
import org.eclipse.draw2d.geometry.Dimension;
|
||||
import org.eclipse.draw2d.geometry.Point;
|
||||
import org.eclipse.draw2d.geometry.Rectangle;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.graphics.Image;
|
||||
import org.eclipse.swt.graphics.LineAttributes;
|
||||
import org.eclipse.swt.graphics.RGB;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.talend.commons.ui.runtime.ITalendThemeService;
|
||||
import org.talend.commons.ui.runtime.image.ECoreImage;
|
||||
import org.talend.commons.ui.runtime.image.EImage;
|
||||
import org.talend.commons.ui.runtime.image.ImageProvider;
|
||||
@@ -46,6 +51,18 @@ public class JobletContainerFigure extends Figure {
|
||||
public static final String KEY_REDUCE = "reduce_"; //$NON-NLS-1$
|
||||
|
||||
public static final String KEY_MAP = "map_"; //$NON-NLS-1$
|
||||
|
||||
protected Color JOBLET_NORMAL_BG=ITalendThemeService.getColor("JOBLET_NORMAL_BG")
|
||||
.orElse(Display.getDefault().getSystemColor(SWT.COLOR_GREEN));
|
||||
|
||||
protected Color JOBLET_HIDDEN_BG=ITalendThemeService.getColor("JOBLET_HIDDEN_BG")
|
||||
.orElse(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
|
||||
|
||||
protected Color JOBLET_PROBLEM_BG=ITalendThemeService.getColor("JOBLET_PROBLEM_BG")
|
||||
.orElse(Display.getDefault().getSystemColor(SWT.COLOR_RED));
|
||||
|
||||
protected Color JOBLET_BORDER_FG=ITalendThemeService.getColor("JOBLET_BORDER_FG")
|
||||
.orElse(Display.getDefault().getSystemColor(SWT.COLOR_DARK_GREEN));
|
||||
|
||||
private ImageFigure errorFigure, warningFigure;
|
||||
|
||||
@@ -69,13 +86,13 @@ public class JobletContainerFigure extends Figure {
|
||||
|
||||
private String title;
|
||||
|
||||
private RGB red = new RGB(250, 72, 80);
|
||||
private RGB problemBG = JOBLET_PROBLEM_BG.getRGB();
|
||||
|
||||
private RGB green = new RGB(130, 240, 100);
|
||||
private RGB normalBG = JOBLET_NORMAL_BG.getRGB();
|
||||
|
||||
private RGB mrGroupColor = null;
|
||||
private RGB jobletColor = null;
|
||||
|
||||
private RGB white = new RGB(255, 255, 255);
|
||||
private RGB hiddenBG = JOBLET_HIDDEN_BG.getRGB();
|
||||
|
||||
private Map<String, SimpleHtmlFigure> mrFigures = new HashMap<String, SimpleHtmlFigure>();
|
||||
|
||||
@@ -106,6 +123,7 @@ public class JobletContainerFigure extends Figure {
|
||||
outlineFigure = new RoundedRectangle();
|
||||
rectFig = new GreenRectangle();
|
||||
rectFig.setAlpha(ALPHA_VALUE);
|
||||
|
||||
titleFigure = new SimpleHtmlFigure();
|
||||
collapseFigure = new JobletCollapseFigure();
|
||||
|
||||
@@ -187,6 +205,12 @@ public class JobletContainerFigure extends Figure {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private LineAttributes getLineAttr() {
|
||||
LineAttributes attr = new LineAttributes(2.0f);
|
||||
attr.style = SWT.LINE_DASH;
|
||||
return attr;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
@@ -247,12 +271,12 @@ public class JobletContainerFigure extends Figure {
|
||||
|
||||
if (rectFig != null) {
|
||||
if (isSubjobDisplay) {
|
||||
Color color = ColorUtils.getCacheColor(mrGroupColor);
|
||||
Color color = ColorUtils.getCacheColor(jobletColor);
|
||||
if (rectFig.getBackgroundColor() == null || !rectFig.getBackgroundColor().equals(color)) {
|
||||
rectFig.setBackgroundColor(color);
|
||||
}
|
||||
} else {
|
||||
Color color = ColorUtils.getCacheColor(white);
|
||||
Color color = ColorUtils.getCacheColor(hiddenBG);
|
||||
if (rectFig.getBackgroundColor() == null || !rectFig.getBackgroundColor().equals(color)) {
|
||||
rectFig.setBackgroundColor(color);
|
||||
}
|
||||
@@ -353,20 +377,20 @@ public class JobletContainerFigure extends Figure {
|
||||
lastJobletRedState = isRed;
|
||||
if (isSubjobDisplay) {
|
||||
if (isRed && rectFig != null) {
|
||||
rectFig.setBackgroundColor(ColorUtils.getCacheColor(red));
|
||||
rectFig.setBackgroundColor(ColorUtils.getCacheColor(problemBG));
|
||||
} else if (rectFig != null) {
|
||||
rectFig.setBackgroundColor(ColorUtils.getCacheColor(green));
|
||||
rectFig.setBackgroundColor(ColorUtils.getCacheColor(normalBG));
|
||||
}
|
||||
} else {
|
||||
if (rectFig != null) {
|
||||
rectFig.setBackgroundColor(ColorUtils.getCacheColor(white));
|
||||
rectFig.setBackgroundColor(ColorUtils.getCacheColor(hiddenBG));
|
||||
}
|
||||
}
|
||||
|
||||
if (isRed && outlineFigure != null) {
|
||||
outlineFigure.setBackgroundColor(ColorUtils.getCacheColor(red));
|
||||
outlineFigure.setBackgroundColor(ColorUtils.getCacheColor(problemBG));
|
||||
} else if (outlineFigure != null) {
|
||||
outlineFigure.setBackgroundColor(ColorUtils.getCacheColor(green));
|
||||
outlineFigure.setBackgroundColor(ColorUtils.getCacheColor(normalBG));
|
||||
}
|
||||
|
||||
if (!jobletContainer.isCollapsed()) {
|
||||
@@ -402,7 +426,8 @@ public class JobletContainerFigure extends Figure {
|
||||
|
||||
outlineFigure.setLocation(new Point(location.x, location.y));
|
||||
outlineFigure.setVisible(showTitle);
|
||||
outlineFigure.setForegroundColor(ColorUtils.getCacheColor(new RGB(220, 120, 120)));
|
||||
outlineFigure.setLineAttributes(getLineAttr());
|
||||
outlineFigure.setForegroundColor(JOBLET_BORDER_FG);
|
||||
outlineFigure.setSize(rectangle.width, preferedSize.height);
|
||||
|
||||
refreshMRFigures();
|
||||
@@ -472,26 +497,26 @@ public class JobletContainerFigure extends Figure {
|
||||
if (this.jobletContainer.getNode().isJoblet()) {
|
||||
if (new JobletUtil().isRed(this.jobletContainer)) {
|
||||
if (isSubjobDisplay) {
|
||||
rectFig.setBackgroundColor(ColorUtils.getCacheColor(red));
|
||||
rectFig.setBackgroundColor(ColorUtils.getCacheColor(problemBG));
|
||||
} else {
|
||||
rectFig.setBackgroundColor(ColorUtils.getCacheColor(white));
|
||||
rectFig.setBackgroundColor(ColorUtils.getCacheColor(hiddenBG));
|
||||
}
|
||||
outlineFigure.setBackgroundColor(ColorUtils.getCacheColor(red));
|
||||
outlineFigure.setBackgroundColor(ColorUtils.getCacheColor(problemBG));
|
||||
} else {
|
||||
if (isSubjobDisplay) {
|
||||
rectFig.setBackgroundColor(ColorUtils.getCacheColor(green));
|
||||
rectFig.setBackgroundColor(ColorUtils.getCacheColor(normalBG));
|
||||
} else {
|
||||
rectFig.setBackgroundColor(ColorUtils.getCacheColor(white));
|
||||
rectFig.setBackgroundColor(ColorUtils.getCacheColor(hiddenBG));
|
||||
}
|
||||
outlineFigure.setBackgroundColor(ColorUtils.getCacheColor(green));
|
||||
outlineFigure.setBackgroundColor(ColorUtils.getCacheColor(normalBG));
|
||||
}
|
||||
} else {
|
||||
if (isSubjobDisplay) {
|
||||
rectFig.setBackgroundColor(ColorUtils.getCacheColor(mrGroupColor));
|
||||
rectFig.setBackgroundColor(ColorUtils.getCacheColor(jobletColor));
|
||||
} else {
|
||||
rectFig.setBackgroundColor(ColorUtils.getCacheColor(white));
|
||||
rectFig.setBackgroundColor(ColorUtils.getCacheColor(hiddenBG));
|
||||
}
|
||||
outlineFigure.setBackgroundColor(ColorUtils.getCacheColor(mrGroupColor));
|
||||
outlineFigure.setBackgroundColor(ColorUtils.getCacheColor(jobletColor));
|
||||
// progressFigure.setBackgroundColor(new Color(Display.getDefault(), red));
|
||||
if (!this.jobletContainer.getNode().isMapReduceStart()) {
|
||||
rectFig.setVisible(false);
|
||||
@@ -506,7 +531,7 @@ public class JobletContainerFigure extends Figure {
|
||||
rectFig.setForegroundColor(ColorUtils.getCacheColor(new RGB(220, 120, 120)));
|
||||
}
|
||||
} else {
|
||||
rectFig.setForegroundColor(ColorUtils.getCacheColor(white));
|
||||
rectFig.setForegroundColor(ColorUtils.getCacheColor(hiddenBG));
|
||||
}
|
||||
markFigure.setSize(errorMarkImage.getImageData().width, errorMarkImage.getImageData().height);
|
||||
}
|
||||
@@ -787,22 +812,12 @@ public class JobletContainerFigure extends Figure {
|
||||
}
|
||||
|
||||
private void initJobletContainerColor() {
|
||||
if (this.jobletContainer.getNode().isMapReduce()) {
|
||||
RGB defaultSubjobColor = DesignerColorUtils.getPreferenceMRGroupRGB(DesignerColorUtils.MRGROUP_COLOR_NAME,
|
||||
DesignerColorUtils.MR_COLOR);
|
||||
if (defaultSubjobColor != null) {
|
||||
mrGroupColor = defaultSubjobColor;
|
||||
} else {
|
||||
mrGroupColor = green;
|
||||
}
|
||||
RGB defaultSubjobColor = DesignerColorUtils.getPreferenceJobletRGB(DesignerColorUtils.JOBLET_COLOR_NAME,
|
||||
DesignerColorUtils.JOBLET_COLOR);
|
||||
if (defaultSubjobColor != null) {
|
||||
jobletColor = defaultSubjobColor;
|
||||
} else {
|
||||
RGB defaultSubjobColor = DesignerColorUtils.getPreferenceMRGroupRGB(DesignerColorUtils.JOBLET_COLOR_NAME,
|
||||
DesignerColorUtils.JOBLET_COLOR);
|
||||
if (defaultSubjobColor != null) {
|
||||
mrGroupColor = defaultSubjobColor;
|
||||
} else {
|
||||
mrGroupColor = green;
|
||||
}
|
||||
jobletColor = normalBG;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -873,6 +888,14 @@ public class JobletContainerFigure extends Figure {
|
||||
public void setShowCompareMark(boolean showCompareMark) {
|
||||
this.showCompareMark = showCompareMark;
|
||||
}
|
||||
|
||||
public Border getBorder() {
|
||||
LineBorder lb = new LineBorder();
|
||||
lb.setStyle(SWT.LINE_DASH);
|
||||
lb.setWidth(2);
|
||||
lb.setColor(JOBLET_BORDER_FG);
|
||||
return lb;
|
||||
}
|
||||
|
||||
public void setInfoHint(String hintText) {
|
||||
if (infoFigure.isVisible()) {
|
||||
|
||||
@@ -14,16 +14,21 @@ package org.talend.designer.core.ui.editor.subjobcontainer;
|
||||
|
||||
import org.eclipse.draw2d.ActionEvent;
|
||||
import org.eclipse.draw2d.ActionListener;
|
||||
import org.eclipse.draw2d.Border;
|
||||
import org.eclipse.draw2d.Figure;
|
||||
import org.eclipse.draw2d.FreeformLayout;
|
||||
import org.eclipse.draw2d.Graphics;
|
||||
import org.eclipse.draw2d.LineBorder;
|
||||
import org.eclipse.draw2d.RoundedRectangle;
|
||||
import org.eclipse.draw2d.geometry.Dimension;
|
||||
import org.eclipse.draw2d.geometry.Point;
|
||||
import org.eclipse.draw2d.geometry.Rectangle;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.graphics.LineAttributes;
|
||||
import org.eclipse.swt.graphics.RGB;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.talend.commons.ui.runtime.ITalendThemeService;
|
||||
import org.talend.commons.ui.utils.image.ColorUtils;
|
||||
import org.talend.commons.ui.utils.workbench.gef.SimpleHtmlFigure;
|
||||
import org.talend.core.model.process.IElementParameter;
|
||||
@@ -34,6 +39,10 @@ import org.talend.designer.core.utils.DesignerColorUtils;
|
||||
* DOC nrousseau class global comment. Detailled comment
|
||||
*/
|
||||
public class SubjobContainerFigure extends Figure {
|
||||
|
||||
|
||||
protected Color SUBJOB_BORDER_FG=ITalendThemeService.getColor("SUBJOB_BORDER_FG")
|
||||
.orElse(Display.getDefault().getSystemColor(SWT.COLOR_DARK_GREEN));
|
||||
|
||||
protected SubjobContainer subjobContainer;
|
||||
|
||||
@@ -75,8 +84,8 @@ public class SubjobContainerFigure extends Figure {
|
||||
* DOC rdubois Comment method "initFigure".
|
||||
*/
|
||||
protected void initFigure() {
|
||||
outlineFigure = new RoundedRectangle();
|
||||
rectFig = new RoundedRectangle();
|
||||
outlineFigure = new RoundedRectangle();
|
||||
rectFig = new RoundedRectangle();
|
||||
titleFigure = new SimpleHtmlFigure();
|
||||
//titleFigure.setOpaque(true);
|
||||
collapseFigure = new SubjobCollapseFigure();
|
||||
@@ -102,7 +111,8 @@ public class SubjobContainerFigure extends Figure {
|
||||
}
|
||||
RGB defaultSubjobColor = DesignerColorUtils.getPreferenceSubjobRGB(DesignerColorUtils.SUBJOB_TITLE_COLOR_NAME,
|
||||
DesignerColorUtils.SUBJOB_TITLE_COLOR);
|
||||
if (colorParameter.getValue() == null) {
|
||||
if (colorParameter.getValue() == null || DesignerColorUtils
|
||||
.isForbiddenSubjobColor(EParameterName.SUBJOB_TITLE_COLOR.getName(), (String) colorParameter.getValue())) {
|
||||
subjobTitleColor = defaultSubjobColor;
|
||||
String colorValue = ColorUtils.getRGBValue(subjobTitleColor);
|
||||
colorParameter.setValue(colorValue);
|
||||
@@ -124,7 +134,6 @@ public class SubjobContainerFigure extends Figure {
|
||||
}
|
||||
|
||||
public void initializeSubjobContainer(Rectangle rectangle) {
|
||||
disposeColors();
|
||||
Point location = this.getLocation();
|
||||
collapseFigure.setCollapsed(subjobContainer.isCollapsed());
|
||||
|
||||
@@ -144,27 +153,16 @@ public class SubjobContainerFigure extends Figure {
|
||||
// collapseFigure.setLocation(new Point(rectangle.width - preferedSize.height + location.x, location.y));
|
||||
collapseFigure.setLocation(new Point(location.x, location.y));
|
||||
collapseFigure.setSize(preferedSize.height, preferedSize.height);
|
||||
// collapseFigure.setBackgroundColor(new Color(null, 50, 50, 250));
|
||||
//collapseFigure.setBackgroundColor(new Color(null, 50, 50, 250));
|
||||
|
||||
rectFig.setLocation(new Point(location.x, /* preferedSize.height + */location.y));
|
||||
rectFig.setSize(new Dimension(rectangle.width, rectangle.height /*- preferedSize.height*/));
|
||||
rectFig.setBackgroundColor(new Color(Display.getDefault(), mainColor));// //////////////////////////
|
||||
rectFig.setForegroundColor(new Color(Display.getDefault(), subjobTitleColor));
|
||||
}
|
||||
|
||||
public void disposeColors() {
|
||||
if (rectFig.getForegroundColor() != null && !rectFig.getForegroundColor().isDisposed()) {
|
||||
rectFig.getForegroundColor().dispose();
|
||||
}
|
||||
if (rectFig.getBackgroundColor() != null && !rectFig.getBackgroundColor().isDisposed()) {
|
||||
rectFig.getBackgroundColor().dispose();
|
||||
}
|
||||
if (outlineFigure.getForegroundColor() != null && !outlineFigure.getForegroundColor().isDisposed()) {
|
||||
outlineFigure.getForegroundColor().dispose();
|
||||
}
|
||||
if (outlineFigure.getBackgroundColor() != null && !outlineFigure.getBackgroundColor().isDisposed()) {
|
||||
outlineFigure.getBackgroundColor().dispose();
|
||||
}
|
||||
// if (isJobletContainer()) {
|
||||
// rectFig.setLineAttributes(getLineAttr());
|
||||
// rectFig.setForegroundColor(SUBJOB_BORDER_FG);
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -263,4 +261,29 @@ public class SubjobContainerFigure extends Figure {
|
||||
// TODO Auto-generated method stub
|
||||
super.setSize(w, h);
|
||||
}
|
||||
|
||||
private LineAttributes getLineAttr() {
|
||||
LineAttributes attr = new LineAttributes(2.0f);
|
||||
attr.style = SWT.LINE_SOLID;
|
||||
return attr;
|
||||
}
|
||||
|
||||
private boolean isJobletContainer() {
|
||||
if (subjobContainer != null && subjobContainer.getSubjobStartNode() != null
|
||||
&& (!subjobContainer.getSubjobStartNode().isJoblet())) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public Border getBorder() {
|
||||
if (isJobletContainer()) {
|
||||
LineBorder lb = new LineBorder();
|
||||
lb.setStyle(SWT.LINE_SOLID);
|
||||
lb.setWidth(2);
|
||||
lb.setColor(SUBJOB_BORDER_FG);
|
||||
return lb;
|
||||
}
|
||||
return super.getBorder();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,16 +69,6 @@ import org.talend.librariesmanager.ui.views.ModulesView;
|
||||
*/
|
||||
public class SubjobContainerPart extends AbstractGraphicalEditPart implements PropertyChangeListener, IAdaptable, NodeEditPart {
|
||||
|
||||
@Override
|
||||
protected void unregisterVisuals() {
|
||||
super.unregisterVisuals();
|
||||
IFigure figure = getFigure();
|
||||
if (figure instanceof SubjobContainerFigure) {
|
||||
((SubjobContainerFigure) figure).disposeColors();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
|
||||
@@ -160,24 +160,6 @@ public class SparkStreamingSubjobContainerFigure extends SubjobContainerFigure {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disposeColors() {
|
||||
super.disposeColors();
|
||||
if (timeoutFigureRect.getForegroundColor() != null && !timeoutFigureRect.getForegroundColor().isDisposed()) {
|
||||
timeoutFigureRect.getForegroundColor().dispose();
|
||||
}
|
||||
if (timeoutFigureRect.getBackgroundColor() != null && !timeoutFigureRect.getBackgroundColor().isDisposed()) {
|
||||
timeoutFigureRect.getBackgroundColor().dispose();
|
||||
}
|
||||
|
||||
if (statsFigureRect.getForegroundColor() != null && !statsFigureRect.getForegroundColor().isDisposed()) {
|
||||
statsFigureRect.getForegroundColor().dispose();
|
||||
}
|
||||
if (statsFigureRect.getBackgroundColor() != null && !statsFigureRect.getBackgroundColor().isDisposed()) {
|
||||
statsFigureRect.getBackgroundColor().dispose();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* yzhang Comment method "updateData".
|
||||
*/
|
||||
|
||||
@@ -174,22 +174,20 @@ public class DesignerColorsPreferencePage extends FieldEditorPreferencePage impl
|
||||
AbstractTalendEditor talendEditor = pageEditor.getTalendEditor();
|
||||
ProcessPart processPart = talendEditor.getProcessPart();
|
||||
processPart.ajustReadOnly();
|
||||
changeMRGroupColor(processPart);
|
||||
changeJobletColor(processPart);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void changeMRGroupColor(ProcessPart processPart) {
|
||||
private void changeJobletColor(ProcessPart processPart) {
|
||||
for (Object o : processPart.getChildren()) {
|
||||
if (o instanceof SubjobContainerPart) {
|
||||
for (Object child : ((SubjobContainerPart) o).getChildren()) {
|
||||
if (child instanceof JobletContainerPart) {
|
||||
JobletContainer jCon = (JobletContainer) ((JobletContainerPart) child).getModel();
|
||||
jCon.setPropertyValue(JobletContainer.UPDATE_JOBLET_DISPLAY, DesignerColorUtils.getPreferenceMRGroupRGB(
|
||||
DesignerColorUtils.MRGROUP_COLOR_NAME, DesignerColorUtils.MR_COLOR));
|
||||
jCon.setPropertyValue(JobletContainer.UPDATE_JOBLET_DISPLAY, DesignerColorUtils.getPreferenceMRGroupRGB(
|
||||
jCon.setPropertyValue(JobletContainer.UPDATE_JOBLET_DISPLAY, DesignerColorUtils.getPreferenceJobletRGB(
|
||||
DesignerColorUtils.JOBLET_COLOR_NAME, DesignerColorUtils.JOBLET_COLOR));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,9 @@ package org.talend.designer.core.utils;
|
||||
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
import org.eclipse.jface.resource.StringConverter;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.graphics.RGB;
|
||||
import org.talend.commons.ui.runtime.ITalendThemeService;
|
||||
import org.talend.commons.ui.utils.image.ColorUtils;
|
||||
import org.talend.core.CorePlugin;
|
||||
import org.talend.core.model.process.EConnectionType;
|
||||
@@ -35,8 +37,6 @@ public final class DesignerColorUtils {
|
||||
|
||||
public static final RGB JOBLET_COLOR = new RGB(130, 240, 100);
|
||||
|
||||
public static final RGB MR_COLOR = new RGB(186, 203, 219);
|
||||
|
||||
public static final String SUBJOB_TITLE_COLOR_NAME = "subjobTitleColor"; //$NON-NLS-1$
|
||||
|
||||
public static final String SUBJOB_COLOR_NAME = "subjobColor"; //$NON-NLS-1$
|
||||
@@ -46,8 +46,6 @@ public final class DesignerColorUtils {
|
||||
public static final String FORBIDDEN_SUBJOB_COLOR = "forbiddenSubjobColor";
|
||||
|
||||
public static final String FORBIDDEN_SUBJOB_TITLECOLOR = "forbiddenSubjobTitleColor";
|
||||
|
||||
public static final String MRGROUP_COLOR_NAME = "mrgroupColor"; //$NON-NLS-1$
|
||||
|
||||
public static final String JOBDESIGNER_EGITOR_BACKGROUND_COLOR_NAME = "jobDesignerBackgroundColor"; //$NON-NLS-1$
|
||||
|
||||
@@ -85,18 +83,21 @@ public final class DesignerColorUtils {
|
||||
}
|
||||
|
||||
// background
|
||||
Color jobDesignerBackgroundColor = ITalendThemeService.getColor(JOBDESIGNER_EGITOR_BACKGROUND_COLOR_NAME).orElse(new Color(DesignerColorUtils.DEFAULT_EDITOR_COLOR));
|
||||
store.setDefault(DesignerColorUtils.JOBDESIGNER_EGITOR_BACKGROUND_COLOR_NAME,
|
||||
StringConverter.asString(DesignerColorUtils.DEFAULT_EDITOR_COLOR));
|
||||
StringConverter.asString(jobDesignerBackgroundColor.getRGB()));
|
||||
Color readOnlyBackgroundColor = ITalendThemeService.getColor(READONLY_BACKGROUND_COLOR_NAME).orElse(new Color(DesignerColorUtils.DEFAULT_READONLY_COLOR));
|
||||
store.setDefault(DesignerColorUtils.READONLY_BACKGROUND_COLOR_NAME,
|
||||
StringConverter.asString(DesignerColorUtils.DEFAULT_READONLY_COLOR));
|
||||
StringConverter.asString(readOnlyBackgroundColor.getRGB()));
|
||||
// subjob
|
||||
store.setDefault(DesignerColorUtils.SUBJOB_COLOR_NAME, StringConverter.asString(DesignerColorUtils.SUBJOB_COLOR));
|
||||
Color subjobColor = ITalendThemeService.getColor(SUBJOB_COLOR_NAME).orElse(new Color(DesignerColorUtils.SUBJOB_COLOR));
|
||||
store.setDefault(DesignerColorUtils.SUBJOB_COLOR_NAME, StringConverter.asString(subjobColor.getRGB()));
|
||||
Color subjobTitleColor = ITalendThemeService.getColor(SUBJOB_TITLE_COLOR_NAME).orElse(new Color(DesignerColorUtils.SUBJOB_TITLE_COLOR));
|
||||
store.setDefault(DesignerColorUtils.SUBJOB_TITLE_COLOR_NAME,
|
||||
StringConverter.asString(DesignerColorUtils.SUBJOB_TITLE_COLOR));
|
||||
// mr
|
||||
store.setDefault(DesignerColorUtils.JOBLET_COLOR_NAME, StringConverter.asString(DesignerColorUtils.JOBLET_COLOR));
|
||||
// mr
|
||||
store.setDefault(DesignerColorUtils.MRGROUP_COLOR_NAME, StringConverter.asString(DesignerColorUtils.MR_COLOR));
|
||||
StringConverter.asString(subjobTitleColor.getRGB()));
|
||||
// Joblet
|
||||
Color jobletColor = ITalendThemeService.getColor(JOBLET_COLOR_NAME).orElse(new Color(DesignerColorUtils.JOBLET_COLOR));
|
||||
store.setDefault(DesignerColorUtils.JOBLET_COLOR_NAME, StringConverter.asString(jobletColor.getRGB()));
|
||||
// connection
|
||||
for (EConnectionType connType : EConnectionType.values()) {
|
||||
store.setDefault(getPreferenceConnectionName(connType), StringConverter.asString(connType.getRGB()));
|
||||
@@ -138,10 +139,7 @@ public final class DesignerColorUtils {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static RGB getPreferenceMRGroupRGB(String name, RGB defaultColor) {
|
||||
if (name == null || defaultColor == null || !name.equals(MRGROUP_COLOR_NAME)) {
|
||||
return MR_COLOR;
|
||||
}
|
||||
public static RGB getPreferenceJobletRGB(String name, RGB defaultColor) {
|
||||
String colorStr = DesignerPlugin.getDefault().getPreferenceStore().getString(name);
|
||||
return ColorUtils.parseStringToRGB(colorStr, defaultColor);
|
||||
}
|
||||
|
||||
@@ -583,6 +583,7 @@ public class RunProcessContext {
|
||||
prs.checkDifferenceWithRepository();
|
||||
synContext(getSelectedContext(), process.getContextManager().getDefaultContext());
|
||||
}
|
||||
|
||||
checkTraces();
|
||||
|
||||
if (ProcessContextComposite.promptConfirmLauch(shell, getSelectedContext(), process)) {
|
||||
@@ -794,6 +795,10 @@ public class RunProcessContext {
|
||||
}
|
||||
|
||||
private void synContext(IContext selectedContextToUpdate, IContext updatedContext) {
|
||||
if(!selectedContextToUpdate.getName().equals(updatedContext.getName())) {
|
||||
return;
|
||||
}
|
||||
|
||||
List<IContextParameter> contextParameterList = updatedContext.getContextParameterList();
|
||||
for(IContextParameter contextParam: contextParameterList) {
|
||||
IContextParameter contextParameter = selectedContextToUpdate.getContextParameter(contextParam.getSource(), contextParam.getName());
|
||||
|
||||
Reference in New Issue
Block a user