Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide code completion inside editor #4089

Closed
lmihalkovic opened this issue Nov 5, 2015 · 6 comments
Closed

Provide code completion inside editor #4089

lmihalkovic opened this issue Nov 5, 2015 · 6 comments
Labels
Type: Duplicate Another item already exists for this topic
Milestone

Comments

@lmihalkovic
Copy link

The IDE currently does not provide any form of CTRL-SPACE code completion. The feature is sorely missing, especially for newbies like me. The feature should cover the following

  • basic completion based on KWxxx and LITyyy available in the sketch libraries
  • specific completion for different file types (keywords.txt, dependencies.txt, library.properties)
  • a clean framework for future file types, ....

extended feature would cover more 'smartness' inside c/c++/h/hpp files, WITHOUT writing a full-blown parser

@lmihalkovic
Copy link
Author

Framework + initial implementation working for keywords.properties

arduino-2015-11-05 at 2 00 57 pm

arduino-2015-11-05 at 2 01 16 pm

arduino-2015-11-05 at 2 01 37 pm

At the moment I am not sure what LITERALXXX are for so the name strings are all wrong. The implementation is also missing the typical explanation window that opens when a keyword has been selected.

@lmihalkovic
Copy link
Author

Current completion for library's library.properties. "*" indicates a mandatory field.

arduino-2015-11-05 at 2 38 31 pm

arduino-2015-11-05 at 2 41 05 pm

ps: missing backtracking to eliminate already entered properties (should be caught be validator instead???)

@ffissore
Copy link
Contributor

ffissore commented Nov 5, 2015

Duplicate of #849 and #3484
@lmihalkovic it seems like you have running code already. Mind to show it? The smaller the PR, the easier it gets merged

@ffissore ffissore added the Type: Duplicate Another item already exists for this topic label Nov 5, 2015
@ffissore ffissore added this to the Release 1.6.7 milestone Nov 5, 2015
@ffissore ffissore self-assigned this Nov 5, 2015
@lmihalkovic
Copy link
Author

I seem to have missed an episode :( ... where can I find a keywords.txt for the core platform code?

I think I just realized only LIT1 exists, right?!

ps: the code requires only one line of code added to editor.java so risk of collisions is next to nil

@ffissore ffissore closed this as completed Nov 5, 2015
@lmihalkovic
Copy link
Author

@ffissore I read #3484... quite the PR. IMHO integrating it into the core code as it is basicaly equates giving up on a lot things that are currently easy to do and signing up for a lot of maintenance headaches. The fact that I think it is does not make it so, but the fact that this PR requires so many changes to editor and textarea should itself be a smell of poor API design.

I just find truly unfortunate that a lot of good existing design might be sacrificed.

@lmihalkovic
Copy link
Author

Interestingly enough, the weird highlighting in the screenshots was caused by some of the issues I was alluding to in my last comment (code in the wrong place).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Duplicate Another item already exists for this topic
Projects
None yet
Development

No branches or pull requests

2 participants