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.ui
Interface ISaveablePart2

All Superinterfaces:
ISaveablePart

public interface ISaveablePart2
extends ISaveablePart

Workbench parts implement or adapt to this interface to participate in actions that require a prompt for the user to provide input on what to do with unsaved data when the part is closed or the Workbench is shut down.

Note that if a part implements this interface, it is excluded from the common "prompt to save" dialog, and instead opens its own dialog. This may cause multiple prompts to the end user during a single user operation. Implementors should be aware that this may lead to a less than optimal user experience.

Since:
3.1

Field Summary
static int CANCEL
          Standard return code constant (value 2) indicating that the part does not need to be saved and the part should not be closed.
static int DEFAULT
          Standard return code constant (value 3) indicating that the default behavior for prompting the user to save will be use.
static int NO
          Standard return code constant (value 1) indicating that the part does not need to be saved and the part should be closed.
static int YES
          Standard return code constant (value 0) indicating that the part needs to be saved.
 
Fields inherited from interface org.eclipse.ui. ISaveablePart
PROP_DIRTY
 
Method Summary
 int promptToSaveOnClose ()
          Prompts the user for input on what to do with unsaved data.
 
Methods inherited from interface org.eclipse.ui. ISaveablePart
doSave, doSaveAs, isDirty, isSaveAsAllowed, isSaveOnCloseNeeded
 

Field Detail

YES

static final int YES
Standard return code constant (value 0) indicating that the part needs to be saved.

See Also:
Constant Field Values

NO

static final int NO
Standard return code constant (value 1) indicating that the part does not need to be saved and the part should be closed.

See Also:
Constant Field Values

CANCEL

static final int CANCEL
Standard return code constant (value 2) indicating that the part does not need to be saved and the part should not be closed.

See Also:
Constant Field Values

DEFAULT

static final int DEFAULT
Standard return code constant (value 3) indicating that the default behavior for prompting the user to save will be use.

See Also:
Constant Field Values
Method Detail

promptToSaveOnClose

int promptToSaveOnClose()
Prompts the user for input on what to do with unsaved data. This method is only called when the part is closed or when the Workbench is shutting down.

Implementors are expected to open a custom dialog where the user will be able to determine what to do with the unsaved data. Implementors may also return a result of DEFAULT to get the default prompt handling from the Workbench.

Returns:
the return code, must be either YES, NO, CANCEL or DEFAULT.

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