Author: scabanovich
Date: 2007-09-18 08:22:34 -0400 (Tue, 18 Sep 2007)
New Revision: 3682
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/form/SampleErrorForm.java
Log:
JBIDE-898
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/form/SampleErrorForm.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/form/SampleErrorForm.java 2007-09-18
11:40:59 UTC (rev 3681)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/form/SampleErrorForm.java 2007-09-18
12:22:34 UTC (rev 3682)
@@ -223,8 +223,8 @@
public StyleRange2(int start, int length, Color fg, Color bg, String location) {
super(start, length, fg, bg);
int i = location.indexOf(":");
- line = getInt(location.substring(0, i), 0);
- position = getInt(location.substring(i + 1), 0);
+ line = i < 0 ? 0 : getInt(location.substring(0, i), 0);
+ position = i < 0 ? 0 : getInt(location.substring(i + 1), 0);
}
public void execute() {
if(listener != null) listener.errorSelected(line, position);
Show replies by date