1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-07 17:56:01 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2013-12-16 18:38:58 -08:00
parent 240a5ac13e
commit ef93400be2
5 changed files with 29 additions and 39 deletions

View file

@ -12,13 +12,13 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.core.model; package org.eclipse.cdt.core.model;
import java.net.URI;
import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IPath;
import java.net.URI;
/** /**
* Common protocol for all elements provided by the C model. * Common protocol for all elements provided by the C model.
* *

View file

@ -14,36 +14,27 @@ package org.eclipse.cdt.core.model;
* This is an optional extension interface to {@link ILanguage} which allows * This is an optional extension interface to {@link ILanguage} which allows
* a C/C++ language variant to expose the set of keywords it defines. * a C/C++ language variant to expose the set of keywords it defines.
* *
* <p>
* <strong>EXPERIMENTAL</strong>. This class or interface has been added as
* part of a work in progress. There is no guarantee that this API will work or
* that it will remain the same. Please do not use this API without consulting
* with the CDT team.
* </p>
*
* @since 4.0 * @since 4.0
*/ */
public interface ICLanguageKeywords { public interface ICLanguageKeywords {
/** /**
* Get the keywords defined for this language, excluding bult-in types. * Returns the keywords defined for this language, excluding built-in types.
* *
* @return an array of keywords, never <code>null</code> * @return an array of keywords, never <code>null</code>
*/ */
public abstract String[] getKeywords(); public abstract String[] getKeywords();
/** /**
* Get the built-in type names defined for this language. * Returns the built-in type names defined for this language.
* *
* @return an array of names, never <code>null</code> * @return an array of names, never <code>null</code>
*/ */
public abstract String[] getBuiltinTypes(); public abstract String[] getBuiltinTypes();
/** /**
* Get the preprocessor keywords (directives) defined for this language. * Returns the preprocessor keywords (directives) defined for this language.
* *
* @return an array of keywords, never <code>null</code> * @return an array of keywords, never <code>null</code>
*/ */
public abstract String[] getPreprocessorKeywords(); public abstract String[] getPreprocessorKeywords();
} }

View file

@ -10,7 +10,6 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.core.model; package org.eclipse.cdt.core.model;
/** /**
* Represents a function definition. * Represents a function definition.
* *
@ -18,5 +17,4 @@ package org.eclipse.cdt.core.model;
* @noimplement This interface is not intended to be implemented by clients. * @noimplement This interface is not intended to be implemented by clients.
*/ */
public interface IFunction extends IFunctionDeclaration { public interface IFunction extends IFunctionDeclaration {
} }

View file

@ -8,7 +8,6 @@
* Contributors: * Contributors:
* IBM Corporation - initial API and implementation * IBM Corporation - initial API and implementation
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.core.model; package org.eclipse.cdt.core.model;
/** /**
@ -18,6 +17,11 @@ package org.eclipse.cdt.core.model;
* @noimplement This interface is not intended to be implemented by clients. * @noimplement This interface is not intended to be implemented by clients.
*/ */
public interface IStructure extends IInheritance, IParent, IStructureDeclaration { public interface IStructure extends IInheritance, IParent, IStructureDeclaration {
/**
* Returns the specific field with the given name within the structure.
* @param name the name of the field
* @return the field with the given name, or {@code null} if not found
*/
public IField getField(String name); public IField getField(String name);
/** /**
@ -29,7 +33,7 @@ public interface IStructure extends IInheritance, IParent, IStructureDeclaration
/** /**
* Returns the specific method with the given name within the structure. * Returns the specific method with the given name within the structure.
* Returns the first occurance more than one method has the same name. * Returns the first occurrence more than one method has the same name.
* @param name * @param name
* @return IMethodDeclaration * @return IMethodDeclaration
*/ */

View file

@ -8,14 +8,8 @@
* Contributors: * Contributors:
* QNX Software Systems - Initial API and implementation * QNX Software Systems - Initial API and implementation
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.internal.core.model; package org.eclipse.cdt.internal.core.model;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
import org.eclipse.cdt.core.model.CModelException; import org.eclipse.cdt.core.model.CModelException;
import org.eclipse.cdt.core.model.ICElement; import org.eclipse.cdt.core.model.ICElement;
import org.eclipse.cdt.core.model.IField; import org.eclipse.cdt.core.model.IField;
@ -23,8 +17,12 @@ import org.eclipse.cdt.core.model.IMethodDeclaration;
import org.eclipse.cdt.core.model.IStructure; import org.eclipse.cdt.core.model.IStructure;
import org.eclipse.cdt.core.parser.ast.ASTAccessVisibility; import org.eclipse.cdt.core.parser.ast.ASTAccessVisibility;
public class Structure extends StructureDeclaration implements IStructure { import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
public class Structure extends StructureDeclaration implements IStructure {
Map<String, ASTAccessVisibility> superClassesNames = new TreeMap<String, ASTAccessVisibility>(); Map<String, ASTAccessVisibility> superClassesNames = new TreeMap<String, ASTAccessVisibility>();
public Structure(ICElement parent, int kind, String name) { public Structure(ICElement parent, int kind, String name) {
@ -101,5 +99,4 @@ public class Structure extends StructureDeclaration implements IStructure {
public void addSuperClass(String name, ASTAccessVisibility access) { public void addSuperClass(String name, ASTAccessVisibility access) {
superClassesNames.put(name, access); superClassesNames.put(name, access);
} }
} }