Re: [DISCUSS] Include import statements in documentation code examples

2015-11-24 Thread Maximilian Michels
>Also, I'll not add the import statements to ALL examples, only to those >where people might copy paste them. That sounds ok to me for now. On Thu, Nov 19, 2015 at 6:38 PM, Ufuk Celebi wrote: > I think it's confusing to only have a subset of import statements provided. > But then again, the miss

Re: [DISCUSS] Include import statements in documentation code examples

2015-11-19 Thread Ufuk Celebi
I think it's confusing to only have a subset of import statements provided. But then again, the missing ones will be resolved without confusion (hopefully) ;) We can go with this and see what feedback we get. (Just doing it for some examples sounds reasonable.) – Ufuk On Thu, Nov 19, 2015 at 5:2

Re: [DISCUSS] Include import statements in documentation code examples

2015-11-19 Thread Robert Metzger
Thank you for the feedback. I was also spending some time thinking about automating this, but I don't have the time right now to bring the required infrastructure in place. For now, I'll just add import statements for classes with the potential of confusion (in particular between the Scala and Ja

Re: [DISCUSS] Include import statements in documentation code examples

2015-11-18 Thread Nick Dimiduk
In HBase we keep an hbase-examples module with working code. Snippets from that module are pasted into docs and referenced. Yes, we do see divergence, especially when refactor tools are involved. I once looked into a doc tool for automatically extracting snippets from source code, but that turned i

Re: [DISCUSS] Include import statements in documentation code examples

2015-11-18 Thread Maximilian Michels
Hi Robert. Good suggestion. Generally, it would be nice to have complete code examples available in the documentation. Even better, a way to only show excerpts of the complete example with the option of copying the complete working example. For instance: public Example { public static void ma

Re: [DISCUSS] Include import statements in documentation code examples

2015-11-18 Thread Till Rohrmann
I agree that it would be nice to be able to simply copy paste examples from Flink's website. But it would also be nice if one could hide the imports because they usually take a lot of space. Cheers, Till On Wed, Nov 18, 2015 at 12:09 PM, Robert Metzger wrote: > Hi, > > I helped somebody yesterd

[DISCUSS] Include import statements in documentation code examples

2015-11-18 Thread Robert Metzger
Hi, I helped somebody yesterday on SO [1] who had issues with the Scala API because he was importing the classes from the Java API. Somebody else complained about this issue as well in the comments below the documentation [2], and I think both users are right: Its an unnecessary obstacle when lear