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.dialogs
Class ContainerGenerator


java.lang.Object
  extended by 
org.eclipse.ui.dialogs.ContainerGenerator

public class ContainerGenerator
extends Object

For creating folder resources that currently do not exist, along a given workspace path.

This class may be instantiated; it is not intended to be subclassed.

Example usage:

 ContainerGenerator gen = new ContainerGenerator(new Path("/A/B"));
 IContainer res = null;
 try {
   res = gen.getContainer(monitor); // creates project A and folder B if required
 } catch (CoreException e) {
   // handle failure
 } catch (OperationCanceledException e) {
   // handle cancelation
 }
 

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

Constructor Summary
ContainerGenerator ( IPath containerPath)
          Creates a generator for the container resource (folder or project) at the given workspace path.
 
Method Summary
  IContainer generateContainer ( IProgressMonitor monitor)
          Ensures that this generator's container resource exists.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContainerGenerator

public ContainerGenerator(
IPath containerPath)
Creates a generator for the container resource (folder or project) at the given workspace path. Assumes the path has already been validated.

Call getContainer to create any missing resources along the path.

Parameters:
containerPath - the workspace path of the container
Method Detail

generateContainer

public 
IContainer generateContainer(
IProgressMonitor monitor)
                             throws 
CoreException
Ensures that this generator's container resource exists. Creates any missing resource containers along the path; does nothing if the container resource already exists.

Note: This method should be called within a workspace modify operation since it may create resources.

Parameters:
monitor - a progress monitor
Returns:
the container resource
Throws:
CoreException - if the operation fails
OperationCanceledException - if the operation is canceled

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