X-Git-Url: http://secure.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/core/IJavaModel.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/core/IJavaModel.java index a9858d4..a4ff657 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/core/IJavaModel.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/core/IJavaModel.java @@ -1,17 +1,16 @@ /******************************************************************************* - * Copyright (c) 2000, 2001, 2002 International Business Machines Corp. and others. + * Copyright (c) 2000, 2003 IBM Corporation and others. * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Common Public License v0.5 + * 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-v05.html + * http://www.eclipse.org/legal/cpl-v10.html * * Contributors: * IBM Corporation - initial API and implementation - ******************************************************************************/ + *******************************************************************************/ package net.sourceforge.phpdt.core; import org.eclipse.core.resources.IWorkspace; -import org.eclipse.core.runtime.IProgressMonitor; /** * Represent the root Java element corresponding to the workspace. @@ -34,6 +33,22 @@ import org.eclipse.core.runtime.IProgressMonitor; */ public interface IJavaModel extends IJavaElement, IOpenable, IParent { /** + * Returns whether this Java model contains an IJavaElement whose + * resource is the given resource or a non-Java resource which is the given resource. + *

+ * Note: no existency check is performed on the argument resource. If it is not accessible + * (see IResource.isAccessible()) yet but would be located in Java model + * range, then it will return true. + *

+ * If the resource is accessible, it can be reached by navigating the Java model down using the + * getChildren() and/or getNonJavaResources() methods. + *

+ * @param resource the resource to check + * @return true if the resource is accessible through the Java model + * @since 2.1 + */ +//boolean contains(IResource resource); +/** * Copies the given elements to the specified container(s). * If one container is specified, all elements are copied to that * container. If more than one container is specified, the number of @@ -68,17 +83,18 @@ public interface IJavaModel extends IJavaElement, IOpenable, IParent { * @param monitor a progress monitor * @exception JavaModelException if an element could not be copied. Reasons include: * */ -void copy(IJavaElement[] elements, IJavaElement[] containers, IJavaElement[] siblings, String[] renamings, boolean replace, IProgressMonitor monitor) throws JavaModelException; +//void copy(IJavaElement[] elements, IJavaElement[] containers, IJavaElement[] siblings, String[] renamings, boolean replace, IProgressMonitor monitor) throws JavaModelException; /** * Deletes the given elements, forcing the operation if necessary and specified. * @@ -88,19 +104,20 @@ void copy(IJavaElement[] elements, IJavaElement[] containers, IJavaElement[] sib * @param monitor a progress monitor * @exception JavaModelException if an element could not be deleted. Reasons include: * */ -void delete(IJavaElement[] elements, boolean force, IProgressMonitor monitor) throws JavaModelException; +//void delete(IJavaElement[] elements, boolean force, IProgressMonitor monitor) throws JavaModelException; /** * Returns the Java project with the given name. This is a handle-only method. * The project may or may not exist. * * @return the Java project with the given name */ -IJavaProject getJavaProject(String name); + IJavaProject getJavaProject(String name); /** * Returns the Java projects in this Java model, or an empty array if there * are none. @@ -109,7 +126,21 @@ IJavaProject getJavaProject(String name); * are none * @exception JavaModelException if this request fails. */ -IJavaProject[] getJavaProjects() throws JavaModelException; + IJavaProject[] getJavaProjects() throws JavaModelException; +/** + * Returns an array of non-Java resources (that is, non-Java projects) in + * the workspace. + *

+ * Non-Java projects include all projects that are closed (even if they have the + * Java nature). + *

+ * + * @return an array of non-Java projects contained in the workspace. + * @throws JavaModelException if this element does not exist or if an + * exception occurs while accessing its corresponding resource + * @since 2.1 + */ +//Object[] getNonJavaResources() throws JavaModelException; /** * Returns the workspace associated with this Java model. * @@ -151,19 +182,20 @@ IWorkspace getWorkspace(); * @param monitor a progress monitor * @exception JavaModelException if an element could not be moved. Reasons include: * * * @exception IllegalArgumentException any element or container is null */ -void move(IJavaElement[] elements, IJavaElement[] containers, IJavaElement[] siblings, String[] renamings, boolean replace, IProgressMonitor monitor) throws JavaModelException; +//void move(IJavaElement[] elements, IJavaElement[] containers, IJavaElement[] siblings, String[] renamings, boolean replace, IProgressMonitor monitor) throws JavaModelException; /** * Triggers an update of the JavaModel with respect to the referenced external archives. @@ -191,7 +223,7 @@ void move(IJavaElement[] elements, IJavaElement[] containers, IJavaElement[] sib * @see IJavaElementDelta * @since 2.0 */ -void refreshExternalArchives(IJavaElement[] elementsScope, IProgressMonitor monitor) throws JavaModelException; +//void refreshExternalArchives(IJavaElement[] elementsScope, IProgressMonitor monitor) throws JavaModelException; /** * Renames the given elements as specified. @@ -209,6 +241,7 @@ void refreshExternalArchives(IJavaElement[] elementsScope, IProgressMonitor moni * @param monitor a progress monitor * @exception JavaModelException if an element could not be renamed. Reasons include: * */ -void rename(IJavaElement[] elements, IJavaElement[] destinations, String[] names, boolean replace, IProgressMonitor monitor) throws JavaModelException; +//void rename(IJavaElement[] elements, IJavaElement[] destinations, String[] names, boolean replace, IProgressMonitor monitor) throws JavaModelException; }