Commit Graph

107 Commits

Author SHA1 Message Date
Andy Williams 2a82fedcb1 suggest: Move to a language provider
This means we can add great new stuff in a (nearly) pluggable way
2017-01-11 18:00:33 +00:00
Andy Williams e6feb19a30 suggest: Move documentaton lookup to suggeest provider
Trying to get all the clang code out of edi_editor
and into suggest_provider_c :)
2017-01-11 14:23:15 +00:00
Andy Williams 068949a25a suggest: Simplify sugggest API
Moving to a language provider so fewer entry points if possible
2017-01-11 12:48:28 +00:00
YeongJong Lee 73d8670247 autosuggest: Fix position when the suggest list is hidden.
Summary: Remove some unnecessary function.

Reviewers: ajwillia.ms

Reviewed By: ajwillia.ms

Differential Revision: https://phab.enlightenment.org/D4539
2017-01-01 14:26:57 +00:00
YeongJong Lee e4af7c18a9 editor_doc: Add documentation finding support using libclang
Summary:
<Ctrl> + <R_Click> opens document. This find doxygen comment using libclang and
dump each tags.
Now, it just support functions.

Test Plan:
1. Open document using <Ctrl> + <R_Click>.
2. Check that the document is correct.

Reviewers: ajwillia.ms

Differential Revision: https://phab.enlightenment.org/D4522
2016-12-28 23:35:08 +00:00
Andy Williams 53e7419009 autosuggest: add tests to clang suggest provider
A small refactor became obvious because the lookup is not really
using the curword passed in - we want all options then filter later!
2016-12-27 13:26:38 +00:00
Andy Williams 49b55e838e autosuggest: refactor to split clang suggest code from editor
Make room for other suggest providers too
2016-12-24 23:31:29 +00:00
Andy Williams 9cef5db6c5 autosuggest: Move formatting to 1 place
Also correctly handle fonts with spaces
@fix
2016-12-23 22:56:55 +00:00
YeongJong Lee f9b8129724 autosuggest: One editor has one suggest evas object
Summary:
Remove unnecessary global variable.

This commit also fix bug that using autosuggest(<Ctrl> + <Space>) occurs
segment fault in non-code file.

Test Plan:
1. Run Edi.
2. Open project.
3. Open non-code file (e.g. README).
4. Call suggest list using <Ctrl> + <Space>.
5. Check that there is not segment fault.

Reviewers: ajwillia.ms

Reviewed By: ajwillia.ms

Differential Revision: https://phab.enlightenment.org/D4509
2016-12-23 10:07:03 +00:00
Andy Williams 0bc9f3dc1d editor: cleanup methods a little 2016-12-22 10:59:36 +00:00
Andy Williams 04d86d3250 don't crash on invalid lines 2016-12-22 10:56:53 +00:00
YeongJong Lee 0866448895 autosuggest: Support detail of suggest
Summary: The suggest list shows detail of suggest.(return type and parameter)

Test Plan:
1. Run edi.
2. Open project.
3. Open suggest list using <ctrl> + <space>.
4. Check that The detail of suggest is correct.

Reviewers: ajwillia.ms

Reviewed By: ajwillia.ms

Differential Revision: https://phab.enlightenment.org/D4505
2016-12-22 10:50:59 +00:00
YeongJong Lee 284c7ff3ca autosuggest: Change the variable name from 'autocomplete' to 'suggest' for readability.
Summary:
Change the variable name from 'autocomplete' to 'suggest'.
Because 'autocomplete' is too long.

Reviewers: ajwillia.ms

Reviewed By: ajwillia.ms

Differential Revision: https://phab.enlightenment.org/D4496
2016-12-19 23:26:26 +00:00
Andy Williams d24ded8b5a editor: grab keys that should not feed down to elm_code 2016-12-17 13:16:18 +00:00
Andy Williams a112dcad9e autosuggest: properly guard the clang variables 2016-12-17 12:31:36 +00:00
YeongJong Lee 8d82796fa1 autocomplete: fix screen flicker when use autocomplete
Summary: Remove file save function when initialize clang.

Test Plan: Check that the screen is not blinking when use autocomplete.

Reviewers: ajwillia.ms

Reviewed By: ajwillia.ms

Differential Revision: https://phab.enlightenment.org/D4486
2016-12-16 22:06:49 +00:00
YeongJong Lee 9d128bdb40 autocomplete: Refresh candidate list when typing.
Summary:
if you start typing when candidate list is shown,
the list refresh immediately.

Test Plan:
1. Run edi.
2. Open project.
3. Open candidate list using <ctrl> + <space>.
4. Continue typing.
5. Check the candidate list is correct.

Reviewers: bu5hm4n, ajwillia.ms

Differential Revision: https://phab.enlightenment.org/D4478
2016-12-13 07:42:36 +00:00
Andy Williams 3f76c4d290 elm_code: update parameter order 2016-12-12 08:30:59 +00:00
Andy Williams efd56cf918 fix typo in patch 2016-12-12 00:24:51 +00:00
YeongJong Lee ebc07e85e0 autocomplete: Add code autocomplete using clang
Summary:
Pressing shortcut(<ctrl> + <space>) while editing the code show
the list of suggestions.

This support variable, function, struct member.. etc.
It is simple version, so it show just function name without parameter, return type.

Test Plan:
1. Run edi.
2. Open project.
3. Press shortcut(<ctrl> + <space>) while editing the code.
4. Check that the list of suggestions are correct.

Reviewers: ajwillia.ms

Reviewed By: ajwillia.ms

Subscribers: bu5hm4n

Differential Revision: https://phab.enlightenment.org/D4476
2016-12-12 00:23:22 +00:00
Jean-Philippe Andre 886b6356bd editor: Fix crash when resizing without any code open 2016-11-30 15:34:34 +09:00
Andy Williams 49f7506521 highlight: cancel the file parsing on line events
Either we have removed a line and could crash or we have
added a line and everything will be off by one!

This will get fixed moments later by the line change event
2016-11-28 01:46:07 +00:00
Andy Williams 1578481d46 ui: only use help lookup if control pressed 2016-09-11 19:17:21 +01:00
Andy Williams f71e4899c2 ui: Fix various toolbar items since tab chnges
oops :( lookup data in the right context
2016-09-10 23:41:14 +01:00
Andy Williams e9b18c4560 syntax: Fix bad racey thread conditions 2016-09-09 16:21:11 +01:00
Andy Williams 2262d7bf1c elm_code: Removed and migrated to using the elementary merged version 2016-06-10 10:03:40 +01:00
Andy Williams dcd56607a9 editor: re-enable undo
Oops, we blocked elm_code from doing it's job
2016-05-17 23:24:14 +01:00
Andy Williams 1971583e5e [help] Stub out a right-click-help UI
Not looking anything up yet but we're getting started
2016-04-07 17:44:12 +01:00
Andy Williams bca7ef40b8 tidy old stubs 2016-04-07 17:43:05 +01:00
Andy Williams b3a9bd0f2c Update to latest eo syntax
Thanks for the script Tom :)
2016-03-10 00:06:50 +00:00
Andy Williams acd7b54473 [editor] begin re-adding the undo feature.
This is provided completely by elm_code so can be reused in other editors.
For now this is just text/newline insertion...
Still have to add undo for deletion and selection
2016-02-21 18:11:33 +00:00
Andy Williams 557fb79396 [editor] Support space insertion instead of tabs
Elm_Code support and option in Edi to use spaces when the
Tab key is pressed - make this default too.
2016-02-09 00:32:16 +00:00
Andy Williams 2f0347b108 [editor] Make whitespace trimming an option
Add a global setting to turn off the behaviour
2015-08-29 14:46:18 +01:00
Andy Williams 155ec77ac8 [editor] fix stability of the highlighting thread
Grab locks at the correct times, seems to help a lot...
2015-08-28 00:12:59 +01:00
Andy Williams 1c7e2b3873 editor: improve goto line dialog
Focus the input when we show and allow enter press to submit.
Also refactor it out of the edi_main mess.
2015-07-16 22:36:15 +01:00
Andy Williams 3f86407481 elm_code: consistently use 0 based text index
This means it's more familiar as regular string work when
using the elm_code_line APIs. It's also more distinct from
the elm_code_widget layout which is still 1 based columns.
To support unicode we must convert correctly.
Now FIXED!
2015-06-03 21:29:31 +01:00
Andy Williams e3ed8806c3 elm_code: add legacy API.
Refactor eo API in line with elm_obj_* elsewhere
2015-06-02 08:22:36 +01:00
Andy Williams 7bf0fc7c3c highlighting: Fix threading to avoid overlap crash
It's not threadsafe code within the editor so block
a thread if another is already running.
Also ditch pthread for Ecore_Thread :)
2015-05-30 22:56:41 +01:00
Andy Williams f4c48d4ca9 elm_code: support setting custom fonts
For EDI create the config that would allow this to be altered.
Actual setting widget to follow...
2015-05-30 10:31:46 +01:00
Andy Williams bf17d7c8af config: save project config in the project dir
globally storing info about projects loaded, file associations
and the general user preference.

GUI and usage settings stored in <project>/.edi folder
2015-05-16 09:59:08 +01:00
Andy Williams a0d6627f54 elm_code: add a TODO/FIXME standard parser
Corret some callback code and re-parse each time the file is saved.
Use this to clean up save/parse code in EDI too
2015-04-20 01:21:03 +01:00
Andy Williams 179b0e713f clang: Fix crash if error is not related to a file 2015-04-12 23:39:38 +01:00
Andy Williams 17d8b30e00 syntax: Only display errors for current file
Clang can report from various sources,
only add those that are from the current file
2015-04-12 23:06:28 +01:00
Andy Williams bc6ec2dd6f syntax: reset status and hints when we reset token
re-use elm_code methods when we do this in edi
2015-04-12 23:04:46 +01:00
Andy Williams d03675ba71 clang: fix paths used in syntax lookup
Pass in the edi build config to get efl params.
Also find the correct system include for clang dynamically
2015-04-12 22:25:41 +01:00
Andy Williams c0654b6c4e clang: remove debugging 2015-04-12 16:47:53 +01:00
Andy Williams 6fc3da889b Fix crash where clang encounters too many errors 2015-04-12 15:39:47 +01:00
Andy Williams efec7c1f37 editor: add tabstop configuration
Allow setting of the tabstop. App wide for now.
2015-03-29 20:40:24 +01:00
Andy Williams f1571f296e settings: Allow configuration of line width marker 2015-03-28 00:45:20 +00:00
Andy Williams 2a1320d1f1 clang: tidy clang disposal and remove notes 2015-03-28 00:18:20 +00:00