diff options
Diffstat (limited to 'jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/validation/JpaValidator.java')
-rw-r--r-- | jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/validation/JpaValidator.java | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/validation/JpaValidator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/validation/JpaValidator.java deleted file mode 100644 index 4f5b65a735..0000000000 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/validation/JpaValidator.java +++ /dev/null @@ -1,54 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the terms of - * the Eclipse Public License v1.0, which accompanies this distribution and is available at - * http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.core.internal.validation; - -import java.util.Iterator; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.jobs.ISchedulingRule; -import org.eclipse.jpt.core.internal.IJpaProject; -import org.eclipse.wst.validation.internal.core.Message; -import org.eclipse.wst.validation.internal.core.ValidationException; -import org.eclipse.wst.validation.internal.operations.IWorkbenchContext; -import org.eclipse.wst.validation.internal.provisional.core.IReporter; -import org.eclipse.wst.validation.internal.provisional.core.IValidationContext; -import org.eclipse.wst.validation.internal.provisional.core.IValidatorJob; - -public class JpaValidator implements IValidatorJob -{ - public ISchedulingRule getSchedulingRule(IValidationContext helper) { - // don't know what to return here. my guess is that we want to return - // the resource that is possibly being changed during our validation, - // and since many resources in the project may be changed during this - // validation, returning the project makes the most sense. - return ((IWorkbenchContext) helper).getProject(); - } - - public IStatus validateInJob(IValidationContext helper, IReporter reporter) throws ValidationException { - JpaHelper jpaHelper = (JpaHelper) helper; - IJpaProject jpaProject = jpaHelper.getJpaProject(); - - reporter.removeAllMessages(this); - - for (Iterator stream = jpaProject.validationMessages(); stream.hasNext(); ) { - reporter.addMessage(this, (Message) stream.next()); - } - - return OK_STATUS; - } - - public void cleanup(IReporter reporter) { - // TODO Auto-generated method stub - return; - } - - public void validate(IValidationContext helper, IReporter reporter) throws ValidationException { - validateInJob(helper, reporter); - } -} |