* @throws CoreException if the document can not be stored
*
* @author Andreas Br�ker
*/
public void doSaveAs(Shell shell) throws CoreException {
OfficeSaveAsDialog dialog = new OfficeSaveAsDialog(shell, document);
IPath path = null;
if(editorPart.getEditorInput() instanceof IPathEditorInput)
path = ((IPathEditorInput)editorPart.getEditorInput()).getPath();
if (path != null)
dialog.setOriginalFile(path);
dialog.create();
if (dialog.open() == Window.CANCEL) {
return;
}
final IPath filePath = dialog.getResult();
final IFilter filter = dialog.getFilter();
final IContainer targetContainer = dialog.getTargetContainer();
if (filePath == null)
return;
try {
EditorUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().run(true, false, new IRunnableWithProgress() {