mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Fixes warnings.
This commit is contained in:
parent
9c3fe10028
commit
5f96c8b22e
12 changed files with 33 additions and 29 deletions
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2000, 2005 QNX Software Systems and others.
|
||||
* Copyright (c) 2000, 2007 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
|
||||
|
@ -7,6 +7,7 @@
|
|||
*
|
||||
* Contributors:
|
||||
* QNX Software Systems - Initial API and implementation
|
||||
* Markus Schorn (Wind River Systems)
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.model;
|
||||
|
||||
|
@ -227,16 +228,19 @@ public interface ICElement extends IAdaptable {
|
|||
|
||||
/**
|
||||
* Modifier indicating a class constructor
|
||||
* @deprecated use {@link IMethodDeclaration#isConstructor()}
|
||||
*/
|
||||
static final int C_CLASS_CTOR = 0x100;
|
||||
|
||||
/**
|
||||
* Modifier indicating a class destructor
|
||||
* @deprecated use {@link IMethodDeclaration#isDestructor()}
|
||||
*/
|
||||
static final int C_CLASS_DTOR = 0x200;
|
||||
|
||||
/**
|
||||
* Modifier indicating a static storage attribute
|
||||
* @deprecated use {@link IDeclaration#isStatic()}
|
||||
*/
|
||||
static final int C_STORAGE_STATIC = 0x400;
|
||||
|
||||
|
@ -247,21 +251,24 @@ public interface ICElement extends IAdaptable {
|
|||
|
||||
/**
|
||||
* Modifier indicating a private class
|
||||
* @deprecated use {@link IMember#getVisibility()}
|
||||
*/
|
||||
static final int CPP_PRIVATE = 0x1000;
|
||||
|
||||
/**
|
||||
* Modifier indicating a public class
|
||||
* @deprecated use {@link IMember#getVisibility()}
|
||||
*/
|
||||
|
||||
static final int CPP_PUBLIC = 0x2000;
|
||||
|
||||
/**
|
||||
* Modifier indicating a protected class
|
||||
* @deprecated use {@link IMember#getVisibility()}
|
||||
*/
|
||||
static final int CPP_PROTECTED = 0x4000;
|
||||
/**
|
||||
* Modifier indicating a friend class
|
||||
* @deprecated use {@link IMethodDeclaration#isFriend()}
|
||||
*/
|
||||
static final int CPP_FRIEND = 0x8000;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2000, 2006 IBM Corporation and others.
|
||||
* Copyright (c) 2000, 2007 IBM 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
|
||||
|
@ -942,7 +942,7 @@ private static int scanArrayTypeSignature(char[] string, int start) {
|
|||
throw new IllegalArgumentException();
|
||||
}
|
||||
char c = string[start];
|
||||
if (c != C_ARRAY) { //$NON-NLS-1$
|
||||
if (c != C_ARRAY) {
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
return scanTypeSignature(string, start + 1);
|
||||
|
@ -1691,7 +1691,7 @@ private static int appendArrayTypeSignature(char[] string, int start, boolean fu
|
|||
throw new IllegalArgumentException();
|
||||
}
|
||||
char c = string[start];
|
||||
if (c != C_ARRAY) { //$NON-NLS-1$
|
||||
if (c != C_ARRAY) {
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
int e = appendTypeSignature(string, start + 1, fullyQualifyTypeNames, buffer);
|
||||
|
|
|
@ -296,7 +296,7 @@ public class Binary extends Openable implements IBinary {
|
|||
File file = new File(filename);
|
||||
if (file.exists()) {
|
||||
filename = file.getCanonicalPath();
|
||||
} else if (filename.startsWith(".")) {
|
||||
} else if (filename.startsWith(".")) { //$NON-NLS-1$
|
||||
file = new File(obj.getPath().removeLastSegments(1).toOSString(), filename);
|
||||
filename = file.getCanonicalPath();
|
||||
}
|
||||
|
@ -346,7 +346,7 @@ public class Binary extends Openable implements IBinary {
|
|||
}
|
||||
|
||||
private void addFunction(OpenableInfo info, ISymbol symbol, Map hash) throws CModelException {
|
||||
IPath filename = filename = symbol.getFilename();
|
||||
IPath filename= symbol.getFilename();
|
||||
BinaryFunction function = null;
|
||||
|
||||
if (filename != null && !filename.isEmpty()) {
|
||||
|
@ -376,7 +376,7 @@ public class Binary extends Openable implements IBinary {
|
|||
}
|
||||
|
||||
private void addVariable(OpenableInfo info, ISymbol symbol, Map hash) throws CModelException {
|
||||
IPath filename = filename = symbol.getFilename();
|
||||
IPath filename= symbol.getFilename();
|
||||
BinaryVariable variable = null;
|
||||
if (filename != null && !filename.isEmpty()) {
|
||||
BinaryModule module = null;
|
||||
|
|
|
@ -83,7 +83,7 @@ public class BinaryRunner {
|
|||
|
||||
public void start() {
|
||||
String taskName = CCorePlugin.getResourceString("CoreModel.BinaryRunner.Binary_Search_Thread"); //$NON-NLS-1$
|
||||
taskName += " (" + cproject.getElementName() + ")";
|
||||
taskName += " (" + cproject.getElementName() + ")"; //$NON-NLS-1$//$NON-NLS-2$
|
||||
runner = new Job(taskName) {
|
||||
|
||||
/*
|
||||
|
|
|
@ -27,7 +27,7 @@ import org.eclipse.core.resources.IResource;
|
|||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.ISafeRunnable;
|
||||
import org.eclipse.core.runtime.Platform;
|
||||
import org.eclipse.core.runtime.SafeRunner;
|
||||
|
||||
/**
|
||||
* @see IBuffer
|
||||
|
@ -226,7 +226,7 @@ public class Buffer implements IBuffer {
|
|||
if (this.changeListeners != null) {
|
||||
for (int i = 0, size = this.changeListeners.size(); i < size; ++i) {
|
||||
final IBufferChangedListener listener = (IBufferChangedListener) this.changeListeners.get(i);
|
||||
Platform.run(new ISafeRunnable() {
|
||||
SafeRunner.run(new ISafeRunnable() {
|
||||
public void handleException(Throwable exception) {
|
||||
Util.log(exception, "Exception occurred in listener of buffer change notification", ICLogConstants.CDT); //$NON-NLS-1$
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2001, 2006 IBM Corporation and others.
|
||||
* Copyright (c) 2001, 2007 IBM 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
|
||||
|
@ -105,7 +105,7 @@ public class CModelBuilder {
|
|||
{
|
||||
IProject currentProject = null;
|
||||
boolean hasCppNature = true;
|
||||
char[] code = EMPTY_CHAR_ARRAY; //$NON-NLS-1$
|
||||
char[] code = EMPTY_CHAR_ARRAY;
|
||||
|
||||
// get the current project
|
||||
if (translationUnit != null && translationUnit.getCProject() != null) {
|
||||
|
@ -209,7 +209,7 @@ public class CModelBuilder {
|
|||
}
|
||||
Util.debugLog("CModelBuilder: parsing " //$NON-NLS-1$
|
||||
+ translationUnit.getElementName()
|
||||
+ " mode="+ (quickParseMode ? "quick " : "structural ") //$NON-NLS-1$ //$NON-NLS-2$
|
||||
+ " mode="+ (quickParseMode ? "quick " : "structural ") //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
+ " time="+ ( System.currentTimeMillis() - startTime ) + "ms", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
IDebugLogConstants.MODEL, false);
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006 Wind River Systems, Inc. and others.
|
||||
* Copyright (c) 2006, 2007 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
|
||||
|
@ -248,7 +248,7 @@ public class CModelBuilder2 implements IContributedModelBuilder {
|
|||
final IASTTranslationUnit ast= fTranslationUnit.getAST(index, ITranslationUnit.AST_SKIP_ALL_HEADERS);
|
||||
Util.debugLog("CModelBuilder2: parsing " //$NON-NLS-1$
|
||||
+ fTranslationUnit.getElementName()
|
||||
+ " mode="+ (quickParseMode ? "fast " : "full ") //$NON-NLS-1$ //$NON-NLS-2$
|
||||
+ " mode="+ (quickParseMode ? "fast " : "full ") //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
+ " time="+ ( System.currentTimeMillis() - startTime ) + "ms", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
IDebugLogConstants.MODEL, false);
|
||||
|
||||
|
@ -781,7 +781,7 @@ public class CModelBuilder2 implements IContributedModelBuilder {
|
|||
}
|
||||
|
||||
final IASTName astClassName= compositeTypeSpecifier.getName();
|
||||
final String className= ASTStringUtil.getSimpleName(astClassName);;
|
||||
final String className= ASTStringUtil.getSimpleName(astClassName);
|
||||
|
||||
final Structure element;
|
||||
if (!isTemplate) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006 Intel Corporation and others.
|
||||
* Copyright (c) 2006, 2007 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
|
||||
|
@ -117,6 +117,6 @@ public class CShiftData implements ICElementDelta {
|
|||
}
|
||||
|
||||
public String toString() {
|
||||
return ("CShiftData: offset=" + offset + ", size=" + size + ", lines=" + lines);
|
||||
return ("CShiftData: offset=" + offset + ", size=" + size + ", lines=" + lines); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2000, 2005 QNX Software Systems and others.
|
||||
* Copyright (c) 2000, 2007 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
|
||||
|
@ -77,7 +77,7 @@ public class CreateNamespaceOperation extends CreateElementInTUOperation {
|
|||
sb.append("namespace "); //$NON-NLS-1$;
|
||||
sb.append(fNamespace).append(' ').append('{');
|
||||
sb.append(Util.LINE_SEPARATOR);
|
||||
sb.append('}'); //$NON-NLS-1$;
|
||||
sb.append('}'); //;
|
||||
sb.append(Util.LINE_SEPARATOR);
|
||||
return sb.toString();
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2005 QnX Software Systems and others.
|
||||
* Copyright (c) 2005, 2007 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
|
||||
|
@ -87,7 +87,6 @@ public class PathEntryContainerUpdatesOperation extends CModelOperation {
|
|||
if (list.size() > 0) {
|
||||
final ICElementDelta[] deltas = new ICElementDelta[list.size()];
|
||||
list.toArray(deltas);
|
||||
CModelManager manager = CModelManager.getDefault();
|
||||
for (int i = 0; i < deltas.length; i++) {
|
||||
addDelta(deltas[i]);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2000, 2006 QNX Software Systems and others.
|
||||
* Copyright (c) 2000, 2007 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
|
||||
|
@ -409,7 +409,7 @@ public class PathEntryUtil {
|
|||
} else {
|
||||
StringBuffer errMesg = new StringBuffer(
|
||||
CCorePlugin.getResourceString("CoreModel.PathEntry.NestedEntry")); //$NON-NLS-1$
|
||||
return new CModelStatus(ICModelStatusConstants.INVALID_PATHENTRY, errMesg.toString()); //$NON-NLS-1$
|
||||
return new CModelStatus(ICModelStatusConstants.INVALID_PATHENTRY, errMesg.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -439,7 +439,7 @@ public class PathEntryUtil {
|
|||
IPath includePath = include.getFullIncludePath();
|
||||
if (!isValidExternalPath(includePath)) {
|
||||
return new CModelStatus(ICModelStatusConstants.INVALID_PATHENTRY,
|
||||
CoreModelMessages.getFormattedString("PathEntryManager.2", includePath.toOSString())); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
|
||||
CoreModelMessages.getFormattedString("PathEntryManager.2", includePath.toOSString())); //$NON-NLS-1$
|
||||
}
|
||||
if (!isValidBasePath(include.getBasePath())) {
|
||||
return new CModelStatus(ICModelStatusConstants.INVALID_PATHENTRY,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2005 QnX Software Systems and others.
|
||||
* Copyright (c) 2005, 2007 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
|
||||
|
@ -94,8 +94,6 @@ public class SetPathEntryContainerOperation extends CModelOperation {
|
|||
}
|
||||
|
||||
// trigger model refresh
|
||||
|
||||
CModelManager mgr = CModelManager.getDefault();
|
||||
for (int i = 0; i < projectLength; i++) {
|
||||
if (isCanceled()) {
|
||||
return;
|
||||
|
|
Loading…
Add table
Reference in a new issue