Author: dazarov
Date: 2010-03-04 08:22:57 -0500 (Thu, 04 Mar 2010)
New Revision: 20656
Modified:
trunk/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:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamRefactorContributionFactory.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamRefactorContributionFactory.java 2010-03-04
13:19:32 UTC (rev 20655)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamRefactorContributionFactory.java 2010-03-04
13:22:57 UTC (rev 20656)
@@ -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);