diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/ICPathContainerPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/ICPathContainerPage.java index c147323743b..99a79608107 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/ICPathContainerPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/ICPathContainerPage.java @@ -26,6 +26,8 @@ import org.eclipse.jface.wizard.IWizardPage; * Clients implementing this interface may subclass from * org.eclipse.jface.wizard.WizardPage. *

+ * + * @deprecated - use IPathEntryContainerPage */ public interface ICPathContainerPage extends IWizardPage { diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/ICPathContainerPageExtension.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/ICPathContainerPageExtension.java deleted file mode 100644 index e62902e8f2a..00000000000 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/ICPathContainerPageExtension.java +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2004 QNX Software Systems and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Common Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/cpl-v10.html - * - * Contributors: - * QNX Software Systems - Initial API and implementation - *******************************************************************************/ -package org.eclipse.cdt.ui.wizards; - -import org.eclipse.cdt.core.model.IPathEntry; - - -public interface ICPathContainerPageExtension extends ICPathContainerPage { - - /** - * Method {@link #getNewContainers()} is called instead of {@link IClasspathContainerPage#getSelection() } - * to get the the newly added containers. {@link IClasspathContainerPage#getSelection() } is still used - * to get the edited elements. - * @return the classpath entries created on the page. All returned entries must be {@link - * IClasspathEntry#CPE_CONTAINER} - */ - public IPathEntry[] getNewContainers(); - -} diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/IPathEntryContainerPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/IPathEntryContainerPage.java new file mode 100644 index 00000000000..1e656ca0583 --- /dev/null +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/IPathEntryContainerPage.java @@ -0,0 +1,72 @@ +/******************************************************************************* + * Copyright (c) 2002, 2003, 2004 QNX Software Systems Ltd. and others. All + * rights reserved. This program and the accompanying materials are made + * available under the terms of the Common Public License v1.0 which + * accompanies this distribution, and is available at + * http://www.eclipse.org/legal/cpl-v10.html + * + * Contributors: QNX Software Systems - Initial API and implementation + ******************************************************************************/ +package org.eclipse.cdt.ui.wizards; + +import org.eclipse.cdt.core.model.ICProject; +import org.eclipse.cdt.core.model.IContainerEntry; +import org.eclipse.cdt.core.model.IPathEntry; +import org.eclipse.jface.wizard.IWizardPage; + +/** + * A path container page allows the user to create a new or edit an + * existing patch container entry. + *

+ * Clients should implement this interface and include the name of their + * class in an extension contributed to the cdt.ui's path container page + * extension point (named org.eclipse.cdt.ui.pathContainerPage + * ). + *

+ *

+ * Clients implementing this interface may subclass from + * org.eclipse.jface.wizard.WizardPage. + *

+ */ + +public interface IPathEntryContainerPage extends IWizardPage { + + /** + * Method initialize() is called before ICPathContainerPage.setSelection + * to give additional information about the context the path container entry is configured in. This information + * only reflects the underlying dialogs current selection state. The user still can make changes after the + * the path container pages has been closed or decide to cancel the operation. + * @param project - The project the new or modified entry is added to. The project does not have to exist. + * Project can be null. + * @param currentEntries - The path entries currently selected to be set as the projects path. This can also + * include the entry to be edited. + */ + public void initialize(ICProject project, IPathEntry[] currentEntries); + + /** + * Called when the path container wizard is closed by selecting + * the finish button. Implementers typically override this method to + * store the page result (new/changed path entry returned in + * getSelection) into its model. + * + * @return if the operation was succesful. Only when returned + * true, the wizard will close. + */ + public boolean finish(); + + /** + * Method {@link #getNewContainers()} is called to get the the newly added containers. + * @return the path entries created on this page. + */ + public IContainerEntry[] getNewContainers(); + + /** + * Sets the path container entry to be edited or null + * if a new entry should be created. + * + * @param containerEntry the path entry to edit or null. + * If unequals null then the path entry must be of + * kind IPathEntry.CDT_CONTAINER + */ + public void setSelection(IContainerEntry containerEntry); +}