AbstractVcsHelper

I am using the reformatAndOptimizeImports method in the following way...
when I do that I get the attached message and the file does not get
optimized or reformatted. What could be wrong here ? the only suspect seems
like the runnable implementation. What does the vcs API expect it to do ?

Thanks in advance,
Dash.


Runnable runnable = new Runnable() {
public void run() {
}
};

final AbstractVcsHelper vcsHelper =
AbstractVcsHelper.getInstance(myProject);
vcsHelper.optimizeImportsAndReformatCode(
((CheckinProjectPanel)
d.getCheckinProjectPanel()).getVirtualFiles(), vcs.getConfiguration(),
runnable, true);
vcsHelper.doCheckinProject(d.getCheckinProjectPanel(),
d.getComment());





Attachment(s):
cache.PNG
1 comment

Try this:
final AbstractVcsHelper vcsHelper =
AbstractVcsHelper.getInstance(myProject);

Runnable runnable = new Runnable() {
public void run() {
vcsHelper.doCheckinProject(d.getCheckinProjectPanel(),
d.getComment());
}
};

vcsHelper.optimizeImportsAndReformatCode(
((CheckinProjectPanel)
d.getCheckinProjectPanel()).getVirtualFiles(), vcs.getConfiguration(),
runnable, true);

--
Best regards,
Olesya Smirnova
JetBrains, Inc / IntelliJ Software
http://www.intellij.com
"Develop with pleasure!"


"Debabrata Dash" <dash@arcsightnospam.com> wrote in message
news:bqjhtp$gj7$1@is.intellij.net...

I am using the reformatAndOptimizeImports method in the following

way...

when I do that I get the attached message and the file does not get
optimized or reformatted. What could be wrong here ? the only suspect

seems

like the runnable implementation. What does the vcs API expect it to do ?

>

Thanks in advance,
Dash.

>
>

Runnable runnable = new Runnable() {
public void run() {
}
};

>

final AbstractVcsHelper vcsHelper =
AbstractVcsHelper.getInstance(myProject);
vcsHelper.optimizeImportsAndReformatCode(
((CheckinProjectPanel)
d.getCheckinProjectPanel()).getVirtualFiles(), vcs.getConfiguration(),
runnable, true);
vcsHelper.doCheckinProject(d.getCheckinProjectPanel(),
d.getComment());

>
>
>


0

Please sign in to leave a comment.