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

Removing of annoying warnings about never used local variables.

This commit is contained in:
Alain Magloire 2004-05-02 03:03:43 +00:00
parent 412410a881
commit 59a22fcbb8
9 changed files with 5 additions and 19 deletions

View file

@ -67,7 +67,6 @@ public class CContainerInfo extends OpenableInfo {
IPathEntry[] entries = cproject.getResolvedPathEntries();
if (resources != null) {
ICElement[] children = getChildren();
for (int i = 0; i < resources.length; i++) {
IResource member = resources[i];
switch(member.getType()) {

View file

@ -201,8 +201,6 @@ public class CModel extends Openable implements ICModel {
}
protected boolean computeChildren(OpenableInfo info, IResource res) throws CModelException {
CModelManager factory = CModelManager.getDefault();
// determine my children
IWorkspaceRoot root = (IWorkspaceRoot)getResource();
IProject[] projects = root.getProjects();

View file

@ -27,7 +27,6 @@ public class CModelInfo extends OpenableInfo {
* Compute the non-C resources contained in this C project.
*/
private Object[] computeNonCResources() {
CModelManager mgr = CModelManager.getDefault();
IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
int length = projects.length;
Object[] nonCProjects = null;

View file

@ -406,9 +406,9 @@ public class CModelManager implements IResourceChangeListener, ICDescriptorListe
IIncludeReference[] includeReferences = cproject.getIncludeReferences();
for (int i = 0; i < includeReferences.length; i++) {
IPath includePath = includeReferences[i].getPath().append(path);
File file = path.toFile();
File file = includePath.toFile();
if (file != null && file.isFile()) {
return new ExternalTranslationUnit(includeReferences[i], path);
return new ExternalTranslationUnit(includeReferences[i], includePath);
}
}
} catch (CModelException e) {

View file

@ -70,7 +70,6 @@ class CProjectInfo extends OpenableInfo {
return nonCResources;
// determine if src == project
ISourceRoot root = null;
boolean srcIsProject = false;
IPathEntry[] entries = null;
ICProject cproject = getElement().getCProject();

View file

@ -345,7 +345,6 @@ public class PathEntryStore extends AbstractCExtension implements IPathEntryStor
if (event.getType() == CDescriptorEvent.CDTPROJECT_CHANGED) {
ICDescriptor cdesc = event.getDescriptor();
if (cdesc != null) {
CModelManager manager = CModelManager.getDefault();
IProject project = cdesc.getProject();
// Call the listeners.
fireContentChangedEvent(project);

View file

@ -22,9 +22,6 @@ import org.eclipse.cdt.core.parser.ScannerInfo;
import org.eclipse.cdt.internal.core.CharOperation;
import org.eclipse.cdt.internal.core.Util;
import org.eclipse.cdt.internal.core.model.CModelStatus;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
/**
@ -37,7 +34,7 @@ import org.eclipse.core.runtime.Status;
public class CConventions {
private final static String scopeResolutionOperator= "::"; //$NON-NLS-1$
private final static char fgDot= '.';
private final static char fgColon= ':';
//private final static char fgColon= ':';
private static boolean isLegalIdentifier(String name) {
if (name == null) {
@ -146,7 +143,6 @@ public class CConventions {
return new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, -1, Util.bind("convention.scope.nameWithBlanks"), null); //$NON-NLS-1$
}
IWorkspace workspace = ResourcesPlugin.getWorkspace();
StringTokenizer st = new StringTokenizer(name, scopeResolutionOperator);
boolean firstToken = true;
while (st.hasMoreTokens()) {

View file

@ -634,7 +634,6 @@ public class CCorePlugin extends Plugin {
ICDescriptor cdesc = getCProjectDescription(project);
ICExtensionReference[] cextensions = cdesc.get(PATHENTRY_STORE_UNIQ_ID, true);
if (cextensions.length > 0) {
ArrayList list = new ArrayList(cextensions.length);
for (int i = 0; i < cextensions.length; i++) {
try {
store = (IPathEntryStore) cextensions[i].createExtension();
@ -929,7 +928,8 @@ public class CCorePlugin extends Plugin {
private static final String PARSER = CCorePlugin.PLUGIN_ID + "/debug/parser" ; //$NON-NLS-1$
private static final String SCANNER = CCorePlugin.PLUGIN_ID + "/debug/scanner"; //$NON-NLS-1$
private static final String DELTA = CCorePlugin.PLUGIN_ID + "/debug/deltaprocessor" ; //$NON-NLS-1$
private static final String CONTENTASSIST = CCorePlugin.PLUGIN_ID + "/debug/contentassist" ; //$NON-NLS-1$
//private static final String CONTENTASSIST = CCorePlugin.PLUGIN_ID + "/debug/contentassist" ; //$NON-NLS-1$
/**
* Configure the plugin with respect to option settings defined in ".options" file
*/

View file

@ -13,7 +13,6 @@ package org.eclipse.cdt.core.resources;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.ListIterator;
import java.util.Map;
import org.eclipse.cdt.core.AbstractCExtension;
@ -61,7 +60,6 @@ public class ScannerProvider extends AbstractCExtension implements IScannerInfoP
if (listeners == null) {
return;
}
ListIterator iter = listeners.listIterator();
IScannerInfoChangeListener[] observers = new IScannerInfoChangeListener[listeners.size()];
listeners.toArray(observers);
for (int i = 0; i < observers.length; i++) {
@ -210,8 +208,6 @@ public class ScannerProvider extends AbstractCExtension implements IScannerInfoP
* Processes a delta recursively.
*/
protected void processDelta(ICElementDelta delta) throws CModelException {
int kind= delta.getKind();
int flags= delta.getFlags();
ICElement element= delta.getElement();
if (isPathEntryChange(delta)) {