CompilerError error = console.getError(++errorNo); if(error == null) { view.getToolkit().beep(); return; } JOptionPane.showMessageDialog(view,error.getError(), jEdit.getProperty("error.title"), JOptionPane.INFORMATION_MESSAGE); console.setCurrentError(errorNo); Buffer buffer = error.openFile(); int lineNo = error.getLineNo(); int start = buffer.getDefaultRootElement() .getElement(lineNo).getStartOffset(); if(view.getBuffer() == buffer) view.getTextArea().setCaretPosition(start); else { buffer.setCaretInfo(start,start); view.setBuffer(buffer); view.updateBuffersMenu(); }
console.setCurrentError(errorNo + 1);
	public void actionPerformed(ActionEvent evt)	{		try		{			View view = getView(evt);			Console console = view.getConsole();			int errorNo = console.getCurrentError();			CompilerError error = console.getError(++errorNo);			if(error == null)			{				view.getToolkit().beep();				return;			}			JOptionPane.showMessageDialog(view,error.getError(),				jEdit.getProperty("error.title"),				JOptionPane.INFORMATION_MESSAGE);			console.setCurrentError(errorNo);			Buffer buffer = error.openFile();			int lineNo = error.getLineNo();			int start = buffer.getDefaultRootElement()				.getElement(lineNo).getStartOffset();			if(view.getBuffer() == buffer)				view.getTextArea().setCaretPosition(start);			else			{				buffer.setCaretInfo(start,start);				view.setBuffer(buffer);				view.updateBuffersMenu();			}		}		catch(Exception e)		{			e.printStackTrace();		}	}