Very first steps - Confused about Eclipse

Former Member
Former Member
Dear folks,

I wanted to get started with ConenctIQ development. I downloaded the eBook and I am reading the getting started guide. I build and debug the sample applications.

I am not sure if there is something wrong with my installation, or if it's supposed to be this way. Right now, eclipse can build the project and launch a simulator. But the code editing itself is like notepad. There is a bit of syntax highlighting, but no highlighting of syntax errors. No code completion. I can only find stuff out by randomly trying things out, and a lot of trial and error. It has been at least five years since I last worked with Eclipse, but these are things I'd expect.

Maybe it's just me being used to strongly typed languages but right now, by looking at sample code, I wouldn't even have the slightest clue about members of an object that gets passed into a method. I see there are fan projects for other IDEs like VSC or IDEA, but I'm sure stuff like code completion and other tools ought to be in the official Eclipse bundle as well?


Many thanks in advance.
  • make sure to set the perspective to connect iq: window -> perspective -> other -> connect iq

    I've also done some tutorials on connect iq (see my sig), you might want to check them out to get a head start...
  • I am not sure if there is something wrong with my installation, or if it's supposed to be this way. Right now, eclipse can build the project and launch a simulator. But the code editing itself is like notepad. There is a bit of syntax highlighting, but no highlighting of syntax errors. No code completion. I can only find stuff out by randomly trying things out, and a lot of trial and error. It has been at least five years since I last worked with Eclipse, but these are things I'd expect.


    TBH, that stuff is a limitation of the Connect IQ plugin (the CIQ editor, to be specific), not with Eclipse itself. If you've previously coded Java or even C/C++ in Eclipse, you'll find that you have to adjust your expectations a little.

    The closest the Eclipse CIQ editor has to "auto-completion" is that when you type A, CTRL-SPACE, it'll show you all known symbols starting with A (regardless of the context).

    Anyway, I'd say it's a little better than notepad. Maybe closer to notepad++ (which I use all the time).

    I once dabbled with using other editors (like Sublime) to write my Monkey C, but in the end, it's still more convenient to stay with Eclipse, mainly because:
    - If Build Automatically is enabled (which it is by default), every time you save it'll try to build and you'll see syntax errors at that point
    - You can run your app sort of seamlessly

  • Ok. disclaimer here! My first "editor" was a key punch machine, and if you messed up in column 40, you just started with a new card.. :)

    And I've also used notepad to do web pages.

    And I've been using Eclipse for a 2+ years (with the CIQ perspective).

    But there's a bit more there. Add "Sys." and wait (the dot is important) You'll see things that fit after a "dot". I use this all the time.

    Also, (and I'm still learning this myself) is there are some keyboard shortcuts that are really helpfull! Maybe there should be a forum thread with these shortcuts?

    Heck when I started with Eclipse, all I knew about "eclipse" was that it was a song on "Dark Side of the Moon" :)
  • But there's a bit more there. Add "Sys." and wait (the dot is important) You'll see things that fit after a "dot". I use this all the time.


    But the problem with that is it's not context-sensitive. You could type "ASDFAASD." and wait (or press CTRL-SPACE). It would still give you the exact same list, including "Toybox", which technically speaking, does not "fit after a dot". In fact, you'll see that pressing CTRL-SPACE after "nothing" (whitespace or beginning of line) will give you a superset of the list you get when completing "WHATEVER.". (It's basically the exact same list, plus language keywords at the top, as far as I can see.)

    Long story short:
    - Completing "WHATEVER." gives you all known symbols (as far as I can tell)
    - Completing "" gives you language keywords plus all known symbols (as far as I can tell)
    - Completing "a" gives you all language keywords and known symbols starting with "a"

    This is handy, but it's not what smart "code completion" usually does. Most people would expect the "code-completion" for "Sys." to give you a list of every valid thing that can appear after "Sys.", not anything that can be completed after "*." People want code-completion to give them a list of valid completions (that would compile and run), not just completions that could plausibly fit.

    CIQ auto-completion works okay if I have a good idea of what I want to type. It doesn't help me find instance methods or enumerations in a CIQ library class, for example. (Unless I am missing something.) I can't type "Toybox.Graphics." + CTRL-SPACE and get the results I might expect to see.

    Not a criticism, but simply my understanding of how the CIQ plugin works.

    BTW, you can press CTRL-SHIFT-L to see all Eclipse shortcuts, including the ones that the CIQ plugin added (only one I'm aware of is CTRL-6 for the simulator). Press CTRL-SHIFT-L again while the shortcut list is displayed to edit the shortcuts. If you search for stuff in Quick Access (CTRL-3), you'll also see the associated keyboard shortcut, where available. (e.g. Search for "simulator" and you'll see the CTRL-6 shortcut)
  • Former Member
    Former Member over 7 years ago
    Many thanks for your replies, most helpful.

    Good to know about the "autocomplete". Maybe things like IntelliSense have sissified me and this is how real men code? I am honestly a bit shocked that code editing is basically "notepad with a few colours". I will adjust my expectations, get back to the beginning, take a deep breath and start again. I am still puzzled how I will get anything done with absolutely no context-sensitive help and a dynamically typed language (also entirely new to me), but eventually, I will. This is going to be hardcore :cool:
  • this is how real men code?


    Haha well...if you work with Javascript, for example, there are similar limitations, for practical reasons (e.g. Intellisense in Visual Studio won't be able to tell you about third-party libraries, only stuff in your current file). So yeah, sometimes your IDE is just a text editor.

    Good luck and have fun! :)