This question is already posted in link Java Eclipse plugin Development - Save all project's files programmatically
I was trying with the below code but it is not working/ So I have the query that what entry I would required to add in plugin.xml so that as I use ctrl+s or ctrl+all+ save icon below should start working. Or its better if I got complete example.
import org.eclipse.core.resources.IProject;
@SuppressWarnings("restriction")
public class SaveOpenFilesHandler extends org.eclipse.debug.internal.ui.launchConfigurations.SaveScopeResourcesHandler
{
public void showSaveDialog(IProject project)
{
super.showSaveDialog(new IProject[] {project}, true, true);
super.doSave();
}
}