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
Answertopia.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.ui.ide.undo
Class WorkspaceUndoUtil


java.lang.Object
  extended by 
org.eclipse.ui.ide.undo.WorkspaceUndoUtil

public class WorkspaceUndoUtil
extends Object

WorkspaceUndoUtil defines common utility methods and constants used by clients who create undoable workspace operations.

Since:
3.3

Method Summary
static  IUndoContext getBookmarksUndoContext ()
          Return the undo context that should be used for operations involving bookmarks.
static  Shell getShell ( IAdaptable uiInfo)
          Return the shell described by the specified adaptable, or the active shell if no shell has been specified in the adaptable.
static  IUndoContext getTasksUndoContext ()
          Return the undo context that should be used for operations involving tasks.
static  IAdaptable getUIInfoAdapter ( Shell shell)
          Make an IAdaptable that adapts to the specified shell, suitable for passing for passing to any IUndoableOperation or IOperationHistory method that requires an IAdaptable uiInfo parameter.
static  IUndoContext getWorkspaceUndoContext ()
          Return the undo context that should be used for workspace-wide operations
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getWorkspaceUndoContext

public static 
IUndoContext getWorkspaceUndoContext()
Return the undo context that should be used for workspace-wide operations

Returns:
the undo context suitable for workspace-level operations.

getTasksUndoContext

public static 
IUndoContext getTasksUndoContext()
Return the undo context that should be used for operations involving tasks.

Returns:
the tasks undo context

getBookmarksUndoContext

public static 
IUndoContext getBookmarksUndoContext()
Return the undo context that should be used for operations involving bookmarks.

Returns:
the bookmarks undo context

getUIInfoAdapter

public static 
IAdaptable getUIInfoAdapter(
Shell shell)
Make an IAdaptable that adapts to the specified shell, suitable for passing for passing to any IUndoableOperation or IOperationHistory method that requires an IAdaptable uiInfo parameter.

Parameters:
shell - the shell that should be returned by the IAdaptable when asked to adapt a shell. If this parameter is null, the returned shell will also be null.
Returns:
an IAdaptable that will return the specified shell.

getShell

public static 
Shell getShell(
IAdaptable uiInfo)
Return the shell described by the specified adaptable, or the active shell if no shell has been specified in the adaptable.

Parameters:
uiInfo - the IAdaptable (or null) provided by the caller in order to supply UI information for prompting the user if necessary. When this parameter is not null, it contains an adapter for the org.eclipse.swt.widgets.Shell.class
Returns:
the Shell that can be used to show information

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