Shyam Kumar Sundarakumar
Shyam Kumar Sundarakumar

Reputation: 5787

Updating ProgressMonitor from non-plugin library in Eclipse

I have a scenario where I have a Java project (MyLibrary), which is supposed to be a "pure" Java project with no reference to Eclipse SDK.

I have another project (MyPlugin) which is a Plugin project and it uses MyLibrary. When calling MyLibrary, the plugin project utilises a ProgressMonitor.

I am unable to pass the object from MyPlugin to MyLibrary as the latter doesn't have any reference to Eclipse.

How can I update the progress from MyLibrary?

Upvotes: 0

Views: 33

Answers (1)

greg-449
greg-449

Reputation: 111217

Add a progress monitor interface to your MyLibrary (IMyProgressMonitor for example) that the methods in your library expect to receive.

Your plugin can then implement IMyProgressMonitor and just call the corresponding methods on the IProgressMonitor you have from Eclipse.

Upvotes: 1

Related Questions