Progress indicator question

Hello all,

I'm using a progress indicator as shown below:

ApplicationManager.getApplication().runProcessWithProgressSynchronously(new Runnable() {
public void run() {
final ProgressIndicator indicator = ProgressManager.getInstance().getProgressIndicator();
...
}
}, "Some action", true, project);

I would like to make this process background as it is possible with ant or compile actions.
How to do this?

Thanks in advance.

9 comments

There are many subclasses of ProgressIndicator in idea.jar. You will be
using unsupported API, but to use these you simply add idea.jar to your
IDEA JDK entry.

oleg wrote:

Hello all,

I'm using a progress indicator as shown below:

ApplicationManager.getApplication().runProcessWithProgressSynchronously(new Runnable() {
public void run() {
final ProgressIndicator indicator = ProgressManager.getInstance().getProgressIndicator();
..
}
}, "Some action", true, project);

I would like to make this process background as it is possible with ant or compile actions.
How to do this?

Thanks in advance.

0

Thanks!

However, could you give an example how to use subclasses of ProgressIndicator in the idea.jar. I tried but I could not use them.

Thanks in advance.

0

You'll need to add idea.jar to your IDEA JDK entry. Is this the problem?

Oleg Gopaniouk wrote:

Thanks!

However, could you give an example how to use subclasses of ProgressIndicator in the idea.jar. I tried but I could not use them.

Thanks in advance.

0

No.

Could you give a piece of code using the classes?
I could not figure out how the classes should be used.

Thanks in advance.

0

I use one of them for a Find Usages panel like this:

final ProgressIndicator progressIndicator = new
FindProgressIndicator(project, viewPresentation.getScopeText());
processPresentation.setProgressIndicatorFactory(new
Factory]]>() {
public ProgressIndicator create() {
return progressIndicator;
}
});

Oleg Gopaniouk wrote:

No.

Could you give a piece of code using the classes?
I could not figure out how the classes should be used.

Thanks in advance.

0

Could you explain to me what are variables processPresentation and viewPresentation?

Thanks in advance.

0

Oleg Gopaniouk wrote:

Could you explain to me what are variables processPresentation and viewPresentation?

Thanks in advance.


They are specific to Find Usages View. I suspect this is all the help I
can give you.

0

Do you use this inside the runProcessWithProgressSynchronously ?

I do the following:

ApplicationManager.getApplication().runProcessWithProgressSynchronously(new Runnable() {
public void run() {
final ProgressIndicator indicator = ProgressManager.getInstance().getProgressIndicator();
...
} ,"My action",true,project);

I want to have the background button on the dialog.
It is possible to use the FindProgressIndicator inside the runProcessWithProgressSynchronously?

If so then please tell me how to do this.

Thanks in advance.

0

Oleg Gopaniouk wrote:

Do you use this inside the runProcessWithProgressSynchronously ?

I do the following:

ApplicationManager.getApplication().runProcessWithProgressSynchronously(new Runnable() {
public void run() {
final ProgressIndicator indicator = ProgressManager.getInstance().getProgressIndicator();
...
} ,"My action",true,project);

I want to have the background button on the dialog.
It is possible to use the FindProgressIndicator inside the runProcessWithProgressSynchronously?

If so then please tell me how to do this.

Thanks in advance.


I don't know. You shoudl file a request in jira to document this API .

0

Please sign in to leave a comment.