Commit Graph

65 Commits

Author SHA1 Message Date
Hermet Park 60e51fccbe edc_editor: don't access the danling edit object. 2019-02-28 13:26:59 +09:00
Hermet Park 626c184817 auto_comp: free the all used memory.
clean logic of lexem_nodes was a little aweful
even it missed chunks of memory.

free all of them perfectly.
2016-08-28 00:06:12 +09:00
Hermet Park 755da93bff auto_comp: fix memory leak. 2016-08-27 15:58:12 +09:00
Taehyub Kim 950734d000 auto_comp: apply strncpy in context_lexem_thread_cb
Summary:
apply strncpy in context_lexem_thread_cb
@fix

Reviewers: Jaehyun_Cho, NikaWhite, bowonryu, Hermet

Reviewed By: Hermet

Differential Revision: https://phab.enlightenment.org/D4236
2016-08-17 22:28:16 +09:00
Jean-Philippe Andre 3af6ede5e5 clang: Fix warnings and compilation errors
enventor wouldn't compile with clang. Also, it would print
a lot of warnings.
2016-08-10 15:17:41 +09:00
Hermet Park 1901cd4699 auto_comp: this is the last thread safe code.
there is a quite complex case that non-thread safe code
that may occur crash or wrong behavior of enventor.

just improve the thread safe code to avoid the situation.
2016-08-04 23:25:52 +09:00
Hermet Park 13305c77af auto_comp: ++safe code
don't free auto comp instance if its internal thread is working.
2016-08-04 22:57:24 +09:00
Hermet Park b25d5dffa8 lib: thread optimization.
get out of threads if they are canceled.
threads don't need to perform their logic totally.
2016-08-04 19:25:18 +09:00
Hermet Park d6f61c9963 multi-file: consolidate bodies. 2016-07-07 18:42:13 +09:00
Hermet Park 4353d98bac multi-file: make multi files work for auto completion. 2016-07-04 13:07:24 +09:00
Hermet Park fb7224f4a9 auto_comp: code refactoring.
added descriptive comments for the main logic of context analysis.
2016-07-04 12:58:07 +09:00
Jaehyun Cho 4e688f87b5 auto_comp: Fix that autocomp list moves to selected part name position.
Previously, autocomp list moved to selected part name position because
autocomp list did not disappear when mouse down event occurred.
Now, an event rectangle is added to catch mouse down event and autocomp
list disappears when mouse down event occurs.

@fix T3738
2016-06-02 22:21:25 +09:00
Bowon Ryu cc538a8508 edc_parser&autocomp: Fix double click issue on WindowsOS
Summary:
Enventor window stops responding on double clicking "min" on Windows.
Because of approaching the index in which the cur_context doesn't exist, the crash happens.
*cur_context[] in parser_attribute_get() edc_parser.c

Test Plan:
1. launch enventor on Windows
2. add image using live edit
3. double click "min" on editor

@TSAM-3524

Reviewers: Jaehyun_Cho, Hermet

Differential Revision: https://phab.enlightenment.org/D3972
2016-05-24 11:58:35 +09:00
Hermet Park ae7f3e30b3 redoundo: do coupling with edc_edit instance.
one redoundo should work with it's owner editor.

This is a refactoring for multiple edc editor.
2016-05-07 04:14:47 +09:00
Hermet Park 8d109970c6 code refactoring.
sanitize duplicated error message code.
2016-04-26 23:13:42 +09:00
Jaehyun Cho 227b549805 Revert "Revert "Revert "edc_editor: Support auto save to update preview."""
This reverts commit a3185bc64b.

Apply auto save in the future after resolving side effects.

Conflicts:
	src/lib/edc_editor.c
2016-03-16 11:30:41 +09:00
Hermet Park a3185bc64b Revert "Revert "edc_editor: Support auto save to update preview.""
This reverts commit b663d049db.

0.8.0 was released. revert this again.
2016-03-08 16:52:34 +09:00
Hermet Park b663d049db Revert "edc_editor: Support auto save to update preview."
This reverts commit 509b9bd628.
2016-03-08 10:17:25 +09:00
Jaehyun Cho 509b9bd628 edc_editor: Support auto save to update preview.
auto save function saves edc file and updates preview by using timer.
auto save timer is applied when entry is changed or redo/undo is done.
auto save timer is cancelled when candidate list or auto complete list
appears.
2016-03-04 10:32:30 +09:00
Mykyta Biliavskyi 01431db641 Parser: recognize keyword with context.
Uses the autocomplete context parser for recognizing keywords
with the same names in different contexts. For example:
the attributes "min" and "max" for a description context
should be integer values in range from 0 to 1000; but for a
"text" context those attributes should be boolean.

Curently add recognition for a "min" and "max" attributes in the "text" content.

@fix T2712
2016-02-29 18:12:19 +09:00
Jaehyun Cho 142db7a0f9 autocomp: Fix not to deallocate memory of eet data descriptor.
It does not need to reset eet data descriptor when eet file is opened
again.
2016-01-20 15:02:34 +09:00
Hermet Park 3f7e523d39 improve a autocomplete feature.
it should not blow the string queue up.

@fix T2982
2016-01-03 03:56:25 +09:00
Hermet Park f3d5cc942a fix invaild memory read.
previously, entry_move_cb could be called after autocomp is terminated
this logic slightly change them.
2016-01-02 22:26:57 +09:00
Hermet Park eb7209c1ad don't read a value from an invalid address. 2016-01-02 16:39:21 +09:00
Mykyta Biliavskyi 778d3c4879 Autocomp: bring the selected item in candidates list.
Summary:
For cases when the autocomplete list contain
a lot of items, that  the list enables scrollbar. This make impossible
to scroll last item by Down arrows. It is happens because the
focus is not allow for elm_list widget. This patch bring
selected item manually.

Reviewers: Hermet

Differential Revision: https://phab.enlightenment.org/D3040
2015-09-14 14:59:40 +00:00
Mykyta Biliavskyi a1a9d7eae1 Autocomplete: change behavior of show candidate list.
Summary:
prevously in cases when necessary node of
the lexem tree wasn't find - was displayed the
candidate list with  the root node
candidates (collections, images, color_classes, etc).
Now the candidate list do not displayed at all.

Reviewers: Hermet

Differential Revision: https://phab.enlightenment.org/D2972
2015-08-31 19:14:37 +09:00
ChunEon Park 502a826599 fix malfunction of key input on Windows system.
re-implement main key input by using key grab mechanism.

@fix
2015-08-27 03:49:33 +09:00
ChunEon Park 1b0fc9f4cf auto completion: fix malfunction of key input on Windows system.
re-implement auto completion key input by using key grab mechanism.

@fix
2015-08-27 00:58:01 +09:00
Mykyta Biliavskyi 88055de59c Autocomplete: except text between quotes.
Summary:
text that placed between quotes is
excepted from recognize keywords. Previously
when inside was string like this:
'images.normal: "123.png";' the autocomplete parser
is recognize the dot, that placed inside quotes.
It is broke the searching keyword in candidates tree.

Reviewers: Hermet

Differential Revision: https://phab.enlightenment.org/D2958
2015-08-20 11:09:37 +09:00
Mykyta Biliavskyi 6e62d994c4 Autocompletion: support multi names for the section.
Summary:
Support new *.edc syntax.
Each lexem node can have a many different names.
It useful for parts in new edc syntax (swallow {}, image {} ... )
Change "description" lexem to "desc"

Reviewers: Hermet

Differential Revision: https://phab.enlightenment.org/D2785
2015-07-03 11:49:11 +09:00
Mykyta Biliavskyi a310bbd9a4 Ctxpopup hide on focus out.
Summary:
On keypress up or down button doesn't need
to allow focus to the ctxpopup.

@fix T2522

Reviewers: Hermet

Maniphest Tasks: T2522

Differential Revision: https://phab.enlightenment.org/D2765
2015-06-26 13:39:20 +09:00
ChunEon Park e45efbf381 auto_comp: fix crash at auto comp.
increase stack buffer size to afford more huge size of edc text.
and handle exceptional case for lack of stack size.
2015-06-24 14:06:32 +09:00
ChunEon Park 6e7e18b12b auto_comp: close popup if the line is deleted.
@fix.
2015-06-23 10:21:22 +09:00
ChunEon Park c301fab3cd auto_comp: optimize code.
use callback data rather than global variable.
2015-06-23 10:11:03 +09:00
ChunEon Park e86b8256b6 fix the candidate list size.
don't oversized candidate popup than edit area.
Instead, enable the scroll of the list in order thatuser can choose one item.

@fix
2015-06-23 09:58:18 +09:00
Mykyta Biliavskyi dc85cafc7d Autocomplete: add attribute "dot" for lexems.
Summary:
Attribute "dot" make possible to mark lexems, that
can use the '.' symbol. Like image.normal: "bla";
This commit fix issue, when pressing '.' after any
keyword was shown candidate list.

Reviewers: Hermet

Differential Revision: https://phab.enlightenment.org/D2709
2015-06-23 08:16:01 +09:00
Mykyta Biliavskyi 9f47246074 Autocomplete: fix memory leak on autocomplete terminate.
Summary: Tree structure of lexems didn't freed, when feature terminating.

Reviewers: Hermet

Differential Revision: https://phab.enlightenment.org/D2727
2015-06-22 14:51:18 +09:00
Mykyta Biliavskyi 7020fec1f3 Autocomplete: fix memory leak.
Summary:
When context_lexem_thread_cb is canceled - possible, that
td->utf8 memory, that allocated at context_lexem_get
didn't freed.

Reviewers: Hermet

Differential Revision: https://phab.enlightenment.org/D2726
2015-06-22 14:45:54 +09:00
Mykyta Biliavskyi 5b3aa7ca3b Autocomplete: show list of the candidates by Ctrl+space.
Summary:
By press ctrl_l+space will be shown popup with the candidates list,
that relevant to current cursor position.
Added API enventor_object_auto_complete_list_show as public.

Reviewers: Hermet, jpeg

Maniphest Tasks: T2496

Differential Revision: https://phab.enlightenment.org/D2720
2015-06-22 14:34:52 +09:00
ChunEon Park d1e7eed0fb recover the autocomplete backspace key issue.
before change this, backspace is not working for auto complete,
so user can't cancel the popup.

this change is reverted to the old one code (118e86e0dd)
2015-06-22 14:20:14 +09:00
Mykyta Biliavskyi 9e81a5f263 Autocomplete: fix behaviour of the Backspace.
Summary:
For case when the list of candidates is shown after typing
'.', "backspace" didn't work. It happens because the queue was
already cleared, when the user press "backspace". But at the
same time list of the candidates is presented and shown.

Reviewers: Hermet

Differential Revision: https://phab.enlightenment.org/D2714
2015-06-22 14:09:14 +09:00
ChunEon Park 339298a01b auto_comp: + exeptional case.
just in case non - tooltip items.
2015-06-22 14:05:27 +09:00
Mykyta Biliavskyi 708923f8ff Autopcomp: select first item in candidates list.
Reviewers: Hermet

Maniphest Tasks: T2495

Differential Revision: https://phab.enlightenment.org/D2719
2015-06-22 13:59:50 +09:00
Mykyta Biliavskyi 0dfeb6c177 Autocomplete: fix segfault, caused by '.'
Summary:
When '.' typed without keyword, function context_lexem_thread
is returning NULL pointer to the lexem node. This cause segfault,
when the lexem node is used for prepare the candidates list
in candidate_list_show function.

Reviewers: Hermet

Maniphest Tasks: T2504

Differential Revision: https://phab.enlightenment.org/D2712
2015-06-17 17:02:58 +09:00
Mykyta Biliavskyi b4af164c8a Autocomplete: show list of the candidates after '.'.
Summary:
   In case, when user typed keyword and add '.' symbol, will be
   shown list of possible keywords.
   For example:
   rel1. -> will be shown list: relative, offset, to, to_x, to_y.

   Depends D2648
   @fix  T2178

Reviewers: Hermet, Jaehyun

Subscribers: jpeg

Projects: #enventor

Maniphest Tasks: T2178

Differential Revision: https://phab.enlightenment.org/D2651
2015-06-16 16:53:23 +09:00
Mykyta Biliavskyi ee415fa135 Parser: recognize comments in code.
Summary:
For cur_state_get in parser module and context_lexem_get in
auto complete module add abiliti to recognize commented lines.

fix T2482

Reviewers: Hermet, Jaehyun, jpeg

Reviewed By: jpeg

Maniphest Tasks: T2482

Differential Revision: https://phab.enlightenment.org/D2677
2015-06-16 13:38:06 +09:00
Mykyta Biliavskyi 59d6ce59cd Autocomplete: make search context run in additional thread
Summary:
  Now parsing and actualizing context of current cursor position
  happens in additional thread.

  @fix T2467

Reviewers: Jaehyun, Hermet

Projects: #enventor

Maniphest Tasks: T2467

Differential Revision: https://phab.enlightenment.org/D2648
2015-06-16 13:29:00 +09:00
Mykyta Biliavskyi f49cf431b7 Autocomplete: fix ability to disable functionality.
Summary:
Chack status of the flag *(autocomp_data)->enabled,
when entry "changed" callback is called.

Reviewers: Hermet

Differential Revision: https://phab.enlightenment.org/D2707
2015-06-16 13:22:36 +09:00
ChunEon Park 2d9f86a30d autocomp: fix the resoucre directory path
auto_comp data is the library resource rather than application.
use the eina prefix rather then app data path.
2015-06-09 15:40:30 +09:00
Mykyta Biliavskyi 2ceb0a2b3c Autocomplete: enhance the autocomplete feature.
The hardcoded list of the strings from auto_comp_code.h is replaced by
description of the relationships between keywords.
This descriptions is stored in autocomp.src file.
Now the autocomplete feature is monitoring context of the
inputted text, and provide list of the keywords, that
relevant to current context.
For add new relationships between keywords need
only add it into autocomp.src in correct hierarchical order.
2015-06-09 15:28:49 +09:00