Author: dgolovin
Date: 2011-08-10 18:49:29 -0400 (Wed, 10 Aug 2011)
New Revision: 33794
Modified:
trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/XMLTextViewerConfiguration.java
trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/info/ChainTextHover.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/HTMLTextViewerConfiguration.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/JSPTextViewerConfiguration.java
Log:
Code review fixes for
https://issues.jboss.org/browse/JBIDE-9448
dead blocks were removed, because control is never gets there
new ChainTextHover() is never called with null hovers parameter, so check for null is
removed.
createDocumentationHovers(partitionType) never returns null, so there is no reason to
check hovers for null and replace it with empty array.
Modified:
trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/XMLTextViewerConfiguration.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/XMLTextViewerConfiguration.java 2011-08-10
21:56:21 UTC (rev 33793)
+++
trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/XMLTextViewerConfiguration.java 2011-08-10
22:49:29 UTC (rev 33794)
@@ -210,11 +210,6 @@
protected IInformationProvider getInformationProvider(
ISourceViewer sourceViewer, String partitionType) {
ITextHover[] hovers = createDocumentationHovers(partitionType);
- if (hovers == null) {
- hovers = new ITextHover[] {new ChainTextHover(
- new ITextHover[0])};
- }
-
return new TextHoverInformationProvider(new ChainTextHover(
hovers));
}
Modified:
trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/info/ChainTextHover.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/info/ChainTextHover.java 2011-08-10
21:56:21 UTC (rev 33793)
+++
trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/info/ChainTextHover.java 2011-08-10
22:49:29 UTC (rev 33794)
@@ -70,18 +70,16 @@
// hoverList.add(new ProblemAnnotationHoverProcessor());
hoverList.add(new MarkerProblemAnnotationHoverProcessor());
- if (fTagInfoHovers != null) {
- for (int i = 0; i < fTagInfoHovers.length; i++) {
+ for (int i = 0; i < fTagInfoHovers.length; i++) {
// if (fTagInfoHovers[i] instanceof FaceletTagInfoHoverProcessor) {
- if (fTagInfoHovers[i].getClass().getName().startsWith("org.jboss.tools."))
{
- hoverList.add(fTagInfoHovers[i]);
- }
+ if (fTagInfoHovers[i].getClass().getName().startsWith("org.jboss.tools."))
{
+ hoverList.add(fTagInfoHovers[i]);
}
- for (int i = 0; i < fTagInfoHovers.length; i++) {
+ }
+ for (int i = 0; i < fTagInfoHovers.length; i++) {
// if (!(fTagInfoHovers[i] instanceof FaceletTagInfoHoverProcessor)) {
- if
(!(fTagInfoHovers[i].getClass().getName().startsWith("org.jboss.tools."))) {
- hoverList.add(fTagInfoHovers[i]);
- }
+ if
(!(fTagInfoHovers[i].getClass().getName().startsWith("org.jboss.tools."))) {
+ hoverList.add(fTagInfoHovers[i]);
}
}
hoverList.add(new AnnotationHoverProcessor());
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/HTMLTextViewerConfiguration.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/HTMLTextViewerConfiguration.java 2011-08-10
21:56:21 UTC (rev 33793)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/HTMLTextViewerConfiguration.java 2011-08-10
22:49:29 UTC (rev 33794)
@@ -201,11 +201,6 @@
protected IInformationProvider getInformationProvider(
ISourceViewer sourceViewer, String partitionType) {
ITextHover[] hovers = createDocumentationHovers(partitionType);
- if (hovers == null) {
- hovers = new ITextHover[] {new ChainTextHover(
- new ITextHover[0])};
- }
-
return new TextHoverInformationProvider(new ChainTextHover(
hovers));
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/JSPTextViewerConfiguration.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/JSPTextViewerConfiguration.java 2011-08-10
21:56:21 UTC (rev 33793)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/JSPTextViewerConfiguration.java 2011-08-10
22:49:29 UTC (rev 33794)
@@ -208,11 +208,6 @@
protected IInformationProvider getInformationProvider(
ISourceViewer sourceViewer, String partitionType) {
ITextHover[] hovers = createDocumentationHovers(partitionType);
- if (hovers == null) {
- hovers = new ITextHover[] {new ChainTextHover(
- new ITextHover[0])};
- }
-
return new TextHoverInformationProvider(new ChainTextHover(
hovers));
}