1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Fixes java-doc problems.

This commit is contained in:
Markus Schorn 2008-05-05 13:17:00 +00:00
parent 1ca9b63fb7
commit 20896516c8
63 changed files with 111 additions and 400 deletions

View file

@ -22,8 +22,6 @@ public interface IIndexLocationConverter {
/**
* Convert a raw string in an internal IIndexFragment implementation specific format to
* an IIndexFileLocation or null if the internal format could not be translated.
* @param raw
* @return
*/
public abstract IIndexFileLocation fromInternalFormat(String raw);

View file

@ -43,8 +43,6 @@ public interface ICodeReaderCache {
* The units are relative to the implementation of the cache. It could be
* the total number of objects in the cache, or the total space the cache is
* using in MB.
*
* @return
*/
public int getCurrentSpace();

View file

@ -17,19 +17,20 @@ package org.eclipse.cdt.core.parser;
public interface IExtendedScannerInfo extends IScannerInfo {
/**
* @return
* Return an array of files which will be preprocessed before parsing the translation-unit in order
* to populate the macro-dictionary.
*/
public String [] getMacroFiles();
/**
* @return
* Return an array of files that will be parsed before parsing the translation-unit as if the these
* files were included using include directives.
*/
public String [] getIncludeFiles();
/**
* Get local inclusions?
*
* @return
* Return an array of paths that is searched after the current directory, when an include directive
* with double-quotes is processed.
*/
public String [] getLocalIncludePath();
}

View file

@ -13,31 +13,23 @@ package org.eclipse.cdt.core.parser;
import java.util.Map;
/**
* Interface for providing a configuration for the preprocessor.
* @see IExtendedScannerInfo
*/
public interface IScannerInfo {
/**
* Answers a <code>Map</code> containing all the defined preprocessor
* symbols and their values as string tuples, (symbol_name, symbol_value).
* Returns a <code>Map</code> containing all the defined preprocessor
* symbols and their values.
* Symbols defined without values have an empty string for a value. For
* example,-Dsymbol=value would have a map entry (symbol,value). A symbol
* defined as -Dsymbol would have a map entry of (symbol,"").
*
* If there are no defined symbols, the receiver will return
* an empty Map, never <code>null</code>.
*
* @return
* defined as -Dsymbol= would have a map entry of (symbol,"").
*/
public Map<String, String> getDefinedSymbols();
/**
* Answers a <code>String</code> array containing the union of all the
* built-in include search paths followed by the user-defined include
* search paths.
*
* If there are no paths defined, the receiver will return an empty
* array, never <code>null</code>
*
* @return
* Returns an array of paths that are searched when processing an include directive.
* see {@link IExtendedScannerInfo#getLocalIncludePath()}
*/
public String[] getIncludePaths();
}

View file

@ -29,13 +29,11 @@ import org.eclipse.cdt.internal.core.parser.InternalParserUtil;
public class EmptyCodeReaderCache implements ICodeReaderCache {
/**
* Creates a new CodeReader and returns it.
* @param key
* @return
* Creates a new CodeReader for the given file location.
*/
public CodeReader get(String key) {
public CodeReader get(String location) {
CodeReader ret = null;
ret = InternalParserUtil.createFileReader(key);
ret = InternalParserUtil.createFileReader(location);
return ret;
}
@ -43,16 +41,13 @@ public class EmptyCodeReaderCache implements ICodeReaderCache {
* This provides support for PartialWorkingCopyCodeReaderFactory.
* @param finalPath
* @param workingCopies
* @return
*/
public CodeReader createReader( String finalPath, Iterator<IWorkingCopy> workingCopies ) {
public CodeReader createReader(String finalPath, Iterator<IWorkingCopy> workingCopies ) {
return InternalParserUtil.createFileReader(finalPath);
}
/**
* Returns null.
* @param key
* @return
*/
public CodeReader remove(String key) {
return null;

View file

@ -18,14 +18,8 @@ import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
public interface IASTDeclarationAmbiguity extends IASTDeclaration
{
/**
* @param decl
*/
public void addDeclaration( IASTDeclaration decl );
/**
* @return
*/
public IASTDeclaration [] getDeclarations();
}

View file

@ -23,21 +23,16 @@ import org.eclipse.cdt.core.dom.ast.IBinding;
public interface IASTInternalScope {
/**
* Return the physical IASTNode that this scope was created for
* @return
*/
public IASTNode getPhysicalNode() throws DOMException;
/**
* Set whether or not all the names in this scope have been cached
*
* @param b
*/
public void setFullyCached(boolean b) throws DOMException;
/**
* whether or not this scope's cache contains all the names
*
* @return
*/
public boolean isFullyCached() throws DOMException;

View file

@ -24,7 +24,6 @@ import org.eclipse.cdt.core.dom.ast.IType;
public interface ITypeContainer extends IType{
/**
* get the type this contains
* @return
* @throws DOMException
*/
IType getType() throws DOMException;

View file

@ -210,7 +210,6 @@ public interface IIndexFragment {
/**
* Returns the linkages that are contained in this fragment
* @return
*/
IIndexLinkage[] getLinkages();
@ -221,7 +220,7 @@ public interface IIndexFragment {
* <li>PROPERTY_FRAGMENT_FORMAT_ID</li>
* <li>PROPERTY_FRAGMENT_FORMAT_VERSION</li>
* </ul>
* @param key a case-sensitive identifier for a property, or null
* @param propertyName a case-sensitive identifier for a property, or null
* @return the value associated with the key, or null if either no such property is set, or the specified key was null
* @throws CoreException
* @see IIndexFragment#PROPERTY_FRAGMENT_ID

View file

@ -12,12 +12,12 @@ package org.eclipse.cdt.internal.core.index;
public interface IIndexFragmentBindingComparator {
/**
* Compares to index fragment bindings, or returns {@link Integer.MIN_VALUE} if the comparator is
* Compares to index fragment bindings, or returns {@link Integer#MIN_VALUE} if the comparator is
* not capable of comparing the two objects because of their run-time type.
* <p>
* Compares two index fragment bindings using the following scheme:
* <ul>
* <li>Compares the fully qualfied names, by pair-wise lexicographic comparison
* <li>Compares the fully qualified names, by pair-wise lexicographic comparison
* of individual name components, starting with the innermost scoped name. If
* all pair-wise comparisons are equal, then the comparison routine continues, otherwise returning
* <ul>

View file

@ -24,16 +24,12 @@ public interface ICompositesFactory {
/**
* Returns a composite (in the sense of potentially spanning multiple index fragments - i.e. not to be confused
* with ICompositeType) type for the specified type.
* @param index
* @param type
* @return
*/
public IType getCompositeType(IIndexType rtype) throws DOMException;
/**
* Returns a composite (index context carrying) binding for the specified binding. It does not
* matter which fragment the specified binding comes from
* @param index the context to construct the composite binding for
* @param binding a binding that will be used when searching for information to return from the composite
* binding methods
* @return a composite (index context carrying) binding for the specified binding
@ -42,9 +38,6 @@ public interface ICompositesFactory {
/**
* Identifies common bindings, calls getCompositeBindings
* @param index
* @param bindings
* @return
*/
public IIndexBinding[] getCompositeBindings(IIndexFragmentBinding[][] bindings);
}

View file

@ -37,7 +37,6 @@ class PDOMCache {
/**
* Returns the instance of the cache
* @return
*/
public static PDOMCache getInstance() {
synchronized(singletonMutex) {

View file

@ -71,7 +71,6 @@ public class StandaloneFullIndexer extends StandaloneIndexer{
/**
* Returns the factory that provides CodeReaders for files included
* by the source code being parsed.
* @return
*/
public ICodeReaderFactory getCodeReaderFactory() {
return fCodeReaderFactory;

View file

@ -164,7 +164,6 @@ public abstract class StandaloneIndexer {
/**
* Returns the collection of valid file extensions for C/C++ source.
* @return
*/
public Set getValidSourceUnitNames() {
return fValidSourceUnitNames;
@ -179,7 +178,6 @@ public abstract class StandaloneIndexer {
/**
* Returns the IScannerInfo that provides include paths and defined symbols.
* @return
*/
public IScannerInfo getScannerInfo() {
return fScanner;
@ -187,7 +185,6 @@ public abstract class StandaloneIndexer {
/**
* Returns the ILanguageMapper that determines the ILanguage for a file.
* @return
*/
public ILanguageMapper getLanguageMapper() {
return fMapper;
@ -195,7 +192,6 @@ public abstract class StandaloneIndexer {
/**
* Returns the logger.
* @return
*/
public IParserLogService getParserLog() {
return fLog;
@ -204,7 +200,6 @@ public abstract class StandaloneIndexer {
/**
* Returns true if indexing activities should be shown.
* Otherwise, this method returns false.
* @return
*/
public boolean getShowActivity() {
return fShowActivity;
@ -220,7 +215,6 @@ public abstract class StandaloneIndexer {
/**
* Returns true if problems during indexing should be shown.
* Otherwise, this method returns false.
* @return
*/
public boolean getShowProblems() {
return fShowProblems;
@ -236,7 +230,6 @@ public abstract class StandaloneIndexer {
/**
* Returns true if statistics should be gathered during indexing.
* Otherwise, this method returns false..
* @return
*/
public boolean getTraceStatistics() {
return fTraceStatistics;
@ -269,7 +262,6 @@ public abstract class StandaloneIndexer {
/**
* Returns the progress information.
* @return
*/
public synchronized IndexerProgress getProgressInformation() {
return fDelegate != null ? fDelegate.getProgressInformation() : fProgress;
@ -277,7 +269,6 @@ public abstract class StandaloneIndexer {
/**
* Returns the update options specified.
* @return
*/
public int getUpdateOptions() {
return fUpdateOptions;
@ -357,8 +348,8 @@ public abstract class StandaloneIndexer {
File file = new File(path);
if (file.isDirectory()) {
String[] files = file.list(filter);
for (int i = 0; i < files.length; i++) {
added.add(files[i]);
for (String file2 : files) {
added.add(file2);
}
}
else {
@ -377,7 +368,6 @@ public abstract class StandaloneIndexer {
/**
* Return the type of references the parser should skip.
* @return
*/
public int getSkipReferences() {
return fSkipReferences;
@ -393,7 +383,6 @@ public abstract class StandaloneIndexer {
/**
* Returns an array of files that should be parsed up front.
* @return
*/
public String[] getFilesToParseUpFront() {
return fFilesToParseUpFront;
@ -409,7 +398,6 @@ public abstract class StandaloneIndexer {
/**
* Returns the exclusion filter for this indexer.
* @return
*/
public FilenameFilter getExclusionFilter() {
return fExclusionFilter;

View file

@ -70,7 +70,6 @@ public abstract class StandaloneIndexerTask extends AbstractIndexerTask {
/**
* Return the indexer.
* @return
*/
final public StandaloneIndexer getIndexer() {
return fIndexer;

View file

@ -21,12 +21,6 @@ import org.eclipse.cdt.core.parser.ParserFactory;
*/
public class InternalParserUtil extends ParserFactory {
/**
* @param finalPath
* @return
*/
public static CodeReader createFileReader(String finalPath) {
File includeFile = new File(finalPath);
if (includeFile.exists() && includeFile.isFile())

View file

@ -31,15 +31,9 @@ public class ParserMessages {
}
}
/**
*
*/
private ParserMessages() {
}
/**
* @param key
* @return
*/
public static String getString(String key) {
if( resourceBundle == null )
return '#' + key +'#';

View file

@ -43,16 +43,10 @@ public class BasicTokenDuple implements ITokenDuple {
protected final IToken firstToken, lastToken;
/**
* @return
*/
public IToken getFirstToken() {
return firstToken;
}
/**
* @return
*/
public IToken getLastToken() {
return lastToken;
}
@ -317,9 +311,6 @@ public class BasicTokenDuple implements ITokenDuple {
return TokenFactory.createTokenDuple( getToken( startIndex ), getToken( endIndex) );
}
/**
* @param endIndex
*/
public IToken getToken(int index)
{
if( index < 0 ) return null;

View file

@ -250,16 +250,10 @@ public class TokenFactory {
return array[ currentIndex - 1 ];
}
/**
* @return
*/
public boolean isEmpty() {
return (currentIndex == 0 );
}
/**
* @param i
*/
public BraceCounter(int i) {
key = i;
clear();
@ -274,11 +268,6 @@ public class TokenFactory {
}
/**
* @param first
* @param last
* @return
*/
public static char[] createCharArrayRepresentation(IToken first, IToken last) {
return BasicTokenDuple.createCharArrayRepresentation(first, last);
}

View file

@ -28,10 +28,10 @@ public interface IEnvironmentVariableManager{
*
* @return the reference to the IBuildEnvironmentVariable interface representing
* the variable of a given name
* @param variableName environment variable name
* @param name environment variable name
* if environment variable names are case insensitive in the current OS,
* the environment variable provider will query the getVariable method of suppliers always
* passing it the uppercase variable name not depending on the case of the variableName
* passing it the upper-case variable name not depending on the case of the variableName
* passed to the IEnvironmentVariableProvider.getVariable() method. This will prevent the
* supplier from answering different values for the same variable given the names that differ
* only by case. E.g. if the current OS does not support case sensitive variables both of the
@ -41,12 +41,6 @@ public interface IEnvironmentVariableManager{
* provider.getVariable("foo",level,includeParentContexts);
*
* will result in asking suppliers for the "FOO" variable
*
* @param level could be one of the following:
* 1. IConfiguration to represent the configuration
* 2. IManagedProject to represent the managed project
* 3. IWorkspace to represent the workspace
* 4. null to represent the system environment passed to eclipse
*/
public IEnvironmentVariable getVariable(String name, ICConfigurationDescription cfg, boolean resolveMacros);

View file

@ -18,9 +18,6 @@ public interface IScannerInfoProvider {
/**
* The receiver will answer the current state of the build information for the
* resource specified in the argument.
*
* @param resource
* @return
*/
public IScannerInfo getScannerInformation(IResource resource);

View file

@ -43,9 +43,6 @@ public class ParserUtil
private static IParserLogService parserLogService = new ParserLogService(DebugLogConstants.PARSER );
private static IParserLogService scannerLogService = new ParserLogService(DebugLogConstants.SCANNER );
/**
* @return
*/
public static IParserLogService getScannerLogService() {
return scannerLogService;
}
@ -107,10 +104,6 @@ public class ParserUtil
return InternalParserUtil.createFileReader(finalPath);
}
/**
* @param finalPath
* @return
*/
public static IResource getResourceForFilename(String finalPath) {
IWorkspace workspace = ResourcesPlugin.getWorkspace();
if( workspace == null )
@ -136,9 +129,9 @@ public class ParserUtil
// note for findFilesForLocation(IPath): This method does not consider whether resources actually exist at the given locations.
// so only return the first IFile found that is accessible
for(int i=0; i<files.length; i++) {
if (files[i].isAccessible())
return files[i];
for (IFile file : files) {
if (file.isAccessible())
return file;
}
return null;
@ -149,11 +142,6 @@ public class ParserUtil
}
}
/**
* @param resultingResource
* @param workingCopies
* @return
*/
protected static char[] findWorkingCopy(IResource resultingResource, Iterator<IWorkingCopy> workingCopies) {
if( parserLogService.isTracing() )
parserLogService.traceLog( "Attempting to find the working copy for " + resultingResource.getName() ); //$NON-NLS-1$

View file

@ -92,9 +92,9 @@ public class CdtVarPathEntryVariableManager implements
public ICdtVariable[] getVariables(IVariableContextInfo context) {
ICdtVariable vars[] = fUserVarSupplier.getMacros(ICoreVariableContextInfo.CONTEXT_WORKSPACE, null);
List list = new ArrayList();
for(int i = 0; i < vars.length; i++){
if(getVariablePath(vars[i]) != null)
list.add(vars[i]);
for (ICdtVariable var : vars) {
if(getVariablePath(var) != null)
list.add(var);
}
return (ICdtVariable[])list.toArray(new ICdtVariable[list.size()]);
}
@ -225,15 +225,14 @@ public class CdtVarPathEntryVariableManager implements
}
/**
* @see org.eclipse.core.resources.
* IPathEntryVariableManager#addChangeListener(IPathEntryVariableChangeListener)
* @see org.eclipse.cdt.core.resources.IPathEntryVariableManager#addChangeListener(IPathEntryVariableChangeListener)
*/
public void addChangeListener(IPathEntryVariableChangeListener listener) {
fListeners.add(listener);
}
/**
* @see org.eclipse.core.resources.
* @see org.eclipse.cdt.core.resources.
* IPathEntryVariableManager#removeChangeListener(IPathEntryVariableChangeListener)
*/
public void removeChangeListener(IPathEntryVariableChangeListener listener) {
@ -259,10 +258,10 @@ public class CdtVarPathEntryVariableManager implements
}
private void fireEvent(ICdtVariable vars[], int type){
for(int i = 0; i < vars.length; i++){
IPath path = getVariablePath(vars[i]);
for (ICdtVariable var : vars) {
IPath path = getVariablePath(var);
if(path != null)
fireVariableChangeEvent(vars[i].getName(), path, type);
fireVariableChangeEvent(var.getName(), path, type);
}
}

View file

@ -31,9 +31,6 @@ public class ConsoleOutputSniffer {
private StringBuffer currentLine = new StringBuffer();
private OutputStream outputStream = null;
/**
* @param consoleErrorStream
*/
public ConsoleOutputStream(OutputStream outputStream) {
this.outputStream = outputStream;
}
@ -144,8 +141,6 @@ public class ConsoleOutputSniffer {
* Returns an output stream that will be sniffed.
* This stream should be hooked up so the command
* output stream goes into here.
*
* @return
*/
public OutputStream getOutputStream() {
incNOpens();
@ -156,8 +151,6 @@ public class ConsoleOutputSniffer {
* Returns an error stream that will be sniffed.
* This stream should be hooked up so the command
* error stream goes into here.
*
* @return
*/
public OutputStream getErrorStream() {
incNOpens();

View file

@ -48,7 +48,7 @@ public class LocalProjectScope implements IScopeContext {
* Create and return a new local project scope for the given project. The given
* project must not be <code>null</code>.
*
* @param context the project
* @param projectName the name of the project
* @exception IllegalArgumentException if the project is <code>null</code>
*/
public LocalProjectScope(String projectName) {
@ -106,8 +106,7 @@ public class LocalProjectScope implements IScopeContext {
private static void deletePrefs(Preferences prefs) throws BackingStoreException {
prefs.clear();
String[] children= prefs.childrenNames();
for (int i = 0; i < children.length; i++) {
String child = children[i];
for (String child : children) {
prefs.node(child).removeNode();
}
prefs.flush();
@ -116,16 +115,14 @@ public class LocalProjectScope implements IScopeContext {
private static void copyPrefs(Preferences prefs, Preferences target) throws BackingStoreException {
String[] keys= prefs.keys();
for (int i = 0; i < keys.length; i++) {
String key = keys[i];
for (String key : keys) {
String val= prefs.get(key, null);
if (val != null) {
target.put(key, val);
}
}
String[] children= prefs.childrenNames();
for (int i = 0; i < children.length; i++) {
String child = children[i];
for (String child : children) {
copyPrefs(prefs.node(child), target.node(child));
}
target.flush();

View file

@ -200,8 +200,6 @@ public class ProcessClosure {
* The same functionality as "isAlive()"
* but does not affect out streams,
* because they can be shared among processes
*
* @return
*/
public boolean isRunning() {
if (fProcess != null) {

View file

@ -92,11 +92,6 @@ public class CdtVariableManager implements ICdtVariableManager {
return null;
}
/**
* @param contextType
* @param contextData
* @return
*/
public IVariableContextInfo getMacroContextInfo(
int contextType,
Object contextData){
@ -175,8 +170,8 @@ public class CdtVariableManager implements ICdtVariableManager {
private int getContextType(ICConfigurationDescription des){
if(des != null)
return DefaultVariableContextInfo.CONTEXT_CONFIGURATION;
return DefaultVariableContextInfo.CONTEXT_WORKSPACE;
return ICoreVariableContextInfo.CONTEXT_CONFIGURATION;
return ICoreVariableContextInfo.CONTEXT_WORKSPACE;
}
public IVariableSubstitutor getMacroSubstitutor(IVariableContextInfo info, String inexistentMacroValue, String listDelimiter){

View file

@ -58,10 +58,6 @@ public class PartialWorkingCopyCodeReaderFactory
return new CodeReader(tu.getPath().toOSString(), tu.getContents());
}
/**
* @param path
* @return
*/
protected CodeReader checkWorkingCopyThenCache(String path) {
char [] buffer = ParserUtil.findWorkingCopyBuffer( path, createWorkingCopyIterator() );
if( buffer != null )

View file

@ -73,7 +73,6 @@ public class ProcessParameter {
/**
* Return the Element name.
* @return
*/
public String getName() {
return name;
@ -81,7 +80,6 @@ public class ProcessParameter {
/**
* Returns the Element Type.
* @return
*/
public byte getType() {
return type;
@ -96,7 +94,6 @@ public class ProcessParameter {
/**
* Checks whether the element in external.
* @return
*/
public boolean isExternal() {
return external;

View file

@ -29,16 +29,13 @@ public abstract class ProcessRunner {
/**
* Returns the Process Parameters.
* @return
*/
public ProcessParameter[] getProcessParameters() {
return params;
}
/**
* Checks the whether the arguments are matching to Requied Parameters.
* @param args
* @return
* Checks the whether the arguments are matching the required parameters.
*/
protected final boolean areArgumentsMatchingRequiredParameters(ProcessArgument[] args) {
if ((params == null && args != null) || (params != null && args == null)) {
@ -60,9 +57,7 @@ public abstract class ProcessRunner {
/**
* Return the String containing the mismatching message
* if the arguments are not matching to Requied Parameters.
* @param args
* @return
* if the arguments are not matching the required parameters.
*/
public String getArgumentsMismatchMessage(ProcessArgument[] args) {
if (params == null && args != null) {
@ -88,11 +83,7 @@ public abstract class ProcessRunner {
}
/**
* Returns the process message based on the pameters.
* @param processId
* @param code
* @param msg
* @return
* Returns the process message based on the parameters.
*/
protected final String getProcessMessage(String processId, int code, String msg) {
switch (code) {

View file

@ -1154,7 +1154,7 @@ public final class CharOperation {
* </ol>
*
* @param fragment the fragment to check
* @param second the array to check
* @param name the array to check
* @param startIndex the starting index
* @param isCaseSensitive check whether or not the equality should be case sensitive
* @return true if the name contains the fragment at the starting index startIndex according to the
@ -1916,8 +1916,8 @@ public final class CharOperation {
*/
public static final int occurencesOf(char toBeFound, char[] array) {
int count = 0;
for (int i = 0; i < array.length; i++)
if (toBeFound == array[i])
for (char element : array)
if (toBeFound == element)
count++;
return count;
}
@ -2116,9 +2116,9 @@ public final class CharOperation {
* </li>
* </ol>
*
* @param the given array
* @param array the given array
* @param toBeReplaced characters to be replaced
* @param the replacement characters
* @param replacementChars the replacement characters
* @return a new array of characters with substitutions or the given array if none
* @exception NullPointerException if the given array is null
*/
@ -2564,7 +2564,7 @@ public final class CharOperation {
* </li>
* </ol>
*
* @param chars the given array
* @param array the given array
* @return a string which is the concatenation of the given array using the '.' as a separator
*/
final static public String toString(char[][] array) {

View file

@ -66,7 +66,7 @@ public abstract class BinaryObjectAdapter extends BinaryFile implements IBinaryO
}
/**
* @see org.eclipse.cdt.core.model.IBinaryParser.IBinaryObject#getBSS()
* @see org.eclipse.cdt.core.IBinaryParser.IBinaryObject#getBSS()
*/
public long getBSS() {
BinaryObjectInfo info = getBinaryObjectInfo();
@ -77,7 +77,7 @@ public abstract class BinaryObjectAdapter extends BinaryFile implements IBinaryO
}
/**
* @see org.eclipse.cdt.core.model.IBinaryParser.IBinaryObject#getCPU()
* @see org.eclipse.cdt.core.IBinaryParser.IBinaryObject#getCPU()
*/
public String getCPU() {
BinaryObjectInfo info = getBinaryObjectInfo();
@ -88,7 +88,7 @@ public abstract class BinaryObjectAdapter extends BinaryFile implements IBinaryO
}
/**
* @see org.eclipse.cdt.core.model.IBinaryParser.IBinaryObject#getData()
* @see org.eclipse.cdt.core.IBinaryParser.IBinaryObject#getData()
*/
public long getData() {
BinaryObjectInfo info = getBinaryObjectInfo();
@ -99,7 +99,7 @@ public abstract class BinaryObjectAdapter extends BinaryFile implements IBinaryO
}
/**
* @see org.eclipse.cdt.core.model.IBinaryParser.IBinaryObject#getText()
* @see org.eclipse.cdt.core.IBinaryParser.IBinaryObject#getText()
*/
public long getText() {
BinaryObjectInfo info = getBinaryObjectInfo();
@ -110,7 +110,7 @@ public abstract class BinaryObjectAdapter extends BinaryFile implements IBinaryO
}
/**
* @see org.eclipse.cdt.core.model.IBinaryParser.IBinaryObject#hasDebug()
* @see org.eclipse.cdt.core.IBinaryParser.IBinaryObject#hasDebug()
*/
public boolean hasDebug() {
BinaryObjectInfo info = getBinaryObjectInfo();
@ -121,7 +121,7 @@ public abstract class BinaryObjectAdapter extends BinaryFile implements IBinaryO
}
/**
* @see org.eclipse.cdt.core.model.IBinaryParser.IBinaryObject#isLittleEndian()
* @see org.eclipse.cdt.core.IBinaryParser.IBinaryObject#isLittleEndian()
*/
public boolean isLittleEndian() {
BinaryObjectInfo info = getBinaryObjectInfo();
@ -132,7 +132,7 @@ public abstract class BinaryObjectAdapter extends BinaryFile implements IBinaryO
}
/**
* @see org.eclipse.cdt.core.model.IBinaryParser.IBinaryExecutable#getNeededSharedLibs()
* @see org.eclipse.cdt.core.IBinaryParser.IBinaryExecutable#getNeededSharedLibs()
*/
public String[] getNeededSharedLibs() {
BinaryObjectInfo info = getBinaryObjectInfo();
@ -143,7 +143,7 @@ public abstract class BinaryObjectAdapter extends BinaryFile implements IBinaryO
}
/**
* @see org.eclipse.cdt.core.model.IBinaryParser.IBinaryShared#getSoName()
* @see org.eclipse.cdt.core.IBinaryParser.IBinaryShared#getSoName()
*/
public String getSoName() {
BinaryObjectInfo info = getBinaryObjectInfo();
@ -154,7 +154,7 @@ public abstract class BinaryObjectAdapter extends BinaryFile implements IBinaryO
}
/**
* @see org.eclipse.cdt.core.model.IBinaryParser.IBinaryObject#getName()
* @see org.eclipse.cdt.core.IBinaryParser.IBinaryObject#getName()
*/
public String getName() {
return getPath().lastSegment().toString();
@ -166,7 +166,7 @@ public abstract class BinaryObjectAdapter extends BinaryFile implements IBinaryO
}
/**
* @see org.eclipse.cdt.core.model.IBinaryParser.IBinaryObject#getSymbols()
* @see org.eclipse.cdt.core.IBinaryParser.IBinaryObject#getSymbols()
*/
public abstract ISymbol[] getSymbols();
public abstract IAddressFactory getAddressFactory();

View file

@ -19,19 +19,13 @@ import org.eclipse.cdt.core.cdtvariables.ICdtVariable;
public interface ICdtVariableSupplier {
/**
*
* @param macroName macro name
* @param contextType context type
* @param contextData context data
* @return IBuildMacro
*/
public ICdtVariable getVariable(String macroName,
IVariableContextInfo context);
/**
*
* @param contextType context type
* @param contextData context data
* @return IBuildMacro[]
*/
public ICdtVariable[] getVariables(IVariableContextInfo context);

View file

@ -19,12 +19,7 @@ import java.util.Map;
import org.eclipse.cdt.core.cdtvariables.ICdtVariable;
public class SupplierBasedCdtVariableManager {
/**
* @param macroName
* @param contextInfo
* @param includeParentContexts
* @return
*/
static public ICdtVariable getVariable(String macroName, IVariableContextInfo contextInfo, boolean includeParentContexts) {
if(contextInfo == null || macroName == null)
return null;
@ -32,8 +27,8 @@ public class SupplierBasedCdtVariableManager {
do{
ICdtVariableSupplier suppliers[] = contextInfo.getSuppliers();
if(suppliers != null){
for(int i = 0; i < suppliers.length; i++){
ICdtVariable macro = suppliers[i].getVariable(macroName, contextInfo);
for (ICdtVariableSupplier supplier : suppliers) {
ICdtVariable macro = supplier.getVariable(macroName, contextInfo);
if(macro != null)
return macro;
}
@ -43,11 +38,6 @@ public class SupplierBasedCdtVariableManager {
return null;
}
/**
* @param contextInfo
* @param includeParentContexts
* @return
*/
static public ICdtVariable[] getVariables(IVariableContextInfo contextInfo,
boolean includeParentContexts) {
if(contextInfo == null)
@ -65,8 +55,8 @@ public class SupplierBasedCdtVariableManager {
for(int i = suppliers.length - 1; i >= 0; i--){
ICdtVariable macros[] = suppliers[i].getVariables(contextInfo);
if(macros != null){
for(int j = 0; j < macros.length; j++){
map.put(macros[j].getName(),macros[j]);
for (ICdtVariable macro : macros) {
map.put(macro.getName(),macro);
}
}
}

View file

@ -31,6 +31,7 @@ import org.eclipse.cdt.utils.Objdump;
import org.eclipse.cdt.utils.AR.ARHeader;
import org.eclipse.cdt.utils.coff.Coff;
import org.eclipse.cdt.utils.coff.PE;
import org.eclipse.cdt.utils.coff.Coff.Symbol;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
@ -54,11 +55,6 @@ public class CygwinPEBinaryObject extends PEBinaryObject {
super(parser, path, header);
}
/**
* @param parser
* @param path
* @param executable
*/
public CygwinPEBinaryObject(IBinaryParser parser, IPath path, int type) {
super(parser, path, type);
}
@ -136,9 +132,6 @@ public class CygwinPEBinaryObject extends PEBinaryObject {
return null;
}
/**
* @return
*/
protected CygPath getCygPath() {
ICygwinToolsFactroy factory = (ICygwinToolsFactroy)getBinaryParser().getAdapter(ICygwinToolsFactroy.class);
if (factory != null) {
@ -159,7 +152,7 @@ public class CygwinPEBinaryObject extends PEBinaryObject {
/**
* @throws IOException
* @see org.eclipse.cdt.core.model.IBinaryParser.IBinaryFile#getContents()
* @see org.eclipse.cdt.core.IBinaryParser.IBinaryFile#getContents()
*/
@Override
public InputStream getContents() throws IOException {
@ -274,14 +267,14 @@ public class CygwinPEBinaryObject extends PEBinaryObject {
*/
@Override
protected void addSymbols(Coff.Symbol[] peSyms, byte[] table, List list) {
for (int i = 0; i < peSyms.length; i++) {
if (peSyms[i].isFunction() || peSyms[i].isPointer() || peSyms[i].isArray()) {
String name = peSyms[i].getName(table);
for (Symbol peSym : peSyms) {
if (peSym.isFunction() || peSym.isPointer() || peSym.isArray()) {
String name = peSym.getName(table);
if (name == null || name.trim().length() == 0 || !Character.isJavaIdentifierStart(name.charAt(0))) {
continue;
}
int type = peSyms[i].isFunction() ? ISymbol.FUNCTION : ISymbol.VARIABLE;
IAddress addr = new Addr32(peSyms[i].n_value);
int type = peSym.isFunction() ? ISymbol.FUNCTION : ISymbol.VARIABLE;
IAddress addr = new Addr32(peSym.n_value);
int size = 4;
if (symbolLoadingCPPFilt != null) {
try {
@ -333,6 +326,7 @@ public class CygwinPEBinaryObject extends PEBinaryObject {
*
* @see org.eclipse.core.runtime.PlatformObject#getAdapter(java.lang.Class)
*/
@SuppressWarnings("unchecked")
@Override
public Object getAdapter(Class adapter) {
if (adapter == Addr2line.class) {

View file

@ -18,11 +18,6 @@ import org.eclipse.core.runtime.IPath;
public class CygwinPEBinaryShared extends CygwinPEBinaryObject implements IBinaryShared {
/**
* @param parser
* @param path
* @param type
*/
protected CygwinPEBinaryShared(IBinaryParser parser, IPath path) {
super(parser, path, IBinaryFile.SHARED);
}

View file

@ -25,7 +25,7 @@ public class CygwinPEParser extends PEParser {
private DefaultCygwinToolFactory toolFactory;
/**
* @see org.eclipse.cdt.core.model.IBinaryParser#getFormat()
* @see org.eclipse.cdt.core.IBinaryParser#getFormat()
*/
@Override
public String getFormat() {
@ -41,45 +41,27 @@ public class CygwinPEParser extends PEParser {
protected IBinaryArchive createBinaryArchive(IPath path) throws IOException {
return new CygwinPEBinaryArchive(this, path);
}
/**
* @param path
* @return
*/
@Override
protected IBinaryExecutable createBinaryExecutable(IPath path) {
return new CygwinPEBinaryExecutable(this, path, IBinaryFile.EXECUTABLE);
}
/**
* @param path
* @return
*/
@Override
protected IBinaryObject createBinaryCore(IPath path) {
return new CygwinPEBinaryObject(this, path, IBinaryFile.CORE);
}
/**
* @param path
* @return
*/
@Override
protected IBinaryObject createBinaryObject(IPath path) {
return new CygwinPEBinaryObject(this, path, IBinaryFile.OBJECT);
}
/**
* @param path
* @return
*/
@Override
protected IBinaryShared createBinaryShared(IPath path) {
return new CygwinPEBinaryShared(this, path);
}
/**
* @return
*/
protected DefaultCygwinToolFactory createToolFactory() {
return new DefaultCygwinToolFactory(this);
}
@ -87,6 +69,7 @@ public class CygwinPEParser extends PEParser {
/* (non-Javadoc)
* @see org.eclipse.core.runtime.PlatformObject#getAdapter(java.lang.Class)
*/
@SuppressWarnings("unchecked")
@Override
public Object getAdapter(Class adapter) {
if (adapter.isAssignableFrom(ICygwinToolsFactroy.class)) {

View file

@ -35,7 +35,7 @@ public class PEBinaryArchive extends BinaryFile implements IBinaryArchive {
}
/**
* @see org.eclipse.cdt.core.model.IBinaryParser.IBinaryArchive#getObjects()
* @see org.eclipse.cdt.core.IBinaryParser.IBinaryArchive#getObjects()
*/
public IBinaryObject[] getObjects() {
if (hasChanged()) {

View file

@ -18,11 +18,6 @@ import org.eclipse.core.runtime.IPath;
public class PEBinaryExecutable extends PEBinaryObject implements IBinaryExecutable {
/**
* @param parser
* @param path
* @param isCorefile
*/
public PEBinaryExecutable(IBinaryParser parser, IPath path) {
super(parser, path, IBinaryFile.EXECUTABLE);
}

View file

@ -71,7 +71,7 @@ public class PEBinaryObject extends BinaryObjectAdapter {
}
/**
* @see org.eclipse.cdt.core.model.IBinaryParser.IBinaryObject#getSymbols()
* @see org.eclipse.cdt.core.IBinaryParser.IBinaryObject#getSymbols()
*/
@Override
public ISymbol[] getSymbols() {

View file

@ -18,11 +18,6 @@ import org.eclipse.core.runtime.IPath;
public class PEBinaryShared extends PEBinaryObject implements IBinaryShared {
/**
* @param parser
* @param p
* @param type
*/
public PEBinaryShared(IBinaryParser parser, IPath p) {
super(parser, p, IBinaryFile.SHARED);
}

View file

@ -85,7 +85,7 @@ public class PEParser extends AbstractCExtension implements IBinaryParser {
}
/**
* @see org.eclipse.cdt.core.model.IBinaryParser#getFormat()
* @see org.eclipse.cdt.core.IBinaryParser#getFormat()
*/
public String getFormat() {
return "PE"; //$NON-NLS-1$
@ -132,42 +132,22 @@ public class PEParser extends AbstractCExtension implements IBinaryParser {
return 512;
}
/**
* @param path
* @return
*/
protected IBinaryExecutable createBinaryExecutable(IPath path) {
return new PEBinaryExecutable(this, path);
}
/**
* @param path
* @return
*/
protected IBinaryObject createBinaryCore(IPath path) {
return new PEBinaryObject(this, path, IBinaryFile.CORE);
}
/**
* @param path
* @return
*/
protected IBinaryObject createBinaryObject(IPath path) {
return new PEBinaryObject(this, path, IBinaryFile.OBJECT);
}
/**
* @param path
* @return
*/
protected IBinaryShared createBinaryShared(IPath path) {
return new PEBinaryShared(this, path);
}
/**
* @param path
* @return
*/
protected IBinaryArchive createBinaryArchive(IPath path) throws IOException {
return new PEBinaryArchive(this, path);
}

View file

@ -72,8 +72,6 @@ public interface IDebugEntryRequestor {
/**
* Integer constant.
* @param name
* @param address.
*/
void acceptIntegerConst(String name, int value);

View file

@ -36,7 +36,7 @@ public class ElfBinaryArchive extends BinaryFile implements IBinaryArchive {
}
/**
* @see org.eclipse.cdt.core.model.IBinaryParser.IBinaryArchive#getObjects()
* @see org.eclipse.cdt.core.IBinaryParser.IBinaryArchive#getObjects()
*/
public IBinaryObject[] getObjects() {
if (hasChanged()) {
@ -67,8 +67,6 @@ public class ElfBinaryArchive extends BinaryFile implements IBinaryArchive {
}
/**
* @param headers
* @param children2
* @deprecated use {@link ElfBinaryArchive#createArchiveMembers(ARHeader[])}
*/
@Deprecated

View file

@ -87,7 +87,7 @@ public class ElfParser extends AbstractCExtension implements IBinaryParser {
}
/**
* @see org.eclipse.cdt.core.model.IBinaryParser#getFormat()
* @see org.eclipse.cdt.core.IBinaryParser#getFormat()
*/
public String getFormat() {
return "ELF"; //$NON-NLS-1$
@ -107,10 +107,6 @@ public class ElfParser extends AbstractCExtension implements IBinaryParser {
return 128;
}
/**
* @param path
* @return
*/
protected IBinaryArchive createBinaryArchive(IPath path) throws IOException {
return new ElfBinaryArchive(this, path);
}

View file

@ -120,7 +120,7 @@ public class GNUElfBinaryObject extends ElfBinaryObject {
/**
* @throws IOException
* @see org.eclipse.cdt.core.model.IBinaryParser.IBinaryFile#getContents()
* @see org.eclipse.cdt.core.IBinaryParser.IBinaryFile#getContents()
*/
@Override
public InputStream getContents() throws IOException {

View file

@ -23,7 +23,7 @@ public class GNUElfParser extends ElfParser {
private IGnuToolFactory toolFactory;
/**
* @see org.eclipse.cdt.core.model.IBinaryParser#getFormat()
* @see org.eclipse.cdt.core.IBinaryParser#getFormat()
*/
@Override
public String getFormat() {
@ -71,9 +71,6 @@ public class GNUElfParser extends ElfParser {
return new GNUElfBinaryArchive(this, path);
}
/**
* @return
*/
protected IGnuToolFactory createGNUToolFactory() {
return new DefaultGnuToolFactory(this);
}

View file

@ -34,7 +34,7 @@ public class MachOBinaryArchive extends BinaryFile implements IBinaryArchive {
}
/**
* @see org.eclipse.cdt.core.model.IBinaryParser.IBinaryArchive#getObjects()
* @see org.eclipse.cdt.core.IBinaryParser.IBinaryArchive#getObjects()
*/
public IBinaryObject[] getObjects() {
if (hasChanged()) {

View file

@ -18,11 +18,6 @@ import org.eclipse.core.runtime.IPath;
public class MachOBinaryExecutable extends MachOBinaryObject implements IBinaryExecutable {
/**
* @param parser
* @param path
* @param isCoreFile
*/
public MachOBinaryExecutable(IBinaryParser parser, IPath path) {
super(parser, path, IBinaryFile.EXECUTABLE);
}

View file

@ -105,7 +105,7 @@ public class MachOBinaryObject extends BinaryObjectAdapter {
}
/**
* @see org.eclipse.cdt.core.model.IBinaryParser.IBinaryObject#getName()
* @see org.eclipse.cdt.core.IBinaryParser.IBinaryObject#getName()
*/
@Override
public String getName() {

View file

@ -18,11 +18,6 @@ import org.eclipse.core.runtime.IPath;
public class MachOBinaryShared extends MachOBinaryObject implements IBinaryShared {
/**
* @param parser
* @param path
* @param type
*/
protected MachOBinaryShared(IBinaryParser parser, IPath path) {
super(parser, path, IBinaryFile.SHARED);
}

View file

@ -82,7 +82,7 @@ public class MachOParser extends AbstractCExtension implements IBinaryParser {
}
/**
* @see org.eclipse.cdt.core.model.IBinaryParser#getFormat()
* @see org.eclipse.cdt.core.IBinaryParser#getFormat()
*/
public String getFormat() {
return "MACHO"; //$NON-NLS-1$
@ -125,10 +125,7 @@ public class MachOParser extends AbstractCExtension implements IBinaryParser {
}
return new Path(value);
}
/**
* @param path
* @return
*/
protected IBinaryArchive createBinaryArchive(IPath path) throws IOException {
return new MachOBinaryArchive(this, path);
}

View file

@ -22,8 +22,8 @@ class PTYInputStream extends InputStream {
MasterFD master;
/**
* Fome a Unix valid file descriptor set a Reader.
* @param desc file descriptor.
* From a Unix valid file descriptor set a Reader.
* @param fd file descriptor.
*/
public PTYInputStream(MasterFD fd) {
master = fd;

View file

@ -11,8 +11,8 @@
package org.eclipse.cdt.utils.pty;
import java.io.OutputStream;
import java.io.IOException;
import java.io.OutputStream;
import org.eclipse.cdt.utils.pty.PTY.MasterFD;
@ -21,8 +21,8 @@ public class PTYOutputStream extends OutputStream {
MasterFD master;
/**
* Fome a Unix valid file descriptor set a Reader.
* @param desc file descriptor.
* From a Unix valid file descriptor set a Reader.
* @param fd file descriptor.
*/
public PTYOutputStream(MasterFD fd) {
master = fd;

View file

@ -96,14 +96,6 @@ public class AR {
return temp;
}
/**
* Create a new SOM object for the object file.
*
* @throws IOException
* Not a valid SOM object file.
* @return A new SOM object.
* @see SOM#SOM( String, long )
*/
public long getObjectDataOffset() {
return somOffset;
}
@ -292,15 +284,15 @@ public class AR {
loadHeaders();
count = 0;
for (int i = 0; i < memberHeaders.length; i++) {
object_name = memberHeaders[i].getObjectName();
for (ARHeader memberHeader : memberHeaders) {
object_name = memberHeader.getObjectName();
if (names != null && !stringInStrings(object_name, names))
continue;
object_name = "" + count + "_" + object_name; //$NON-NLS-1$ //$NON-NLS-2$
count++;
byte[] data = memberHeaders[i].getObjectData();
byte[] data = memberHeader.getObjectData();
File output = new File(outdir, object_name);
names_used.add(object_name);
@ -313,8 +305,8 @@ public class AR {
}
private boolean stringInStrings(String str, String[] set) {
for (int i = 0; i < set.length; i++)
if (str.compareTo(set[i]) == 0)
for (String element : set)
if (str.compareTo(element) == 0)
return true;
return false;
}

View file

@ -519,10 +519,6 @@ public class SOM {
return buffer.toString();
}
/**
* @param hints
* @return
*/
public static boolean isSOMHeader(byte[] hints) {
if (hints != null && hints[0] == 0x02 &&
(hints[1] == (byte)0xb || hints[1] == (byte)0x10 || hints[1] == (byte)0x14) ) {
@ -531,11 +527,6 @@ public class SOM {
return false;
}
/**
* @param hints
* @return
* @throws IOException
*/
public static Attribute getAttributes(byte[] hints) throws IOException {
SOM emptyXCoff = new SOM();
emptyXCoff.filehdr = new SOM.FileHeader(hints, false); // big endian
@ -544,11 +535,6 @@ public class SOM {
return attribute;
}
/**
* @param file
* @return
* @throws IOException
*/
public static Attribute getAttributes(String file) throws IOException {
SOM xcoff = new SOM(file);
Attribute attribute = xcoff.getAttributes();

View file

@ -18,11 +18,6 @@ import org.eclipse.core.runtime.IPath;
public class SOMBinaryExecutable extends SOMBinaryObject implements IBinaryExecutable {
/**
* @param parser
* @param path
* @param header
*/
public SOMBinaryExecutable(IBinaryParser parser, IPath path) {
super(parser, path, IBinaryFile.EXECUTABLE);
}

View file

@ -18,11 +18,6 @@ import org.eclipse.core.runtime.IPath;
public class SOMBinaryShared extends SOMBinaryObject implements IBinaryShared {
/**
* @param parser
* @param path
* @param type
*/
protected SOMBinaryShared(IBinaryParser parser, IPath path) {
super(parser, path, IBinaryFile.SHARED);
}

View file

@ -148,9 +148,6 @@ public class SOMParser extends AbstractCExtension implements IBinaryParser {
return new SOMBinaryArchive(this, path);
}
/**
* @return
*/
protected DefaultGnuToolFactory createGNUToolFactory() {
return new DefaultGnuToolFactory(this);
}
@ -158,6 +155,7 @@ public class SOMParser extends AbstractCExtension implements IBinaryParser {
/* (non-Javadoc)
* @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
*/
@SuppressWarnings("unchecked")
@Override
public Object getAdapter(Class adapter) {
if (adapter.equals(IGnuToolFactory.class)) {

View file

@ -20,8 +20,8 @@ class SpawnerInputStream extends InputStream {
private int fd;
/**
* Fome a Unix valid file descriptor set a Reader.
* @param desc file descriptor.
* From a Unix valid file descriptor set a Reader.
* @param fd file descriptor.
*/
public SpawnerInputStream(int fd) {
this.fd = fd;

View file

@ -11,15 +11,15 @@
package org.eclipse.cdt.utils.spawner;
import java.io.OutputStream;
import java.io.IOException;
import java.io.OutputStream;
public class SpawnerOutputStream extends OutputStream {
private int fd;
/**
* Fome a Unix valid file descriptor set a Reader.
* @param desc file descriptor.
* From a Unix valid file descriptor set a Reader.
* @param fd file descriptor.
*/
public SpawnerOutputStream(int fd) {
this.fd = fd;

View file

@ -746,17 +746,17 @@ public class XCoff32 {
}
try {
SectionHeader[] sections = getSectionHeaders();
for (int i = 0; i < sections.length; i++) {
buffer.append(sections[i]);
for (SectionHeader section : sections) {
buffer.append(section);
}
} catch (IOException e) {
}
try {
Symbol[] table = getSymbols();
for (int i = 0; i < table.length; i++) {
buffer.append(table[i]).append("n_name = "); //$NON-NLS-1$
buffer.append(table[i].getName(getStringTable())).append(NL);
for (Symbol element : table) {
buffer.append(element).append("n_name = "); //$NON-NLS-1$
buffer.append(element.getName(getStringTable())).append(NL);
}
} catch (IOException e) {
}
@ -795,10 +795,6 @@ public class XCoff32 {
}
}
/**
* @param hints
* @return
*/
public static boolean isXCOFF32Header(byte[] hints) {
if (hints != null && hints[0] == 0x01 && (hints[1] == (byte)0xdf) ) {
return true;
@ -806,11 +802,6 @@ public class XCoff32 {
return false;
}
/**
* @param hints
* @return
* @throws IOException
*/
public static Attribute getAttributes(byte[] hints) throws IOException {
XCoff32 emptyXCoff = new XCoff32();
emptyXCoff.filehdr = new XCoff32.FileHeader(hints, false); // big endian
@ -819,11 +810,6 @@ public class XCoff32 {
return attribute;
}
/**
* @param file
* @return
* @throws IOException
*/
public static Attribute getAttributes(String file) throws IOException {
XCoff32 xcoff = new XCoff32(file);
Attribute attribute = xcoff.getAttributes();

View file

@ -18,11 +18,6 @@ import org.eclipse.core.runtime.IPath;
public class XCOFFBinaryShared extends XCOFFBinaryObject implements IBinaryShared {
/**
* @param parser
* @param path
* @param type
*/
public XCOFFBinaryShared(IBinaryParser parser, IPath path) {
super(parser, path, IBinaryFile.SHARED);
}