diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CModelException.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CModelException.java index d192f10d8e3..5c43784d21b 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CModelException.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CModelException.java @@ -11,9 +11,8 @@ package org.eclipse.cdt.core.model; -import org.eclipse.core.runtime.CoreException; - import org.eclipse.cdt.internal.core.model.CModelStatus; +import org.eclipse.core.runtime.CoreException; /** * A checked exception representing a failure in the C model. @@ -34,10 +33,9 @@ public class CModelException extends CoreException { * The exception contains a C-specific status object with severity * IStatus.ERROR and the given status code. * - * @param exception the Throwable + * @param e the {@link Throwable} * @param code one of the C-specific status codes declared in * ICModelStatusConstants - * @return the new C model exception * @see ICModelStatusConstants * @see org.eclipse.core.runtime.IStatus#ERROR */ @@ -51,7 +49,6 @@ public class CModelException extends CoreException { * CModelException(exception,ICModelStatusConstants.CORE_EXCEPTION. * * @param exception the CoreException - * @return the new C model exception */ public CModelException(CoreException exception) { this(new CModelStatus(exception)); @@ -61,7 +58,6 @@ public class CModelException extends CoreException { * Creates a C model exception for the given C-specific status object. * * @param status the C-specific status object - * @return the new C model exception */ public CModelException(ICModelStatus status) { super(status); diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CoreModel.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CoreModel.java index 95235d43d86..a33ea1b7fd0 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CoreModel.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CoreModel.java @@ -354,7 +354,7 @@ public class CoreModel { } /** - * Return the registed content type id, for example: + * Return the registered content type id, for example: * * or null is return if no id match the list - * @param file * @return the know id or null */ public static String getRegistedContentTypeId(IProject project, String name) { @@ -460,8 +459,7 @@ public class CoreModel { * is equivalent to newContainerEntry(path,false). *

* - * @param containerPath - * the id of the container + * @param id the id of the container * @return a new container entry * */ @@ -649,14 +647,14 @@ public class CoreModel { /** * Creates and returns a new entry of kind CDT_INCLUDE * - * @param resoourcePath + * @param resourcePath * the affected project-relative resource path * @param basePath * the base path of the includePath * @param includePath * the absolute path of the include * @param isSystemInclude - * wheter this include path should be consider the system + * whether this include path should be consider the system * include path * @param exclusionPatterns * exclusion patterns in the resource if a container @@ -706,10 +704,6 @@ public class CoreModel { /** * Creates a new entry of kind CDT_INCLUDE_FILE - * - * @param resourcePath - * @param includeFile - * @return */ public static IIncludeFileEntry newIncludeFileEntry(IPath resourcePath, IPath includeFile) { return newIncludeFileEntry(resourcePath, null, null, includeFile, null, false); @@ -738,7 +732,7 @@ public class CoreModel { /** * Creates and returns an entry kind CDT_MACRO * - * @param path + * @param resourcePath * the affected project-relative resource path * @param macroName * the name of the macro @@ -761,7 +755,6 @@ public class CoreModel { * the value of the macro * @param exclusionPatterns * exclusion patterns in the resource if a container - * @return */ public static IMacroEntry newMacroEntry(IPath resourcePath, String macroName, String macroValue, IPath[] exclusionPatterns) { return newMacroEntry(resourcePath, macroName, macroValue, exclusionPatterns, false); @@ -778,7 +771,6 @@ public class CoreModel { * the value of the macro * @param exclusionPatterns * exclusion patterns in the resource if a container - * @return */ public static IMacroEntry newMacroEntry(IPath resourcePath, String macroName, String macroValue, IPath[] exclusionPatterns, boolean isExported) { return new MacroEntry(resourcePath, null, macroName, macroValue, exclusionPatterns, isExported); @@ -793,7 +785,6 @@ public class CoreModel { * the base reference path * @param macroName * the name of the macro - * @return IMacroEntry */ public static IMacroEntry newMacroRefEntry(IPath resourcePath, IPath baseRef, String macroName) { return new MacroEntry(resourcePath, baseRef, macroName, null, APathEntry.NO_EXCLUSION_PATTERNS, false); @@ -801,10 +792,6 @@ public class CoreModel { /** * Creates an entry kind CDT_MACRO_FILE - * - * @param resourcePath - * @param macroFile - * @return */ public static IMacroFileEntry newMacroFileEntry(IPath resourcePath, IPath macroFile) { return newMacroFileEntry(resourcePath, null, null, macroFile, null, false); @@ -821,7 +808,6 @@ public class CoreModel { * the file path where the macros are define * @param exclusionPatterns * exclusion patterns in the resource if a container - * @return */ public static IMacroFileEntry newMacroFileEntry(IPath resourcePath, IPath basePath, IPath baseRef, IPath macroFilePath, IPath[] exclusionPatterns, boolean isExported) { return new MacroFileEntry(resourcePath, basePath, baseRef, macroFilePath, exclusionPatterns, isExported); @@ -862,8 +848,7 @@ public class CoreModel { * * @see PathEntryContainerInitializer * @see IPathEntryContainer - * @see #setPathEntryContainer(IPath, ICProject[], IPathEntryContainer, - * IProgressMonitor) + * @see #setPathEntryContainer(ICProject[], IPathEntryContainer, IProgressMonitor) */ public static IPathEntryContainer getPathEntryContainer(IPath containerPath, ICProject project) throws CModelException { return pathEntryManager.getPathEntryContainer(containerPath, project); @@ -892,13 +877,13 @@ public class CoreModel { * * @param affectedProjects - * the set of projects for which this container is being bound - * @param newContainer - + * @param container - * the container for the affected projects * @param monitor * a monitor to report progress * @throws CModelException * @see PathEntryContainerInitializer - * @see #getPathEntryContainer(IPath, IJavaProject) + * @see #getPathEntryContainer(IPath, ICProject) * @see IPathEntryContainer */ public static void setPathEntryContainer(ICProject[] affectedProjects, IPathEntryContainer container, IProgressMonitor monitor) @@ -928,7 +913,7 @@ public class CoreModel { * specifies an empty pathentry. *

* - * @param entries + * @param newEntries * a list of entries * @param monitor * the given progress monitor @@ -1066,9 +1051,6 @@ public class CoreModel { /** * Return the IPathEntryStore of the project. - * - * @param project - * @return * @throws CoreException */ public static IPathEntryStore getPathEntryStore(IProject project) throws CoreException { @@ -1110,7 +1092,6 @@ public class CoreModel { * and during getResolvedPathEntries. *

* @param cProject the given C project - * @param PathEntry entries * @return a status object with code IStatus.OK if * the entries location are compatible, otherwise a status * object indicating what is wrong with them @@ -1308,8 +1289,7 @@ public class CoreModel { if (cProject != null) { try { IPathEntry[] resolvedPE = CoreModel.getRawPathEntries(cProject); - for (int i = 0; i < resolvedPE.length; i++) { - IPathEntry pe = resolvedPE[i]; + for (IPathEntry pe : resolvedPE) { // first check all containers if (pe.getEntryKind() == IPathEntry.CDT_CONTAINER) { IPathEntryContainer peContainer = CoreModel.getPathEntryContainer( @@ -1344,7 +1324,7 @@ public class CoreModel { } /** - * this method is a full equivalent to {@link #createProjectDescription(IProject, boolean, false)} + * this method is a full equivalent to createProjectDescription(project, loadIfExists, false). * * @see #createProjectDescription(IProject, boolean, boolean) */ @@ -1398,7 +1378,7 @@ public class CoreModel { * @param des * @throws CoreException * - * @see {@link #getProjectDescription(IProject, boolean)} + * @see #getProjectDescription(IProject, boolean) * @see #createProjectDescription(IProject, boolean) */ public void setProjectDescription(IProject project, ICProjectDescription des) throws CoreException { @@ -1454,18 +1434,14 @@ public class CoreModel { } /** - * aswers whether the given project is a new-style project, i.e. CConfigurationDataProvider-driven - * @param project - * @return + * answers whether the given project is a new-style project, i.e. CConfigurationDataProvider-driven */ public boolean isNewStyleProject(IProject project){ return descriptionManager.isNewStyleProject(project); } /** - * aswers whether the given project is a new-style project, i.e. CConfigurationDataProvider-driven - * @param des - * @return + * answers whether the given project is a new-style project, i.e. CConfigurationDataProvider-driven */ public boolean isNewStyleProject(ICProjectDescription des){ return descriptionManager.isNewStyleProject(des); diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CoreModelUtil.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CoreModelUtil.java index faf9a64ac4c..9d539425038 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CoreModelUtil.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CoreModelUtil.java @@ -15,7 +15,6 @@ package org.eclipse.cdt.core.model; import java.net.URI; import java.util.ArrayList; -import java.util.Iterator; import java.util.List; import java.util.Map; @@ -72,11 +71,11 @@ public class CoreModelUtil { if (exclusionPatterns == null) return false; char[] path = resourcePath.toString().toCharArray(); - for (int i = 0, length = exclusionPatterns.length; i < length; i++) { - if (prefixOfCharArray(exclusionPatterns[i], path)) { + for (char[] exclusionPattern : exclusionPatterns) { + if (prefixOfCharArray(exclusionPattern, path)) { return true; } - if (pathMatch(exclusionPatterns[i], path, true, '/')) { + if (pathMatch(exclusionPattern, path, true, '/')) { return true; } } @@ -547,8 +546,7 @@ public class CoreModelUtil { public static ITranslationUnit findTranslationUnitForLocation(IPath location, ICProject preferredProject) throws CModelException { IFile[] files= ResourcesPlugin.getWorkspace().getRoot().findFilesForLocation(location); if (files.length > 0) { - for (int i = 0; i < files.length; i++) { - IFile file = files[i]; + for (IFile file : files) { ITranslationUnit tu= findTranslationUnit(file); if (tu != null) { return tu; @@ -584,8 +582,7 @@ public class CoreModelUtil { public static ITranslationUnit findTranslationUnitForLocation(URI locationURI, ICProject preferredProject) throws CModelException { IFile[] files= ResourcesPlugin.getWorkspace().getRoot().findFilesForLocationURI(locationURI); if (files.length > 0) { - for (int i = 0; i < files.length; i++) { - IFile file = files[i]; + for (IFile file : files) { ITranslationUnit tu= findTranslationUnit(file); if (tu != null) { return tu; @@ -684,17 +681,16 @@ public class CoreModelUtil { */ public static ICConfigurationDescription[] getReferencedConfigurationDescriptions(ICConfigurationDescription cfgDes, boolean writable){ - List result = new ArrayList(); + List result = new ArrayList(); if(cfgDes != null) { - Map map = cfgDes.getReferenceInfo(); + Map map = cfgDes.getReferenceInfo(); if(map.size() != 0){ IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); CoreModel model = CoreModel.getDefault(); - for(Iterator iter = map.entrySet().iterator(); iter.hasNext();){ - Map.Entry entry = (Map.Entry)iter.next(); - String projName = (String)entry.getKey(); - String cfgId = (String)entry.getValue(); + for (Map.Entry entry : map.entrySet()) { + String projName = entry.getKey(); + String cfgId = entry.getValue(); IProject project = root.getProject(projName); if(!project.exists()) continue; @@ -715,7 +711,7 @@ public class CoreModelUtil { } } - return (ICConfigurationDescription[]) result.toArray(new ICConfigurationDescription[result.size()]); + return result.toArray(new ICConfigurationDescription[result.size()]); } /** @@ -730,24 +726,23 @@ public class CoreModelUtil { * @see CoreModelUtil#getReferencedConfigurationDescriptions(ICConfigurationDescription, boolean) */ public static ICConfigurationDescription[] getReferencingConfigurationDescriptions(ICConfigurationDescription cfgDes, boolean writable) { - List result = new ArrayList(); + List result = new ArrayList(); if(cfgDes!=null) { CoreModel core= CoreModel.getDefault(); IProject[] projects= ResourcesPlugin.getWorkspace().getRoot().getProjects(); - for (int i=0; i pids = new ArrayList(); + for (ICConfigurationDescription cfg : cfgs) { + ICTargetPlatformSetting tps = cfg.getTargetPlatformSetting(); String[] ids = tps.getBinaryParserIds(); for (int j = 0; j < ids.length; j++) { if (!pids.contains(ids[j])) pids.add(ids[j]); } } - return (String[])pids.toArray(new String[pids.size()]); + return pids.toArray(new String[pids.size()]); } /** @@ -787,8 +782,8 @@ public class CoreModelUtil { public static void setBinaryParserIds(ICConfigurationDescription[] cfgs, String[] pids) { if (cfgs == null || cfgs.length == 0) return; - for (int i=0; i * * @return an array of non-C resources directly contained in this project - * @exception JavaModelException if this element does not exist or if an + * @exception CModelException if this element does not exist or if an * exception occurs while accessing its corresponding resource */ Object[] getNonCResources() throws CModelException; @@ -56,7 +56,6 @@ public interface ICContainer extends ICElement, IParent, IOpenable { /** * Returns the all the binaries of this container. * - * @return * @throws CModelException */ IBinary[] getBinaries() throws CModelException; @@ -64,36 +63,26 @@ public interface ICContainer extends ICElement, IParent, IOpenable { /** * Return the binary for this name, it must be a * valid binary - * This is a handle-only operation. The celement - * may or may not exist. - * - * @return - * @throws CModelException + * This is a handle-only operation. The container may or may not exist. */ IBinary getBinary(String name); /** * Returns all the archive of this container * - * @return * @throws CModelException */ IArchive[] getArchives() throws CModelException; /** - * This is a handle-only operation. The celement + * This is a handle-only operation. The container * may or may not exist. - * - * @param file - * @return - * @throws CModelException */ IArchive getArchive(String name); /** * Return al the child containers of this container. * - * @return * @throws CModelException */ ICContainer[] getCContainers() throws CModelException; diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ICElement.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ICElement.java index bc91591a146..eacefd0276d 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ICElement.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ICElement.java @@ -376,8 +376,6 @@ public interface ICElement extends IAdaptable { * in a resource. * * @return the underlying resource, or null if none - * @exception CModelException if this element does not exist or if an - * exception occurs while accessing its underlying resource */ IResource getUnderlyingResource(); @@ -387,8 +385,6 @@ public interface ICElement extends IAdaptable { * a corresponding resource. * * @return the corresponding resource, or null if none - * @exception CModelException if this element does not exist or if an - * exception occurs while accessing its resource */ IResource getResource(); /** diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ICElementVisitor.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ICElementVisitor.java index fb136666ef9..9524cb7dc88 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ICElementVisitor.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ICElementVisitor.java @@ -20,9 +20,6 @@ public interface ICElementVisitor { /** * Visited a member if the ICElement tree. Returns whether to visit the children * of this element. - * - * @param element - * @return */ public boolean visit(ICElement element) throws CoreException; diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ICModel.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ICModel.java index bab77d91dca..10fd17b66df 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ICModel.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ICModel.java @@ -25,7 +25,7 @@ import org.eclipse.core.runtime.IProgressMonitor; * delete operations on multiple C elements. *

* - * @see CCore#create(org.eclipse.core.resources.IWorkspaceRoot) + * @see CoreModel#create(org.eclipse.core.resources.IWorkspaceRoot) */ public interface ICModel extends ICElement, IParent, IOpenable { /** diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ICModelStatusConstants.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ICModelStatusConstants.java index 131eb2e8cce..6ba630a86e2 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ICModelStatusConstants.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ICModelStatusConstants.java @@ -59,8 +59,6 @@ public interface ICModelStatusConstants { * Status constant indicating that one or more elements * supplied do not exist. * The element(s) can be retrieved using getElements on the status object. - * - * @see ICModelStatus#isDoesNotExist */ public static final int ELEMENT_DOES_NOT_EXIST = 969; @@ -198,21 +196,21 @@ public interface ICModelStatusConstants { /** * Status indicating that a C element could not be created because * the underlying resource is invalid. - * @see CCore + * @see CoreModel */ public static final int INVALID_RESOURCE = 995; /** * Status indicating that a C element could not be created because * the underlying resource is not of an appropriate type. - * @see CCore + * @see CoreModel */ public static final int INVALID_RESOURCE_TYPE = 996; /** * Status indicating that a C element could not be created because * the project owning underlying resource does not have the C nature. - * @see CCore + * @see CoreModel */ public static final int INVALID_PROJECT = 997; diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ICProject.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ICProject.java index 26262555835..5ce3b2f431f 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ICProject.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ICProject.java @@ -22,11 +22,10 @@ import org.eclipse.core.runtime.IProgressMonitor; /** * A C project represents a view of a project resource in terms of C * elements such as , ICContainer, ITranslationUnit .... - * CCore.create(project). + * CoreModel.create(project). *

* - * @see CCore#create(org.eclipse.core.resources.IProject) - * @see IBuildEntry + * @see CoreModel#create(org.eclipse.core.resources.IProject) */ public interface ICProject extends IParent, IOpenable, ICElement { @@ -42,14 +41,12 @@ public interface ICProject extends IParent, IOpenable, ICElement { /** * Return the ArchiveContainer of this Project. - * @return * @throws CModelException */ IArchiveContainer getArchiveContainer() throws CModelException; /** * Return the BinaryContainer of this Project. - * @return * @throws CModelException */ IBinaryContainer getBinaryContainer() throws CModelException; @@ -66,11 +63,11 @@ public interface ICProject extends IParent, IOpenable, ICElement { /** * Returns all of the existing source roots that exist - * on the pathentry, in the order they are defined by the ".cdtproject". + * on the project, in the order they are defined by the ".cdtproject". * * @return all of the existing package fragment roots that exist * on the classpath - * @exception JavaModelException if this element does not exist or if an + * @exception CModelException if this element does not exist or if an * exception occurs while accessing its corresponding resource */ ISourceRoot[] getAllSourceRoots() throws CModelException; @@ -90,26 +87,22 @@ public interface ICProject extends IParent, IOpenable, ICElement { /** * Return the output entries. * - * @return * @throws CModelException */ public IOutputEntry[] getOutputEntries() throws CModelException; /** * @param resource - * @return */ boolean isOnOutputEntry(IResource resource); /** * @param resource - * @return */ boolean isOnSourceRoot(IResource resource); /** * @param element - * @return */ boolean isOnSourceRoot(ICElement element); @@ -123,7 +116,6 @@ public interface ICProject extends IParent, IOpenable, ICElement { /** * Return the include paths set on the project. * - * @return * @throws CModelException */ IIncludeReference[] getIncludeReferences() throws CModelException; @@ -245,7 +237,7 @@ public interface ICProject extends IParent, IOpenable, ICElement { *

* * @return an array of non-C resources directly contained in this project - * @exception JavaModelException if this element does not exist or if an + * @exception CModelException if this element does not exist or if an * exception occurs while accessing its corresponding resource */ Object[] getNonCResources() throws CModelException; diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IContributedCElement.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IContributedCElement.java index 4f240e3b36f..3a8b0ea21df 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IContributedCElement.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IContributedCElement.java @@ -10,6 +10,8 @@ *******************************************************************************/ package org.eclipse.cdt.core.model; +import org.eclipse.core.runtime.IAdaptable; + /** * Additions to the ICElement hierarchy provided by diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IFunctionDeclaration.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IFunctionDeclaration.java index 8974d0357df..81b915b00b9 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IFunctionDeclaration.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IFunctionDeclaration.java @@ -23,9 +23,6 @@ public interface IFunctionDeclaration extends IDeclaration { * *

For example, a source method declaring "void f(int a) throw (x1, x2);", * would return the array {"x1", "x2"}. - * - * @exception CModelException if this element does not exist or if an - * exception occurs while accessing its corresponding resource. */ String[] getExceptions(); @@ -40,9 +37,6 @@ public interface IFunctionDeclaration extends IDeclaration { * *

For example, a method declared as public void foo(String text, int length=9) * would return the array {"9"}. - * - * @exception CModelException if this argument does not exist or if an - * exception occurs while accessing its corresponding resource. */ String getParameterInitializer(int pos); diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IIncludeEntry.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IIncludeEntry.java index 682fd3dd9e8..4553ff4e4ff 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IIncludeEntry.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IIncludeEntry.java @@ -28,15 +28,11 @@ public interface IIncludeEntry extends IPathEntry { /** * Return the includePath with the base path. - * - * @return */ IPath getFullIncludePath(); /** * Return the reference path - * - * @return */ IPath getBaseReference(); diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IIncludeFileEntry.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IIncludeFileEntry.java index 34cfb681764..2e428603220 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IIncludeFileEntry.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IIncludeFileEntry.java @@ -23,8 +23,6 @@ public interface IIncludeFileEntry extends IPathEntry { /** * Return the includeFilePath with the base path. - * - * @return */ IPath getFullIncludeFilePath(); @@ -36,8 +34,6 @@ public interface IIncludeFileEntry extends IPathEntry { /** * Return the reference path - * - * @return */ IPath getBaseReference(); diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IIncludeReference.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IIncludeReference.java index f4d41accb44..7256f141a89 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IIncludeReference.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IIncludeReference.java @@ -20,22 +20,16 @@ public interface IIncludeReference extends IParent, ICElement { /** * Returns the pathEntry - * - * @return */ IIncludeEntry getIncludeEntry(); /** * Return the affected path - * @return */ IPath getAffectedPath(); /** * Return true if the path is on the include path Entry - * - * @param path - * @return */ boolean isOnIncludeEntry(IPath path); diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ILanguage.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ILanguage.java index 30f86e68acf..a9893ec5cfb 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ILanguage.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ILanguage.java @@ -79,14 +79,6 @@ public interface ILanguage extends IAdaptable { /** * Return the AST completion node for the given offset. - * - * @param reader - * @param scanInfo - * @param fileCreator - * @param index - * @param log - * @param offset - * @return * @throws CoreException */ public IASTCompletionNode getCompletionNode(CodeReader reader, IScannerInfo scanInfo, ICodeReaderFactory fileCreator, IIndex index, IParserLogService log, int offset) throws CoreException; diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ILanguageMappingChangeEvent.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ILanguageMappingChangeEvent.java index b49cfc30dec..710f6248711 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ILanguageMappingChangeEvent.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ILanguageMappingChangeEvent.java @@ -46,7 +46,7 @@ public interface ILanguageMappingChangeEvent { * * @return a String corresponding to the full path to the file for which settings have changed if this * event's type is TYPE_FILE, or null otherwise. - * @see getProject() + * @see #getProject() * * @since 4.0 */ @@ -61,7 +61,7 @@ public interface ILanguageMappingChangeEvent { * In order to obtain the full context for the file it may be required that you also call getProject(), * as it is possible that this file may not live inside the workspace. * - * @see getProject() + * @see #getProject() * * @since 4.0 */ @@ -80,9 +80,9 @@ public interface ILanguageMappingChangeEvent { /** * Returns the type of even being reported. * @return the type of even being reported - * @see TYPE_WORKSPACE - * @see TYPE_PROJECT - * @see TYPE_FILE + * @see #TYPE_WORKSPACE + * @see #TYPE_PROJECT + * @see #TYPE_FILE * * @since 4.0 */ diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ILanguageMappingChangeListener.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ILanguageMappingChangeListener.java index cd3061a3c9e..4c6d980fa12 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ILanguageMappingChangeListener.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ILanguageMappingChangeListener.java @@ -14,7 +14,7 @@ package org.eclipse.cdt.core.model; * Listens to changes in language mappings. * * @author crecoskie - * @ since 4.0 + * @since 4.0 */ public interface ILanguageMappingChangeListener { diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ILibraryEntry.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ILibraryEntry.java index db43aa07518..41f99022880 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ILibraryEntry.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ILibraryEntry.java @@ -63,21 +63,17 @@ public interface ILibraryEntry extends IPathEntry { /** * Return the base reference. - * - * @return */ IPath getBaseReference(); /** * Return the library path. - * @return */ IPath getLibraryPath(); /** * Returns the complete path, equivalent to: * getBasepath().append(getPath()); - * @return */ IPath getFullLibraryPath(); diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ILibraryReference.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ILibraryReference.java index d3eb644e3d2..a4c5ace6b47 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ILibraryReference.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ILibraryReference.java @@ -17,7 +17,6 @@ public interface ILibraryReference extends IParent, ICElement { /** * Return the pathEntry. - * @return */ ILibraryEntry getLibraryEntry(); } diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IMacroEntry.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IMacroEntry.java index 47d8e169667..8db9e080db6 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IMacroEntry.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IMacroEntry.java @@ -40,7 +40,6 @@ public interface IMacroEntry extends IPathEntry { /** * Return the base path. - * @return */ IPath getBasePath(); diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IMacroFileEntry.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IMacroFileEntry.java index 49ddd7ac134..9c2ee5660d7 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IMacroFileEntry.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IMacroFileEntry.java @@ -28,7 +28,6 @@ public interface IMacroFileEntry extends IPathEntry { /** * Return the base path. - * @return */ IPath getBasePath(); diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IParent.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IParent.java index c3a3e2f7e00..7fc350fb341 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IParent.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IParent.java @@ -30,14 +30,11 @@ public interface IParent { /** * returns the children of a certain type */ - public List getChildrenOfType(int type) throws CModelException; + public List getChildrenOfType(int type) throws CModelException; /** * Returns whether this element has one or more immediate children. * This is a convenience method, and may be more efficient than * testing whether getChildren is an empty array. - * - * @exception CModelException if this element does not exist or if an - * exception occurs while accessing its corresponding resource */ boolean hasChildren(); diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IPathEntryContainerExtension.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IPathEntryContainerExtension.java index 875217fc779..770ceaa571a 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IPathEntryContainerExtension.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IPathEntryContainerExtension.java @@ -37,7 +37,6 @@ public interface IPathEntryContainerExtension extends IPathEntryContainer { * Returns whether there are any path entries for the resource. * * @param path Workspace relative path. - * @return */ boolean isEmpty(IPath path); } diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IRegion.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IRegion.java index 9b991fb61e4..d4043687fe9 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IRegion.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IRegion.java @@ -26,10 +26,7 @@ package org.eclipse.cdt.core.model; *

*

* This interface is not intended to be implemented by clients. - * Instances can be created via the CoreModel.newRegion. *

- * - * @see CoreModel#newRegion() */ public interface IRegion { /** diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ISourceReference.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ISourceReference.java index fbd34e638a7..d5c34eb9ca9 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ISourceReference.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ISourceReference.java @@ -52,8 +52,6 @@ public interface ISourceReference { /** * Returns the translation unit in which this member is declared, or null * if this member is not declared in a translation unit (for example, a binary type). - * @return - * @throws CModelException */ ITranslationUnit getTranslationUnit(); } diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ISourceRoot.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ISourceRoot.java index 2454d32f99e..ec974628942 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ISourceRoot.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ISourceRoot.java @@ -19,22 +19,10 @@ import org.eclipse.core.runtime.IPath; */ public interface ISourceRoot extends ICContainer { - /** - * @param resource - * @return - */ boolean isOnSourceEntry(IResource resource); - /** - * @param path - * @return - */ boolean isOnSourceEntry(IPath path); - /** - * @param element - * @return - */ boolean isOnSourceEntry(ICElement element); } diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/LanguageMappingChangeEvent.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/LanguageMappingChangeEvent.java index ebd057a1fce..e727504485c 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/LanguageMappingChangeEvent.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/LanguageMappingChangeEvent.java @@ -178,9 +178,9 @@ public class LanguageMappingChangeEvent implements ILanguageMappingChangeEvent { * Sets the type of this event. This type will be returned by getType(). * * @param type the type to set - * @see ILanguageMappingChangeEvent.TYPE_WORKSPACE - * @see ILanguageMappingChangeEvent.TYPE_PROJECT - * @see ILanguageMappingChangeEvent.TYPE_FILE + * @see ILanguageMappingChangeEvent#TYPE_WORKSPACE + * @see ILanguageMappingChangeEvent#TYPE_PROJECT + * @see ILanguageMappingChangeEvent#TYPE_FILE */ public void setType(int type) { fType = type; diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/PathEntryContainerChanged.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/PathEntryContainerChanged.java index e73838c09f8..66e87713d7f 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/PathEntryContainerChanged.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/PathEntryContainerChanged.java @@ -63,7 +63,6 @@ public class PathEntryContainerChanged { /** * Type of change. - * @return */ public int getType() { return fType; @@ -71,15 +70,13 @@ public class PathEntryContainerChanged { /** * whether or not the change affected the include paths - * @return */ public boolean isIncludeChange() { return (fType & INCLUDE_CHANGED) != 0; } /** - * Whether or not the chage affected the macro entries - * @return + * Whether or not the change affected the macro entries */ public boolean isMacroChange() { return (fType & MACRO_CHANGED) != 0; diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/PathEntryContainerInitializer.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/PathEntryContainerInitializer.java index f47cbae32c0..49103e9cb63 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/PathEntryContainerInitializer.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/PathEntryContainerInitializer.java @@ -59,8 +59,8 @@ public abstract class PathEntryContainerInitializer { * @param project the project for which the container is to be updated * @param containerSuggestion a suggestion to update the corresponding container definition * @throws CoreException when CoreModel#setPathEntryContainer would throw any. - * @see CoreModel#setPathEntryContainer(IPath, ICProject[], IPathEntryContainer[], org.eclipse.core.runtime.IProgressMonitor) - * @see PathContainerInitializer#canUpdatePathContainer(IPath, ICProject) + * @see CoreModel#setPathEntryContainer(ICProject[], IPathEntryContainer, org.eclipse.core.runtime.IProgressMonitor) + * @see #canUpdatePathEntryContainer(IPath, ICProject) */ public void requestPathEntryContainerUpdate(IPath containerPath, ICProject project, IPathEntryContainer containerSuggestion) throws CoreException { diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/ICConfigurationDescription.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/ICConfigurationDescription.java index a054fbeecf9..94a7fdcd11f 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/ICConfigurationDescription.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/settings/model/ICConfigurationDescription.java @@ -13,7 +13,9 @@ package org.eclipse.cdt.core.settings.model; import java.util.Map; import org.eclipse.cdt.core.cdtvariables.ICdtVariablesContributor; +import org.eclipse.cdt.core.model.CoreModel; import org.eclipse.cdt.core.settings.model.extension.CConfigurationData; +import org.eclipse.cdt.core.settings.model.extension.CConfigurationDataProvider; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.QualifiedName; @@ -35,8 +37,6 @@ public interface ICConfigurationDescription extends ICSettingContainer, ICSettin /** * returns the human-readable configuration description - * - * @return */ String getDescription(); @@ -45,13 +45,12 @@ public interface ICConfigurationDescription extends ICSettingContainer, ICSettin * * @param des * @throws WriteAccessException when the configuration description is read-only - * the description is read only if it was queried/returned by the {@link CoreModel#getProjectDescription(org.eclipse.core.resources.IProject, false)} call + * see {@link CoreModel#getProjectDescription(org.eclipse.core.resources.IProject, boolean)} */ void setDescription(String des) throws WriteAccessException; /** - * returns the project description this configuration belongsa to - * @return + * returns the project description this configuration belongs to */ ICProjectDescription getProjectDescription(); @@ -59,7 +58,6 @@ public interface ICConfigurationDescription extends ICSettingContainer, ICSettin * returns the "root" folder description * The root folder description is the default one used for the project root folder * The root folder description can not be null - * @return */ ICFolderDescription getRootFolderDescription(); @@ -67,7 +65,6 @@ public interface ICConfigurationDescription extends ICSettingContainer, ICSettin * returns the complete set of folder descriptions defined for this configuration * The folder description is the settings holder for the specified folder * @see ICFolderDescription - * @return */ ICFolderDescription[] getFolderDescriptions(); @@ -75,7 +72,6 @@ public interface ICConfigurationDescription extends ICSettingContainer, ICSettin * returns the complete set of file descriptions defined for this configuration * The file description is the settings holder for the specified file * @see ICFileDescription - * @return */ ICFileDescription[] getFileDescriptions(); @@ -85,7 +81,6 @@ public interface ICConfigurationDescription extends ICSettingContainer, ICSettin * @see ICResourceDescription * @see ICFileDescription * @see ICFolderDescription - * @return */ ICResourceDescription[] getResourceDescriptions(); @@ -108,8 +103,7 @@ public interface ICConfigurationDescription extends ICSettingContainer, ICSettin * @param des * @throws CoreException * @throws WriteAccessException when the configuration description is read-only - * the description is read only if it was queried/returned by the {@link CoreModel#getProjectDescription(org.eclipse.core.resources.IProject, false)} call - * + * see {@link CoreModel#getProjectDescription(org.eclipse.core.resources.IProject, boolean)} */ void removeResourceDescription(ICResourceDescription des) throws CoreException, WriteAccessException; @@ -117,10 +111,9 @@ public interface ICConfigurationDescription extends ICSettingContainer, ICSettin * creates a new file description for the specified path * @param path project-relative file workspace path * @param base resource description from which settings will be coppied/inheritted - * @return * @throws CoreException * @throws WriteAccessException when the configuration description is read-only - * the description is read only if it was queried/returned by the {@link CoreModel#getProjectDescription(org.eclipse.core.resources.IProject, false)} call + * see {@link CoreModel#getProjectDescription(org.eclipse.core.resources.IProject, boolean)} */ ICFileDescription createFileDescription(IPath path, ICResourceDescription base) throws CoreException, WriteAccessException; @@ -128,10 +121,9 @@ public interface ICConfigurationDescription extends ICSettingContainer, ICSettin * creates a new folder description for the specified path * @param path project-relative folder workspace path * @param base resource description from which settings will be coppied/inheritted - * @return * @throws CoreException * @throws WriteAccessException when the configuration description is read-only - * the description is read only if it was queried/returned by the {@link CoreModel#getProjectDescription(org.eclipse.core.resources.IProject, false)} call + * see {@link CoreModel#getProjectDescription(org.eclipse.core.resources.IProject, boolean)} */ ICFolderDescription createFolderDescription(IPath path, ICFolderDescription base) throws CoreException, WriteAccessException; @@ -147,9 +139,7 @@ public interface ICConfigurationDescription extends ICSettingContainer, ICSettin /** * This method should be used by the build system only for gettings * the build-system contributed CConfigurationData - * @see org.eclipse.cdt.core.CConfigurationDataProvider extension point - * @see CConfigurationDataProvider - * @return + * @see CConfigurationDataProvider and the org.eclipse.cdt.core.CConfigurationDataProvider extension point */ CConfigurationData getConfigurationData(); @@ -159,8 +149,8 @@ public interface ICConfigurationDescription extends ICSettingContainer, ICSettin * Active configuratiuon is the one that is built by default. * This configuration is returned by the {@link ICProjectDescription#getActiveConfiguration()} call * - * @throws WriteAccessException when the configuration description is read-only - * the description is read only if it was queried/returned by the {@link CoreModel#getProjectDescription(org.eclipse.core.resources.IProject, false)} call + * @throws WriteAccessException when the configuration description is read-only, + * see {@link CoreModel#getProjectDescription(org.eclipse.core.resources.IProject, boolean)} */ void setActive() throws WriteAccessException; @@ -168,33 +158,27 @@ public interface ICConfigurationDescription extends ICSettingContainer, ICSettin * This method should be used by the build system only for updating * the build-system contributed CConfigurationData * - * @throws WriteAccessException when the configuration description is read-only - * the description is read only if it was queried/returned by the {@link CoreModel#getProjectDescription(org.eclipse.core.resources.IProject, false)} call + * @throws WriteAccessException when the configuration description is read-only, + * see {@link CoreModel#getProjectDescription(org.eclipse.core.resources.IProject, boolean)} * - * @see org.eclipse.cdt.core.CConfigurationDataProvider extension point - * @see CConfigurationDataProvider + * @see CConfigurationDataProvider and the extension point org.eclipse.cdt.core.CConfigurationDataProvider */ void setConfigurationData(String buildSystemId, CConfigurationData data) throws WriteAccessException; /** * returns whether or not the configuration description was modified - * - * @return */ boolean isModified(); /** * returns the target platform settings for this configuration * @see ICTargetPlatformSetting - * - * @return */ ICTargetPlatformSetting getTargetPlatformSetting(); /** * returns the source entries for this configuration - * @see iCSourceEntry - * @return + * @see ICSourceEntry */ ICSourceEntry[] getSourceEntries(); @@ -205,8 +189,8 @@ public interface ICConfigurationDescription extends ICSettingContainer, ICSettin * * @param entries * - * @throws WriteAccessException when the configuration description is read-only - * the description is read only if it was queried/returned by the {@link CoreModel#getProjectDescription(org.eclipse.core.resources.IProject, false)} call + * @throws WriteAccessException when the configuration description is read-only, + * see {@link CoreModel#getProjectDescription(org.eclipse.core.resources.IProject, boolean)} */ void setSourceEntries(ICSourceEntry[] entries) throws CoreException, WriteAccessException; @@ -216,8 +200,6 @@ public interface ICConfigurationDescription extends ICSettingContainer, ICSettin * the map contains the project_name<->configuration_id associations * if the current configuration does not reference any other configurations, * empty map is returned - * - * @return */ Map getReferenceInfo(); @@ -229,7 +211,7 @@ public interface ICConfigurationDescription extends ICSettingContainer, ICSettin * @param refs * * @throws WriteAccessException when the configuration description is read-only - * the description is read only if it was queried/returned by the {@link CoreModel#getProjectDescription(org.eclipse.core.resources.IProject, false)} call + * see {@link CoreModel#getProjectDescription(org.eclipse.core.resources.IProject, boolean)} */ void setReferenceInfo(Map refs) throws WriteAccessException; @@ -240,7 +222,6 @@ public interface ICConfigurationDescription extends ICSettingContainer, ICSettin * @see ICExternalSetting * @see #getReferenceInfo() * @see #setReferenceInfo(Map) - * @return */ ICExternalSetting[] getExternalSettings(); @@ -257,9 +238,8 @@ public interface ICConfigurationDescription extends ICSettingContainer, ICSettin * @param contentTypeIds * @param extensions * @param entries - * @return * @throws WriteAccessException when the configuration description is read-only - * the description is read only if it was queried/returned by the {@link CoreModel#getProjectDescription(org.eclipse.core.resources.IProject, false)} call + * see {@link CoreModel#getProjectDescription(org.eclipse.core.resources.IProject, boolean)} */ ICExternalSetting createExternalSetting(String languageIDs[], String contentTypeIds[], @@ -277,7 +257,7 @@ public interface ICConfigurationDescription extends ICSettingContainer, ICSettin * * @param setting * @throws WriteAccessException when the configuration description is read-only - * the description is read only if it was queried/returned by the {@link CoreModel#getProjectDescription(org.eclipse.core.resources.IProject, false)} call + * see {@link CoreModel#getProjectDescription(org.eclipse.core.resources.IProject, boolean)} */ void removeExternalSetting(ICExternalSetting setting) throws WriteAccessException; @@ -291,23 +271,19 @@ public interface ICConfigurationDescription extends ICSettingContainer, ICSettin * @see #getExternalSettings() * * @throws WriteAccessException when the configuration description is read-only - * the description is read only if it was queried/returned by the {@link CoreModel#getProjectDescription(org.eclipse.core.resources.IProject, false)} call + * see {@link CoreModel#getProjectDescription(org.eclipse.core.resources.IProject, boolean)} */ void removeExternalSettings() throws WriteAccessException; /** * returns the build setting for this configuration - * - * @return - * * @see ICBuildSetting */ ICBuildSetting getBuildSetting(); /** - * returns the Cdt variable contributor that represent infomration on the - * CDT variables (Build Macros) contributed/usew with this contiguration - * @return + * returns the CDT variable contributor that represent information on the + * CDT variables (Build Macros) contributed/used with this configuration * * @see ICdtVariablesContributor */ @@ -317,10 +293,7 @@ public interface ICConfigurationDescription extends ICSettingContainer, ICSettin * the get/setSettionsProperty methods allow to associate the session properties mechanism on the configuration level * session properties are not persisted and are not restored on the next eclipse session * the scope of configuration session properties is the current configuration description, - * i.e. modifications to the properties are not applied untill the setProjectDescription call - * - * @param name - * @return + * i.e. modifications to the properties are not applied until the setProjectDescription call */ Object getSessionProperty(QualifiedName name); @@ -328,7 +301,7 @@ public interface ICConfigurationDescription extends ICSettingContainer, ICSettin * the get/setSettionsProperty methods allow to associate the session properties mechanism on the configuration level * session properties are not persisted and are not restored on the next eclipse session * the scope of configuration session properties is the current configuration description, - * i.e. modifications to the properties are not applied untill the setProjectDescription call + * i.e. modifications to the properties are not applied until the setProjectDescription call * * @param name * @param value @@ -340,7 +313,7 @@ public interface ICConfigurationDescription extends ICSettingContainer, ICSettin * * @param name * @throws WriteAccessException when the configuration description is read-only - * the description is read only if it was queried/returned by the {@link CoreModel#getProjectDescription(org.eclipse.core.resources.IProject, false)} call + * see {@link CoreModel#getProjectDescription(org.eclipse.core.resources.IProject, boolean)} */ void setName(String name) throws WriteAccessException; @@ -384,7 +357,7 @@ public interface ICConfigurationDescription extends ICSettingContainer, ICSettin * * @param ids the ids of externalSettinsProvider extensions * - * @see ICProjectDescriptionManager#updateExternalSettingsProviders(String[]) + * @see ICProjectDescriptionManager#updateExternalSettingsProviders(String[], org.eclipse.core.runtime.IProgressMonitor) */ void updateExternalSettingsProviders(String[] ids) throws WriteAccessException; diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CopyResourceElementsOperation.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CopyResourceElementsOperation.java index fbcf019302c..240ed60d155 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CopyResourceElementsOperation.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CopyResourceElementsOperation.java @@ -11,15 +11,12 @@ *******************************************************************************/ package org.eclipse.cdt.internal.core.model; - import java.util.ArrayList; import java.util.HashMap; -import java.util.Iterator; import java.util.Map; import org.eclipse.cdt.core.model.CModelException; import org.eclipse.cdt.core.model.ICElement; -import org.eclipse.cdt.core.model.ICElementDelta; import org.eclipse.cdt.core.model.ICModelStatus; import org.eclipse.cdt.core.model.ICModelStatusConstants; import org.eclipse.cdt.core.model.ICProject; @@ -53,14 +50,14 @@ public class CopyResourceElementsOperation extends MultiOperation { /** * The list of new resources created during this operation. */ - protected ArrayList fCreatedElements; + protected ArrayList fCreatedElements; /** * Table specifying deltas for elements being * copied/moved/renamed. Keyed by elements' project(s), and * values are the corresponding deltas. */ - protected Map fDeltasPerProject= new HashMap(1); + protected Map fDeltasPerProject= new HashMap(1); public CopyResourceElementsOperation(ICElement[] src, ICElement[] dst, boolean force) { super(src, dst, force); @@ -72,7 +69,7 @@ public class CopyResourceElementsOperation extends MultiOperation { * it does not exist yet. */ private CElementDelta getDeltaFor(ICProject cProject) { - CElementDelta delta = (CElementDelta) fDeltasPerProject.get(cProject); + CElementDelta delta = fDeltasPerProject.get(cProject); if (delta == null) { delta = new CElementDelta(cProject); fDeltasPerProject.put(cProject, delta); @@ -114,8 +111,8 @@ public class CopyResourceElementsOperation extends MultiOperation { * Process all of the changed deltas generated by this operation. */ protected void processDeltas() { - for (Iterator deltas = this.fDeltasPerProject.values().iterator(); deltas.hasNext();){ - addDelta((ICElementDelta) deltas.next()); + for (CElementDelta elementDelta : this.fDeltasPerProject.values()) { + addDelta(elementDelta); } } @@ -125,7 +122,7 @@ public class CopyResourceElementsOperation extends MultiOperation { * The package statement in the compilation unit is updated if necessary. * The main type of the compilation unit is renamed if necessary. * - * @exception JavaModelException if the operation is unable to + * @exception CModelException if the operation is unable to * complete */ private void processResource(ICElement source, ICElement dest) throws CModelException { @@ -208,7 +205,7 @@ public class CopyResourceElementsOperation extends MultiOperation { */ @Override protected void processElements() throws CModelException { - fCreatedElements = new ArrayList(fElementsToProcess.length); + fCreatedElements = new ArrayList(fElementsToProcess.length); try { super.processElements(); } catch (CModelException cme) { @@ -247,15 +244,15 @@ public class CopyResourceElementsOperation extends MultiOperation { @Override protected void verify(ICElement element) throws CModelException { if (element == null || !element.exists()) - error(ICModelStatusConstants.ELEMENT_DOES_NOT_EXIST, element); - - if (element.isReadOnly() && (isRename() || isMove())) + error(ICModelStatusConstants.ELEMENT_DOES_NOT_EXIST, element); + else if (element.isReadOnly() && (isRename() || isMove())) error(ICModelStatusConstants.READ_ONLY, element); - - CElement dest = (CElement) getDestinationParent(element); - verifyDestination(element, dest); - if (fRenamings != null) { - verifyRenaming(element); + else { + CElement dest = (CElement) getDestinationParent(element); + verifyDestination(element, dest); + if (fRenamings != null) { + verifyRenaming(element); + } } } } diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/MultiOperation.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/MultiOperation.java index faaf9aeb28a..b01beb04bc7 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/MultiOperation.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/MultiOperation.java @@ -14,11 +14,11 @@ package org.eclipse.cdt.internal.core.model; import java.util.HashMap; import java.util.Map; +import org.eclipse.cdt.core.model.CModelException; import org.eclipse.cdt.core.model.ICElement; import org.eclipse.cdt.core.model.ICElementDelta; import org.eclipse.cdt.core.model.ICModelStatus; import org.eclipse.cdt.core.model.ICModelStatusConstants; -import org.eclipse.cdt.core.model.CModelException; import org.eclipse.cdt.core.model.ITranslationUnit; import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IResource; @@ -44,35 +44,35 @@ public abstract class MultiOperation extends CModelOperation { * Keyed by elements being processed, and * values are the corresponding destination parent. */ - protected Map fParentElements; + protected Map fParentElements; /** * Table specifying insertion positions for elements being * copied/moved/renamed. Keyed by elements being processed, and * values are the corresponding insertion point. - * @see processElements(IProgressMonitor) + * @see #processElements() */ - protected Map fInsertBeforeElements= new HashMap(1); + protected Map fInsertBeforeElements= new HashMap(1); /** * This table presents the data in fRenamingList in a more * convenient way. */ - protected Map fRenamings; + protected Map fRenamings; /** * Creates a new MultiOperation. */ protected MultiOperation(ICElement[] elementsToProcess, ICElement[] parentElements, boolean force) { super(elementsToProcess, parentElements, force); - fParentElements = new HashMap(elementsToProcess.length); + fParentElements = new HashMap(elementsToProcess.length); if (elementsToProcess.length == parentElements.length) { for (int i = 0; i < elementsToProcess.length; i++) { fParentElements.put(elementsToProcess[i], parentElements[i]); } } else { //same destination for all elements to be moved/copied/renamed - for (int i = 0; i < elementsToProcess.length; i++) { - fParentElements.put(elementsToProcess[i], parentElements[0]); + for (ICElement elementsToProces : elementsToProcess) { + fParentElements.put(elementsToProces, parentElements[0]); } } } @@ -114,7 +114,7 @@ public abstract class MultiOperation extends CModelOperation { * Returns the parent of the element being copied/moved/renamed. */ protected ICElement getDestinationParent(ICElement child) { - return (ICElement)fParentElements.get(child); + return fParentElements.get(child); } /** @@ -128,7 +128,7 @@ public abstract class MultiOperation extends CModelOperation { */ protected String getNewNameFor(ICElement element) { if (fRenamings != null) { - return (String) fRenamings.get(element); + return fRenamings.get(element); } return null; } @@ -139,7 +139,7 @@ public abstract class MultiOperation extends CModelOperation { */ private void initializeRenamings() { if (fRenamingsList != null && fRenamingsList.length == fElementsToProcess.length) { - fRenamings = new HashMap(fRenamingsList.length); + fRenamings = new HashMap(fRenamingsList.length); for (int i = 0; i < fRenamingsList.length; i++) { if (fRenamingsList[i] != null) { fRenamings.put(fElementsToProcess[i], fRenamingsList[i]); @@ -172,11 +172,10 @@ public abstract class MultiOperation extends CModelOperation { if (fDeltas != null) { CElementDelta rootDelta = newCElementDelta(); boolean insertedTree = false; - for (int i = 0; i < fDeltas.length; i++) { - ICElementDelta delta = fDeltas[i]; + for (ICElementDelta delta : fDeltas) { ICElementDelta[] children = delta.getAffectedChildren(); - for (int j = 0; j < children.length; j++) { - CElementDelta projectDelta = (CElementDelta) children[j]; + for (ICElementDelta element : children) { + CElementDelta projectDelta = (CElementDelta) element; rootDelta.insertDeltaTree(projectDelta.getElement(), projectDelta); insertedTree = true; } @@ -204,10 +203,10 @@ public abstract class MultiOperation extends CModelOperation { beginTask(getMainTaskName(), fElementsToProcess.length); ICModelStatus[] errors = new ICModelStatus[3]; int errorsCounter = 0; - for (int i = 0; i < fElementsToProcess.length; i++) { + for (ICElement elementsToProces : fElementsToProcess) { try { - verify(fElementsToProcess[i]); - processElement(fElementsToProcess[i]); + verify(elementsToProces); + processElement(elementsToProces); } catch (CModelException jme) { if (errorsCounter == errors.length) { // resize @@ -273,7 +272,7 @@ public abstract class MultiOperation extends CModelOperation { if (destination == null || !destination.exists()) { error(ICModelStatusConstants.ELEMENT_DOES_NOT_EXIST, destination); } - if (element.getElementType() == ICElement.C_UNIT) { + else if (element.getElementType() == ICElement.C_UNIT) { IResource res = destination.getResource(); if (!(res instanceof IContainer)) { error(ICModelStatusConstants.INVALID_DESTINATION, element); @@ -307,7 +306,7 @@ public abstract class MultiOperation extends CModelOperation { * its parent is the destination container of this element. */ protected void verifySibling(ICElement element, ICElement destination) throws CModelException { - ICElement insertBeforeElement = (ICElement) fInsertBeforeElements.get(element); + ICElement insertBeforeElement = fInsertBeforeElements.get(element); if (insertBeforeElement != null) { if (!insertBeforeElement.exists() || !insertBeforeElement.getParent().equals(destination)) { error(ICModelStatusConstants.INVALID_SIBLING, insertBeforeElement);