I'm trying to use a progress monitor for a plugin that generates a file
in the workspace. The plugin extends the org.eclipse.ui.viewActions
extension point. My implementation class's run method invokes another
class which implements IProgressMonitor to do the work. Here is a
snipet from my ViewActionDelegate implementation. HeadlessAntGenerator
is the helper class that implements IProgressMonitor.
================== Snipet Start =========================
1 HeadlessAntGenerator antGenerator = new HeadlessAntGenerator();
2 Composite parent = view.getViewSite().getShell();
3 ProgressMonitorPart monitor = new ProgressMonitorPart(parent, null);
5 antGenerator.generate(earProject, monitor);
================== Snipet End ===========================
I don't see a progress monitor during the execution of the plugin. I'm
reasonably sure it's executing because I can see the print statements
from the generate method. Some things I wasn't sure about are
1. What to use as the parent? Line 2 was my best guess.
2. Are lines 4 and 6 necessary?
3. Is this whole approach wrong for using progress monitors?