diff options
Diffstat (limited to 'plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/SimpleValidateEdit.java')
-rw-r--r-- | plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/SimpleValidateEdit.java | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/SimpleValidateEdit.java b/plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/SimpleValidateEdit.java deleted file mode 100644 index ec844689d..000000000 --- a/plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/SimpleValidateEdit.java +++ /dev/null @@ -1,45 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005, 2007 IBM Corporation and others. - * 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: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.common.frameworks.internal; - -import java.util.List; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.jem.util.UIContextDetermination; - -public class SimpleValidateEdit { - - /** - * @param files must contain only {@link IFile}s - * @return - */ - public static boolean validateEdit(List files){ - if(files == null || files.size() == 0){ - return true; - } - return validateEdit( (IFile [])files.toArray(new IFile[files.size()])); - } - - public static boolean validateEdit(IFile[] files) { - if(files == null || files.length == 0){ - return true; - } - ISimpleValidateEditContext validator = (ISimpleValidateEditContext) UIContextDetermination.createInstance(ISimpleValidateEditContext.CLASS_KEY); - if (validator != null) { - IStatus status = validator.validateEdit(files); - if (status != null) - return status.isOK(); - } - return true; - } - -} |