Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 492037

Summary: Update the Progress Reporting article
Product: [Eclipse Project] Platform Reporter: Stefan Xenos <sxenos>
Component: WebsiteAssignee: Stefan Xenos <sxenos>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: atrookey, eclipse.sprigogin, Lars.Vogel, wayne.beaton
Version: 4.6   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
See Also: https://git.eclipse.org/r/71027
https://git.eclipse.org/c/www.eclipse.org/articles.git/commit/?id=81a5da245b4ec47b43011a22b72ecbb537d98ebc
Whiteboard:
Bug Depends on:    
Bug Blocks: 487372, 499658    

Description Stefan Xenos CLA 2016-04-19 14:08:42 EDT
The old Eclipse Corner article on progress reporting is badly out of date. It should be updated to describe the latest-and-greatest patterns for progress reporting as of Eclipse 4.6, and how to roll with the changes anticipated in Eclipse 4.7.

The public version of the article can be found here:

https://eclipse.org/articles/Article-Progress-Monitors/article.html

The git version is here:

https://git.eclipse.org/r/#/admin/projects/www.eclipse.org/articles

This was extracted from bug 487372.
Comment 1 Lars Vogel CLA 2016-04-19 15:07:39 EDT
Adding Wayne, not sure if the articles are still "maintained".
Comment 2 Wayne Beaton CLA 2016-04-19 16:23:55 EDT
Patches accepted.
Comment 3 Eclipse Genie CLA 2016-04-20 00:48:00 EDT
New Gerrit change created: https://git.eclipse.org/r/71027
Comment 4 Stefan Xenos CLA 2016-04-20 00:53:55 EDT
I've attached an updated article. It's pretty much a rewrite. I think I only kept a couple paragraphs from the original.

I was unsure what to do about attribution so I followed the same copyright and author conventions we use for source files (I included both contributors and updated the copyright notice using the same sort of convention we use in sources).

Feedback and comments are welcome.
Comment 5 Stefan Xenos CLA 2016-04-22 00:10:07 EDT
Wayne, could I trouble you to take another look at this? I think it should be ready for submission.
Comment 6 Wayne Beaton CLA 2016-04-22 11:01:20 EDT
The content is completely different and I believe that the original still serves an existing community so I'd rather not replace it.

Can you submit an new update that presents the article as a separate file. Maybe we can add a pointer in the old version to the new version as well (naturally, we can update the wiki with a direct pointer to the new (and old) version.
Comment 7 Lars Vogel CLA 2016-04-22 11:22:36 EDT
(In reply to Wayne Beaton from comment #6)
> The content is completely different and I believe that the original still
> serves an existing community so I'd rather not replace it.


The old article Shows now the "wrong" way. We should replace it, rather than keeping it around. This "lets keep outdated stuff" leads  people to use outdated stuff.
Comment 8 Wayne Beaton CLA 2016-04-22 11:35:18 EDT
(In reply to Lars Vogel from comment #7)
> The old article Shows now the "wrong" way. We should replace it, rather than
> keeping it around. This "lets keep outdated stuff" leads  people to use
> outdated stuff.

Is there a version of Eclipse for which the article shows the "right" way?
Comment 9 Lars Vogel CLA 2016-04-22 11:51:58 EDT
(In reply to Wayne Beaton from comment #8)
> (In reply to Lars Vogel from comment #7)
> > The old article Shows now the "wrong" way. We should replace it, rather than
> > keeping it around. This "lets keep outdated stuff" leads  people to use
> > outdated stuff.
> 
> Is there a version of Eclipse for which the article shows the "right" way?

Neon and part of it is relevant for older releases.
Comment 10 Stefan Xenos CLA 2016-04-22 11:55:32 EDT
> Is there a version of Eclipse for which the article shows the "right" way?

A lot of the content of that article was always wrong - or at least misleading. For example, it mentions that there are four states for a progress monitor (there are three), it says that done() can only be called once (the javadoc disagrees), most of the information about how cancellation works is wrong (cancellation isn't a fourth state of the monitor and the cancellation isn't triggered as a consequence of the job calling setCanceled).

All the stuff that the original article got correct has been included in the new article in the section on IProgressMonitor, but I've fixed the inaccuracies. Anyone wanting to support Eclipse 3.2 and earlier can use that section.

All of examples in the new article apply to Eclipse 3.3 and up, but - as I think I explained clearly in the article - anyone wanting to support Eclipse 3.3 to Eclipse 4.5 needs to replace the word "split" with the word "newChild".

Anyone wanting to support Eclipse 3.3 and up is far better off following the advice of the new article.

If we want to elaborate on supporting Eclipse 3.2 and earlier, I can add a section about that (and the use of SubProgressMonitor), but that is still far preferable than keeping the old article around since so much of the old article is incorrect.
Comment 11 Stefan Xenos CLA 2016-04-22 12:01:32 EDT
Let me ask this: What versions of Eclipse do we care about supporting?

My new article covers:

4.6 and 4.7: Very well.
3.3 to 4.5: Well, but I could elaborate more about newChild/split in the section on Eclipse versions.
3.2 and earlier: I cover all the stuff on IProgressMonitor, but if we care about these old versions I should probably talk about the use of SubProgressMonitor.

If we think there is an Eclipse version that we both care about and that the old article did a better job of covering, let's fix the new article rather than keeping the old one around.
Comment 13 Wayne Beaton CLA 2016-04-22 12:13:05 EDT
I think that if we have 3.5+ covered, we're in incredibly good shape.

Merged.
Comment 14 Stefan Xenos CLA 2016-04-22 12:20:07 EDT
Thank you so much, Wayne!

...and thank you to everyone who helped me edit this thing.

FYI, the information about adjusting the examples for Eclipse 3.3 to 4.5 is still spread out throughout the article. If we get any questions about this I'd be happy to follow up with more explicit information in the "Eclipse Versions" section.