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

Code cleanup HopGuiPipelineGraph and AreaOwner #4312 #4313

Merged
merged 1 commit into from
Sep 24, 2024
Merged
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
11 changes: 0 additions & 11 deletions engine/src/main/java/org/apache/hop/core/gui/AreaOwner.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,6 @@ public enum AreaType {
TRANSFORM_OUTPUT_DATA(true),
/** The pipeline hop decoration */
TRANSFORM_TARGET_HOP_ICON(true),
/** TODO: ? */
TRANSFORM_TARGET_HOP_ICON_OPTION(false),

@Deprecated
TRANSFORM_INFO_HOP_ICON(false),
@Deprecated
TRANSFORM_ERROR_HOP_ICON(false),
@Deprecated
TRANSFORM_INPUT_HOP_ICON(false),
@Deprecated
TRANSFORM_OUTPUT_HOP_ICON(false),

/** The pipeline hop decoration copy icon that indicate that all rows. */
HOP_COPY_ICON(true),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -667,27 +667,6 @@ public void mouseDown(MouseEvent e) {
//
if (areaOwner != null && areaOwner.getAreaType() != null) {
switch (areaOwner.getAreaType()) {
case TRANSFORM_OUTPUT_HOP_ICON:
// Click on the output icon means: start of drag
// Action: We show the input icons on the other transforms...
//
selectedTransform = null;
startHopTransform = (TransformMeta) areaOwner.getParent();
candidateHopType = null;
startErrorHopTransform = false;
break;

case TRANSFORM_INPUT_HOP_ICON:
// Click on the input icon means: start to a new hop
// In this case, we set the end hop transform...
//
selectedTransform = null;
startHopTransform = null;
endHopTransform = (TransformMeta) areaOwner.getParent();
candidateHopType = null;
startErrorHopTransform = false;
break;

case TRANSFORM_INFO_ICON:
// Click on the transform info icon means: Edit transformation description
//
Expand Down Expand Up @@ -718,10 +697,6 @@ public void mouseDown(MouseEvent e) {
pipelineTransformDelegate.editTransformErrorHandling(pipelineMeta, transformMeta);
break;

case TRANSFORM_TARGET_HOP_ICON_OPTION:
// Below, see showTransformTargetOptions()
break;

case TRANSFORM_ICON:
if (shift && control) {
openReferencedObject();
Expand Down Expand Up @@ -3012,22 +2987,7 @@ private AreaOwner setToolTip(int x, int y, int screenX, int screenY) {
Const.CR));
tipImage = GuiResource.getInstance().getImageError();
break;
case TRANSFORM_INPUT_HOP_ICON:
tip.append(BaseMessages.getString(PKG, "PipelineGraph.TransformInputConnector.Tooltip"));
tipImage = GuiResource.getInstance().getImageInput();
break;
case TRANSFORM_OUTPUT_HOP_ICON:
tip.append(BaseMessages.getString(PKG, "PipelineGraph.TransformOutputConnector.Tooltip"));
tipImage = GuiResource.getInstance().getImageOutput();
break;
case TRANSFORM_INFO_HOP_ICON:
ITransformIOMeta ioMeta = (ITransformIOMeta) areaOwner.getOwner();
tip.append(
BaseMessages.getString(PKG, "PipelineGraph.TransformMetaConnector.Tooltip")
+ Const.CR
+ ioMeta.toString());
tipImage = GuiResource.getInstance().getImageInfo();
break;

case TRANSFORM_TARGET_HOP_ICON:
IStream stream = (IStream) areaOwner.getOwner();
tip.append(stream.getDescription());
Expand All @@ -3040,19 +3000,6 @@ private AreaOwner setToolTip(int x, int y, int screenX, int screenY) {
tipImage = GuiResource.getInstance().getImageTarget();
}
break;
case TRANSFORM_ERROR_HOP_ICON:
TransformMeta transformMeta = (TransformMeta) areaOwner.getParent();
if (transformMeta.supportsErrorHandling()) {
tip.append(
BaseMessages.getString(
PKG, "PipelineGraph.TransformSupportsErrorHandling.Tooltip"));
} else {
tip.append(
BaseMessages.getString(
PKG, "PipelineGraph.TransformDoesNotSupportsErrorHandling.Tooltip"));
}
tipImage = GuiResource.getInstance().getImageError();
break;

case TRANSFORM_INFO_ICON, TRANSFORM_ICON:
TransformMeta iconTransformMeta = (TransformMeta) areaOwner.getOwner();
Expand Down
Loading