~ubuntu-branches/ubuntu/karmic/codelite/karmic

« back to all changes in this revision

Viewing changes to LiteEditor/manager.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Chow Loong Jin
  • Date: 2009-08-15 17:42:43 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20090815174243-nlb9ikgigbiybz12
Tags: 1.0.2893+dfsg-0ubuntu1
* debian/rules:
  + Tidy up get-orig-source rule
* debian/control:
  + Bump Standards-Version
  + Change Maintainer email address to @ubuntu.com
  + Drop cdbs build-dependency
* debian/copyright:
  + Update to DEP-5 format
* debian/patches/00_add-fPIC.patch:
  + Dropped, fix upstream
* Closes LP: #413992

Show diffs side-by-side

added added

removed removed

Lines of Context:
203
203
                if ( SessionManager::Get().FindSession ( path, session ) ) {
204
204
                        SessionManager::Get().SetLastWorkspaceName ( path );
205
205
                        Frame::Get()->GetMainBook()->RestoreSession(session);
 
206
                        GetBreakpointsMgr()->LoadSession(session);
206
207
                }
207
208
        }
208
209
 
225
226
        SessionEntry session;
226
227
        session.SetWorkspaceName ( WorkspaceST::Get()->GetWorkspaceFileName().GetFullPath() );
227
228
        Frame::Get()->GetMainBook()->SaveSession(session);
 
229
        GetBreakpointsMgr()->SaveSession(session);
228
230
        SessionManager::Get().Save ( WorkspaceST::Get()->GetWorkspaceFileName().GetFullPath(), session );
229
231
 
230
232
        // since we closed the workspace, we also need to set the 'LastActiveWorkspaceName' to be
302
304
        WorkspaceST::Get()->AddProjectToBuildMatrix ( proj );
303
305
        ProjectSettingsPtr settings = proj->GetSettings();
304
306
 
305
 
        //set the compiler type
 
307
        // set the compiler type
306
308
        ProjectSettingsCookie cookie;
307
309
        BuildConfigPtr bldConf = settings->GetFirstBuildConfiguration ( cookie );
308
310
        while ( bldConf ) {
311
313
        }
312
314
        proj->SetSettings ( settings );
313
315
 
314
 
        //copy the files as they appear in the source project
 
316
        // copy the files as they appear in the source project
315
317
        proj->SetFiles ( data.m_srcProject );
316
318
 
 
319
        // copy plugins data
 
320
        std::map<wxString, wxString> pluginsData;
 
321
        data.m_srcProject->GetAllPluginsData( pluginsData );
 
322
        proj->SetAllPluginsData( pluginsData );
 
323
 
317
324
        {
318
325
                // copy the actual files from the template directory to the new project path
319
326
                DirSaver ds;
335
342
 
336
343
void Manager::AddProject ( const wxString & path )
337
344
{
 
345
        // create a workspace if there is non
 
346
        if ( IsWorkspaceOpen() == false ) {
 
347
 
 
348
                wxFileName fn(path);
 
349
 
 
350
                //create a workspace before creating a project
 
351
                CreateWorkspace ( fn.GetName(), fn.GetPath() );
 
352
        }
 
353
 
338
354
        wxString errMsg;
339
355
        bool res = WorkspaceST::Get()->AddProject ( path, errMsg );
340
356
        if ( !res ) {
819
835
 
820
836
        //set a dir saver point
821
837
        wxFileName fn ( fileName );
822
 
        wxArrayString files(1, fn.GetFullPath());
 
838
        wxArrayString files;
 
839
        files.Add(fn.GetFullPath());
823
840
 
824
841
        //remove the file from the source project
825
842
        wxString errMsg;
2040
2057
                if ( reason == DBG_RECV_SIGNAL_EXC_BAD_ACCESS ) {
2041
2058
                        signame = wxT ( "EXC_BAD_ACCESS" );
2042
2059
                }
2043
 
                DebugMessage ( _ ( "Program Received signal " ) + signame + _ ( "\n" ) );
2044
 
                wxMessageBox ( _ ( "Program Received signal " ) + signame + _ ( "\n" ) +
2045
 
                               _ ( "Stack trace is available in the 'Stack' tab\n" ),
2046
 
                               wxT ( "CodeLite" ), wxICON_ERROR|wxOK );
 
2060
                DebugMessage ( _("Program Received signal ") + signame + _("\n") );
 
2061
                wxMessageDialog dlg( Frame::Get(), _("Program Received signal ") + signame + wxT("\n") +
 
2062
                               _("Stack trace is available in the 'Stack' tab\n"),
 
2063
                               wxT("CodeLite"), wxICON_ERROR|wxOK );
 
2064
                dlg.ShowModal();
2047
2065
 
2048
2066
                //Print the stack trace
2049
 
                wxAuiPaneInfo &info = Frame::Get()->GetDockingManager().GetPane ( wxT ( "Debugger" ) );
 
2067
                wxAuiPaneInfo &info = Frame::Get()->GetDockingManager().GetPane ( wxT("Debugger") );
2050
2068
                if ( info.IsShown() ) {
2051
2069
                        Frame::Get()->GetDebuggerPane()->SelectTab ( DebuggerPane::FRAMES );
2052
2070
                        UpdateDebuggerPane();
2083
2101
        DbgUnMarkDebuggerLine();
2084
2102
        m_dbgCanInteract = false;
2085
2103
        DebugMessage ( _ ( "Continuing...\n" ) );
 
2104
 
 
2105
        // Reset the debugger call-stack pane
 
2106
  Frame::Get()->GetDebuggerPane()->GetFrameListView()->Clear();
 
2107
  Frame::Get()->GetDebuggerPane()->GetFrameListView()->SetCurrentLevel(0);
2086
2108
}
2087
2109
 
2088
2110
void Manager::UpdateBpAdded(const int internal_id, const int debugger_id)
2304
2326
 
2305
2327
        wxArrayString lines;
2306
2328
        CompileRequest *cr = dynamic_cast<CompileRequest*> ( m_shellProcess );
2307
 
        if ( cr ) {
2308
 
                if ( !cr->GetLines ( lines ) ) {
 
2329
        CustomBuildRequest *cbr = dynamic_cast<CustomBuildRequest*> ( m_shellProcess );
 
2330
        if ( cr || cbr ) {
 
2331
                if ( cr && !cr->GetLines ( lines ) ) {
 
2332
                        return false;
 
2333
                }
 
2334
                if ( cbr && !cbr->GetLines ( lines ) ) {
2309
2335
                        return false;
2310
2336
                }
2311
2337
 
2312
2338
                //check every line to see if we got an error/warning
2313
 
                wxString project ( cr->GetProjectName() );
 
2339
                wxString project ( cr ? cr->GetProjectName() : cbr->GetProjectName() );
2314
2340
 
2315
2341
                // TODO :: change the call to ' GetProjBuildConf' to pass the correct
2316
2342
                // build configuration