Author: dazarov
Date: 2010-03-04 09:17:57 -0500 (Thu, 04 Mar 2010)
New Revision: 20664
Modified:
branches/jbosstools-3.1.x/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamRefactorContributionFactory.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5993
Modified:
branches/jbosstools-3.1.x/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamRefactorContributionFactory.java
===================================================================
---
branches/jbosstools-3.1.x/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamRefactorContributionFactory.java 2010-03-04
14:15:19 UTC (rev 20663)
+++
branches/jbosstools-3.1.x/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamRefactorContributionFactory.java 2010-03-04
14:17:57 UTC (rev 20664)
@@ -297,6 +297,10 @@
private boolean scanChildNodes(IFile file, Node parent, TextSelection selection) {
boolean status = false;
+
+ if(parent == null)
+ return false;
+
NodeList children = parent.getChildNodes();
for(int i=0; i<children.getLength(); i++) {
Node curentValidatedNode = children.item(i);
@@ -318,6 +322,10 @@
private boolean scanNodeContent(IFile file, IStructuredDocumentRegion node, String
regionType, TextSelection selection) {
boolean status = false;
+
+ if(node == null)
+ return false;
+
ITextRegionList regions = node.getRegions();
for(int i=0; i<regions.size(); i++) {
ITextRegion region = regions.get(i);