Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/SaveHandlerHeadless.java')
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/SaveHandlerHeadless.java86
1 files changed, 0 insertions, 86 deletions
diff --git a/plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/SaveHandlerHeadless.java b/plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/SaveHandlerHeadless.java
deleted file mode 100644
index a9c07ce67..000000000
--- a/plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/SaveHandlerHeadless.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2005 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 org.eclipse.core.runtime.CoreException;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.wst.common.frameworks.internal.enablement.nonui.IWFTWrappedException;
-
-/**
- * Insert the type's description here. Creation date: (10/19/2001 11:40:59 AM)
- *
- * @author: Administrator
- */
-public class SaveHandlerHeadless implements ISaveHandler {
- /**
- * HeadlessSaveHandler constructor comment.
- */
- public SaveHandlerHeadless() {
- super();
- }
-
- /**
- * access method comment.
- */
- public void access() {
- }
-
- /**
- * handleSaveFailed method comment.
- */
- public void handleSaveFailed(SaveFailedException ex, org.eclipse.core.runtime.IProgressMonitor monitor) {
- throw ex;
- }
-
- public static boolean isFailedWriteFileFailure(IWFTWrappedException ex) {
- Exception nested = ex.getInnerMostNestedException();
- if (nested == null)
- return false;
-
- return isFailedWriteFileFailure(nested);
- }
-
- public static boolean isFailedWriteFileFailure(Exception ex) {
- if (ex instanceof IWFTWrappedException)
- return isFailedWriteFileFailure((IWFTWrappedException) ex);
- else if (ex instanceof CoreException)
- return isFailedWriteFileFailure((CoreException) ex);
- return false;
- }
-
- public static boolean isFailedWriteFileFailure(CoreException ex) {
- org.eclipse.core.runtime.IStatus status = ex.getStatus();
- if (status == null)
- return false;
- Throwable nested = status.getException();
- if (nested instanceof CoreException)
- return isFailedWriteFileFailure((CoreException) nested);
- return status.getCode() == org.eclipse.core.resources.IResourceStatus.FAILED_WRITE_LOCAL;
- }
-
- /**
- * release method comment.
- */
- public void release() {
- }
-
- /**
- * shouldContinueAndMakeFileEditable method comment.
- */
- public boolean shouldContinueAndMakeFileEditable(org.eclipse.core.resources.IFile aFile) {
- if (aFile == null)
- return false;
- String error = WTPResourceHandler.getString("Unable_to_save_read-only_f_ERROR_", new Object[]{aFile.getFullPath()}); //$NON-NLS-1$ = "Unable to save read-only file: "
- Logger.getLogger().logError(error);
- return false;
- }
-} \ No newline at end of file

Back to the top