|
Eclipse JDT 2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.jface.dialogs.DialogPage | +--org.eclipse.jface.wizard.WizardPage | +--org.eclipse.jdt.ui.wizards.NewElementWizardPage | +--org.eclipse.jdt.ui.wizards.JavaCapabilityConfigurationPage
Standard wizard page for creating new Java projects. This page can be used in project creation wizards. The page shows UI to configure the project with a Java build path and output location. On finish the page will also configure the Java nature.
This is a replacement for NewJavaProjectWizardPage
with a cleaner API.
Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider |
ERROR, INFORMATION, NONE, WARNING |
Constructor Summary | |
JavaCapabilityConfigurationPage()
Creates a wizard page that can be used in a Java project creation wizard. |
Method Summary | |
void |
configureJavaProject(IProgressMonitor monitor)
Adds the Java nature to the project (if not set yet) and configures the build classpath. |
void |
createControl(Composite parent)
|
static void |
createProject(IProject project,
IPath locationPath,
IProgressMonitor monitor)
Helper method to create and open a IProject . |
IJavaProject |
getJavaProject()
Returns the Java project that was passed in init or null if the
page has not been initialized yet. |
IPath |
getOutputLocation()
Returns the currently configured output location. |
IClasspathEntry[] |
getRawClassPath()
Returns the currently configured classpath. |
IRunnableWithProgress |
getRunnable()
Returns the runnable that will create the Java project or null if the page has
not been initialized. |
void |
init(IJavaProject jproject,
IPath defaultOutputLocation,
IClasspathEntry[] defaultEntries,
boolean defaultsOverrideExistingClasspath)
Initializes the page with the project and default classpaths. |
Methods inherited from class org.eclipse.jdt.ui.wizards.NewElementWizardPage |
setVisible, updateStatus, updateStatus |
Methods inherited from class org.eclipse.jface.wizard.WizardPage |
canFlipToNextPage, getContainer, getDialogSettings, getImage, getName, getNextPage, getPreviousPage, getShell, getWizard, isCurrentPage, isPageComplete, setDescription, setErrorMessage, setImageDescriptor, setMessage, setPageComplete, setPreviousPage, setTitle, setWizard, toString |
Methods inherited from class org.eclipse.jface.dialogs.DialogPage |
convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, dispose, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getMessage, getMessageType, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, performHelp, setButtonLayoutData, setControl, setMessage |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.jface.dialogs.IDialogPage |
dispose, getControl, getDescription, getErrorMessage, getMessage, getTitle, performHelp |
Constructor Detail |
public JavaCapabilityConfigurationPage()
After constructing, a call to init
is required
Method Detail |
public void init(IJavaProject jproject, IPath defaultOutputLocation, IClasspathEntry[] defaultEntries, boolean defaultsOverrideExistingClasspath)
The default classpath entries must correspond the the given project.
The caller of this method is responsible for creating the underlying project. The page will create the output, source and library folders if required.
The project does not have to exist at the time of initialization, but must exist when executing the runnable
obtained by getRunnable()
.
project
- The Java project.entries
- The default classpath entries or null
to let the page choose the defaultpath
- The folder to be taken as the default output path or null
to let the page choose the defaulttrue
, an existing '.classpath' file is ignored. If set to false
the given default classpath and output location is only used if no '.classpath' exists.public void createControl(Composite parent)
createControl
in class DialogPage
public IPath getOutputLocation()
public IClasspathEntry[] getRawClassPath()
public IJavaProject getJavaProject()
init
or null
if the
page has not been initialized yet.null
public IRunnableWithProgress getRunnable()
null
if the page has
not been initialized. The runnable sets the project's classpath and output location to the values
configured in the page and adds the Java nature if not set yet. The method requires that the
project is created and opened.public static void createProject(IProject project, IPath locationPath, IProgressMonitor monitor) throws CoreException
monitor
- a progress monitor to report progress or null
if
progress reporting is not desiredpublic void configureJavaProject(IProgressMonitor monitor) throws CoreException, InterruptedException
monitor
- a progress monitor to report progress or null
if
progress reporting is not desired
|
Eclipse JDT 2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |