summaryrefslogtreecommitdiff
path: root/basctl/source/basicide/codecompleteoptionsdlg.cxx
diff options
context:
space:
mode:
authorGergo Mocsi <gmocsi91@gmail.com>2013-07-25 19:12:37 +0200
committerGergo Mocsi <gmocsi91@gmail.com>2013-07-25 19:12:37 +0200
commit3f8a8754e890a2b85e171d5d10d3b1bafb030429 (patch)
treed91dc09b60a35b29c5967131c24b0e29aa17183e /basctl/source/basicide/codecompleteoptionsdlg.cxx
parent890e3da2594c60914982b0a51b3672a960da23cd (diff)
GSOC work, procedure autoclose implementation
Now, function procedure autoclose is working. Created a struct named IncompleteProcData to store the line number, type and name of the inclomplete procedure. Procedures are store in a vector (IncompleteProcedures), and are as a member in SbModule. I've created a function called SbModule::GetIncompleteProcedures() to extract the data. Data extraction uses SbModule::SetSource32, beacuse that one tokenizes sthe source file, and recognizes procedures. Closing procedures is triggered ky pressing the Enter key when typing. It checks the actual sub, and if it's incomplete, adds the correct ending( End Sub/End Function). There is only one problem: function SbModule::SetSource32 is not too often calle, maybe extraction should be done by a timer. Change-Id: Id88daaef329e8b5c194b765c5261d356bfb3a0c9
Diffstat (limited to 'basctl/source/basicide/codecompleteoptionsdlg.cxx')
-rw-r--r--basctl/source/basicide/codecompleteoptionsdlg.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/basctl/source/basicide/codecompleteoptionsdlg.cxx b/basctl/source/basicide/codecompleteoptionsdlg.cxx
index 6dcde740f214..0f4ab3a8cac8 100644
--- a/basctl/source/basicide/codecompleteoptionsdlg.cxx
+++ b/basctl/source/basicide/codecompleteoptionsdlg.cxx
@@ -41,9 +41,8 @@ CodeCompleteOptionsDlg::CodeCompleteOptionsDlg( Window* pWindow )
pCancelBtn->SetClickHdl( LINK( this, CodeCompleteOptionsDlg, CancelHdl ) );
pCodeCompleteChk->Check( CodeCompleteOptions::IsCodeCompleteOn() );
- //pAutocloseProcChk->Check( CodeCompleteOptions::IsProcedureAutoCompleteOn() );
+ pAutocloseProcChk->Check( CodeCompleteOptions::IsProcedureAutoCompleteOn() );
- pAutocloseProcChk->Enable( false );
pAutocloseBracesChk->Enable( false );
pAutocloseQuotesChk->Enable( false );
}
@@ -55,7 +54,7 @@ CodeCompleteOptionsDlg::~CodeCompleteOptionsDlg()
IMPL_LINK_NOARG(CodeCompleteOptionsDlg, OkHdl)
{
CodeCompleteOptions::SetCodeCompleteOn( pCodeCompleteChk->IsChecked() );
- //CodeCompleteOptions::SetProcedureAutoCompleteOn( pCodeCompleteChk->IsChecked() );
+ CodeCompleteOptions::SetProcedureAutoCompleteOn( pAutocloseProcChk->IsChecked() );
Close();
return 0;
}