summaryrefslogtreecommitdiff
path: root/basctl
AgeCommit message (Collapse)Author
2013-09-02GSOC work, unused code removalGergo Mocsi
Removed the call of CodeCompleteListBox::GrabFocus. Change-Id: I6095f354eadd680d040319beb4d15d37850c3e9d
2013-09-02GSOC work, code simplification+removed unused functionsGergo Mocsi
Removed some unused functions from CodeCompleteListBox/CodeCompleteWindow. Renamed CodeCompleteListBox::SetVisibleEntries to SetMatchingEntries. Simplified autocorrect functions. Change-Id: I29f9653d52fff2c5020243aa5c14f1ea280018d3
2013-09-02GSOC work, code simplificationGergo Mocsi
Created a new class: UnoTypeCodeCompletor, which does the field/method extraction for code completition. Functions GetXIdlClassMethods() and GetXIdlClassFields() have been added to UnoTypeCodeCompletor and removed from EditorWindow. Change-Id: Ia47965b502c868f52c466c282cb98ccd806ff6f7
2013-09-02GSOC work, code fixesGergo Mocsi
Small fix in the listbox size: I'm using GetOptimalSize to set the correct width. EditorWindow::KeyInput: autocomplete/codecomplete functions have been placed into separate functions. Function autoclose sub/functions: duplicate code removal. Change-Id: I44678753fc9737fd7a0913af3caa4f1f565aca28
2013-09-02GSOC work, small fixes for listbox appearanceGergo Mocsi
Listbox top does not cover the actual line. Listbox width and height problems are fixed. Change-Id: Ia814f14c3ae326eecd497df2a233eee0b6c30adb
2013-09-02GSOC work, Extended types correctionGergo Mocsi
Stucts can be autocompleted when extended types disabled. Created two functions to make the code brighter. They extract the methods/fields from an XIdlClass and return them in a std::vector<OUString>. I had to modify file basic/source/comp/dim.cxx, to check on UNO types when code completition is on. Change-Id: Id93a6fe896424efb7868f6102985f59fb419b17e
2013-09-02GSOC work, KeyInput instead of PreNotifyGergo Mocsi
CodeCompleteListBox now uses KeyInput instead of PreNotify to handle key events. The cursor is visible, arrow keys navigate the listbox correctly. Change-Id: Ia0d5c5c48858d345dc4b4886ece1db618bdfc67c
2013-09-02GSOC work, show the cursor when typing 2Gergo Mocsi
There are two cases: a) TextView in focus: cursor is visible, typing works, except the arrow keys are not working for the ListBox b) ListBox in focus: no cursor, everything works Change-Id: Iaaec69c04370e4d05e226abeecd420bf4d4f52cd
2013-09-02GSOC work, listbox hides the cursor fixGergo Mocsi
When the listbox appears over the line, it no more hides the top of the cursor. Change-Id: Ic2d0e8295cc4c44f06765af0d431859b53ab88d2
2013-09-02GSOC work, renaming for consistencyGergo Mocsi
Menu enrty was renamed to IDE Options under View. SID_BASICIDE_CODECOMPLETE was renamed to SID_BASICIDE_IDEOPTIONS. CodeCompleteDlg was rename to BasicIDEOptionDlg. Ui file was renamed to basicideoptionsdialog.ui. Checkbox for extended types is now independent from code complete one. Change-Id: Id862df0ee56cdf2aa81e19a34099fe679ad5d311
2013-09-02GSOC work, renaming for consistencyGergo Mocsi
Menu enrty was renamed to IDE Options under View. SID_BASICIDE_CODECOMPLETE was renamed to SID_BASICIDE_IDEOPTIONS. CodeCompleteDlg was rename to BasicIDEOptionDlg. Ui file was renamed to basicideoptionsdialog.ui. Checkbox for extended types is now independent from code complete one. Change-Id: Id862df0ee56cdf2aa81e19a34099fe679ad5d311
2013-09-02GSOC work, autoclose procedures fixGergo Mocsi
Fixed function autoclose procedures: when there was an incomplete function/sub, and the lookahead found another sub/function, autocorrected the wrong ending. This is fixed. Change-Id: I3d894808fe8111f1ea1fac797b16576d843bff68
2013-09-02GSOC work, ListBox appearance fix (at the borders) + code fixesGergo Mocsi
ListBox appearance fixed at the borders: a) bottom: it it placed over the current line (not under) b) right side: listbox's right side is adjusted to the window's right side Coed fixes: CodeCompleteOptions now intializes itself from the configuration file BasicIDE.xcs Added a checkbox for enabling extended types in the options dialog. Cursor is visible when the listbox is active. Fixed the small issue when deleting a character. Change-Id: I68b80143de245cebfce65cdd8af37ea4694aa81b
2013-09-02GSOC work, config crach fixGergo Mocsi
Storing code completition data in config file is fully functional. Change-Id: If9a974dd0ed052e26963ad5f202493674f1a51ca
2013-09-02GSOC work, config entry to store optionsGergo Mocsi
Created a config file to store configuration for the feature. NOTE: it gives a runtime error, so it is temporary disabled. Change-Id: I7103bdfad43bb5760165430a57d93a90a7e5dc7e
2013-09-02GSOC work, "autocomplete procedures" fix + new featureGergo Mocsi
Fixed the procedure autoclose function. Now, autoclose is based on the syntax higlighter: if finds an opening token, starts searching forward to a close token. If there is another sub/function keyword, or EOF is reached, the procedure is considered incomplete. If the end token is found, the procedure is considered to be closed. Added function autocorrect symbol spelling, wich corrects the ascii case of the keywords, and corrects the spelling of the extended types. Change-Id: Ibd17f319a6d6ff5c3f91f4adb7a10dc701f0468a
2013-09-02GSOC work, listbox appearance fixGergo Mocsi
Fixed the listbox appearance even the source file is scrolled. When scrolling, and the listbox is visible, it gets hidden. I've set the Code Completition to defaultly true, to make testing easier. Change-Id: If571a4f1d38751b35fd43ab3c1f13daccd9dd375
2013-09-02GSOC work, nested reflection fix - againGergo Mocsi
Fixed the issue when an invalid method was typed, listbox showed tha methods of the base variable. Change-Id: I88576645b373e76112103055d547f713af1fc153
2013-09-02GSOC work, extend reflection+crash fixGergo Mocsi
Fixed creash error on accessing elements of an empty vector. Reflection is now extract fields also. Change-Id: Ic41353cbe9fc404115eb0d2b2f9d5706fc044dab
2013-09-02GSOC work, implement "Autoclose parenthesis" functionGergo Mocsi
Autoclosing parenthesis function is working. Implementation is similar to autoclosing double quotes, except that this one does not need the HighlighPortion struct to use. Renamed the checkbox title to "Autoclose parenthesis". Change-Id: I4311cd8020f0dc0b62a2d8707e0eccbf57e0d2c2
2013-09-02GSOC work, fix runtime crashGergo Mocsi
Fixes runtime crash by not checking the string length in "Autoclose Quotes" funtion. Change-Id: I15e58a0fd487ce86b832452a562406b8155b2641
2013-09-02GSOC work, implemented "Autoclose Double Quotes" optionGergo Mocsi
Feature autoclosing double quotes (strings) implemented. When the user presses the '"' key, it's pair is also being inserted (only when the previous character is also a '"'), and the cursor is being placed inside the two quotes. Also, if the there was a string (like: "aaa""), the second one is not inserted. Change-Id: I3e4a5e426d2d4bdbf56899fe3e36359ae161b52a
2013-09-02GSOC work, procedure autoclose implementationGergo Mocsi
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
2013-09-02GSOC work, disable QuickSelectionEngine+ListBox navigation modificationGergo Mocsi
Added a function to disable QuickSelectionEngine in ListBox, beacuse it's not needed. ListBox navigation changed: it is not hiding/showing entries, instead of it, jumps to the longest match without filtering. Arrow behavior remains the same. Change-Id: I8982c280f20929c74f9630cbaa95010820d2e234
2013-09-02remove strange added Invalidate bitsNoel Power
Change-Id: I61f4a6af62d67f2fd5f421e2173cca179d399815
2013-09-02GSOC work, cache implementation fix, code fixesGergo Mocsi
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
2013-09-02GSOC work, ModalDialog instead of menu entryGergo Mocsi
Created a ModalDialog named CodeCompleteOptionsDlg to edit options for code completition/suggestion. Unimplemented features in it are disabled. The dialog window uses Glade .ui file. Change-Id: I1b59f386a9575aa25b38c5a1d7d1f020498a69ab
2013-09-02GSOC work, code complete option, menu entry fixesGergo Mocsi
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
2013-09-02GSOC work menu entry + code fixGergo Mocsi
Fixed the definition of GLOB_KEY, NOT_FOUND from const to static const. Added a new menu entry for code completition under View->Enable Code Completition. Change-Id: If8ac25ee43a7ba780ccdee2e5e909777115a1f27
2013-09-02GSOC work window hide when clicking outGergo Mocsi
CodeCompleteWindow is hidden when clicking out: thi is implemented in EditorWindow::MouseButtonDown: if CodeCompleteWindow is visible and the actual TextSelection of the window and the parent's TextView is different, hide the window (I assume the user changed selection, eg. clicked on other line, etc.). Change-Id: Icb6bcffa837b2f7e1ccef288b9d762e27649410b
2013-09-02GSOC work, some code fixesGergo Mocsi
Fixed the link error: declared CodeCompleteDataCache as BASIC_DLLPUBLIC and it worked fine. Fixed sergmentation fault error in CodeCompleteWindow. The new cache implementation is fully functional. CodeCompleteWindow is now being used as boost::scoped_ptr. Change-Id: I76a0fc7407d589e7f94280fc4d50cea51b9639db
2013-09-02GSOC work, code fixes + cache implementationGergo Mocsi
WARNING: cache implementation gives a link error to it's methods. Created the cache called CodeCompleteDataCache in file include/basic/codecompletecache.hxx This class should replace the std::vector< CodeCompleteData > int file baside2b.cxx When issuing command "make basic", it compiles fine, but, when "make basctl", it gives a link error (ld returned status 1) to CodeCompleteDataCache's methods. Change-Id: If78c6533b7fb5653cc459d22b80c98d097b886eb
2013-09-02GSOC work ListBox show/hide entries when typing function nameGergo Mocsi
ListBox sorts entries alphabetically. When typing, filters the matching function names. ListBox closes on key tab and space, beacuse I assume the user typed in the whole function name. Change-Id: I045b1b990b0e0af70de75c32249b7497b51b9e98
2013-09-02GSOC work Window appearance fix 2 + code fixesGergo Mocsi
Added a function to select the first entry in the ListBox by default. Selected entry can be inserted with the ENTER key. Fixed some code in basic code generation class (SbiCodeGen). Change-Id: Ia6eb43ee5661a0a3ae0b738b619f19972f019eac
2013-09-02GSOC work, Window appearance fixGergo Mocsi
Fixed the window width to adopt size by longest entry. Window height is set to display 8 lines, plus the scrollbar. When selected, window can be close by the ESC key( done by PreNotify() ). Also, renamed it to CodeCompleteWindow for consistency. Change-Id: I9cd53c3d868cdaeb8d391547f16da7038278154b
2013-09-02GSOC work, Window instead a FloatingWindowGergo Mocsi
Changed CodeCompleteListBox into a Window which contains a single ListBox. Navigation with arrows is enabled, window closes on ESC key. Double click inserts the selected method into the source code. Visible line count in ListBox is set to 8 lines, width is adopted from the longest entry. Change-Id: I6b6ceb0ce78f9fc727aed53952dc6ee24cba47df
2013-09-02GSOC work nested reflection fixGergo Mocsi
Ive fixed the parameter problem: I use the tokens created by the syntax highlighter (it's struct HighlightPortion), and put the identiiers to the vector, and reflect them. Change-Id: I08888e4a8bf00fa987a16466f4a5ac03836e5ee7
2013-09-02GSOC work week 5, some recent fixesGergo Mocsi
This week I've managed to fix the ListBox appearance. Also, I've modified the code: it gets the data on insert/remove/change, and gets updated only when the dot is pressed. This makes the data to be up-to-date. Next, I wrote a Split(OUString , char) function to do the nested reflection (It works, but it will need some tweaks later). Also, code generation is disabled for code completition (just a boolean value, maybe it could be done in a more "elegant" way, like the error supression). Change-Id: I43d250c0a065351950ac6424dcd88266d70bcef3
2013-09-02GSOC work week4, CodeCompleteListBox appearance fixGergo Mocsi
This patch allows the pop-up CodeCompleteListBox to appear under the cursor. It's size is fixed:150x150. Also, I've fixed a bug in extracting the current variable name. Change-Id: Id98cb1c29be72af07a25aac3d51561f072bf103e
2013-09-02GSOC work week 3, showing methods in a ListBoxGergo Mocsi
This patch allows the Code Completition feature to list methods in a custom ListBox class called CodeCompleteListBox. So, when the user presses the dot("."), a ListBox appears, and listed the methods(not just prints on the terminal). The user can select one from them, and it is put in the source code (after the dot). Change-Id: Ie5165e7bdaae1d96bbf40a9b996ca8ebbdb40dea
2013-09-02GSOC work week 2, getting infromation from variables and print on terminalGergo Mocsi
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
2013-08-29convert include/sfx2/minfitem.hxx from String to OUStringNoel Grandin
Change-Id: Idbfe79a6f7f7dbadcd12256b6b99cffd1f23d5d7
2013-08-29convert include/sfx2/objsh.hxx from String to OUStringNoel Grandin
Change-Id: I9587190cea24da93ec0496f2eccf0d32d98980ee
2013-08-21finish deprecation of O(U)String::valueOf()Luboš Luňák
Compiler plugin to replace with matching number(), boolean() or OUString ctor, ran it, few manual tweaks, mark as really deprecated. Change-Id: I4a79bdbcf4c460d21e73b635d2bd3725c22876b2
2013-08-18fdo#57950: Remove some chained appends in basctlJelle van der Waa
Change-Id: Ib1c14c6712848ebb28f49d50837f691531c1b5d6 Reviewed-on: https://gerrit.libreoffice.org/5479 Reviewed-by: Andrzej J.R. Hunt <andrzej@ahunt.org> Tested-by: Andrzej J.R. Hunt <andrzej@ahunt.org>
2013-08-17remove various unused dialogsCaolán McNamara
Change-Id: If639745db976671a3b6e3405253dfb3bc5783363
2013-08-14convert GetSelectionText... methods to OUString and boolIvan Timofeev
Change-Id: I77726f009338ae49877c5f58fe6c14d386089bbe
2013-08-12XubString->OUStringCaolán McNamara
Change-Id: Ibcb2dd5861ad14e286596999b757ca5c41137626
2013-08-08vcl, sw: fix the inheritance of SwComboBox from ComboBox a bitMichael Stahl
Remove the silly overloading, and introduce virtual methods. Change-Id: If54a6a3fb7464283f80d3387ae23db234690f8a3
2013-08-06WaE: private field 'rLayout' is not usedTor Lillqvist
Change-Id: Iad6ab86123bd3c5f83452a1037c661003dcd7cdc