Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.ltk.core.refactoring.resource
Class DeleteResourceChange

java.lang.Object
  extended by 

org.eclipse.ltk.core.refactoring.Change
      extended by 

org.eclipse.ltk.core.refactoring.resource.ResourceChange
          extended by 
org.eclipse.ltk.core.refactoring.resource.DeleteResourceChange
All Implemented Interfaces:
IAdaptable

public class DeleteResourceChange
extends ResourceChange

Change that deletes a resource.

Since:
3.4

Field Summary
 
Fields inherited from class org.eclipse.ltk.core.refactoring.resource. ResourceChange
SAVE_IF_DIRTY, VALIDATE_DEFAULT, VALIDATE_NOT_DIRTY, VALIDATE_NOT_READ_ONLY
 
Constructor Summary
DeleteResourceChange ( IPath resourcePath, boolean forceOutOfSync)
          Delete a resource.
DeleteResourceChange ( IPath resourcePath, boolean forceOutOfSync, boolean deleteContent)
          Delete a resource.
 
Method Summary
  ChangeDescriptor getDescriptor ()
          Returns a descriptor of this change.
protected   IResource getModifiedResource ()
          Returns the resource of this change.
  String getName ()
          Returns the human readable name of this change.
  Change perform ( IProgressMonitor pm)
          Performs this change.
 void setDescriptor ( ChangeDescriptor descriptor)
          Sets the change descriptor to be returned by Change.getDescriptor().
 
Methods inherited from class org.eclipse.ltk.core.refactoring.resource. ResourceChange
checkIfModifiable, getModifiedElement, initializeValidationData, isValid, setValidationMethod, toString
 
Methods inherited from class org.eclipse.ltk.core.refactoring. Change
dispose, getAdapter, getAffectedObjects, getParent, isEnabled, setEnabled, setEnabledShallow
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DeleteResourceChange

public DeleteResourceChange(
IPath resourcePath,
                            boolean forceOutOfSync)
Delete a resource.

Parameters:
resourcePath - the resource path
forceOutOfSync - if true, deletes the resource with IResource.FORCE

DeleteResourceChange

public DeleteResourceChange(
IPath resourcePath,
                            boolean forceOutOfSync,
                            boolean deleteContent)
Delete a resource.

Parameters:
resourcePath - the project path
forceOutOfSync - if true, deletes the resource with IResource.FORCE
deleteContent - if true delete the project contents. The content delete is not undoable. This setting only applies to projects and is not used when deleting files or folders.
Method Detail

getModifiedResource

protected 
IResource getModifiedResource()
Description copied from class: ResourceChange
Returns the resource of this change.

Specified by:
getModifiedResource in class ResourceChange
Returns:
the resource of this change

getName

public 
String getName()
Description copied from class: Change
Returns the human readable name of this change. The name MUST not be null.

Specified by:
getName in class Change
Returns:
the human readable name of this change

perform

public 
Change perform(
IProgressMonitor pm)
               throws 
CoreException
Description copied from class: Change
Performs this change. If this method is called on an invalid or disabled change object the result is unspecified. Changes should in general not respond to IProgressMonitor.isCanceled() since canceling a change tree in the middle of its execution leaves the workspace in a half changed state.

Specified by:
perform in class Change
Parameters:
pm - a progress monitor
Returns:
the undo change for this change object or null if no undo is provided
Throws:
CoreException - if an error occurred during change execution

getDescriptor

public 
ChangeDescriptor getDescriptor()
Description copied from class: Change
Returns a descriptor of this change.

Subclasses of changes created by Refactoring.createChange(IProgressMonitor) should override this method to return a RefactoringChangeDescriptor. A change tree created by a particular refactoring is supposed to contain at most one change which returns a refactoring descriptor. Refactorings usually return an instance of CompositeChange in their Refactoring.createChange(IProgressMonitor) method which implements this method. The refactoring framework searches the change tree top-down until a refactoring descriptor is found.

Overrides:
getDescriptor in class Change
Returns:
a descriptor of this change, or null if this change does not provide a change descriptor.

setDescriptor

public void setDescriptor(
ChangeDescriptor descriptor)
Sets the change descriptor to be returned by Change.getDescriptor().

Parameters:
descriptor - the change descriptor

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire