title: bufferuntil('\n) won’t trigger serialevent processing with Eclipse
body: <p>I want to do the simplest thing to plot a graph from the serial port of Arduino with the <a href="https://en.wikipedia.org/wiki/Processing_%28programming_language%29" rel="nofollow noreferrer">Processing</a> software. I use <a href="https://en.wikipedia.org/wiki/Eclipse_%28software%29" rel="nofollow noreferrer">Eclipse</a>.</p>
  <p>I did as the tutorials say about the plugins. I also copied the code from the Arduino site which is this:</p>
  <pre class="lang-cpp prettyprint-override"><code>import processing.serial.*;
  
  Serial myPort;        // The serial port
  int xPos = 1;         // Horizontal position of the graph
  
  void setup () {
  
    // Set the window size:
    size(400, 300);
  
    // List all the available serial ports
    println(Serial.list());
  
    // I know that the first port in the serial list on my mac
    // is always my Arduino, so I open Serial.list()[0].
    // Open whatever port is the one you're using.
    myPort = new Serial(this, Serial.list()[0], 9600);
  
    // Don't generate a serialEvent() unless you get a newline character:
    myPort.bufferUntil('\n');
  
    // Set the initial background:
    background(0);
  }
  
  void draw () {
    // Everything happens in the serialEvent()
  }
  
  void serialEvent (Serial myPort) {
  
    // Get the ASCII string:
    String inString = myPort.readStringUntil('\n');
  
    if (inString != null) {
  
      // Trim off any whitespace:
      inString = trim(inString);
  
      // Convert to an int and map to the screen height:
      float inByte = float(inString);
      inByte = map(inByte, 0, 1023, 0, height);
  
      // Draw the line:
      stroke(127, 34, 255);
      line(xPos, height, xPos, height - inByte);
  
      // At the edge of the screen, go back to the beginning:
      if (xPos &gt;= width) {
  
        xPos = 0;
        background(0);
      }
      else {
         // Increment the horizontal position:
         xPos++;
      }
    }
  }
  
  </code></pre>
  <p>There is a problem that the bufferUntil('\n') does not trigger the serialevent.</p>
  <p>I know that there was a bug. In case you try to set an 8-bit int to a 32-bit int, it goes to hell.</p>
  <p>The Processing IDE works great though. Eclipse does not trigger at all. Is there a solution?</p>