mirror of
https://github.com/processing/processing4.git
synced 2026-02-14 10:55:38 +01:00
improving old code in Problem
This commit is contained in:
@@ -175,9 +175,9 @@ public class ErrorBar extends JPanel {
|
||||
// because of
|
||||
// class declaration in the beginning as well as default imports
|
||||
for (Problem problem : problems) {
|
||||
if (problem.tabIndex == currentTab) {
|
||||
if (problem.getTabIndex() == currentTab) {
|
||||
// Ratio of error line to total lines
|
||||
float y = (problem.lineNumber - errorCheckerService.defaultImportsOffset)
|
||||
float y = (problem.getLineNumber() - errorCheckerService.defaultImportsOffset)
|
||||
/ ((float) totalLines);
|
||||
// Ratio multiplied by height of the error bar
|
||||
y *= fheight - 15; // -15 is just a vertical offset
|
||||
@@ -294,7 +294,7 @@ public class ErrorBar extends JPanel {
|
||||
&& evt.getY() <= eMarker.getY() + 2 + errorMarkerHeight) {
|
||||
Problem p = eMarker.getProblem();
|
||||
String msg = (p.isError() ? "Error: " : "Warning: ")
|
||||
+ p.message;
|
||||
+ p.getMessage();
|
||||
setToolTipText(msg);
|
||||
setCursor(Cursor
|
||||
.getPredefinedCursor(Cursor.HAND_CURSOR));
|
||||
|
||||
Reference in New Issue
Block a user