Author: scabanovich
Date: 2008-10-07 09:45:19 -0400 (Tue, 07 Oct 2008)
New Revision: 10709
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/ObjectMultiPageEditor.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ComboBoxFieldEditor.java
Log:
JBIDE-2802
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/ObjectMultiPageEditor.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/ObjectMultiPageEditor.java 2008-10-07
13:11:50 UTC (rev 10708)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/ObjectMultiPageEditor.java 2008-10-07
13:45:19 UTC (rev 10709)
@@ -395,7 +395,7 @@
}
public void gotoMarker(IMarker marker) {
- if(marker == null || getModelObject() == null) return;
+ if(marker == null || getModelObject() == null || !marker.exists()) return;
String path = marker.getAttribute("path", null);
if(path != null) {
XModelObject o = getModelObject().getModel().getByPath(path);
@@ -415,19 +415,12 @@
}
}
} else {
- try {
- if ("org.eclipse.search.searchmarker".equals(marker.getType())) {
- int offset = marker.getAttribute(IMarker.CHAR_START, -1);
- int length = marker.getAttribute(IMarker.CHAR_END, -1);
- if (offset > -1 && length > -1) {
- postponedTextSelection.clean();
- textEditor.gotoMarker(marker);
- }
- }
- } catch (CoreException e) {
- ModelUIPlugin.getPluginLog().logError(e);
+ int offset = marker.getAttribute(IMarker.CHAR_START, -1);
+ int length = marker.getAttribute(IMarker.CHAR_END, -1);
+ if (offset > -1 && length > -1) {
+ postponedTextSelection.clean();
+ textEditor.gotoMarker(marker);
}
-
}
}
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ComboBoxFieldEditor.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ComboBoxFieldEditor.java 2008-10-07
13:11:50 UTC (rev 10708)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ComboBoxFieldEditor.java 2008-10-07
13:45:19 UTC (rev 10709)
@@ -279,6 +279,7 @@
* In this case current value should be set to combo field.
*/
private void revalidateValue() {
+ if(valueProvider == null) return;
Object v = valueProvider.getValue();
if(v == null || !(propertyEditor.getInput() instanceof DefaultValueAdapter)) return;
String s = v.toString();
Show replies by date