Author: vrubezhny
Date: 2009-08-18 13:22:21 -0400 (Tue, 18 Aug 2009)
New Revision: 17143
Modified:
trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsConfigPluginSetPropertyHyperlinkPartitioner.java
trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsConfigSetPropertyHyperlinkPartitioner.java
trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsJSPLinkHyperlinkPartitioner.java
trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsJSPTagAttributeHyperlinkPartitioner.java
trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsJSPTagNameHyperlinkPartitioner.java
trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsTaglibDirectiveHyperlinkPartitioner.java
trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsXMLContextParamLinkHyperlinkPartitioner.java
trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsXMLLinkHyperlinkPartitioner.java
Log:
JBIDE-4757: NPE when try to open xhtml page from jar file
Issue is fixed
Modified:
trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsConfigPluginSetPropertyHyperlinkPartitioner.java
===================================================================
---
trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsConfigPluginSetPropertyHyperlinkPartitioner.java 2009-08-18
17:17:42 UTC (rev 17142)
+++
trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsConfigPluginSetPropertyHyperlinkPartitioner.java 2009-08-18
17:22:21 UTC (rev 17143)
@@ -15,17 +15,16 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
+import org.jboss.tools.common.text.ext.hyperlink.IHyperlinkRegion;
+import
org.jboss.tools.common.text.ext.hyperlink.xml.XMLTagAttributeValueHyperlinkPartitioner;
+import org.jboss.tools.common.text.ext.util.StructuredModelWrapper;
+import org.jboss.tools.common.text.ext.util.Utils;
+import org.jboss.tools.struts.StrutsProject;
+import org.jboss.tools.struts.text.ext.StrutsExtensionsPlugin;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
-import org.jboss.tools.struts.StrutsProject;
-import org.jboss.tools.struts.text.ext.StrutsExtensionsPlugin;
-import org.jboss.tools.common.text.ext.hyperlink.IHyperlinkRegion;
-import org.jboss.tools.common.text.ext.util.StructuredModelWrapper;
-import org.jboss.tools.common.text.ext.util.Utils;
-import
org.jboss.tools.common.text.ext.hyperlink.xml.XMLTagAttributeValueHyperlinkPartitioner;
-
/**
* @author Jeremy
*/
@@ -51,6 +50,9 @@
smw.init(document);
try {
IFile documentFile = smw.getFile();
+ if (documentFile == null)
+ return false;
+
IProject project = documentFile.getProject();
for (int i = 0; i < STRUTS_PROJECT_NATURES.length; i++) {
if (project.getNature(STRUTS_PROJECT_NATURES[i]) != null)
Modified:
trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsConfigSetPropertyHyperlinkPartitioner.java
===================================================================
---
trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsConfigSetPropertyHyperlinkPartitioner.java 2009-08-18
17:17:42 UTC (rev 17142)
+++
trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsConfigSetPropertyHyperlinkPartitioner.java 2009-08-18
17:22:21 UTC (rev 17143)
@@ -15,17 +15,16 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
+import org.jboss.tools.common.text.ext.hyperlink.IHyperlinkRegion;
+import
org.jboss.tools.common.text.ext.hyperlink.xml.XMLTagAttributeValueHyperlinkPartitioner;
+import org.jboss.tools.common.text.ext.util.StructuredModelWrapper;
+import org.jboss.tools.common.text.ext.util.Utils;
+import org.jboss.tools.struts.StrutsProject;
+import org.jboss.tools.struts.text.ext.StrutsExtensionsPlugin;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
-import org.jboss.tools.struts.StrutsProject;
-import org.jboss.tools.struts.text.ext.StrutsExtensionsPlugin;
-import org.jboss.tools.common.text.ext.hyperlink.IHyperlinkRegion;
-import org.jboss.tools.common.text.ext.util.StructuredModelWrapper;
-import org.jboss.tools.common.text.ext.util.Utils;
-import
org.jboss.tools.common.text.ext.hyperlink.xml.XMLTagAttributeValueHyperlinkPartitioner;
-
public class StrutsConfigSetPropertyHyperlinkPartitioner extends
XMLTagAttributeValueHyperlinkPartitioner {
public static final String STRUTS_XML_SET_PROPERTY_PARTITION =
"org.jboss.tools.common.text.ext.xml.STRUTS_XML_SET_PROPERTY";
@@ -46,6 +45,9 @@
smw.init(document);
try {
IFile documentFile = smw.getFile();
+ if (documentFile == null)
+ return false;
+
IProject project = documentFile.getProject();
for (int i = 0; i < STRUTS_PROJECT_NATURES.length; i++) {
if (project.getNature(STRUTS_PROJECT_NATURES[i]) != null)
Modified:
trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsJSPLinkHyperlinkPartitioner.java
===================================================================
---
trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsJSPLinkHyperlinkPartitioner.java 2009-08-18
17:17:42 UTC (rev 17142)
+++
trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsJSPLinkHyperlinkPartitioner.java 2009-08-18
17:22:21 UTC (rev 17143)
@@ -44,6 +44,9 @@
Document xmlDocument = smw.getDocument();
if(xmlDocument == null) return false;
IFile documentFile = smw.getFile();
+ if (documentFile == null)
+ return false;
+
IProject project = documentFile.getProject();
for (int i = 0; i < STRUTS_PROJECT_NATURES.length; i++) {
Modified:
trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsJSPTagAttributeHyperlinkPartitioner.java
===================================================================
---
trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsJSPTagAttributeHyperlinkPartitioner.java 2009-08-18
17:17:42 UTC (rev 17142)
+++
trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsJSPTagAttributeHyperlinkPartitioner.java 2009-08-18
17:22:21 UTC (rev 17143)
@@ -17,20 +17,19 @@
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IRegion;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-import org.w3c.dom.Text;
-
-import org.jboss.tools.struts.StrutsProject;
-import org.jboss.tools.struts.text.ext.StrutsExtensionsPlugin;
import org.jboss.tools.common.text.ext.hyperlink.AbstractHyperlinkPartitioner;
import org.jboss.tools.common.text.ext.hyperlink.HyperlinkRegion;
import org.jboss.tools.common.text.ext.hyperlink.IHyperlinkPartitionRecognizer;
import org.jboss.tools.common.text.ext.hyperlink.IHyperlinkRegion;
+import org.jboss.tools.common.text.ext.hyperlink.jsp.JSPRootHyperlinkPartitioner;
import org.jboss.tools.common.text.ext.util.StructuredModelWrapper;
import org.jboss.tools.common.text.ext.util.Utils;
-import org.jboss.tools.common.text.ext.hyperlink.jsp.JSPRootHyperlinkPartitioner;
+import org.jboss.tools.struts.StrutsProject;
+import org.jboss.tools.struts.text.ext.StrutsExtensionsPlugin;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.Text;
/**
* @author Jeremy
@@ -76,6 +75,9 @@
try {
smw.init(document);
IFile documentFile = smw.getFile();
+ if (documentFile == null)
+ return false;
+
IProject project = documentFile.getProject();
for (int i = 0; i < STRUTS_PROJECT_NATURES.length; i++) {
if (project.getNature(STRUTS_PROJECT_NATURES[i]) != null)
Modified:
trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsJSPTagNameHyperlinkPartitioner.java
===================================================================
---
trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsJSPTagNameHyperlinkPartitioner.java 2009-08-18
17:17:42 UTC (rev 17142)
+++
trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsJSPTagNameHyperlinkPartitioner.java 2009-08-18
17:22:21 UTC (rev 17143)
@@ -16,18 +16,17 @@
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IRegion;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-
-import org.jboss.tools.struts.StrutsProject;
-import org.jboss.tools.struts.text.ext.StrutsExtensionsPlugin;
import org.jboss.tools.common.text.ext.hyperlink.AbstractHyperlinkPartitioner;
import org.jboss.tools.common.text.ext.hyperlink.HyperlinkRegion;
import org.jboss.tools.common.text.ext.hyperlink.IHyperlinkPartitionRecognizer;
import org.jboss.tools.common.text.ext.hyperlink.IHyperlinkRegion;
+import org.jboss.tools.common.text.ext.hyperlink.jsp.JSPRootHyperlinkPartitioner;
import org.jboss.tools.common.text.ext.util.StructuredModelWrapper;
import org.jboss.tools.common.text.ext.util.Utils;
-import org.jboss.tools.common.text.ext.hyperlink.jsp.JSPRootHyperlinkPartitioner;
+import org.jboss.tools.struts.StrutsProject;
+import org.jboss.tools.struts.text.ext.StrutsExtensionsPlugin;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
/**
* @author Jeremy
@@ -75,6 +74,9 @@
smw.init(document);
try {
IFile documentFile = smw.getFile();
+ if (documentFile == null)
+ return false;
+
IProject project = documentFile.getProject();
for (int i = 0; i < STRUTS_PROJECT_NATURES.length; i++) {
Modified:
trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsTaglibDirectiveHyperlinkPartitioner.java
===================================================================
---
trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsTaglibDirectiveHyperlinkPartitioner.java 2009-08-18
17:17:42 UTC (rev 17142)
+++
trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsTaglibDirectiveHyperlinkPartitioner.java 2009-08-18
17:22:21 UTC (rev 17143)
@@ -16,17 +16,16 @@
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IRegion;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
+import org.jboss.tools.common.text.ext.hyperlink.IHyperlinkRegion;
+import
org.jboss.tools.common.text.ext.hyperlink.jsp.JSPTagAttributeValueHyperlinkPartitioner;
+import org.jboss.tools.common.text.ext.util.StructuredModelWrapper;
+import org.jboss.tools.common.text.ext.util.Utils;
+import org.jboss.tools.struts.StrutsProject;
+import org.jboss.tools.struts.text.ext.StrutsExtensionsPlugin;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
-import org.jboss.tools.struts.StrutsProject;
-import org.jboss.tools.struts.text.ext.StrutsExtensionsPlugin;
-import org.jboss.tools.common.text.ext.hyperlink.IHyperlinkRegion;
-import org.jboss.tools.common.text.ext.util.StructuredModelWrapper;
-import org.jboss.tools.common.text.ext.util.Utils;
-import
org.jboss.tools.common.text.ext.hyperlink.jsp.JSPTagAttributeValueHyperlinkPartitioner;
-
/**
* @author Jeremy
*/
@@ -74,6 +73,9 @@
try {
smw.init(document);
IFile documentFile = smw.getFile();
+ if (documentFile == null)
+ return false;
+
IProject project = documentFile.getProject();
for (int i = 0; i < STRUTS_PROJECT_NATURES.length; i++) {
if (project.getNature(STRUTS_PROJECT_NATURES[i]) != null)
Modified:
trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsXMLContextParamLinkHyperlinkPartitioner.java
===================================================================
---
trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsXMLContextParamLinkHyperlinkPartitioner.java 2009-08-18
17:17:42 UTC (rev 17142)
+++
trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsXMLContextParamLinkHyperlinkPartitioner.java 2009-08-18
17:22:21 UTC (rev 17143)
@@ -15,19 +15,18 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
+import org.jboss.tools.common.text.ext.hyperlink.IHyperlinkRegion;
+import
org.jboss.tools.common.text.ext.hyperlink.xml.XMLContextParamLinkHyperlinkPartitioner;
+import org.jboss.tools.common.text.ext.util.StructuredModelWrapper;
+import org.jboss.tools.common.text.ext.util.Utils;
+import org.jboss.tools.struts.StrutsProject;
+import org.jboss.tools.struts.text.ext.StrutsExtensionsPlugin;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.w3c.dom.Text;
-import org.jboss.tools.struts.StrutsProject;
-import org.jboss.tools.struts.text.ext.StrutsExtensionsPlugin;
-import org.jboss.tools.common.text.ext.hyperlink.IHyperlinkRegion;
-import org.jboss.tools.common.text.ext.util.StructuredModelWrapper;
-import org.jboss.tools.common.text.ext.util.Utils;
-import
org.jboss.tools.common.text.ext.hyperlink.xml.XMLContextParamLinkHyperlinkPartitioner;
-
/**
* @author Jeremy
*/
@@ -51,6 +50,9 @@
smw.init(document);
try {
IFile documentFile = smw.getFile();
+ if (documentFile == null)
+ return false;
+
IProject project = documentFile.getProject();
for (int i = 0; i < STRUTS_PROJECT_NATURES.length; i++) {
Modified:
trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsXMLLinkHyperlinkPartitioner.java
===================================================================
---
trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsXMLLinkHyperlinkPartitioner.java 2009-08-18
17:17:42 UTC (rev 17142)
+++
trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsXMLLinkHyperlinkPartitioner.java 2009-08-18
17:22:21 UTC (rev 17143)
@@ -14,12 +14,11 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.text.IDocument;
-
-import org.jboss.tools.struts.StrutsProject;
-import org.jboss.tools.struts.text.ext.StrutsExtensionsPlugin;
import org.jboss.tools.common.text.ext.hyperlink.IHyperlinkRegion;
import org.jboss.tools.common.text.ext.hyperlink.xml.XMLLinkHyperlinkPartitioner;
import org.jboss.tools.common.text.ext.util.StructuredModelWrapper;
+import org.jboss.tools.struts.StrutsProject;
+import org.jboss.tools.struts.text.ext.StrutsExtensionsPlugin;
/**
* @author Jeremy
@@ -45,6 +44,9 @@
smw.init(document);
try {
IFile documentFile = smw.getFile();
+ if (documentFile == null)
+ return false;
+
IProject project = documentFile.getProject();
for (int i = 0; i < STRUTS_PROJECT_NATURES.length; i++) {
Show replies by date