Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TabItem script unreadable in dark mode #4331 #4332

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ The available constants are:
* SKIP_PIPELINE: Excludes the current row from the output row set and continues processing on the next row.
* ERROR_PIPELINE: Excludes the current row from the output row set, generates an error, and any remaining rows are not processed.
* CONTINUE_PIPELINE: Includes the current row in the output row set.
* ABORT_PIPELINE: Excludes the current row from the output row set, and any remaining rows are not processed, but does not generate an error. (This constant does not display in the transform dialog, but can be used in your script)
* ABORT_PIPELINE: Excludes the current row from the output row set, and any remaining rows are not processed, but does not generate an error.

Transform Functions::
String, numeric, date, logic, special, and file functions you can use in scripts. These included functions are implemented in Java and execute faster than JavaScript functions. Each function has a sample script demonstrating its use. Double-click the function to add it to the Javascript pane. Right-click and choose Sample to add the sample to the Javascript pane.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,22 @@
public class ScriptValues extends BaseTransform<ScriptValuesMeta, ScriptValuesData> {
private static final Class<?> PKG = ScriptValuesMeta.class;

/** Excludes the current row from the output row set and continues processing on the next row. */
public static final int SKIP_PIPELINE = 1;

/**
* Excludes the current row from the output row set, and any remaining rows are not processed, but
* does not generate an error.
*/
public static final int ABORT_PIPELINE = -1;

/**
* Excludes the current row from the output row set, generates an error, and any remaining rows
* are not processed.
*/
public static final int ERROR_PIPELINE = -2;

/** Includes the current row in the output row set. */
public static final int CONTINUE_PIPELINE = 0;

private boolean bWithPipelineStat = false;
Expand Down Expand Up @@ -350,11 +360,12 @@ private boolean addValues(IRowMeta rowMeta, Object[] row) throws HopException {
if (pipelineStatus != Scriptable.NOT_FOUND) {
bWithPipelineStat = true;
if (log.isDetailed()) {
logDetailed(("tran_Status found. Checking pipeline status while script execution."));
logDetailed(
("pipeline_Status found. Checking pipeline status while script execution."));
}
} else {
if (log.isDetailed()) {
logDetailed(("No tran_Status found. Pipeline status checking not available."));
logDetailed(("No pipeline_Status found. Pipeline status checking not available."));
}
bWithPipelineStat = false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ public class ScriptValuesDialog extends BaseTransformDialog {
"ScriptValuesDialogMod.TestFailed.DialogMessage";
public static final String CONST_SKIP_PIPELINE = "SKIP_PIPELINE";
public static final String CONST_ERROR_PIPELINE = "ERROR_PIPELINE";
public static final String CONST_ABORT_PIPELINE = "ABORT_PIPELINE";
public static final String CONST_CONTINUE_PIPELINE = "CONTINUE_PIPELINE";
public static final String CONST_FUNCTION = "Function";
public static final String CONST_JS_FUNCTION = "jsFunction";
Expand Down Expand Up @@ -157,11 +158,6 @@ public class ScriptValuesDialog extends BaseTransformDialog {

private static final String[] jsFunctionList = ScriptValuesAddedFunctions.jsFunctionList;

public static final int SKIP_PIPELINE = 1;
private static final int ABORT_PIPELINE = -1;
private static final int ERROR_PIPELINE = -2;
private static final int CONTINUE_PIPELINE = 0;

private final ScriptValuesMeta input;
private ScriptValuesHelp scVHelp;
private TextVar wOptimizationLevel;
Expand Down Expand Up @@ -344,6 +340,7 @@ public String open() {
wlPosition.setLayoutData(fdlPosition);

folder = new CTabFolder(wTop, SWT.BORDER | SWT.RESIZE);
PropsUi.setLook(folder, Props.WIDGET_STYLE_TAB);
folder.setUnselectedImageVisible(true);
folder.setUnselectedCloseVisible(true);
FormData fdScript = new FormData();
Expand Down Expand Up @@ -1206,10 +1203,10 @@ private boolean test(boolean getvars, boolean popup) {

// Adding some Constants to the JavaScript
try {
jsscope.put(CONST_SKIP_PIPELINE, jsscope, SKIP_PIPELINE);
jsscope.put("ABORT_PIPELINE", jsscope, ABORT_PIPELINE);
jsscope.put(CONST_ERROR_PIPELINE, jsscope, ERROR_PIPELINE);
jsscope.put(CONST_CONTINUE_PIPELINE, jsscope, CONTINUE_PIPELINE);
jsscope.put(CONST_SKIP_PIPELINE, jsscope, ScriptValues.SKIP_PIPELINE);
jsscope.put(CONST_ABORT_PIPELINE, jsscope, ScriptValues.ABORT_PIPELINE);
jsscope.put(CONST_ERROR_PIPELINE, jsscope, ScriptValues.ERROR_PIPELINE);
jsscope.put(CONST_CONTINUE_PIPELINE, jsscope, ScriptValues.CONTINUE_PIPELINE);
} catch (Exception ex) {
testException =
new HopException(
Expand Down Expand Up @@ -1441,6 +1438,10 @@ private void buildSpecialFunctionsTree() {
itemT.setImage(GuiResource.getInstance().getImageLabel());
itemT.setText(CONST_CONTINUE_PIPELINE);
itemT.setData(CONST_CONTINUE_PIPELINE);
itemT = new TreeItem(item, SWT.NULL);
itemT.setImage(GuiResource.getInstance().getImageLabel());
itemT.setText(CONST_ABORT_PIPELINE);
itemT.setData(CONST_ABORT_PIPELINE);

item = new TreeItem(wTree, SWT.NULL);
item.setImage(guiresource.getImageFolder());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ public String open() {
wlScript.setLayoutData(fdlScript);

folder = new CTabFolder(wTop, SWT.BORDER | SWT.RESIZE);
PropsUi.setLook(folder, Props.WIDGET_STYLE_TAB);

// This function does not allowed in the web that will lead to error
// folder.setSimple(false);
Expand Down
Loading