void PartTester::TestEditor(IEditorPart::Pointer part) { TestWorkbenchPart(part); if (!(part->GetSite() == part->GetEditorSite().GetPointer())) throw Poco::AssertionViolationException("The part's editor site must be the same as the part's site"); //$NON-NLS-1$ IEditorInput::Pointer input = part->GetEditorInput(); if (input.IsNull()) throw Poco::AssertionViolationException("The editor input must be non-null"); //$NON-NLS-1$ TestEditorInput(input); part->IsDirty(); part->IsSaveAsAllowed(); part->IsSaveOnCloseNeeded(); }
void run() override { editor->GetSite()->GetPage()->CloseEditor(editor, false); delete this; }