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 JDT
Release 3.5

org.eclipse.jdt.ui.refactoring
Class RefactoringSaveHelper


java.lang.Object
  extended by 
org.eclipse.jdt.ui.refactoring.RefactoringSaveHelper

public class RefactoringSaveHelper
extends Object

Helper to save dirty editors prior to starting a refactoring.

Since:
3.5
See Also:
PreferenceConstants.REFACTOR_SAVE_ALL_EDITORS
Restriction:
This class is not intended to be subclassed by clients.

Field Summary
static int SAVE_ALL
          Save mode to save all dirty editors.
static int SAVE_ALL_ALWAYS_ASK
          Save mode to save all dirty editors (always ask).
static int SAVE_NOTHING
          Save mode to not save any editors.
static int SAVE_REFACTORING
          Save mode to save all editors that are known to cause trouble for Java refactorings, e.g.
 
Constructor Summary
RefactoringSaveHelper (int saveMode)
          Creates a refactoring save helper with the given save mode.
 
Method Summary
 boolean didSaveFiles ()
          Returns whether this save helper did actually save any files.
 boolean saveEditors ( Shell shell)
          Saves all editors.
 void triggerIncrementalBuild ()
          Triggers an incremental build if this save helper did save files before.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SAVE_ALL_ALWAYS_ASK

public static final int SAVE_ALL_ALWAYS_ASK
Save mode to save all dirty editors (always ask).

See Also:
Constant Field Values

SAVE_ALL

public static final int SAVE_ALL
Save mode to save all dirty editors.

See Also:
Constant Field Values

SAVE_NOTHING

public static final int SAVE_NOTHING
Save mode to not save any editors.

See Also:
Constant Field Values

SAVE_REFACTORING

public static final int SAVE_REFACTORING
Save mode to save all editors that are known to cause trouble for Java refactorings, e.g. editors on compilation units that are not in working copy mode.

See Also:
Constant Field Values
Constructor Detail

RefactoringSaveHelper

public RefactoringSaveHelper(int saveMode)
Creates a refactoring save helper with the given save mode.

Parameters:
saveMode - one of the SAVE_* constants
Method Detail

saveEditors

public boolean saveEditors(
Shell shell)
Saves all editors. Depending on the PreferenceConstants.REFACTOR_SAVE_ALL_EDITORS preference, the user is asked to save affected dirty editors.

Parameters:
shell - the parent shell for the confirmation dialog
Returns:
true if save was successful and refactoring can proceed; false if the refactoring must be cancelled

triggerIncrementalBuild

public void triggerIncrementalBuild()
Triggers an incremental build if this save helper did save files before.


didSaveFiles

public boolean didSaveFiles()
Returns whether this save helper did actually save any files.

Returns:
true iff files have been saved

Eclipse JDT
Release 3.5

Copyright (c) IBM Corp. and others 2000, 2008. All Rights Reserved.

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