chipKIT® Development Platform

Inspired by Arduino™

Annoyances in the IDE

Created Thu, 08 Mar 2012 02:09:21 +0000 by marcus.walther


marcus.walther

Thu, 08 Mar 2012 02:09:21 +0000

The following is a list of issues in the current IDE which are not show stoppers, but are generally annoying when using the IDE for ongoing work. Being new to this group I was not sure if this is the correct forum, or if they should have been directly entered as issues into github. A brief look there seemed to imply it was only developers on the IDE which entered issues directly. Please advise on how these should be handled in the future. All of these were observed on a Windows 7 environment, running the pre-packaged release 20111221 (i.e. the primary download, not built from source).

Issue 1: The vertical scroll bar does not take the font size into account. When changing the font size in File>Preferences>Editor Font Size to a larger value, the vertical scroll bar does not seem to be adjusted, which results in some of the code entered not being able to be scrolled to. How To Recreate:

  1. Open the IDE, size to about 1/2 the screen height, and 1/2 of the width.
  2. Set File > Preferences > Editor Font Size to 25
  3. Restart the IDE [Just because it says you must – this step makes no difference]
  4. Start typing lines into the editor, for example A<CR> B<CR> C<CR> … and so on.
  5. When the bottom of the window is reached, the scroll bar is not displayed, and the text being typed is now hidden below the bottom of the window, and you cannot scroll to it.
  6. Keep typing lines, and eventually, a scroll bar will appear, but will still not allow all lines to be accessed via scrolling.

Issue 2: Shortcut key for serial monitor adds line breaks in the editor. When using the shortcut key combination of Ctrl-Shift-M to start the serial monitor, the IDE will insert a line break at the current cursor position in the editor. Quite often this will split a line in such a way that the sketch no longer compiles, which makes this quite annoying if not noticed. This will only happen if the serial port monitor is actually opened without an error. How To Recreate:

  1. Connect a board via USB. Ensure that the IDE is set to that COM port.
  2. Open a new Sketch.
  3. Type AB and then position the cursor between the A and the B.
  4. Press Ctrl-Shift-M.
  5. Once the serial monitor opens, you will find the A and B are now on separate lines.

Issue 3: COM port settings are shared between instances. When debugging two separate boards (for example for testing inter-board communication), each in their own instance of the IDE application, and each on their own USB port (and hence with different COM ports) setting the COM port in either instance will change the port assignment for both instances. This is rather annoying, because if you forget to set the COM port in either instance before downloading the sketch, the sketch will be downloaded to the wrong board. How To Recreate:

  1. Plug in both boards to their own USB ports.
  2. Open one instance of the IDE, and use Tools > Serial Port to set it to the first board.
  3. Open a second instance of the IDE (different sketchbook), and use Tools > Serial Port to set it to the second board’s COM port.
  4. Move back to the first instance of the IDE, and you will notice it has now been change to connect to the same COM port as the second port. Uploading in either project will now affect only the second board.
  5. If you then fix the first IDE instance to point to its proper COM port, the second instance will also be changed.

Issue 4: Save is ambiguous when multiple files are open in the IDE. When multiple files are open in a single IDE instance, the save function seems to become a “Save All” function, clearing the “file dirty” indicator on all files (and it actually does save all changes to the file). When moving between the multiple files by clicking on the tabs across the top of the window, the “file dirty” indicator (the “section” symbol beside the file name) reappears for any files which have been modified during any of that editing session – regardless of the fact that those changes have already been saved to disk. This brings into question of what files were really saved in the eyes of the user. I needed to do individual tests to ensure that it was really functioning as a save all function. How To Recreate:

  1. Open a new sketch, and close the IDE.
  2. In the sketch directory, create additional .cpp and/or .h files. (at least 3 – can be empty).
  3. Restart the IDE, the sketch and the created files should appear as tabs.
  4. Change two of the files by adding some text. The changed files’ tabs should show the section symbol to indicate that there are unsaved changes.
  5. Push the ‘Save’ button at the top of the screen.
  6. All the section symbols disappear, implying that all the changes have been saved.
  7. Now click on each file tab, and you will notice that the section symbol re-appears on each file which had been previously modified – implying that these files were not saved. Enhancement suggestion: Give the user control by having separate “Save” (current file) and “Save All” functions available.

Issue 5: All ANSI C reserved words are not taken into account by syntax highlighting. Storage qualifiers such as “const” which are reserved words in C are not properly highlighted. It would be useful to highlight at least all the C reserved words.

Issue 6: Syntax highlighting does not work across line extensions. When extending a line across multiple lines by using a “\” at the end of the line, syntax highlighting is broken. How To Recreate:

  1. The following line is properly highlighted: char * foo = "This is a long string";
  2. The following two lines are not: char * foo = "This is a
    long string";

Enhancement Suggestions: While these are not specifically issues in that they are not functioning incorrectly, they would be very helpful to the user:

Enhancement 1: Make the font size for the footer change with the selected editor font size. The line number and COM port information are very small at high resolutions. It would be very helpful if they also increased when using a larger editor font. This is useful information which is very difficult to see.

Enhancement 2: Make the line number display include the “generated lines” in the sketch files. The line numbers in the editor are most useful when trying to locate error lines which are returned from the compiler. Before being sent to the compiler, the sketches (.pde files) are pre-processed to add an include file, and a declaration of each function used in the sketch. When displaying the line number in the pde files, it would be very helpful to display the line numbers as if this information had already been inserted. In this way, the line number of errors reported by the compiler in error messages would be aligned with those shown in the IDE. I believe that this is also the basis for issue #36 already in github.

Enhancement 3: Bring back the Serial Monitor after compile and upload. When uploading a sketch, the IDE closes the serial port monitor because the upload needs the serial port. It would be very helpful if in the cases where the IDE closes the serial port monitor, that it re-open it when the upload is complete. This would save the manual step of re-opening the serial port, as well as avoiding the extra device reset which seems to happen as soon as the monitor is opened.


ricklon

Fri, 09 Mar 2012 00:12:48 +0000

Thank you for spending the time to creat this list.

I need to get these added to the list in Github: https://github.com/chipKIT32/chipKIT32-MAX/issues

--Rick