summaryrefslogtreecommitdiff
path: root/include/basic
diff options
context:
space:
mode:
authorGergo Mocsi <gmocsi91@gmail.com>2013-06-21 14:10:31 +0200
committerGergo Mocsi <gmocsi91@gmail.com>2013-09-02 18:16:42 +0200
commit025e7ff3e16650097097b6a17cd259170979ef3c (patch)
tree48dead1451a86797889d73a347048418faceb9a7 /include/basic
parentf97d794654cbf80afa0e4a60cda8147e94c11908 (diff)
GSOC work week 2, getting infromation from variables and print on terminal
This is an early version. I use the BASIC parser to parse the source, then the infromation is extracted from the symbol table built by parser. Error reporting is suppressed, beacuse it is not needed fro code completition. I placed my function inside SbModule, and created a struct called CodeCompletitionData, which holds the object's name, it's parent, and it's type name. This function, SbMethod::GetCodeCompleteDataFromParse() is called from Basic IDE's Notify function, which updates a cache(actually, reassigns a viariable :) ). Later, in the EditorWindow::KeyInput function there is a check wheteher dot key is pressed. After that, the actual variable (or word) is being looked up in the vector that holds code completition data. And finally, if it is found, it's methods are printed on the terminal. Change-Id: Idaf19baa8f720b8b117a76dc3cc2f90dd04fd155
Diffstat (limited to 'include/basic')
-rw-r--r--include/basic/sbmod.hxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/basic/sbmod.hxx b/include/basic/sbmod.hxx
index f94e2c9e8a36..446397716dec 100644
--- a/include/basic/sbmod.hxx
+++ b/include/basic/sbmod.hxx
@@ -39,10 +39,18 @@ class SbProcedureProperty;
class SbIfaceMapperMethod;
class SbClassModuleObject;
+
class ModuleInitDependencyMap;
struct ClassModuleRunInitItem;
struct SbClassData;
+struct CodeCompleteData
+{
+ OUString sVarName;
+ OUString sVarParent;
+ OUString sVarType;
+};
+
class BASIC_DLLPUBLIC SbModule : public SbxObject, private ::boost::noncopyable
{
friend class SbiCodeGen;
@@ -132,6 +140,7 @@ 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 );
+ std::vector< CodeCompleteData > GetCodeCompleteDataFromParse();
};
SV_DECL_IMPL_REF(SbModule)