Author: vrubezhny
Date: 2010-09-28 08:52:05 -0400 (Tue, 28 Sep 2010)
New Revision: 25259
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/info/ChainTextHover.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/info/ELInfoHooverMessages.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/info/ELInfoHoverMessages.properties
Log:
JBIDE-7103
Open EmployeesEdit.xhtml with VPE and click some item -> "Error initializing
facelet registry entry" exception
The exception is caught (and logged) due to allow non-breakable hover info calculation.
The exception itself comes from WTP JST and we aren't able to fix something here.
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/info/ChainTextHover.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/info/ChainTextHover.java 2010-09-28
11:46:35 UTC (rev 25258)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/info/ChainTextHover.java 2010-09-28
12:52:05 UTC (rev 25259)
@@ -24,6 +24,7 @@
import org.eclipse.wst.sse.ui.internal.taginfo.AnnotationHoverProcessor;
import org.eclipse.wst.sse.ui.internal.taginfo.DebugInfoHoverProcessor;
import org.eclipse.wst.sse.ui.internal.taginfo.ProblemAnnotationHoverProcessor;
+import org.jboss.tools.jst.jsp.JspEditorPlugin;
/**
@@ -104,28 +105,36 @@
// already have a best match hover picked out from getHoverRegion call
if (fBestMatchHover != null) {
- displayInfo = fBestMatchHover.getHoverInfo(viewer, hoverRegion);
+ try {
+ displayInfo = fBestMatchHover.getHoverInfo(viewer, hoverRegion);
+ } catch (Exception e) {
+ JspEditorPlugin.getPluginLog().logError(ELInfoHooverMessages.ELInfoHoover_error_gettingInfo,
e);
+ }
}
// either had no best match hover or best match hover returned null
if (displayInfo == null) {
- // go through list of text hovers and return first display string
+ // go through the list of text hovers and return first display string
Iterator<ITextHover> i = getTextHovers().iterator();
while ((i.hasNext()) && (displayInfo == null)) {
ITextHover hover = (ITextHover) i.next();
- if(hover instanceof ITextHoverExtension2) {
- Object displayInfoObject = ((ITextHoverExtension2)hover).getHoverInfo2(viewer,
hoverRegion);
- if(displayInfoObject!=null) {
- displayInfo = displayInfoObject.toString();
+ try {
+ if(hover instanceof ITextHoverExtension2) {
+ Object displayInfoObject = ((ITextHoverExtension2)hover).getHoverInfo2(viewer,
hoverRegion);
+ if(displayInfoObject!=null) {
+ displayInfo = displayInfoObject.toString();
+ }
+ } else {
+ displayInfo = hover.getHoverInfo(viewer, hoverRegion);
}
- } else {
- displayInfo = hover.getHoverInfo(viewer, hoverRegion);
+ } catch (Exception e) {
+ JspEditorPlugin.getPluginLog().logError(ELInfoHooverMessages.ELInfoHoover_error_gettingInfo,
e);
}
}
}
return displayInfo;
}
- /*
+ /*
* (non-Javadoc)
*
* @see
org.eclipse.jface.text.ITextHover#getHoverRegion(org.eclipse.jface.text.ITextViewer,
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/info/ELInfoHooverMessages.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/info/ELInfoHooverMessages.java 2010-09-28
11:46:35 UTC (rev 25258)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/info/ELInfoHooverMessages.java 2010-09-28
12:52:05 UTC (rev 25259)
@@ -25,7 +25,8 @@
public static String ELInfoHover_noAttachedJavaSource; //
public static String ELInfoHover_noInformation; //
public static String ELInfoHover_error_gettingJavadoc; //
-
+ public static String ELInfoHoover_error_gettingInfo; //
+
static {
NLS.initializeMessages(BUNDLE_NAME, ELInfoHooverMessages.class);
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/info/ELInfoHoverMessages.properties
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/info/ELInfoHoverMessages.properties 2010-09-28
11:46:35 UTC (rev 25258)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/info/ELInfoHoverMessages.properties 2010-09-28
12:52:05 UTC (rev 25259)
@@ -3,3 +3,4 @@
ELInfoHover_noAttachedJavadoc= <em>Note: This element has no attached Javadoc and
the Javadoc could not be found in the attached source.</em>
ELInfoHover_noInformation= <em>Note: The Javadoc for this element could neither be
found in the attached source nor the attached Javadoc.</em>
ELInfoHover_error_gettingJavadoc= <em>Note: An exception occurred while getting the
Javadoc. See log for details.</em>
+ELInfoHoover_error_gettingInfo=<em>Note: An exception occurred while getting the
Hover Info. See log for details.</em>
\ No newline at end of file