a way to do that, but I cannot get it working (there are open dirty editors looped there, which is possibly causing trouble for me). I would like to ask where is the implementation code for saving a modified file?
Kristjan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No, I am not developing a plugin, I am actually trying to solve a problem with saving compare results in ClearCase plugin.
Maybe we can override method saveChanges in net.sourceforge.eclipseccase.ui.compare.VersionCompareInput from its superclass org.eclipse.compare.CompareEditorInput with the following:
Here is the
This is the code used by another implementation of compare editor input ResourceCompareInput that I think is used e.g. by the Eclipse SVN plugin. Do you think that the refresh is needed here?
Kristjan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Good news I really need developer resources in this project :-) Currently I am the only one developing and I have a lot of features people want implemented.
but could not see the code you are referring to. What feature is missing in the saveChanges() in the superclass?
The code looks ok to me but I guess we need some more investigation.
By the way if you want to present yourself please send me an email (mikaelpetterson at hotmail dot com) and tell me about yourself and what you like developing (of course this is not mandatory but nice when working in the team).
//mike
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi!
I am playing with ClearCase plugin source code and I am trying to save a modified file. I found from
net.sourceforge.eclipseccase.ui.actions.ClearCaseAction.saveModifiedResources(..)
a way to do that, but I cannot get it working (there are open dirty editors looped there, which is possibly causing trouble for me). I would like to ask where is the implementation code for saving a modified file?
Kristjan
Hi,
Are you also developing a plugin? What kind?
Here is the code for saving modified resources:
IRunnableWithProgress createSaveModifiedResourcesRunnable(final IFile dirtyFiles) {
return new IRunnableWithProgress() {
public void run(final IProgressMonitor pm) {
IEditorPart editorsToSave = getDirtyEditors(getShell());
pm.beginTask("saving modified resources", editorsToSave.length); //$NON-NLS-1$
try {
List dirtyFilesList = Arrays.asList(dirtyFiles);
for (int i = 0; i < editorsToSave.length; i++) {
if (editorsToSave_.getEditorInput() instanceof IFileEditorInput) {
IFile dirtyFile = ((IFileEditorInput) editorsToSave.getEditorInput()).getFile();
if (dirtyFilesList.contains((dirtyFile))) {
editorsToSave.doSave(new SubProgressMonitor(pm, 1));
}
}
pm.worked(1);
}
} finally {
pm.done();
}
}
};
}
//mike_
Hi again!
No, I am not developing a plugin, I am actually trying to solve a problem with saving compare results in ClearCase plugin.
Maybe we can override method saveChanges in net.sourceforge.eclipseccase.ui.compare.VersionCompareInput from its superclass org.eclipse.compare.CompareEditorInput with the following:
Here is the
This is the code used by another implementation of compare editor input ResourceCompareInput that I think is used e.g. by the Eclipse SVN plugin. Do you think that the refresh is needed here?
Kristjan
Hi Kristjan,
Good news I really need developer resources in this project :-) Currently I am the only one developing and I have a lot of features people want implemented.
Anyway I looked at the code in svn:
http://dev.eclipse.org/viewcvs/viewvc.cgi/trunk/org.eclipse.team.svn.ui/src/org/eclipse/team/svn/ui/compare/?root=Technology_SUBVERSIVE
but could not see the code you are referring to. What feature is missing in the saveChanges() in the superclass?
The code looks ok to me but I guess we need some more investigation.
By the way if you want to present yourself please send me an email (mikaelpetterson at hotmail dot com) and tell me about yourself and what you like developing (of course this is not mandatory but nice when working in the team).
//mike
Hi,
I checked a bit yesterday and I think we should try your code.
br,
//mike