Author: akazakov
Date: 2010-03-03 06:26:38 -0500 (Wed, 03 Mar 2010)
New Revision: 20593
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5892
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java 2010-03-03
11:25:26 UTC (rev 20592)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java 2010-03-03
11:26:38 UTC (rev 20593)
@@ -158,8 +158,10 @@
SeamProjectsSet set = new SeamProjectsSet(project);
IProject warProject = set.getWarProject();
- seamProject = SeamCorePlugin.getSeamProject(warProject, false);
- projectName = seamProject.getProject().getName();
+ if(warProject.isAccessible()) {
+ seamProject = SeamCorePlugin.getSeamProject(warProject, false);
+ projectName = seamProject.getProject().getName();
+ }
}
private boolean isPreferencesEnabled(IProject project) {
@@ -172,6 +174,9 @@
*/
public IStatus validate(Set<IFile> changedFiles, IProject project,
ContextValidationHelper validationHelper, ValidatorManager manager, IReporter reporter)
throws ValidationException {
init(project, validationHelper, manager, reporter);
+ if(seamProject==null) {
+ return OK_STATUS;
+ }
displaySubtask(SeamValidationMessages.SEARCHING_RESOURCES, new String[]{projectName});
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
@@ -269,6 +274,9 @@
*/
public IStatus validateAll(IProject project, ContextValidationHelper validationHelper,
ValidatorManager manager, IReporter reporter) throws ValidationException {
init(project, validationHelper, manager, reporter);
+ if(seamProject==null) {
+ return OK_STATUS;
+ }
removeAllMessagesFromResource(seamProject.getProject());
ISeamComponent[] components = seamProject.getComponents();
for (ISeamComponent component : components) {