Commit Graph

108 Commits

Author SHA1 Message Date
Hermet Park e7bc310f1b edc_editor: free used memory. 2016-04-26 22:58:46 +09:00
Hermet Park 955b762ecc edc_navigator: provide a program launch button.
Now launching program by double clicking the program part in the code
is removed! This was not intuitive.
2016-04-22 19:31:07 +09:00
Jaehyun Cho ff7ca0ee79 indent: Refactoring indentation.
Fix indentation issues by refactoring indentation logic.
2016-04-04 21:03:31 +09:00
Yongheon, Shin 41a320bc89 (T3274) Fix Crash issue when removing all code in edc editor
Summary:
- When calculating the position of cursor, the code cannot get group information.
  So, if we cannot get group information including position, add blocking code.

Test Plan:
1. Open Enventor
2. Remove all code after selecting with Ctrl+a
3. Click any part in edj editor

Reviewers: Hermet, Jaehyun_Cho

Subscribers: Jaehyun_Cho, Hermet

Differential Revision: https://phab.enlightenment.org/D3804
2016-03-18 18:04:15 +09:00
Jaehyun Cho eb1f95d02c edc_editor: Fix to allocate memory including null character '\0'.
Without this patch, crash sometimes happens when preview part is clicked
on Windows.
2016-03-17 17:55:57 +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 3869e9acc8 Revert "Revert "editor: don't auto save always.""
This reverts commit aa6607c616.

0.8.0 was released. revert this again.
2016-03-08 16:53:13 +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
Hermet Park aa6607c616 Revert "editor: don't auto save always."
This reverts commit 3a2c08e6c5.

Revert this temporarily for release enventor 0.8.0
2016-03-08 10:16:55 +09:00
Hermet Park 79f10753fe edc_editor: one more memory leak :( 2016-03-07 22:55:34 +09:00
Hermet Park ce3b32741d edc_editor: free string memory after use them. 2016-03-07 22:53:51 +09:00
Hermet Park f26a4db691 edc_editor: free string resources after it used. 2016-03-07 22:22:31 +09:00
taehyub 58f08915e9 edc_editor: change sprintf to snprintf
Summary: change sprintf to snprintf for code safety

Reviewers: Jaehyun_Cho, NikaWhite, Hermet

Reviewed By: Hermet

Differential Revision: https://phab.enlightenment.org/D3774
2016-03-07 20:30:49 +09:00
Hermet Park 3a2c08e6c5 editor: don't auto save always.
If save has been accomplished, we can skip a auto save.

This auto save brings enventor unexpected error highlighting twice.
2016-03-05 11:17:15 +09:00
Hermet Park 332bbeda4f editor: reset cursor position when edc is loaded.
edc editor needs to reset cursor position when a edc is newly loaded.

People granted this behavior.
2016-03-05 00:31:28 +09:00
Hermet Park 7795dbe101 editor: fix initial max line 0 issue.
Update max line correctly of the statusbar.
This fix brought Enventor_Max_Line passed away
because Enventor_Cursor_Line can be used instead.

@fix
2016-03-05 00:26:41 +09:00
taehyub a512a80782 edc_editor: add null checking in error_line_num_highlight function
Summary:
in error_line_num_highlight, utf8 can be null.
so, I added null checking about it.

@fix

Reviewers: Jaehyun_Cho, NikaWhite, Hermet

Reviewed By: Hermet

Differential Revision: https://phab.enlightenment.org/D3764
2016-03-04 23:39:14 +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
Jaehyun Cho b488c57a9c edc_editor: Fix to call "edc,modified" callback when edc is modified.
Previously, "edc,modified" callback is called only if
enventor_object_save() is called.
To call "edc,modified" callback when edc is modified, "edc,modified"
callback is called in edit_save().
2016-03-04 10:32:24 +09:00
Jaehyun Cho c86aa0dac6 Revert "edc_editor: optimize bracket logic."
This reverts commit 7250db0b10.

This commit causes unexpected cursor movement.
2016-02-29 18:14:26 +09:00
Jaehyun Cho b2286162a9 edc_editor: Fix to set edc changed in edit_text_insert().
Set edc changed in edit_text_insert() to save text insertion.

Test Plan:
1. open find/replace (ctrl + f)
2. write strings in "Find:" and "Replace with:"
3. push "Replace all"
4. close edc

When edc is closed without saving after replacing a string, warning
popup should appear.
2016-02-29 17:38:51 +09:00
Mykyta Biliavskyi 02b45c0719 Redoundo: Support the real-time preview when we undo/redo the code.
When user undo or redo change, the edc file will be recompiled and the
live view will be updated. There are two flow: in case if the change is buildable
(i.e. the edc file was builded sucessfuly, when this change happened)
edc file will be recompiled. In case when change marked as unbilduable -
nothing will happen.

@T3051
2016-02-22 18:49:46 +09:00
taehyub 92fe342039 apply ELM_CNP_MODE_PLAINTEXT mode to enventor entry
Summary:
When copy & paste in markup text mode, elm_entry does not support to close markup text.
In enventor the feature cause the color changes about the pasted text.
so I applied the plain text mode to prevent color changes when some text are pasted.

Test Plan
1. copy some text
2. paste anywhere
3. see the color of the text whether there are color changes or not

Reviewers: Hermet, Jaehyun_Cho, NikaWhite

Differential Revision: https://phab.enlightenment.org/D3717
2016-02-19 18:36:26 +09:00
Yongheon, Shin dac33a48f6 Set the cursor region of part, when selecting in live editor
Summary: Set the cusor region of part, when selecting in live editor

Test Plan:
1. Open the enventor and load a sample
           2. Select a part in live editor

Reviewers: Jaehyun_Cho, Hermet

Subscribers: Jaehyun_Cho, Hermet

Differential Revision: https://phab.enlightenment.org/D3690
2016-02-19 17:02:28 +09:00
Jaehyun Cho 02a4549906 indent: Apply indentation to newly loaded edc text
When an edc text is newly loaded, the edc text is indendted if its
indentation is not correct.
The indented text creation function, indent_text_create(), utilizes
the logic of indent_text_auto_format().
2016-02-19 14:19:41 +09:00
Hermet Park 811875fd04 fix build break. 2016-02-19 02:16:47 +09:00
Mykyta Biliavskyi 269bf8b393 Edc editor: improve search the cursor position for the selected part.
In parsing the part blocks added additional check for a block type name.
This make possible to differ names of the part block and names,
that uses inside attributes, style blocks, programs and etc.

fix T2977
2016-02-18 15:37:20 +09:00
Hermet Park 958900962e editor: remove an unnecessary comment. 2016-02-17 21:57:49 +09:00
taehyub 44935bd484 remove unnecessary selection recover logic
Summary:
selection region recovery is applied twice in entry recover.
there are selection region recovery logic before elm_entry_selection_region_set,
but we also recover using elm_entry_selection_region_set.
it is unncessary code.

@fix

Reviewers: Hermet, Jaehyun_Cho, NikaWhite

Differential Revision: https://phab.enlightenment.org/D3709
2016-02-17 21:54:36 +09:00
taehyub cf417f8fa4 fix the unexpected selection problem
Summary:
There is a delay for getting selection start position.
It cause the wrong selection recovery.
so I modified the selection recover logic
using the selection region of entry.

@fix

Reviewers: Hermet, Jaehyun_Cho, NikaWhite

Differential Revision: https://phab.enlightenment.org/D3680
2016-02-17 20:37:22 +09:00
Hermet Park 86d07222f6 Revert "indent: Apply indentation for newly loaded edc file"
This reverts commit 66328e75f3.

This patch broke enventor :-(
please test with games/etypers/data/themes/etyers.edc
2016-02-13 03:32:29 +09:00
Jaehyun Cho 66328e75f3 indent: Apply indentation for newly loaded edc file
Auto indentation is applied when an edc file is newly loaded.
2016-02-12 21:39:51 +09:00
Hermet Park 7250db0b10 edc_editor: optimize bracket logic.
we don't need to apply bracket everytime.
Previously brackets didn't applied and current brackets are no valid either
then skip to apply bracket highlighting function.
2016-02-11 14:57:50 +09:00
taehyub 7811da09b0 Add bracket highlight function in thread function
Summary:
Add bracket highlight function in thread function.
It cause the entry scroller moving when scroller bar is unpressed.

@T3145

Reviewers: Hermet, Jaehyun_Cho

Differential Revision: https://phab.enlightenment.org/D3671
2016-02-11 14:50:13 +09:00
Hermet Park fe41adaa28 support a guide text for editor ctxpopup.
introduce a new smart callback "ctxpopup,activated"

@feature
2016-02-09 17:51:11 +09:00
taehyub 4b82e2b945 fix the problem of selection cursor moving
Summary:
The selection cursor is moved at the frist
When clicking and moving the bracket using the mouse.
In entry_recover(), there is no selection cursor recover machanism.
So I added the selection recover logic in the function.
Now, it is fixed.

@fix
@T3099

Test Plan:
  1. click the bracket
  2. moving the cursor keeping the mouse clicking
  3. see the fixed result

Reviewers: Jaehyun_Cho, Hermet

Differential Revision: https://phab.enlightenment.org/D3641
2016-02-05 17:47:53 +09:00
Hermet Park 8aac906c82 Revert "fix the problem of selection cusor moving"
This reverts commit e8ade4e64b.

This patch was not intended :(
2016-02-03 14:06:52 +09:00
taehyub e8ade4e64b fix the problem of selection cusor moving
Summary:
The selection cursor is moved at the frist
When clicking and moving the bracket using the mouse.
In entry_recover(), there is no selection cursor recover machanism.
So I added the selection recover logic in the function.
Now, it is fixed.

@fix
@T3099

Test Plan:
  1. click the bracket
  2. moving the cursor keeping the mouse clicking
  3. see the fixed result

Reviewers: Hermet, Jaehyun_Cho

Differential Revision: https://phab.enlightenment.org/D3641
2016-02-03 10:36:12 +09:00
taehyub be94d88921 edc_editor: remove unnecessary code
Summary:
remove unnecessary code in entry_recover function

@fix

Reviewers: Hermet, Jaehyun_Cho

Differential Revision: https://phab.enlightenment.org/D3638
2016-02-02 17:46:36 +09:00
taehyub bf5e38298d edc_editor: fix bracket updateto be called one time
Summary: fix bracket update callback to be called one time

Reviewers: Hermet, Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Differential Revision: https://phab.enlightenment.org/D3637
2016-02-02 17:44:12 +09:00
Hermet Park 14daddac74 code refactoring.
revise bracket logics which was newly introduced.
2016-01-27 14:27:49 +09:00
taehyub ed7e655add edc_editor: add pair of bracket highlighting feature
Summary: when mouse cursor on bracket which are '{', '}', the bracket is highlighted with its pair.

Reviewers: Jaehyun_Cho, Hermet

Reviewed By: Hermet

Subscribers: herb, NikaWhite, Jaehyun_Cho

Differential Revision: https://phab.enlightenment.org/D3588
2016-01-27 13:01:53 +09:00
Hermet Park ad1dfd99c4 refactoring code.
rename an internal function name.
previous one was so ambigious.
2016-01-08 12:03:39 +09:00
Jaehyun Cho 5120c20d84 Parse macro only if EDC is modified and group name is searched.
Previously, macro was parsed when EDC was changed.
This caused performance issue.
Now, macro is parsed only if EDC is changed and group name is searched.
2016-01-06 13:28:54 +09:00
Jaehyun Cho 335575eb84 Support to use macro as a group name.
Previously, group name was recognized with double quotation marks("").
This makes defined macro cannot be used as a group name.
Now, defined macro is parsed and listed. Macro group name is recognized
from the defined macro list.
2016-01-04 20:23:36 +09:00
Hermet Park 7017b802ee prevent memory leak 2016-01-01 23:55:53 +09:00
Mykyta Biliavskyi 460dfed226 Live edit: return focus to the entry, after insert template.
fix T2968
2015-12-29 14:08:11 +09:00
Mykyta Biliavskyi e264bc5f95 Error highlight: fix highlight errors inside the first line.
Fix T2970
2015-12-29 10:33:36 +09:00
Mykyta Biliavskyi f9a5d71896 Ctxpopup: reload the image content for preview.
The mouse wheel Up/Down to show preview of the
previous/next image. Previously the new ctxpopup
widget was created for each image inside the set.
Now the preview content is reloaded without
creating new ctxpopup widget.

fix T2974
2015-12-28 17:10:13 +09:00