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

« back to all changes in this revision

Viewing changes to Plugin/custombuildrequest.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:
1
1
//////////////////////////////////////////////////////////////////////////////
2
2
//////////////////////////////////////////////////////////////////////////////
3
3
//
4
 
// copyright            : (C) 2008 by Eran Ifrah                            
5
 
// file name            : custombuildrequest.cpp              
6
 
//                                                                          
 
4
// copyright            : (C) 2008 by Eran Ifrah
 
5
// file name            : custombuildrequest.cpp
 
6
//
7
7
// -------------------------------------------------------------------------
8
 
// A                                                                        
9
 
//              _____           _      _     _ _                            
10
 
//             /  __ \         | |    | |   (_) |                           
11
 
//             | /  \/ ___   __| | ___| |    _| |_ ___                      
12
 
//             | |    / _ \ / _  |/ _ \ |   | | __/ _ )                     
13
 
//             | \__/\ (_) | (_| |  __/ |___| | ||  __/                     
14
 
//              \____/\___/ \__,_|\___\_____/_|\__\___|                     
15
 
//                                                                          
16
 
//                                                  F i l e                 
17
 
//                                                                          
18
 
//    This program is free software; you can redistribute it and/or modify  
19
 
//    it under the terms of the GNU General Public License as published by  
20
 
//    the Free Software Foundation; either version 2 of the License, or     
21
 
//    (at your option) any later version.                                   
22
 
//                                                                          
 
8
// A
 
9
//              _____           _      _     _ _
 
10
//             /  __ \         | |    | |   (_) |
 
11
//             | /  \/ ___   __| | ___| |    _| |_ ___
 
12
//             | |    / _ \ / _  |/ _ \ |   | | __/ _ )
 
13
//             | \__/\ (_) | (_| |  __/ |___| | ||  __/
 
14
//              \____/\___/ \__,_|\___\_____/_|\__\___|
 
15
//
 
16
//                                                  F i l e
 
17
//
 
18
//    This program is free software; you can redistribute it and/or modify
 
19
//    it under the terms of the GNU General Public License as published by
 
20
//    the Free Software Foundation; either version 2 of the License, or
 
21
//    (at your option) any later version.
 
22
//
23
23
//////////////////////////////////////////////////////////////////////////////
24
24
//////////////////////////////////////////////////////////////////////////////
25
25
 
56
56
        BuildSettingsConfig *bsc(manager ? manager->GetBuildSettingsConfigManager() : BuildSettingsConfigST::Get());
57
57
        Workspace *w(manager ? manager->GetWorkspace() : WorkspaceST::Get());
58
58
        EnvironmentConfig *env(manager ? manager->GetEnv() : EnvironmentConfig::Instance());
59
 
        
 
59
 
60
60
        ProjectPtr proj = w->FindProjectByName(m_info.GetProject(), errMsg);
61
61
        if (!proj) {
62
62
                AppendLine(wxT("Cant find project: ") + m_info.GetProject());
66
66
 
67
67
        // Notify plugins that a compile process is going to start
68
68
        wxCommandEvent event(wxEVT_BUILD_STARTING);
69
 
        
 
69
 
70
70
        wxString pname (proj->GetName());
71
71
        event.SetClientData((void*)&pname);
72
 
        
 
72
        event.SetString( m_info.GetConfiguration() );
 
73
 
73
74
        // since this code can be called from inside the application OR
74
75
        // from inside a DLL, we use the application pointer from the manager
75
76
        // when available, otherwise, events will not be processed inside
77
78
        wxApp *app = manager ? manager->GetTheApp() : wxTheApp;
78
79
        app->ProcessEvent(event);
79
80
 
 
81
        if(app->ProcessEvent(event)){
 
82
 
 
83
                // the build is being handled by some plugin, no need to build it
 
84
                // using the standard way
 
85
                SetBusy(false);
 
86
                return;
 
87
        }
 
88
 
80
89
        SendStartMsg();
81
90
 
82
91
        //TODO:: make the builder name configurable
188
197
 
189
198
        BuildManager *bm(manager ? manager->GetBuildManager() : BuildManagerST::Get());
190
199
        Workspace *w(manager ? manager->GetWorkspace() : WorkspaceST::Get());
191
 
        
 
200
 
192
201
        // collect all enabled commands
193
202
        BuildCommandList::iterator iter = preBuildCmds.begin();
194
203
        for (; iter != preBuildCmds.end(); iter ++) {