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.wizards.newresource
Class BasicNewResourceWizard

java.lang.Object
  extended by 

org.eclipse.jface.wizard.Wizard
      extended by 
org.eclipse.ui.wizards.newresource.BasicNewResourceWizard
All Implemented Interfaces:
IWizard, INewWizard, IWorkbenchWizard
Direct Known Subclasses:
BasicNewFileResourceWizard, BasicNewFolderResourceWizard, BasicNewProjectResourceWizard

public abstract class BasicNewResourceWizard
extends Wizard
implements INewWizard

Abstract base implementation of the standard workbench wizards that create new resources in the workspace.

This class is not intended to be subclassed outside this package.

Restriction:
This class is not intended to be subclassed by clients.

Field Summary
protected   IStructuredSelection selection
          The current selection.
 
Fields inherited from class org.eclipse.jface.wizard. Wizard
DEFAULT_IMAGE
 
Constructor Summary
protected BasicNewResourceWizard ()
          Creates an empty wizard for creating a new resource in the workspace.
 
Method Summary
  IStructuredSelection getSelection ()
          Returns the selection which was passed to init.
  IWorkbench getWorkbench ()
          Returns the workbench which was passed to init.
 void init ( IWorkbench workbench, IStructuredSelection currentSelection)
          The BasicNewResourceWizard implementation of this IWorkbenchWizard method records the given workbench and selection, and initializes the default banner image for the pages by calling initializeDefaultPageImageDescriptor.
protected  void initializeDefaultPageImageDescriptor ()
          Initializes the default page image descriptor to an appropriate banner.
protected  void selectAndReveal ( IResource newResource)
          Selects and reveals the newly added resource in all parts of the active workbench window's active page.
static void selectAndReveal ( IResource resource, IWorkbenchWindow window)
          Attempts to select and reveal the specified resource in all parts within the supplied workbench window's active page.
 
Methods inherited from class org.eclipse.jface.wizard. Wizard
addPage, addPages, canFinish, createPageControls, dispose, getContainer, getDefaultPageImage, getDialogSettings, getNextPage, getPage, getPageCount, getPages, getPreviousPage, getShell, getStartingPage, getTitleBarColor, getWindowTitle, isHelpAvailable, needsPreviousAndNextButtons, needsProgressMonitor, performCancel, performFinish, setContainer, setDefaultPageImageDescriptor, setDialogSettings, setForcePreviousAndNextButtons, setHelpAvailable, setNeedsProgressMonitor, setTitleBarColor, setWindowTitle
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.jface.wizard. IWizard
addPages, canFinish, createPageControls, dispose, getContainer, getDefaultPageImage, getDialogSettings, getNextPage, getPage, getPageCount, getPages, getPreviousPage, getStartingPage, getTitleBarColor, getWindowTitle, isHelpAvailable, needsPreviousAndNextButtons, needsProgressMonitor, performCancel, performFinish, setContainer
 

Field Detail

selection

protected 
IStructuredSelection selection
The current selection.

Constructor Detail

BasicNewResourceWizard

protected BasicNewResourceWizard()
Creates an empty wizard for creating a new resource in the workspace.

Method Detail

getSelection

public 
IStructuredSelection getSelection()
Returns the selection which was passed to init.

Returns:
the selection

getWorkbench

public 
IWorkbench getWorkbench()
Returns the workbench which was passed to init.

Returns:
the workbench

init

public void init(
IWorkbench workbench,
                 
IStructuredSelection currentSelection)
The BasicNewResourceWizard implementation of this IWorkbenchWizard method records the given workbench and selection, and initializes the default banner image for the pages by calling initializeDefaultPageImageDescriptor. Subclasses may extend.

Specified by:
init in interface IWorkbenchWizard
Parameters:
workbench - the current workbench
currentSelection - the current object selection

initializeDefaultPageImageDescriptor

protected void initializeDefaultPageImageDescriptor()
Initializes the default page image descriptor to an appropriate banner. By calling setDefaultPageImageDescriptor. The default implementation of this method uses a generic new wizard image.

Subclasses may reimplement.


selectAndReveal

protected void selectAndReveal(
IResource newResource)
Selects and reveals the newly added resource in all parts of the active workbench window's active page.

See Also:
ISetSelectionTarget

selectAndReveal

public static void selectAndReveal(
IResource resource,
                                   
IWorkbenchWindow window)
Attempts to select and reveal the specified resource in all parts within the supplied workbench window's active page.

Checks all parts in the active page to see if they implement ISetSelectionTarget, either directly or as an adapter. If so, tells the part to select and reveal the specified resource.

Parameters:
resource - the resource to be selected and revealed
window - the workbench window to select and reveal the resource
See Also:
ISetSelectionTarget

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