GSOC work, code complete option, menu entry fixes

Menu entry is added under View->Enable Code Completition when in Experimental mode.
Fixed the call of funtion SbModule::GetCodeCompleteDataFromParse() to be called only when code completition is enabled.
Replaced the occurences of SvtMiscOptions to CodeCompleteOptions.

Change-Id: If0520123ab5f612d7d24fb98f8e9bf6881af76cb
This commit is contained in:
Gergo Mocsi
2013-07-23 12:42:37 +02:00
parent b0b511e9b5
commit 61ee2598b1
8 changed files with 104 additions and 20 deletions

View File

@@ -26,12 +26,31 @@
#include <boost/utility.hpp>
#include <boost/unordered_map.hpp>
#include <rtl/ustring.hxx>
#include <svtools/miscopt.hxx>
typedef boost::unordered_map< OUString, OUString, OUStringHash > CodeCompleteVarTypes;
/* variable name, type */
typedef boost::unordered_map< OUString, CodeCompleteVarTypes, OUStringHash > CodeCompleteVarScopes;
/* procedure, CodeCompleteVarTypes */
class BASIC_DLLPUBLIC CodeCompleteOptions
{
/*
* class to store basic code completition
* options
* */
private:
bool bIsCodeCompleteOn;
SvtMiscOptions aMiscOptions;
public:
CodeCompleteOptions();
static bool IsCodeCompleteOn();
static void SetCodeCompleteOn( const bool& b );
static bool IsExtendedTypeDeclaration();
};
class BASIC_DLLPUBLIC CodeCompleteDataCache
{
/*
@@ -48,7 +67,7 @@ public:
CodeCompleteDataCache(){}
virtual ~CodeCompleteDataCache(){}
friend std::ostream& operator<< (std::ostream& aStream, const CodeCompleteDataCache& aCache);
friend BASIC_DLLPUBLIC std::ostream& operator<< (std::ostream& aStream, const CodeCompleteDataCache& aCache);
void SetVars( const CodeCompleteVarScopes& aScopes );
const CodeCompleteVarScopes& GetVars() const;