~ubuntu-branches/ubuntu/maverick/codelite/maverick

« back to all changes in this revision

Viewing changes to CodeLite/language.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Chow Loong Jin
  • Date: 2009-04-30 02:46:27 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090430024627-7xp71gerfvw00xtt
Tags: 1.0.2822+dfsg-0ubuntu1
* New upstream release (LP: #369466)
* debian/copyright:
  + Added Files section for sdk/wxpropgrid
  + Made license text RFC compliant (add . for empty lines)
* debian/control:
  + Bump Standards-Version to 3.8.1
* debian/patches/02_fix-desktop.patch,
  + Refreshed to patch cleanly
* debian/*.install,
  debian/codelite.dirs,
  debian/codelite.links,
  debian/patches/03_fix-sh.patch,
  debian/patches/04_change-installpath.patch,
  + Updated for new upstream directory structure
  + Patches dropped, no longer needed.
* debian/patches/03_cstdio-include.patch,
  + Include cstdio for C++ and stdio.h for C, since it seems to be missing
* debian/codelite.menu,
  debian/*.1,
  debian/codelite.manpages:
  + Updated to reflect change in command names
    - CodeLite    => codelite
    - le_exec     => codelite_exec
    - le_dos2unix => codelite_fix_files
    - le_killproc => codelite_kill_children
* debian/README.source,
  debian/rules,
  debian/copyright:
  + Remove sdk/curl from the list of excluded files, since it doesn't exist
    any more

Show diffs side-by-side

added added

removed removed

Lines of Context:
368
368
                                accumulatedScope << wxT("<global>");
369
369
                        }
370
370
 
 
371
                        wxString originalScopeName(scopeToSearch);
371
372
                        if (op == wxT("::")) {
372
373
                                //if the operator was something like 'Qualifier::', it is safe to assume
373
374
                                //that the secope to be searched is the full expression
374
375
                                scopeToSearch = accumulatedScope;
375
376
                        }
376
377
 
377
 
                        //get the derivation list of the typename
 
378
                        // get the derivation list of the typename
378
379
                        bool res(false);
379
380
                        wxString _name(_U(result.m_name.c_str()));
380
381
                        PERF_BLOCK("TypeFromName") {
381
 
                                res = TypeFromName(     _name,
382
 
                                                    visibleScope,
383
 
                                                    lastFuncSig,
384
 
                                                    scopeToSearch,
385
 
                                                    additionalScopes,
386
 
                                                    parentTypeName.IsEmpty(),
387
 
                                                    typeName,   //output
388
 
                                                    typeScope); //output
 
382
                                for (int i=0; i<2; i++) {
 
383
                                        res = TypeFromName(     _name,
 
384
                                                            visibleScope,
 
385
                                                            lastFuncSig,
 
386
                                                            scopeToSearch,
 
387
                                                            additionalScopes,
 
388
                                                            parentTypeName.IsEmpty(),
 
389
                                                            typeName,   //output
 
390
                                                            typeScope); //output
 
391
 
 
392
                                        if (!res && originalScopeName.IsEmpty() == false) {
 
393
                                                // the scopeToSearch was modified earlier with the accumulated scope
 
394
                                                // restore the search scope and try again
 
395
                                                scopeToSearch = originalScopeName;
 
396
                                                continue;
 
397
                                        }
 
398
                                        break;
 
399
                                }
389
400
                        }
390
401
 
391
402
                        if (!res) {
929
940
                                // try the typeScope in any of the "using namespace XXX" declarations
930
941
                                // passed here (i.e. moreScopes variable)
931
942
                                wxString newScope(moreScopes.at(i));
932
 
                                if(typeScope != wxT("<global>")) {
 
943
                                if (typeScope != wxT("<global>")) {
933
944
                                        newScope << wxT("::") << typeScope;
934
945
                                }
935
946
 
941
952
 
942
953
                //if we are here, it means that the more scopes did not matched any, try the parent scope
943
954
                tags.clear();
944
 
                if (DoSearchByNameAndScope(type, parentScope, tags, type, typeScope)) {
945
 
                        return true;
 
955
 
 
956
                wxString tmpParentScope(parentScope);
 
957
                wxString cuttedScope(tmpParentScope);
 
958
 
 
959
                tmpParentScope.Replace(wxT("::"), wxT("@"));
 
960
 
 
961
                cuttedScope.Trim().Trim(false);
 
962
                while ( !cuttedScope.IsEmpty() ) {
 
963
 
 
964
                        // try all the scopes of thse parent:
 
965
                        // for example:
 
966
                        // assuming the parent scope is A::B::C
 
967
                        // try to match:
 
968
                        // A::B::C
 
969
                        // A::B
 
970
                        // A
 
971
                        tags.clear();
 
972
                        if (DoSearchByNameAndScope(type, cuttedScope, tags, type, typeScope)) {
 
973
                                return true;
 
974
                        }
 
975
 
 
976
                        // get the next scope to search
 
977
                        cuttedScope = tmpParentScope.BeforeLast(wxT('@'));
 
978
                        cuttedScope.Replace(wxT("@"), wxT("::"));
 
979
                        cuttedScope.Trim().Trim(false);
 
980
 
 
981
                        tmpParentScope = tmpParentScope.BeforeLast(wxT('@'));
946
982
                }
947
983
 
948
984
                //still no match?