diff options
author | Gergo Mocsi <gmocsi91@gmail.com> | 2013-07-24 17:27:02 +0200 |
---|---|---|
committer | Gergo Mocsi <gmocsi91@gmail.com> | 2013-09-02 18:16:48 +0200 |
commit | edcec5b1be9b224dbdfb4cd85c37148243f49389 (patch) | |
tree | 50a8afdb188079d03396df1dabbc43e1d1ec4b85 /include/basic | |
parent | 70ab744ccf047a90bee0506c6a60ade1935ece3d (diff) |
GSOC work, cache implementation fix, code fixes
The CodeCompleteDataCache got a new implementation: global variables are stored separately.
The "static const" OUString-s were removed from the class.
Data extraction is only done when pressing the dot key.
Change-Id: I3ff94c0c6eabe328761336d4c74744eb7efc6056
Diffstat (limited to 'include/basic')
-rw-r--r-- | include/basic/codecompletecache.hxx | 11 | ||||
-rw-r--r-- | include/basic/sbmod.hxx | 3 |
2 files changed, 8 insertions, 6 deletions
diff --git a/include/basic/codecompletecache.hxx b/include/basic/codecompletecache.hxx index 57ed673c13fa..480c3c1dcf4c 100644 --- a/include/basic/codecompletecache.hxx +++ b/include/basic/codecompletecache.hxx @@ -33,6 +33,7 @@ typedef boost::unordered_map< OUString, OUString, OUStringHash > CodeCompleteVar typedef boost::unordered_map< OUString, CodeCompleteVarTypes, OUStringHash > CodeCompleteVarScopes; /* procedure, CodeCompleteVarTypes */ + class BASIC_DLLPUBLIC CodeCompleteOptions { /* @@ -63,11 +64,9 @@ class BASIC_DLLPUBLIC CodeCompleteDataCache * */ private: CodeCompleteVarScopes aVarScopes; + CodeCompleteVarTypes aGlobalVars; public: - static const OUString GLOB_KEY; - static const OUString NOT_FOUND; - CodeCompleteDataCache(){} virtual ~CodeCompleteDataCache(){} @@ -76,9 +75,11 @@ public: void SetVars( const CodeCompleteVarScopes& aScopes ); const CodeCompleteVarScopes& GetVars() const; - void InsertProcedure( const OUString& sProcName, const CodeCompleteVarTypes& aVarTypes ); - OUString GetVariableType( const OUString& sVarName, const OUString& sProcName ) const; + void InsertGlobalVar( const OUString& sVarName, const OUString& sVarType ); + void InsertLocalVar( const OUString& sProcName, const OUString& sVarName, const OUString& sVarType ); + OUString GetVarType( const OUString& sVarName ); void print() const; // wrapper for operator<<, prints to std::cerr + void Clear(); }; #endif // CODECOMPLETECACHE_H diff --git a/include/basic/sbmod.hxx b/include/basic/sbmod.hxx index 5a77cfb9dd2d..b3e694bf624c 100644 --- a/include/basic/sbmod.hxx +++ b/include/basic/sbmod.hxx @@ -152,7 +152,8 @@ public: void RemoveVars(); ::com::sun::star::uno::Reference< ::com::sun::star::script::XInvocation > GetUnoModule(); bool createCOMWrapperForIface( ::com::sun::star::uno::Any& o_rRetAny, SbClassModuleObject* pProxyClassModuleObject ); - CodeCompleteDataCache GetCodeCompleteDataFromParse(); + //CodeCompleteDataCache GetCodeCompleteDataFromParse(); + void GetCodeCompleteDataFromParse(CodeCompleteDataCache& aCache); SbxArrayRef GetMethods(); }; |