From mnovotny at redhat.com  Thu Oct  1 07:56:00 2015
From: mnovotny at redhat.com (Marek Novotny)
Date: Thu, 1 Oct 2015 13:56:00 +0200
Subject: [windup-dev] Indentation of XML files with spaces
Message-ID: <560D1F50.8050600@redhat.com>

Hi,

 I saw there is not defined XML formatting in ide-config
https://github.com/windup/windup/blob/master/ide-config/Eclipse_Code_Format_Profile.xml.


I would suggest to unify that settings on indentation with spaces too
instead of tabs as we have for Java code to not mess up XML based files.

What do you think about it?


Cheers,


-- 
Marek Novotny
--
Windup team member and Seam Project Lead

Red Hat Czech s.r.o.
Purkynova 99
612 45 Brno

From mnovotny at redhat.com  Thu Oct  1 07:57:24 2015
From: mnovotny at redhat.com (Marek Novotny)
Date: Thu, 1 Oct 2015 13:57:24 +0200
Subject: [windup-dev] Indentation of XML files with spaces
In-Reply-To: <560D1F50.8050600@redhat.com>
References: <560D1F50.8050600@redhat.com>
Message-ID: <560D1FA4.5070402@redhat.com>

On 1.10.2015 13:56, Marek Novotny wrote:
> Hi,
> 
>  I saw there is not defined XML formatting in ide-config
> https://github.com/windup/windup/blob/master/ide-config/Eclipse_Code_Format_Profile.xml.
> 
> 
> I would suggest to unify that settings on indentation with spaces too
> instead of tabs as we have for Java code to not mess up XML based files.
> 
> What do you think about it?
> 
> 
> Cheers,
> 
> 

As UI preference in Eclipse is a little buggy there is an advice how to
set up it at
http://stackoverflow.com/questions/31747059/eclipse-xml-editor-indent-using-spaces

-- 
Marek Novotny
--
Windup team member and Seam Project Lead

Red Hat Czech s.r.o.
Purkynova 99
612 45 Brno

From sgilda at redhat.com  Thu Oct  1 08:20:19 2015
From: sgilda at redhat.com (Sande Gilda)
Date: Thu, 01 Oct 2015 08:20:19 -0400
Subject: [windup-dev] Indentation of XML files with spaces
In-Reply-To: <560D1FA4.5070402@redhat.com>
References: <560D1F50.8050600@redhat.com> <560D1FA4.5070402@redhat.com>
Message-ID: <560D2503.3010100@redhat.com>

I agree! We have the requirement to use spaces for tabs in the 
quickstarts. Having a standard also makes it easier to do diffs. You 
don't have to pass the switch to ignore white space :-).

On 10/01/2015 07:57 AM, Marek Novotny wrote:
> On 1.10.2015 13:56, Marek Novotny wrote:
>> Hi,
>>
>>   I saw there is not defined XML formatting in ide-config
>> https://github.com/windup/windup/blob/master/ide-config/Eclipse_Code_Format_Profile.xml.
>>
>>
>> I would suggest to unify that settings on indentation with spaces too
>> instead of tabs as we have for Java code to not mess up XML based files.
>>
>> What do you think about it?
>>
>>
>> Cheers,
>>
>>
> As UI preference in Eclipse is a little buggy there is an advice how to
> set up it at
> http://stackoverflow.com/questions/31747059/eclipse-xml-editor-indent-using-spaces
>


From jsightle at redhat.com  Thu Oct  1 09:24:16 2015
From: jsightle at redhat.com (Jess Sightler)
Date: Thu, 1 Oct 2015 09:24:16 -0400
Subject: [windup-dev] Indentation of XML files with spaces
In-Reply-To: <560D1F50.8050600@redhat.com>
References: <560D1F50.8050600@redhat.com>
Message-ID: <560D3400.5050208@redhat.com>

+1

On 10/01/2015 07:56 AM, Marek Novotny wrote:
> Hi,
>
>   I saw there is not defined XML formatting in ide-config
> https://github.com/windup/windup/blob/master/ide-config/Eclipse_Code_Format_Profile.xml.
>
>
> I would suggest to unify that settings on indentation with spaces too
> instead of tabs as we have for Java code to not mess up XML based files.
>
> What do you think about it?
>
>
> Cheers,
>
>


From ozizka at redhat.com  Wed Oct  7 08:54:45 2015
From: ozizka at redhat.com (Ondrej Zizka)
Date: Wed, 7 Oct 2015 14:54:45 +0200
Subject: [windup-dev] TopLayerSingletonFramesSelector logic?
Message-ID: <56151615.8000502@redhat.com>

Just a minor thing, for potential refactoring:

TopLayerSingletonFramesSelector:

     public Iterable<? extends WindupVertexFrame> getFrames(GraphRewrite 
event, EvaluationContext context)
     {
         Variables variables = Variables.instance(event);
         this.varName = Iteration.getPayloadVariableName(event, context);
         return variables.findVariable(varName);
     }

     public static String getPayloadVariableName(GraphRewrite event, 
EvaluationContext ctx) throws IllegalStateException
     {
         Variables variables = Variables.instance(event);
         Map<String, Iterable<? extends WindupVertexFrame>> topLayer = 
variables.peek();
         if (topLayer.keySet().size() != 1)
             throw new IllegalStateException("Cannot determine Iteration 
payload variable name because the top "
                 + "layer of " + Variables.class.getSimpleName() + " 
stack contains no or multiple variables: " + topLayer.keySet());
         String name = topLayer.keySet().iterator().next();
         return name;
     }

So it verifies that the Variables stack has only one name, then returns 
it to let the calling code return the content of that single variable.
I think the logic should be reversed - the check for a single variable 
should be in the calling code.

Ondra

From jsightle at redhat.com  Wed Oct  7 12:37:39 2015
From: jsightle at redhat.com (Jess Sightler)
Date: Wed, 7 Oct 2015 12:37:39 -0400
Subject: [windup-dev] TopLayerSingletonFramesSelector logic?
In-Reply-To: <56151615.8000502@redhat.com>
References: <56151615.8000502@redhat.com>
Message-ID: <56154A53.4070003@redhat.com>

The "payload" variable should always be a single item. It is reasonable 
for this safeguard to exist within the method itself.

On 10/07/2015 08:54 AM, Ondrej Zizka wrote:
> Just a minor thing, for potential refactoring:
>
> TopLayerSingletonFramesSelector:
>
>       public Iterable<? extends WindupVertexFrame> getFrames(GraphRewrite
> event, EvaluationContext context)
>       {
>           Variables variables = Variables.instance(event);
>           this.varName = Iteration.getPayloadVariableName(event, context);
>           return variables.findVariable(varName);
>       }
>
>       public static String getPayloadVariableName(GraphRewrite event,
> EvaluationContext ctx) throws IllegalStateException
>       {
>           Variables variables = Variables.instance(event);
>           Map<String, Iterable<? extends WindupVertexFrame>> topLayer =
> variables.peek();
>           if (topLayer.keySet().size() != 1)
>               throw new IllegalStateException("Cannot determine Iteration
> payload variable name because the top "
>                   + "layer of " + Variables.class.getSimpleName() + "
> stack contains no or multiple variables: " + topLayer.keySet());
>           String name = topLayer.keySet().iterator().next();
>           return name;
>       }
>
> So it verifies that the Variables stack has only one name, then returns
> it to let the calling code return the content of that single variable.
> I think the logic should be reversed - the check for a single variable
> should be in the calling code.
>
> Ondra
> _______________________________________________
> windup-dev mailing list
> windup-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/windup-dev


From mnovotny at redhat.com  Wed Oct 14 03:12:35 2015
From: mnovotny at redhat.com (Marek Novotny)
Date: Wed, 14 Oct 2015 09:12:35 +0200
Subject: [windup-dev] Windup docker images for 2.4.0.Final
Message-ID: <561E0063.6010705@redhat.com>

Hi,

 I asked Marek Goldman for updating Windup docker images and he gave me
the committer permissions to https://github.com/jboss-dockerfiles/windup.

So right now it is updated to the latest 2.4.0.Final release.

There is master branch based on jboss/base-jdk:7 and jdk8 branch with
base of jboss/base-jdk:8. All jvm are OpenkJDK builds.

We have setup also binary builds on docker hub so you can pull directly
docker images, see what is available at
https://hub.docker.com/r/jboss/windup/tags/

Enjoy it!

-- 
Marek Novotny
--
Windup team member and Seam Project Lead

Red Hat Czech s.r.o.
Purkynova 99
612 45 Brno



From rruss at redhat.com  Wed Oct 14 15:25:26 2015
From: rruss at redhat.com (Rodney Russ)
Date: Wed, 14 Oct 2015 13:25:26 -0600
Subject: [windup-dev] Windup docker images for 2.4.0.Final
In-Reply-To: <561E0063.6010705@redhat.com>
References: <561E0063.6010705@redhat.com>
Message-ID: <20D58206-262C-4EBF-AC59-46FA3C1AF1B2@redhat.com>

I knew we had this with previous versions, but aside from possibly 
running this on OpenShift (v3+) any thoughts on what the use case for 
this would be?


On 14 Oct 2015, at 1:12, Marek Novotny wrote:

> Hi,
>
> I asked Marek Goldman for updating Windup docker images and he gave me
> the committer permissions to 
> https://github.com/jboss-dockerfiles/windup.
>
> So right now it is updated to the latest 2.4.0.Final release.
>
> There is master branch based on jboss/base-jdk:7 and jdk8 branch with
> base of jboss/base-jdk:8. All jvm are OpenkJDK builds.
>
> We have setup also binary builds on docker hub so you can pull 
> directly
> docker images, see what is available at
> https://hub.docker.com/r/jboss/windup/tags/
>
> Enjoy it!
>
> -- 
> Marek Novotny
> --
> Windup team member and Seam Project Lead
>
> Red Hat Czech s.r.o.
> Purkynova 99
> 612 45 Brno
>
>
> _______________________________________________
> windup-dev mailing list
> windup-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/windup-dev

From mnovotny at redhat.com  Thu Oct 15 04:23:25 2015
From: mnovotny at redhat.com (Marek Novotny)
Date: Thu, 15 Oct 2015 10:23:25 +0200
Subject: [windup-dev] Windup docker images for 2.4.0.Final
In-Reply-To: <20D58206-262C-4EBF-AC59-46FA3C1AF1B2@redhat.com>
References: <561E0063.6010705@redhat.com>
	<20D58206-262C-4EBF-AC59-46FA3C1AF1B2@redhat.com>
Message-ID: <561F627D.2080409@redhat.com>

Docker image can be very easily ran locally too, bacause you don't need
to setup different jvm runtimes in parallel or even different Windup
versions. There are 2 images for now with openjdk7 and openjdk8. So you
can easily do

time docker run -ti --rm -v $REPORTS:/opt/jboss/reports -v
$(pwd):/opt/jboss/application jboss/windup:2.4.0.CR2-openjdk7
/opt/jboss/windup/bin/windup --input application/$appname --output
/opt/jboss/reports --target eap --batchMode

and

in also with

time docker run -ti --rm -v $REPORTS:/opt/jboss/reports -v
$(pwd):/opt/jboss/application jboss/windup:2.4.0.CR2-openjdk8
/opt/jboss/windup/bin/windup --input application/$appname --output
/opt/jboss/reports --target eap --batchMode

and you are running at the same time on different jvm runtime without
any pre-setup. Notice different images like
jboss/windup:2.4.0.CR2-openjdk7 and jboss/windup:2.4.0.CR2-openjdk8

Certainly It is not correct as I used the same input/output for both,
but you should have the idea ;)

On 14.10.2015 21:25, Rodney Russ wrote:
> I knew we had this with previous versions, but aside from possibly
> running this on OpenShift (v3+) any thoughts on what the use case for
> this would be?
> 
> 
> On 14 Oct 2015, at 1:12, Marek Novotny wrote:
> 
>> Hi,
>>
>> I asked Marek Goldman for updating Windup docker images and he gave me
>> the committer permissions to https://github.com/jboss-dockerfiles/windup.
>>
>> So right now it is updated to the latest 2.4.0.Final release.
>>
>> There is master branch based on jboss/base-jdk:7 and jdk8 branch with
>> base of jboss/base-jdk:8. All jvm are OpenkJDK builds.
>>
>> We have setup also binary builds on docker hub so you can pull directly
>> docker images, see what is available at
>> https://hub.docker.com/r/jboss/windup/tags/
>>
>> Enjoy it!
>>
>> -- 
>> Marek Novotny
>> -- 
>> Windup team member and Seam Project Lead
>>
>> Red Hat Czech s.r.o.
>> Purkynova 99
>> 612 45 Brno
>>
>>
>> _______________________________________________
>> windup-dev mailing list
>> windup-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/windup-dev


-- 
Marek Novotny
--
Windup team member and Seam Project Lead

Red Hat Czech s.r.o.
Purkynova 99
612 45 Brno

From ozizka at redhat.com  Mon Oct 19 20:13:25 2015
From: ozizka at redhat.com (Ondrej Zizka)
Date: Tue, 20 Oct 2015 02:13:25 +0200
Subject: [windup-dev] Query.fromType(...).has() ignores has()?
Message-ID: <56258725.40801@redhat.com>

Hi,

In BeforeDecompileClassesRuleProvider, I have

         .addRule()
         .when(Query.fromType(JavaClassFileModel.class)
                 .withoutProperty(FileModel.PARSE_ERROR)
         )
         .perform(new ClassFilePreDecompilationScan());

which translates to (verified)  :

         case NOT_DEFINED:
             pipeline.hasNot(this.propertyName);
             break;

And yet, when this query is executed, it iterates over a vertex:

Failed when iterating [v[76032]={skipDecompilation: true, isDirectory: 
false, filePath: 
/tmp/Windup/resJee2d/archives/jee-example-services.jar/com/NonParsable.class, 
fileName: NonParsable.class, w:vertextype: [FileResource, 
JavaClassFileModel], parseError: BCEL was unable to parse class file 
'/tmp/Windup/resJee2d/archives/jee-example-services.jar/com/NonParsable.class':
/tmp/Windup/resJee2d/archives/jee-example-services.jar/com/NonParsable.class 
is not a Java .class file}]:

As you may notice, the "parseError" is set.
Any idea why the hasNot() is ignored?

Thanks,
Ondra

From bdavis at redhat.com  Mon Oct 19 20:21:30 2015
From: bdavis at redhat.com (Brad Davis)
Date: Mon, 19 Oct 2015 20:21:30 -0400 (EDT)
Subject: [windup-dev] Query.fromType(...).has() ignores has()?
In-Reply-To: <56258725.40801@redhat.com>
References: <56258725.40801@redhat.com>
Message-ID: <A8705372-FB82-40A6-9507-8601E128B6FC@redhat.com>

Did you check the phase? Maybe it's executed before the parse error property is set?

Sent from my iPhone

> On Oct 19, 2015, at 8:13 PM, Ondrej Zizka <ozizka at redhat.com> wrote:
> 
> Hi,
> 
> In BeforeDecompileClassesRuleProvider, I have
> 
>         .addRule()
>         .when(Query.fromType(JavaClassFileModel.class)
>                 .withoutProperty(FileModel.PARSE_ERROR)
>         )
>         .perform(new ClassFilePreDecompilationScan());
> 
> which translates to (verified)  :
> 
>         case NOT_DEFINED:
>             pipeline.hasNot(this.propertyName);
>             break;
> 
> And yet, when this query is executed, it iterates over a vertex:
> 
> Failed when iterating [v[76032]={skipDecompilation: true, isDirectory: 
> false, filePath: 
> /tmp/Windup/resJee2d/archives/jee-example-services.jar/com/NonParsable.class, 
> fileName: NonParsable.class, w:vertextype: [FileResource, 
> JavaClassFileModel], parseError: BCEL was unable to parse class file 
> '/tmp/Windup/resJee2d/archives/jee-example-services.jar/com/NonParsable.class':
> /tmp/Windup/resJee2d/archives/jee-example-services.jar/com/NonParsable.class 
> is not a Java .class file}]:
> 
> As you may notice, the "parseError" is set.
> Any idea why the hasNot() is ignored?
> 
> Thanks,
> Ondra
> _______________________________________________
> windup-dev mailing list
> windup-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/windup-dev


From ozizka at redhat.com  Mon Oct 19 20:39:01 2015
From: ozizka at redhat.com (Ondrej Zizka)
Date: Tue, 20 Oct 2015 02:39:01 +0200
Subject: [windup-dev] Query.fromType(...).has() ignores has()?
In-Reply-To: <A8705372-FB82-40A6-9507-8601E128B6FC@redhat.com>
References: <56258725.40801@redhat.com>
	<A8705372-FB82-40A6-9507-8601E128B6FC@redhat.com>
Message-ID: <56258D25.80804@redhat.com>

Right, of course, ID-10-T error :)  The exception message is being 
constructed after the parsing error occurs and the parseError is set.
So the vertex has that property, and during the query it doesn't have.

Good night,
Ondra



On 20.10.2015 02:21, Brad Davis wrote:
> Did you check the phase? Maybe it's executed before the parse error property is set?
>
> Sent from my iPhone
>
>> On Oct 19, 2015, at 8:13 PM, Ondrej Zizka <ozizka at redhat.com> wrote:
>>
>> Hi,
>>
>> In BeforeDecompileClassesRuleProvider, I have
>>
>>          .addRule()
>>          .when(Query.fromType(JavaClassFileModel.class)
>>                  .withoutProperty(FileModel.PARSE_ERROR)
>>          )
>>          .perform(new ClassFilePreDecompilationScan());
>>
>> which translates to (verified)  :
>>
>>          case NOT_DEFINED:
>>              pipeline.hasNot(this.propertyName);
>>              break;
>>
>> And yet, when this query is executed, it iterates over a vertex:
>>
>> Failed when iterating [v[76032]={skipDecompilation: true, isDirectory:
>> false, filePath:
>> /tmp/Windup/resJee2d/archives/jee-example-services.jar/com/NonParsable.class,
>> fileName: NonParsable.class, w:vertextype: [FileResource,
>> JavaClassFileModel], parseError: BCEL was unable to parse class file
>> '/tmp/Windup/resJee2d/archives/jee-example-services.jar/com/NonParsable.class':
>> /tmp/Windup/resJee2d/archives/jee-example-services.jar/com/NonParsable.class
>> is not a Java .class file}]:
>>
>> As you may notice, the "parseError" is set.
>> Any idea why the hasNot() is ignored?
>>
>> Thanks,
>> Ondra
>> _______________________________________________
>> windup-dev mailing list
>> windup-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/windup-dev
> _______________________________________________
> windup-dev mailing list
> windup-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/windup-dev


From ozizka at redhat.com  Mon Oct 19 20:48:18 2015
From: ozizka at redhat.com (Ondrej Zizka)
Date: Tue, 20 Oct 2015 02:48:18 +0200
Subject: [windup-dev] Opening two streams for .class
Message-ID: <56258F52.7000009@redhat.com>

ClassFilePreDecompilationScan:

             try (InputStream is = fileModel.asInputStream())
             {
                 addClassFileMetadata(event, context, fileModel);

This is opening the stream twice; shouldn't it be rather this?

             addClassFileMetadata(event, context, fileModel);
             try (InputStream is = fileModel.asInputStream())
             {

Ondra

From ozizka at redhat.com  Mon Oct 19 20:50:14 2015
From: ozizka at redhat.com (Ondrej Zizka)
Date: Tue, 20 Oct 2015 02:50:14 +0200
Subject: [windup-dev] BCEL, then ASM? /// Re:  Opening two streams for .class
In-Reply-To: <56258F52.7000009@redhat.com>
References: <56258F52.7000009@redhat.com>
Message-ID: <56258FC6.2060104@redhat.com>

Also, there's BCEL, then ASM parsing of .class.
Are they complements? Can't one do it all?

Ondra



On 20.10.2015 02:48, Ondrej Zizka wrote:
> ClassFilePreDecompilationScan:
>
>               try (InputStream is = fileModel.asInputStream())
>               {
>                   addClassFileMetadata(event, context, fileModel);
>
> This is opening the stream twice; shouldn't it be rather this?
>
>               addClassFileMetadata(event, context, fileModel);
>               try (InputStream is = fileModel.asInputStream())
>               {
>
> Ondra
> _______________________________________________
> windup-dev mailing list
> windup-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/windup-dev


From jsightle at redhat.com  Tue Oct 20 12:52:31 2015
From: jsightle at redhat.com (Jess Sightler)
Date: Tue, 20 Oct 2015 12:52:31 -0400
Subject: [windup-dev] BCEL,
 then ASM? /// Re: Opening two streams for .class
In-Reply-To: <56258FC6.2060104@redhat.com>
References: <56258F52.7000009@redhat.com> <56258FC6.2060104@redhat.com>
Message-ID: <5626714F.4050300@redhat.com>

Yes, I think that can (and should) be changed.

On 10/19/2015 08:50 PM, Ondrej Zizka wrote:
> Also, there's BCEL, then ASM parsing of .class.
> Are they complements? Can't one do it all?
>
> Ondra
>
>
>
> On 20.10.2015 02:48, Ondrej Zizka wrote:
>> ClassFilePreDecompilationScan:
>>
>>                try (InputStream is = fileModel.asInputStream())
>>                {
>>                    addClassFileMetadata(event, context, fileModel);
>>
>> This is opening the stream twice; shouldn't it be rather this?
>>
>>                addClassFileMetadata(event, context, fileModel);
>>                try (InputStream is = fileModel.asInputStream())
>>                {
>>
>> Ondra
>> _______________________________________________
>> windup-dev mailing list
>> windup-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/windup-dev
> _______________________________________________
> windup-dev mailing list
> windup-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/windup-dev


From ozizka at redhat.com  Thu Oct 22 00:54:20 2015
From: ozizka at redhat.com (Ondrej Zizka)
Date: Thu, 22 Oct 2015 06:54:20 +0200
Subject: [windup-dev] FILE_TO_PROJECT_MODEL vs PROJECT_MODEL_TO_FILE
Message-ID: <56286BFC.1080607@redhat.com>

Hi team,

we have
FileModel.FILE_TO_PROJECT_MODEL out
and
ProjectModel.PROJECT_MODEL_TO_FILE out

Is there any reason to have both? They seem to be duplicating the 
semantics, and may cause inconsistency or difficult handling of both.

Regards,
Ondra

From ozizka at redhat.com  Thu Oct 22 01:26:25 2015
From: ozizka at redhat.com (Ondrej Zizka)
Date: Thu, 22 Oct 2015 07:26:25 +0200
Subject: [windup-dev] Simplifying reports - WindupVertexFrame#gremlin(...),
 Freemarker ...?framed(SomeModel)
Message-ID: <56287381.80004@redhat.com>

Hi team,

it would be great if we could frame vertices in Freemarker templates.
It would allow various tricks in @GremlinGroovy which could return 
things like .table() and .tree() and .groupBy(), i.e. Table, Map<Map<>> 
and Map<...>
And then we could iterate through these structures right in the 
template, without need for
      a) extra type just to have somewhere to put the query to, or
      b) an extra Freemarker function.

In combination with capability to do a gremlin query from WindupVertexFrame,
it could work like this:

<#list 
reportModel.rootProject.gremlin("it.as('root').subProjects.as('project').files.as('file').table.cap") 
as row>
        <tr>
<td>${row['project']?frame('ProjectModel').name}</td>
<td>${row['file']?frame('FileModel').prettyPath}</td>
        </tr>
<#/list>

The main advantage is that we could do quite complex data gathering 
right in the template without need to introduce yet another model.
That could make reports significantly easier to code, IMO.
WDYT? Is it useful? Is it possible?

Ondra


From jsightle at redhat.com  Wed Oct 28 13:54:34 2015
From: jsightle at redhat.com (Jess Sightler)
Date: Wed, 28 Oct 2015 13:54:34 -0400
Subject: [windup-dev] FILE_TO_PROJECT_MODEL vs PROJECT_MODEL_TO_FILE
In-Reply-To: <56286BFC.1080607@redhat.com>
References: <56286BFC.1080607@redhat.com>
Message-ID: <56310BDA.4020906@redhat.com>

Feel free to experiment with this. It does seem like they are redundant 
at this point.

On 10/22/2015 12:54 AM, Ondrej Zizka wrote:
> Hi team,
>
> we have
> FileModel.FILE_TO_PROJECT_MODEL out
> and
> ProjectModel.PROJECT_MODEL_TO_FILE out
>
> Is there any reason to have both? They seem to be duplicating the
> semantics, and may cause inconsistency or difficult handling of both.
>
> Regards,
> Ondra
> _______________________________________________
> windup-dev mailing list
> windup-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/windup-dev


From jsightle at redhat.com  Wed Oct 28 13:56:27 2015
From: jsightle at redhat.com (Jess Sightler)
Date: Wed, 28 Oct 2015 13:56:27 -0400
Subject: [windup-dev] Simplifying reports -
 WindupVertexFrame#gremlin(...), Freemarker ...?framed(SomeModel)
In-Reply-To: <56287381.80004@redhat.com>
References: <56287381.80004@redhat.com>
Message-ID: <56310C4B.7050904@redhat.com>

I would think that this would increase the complexity of the templates 
quite a bit. In general I'm not that fond of this type of thing as the 
templates are harder to test than service and method classes.

How hard would it be to implement?

On 10/22/2015 01:26 AM, Ondrej Zizka wrote:
> Hi team,
>
> it would be great if we could frame vertices in Freemarker templates.
> It would allow various tricks in @GremlinGroovy which could return
> things like .table() and .tree() and .groupBy(), i.e. Table, Map<Map<>>
> and Map<...>
> And then we could iterate through these structures right in the
> template, without need for
>        a) extra type just to have somewhere to put the query to, or
>        b) an extra Freemarker function.
>
> In combination with capability to do a gremlin query from WindupVertexFrame,
> it could work like this:
>
> <#list
> reportModel.rootProject.gremlin("it.as('root').subProjects.as('project').files.as('file').table.cap")
> as row>
>          <tr>
> <td>${row['project']?frame('ProjectModel').name}</td>
> <td>${row['file']?frame('FileModel').prettyPath}</td>
>          </tr>
> <#/list>
>
> The main advantage is that we could do quite complex data gathering
> right in the template without need to introduce yet another model.
> That could make reports significantly easier to code, IMO.
> WDYT? Is it useful? Is it possible?
>
> Ondra
>
> _______________________________________________
> windup-dev mailing list
> windup-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/windup-dev