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:
parent
412410a881
commit
59a22fcbb8
9 changed files with 5 additions and 19 deletions
|
@ -67,7 +67,6 @@ public class CContainerInfo extends OpenableInfo {
|
||||||
|
|
||||||
IPathEntry[] entries = cproject.getResolvedPathEntries();
|
IPathEntry[] entries = cproject.getResolvedPathEntries();
|
||||||
if (resources != null) {
|
if (resources != null) {
|
||||||
ICElement[] children = getChildren();
|
|
||||||
for (int i = 0; i < resources.length; i++) {
|
for (int i = 0; i < resources.length; i++) {
|
||||||
IResource member = resources[i];
|
IResource member = resources[i];
|
||||||
switch(member.getType()) {
|
switch(member.getType()) {
|
||||||
|
|
|
@ -201,8 +201,6 @@ public class CModel extends Openable implements ICModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean computeChildren(OpenableInfo info, IResource res) throws CModelException {
|
protected boolean computeChildren(OpenableInfo info, IResource res) throws CModelException {
|
||||||
CModelManager factory = CModelManager.getDefault();
|
|
||||||
|
|
||||||
// determine my children
|
// determine my children
|
||||||
IWorkspaceRoot root = (IWorkspaceRoot)getResource();
|
IWorkspaceRoot root = (IWorkspaceRoot)getResource();
|
||||||
IProject[] projects = root.getProjects();
|
IProject[] projects = root.getProjects();
|
||||||
|
|
|
@ -27,7 +27,6 @@ public class CModelInfo extends OpenableInfo {
|
||||||
* Compute the non-C resources contained in this C project.
|
* Compute the non-C resources contained in this C project.
|
||||||
*/
|
*/
|
||||||
private Object[] computeNonCResources() {
|
private Object[] computeNonCResources() {
|
||||||
CModelManager mgr = CModelManager.getDefault();
|
|
||||||
IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
|
IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
|
||||||
int length = projects.length;
|
int length = projects.length;
|
||||||
Object[] nonCProjects = null;
|
Object[] nonCProjects = null;
|
||||||
|
|
|
@ -406,9 +406,9 @@ public class CModelManager implements IResourceChangeListener, ICDescriptorListe
|
||||||
IIncludeReference[] includeReferences = cproject.getIncludeReferences();
|
IIncludeReference[] includeReferences = cproject.getIncludeReferences();
|
||||||
for (int i = 0; i < includeReferences.length; i++) {
|
for (int i = 0; i < includeReferences.length; i++) {
|
||||||
IPath includePath = includeReferences[i].getPath().append(path);
|
IPath includePath = includeReferences[i].getPath().append(path);
|
||||||
File file = path.toFile();
|
File file = includePath.toFile();
|
||||||
if (file != null && file.isFile()) {
|
if (file != null && file.isFile()) {
|
||||||
return new ExternalTranslationUnit(includeReferences[i], path);
|
return new ExternalTranslationUnit(includeReferences[i], includePath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (CModelException e) {
|
} catch (CModelException e) {
|
||||||
|
|
|
@ -70,7 +70,6 @@ class CProjectInfo extends OpenableInfo {
|
||||||
return nonCResources;
|
return nonCResources;
|
||||||
|
|
||||||
// determine if src == project
|
// determine if src == project
|
||||||
ISourceRoot root = null;
|
|
||||||
boolean srcIsProject = false;
|
boolean srcIsProject = false;
|
||||||
IPathEntry[] entries = null;
|
IPathEntry[] entries = null;
|
||||||
ICProject cproject = getElement().getCProject();
|
ICProject cproject = getElement().getCProject();
|
||||||
|
|
|
@ -345,7 +345,6 @@ public class PathEntryStore extends AbstractCExtension implements IPathEntryStor
|
||||||
if (event.getType() == CDescriptorEvent.CDTPROJECT_CHANGED) {
|
if (event.getType() == CDescriptorEvent.CDTPROJECT_CHANGED) {
|
||||||
ICDescriptor cdesc = event.getDescriptor();
|
ICDescriptor cdesc = event.getDescriptor();
|
||||||
if (cdesc != null) {
|
if (cdesc != null) {
|
||||||
CModelManager manager = CModelManager.getDefault();
|
|
||||||
IProject project = cdesc.getProject();
|
IProject project = cdesc.getProject();
|
||||||
// Call the listeners.
|
// Call the listeners.
|
||||||
fireContentChangedEvent(project);
|
fireContentChangedEvent(project);
|
||||||
|
|
|
@ -22,9 +22,6 @@ import org.eclipse.cdt.core.parser.ScannerInfo;
|
||||||
import org.eclipse.cdt.internal.core.CharOperation;
|
import org.eclipse.cdt.internal.core.CharOperation;
|
||||||
import org.eclipse.cdt.internal.core.Util;
|
import org.eclipse.cdt.internal.core.Util;
|
||||||
import org.eclipse.cdt.internal.core.model.CModelStatus;
|
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.IStatus;
|
||||||
import org.eclipse.core.runtime.Status;
|
import org.eclipse.core.runtime.Status;
|
||||||
/**
|
/**
|
||||||
|
@ -37,7 +34,7 @@ import org.eclipse.core.runtime.Status;
|
||||||
public class CConventions {
|
public class CConventions {
|
||||||
private final static String scopeResolutionOperator= "::"; //$NON-NLS-1$
|
private final static String scopeResolutionOperator= "::"; //$NON-NLS-1$
|
||||||
private final static char fgDot= '.';
|
private final static char fgDot= '.';
|
||||||
private final static char fgColon= ':';
|
//private final static char fgColon= ':';
|
||||||
|
|
||||||
private static boolean isLegalIdentifier(String name) {
|
private static boolean isLegalIdentifier(String name) {
|
||||||
if (name == null) {
|
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$
|
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);
|
StringTokenizer st = new StringTokenizer(name, scopeResolutionOperator);
|
||||||
boolean firstToken = true;
|
boolean firstToken = true;
|
||||||
while (st.hasMoreTokens()) {
|
while (st.hasMoreTokens()) {
|
||||||
|
|
|
@ -634,7 +634,6 @@ public class CCorePlugin extends Plugin {
|
||||||
ICDescriptor cdesc = getCProjectDescription(project);
|
ICDescriptor cdesc = getCProjectDescription(project);
|
||||||
ICExtensionReference[] cextensions = cdesc.get(PATHENTRY_STORE_UNIQ_ID, true);
|
ICExtensionReference[] cextensions = cdesc.get(PATHENTRY_STORE_UNIQ_ID, true);
|
||||||
if (cextensions.length > 0) {
|
if (cextensions.length > 0) {
|
||||||
ArrayList list = new ArrayList(cextensions.length);
|
|
||||||
for (int i = 0; i < cextensions.length; i++) {
|
for (int i = 0; i < cextensions.length; i++) {
|
||||||
try {
|
try {
|
||||||
store = (IPathEntryStore) cextensions[i].createExtension();
|
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 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 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 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
|
* Configure the plugin with respect to option settings defined in ".options" file
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -13,7 +13,6 @@ package org.eclipse.cdt.core.resources;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.ListIterator;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.AbstractCExtension;
|
import org.eclipse.cdt.core.AbstractCExtension;
|
||||||
|
@ -61,7 +60,6 @@ public class ScannerProvider extends AbstractCExtension implements IScannerInfoP
|
||||||
if (listeners == null) {
|
if (listeners == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ListIterator iter = listeners.listIterator();
|
|
||||||
IScannerInfoChangeListener[] observers = new IScannerInfoChangeListener[listeners.size()];
|
IScannerInfoChangeListener[] observers = new IScannerInfoChangeListener[listeners.size()];
|
||||||
listeners.toArray(observers);
|
listeners.toArray(observers);
|
||||||
for (int i = 0; i < observers.length; i++) {
|
for (int i = 0; i < observers.length; i++) {
|
||||||
|
@ -210,8 +208,6 @@ public class ScannerProvider extends AbstractCExtension implements IScannerInfoP
|
||||||
* Processes a delta recursively.
|
* Processes a delta recursively.
|
||||||
*/
|
*/
|
||||||
protected void processDelta(ICElementDelta delta) throws CModelException {
|
protected void processDelta(ICElementDelta delta) throws CModelException {
|
||||||
int kind= delta.getKind();
|
|
||||||
int flags= delta.getFlags();
|
|
||||||
ICElement element= delta.getElement();
|
ICElement element= delta.getElement();
|
||||||
|
|
||||||
if (isPathEntryChange(delta)) {
|
if (isPathEntryChange(delta)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue