Example usage for org.eclipse.jdt.core ISourceManipulation delete

List of usage examples for org.eclipse.jdt.core ISourceManipulation delete

Introduction

In this page you can find the example usage for org.eclipse.jdt.core ISourceManipulation delete.

Prototype

void delete(boolean force, IProgressMonitor monitor) throws JavaModelException;

Source Link

Document

Deletes this element, forcing if specified and necessary.

Usage

From source file:org.eclipse.objectteams.otdt.ui.tests.refactoring.reorg.OTCopyToClipboardTests.java

License:Open Source License

private static void delete(ISourceManipulation element) {
    try {// w  ww .  j av  a2s.co  m
        if (element != null && ((IJavaElement) element).exists())
            element.delete(true, null);
    } catch (JavaModelException e) {
        //ignore, we must keep going
    }
}