5.1 OpenApi problems in CheckinProjectDialogImplementer hasDiff()

Hello,

I am trying to fix an AccuRev plugin and I am having a problem
Although I see that IDEA can identify code changes (tab colors, side colors
in changed lines etc.), I always get false in hasDiff() method of CheckinProjectDialogImplementer
In the code below, I always get into the if statement, and when I tried
knocking it down and show the dialog (d.show()) I get a dialog with no
files in it
What am I doing something wrong OR is it a bug?

code:
public class CheckinProjectHandler {
private Module myModule;
private Project myProject;

public CheckinProjectHandler(Module module, Project project) {
myModule = module;
myProject = project;
}

public void execute() {
((com.intellij.openapi.fileEditor.FileDocumentManager) com.intellij.openapi.fileEditor.FileDocumentManager.getInstance()).saveAllDocuments();
ModuleLevelVcsManager instance = ModuleLevelVcsManager.getInstance(myModule);

final CheckinProjectDialogImplementer d = instance.createCheckinProjectDialog(instance.getActiveVcs().getCheckinEnvironment());

try {
d.analyzeChanges(true, null);
} catch (VcsException e) {
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
}

if (!d.hasDiffs()) {
Messages.showMessageDialog(myProject, "Nothing was found to check in", "Nothing Found", (javax.swing.Icon) com.intellij.openapi.ui.Messages.getInformationIcon());

d.dispose();
return;
}

d.show();

.....

Thank you,
Ilan

Please sign in to leave a comment.