vcs api
Few api questions I have regarding the api
1. Is there some sample code or documentation as to show how custom
fileviews are implemented ?
2. In Cvs when you check in the panel has options to optimize import etc..
What is the api for those options ?
3. Is there anyway we can use the AbstractVcs.getVcsHistoryProvider to show
the file history ? If not, what is the purpose of that class ?
-Dash.
Please sign in to leave a comment.
Debabrata Dash wrote:
Looks to me like that API is not opened yet.
--
Erb
==============================================================
"Most of you are familiar with the virtues of a programmer.
There are three, of course: laziness, impatience, and hubris."
- Larry Wall
==============================================================
Not yet... I'll implement a sample (based on local history)
This options are stored in VcsConfiguration
public boolean OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT = false;
public boolean OPTIMIZE_IMPORTS_BEFORE_FILE_COMMIT = false;
public boolean REFORMAT_BEFORE_PROJECT_COMMIT = false;
public boolean REFORMAT_BEFORE_FILE_COMMIT = false;
AbstractVCSHelper performs import and reformat with method
optimizeImportsAndReformatCode
show
Include action with id="Vcs.ShowHistory" to some action group and (if VCS
returns VcsHistoryProvider) the action will be enabled
--
Best regards,
Olesya Smirnova
JetBrains, Inc / IntelliJ Software
http://www.intellij.com
"Develop with pleasure!"
"Debabrata Dash" <dash@arcsightnospam.com> wrote in message
news:bp9ho4$8pf$1@is.intellij.net...
>
>
>
show
>
>
>
I won't bother opening a bug for this:
You're going to open openapi.vcs.history in the next build, right?
Olesya Smirnova (JetBrains) wrote:
>>1. Is there some sample code or documentation as to show how custom
>>fileviews are implemented ?
>>2. In Cvs when you check in the panel has options to optimize import etc..
>>What is the api for those options ?
>>3. Is there anyway we can use the AbstractVcs.getVcsHistoryProvider to
>>the file history ? If not, what is the purpose of that class ?
--
Erb
==============================================================
"Most of you are familiar with the virtues of a programmer.
There are three, of course: laziness, impatience, and hubris."
- Larry Wall
==============================================================
It should be in open api, of course. Thanks
--
Best regards,
Olesya Smirnova
JetBrains, Inc / IntelliJ Software
http://www.intellij.com
"Develop with pleasure!"
"Erb" <dont@evenbother.com> wrote in message
news:bpdg6g$22b$1@is.intellij.net...
>
etc..
VCS
>
>
>
Here is my code snippet for this.
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());
This code doesn't do any formatting or optimizing the import of the files before checking in. Also I get the attached error message. The suspect seems to be the runnable. What does the vcs system expect the runnable to do ?
Thanks,
Dash.
Attachment(s):
cache.PNG
Reformating and optimazing imports are anisochronous actions so you should
perform checking in after they will be finished (in the runnable)
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@arcsight.com> wrote in message
news:25334253.1070443068916.JavaMail.javamailuser@localhost...
>
>
AbstractVcsHelper.getInstance(myProject);
d.getCheckinProjectPanel()).getVirtualFiles(), vcs.getConfiguration(),
runnable, true);
d.getComment());
>
>
before checking in. Also I get the attached error message. The suspect seems
to be the runnable. What does the vcs system expect the runnable to do ?
>
>
>
Thanks Olesya! that fixed it.
-Dash.
"Olesya Smirnova (JetBrains)" <lesya@intellij.com> wrote in message
news:bqkrtj$3nj$1@is.intellij.net...
>
>
>
>
>
>
>
>
>
>
files
seems
>
>