diff --git a/core/org.eclipse.cdt.core.tests/.cdtproject b/core/org.eclipse.cdt.core.tests/.cdtproject
deleted file mode 100644
index 1b2ea839404..00000000000
--- a/core/org.eclipse.cdt.core.tests/.cdtproject
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
diff --git a/core/org.eclipse.cdt.core.tests/.cproject b/core/org.eclipse.cdt.core.tests/.cproject
deleted file mode 100644
index 43105daf504..00000000000
--- a/core/org.eclipse.cdt.core.tests/.cproject
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/rewrite/ASTRewrite.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/rewrite/ASTRewrite.java
index 047250ec6b5..0bc21187b61 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/rewrite/ASTRewrite.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/rewrite/ASTRewrite.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007 Wind River Systems, Inc. and others.
+ * Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -55,6 +55,9 @@ public final class ASTRewrite {
private final ASTModificationStore fModificationStore;
private final ASTModification fParentMod;
+ /**
+ * @noreference This constructor is not intended to be referenced by clients.
+ */
public ASTRewrite(IASTNode root, ASTModificationStore modStore, ASTModification parentMod) {
fRoot= root;
fModificationStore= modStore;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/token/OperatorTokenDuple.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/token/OperatorTokenDuple.java
index 8cc99768a66..2a8cc67037a 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/token/OperatorTokenDuple.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/token/OperatorTokenDuple.java
@@ -13,6 +13,7 @@ package org.eclipse.cdt.internal.core.parser.token;
import java.util.Iterator;
import java.util.List;
+import org.eclipse.cdt.core.dom.ast.IASTNode;
import org.eclipse.cdt.core.dom.ast.IASTTypeId;
import org.eclipse.cdt.core.parser.IToken;
import org.eclipse.cdt.core.parser.ITokenDuple;
@@ -80,7 +81,7 @@ public class OperatorTokenDuple implements ITokenDuple {
return token.getLastToken();
}
- public List[] getTemplateIdArgLists() {
+ public List[] getTemplateIdArgLists() {
return token.getTemplateIdArgLists();
}
@@ -96,7 +97,7 @@ public class OperatorTokenDuple implements ITokenDuple {
return token.getSegmentCount();
}
- public Iterator iterator() {
+ public Iterator iterator() {
return token.iterator();
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/token/TemplateTokenDuple.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/token/TemplateTokenDuple.java
index 0b16a583eb6..a08349d7081 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/token/TemplateTokenDuple.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/token/TemplateTokenDuple.java
@@ -13,6 +13,7 @@ package org.eclipse.cdt.internal.core.parser.token;
import java.util.ArrayList;
import java.util.List;
+import org.eclipse.cdt.core.dom.ast.IASTNode;
import org.eclipse.cdt.core.parser.IToken;
import org.eclipse.cdt.core.parser.ITokenDuple;
@@ -22,21 +23,28 @@ import org.eclipse.cdt.core.parser.ITokenDuple;
*/
public class TemplateTokenDuple extends BasicTokenDuple {
- protected final List [] argLists;
+ protected final List[] argLists;
/**
* @param first
* @param last
* @param templateArgLists
*/
- public TemplateTokenDuple(IToken first, IToken last, List templateArgLists) {
+ public TemplateTokenDuple(IToken first, IToken last, List> templateArgLists) {
super(first, last);
- argLists = (List[]) templateArgLists.toArray( new List [templateArgLists.size()] );
+ argLists = toArray(templateArgLists);
numSegments = calculateSegmentCount();
}
-
-
-
+
+ @SuppressWarnings("unchecked")
+ private List[] toArray(List> templateArgLists) {
+ return templateArgLists.toArray( new List[templateArgLists.size()] );
+ }
+ @SuppressWarnings("unchecked")
+ private List[] newArrayOfLists(int size) {
+ return new List[size];
+ }
+
/* (non-Javadoc)
* @see org.eclipse.cdt.core.parser.ITokenDuple#getSegmentCount()
*/
@@ -63,9 +71,9 @@ public class TemplateTokenDuple extends BasicTokenDuple {
last = token;
}
- List [] args = getTemplateIdArgLists();
+ List[] args = getTemplateIdArgLists();
if( args != null && args[ args.length - 1 ] != null ){
- List newArgs = new ArrayList( 1 );
+ List> newArgs = new ArrayList>( 1 );
newArgs.add( args[ args.length - 1 ] );
return TokenFactory.createTokenDuple( first, last, newArgs );
}
@@ -76,12 +84,12 @@ public class TemplateTokenDuple extends BasicTokenDuple {
public TemplateTokenDuple( ITokenDuple first, ITokenDuple last )
{
super( first, last );
- List [] a1 = first.getTemplateIdArgLists();
- List [] a2 = last.getTemplateIdArgLists();
+ List[] a1 = first.getTemplateIdArgLists();
+ List[] a2 = last.getTemplateIdArgLists();
int l1 = ( a1 != null ) ? a1.length : first.getSegmentCount();
int l2 = ( a2 != null ) ? a2.length : first.getSegmentCount();
- argLists = new List[ l1 + l2 ];
+ argLists = newArrayOfLists(l1 + l2);
if( a1 != null )
System.arraycopy( a1, 0, argLists, 0, l1 );
if( a2 != null )
@@ -89,18 +97,19 @@ public class TemplateTokenDuple extends BasicTokenDuple {
numSegments = calculateSegmentCount();
}
+
/* (non-Javadoc)
* @see org.eclipse.cdt.core.parser.ITokenDuple#getTemplateIdArgLists()
*/
@Override
- public List[] getTemplateIdArgLists() {
+ public List[] getTemplateIdArgLists() {
return argLists;
}
@Override
public ITokenDuple[] getSegments()
{
- List r = new ArrayList();
+ List r = new ArrayList();
IToken token = null;
IToken prev = null;
IToken last = getLastToken();
@@ -114,10 +123,10 @@ public class TemplateTokenDuple extends BasicTokenDuple {
if( token.getType() == IToken.tLT )
token = TokenFactory.consumeTemplateIdArguments( token, last );
if( token.getType() == IToken.tCOLONCOLON ){
- List newArgs = null;
+ List> newArgs = null;
if( argLists[count] != null )
{
- newArgs = new ArrayList( 1 );
+ newArgs = new ArrayList>(1);
newArgs.add( argLists[count]);
}
ITokenDuple d = TokenFactory.createTokenDuple( startOfSegment, prev != null ? prev : startOfSegment, newArgs );
@@ -127,16 +136,16 @@ public class TemplateTokenDuple extends BasicTokenDuple {
continue;
}
}
- List newArgs = null;
+ List> newArgs = null;
//pointer to members could have a A::B::
if( count < argLists.length && argLists[count] != null )
{
- newArgs = new ArrayList( 1 );
- newArgs.add( argLists[count]);
+ newArgs = new ArrayList>(1);
+ newArgs.add(argLists[count]);
}
ITokenDuple d = TokenFactory.createTokenDuple( startOfSegment, last, newArgs);
r.add( d );
- return (ITokenDuple[]) r.toArray( new ITokenDuple[ r.size() ]);
+ return r.toArray( new ITokenDuple[ r.size() ]);
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/token/TokenFactory.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/token/TokenFactory.java
index d15a12ae092..339fa83e81f 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/token/TokenFactory.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/token/TokenFactory.java
@@ -15,6 +15,7 @@ import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
+import org.eclipse.cdt.core.dom.ast.IASTNode;
import org.eclipse.cdt.core.parser.IToken;
import org.eclipse.cdt.core.parser.ITokenDuple;
@@ -56,15 +57,15 @@ public class TokenFactory {
public int getStartOffset() {
return fToken.getOffset();
}
- public List[] getTemplateIdArgLists() {
+ public List[] getTemplateIdArgLists() {
return null;
}
public IToken getToken(int index) {
if( index == 0 ) return fToken;
return null;
}
- public Iterator iterator() {
- return new Iterator() {
+ public Iterator iterator() {
+ return new Iterator() {
private boolean hasNext = true;
public void remove() {
throw new UnsupportedOperationException();
@@ -72,7 +73,7 @@ public class TokenFactory {
public boolean hasNext() {
return hasNext;
}
- public Object next() {
+ public IToken next() {
hasNext = false;
return fToken;
}
@@ -102,7 +103,7 @@ public class TokenFactory {
return new BasicTokenDuple( first, last );
}
- public static ITokenDuple createTokenDuple(IToken first, IToken last, List templateArgLists) {
+ public static ITokenDuple createTokenDuple(IToken first, IToken last, List> templateArgLists) {
if (templateArgLists == null || templateArgLists.isEmpty()) {
return createTokenDuple(first, last);
}
@@ -112,8 +113,8 @@ public class TokenFactory {
public static ITokenDuple createTokenDuple( ITokenDuple firstDuple, ITokenDuple secondDuple ){
if( secondDuple == null ) return firstDuple;
if( firstDuple == null ) return secondDuple;
- List [] f1 = firstDuple.getTemplateIdArgLists();
- List [] f2 = secondDuple.getTemplateIdArgLists();
+ List[] f1 = firstDuple.getTemplateIdArgLists();
+ List[] f2 = secondDuple.getTemplateIdArgLists();
if( f1 == null && f2 == null )
return new BasicTokenDuple( firstDuple, secondDuple );
return new TemplateTokenDuple( firstDuple, secondDuple );
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/Checksums.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/Checksums.java
index 0b83514a68a..2ffc1d1b915 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/Checksums.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/Checksums.java
@@ -42,7 +42,7 @@ public class Checksums {
* @throws NoSuchAlgorithmException
* @since 4.0
*/
- public static MessageDigest getAlgorithm(Map persistedMap) throws NoSuchAlgorithmException {
+ public static MessageDigest getAlgorithm(Map, ?> persistedMap) throws NoSuchAlgorithmException {
Object obj= persistedMap.get(KEY_ALGORITHM);
String alg= obj instanceof String ? (String) obj : DEFAULT_ALGORITHM;
return MessageDigest.getInstance(alg);
@@ -80,7 +80,7 @@ public class Checksums {
* Retrieves a checksum for a file from the persisted map. May return null
.
* @since 4.0
*/
- public static byte[] getChecksum(Map persistedMap, IFile file) {
+ public static byte[] getChecksum(Map, ?> persistedMap, IFile file) {
IPath prjRel= file.getProjectRelativePath();
Object checksum= persistedMap.get(prjRel.toString());
if (checksum instanceof byte[])
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/TeamPDOMExportOperation.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/TeamPDOMExportOperation.java
index 79a6a692e9a..a22a1cfc0f9 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/TeamPDOMExportOperation.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/TeamPDOMExportOperation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007 Wind River Systems, Inc. and others.
+ * Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -8,7 +8,6 @@
* Contributors:
* Markus Schorn - initial API and implementation
*******************************************************************************/
-
package org.eclipse.cdt.internal.core.pdom;
import java.io.File;
@@ -144,7 +143,7 @@ public class TeamPDOMExportOperation implements IWorkspaceRunnable {
}
private void createChecksums(ICProject cproject, PDOM pdom, File target, IProgressMonitor monitor) throws CoreException {
- HashSet fullPaths= new HashSet();
+ HashSet fullPaths= new HashSet();
try {
pdom.acquireReadLock();
} catch (InterruptedException e) {
@@ -165,15 +164,15 @@ public class TeamPDOMExportOperation implements IWorkspaceRunnable {
int i=0;
IWorkspaceRoot root= ResourcesPlugin.getWorkspace().getRoot();
IFile[] files= new IFile[fullPaths.size()];
- for (Iterator iterator = fullPaths.iterator(); iterator.hasNext();) {
- String fullPath= (String) iterator.next();
+ for (Iterator iterator = fullPaths.iterator(); iterator.hasNext();) {
+ String fullPath= iterator.next();
files[i++]= root.getFile(new Path(fullPath));
}
- Map map= Checksums.createChecksumMap(files, fMessageDigest, monitor);
+ Map map= Checksums.createChecksumMap(files, fMessageDigest, monitor);
writeChecksums(map, target);
}
- private void writeChecksums(Map map, File target) throws CoreException {
+ private void writeChecksums(Map, ?> map, File target) throws CoreException {
ObjectOutputStream out= null;
try {
out= new ObjectOutputStream(new FileOutputStream(target));
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/TeamPDOMImportOperation.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/TeamPDOMImportOperation.java
index 3817774c0bc..5c6ee24e84f 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/TeamPDOMImportOperation.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/TeamPDOMImportOperation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007 Wind River Systems, Inc. and others.
+ * Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -8,7 +8,6 @@
* Contributors:
* Markus Schorn - initial API and implementation
*******************************************************************************/
-
package org.eclipse.cdt.internal.core.pdom;
import java.io.File;
@@ -146,7 +145,7 @@ public class TeamPDOMImportOperation implements IWorkspaceRunnable {
private void doImportIndex(File importFile, IProgressMonitor monitor) throws CoreException, InterruptedException, IOException {
ZipFile zip= new ZipFile(importFile);
- Map checksums= null;
+ Map, ?> checksums= null;
try {
importIndex(zip, monitor);
checksums= getChecksums(zip);
@@ -172,7 +171,7 @@ public class TeamPDOMImportOperation implements IWorkspaceRunnable {
CCoreInternals.getPDOMManager().importProjectPDOM(fProject, stream);
}
- private Map getChecksums(ZipFile zip) {
+ private Map, ?> getChecksums(ZipFile zip) {
ZipEntry indexEntry= zip.getEntry(CHECKSUMS_NAME);
if (indexEntry != null) {
try {
@@ -180,7 +179,7 @@ public class TeamPDOMImportOperation implements IWorkspaceRunnable {
try {
Object obj= input.readObject();
if (obj instanceof Map) {
- return (Map) obj;
+ return (Map,?>) obj;
}
}
finally {
@@ -194,7 +193,7 @@ public class TeamPDOMImportOperation implements IWorkspaceRunnable {
return Collections.EMPTY_MAP;
}
- private void checkIndex(Map checksums, IProgressMonitor monitor) throws CoreException, InterruptedException {
+ private void checkIndex(Map, ?> checksums, IProgressMonitor monitor) throws CoreException, InterruptedException {
IPDOM obj= CCoreInternals.getPDOMManager().getPDOM(fProject);
if (!(obj instanceof WritablePDOM)) {
return;
@@ -203,7 +202,7 @@ public class TeamPDOMImportOperation implements IWorkspaceRunnable {
WritablePDOM pdom= (WritablePDOM) obj;
pdom.acquireReadLock();
try {
- List filesToCheck= new ArrayList();
+ List filesToCheck= new ArrayList();
if (!pdom.isSupportedVersion()) {
throw new CoreException(CCorePlugin.createStatus(
NLS.bind(Messages.PDOMImportTask_errorInvalidPDOMVersion, fProject.getElementName())));
@@ -264,7 +263,7 @@ public class TeamPDOMImportOperation implements IWorkspaceRunnable {
}
private void deleteFiles(WritablePDOM pdom, final int giveupReadlocks, IIndexFragmentFile[] filesToDelete,
- List updateTimestamps, IProgressMonitor monitor) throws InterruptedException, CoreException {
+ List updateTimestamps, IProgressMonitor monitor) throws InterruptedException, CoreException {
pdom.acquireWriteLock(giveupReadlocks);
try {
for (int i = 0; i < filesToDelete.length; i++) {
@@ -274,10 +273,10 @@ public class TeamPDOMImportOperation implements IWorkspaceRunnable {
pdom.clearFile(ifile, null);
}
}
- for (Iterator i = updateTimestamps.iterator(); i.hasNext();) {
+ for (Iterator i = updateTimestamps.iterator(); i.hasNext();) {
checkMonitor(monitor);
- FileAndChecksum fc = (FileAndChecksum) i.next();
+ FileAndChecksum fc = i.next();
IIndexFragmentFile file= fc.fIFile;
if (file != null) {
IResource r= fc.fFile.getResource();
@@ -293,12 +292,12 @@ public class TeamPDOMImportOperation implements IWorkspaceRunnable {
}
}
- private void removeOutdatedFiles(Map checksums, List filesToCheck, IProgressMonitor monitor) throws NoSuchAlgorithmException {
+ private void removeOutdatedFiles(Map, ?> checksums, List filesToCheck, IProgressMonitor monitor) throws NoSuchAlgorithmException {
MessageDigest md= Checksums.getAlgorithm(checksums);
- for (Iterator i = filesToCheck.iterator(); i.hasNext();) {
+ for (Iterator i = filesToCheck.iterator(); i.hasNext();) {
checkMonitor(monitor);
- FileAndChecksum cs= (FileAndChecksum) i.next();
+ FileAndChecksum cs= i.next();
ITranslationUnit tu= cs.fFile;
if (tu != null) {
IPath location= tu.getLocation();
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CCorePlugin.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CCorePlugin.java
index 5a6ce424059..eb407faa26d 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CCorePlugin.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CCorePlugin.java
@@ -11,7 +11,6 @@
* Andrew Ferguson (Symbian)
* Anton Leherbauer (Wind River Systems)
*******************************************************************************/
-
package org.eclipse.cdt.core;
import java.io.IOException;
@@ -176,11 +175,15 @@ public class CCorePlugin extends Plugin {
*/
public static final String SPACE = "space"; //$NON-NLS-1$
- public CDTLogWriter cdtLog = null;
-
private static CCorePlugin fgCPlugin;
private static ResourceBundle fgResourceBundle;
+
+ /**
+ * @noreference This field is not intended to be referenced by clients.
+ */
+ public CDTLogWriter cdtLog = null;
+
private CProjectDescriptionManager fNewCProjectDescriptionManager;
private CoreModel fCoreModel;
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CConfigBasedDescriptorManager.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CConfigBasedDescriptorManager.java
index 5646a6b2637..f629f84c94b 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CConfigBasedDescriptorManager.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CConfigBasedDescriptorManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007 Intel Corporation and others.
+ * Copyright (c) 2007, 2008 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -59,29 +59,29 @@ import org.w3c.dom.Element;
public class CConfigBasedDescriptorManager implements ICDescriptorManager {
private static CConfigBasedDescriptorManager fInstance;
public static final String NULL_OWNER_ID = ""; //$NON-NLS-1$
- private Map fOwnerConfigMap = null;
+ private Map fOwnerConfigMap = null;
private ICProjectDescriptionListener fDescriptionListener;
private static final QualifiedName DESCRIPTOR_PROPERTY = new QualifiedName(CCorePlugin.PLUGIN_ID, "CDescriptor"); //$NON-NLS-1$
- private List fListeners = Collections.synchronizedList(new Vector());
+ private List fListeners = Collections.synchronizedList(new Vector());
// private ThreadLocal fApplyingDescriptorMap = new ThreadLocal();
- private ThreadLocal fThreadInfo = new ThreadLocal();
+ private ThreadLocal fThreadInfo = new ThreadLocal();
private class ThreadInfo {
- Map fApplyingDescriptorMap;
- Map fOperatingDescriptorMap;
+ Map fApplyingDescriptorMap;
+ Map fOperatingDescriptorMap;
- public Map getApplyingDescriptorMap(boolean create){
+ public Map getApplyingDescriptorMap(boolean create){
if(fApplyingDescriptorMap == null && create){
- fApplyingDescriptorMap = new HashMap(1);
+ fApplyingDescriptorMap = new HashMap(1);
}
return fApplyingDescriptorMap;
}
- public Map getOperatingDescriptorMap(boolean create){
+ public Map getOperatingDescriptorMap(boolean create){
if(fOperatingDescriptorMap == null && create){
- fOperatingDescriptorMap = new HashMap(1);
+ fOperatingDescriptorMap = new HashMap(1);
}
return fOperatingDescriptorMap;
}
@@ -386,7 +386,7 @@ public class CConfigBasedDescriptorManager implements ICDescriptorManager {
if (fOwnerConfigMap == null) {
initializeOwnerConfiguration();
}
- COwnerConfiguration config = (COwnerConfiguration)fOwnerConfigMap.get(id);
+ COwnerConfiguration config = fOwnerConfigMap.get(id);
if (config == null) { // no install owner, lets create place holder config for it.
config = new COwnerConfiguration(id, CCorePlugin.getResourceString("CDescriptorManager.owner_not_Installed")); //$NON-NLS-1$
fOwnerConfigMap.put(id, config);
@@ -397,7 +397,7 @@ public class CConfigBasedDescriptorManager implements ICDescriptorManager {
private void initializeOwnerConfiguration() {
IExtensionPoint extpoint = Platform.getExtensionRegistry().getExtensionPoint(CCorePlugin.PLUGIN_ID, "CProject"); //$NON-NLS-1$
IExtension extension[] = extpoint.getExtensions();
- fOwnerConfigMap = new HashMap(extension.length);
+ fOwnerConfigMap = new HashMap(extension.length);
for (int i = 0; i < extension.length; i++) {
IConfigurationElement element[] = extension[i].getConfigurationElements();
for (int j = 0; j < element.length; j++) {
@@ -552,7 +552,7 @@ public class CConfigBasedDescriptorManager implements ICDescriptorManager {
protected void notifyListeners(final CDescriptorEvent event) {
final ICDescriptorListener[] listeners;
synchronized (fListeners) {
- listeners = (ICDescriptorListener[])fListeners.toArray(new ICDescriptorListener[fListeners.size()]);
+ listeners = fListeners.toArray(new ICDescriptorListener[fListeners.size()]);
}
for (int i = 0; i < listeners.length; i++) {
final int index = i;
@@ -572,13 +572,13 @@ public class CConfigBasedDescriptorManager implements ICDescriptorManager {
}
public boolean reconsile(CConfigBasedDescriptor descriptor, ICProjectDescription des){
- Map map = descriptor.getStorageDataElMap();
+ Map map = descriptor.getStorageDataElMap();
boolean reconsiled = false;
if(map.size() != 0){
- for(Iterator iter = map.entrySet().iterator(); iter.hasNext();){
- Map.Entry entry = (Map.Entry)iter.next();
- String id = (String)entry.getKey();
- Element el = (Element)entry.getValue();
+ for(Iterator> iter = map.entrySet().iterator(); iter.hasNext();){
+ Map.Entry entry = iter.next();
+ String id = entry.getKey();
+ Element el = entry.getValue();
if(reconsile(id, el.getParentNode() != null ? el : null, des))
reconsiled = true;
}
@@ -629,9 +629,9 @@ public class CConfigBasedDescriptorManager implements ICDescriptorManager {
}
private CConfigBasedDescriptor getApplyingDescriptor(IProject project){
- Map map = getApplyingDescriptorMap(false);
+ Map map = getApplyingDescriptorMap(false);
if(map != null){
- return (CConfigBasedDescriptor)map.get(project);
+ return map.get(project);
}
return null;
}
@@ -640,20 +640,20 @@ public class CConfigBasedDescriptorManager implements ICDescriptorManager {
if(dr == null)
clearApplyingDescriptor(project);
else {
- Map map = getApplyingDescriptorMap(true);
+ Map map = getApplyingDescriptorMap(true);
map.put(project, dr);
}
}
private CConfigBasedDescriptor clearApplyingDescriptor(IProject project){
- Map map = getApplyingDescriptorMap(false);
+ Map map = getApplyingDescriptorMap(false);
if(map != null){
- return (CConfigBasedDescriptor)map.remove(project);
+ return map.remove(project);
}
return null;
}
- private Map getApplyingDescriptorMap(boolean create){
+ private Map getApplyingDescriptorMap(boolean create){
ThreadInfo info = getThreadInfo(create);
if(info == null)
return null;
@@ -668,9 +668,9 @@ public class CConfigBasedDescriptorManager implements ICDescriptorManager {
}
private CConfigBasedDescriptor getOperatingDescriptor(IProject project){
- Map map = getOperatingDescriptorMap(false);
+ Map map = getOperatingDescriptorMap(false);
if(map != null){
- return (CConfigBasedDescriptor)map.get(project);
+ return map.get(project);
}
return null;
}
@@ -679,20 +679,20 @@ public class CConfigBasedDescriptorManager implements ICDescriptorManager {
if(dr == null)
clearOperatingDescriptor(project);
else {
- Map map = getOperatingDescriptorMap(true);
+ Map map = getOperatingDescriptorMap(true);
map.put(project, dr);
}
}
private CConfigBasedDescriptor clearOperatingDescriptor(IProject project){
- Map map = getOperatingDescriptorMap(false);
+ Map map = getOperatingDescriptorMap(false);
if(map != null){
- return (CConfigBasedDescriptor)map.remove(project);
+ return map.remove(project);
}
return null;
}
- private Map getOperatingDescriptorMap(boolean create){
+ private Map getOperatingDescriptorMap(boolean create){
ThreadInfo info = getThreadInfo(create);
if(info == null)
return null;
@@ -701,7 +701,7 @@ public class CConfigBasedDescriptorManager implements ICDescriptorManager {
}
private ThreadInfo getThreadInfo(boolean create){
- ThreadInfo info = (ThreadInfo)fThreadInfo.get();
+ ThreadInfo info = fThreadInfo.get();
if(info == null && create){
info = new ThreadInfo();
fThreadInfo.set(info);
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CCorePreferenceInitializer.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CCorePreferenceInitializer.java
index e38a76d3cfa..ef453b64d09 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CCorePreferenceInitializer.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CCorePreferenceInitializer.java
@@ -13,7 +13,6 @@
package org.eclipse.cdt.internal.core;
import java.util.HashSet;
-import java.util.Iterator;
import java.util.Map;
import org.eclipse.cdt.core.CCorePlugin;
@@ -35,10 +34,10 @@ public class CCorePreferenceInitializer extends AbstractPreferenceInitializer {
*/
@Override
public void initializeDefaultPreferences() {
- HashSet optionNames = CModelManager.OptionNames;
+ HashSet optionNames = CModelManager.OptionNames;
// Formatter settings
- Map defaultOptionsMap = DefaultCodeFormatterConstants.getDefaultSettings(); // code formatter defaults
+ Map defaultOptionsMap = DefaultCodeFormatterConstants.getDefaultSettings(); // code formatter defaults
// Compiler settings
defaultOptionsMap.put(CCorePreferenceConstants.TODO_TASK_TAGS, CCorePreferenceConstants.DEFAULT_TASK_TAG);
@@ -52,10 +51,9 @@ public class CCorePreferenceInitializer extends AbstractPreferenceInitializer {
// Store default values to default preferences
IEclipsePreferences defaultPreferences = ((IScopeContext) new DefaultScope()).getNode(CCorePlugin.PLUGIN_ID);
- for (Iterator iter = defaultOptionsMap.entrySet().iterator(); iter.hasNext();) {
- Map.Entry entry = (Map.Entry) iter.next();
- String optionName = (String) entry.getKey();
- defaultPreferences.put(optionName, (String)entry.getValue());
+ for (Map.Entry entry : defaultOptionsMap.entrySet()) {
+ String optionName = entry.getKey();
+ defaultPreferences.put(optionName, entry.getValue());
optionNames.add(optionName);
}
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CExtensionInfo.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CExtensionInfo.java
index 036422c8d54..ac4fbe33324 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CExtensionInfo.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CExtensionInfo.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2007 QNX Software Systems and others.
+ * Copyright (c) 2000, 2008 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -14,7 +14,7 @@ import java.util.HashMap;
public class CExtensionInfo {
- protected HashMap attribMap = new HashMap(4);
+ protected HashMap attribMap = new HashMap(4);
public CExtensionInfo(){
@@ -24,7 +24,7 @@ public class CExtensionInfo {
attribMap.putAll(base.attribMap);
}
- public HashMap getAttributes() {
+ public HashMap getAttributes() {
return attribMap;
}
@@ -37,7 +37,7 @@ public class CExtensionInfo {
}
public String getAttribute(String key) {
- return (String) attribMap.get(key);
+ return attribMap.get(key);
}
}
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CdtVarPathEntryVariableManager.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CdtVarPathEntryVariableManager.java
index ce00c306497..6f30438be9e 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CdtVarPathEntryVariableManager.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CdtVarPathEntryVariableManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007 Intel Corporation and others.
+ * Copyright (c) 2007, 2008 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -48,7 +48,7 @@ public class CdtVarPathEntryVariableManager implements
private UserDefinedVariableSupplier fUserVarSupplier = UserDefinedVariableSupplier.getInstance();
private VarSubstitutor fSubstitutor = new VarSubstitutor();
private VarSupplier fVarSupplier = new VarSupplier();
- private Set fListeners;
+ private Set fListeners;
private class VarSubstitutor extends SupplierBasedCdtVariableSubstitutor {
public VarSubstitutor() {
@@ -91,12 +91,12 @@ public class CdtVarPathEntryVariableManager implements
public ICdtVariable[] getVariables(IVariableContextInfo context) {
ICdtVariable vars[] = fUserVarSupplier.getMacros(ICoreVariableContextInfo.CONTEXT_WORKSPACE, null);
- List list = new ArrayList();
+ List list = new ArrayList();
for (ICdtVariable var : vars) {
if(getVariablePath(var) != null)
list.add(var);
}
- return (ICdtVariable[])list.toArray(new ICdtVariable[list.size()]);
+ return list.toArray(new ICdtVariable[list.size()]);
}
}
@@ -104,7 +104,7 @@ public class CdtVarPathEntryVariableManager implements
public CdtVarPathEntryVariableManager(){
- fListeners = Collections.synchronizedSet(new HashSet());
+ fListeners = Collections.synchronizedSet(new HashSet());
fUserVarSupplier.addListener(this);
}
@@ -151,12 +151,12 @@ public class CdtVarPathEntryVariableManager implements
public String[] getVariableNames() {
ICdtVariable[] vars = fUserVarSupplier.getMacros(ICoreVariableContextInfo.CONTEXT_WORKSPACE, null);
- ArrayList list = new ArrayList();
+ ArrayList list = new ArrayList();
for(int i = 0; i > vars.length; i++){
if(getVariablePath(vars[i]) != null)
list.add(vars[i].getName());
}
- return (String[])list.toArray(new String[list.size()]);
+ return list.toArray(new String[list.size()]);
}
public boolean isDefined(String name) {
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/PositionTrackerChain.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/PositionTrackerChain.java
index 193384e3bcd..654fcff0d43 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/PositionTrackerChain.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/PositionTrackerChain.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
+ * Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -8,7 +8,6 @@
* Contributors:
* Markus Schorn - initial API and implementation
*******************************************************************************/
-
package org.eclipse.cdt.internal.core;
import java.util.Iterator;
@@ -27,7 +26,7 @@ class PositionTrackerChain implements IDocumentListener {
private static final int MAX_DEPTH = 100; // 100 saves
private static final long MAX_AGE = 24 * 60 * 60 * 1000; // one day
- private LinkedList fTrackers= new LinkedList();
+ private LinkedList fTrackers= new LinkedList();
private PositionTracker fActiveTracker;
private IDocument fDocument;
@@ -43,7 +42,7 @@ class PositionTrackerChain implements IDocumentListener {
fActiveTracker= null;
}
else {
- fActiveTracker= (PositionTracker) fTrackers.getLast();
+ fActiveTracker= fTrackers.getLast();
fActiveTracker.revive();
}
}
@@ -67,8 +66,8 @@ class PositionTrackerChain implements IDocumentListener {
fTrackers.removeFirst();
}
long minTimeStamp= fActiveTracker.getTimeStamp() - MAX_AGE;
- for (Iterator iter = fTrackers.iterator(); iter.hasNext();) {
- PositionTracker tracker= (PositionTracker) iter.next();
+ for (Iterator iter = fTrackers.iterator(); iter.hasNext();) {
+ PositionTracker tracker= iter.next();
if (tracker.getRetiredTimeStamp() >= minTimeStamp) {
break;
}
@@ -100,8 +99,8 @@ class PositionTrackerChain implements IDocumentListener {
*/
public PositionTracker findTrackerAtOrAfter(long timestamp) {
PositionTracker candidate= null;
- for (ListIterator iter = fTrackers.listIterator(fTrackers.size()); iter.hasPrevious();) {
- PositionTracker tracker = (PositionTracker) iter.previous();
+ for (ListIterator iter = fTrackers.listIterator(fTrackers.size()); iter.hasPrevious();) {
+ PositionTracker tracker = iter.previous();
long trackerTimestamp= tracker.getTimeStamp();
if (trackerTimestamp >= timestamp) {
candidate= tracker;
@@ -119,8 +118,8 @@ class PositionTrackerChain implements IDocumentListener {
* @return the tracker at the timestamp, null
if none created at the given time.
*/
public PositionTracker findTrackerAt(long timestamp) {
- for (ListIterator iter = fTrackers.listIterator(fTrackers.size()); iter.hasPrevious();) {
- PositionTracker tracker = (PositionTracker) iter.previous();
+ for (ListIterator iter = fTrackers.listIterator(fTrackers.size()); iter.hasPrevious();) {
+ PositionTracker tracker = iter.previous();
long trackerTimestamp= tracker.getTimeStamp();
if (trackerTimestamp == timestamp) {
return tracker;
@@ -178,8 +177,7 @@ class PositionTrackerChain implements IDocumentListener {
public int getMemorySize() {
int size= MEMORY_SIZE;
- for (Iterator iter = fTrackers.iterator(); iter.hasNext();) {
- PositionTracker tracker = (PositionTracker) iter.next();
+ for (PositionTracker tracker : fTrackers) {
size+= LINKED_LIST_ENTRY_SIZE;
size+= tracker.getMemorySize();
}
@@ -189,7 +187,7 @@ class PositionTrackerChain implements IDocumentListener {
public int removeOldest() {
int memdiff= 0;
if (fTrackers.size() > 1) {
- PositionTracker tracker= (PositionTracker) fTrackers.removeFirst();
+ PositionTracker tracker= fTrackers.removeFirst();
memdiff= tracker.getMemorySize() + LINKED_LIST_ENTRY_SIZE;
tracker.clear();
}
@@ -198,7 +196,7 @@ class PositionTrackerChain implements IDocumentListener {
public long getOldestRetirement() {
if (fTrackers.size() > 1) {
- PositionTracker tracker= (PositionTracker) fTrackers.getFirst();
+ PositionTracker tracker= fTrackers.getFirst();
return tracker.getRetiredTimeStamp();
}
return Long.MAX_VALUE;
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/PositionTrackerManager.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/PositionTrackerManager.java
index 7adf0b156dd..18bb0745ab2 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/PositionTrackerManager.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/PositionTrackerManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006 Wind River Systems, Inc. and others.
+ * Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -8,7 +8,6 @@
* Contributors:
* Markus Schorn - initial API and implementation
*******************************************************************************/
-
package org.eclipse.cdt.internal.core;
import java.util.HashMap;
@@ -41,10 +40,10 @@ public class PositionTrackerManager implements IPositionTrackerManager, IFileBuf
private int fMemoryCounter= 0;
private int fInstalled= 0;
- private HashMap fPositionTrackerMap;
+ private HashMap fPositionTrackerMap;
private PositionTrackerManager() {
- fPositionTrackerMap= new HashMap();
+ fPositionTrackerMap= new HashMap();
}
public synchronized void install() {
@@ -112,7 +111,7 @@ public class PositionTrackerManager implements IPositionTrackerManager, IFileBuf
}
private synchronized PositionTrackerChain getChain(ITextFileBuffer buffer) {
- return (PositionTrackerChain) fPositionTrackerMap.get(buffer.getLocation());
+ return fPositionTrackerMap.get(buffer.getLocation());
}
private synchronized void resetToLastCheckpoint(ITextFileBuffer buffer) {
@@ -130,22 +129,21 @@ public class PositionTrackerManager implements IPositionTrackerManager, IFileBuf
private synchronized void runCleanup() {
fMemoryCounter= 0;
- for (Iterator iter = fPositionTrackerMap.values().iterator(); iter.hasNext();) {
- PositionTrackerChain chain= (PositionTrackerChain) iter.next();
+ for (PositionTrackerChain chain : fPositionTrackerMap.values()) {
fMemoryCounter+= HASHMAP_ENTRY_SIZE;
fMemoryCounter+= chain.getMemorySize();
}
if (fMemoryCounter > MAX_MEMORY_AFTER_CLEANUP) {
- SortedMap map= new TreeMap();
- for (Iterator iter = fPositionTrackerMap.values().iterator(); iter.hasNext();) {
- PositionTrackerChain chain = (PositionTrackerChain) iter.next();
+ SortedMap> map= new TreeMap>();
+ for (Iterator iter = fPositionTrackerMap.values().iterator(); iter.hasNext();) {
+ PositionTrackerChain chain = iter.next();
addChain(map, chain);
}
while (!map.isEmpty()) {
- Long key= (Long) map.firstKey();
- List list= (List) map.remove(key);
- for (Iterator iter = list.iterator(); iter.hasNext();) {
- PositionTrackerChain chain = (PositionTrackerChain) iter.next();
+ Long key= map.firstKey();
+ List list= map.remove(key);
+ for (Iterator iter = list.iterator(); iter.hasNext();) {
+ PositionTrackerChain chain = iter.next();
fMemoryCounter+= chain.removeOldest();
addChain(map, chain);
}
@@ -156,13 +154,13 @@ public class PositionTrackerManager implements IPositionTrackerManager, IFileBuf
}
}
- private synchronized void addChain(SortedMap map, PositionTrackerChain chain) {
+ private synchronized void addChain(SortedMap> map, PositionTrackerChain chain) {
long or= chain.getOldestRetirement();
if (or != Long.MAX_VALUE) {
Long lor= new Long(or);
- List list= (List) map.get(lor);
+ List list= map.get(lor);
if (list == null) {
- list= new LinkedList();
+ list= new LinkedList();
map.put(lor, list);
}
list.add(chain);
@@ -173,7 +171,7 @@ public class PositionTrackerManager implements IPositionTrackerManager, IFileBuf
* {@inheritDoc}
*/
public synchronized IPositionConverter findPositionConverter(IFile file, long timestamp) {
- PositionTrackerChain chain= (PositionTrackerChain) fPositionTrackerMap.get(file.getFullPath());
+ PositionTrackerChain chain= fPositionTrackerMap.get(file.getFullPath());
if (chain != null) {
return chain.findTrackerAt(timestamp);
}
@@ -184,7 +182,7 @@ public class PositionTrackerManager implements IPositionTrackerManager, IFileBuf
* {@inheritDoc}
*/
public synchronized IPositionConverter findPositionConverter(IPath externalLocation, long timestamp) {
- PositionTrackerChain chain= (PositionTrackerChain) fPositionTrackerMap.get(externalLocation);
+ PositionTrackerChain chain= fPositionTrackerMap.get(externalLocation);
if (chain != null) {
return chain.findTrackerAt(timestamp);
}
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/cdtvariables/CoreVariableSubstitutor.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/cdtvariables/CoreVariableSubstitutor.java
index 8b8f2af48ef..bc647889e14 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/cdtvariables/CoreVariableSubstitutor.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/cdtvariables/CoreVariableSubstitutor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2007 Intel Corporation and others.
+ * Copyright (c) 2005, 2008 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -17,7 +17,7 @@ import org.eclipse.cdt.utils.cdtvariables.IVariableContextInfo;
import org.eclipse.cdt.utils.cdtvariables.SupplierBasedCdtVariableSubstitutor;
/**
- * This substitutor resolves all macro references
+ * This substituter resolves all macro references
*
* @see org.eclipse.cdt.utils.cdtvariables.IVariableSubstitutor
* @since 3.0
@@ -27,7 +27,7 @@ public class CoreVariableSubstitutor extends SupplierBasedCdtVariableSubstitutor
public CoreVariableSubstitutor(IVariableContextInfo contextInfo,
String inexistentMacroValue, String listDelimiter,
- Map delimiterMap, String incorrectlyReferencedMacroValue) {
+ Map, ?> delimiterMap, String incorrectlyReferencedMacroValue) {
super(contextInfo, inexistentMacroValue, listDelimiter, delimiterMap,
incorrectlyReferencedMacroValue);
// TODO Auto-generated constructor stub
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/cdtvariables/EnvironmentVariableSupplier.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/cdtvariables/EnvironmentVariableSupplier.java
index 63d79781bb6..c01ce8ae877 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/cdtvariables/EnvironmentVariableSupplier.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/cdtvariables/EnvironmentVariableSupplier.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2007 Intel Corporation and others.
+ * Copyright (c) 2005, 2008 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -45,8 +45,8 @@ public class EnvironmentVariableSupplier extends CoreMacroSupplierBase {
if(delimiter != null && !"".equals(delimiter)){ //$NON-NLS-1$
fType = VALUE_TEXT_LIST;
if(value != null){
- List list = EnvVarOperationProcessor.convertToList(value,delimiter);
- fStringListValue = (String[])list.toArray(new String[list.size()]);
+ List list = EnvVarOperationProcessor.convertToList(value,delimiter);
+ fStringListValue = list.toArray(new String[list.size()]);
} else {
fStringListValue = null;
}
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/cdtvariables/StorableCdtVariable.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/cdtvariables/StorableCdtVariable.java
index 75bd0f30694..98bdc841ed6 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/cdtvariables/StorableCdtVariable.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/cdtvariables/StorableCdtVariable.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2007 Intel Corporation and others.
+ * Copyright (c) 2005, 2008 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -64,14 +64,14 @@ public class StorableCdtVariable extends CdtVariable {
fStringValue = element.getAttribute(VALUE);
else {
ICStorageElement nodeList[] = element.getChildren();
- List values = new ArrayList();
+ List values = new ArrayList();
for (int i = 0; i < nodeList.length; ++i) {
ICStorageElement node = nodeList[i];
if (node.getName().equals(VALUE_ELEMENT_NAME)) {
values.add(node.getAttribute(VALUE_ELEMENT_VALUE));
}
}
- fStringListValue = (String[])values.toArray(new String[values.size()]);
+ fStringListValue = values.toArray(new String[values.size()]);
}
}
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/envvar/EclipseEnvironmentSupplier.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/envvar/EclipseEnvironmentSupplier.java
index bc048e86521..357aa83e05c 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/envvar/EclipseEnvironmentSupplier.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/envvar/EclipseEnvironmentSupplier.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2007 Intel Corporation and others.
+ * Copyright (c) 2005, 2008 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -48,7 +48,7 @@ public class EclipseEnvironmentSupplier implements ICoreEnvironmentVariableSuppl
return null;
IEnvironmentVariable variables[] = new IEnvironmentVariable[values.size()];
- Enumeration en = values.propertyNames();
+ Enumeration> en = values.propertyNames();
for( int i = 0; i < variables.length ; i++){
String name = (String)en.nextElement();
String value = values.getProperty(name);
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/envvar/EnvVarCollector.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/envvar/EnvVarCollector.java
index c265e3f8877..9538ddbcdff 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/envvar/EnvVarCollector.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/envvar/EnvVarCollector.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2007 Intel Corporation and others.
+ * Copyright (c) 2005, 2008 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -29,7 +29,7 @@ import org.eclipse.cdt.utils.envvar.EnvVarOperationProcessor;
*
*/
public class EnvVarCollector {
- private Map fMap = null;
+ private Map fMap = null;
public EnvVarCollector(){
}
@@ -57,11 +57,11 @@ public class EnvVarCollector {
if(fMap == null){
noCheck = true;
- fMap = new HashMap();
+ fMap = new HashMap();
}
EnvVarDescriptor des = null;
- if(noCheck || (des = (EnvVarDescriptor)fMap.get(name)) == null){
+ if(noCheck || (des = fMap.get(name)) == null){
des = new EnvVarDescriptor(var,info,num, supplier);
fMap.put(name,des);
}
@@ -82,16 +82,16 @@ public class EnvVarCollector {
public EnvVarDescriptor[] toArray(boolean includeRemoved){
if(fMap == null)
return new EnvVarDescriptor[0];
- Collection values = fMap.values();
- List list = new ArrayList();
- Iterator iter = values.iterator();
+ Collection values = fMap.values();
+ List list = new ArrayList();
+ Iterator iter = values.iterator();
while(iter.hasNext()){
- EnvVarDescriptor des = (EnvVarDescriptor)iter.next();
+ EnvVarDescriptor des = iter.next();
if(des != null &&
(includeRemoved || des.getOperation() != IEnvironmentVariable.ENVVAR_REMOVE))
list.add(des);
}
- return (EnvVarDescriptor[])list.toArray(new EnvVarDescriptor[list.size()]);
+ return list.toArray(new EnvVarDescriptor[list.size()]);
}
/**
@@ -107,7 +107,7 @@ public class EnvVarCollector {
if(!EnvironmentVariableManager.getDefault().isVariableCaseSensitive())
name = name.toUpperCase();
- return (EnvVarDescriptor)fMap.get(name);
+ return fMap.get(name);
}
/**
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/NM.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/NM.java
index cc4a4ba5336..210959bec73 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/NM.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/NM.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2005 QNX Software Systems and others.
+ * Copyright (c) 2000, 2008 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -46,10 +46,10 @@ public class NM {
private static Pattern undef_pattern = null;
private static Pattern normal_pattern = null;
- private List undef_symbols;
- private List text_symbols;
- private List bss_symbols;
- private List data_symbols;
+ private List undef_symbols;
+ private List text_symbols;
+ private List bss_symbols;
+ private List data_symbols;
private void parseOutput(InputStream stream) throws IOException {
@@ -135,29 +135,29 @@ public class NM {
System.arraycopy(params, 0, args, 1, params.length);
}
- undef_symbols = new ArrayList();
- text_symbols = new ArrayList();
- data_symbols = new ArrayList();
- bss_symbols = new ArrayList();
+ undef_symbols = new ArrayList();
+ text_symbols = new ArrayList();
+ data_symbols = new ArrayList();
+ bss_symbols = new ArrayList();
Process process = ProcessFactory.getFactory().exec(args);
parseOutput(process.getInputStream());
process.destroy();
}
public String[] getUndefSymbols() {
- return (String[]) undef_symbols.toArray(new String[0]);
+ return undef_symbols.toArray(new String[0]);
}
public AddressNamePair[] getTextSymbols() {
- return (AddressNamePair[]) text_symbols.toArray(new AddressNamePair[0]);
+ return text_symbols.toArray(new AddressNamePair[0]);
}
public AddressNamePair[] getDataSymbols() {
- return (AddressNamePair[]) data_symbols.toArray(new AddressNamePair[0]);
+ return data_symbols.toArray(new AddressNamePair[0]);
}
public AddressNamePair[] getBSSSymbols() {
- return (AddressNamePair[]) bss_symbols.toArray(new AddressNamePair[0]);
+ return bss_symbols.toArray(new AddressNamePair[0]);
}
}
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/Objdump.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/Objdump.java
index 10a0698303d..df22d447fd5 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/Objdump.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/Objdump.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
+ * Copyright (c) 2000, 2008 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -31,7 +31,7 @@ public class Objdump {
params = new String[0];
} else {
// FIXME: This is wrong we have to check for quoted strings.
- List list = new ArrayList();
+ List list = new ArrayList();
StringTokenizer st = new StringTokenizer(param);
while (st.hasMoreTokens()) {
list.add(st.nextToken());
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/cdtvariables/SupplierBasedCdtVariableManager.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/cdtvariables/SupplierBasedCdtVariableManager.java
index eb0bacc8357..3d099c50fb5 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/cdtvariables/SupplierBasedCdtVariableManager.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/cdtvariables/SupplierBasedCdtVariableManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007 Intel Corporation and others.
+ * Copyright (c) 2007, 2008 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -43,7 +43,7 @@ public class SupplierBasedCdtVariableManager {
if(contextInfo == null)
return new ICdtVariable[0];
- Map map = new HashMap();
+ Map map = new HashMap();
IVariableContextInfo infos[] = includeParentContexts ?
getAllVariableContextInfos(contextInfo) :
new IVariableContextInfo[]{contextInfo};
@@ -63,8 +63,8 @@ public class SupplierBasedCdtVariableManager {
}
}
- Collection values = map.values();
- return (ICdtVariable[])values.toArray(new ICdtVariable[values.size()]);
+ Collection values = map.values();
+ return values.toArray(new ICdtVariable[values.size()]);
}
/*
@@ -75,14 +75,14 @@ public class SupplierBasedCdtVariableManager {
if(contextInfo == null)
return null;
- List list = new ArrayList();
+ List list = new ArrayList();
list.add(contextInfo);
while((contextInfo = contextInfo.getNext()) != null)
list.add(contextInfo);
- return (IVariableContextInfo[])list.toArray(new IVariableContextInfo[list.size()]);
+ return list.toArray(new IVariableContextInfo[list.size()]);
}
/*
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/CodeViewReader.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/CodeViewReader.java
index e495ae647f6..9c2ce9aad84 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/CodeViewReader.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/CodeViewReader.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006 Nokia and others.
+ * Copyright (c) 2006, 2008 Nokia and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -19,19 +19,19 @@ import org.eclipse.cdt.core.ISymbolReader;
public class CodeViewReader implements ISymbolReader {
- RandomAccessFile file;
- int cvData;
- boolean isLe;
- List fileList;
- String[] files = null;
- boolean parsed = false;
+ private RandomAccessFile file;
+ private int cvData;
+ private boolean isLe;
+ private List fileList;
+ private String[] files = null;
+ private boolean parsed = false;
public CodeViewReader(RandomAccessFile accessFile, int dataOffset, boolean littleEndian) {
file = accessFile;
cvData = dataOffset;
isLe = littleEndian;
- fileList = new ArrayList();
+ fileList = new ArrayList();
}
public String[] getSourceFiles() {
@@ -45,7 +45,7 @@ public class CodeViewReader implements ISymbolReader {
files = new String[fileList.size()];
for (int i = 0; i < fileList.size(); i++) {
- files[i] = (String)fileList.get(i);
+ files[i] = fileList.get(i);
}
}
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/Coff.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/Coff.java
index 3c5df5fdf77..18e0e5dcb5a 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/Coff.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/Coff.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
+ * Copyright (c) 2000, 2008 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -565,7 +565,7 @@ public class Coff {
}
public static String[] getStringTable(byte[] bytes) {
- List aList = new ArrayList();
+ List aList = new ArrayList();
int offset = 0;
for (int i = 0; i < bytes.length; i++) {
if (bytes[i] == 0) {
@@ -573,7 +573,7 @@ public class Coff {
offset = i + 1;
}
}
- return (String[])aList.toArray(new String[0]);
+ return aList.toArray(new String[0]);
}
public Coff(String filename) throws IOException {
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/parser/CygwinPEBinaryArchive.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/parser/CygwinPEBinaryArchive.java
index ff8785bd3b7..e2f06c1698d 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/parser/CygwinPEBinaryArchive.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/parser/CygwinPEBinaryArchive.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2006 QNX Software Systems and others.
+ * Copyright (c) 2004, 2008 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -35,7 +35,7 @@ public class CygwinPEBinaryArchive extends PEBinaryArchive {
* java.util.ArrayList)
*/
@Override
- protected void addArchiveMembers(ARHeader[] headers, ArrayList children2) {
+ protected void addArchiveMembers(ARHeader[] headers, ArrayList children2) {
for (int i = 0; i < headers.length; i++) {
IBinaryObject bin = new CygwinPEBinaryObject(getBinaryParser(), getPath(), headers[i]);
children.add(bin);
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/parser/CygwinPEBinaryObject.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/parser/CygwinPEBinaryObject.java
index 224b357678c..0b11e3c7a3f 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/parser/CygwinPEBinaryObject.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/parser/CygwinPEBinaryObject.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
+ * Copyright (c) 2000, 2008 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -28,10 +28,10 @@ import org.eclipse.cdt.utils.CygPath;
import org.eclipse.cdt.utils.ICygwinToolsFactroy;
import org.eclipse.cdt.utils.NM;
import org.eclipse.cdt.utils.Objdump;
+import org.eclipse.cdt.utils.Symbol;
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;
@@ -179,7 +179,7 @@ public class CygwinPEBinaryObject extends PEBinaryObject {
symbolLoadingCygPath = getCygPath();
- ArrayList list = new ArrayList();
+ ArrayList list = new ArrayList();
super.loadSymbols(pe, list);
// Add any global symbols
@@ -198,7 +198,7 @@ public class CygwinPEBinaryObject extends PEBinaryObject {
// for (int i = 0; i < pairs.length; ++i) {
// addSymbol(pairs[i], list, ISymbol.FUNCTION);
// }
- symbols = (ISymbol[]) list.toArray(NO_SYMBOLS);
+ symbols = list.toArray(NO_SYMBOLS);
Arrays.sort(symbols);
list.clear();
@@ -216,7 +216,7 @@ public class CygwinPEBinaryObject extends PEBinaryObject {
}
}
- private void addSymbol(NM.AddressNamePair p, List list, int type) {
+ private void addSymbol(NM.AddressNamePair p, List list, int type) {
String name = p.name;
if (name != null && name.length() > 0 && CConventions.isValidIdentifier(name)) {
IAddress addr = new Addr32(p.address);
@@ -266,8 +266,8 @@ public class CygwinPEBinaryObject extends PEBinaryObject {
* byte[], java.util.List)
*/
@Override
- protected void addSymbols(Coff.Symbol[] peSyms, byte[] table, List list) {
- for (Symbol peSym : peSyms) {
+ protected void addSymbols(Coff.Symbol[] peSyms, byte[] table, List list) {
+ for (Coff.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))) {
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/parser/PEBinaryArchive.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/parser/PEBinaryArchive.java
index 5ce4eaae913..45ba995912e 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/parser/PEBinaryArchive.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/parser/PEBinaryArchive.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
+ * Copyright (c) 2000, 2008 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -26,12 +26,12 @@ import org.eclipse.core.runtime.IPath;
*/
public class PEBinaryArchive extends BinaryFile implements IBinaryArchive {
- ArrayList children;
+ ArrayList children;
public PEBinaryArchive(PEParser parser, IPath path) throws IOException {
super(parser, path, IBinaryFile.ARCHIVE);
new AR(path.toOSString()).dispose(); // check file type
- children = new ArrayList(5);
+ children = new ArrayList(5);
}
/**
@@ -53,14 +53,14 @@ public class PEBinaryArchive extends BinaryFile implements IBinaryArchive {
}
children.trimToSize();
}
- return (IBinaryObject[]) children.toArray(new IBinaryObject[0]);
+ return children.toArray(new IBinaryObject[0]);
}
/**
* @param headers
* @param children2
*/
- protected void addArchiveMembers(ARHeader[] headers, ArrayList children2) {
+ protected void addArchiveMembers(ARHeader[] headers, ArrayList children2) {
for (int i = 0; i < headers.length; i++) {
IBinaryObject bin = new PEBinaryObject(getBinaryParser(), getPath(), headers[i]);
children.add(bin);
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/parser/PEBinaryObject.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/parser/PEBinaryObject.java
index 2f74c510dff..e6ab8743406 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/parser/PEBinaryObject.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/parser/PEBinaryObject.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
+ * Copyright (c) 2000, 2008 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -102,6 +102,7 @@ public class PEBinaryObject extends BinaryObjectAdapter {
return info;
}
+ @SuppressWarnings("unchecked")
@Override
public Object getAdapter(Class adapter) {
if (adapter.equals(PE.class)) {
@@ -163,19 +164,19 @@ public class PEBinaryObject extends BinaryObjectAdapter {
}
protected void loadSymbols(PE pe) throws IOException {
- ArrayList list = new ArrayList();
+ ArrayList list = new ArrayList();
loadSymbols(pe, list);
- symbols = (ISymbol[]) list.toArray(NO_SYMBOLS);
+ symbols = list.toArray(NO_SYMBOLS);
Arrays.sort(symbols);
list.clear();
}
- protected void loadSymbols(PE pe, List list) throws IOException {
+ protected void loadSymbols(PE pe, List list) throws IOException {
Coff.Symbol[] peSyms = pe.getSymbols();
byte[] table = pe.getStringTable();
addSymbols(peSyms, table, list);
}
- protected void addSymbols(Coff.Symbol[] peSyms, byte[] table, List list) {
+ 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);
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/dwarf/DwarfReader.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/dwarf/DwarfReader.java
index ad4bcc5a7ae..b366855eaf4 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/dwarf/DwarfReader.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/dwarf/DwarfReader.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007 Nokia and others.
+ * Copyright (c) 2007, 2008 Nokia and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -18,7 +18,6 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
-import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.ISymbolReader;
import org.eclipse.cdt.utils.debug.IDebugEntryRequestor;
import org.eclipse.cdt.utils.elf.Elf;
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/tools/DebugDump.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/tools/DebugDump.java
index 7f462f562ee..7eea4df5c6a 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/tools/DebugDump.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/tools/DebugDump.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
+ * Copyright (c) 2000, 2008 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -15,8 +15,6 @@ import java.io.BufferedWriter;
import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
-import java.util.ArrayList;
-import java.util.List;
import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.utils.debug.DebugBaseType;
@@ -34,7 +32,6 @@ import org.eclipse.cdt.utils.elf.Elf;
*/
public class DebugDump implements IDebugEntryRequestor {
- List list = new ArrayList();
BufferedWriter bwriter;
int bracket;
int paramCount = -1;
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/tools/DebugSym.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/tools/DebugSym.java
index 27b32f377c6..71055866ed4 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/tools/DebugSym.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/tools/DebugSym.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
+ * Copyright (c) 2000, 2008 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -12,7 +12,7 @@
package org.eclipse.cdt.utils.debug.tools;
-public class DebugSym implements Comparable {
+public class DebugSym implements Comparable