(item.CanGetItem()) {
101 const CObject* obj = seqSubmit;
104 if(
data.IsEntrys()) {
106 if(!entrys.empty()) {
107obj = entrys.front().GetPointerOrNull();
116item.SetLabel(sLabel);
120item.AddTag(
"open_discrepancy_dlg");
121item.AddTag(
"open_editing_buttons");
122item.AddTag(
"open_text_view");
127 static stringsid(
"single_project_mode_item_extension");
133 static stringslabel(
"Genome Workbench Single Project mode item extension");
146 static stringsid(
"indexer_app_mode_extension");
152 static stringslabel(
"Indexer application mode extension");
182 longstyle = wxFD_OPEN | wxFD_FILE_MUST_EXIST;
185wxFileDialog dlg(
NULL,
"Select ASN.1 File", wxGetCwd(), wxEmptyString, filter, style);
187 if(dlg.ShowModal() != wxID_OK)
190vector<wxString> fileNames = { dlg.GetPath() };
195 if(!srv->HasWorkspace())
196srv->CreateNewWorkspace();
205task->AddProjectItemExtra(
"SmartFile",
string(fileNames.front().ToUTF8()));
218vector<CGBDocument*> docs;
221 if(doc && doc->GetDataModified())
226srv->ResetWorkspace();
232 for(
autodoc : docs) {
239 if(smartFile.empty())
continue;
240files[so] = smartFile;
243 if(!files.
empty()) {
244wxString fileNames,
msg=
wxT(
"Want to save changes to "), delim;
245 for(
auto&
f: files) {
246wxFileName fname(wxString::FromUTF8(
f.second.c_str()));
247 msg+= delim + fname.GetFullName();
252wxMessageDialog msgBox(
nullptr,
msg,
wxT(
"Gemome Workbech"), wxYES_NO | wxCANCEL | wxICON_QUESTION);
253msgBox.SetYesNoLabels(wxID_SAVE,
_(
"Do&n't save"));
255 int result= msgBox.ShowModal();
256 if(
result== wxID_CANCEL)
259 if(
result== wxID_YES) {
260 for(
auto f: files) {
262wxString fileName = wxString::FromUTF8(
f.second.c_str());
270 catch(
constexception& e) {
274 if(!errMsg.empty()) {
275wxMessageBox(
wxT(
"File: ") + fileName +
wxT(
"\nError: ") +
ToWxString(errMsg),
276 wxT(
"Failed to save file"), wxOK | wxICON_ERROR);
283srv->ResetWorkspace();
User-defined methods of the data storage class.
User-defined methods of the data storage class.
CExtensionDeclaration - static declaration helper.
static wxString GetDialogFilter(EFileType fileType)
void OnCloseWorkspace(wxCommandEvent &event)
virtual void SetWorkbench(CWorkbench *wb)
virtual string GetModeName() const
void OnFileOpen(wxCommandEvent &event)
CIndexerAppModeExtension()
class CIndexerAppModeExtension
virtual string GetExtensionLabel() const
returns a displayable label for this extension ( please capitalize the key words - "My Extension" )
virtual string GetExtensionIdentifier() const
returns the unique human-readable identifier for the extension the id should use lowercase letters se...
class CIndexerProjectItemExtension
virtual void ProjectItemCreated(objects::CProjectItem &item, IServiceLocator *service_locator)
virtual string GetExtensionLabel() const
returns a displayable label for this extension ( please capitalize the key words - "My Extension" )
CIndexerProjectItemExtension()
virtual void ProjectItemDetached(objects::CProjectItem &, CGBDocument &, IServiceLocator *)
virtual string GetExtensionIdentifier() const
returns the unique human-readable identifier for the extension the id should use lowercase letters se...
virtual void ProjectItemAttached(objects::CProjectItem &, CGBDocument &, IServiceLocator *)
static void SetSaveFilePath(bool save)
CProjectService - a service providing API for operations with Workspaces and Projects.
CProjectSelectOptions - describes how new Project Items shall be added to a workspace.
void Set_CreateNewProject(const string &folder=kEmptyStr)
bool IsEntrys(void) const
Base class for all serializable objects.
Template class for iteration on objects of class C (non-medifiable version)
Template class for iteration on objects of class C.
CWorkbench - default implementation of IWorkbench.
IExtension IExtension interface represents an abstract pluggable component.
IServiceLocator - an abstract mechanism for locating services.
const string & GetMsg(void) const
Get message string.
virtual const char * what(void) const noexcept
Standard report (includes full backlog).
CIRef< T > GetServiceByType()
retrieves a typed reference to a service, the name of C++ type is used as the name of the service.
virtual CAppTaskService * GetAppTaskService()
void AddTask(IAppTask &task)
Add a task to the queue.
static void GetLabel(const CObject &obj, string *label, ELabelType type=eDefault)
#define MSerial_AsnText
I/O stream manipulators â.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::ofstream CNcbiOfstream
Portable alias for ofstream.
bool IsSubmit(void) const
Check if variant Submit is selected.
const TSubmit & GetSubmit(void) const
Get the variant data.
list< CRef< CSeq_entry > > TEntrys
const TData & GetData(void) const
Get the Data member data.
bool CanGetData(void) const
Check if it is safe to call GetData method.
#define EXT_POINT__OPEN_PROJECT_VIEW_EXTENSION
#define EXT_POINT__PROJECT_ITEM_EXTENSION
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
wxString ToWxString(const string &s)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4