Project

General

Profile

Support #3180

[FV Transformation] Factorize the first block of the transformation

Added by Anonymous almost 3 years ago. Updated over 1 year ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
11/20/2017
Due date:
% Done:

0%

Estimated time:

Description

Currently every transformation starts with iterating over the file project. This can be and should be made better.

History

#1 Updated by Simon Barner over 2 years ago

  • Target version changed from AF3 2.12 Post-release to AF3 2.13 RC1 (Feature Freeze)

#2 Updated by Anonymous over 2 years ago

  • Target version changed from AF3 2.13 RC1 (Feature Freeze) to AF3 2.14 RC1 (Feature Freeze)

#3 Updated by Anonymous over 2 years ago

Vincents code review comment: "
This is a super frequent pattern, you should factorize. I can easily imagine a class "ForEachChildTransformation" which takes for its constructor a predicate to apply to the children and a transformation to apply on the child if the filter passes"

#4 Updated by Anonymous over 2 years ago

Another comment from Vincent:

// TODO(VA) Again this pattern is so common, I think you should really define a class as
// follows:
// public abstract class FilteredTransformationBase extends CacheSupportedTransformationBase
// {
//
// /** {@inheritDoc} */
// @Override
// public Object transform(Object c, IPragmaticTransformation deferredTransformation) {
// return shallBeTransformed(c) ? filteredTransform(c, deferredTransformation) : null;
// }
//
// public abstract Object filteredTransform(Object c,
// IPragmaticTransformation deferredTransformation);
//
// public abstract boolean shallBeTransformed(Object c);
// }

#5 Updated by Johannes Eder over 1 year ago

  • Target version changed from AF3 2.14 RC1 (Feature Freeze) to Backlog

Also available in: Atom PDF