1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-04 07:35:24 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2013-02-02 16:57:25 -08:00
parent 3a45fbed95
commit f16d5ea84f
47 changed files with 304 additions and 319 deletions

View file

@ -240,7 +240,8 @@ public class IndexUpdateTests extends IndexTestBase {
for (int i = 0; i < nchars.length; i++) { for (int i = 0; i < nchars.length; i++) {
nchars[i]= names[i].toCharArray(); nchars[i]= names[i].toCharArray();
} }
return fIndex.findBindings(nchars, IndexFilter.ALL_DECLARED, npm())[0]; IIndexBinding[] bindings = fIndex.findBindings(nchars, IndexFilter.ALL_DECLARED, npm());
return bindings.length > 0 ? bindings[0] : null;
} }
private String msg() { private String msg() {
@ -256,7 +257,6 @@ public class IndexUpdateTests extends IndexTestBase {
// short globalVar; // short globalVar;
// register int globalVar; // register int globalVar;
public void testGlobalCppVariable() throws Exception { public void testGlobalCppVariable() throws Exception {
setupFile(3, true); setupFile(3, true);
checkCppVariable("globalVar", INT, new String[]{}); checkCppVariable("globalVar", INT, new String[]{});
@ -345,7 +345,6 @@ public class IndexUpdateTests extends IndexTestBase {
// struct my_struct {int fField;}; // struct my_struct {int fField;};
// struct my_struct {short fField;}; // struct my_struct {short fField;};
public void testCField() throws Exception { public void testCField() throws Exception {
setupFile(2, false); setupFile(2, false);
checkVariable("my_struct::fField", INT, new String[]{}); checkVariable("my_struct::fField", INT, new String[]{});
@ -402,7 +401,6 @@ public class IndexUpdateTests extends IndexTestBase {
checkModifier(modifiers, PRIVATE, visibility == ICPPMember.v_private); checkModifier(modifiers, PRIVATE, visibility == ICPPMember.v_private);
} }
// class MyClass {int method(int a, int b);}; // class MyClass {int method(int a, int b);};
// class MyClass {short method(int a, int b);}; // class MyClass {short method(int a, int b);};
@ -422,7 +420,6 @@ public class IndexUpdateTests extends IndexTestBase {
// class MyClass {int method(char a){};}; // class MyClass {int method(char a){};};
// class MyClass {virtual int method(char a) = 0;}; // class MyClass {virtual int method(char a) = 0;};
public void testCppMethod() throws Exception { public void testCppMethod() throws Exception {
setupFile(10, true); setupFile(10, true);
checkCppMethod("MyClass::method", new String[] {INT, INT, INT}, new String[]{PRIVATE}); checkCppMethod("MyClass::method", new String[] {INT, INT, INT}, new String[]{PRIVATE});
@ -453,7 +450,6 @@ public class IndexUpdateTests extends IndexTestBase {
// #include "header.h" // #include "header.h"
// char MyClass::method(int a, int b); // char MyClass::method(int a, int b);
public void testFixedCppMethod() throws Exception { public void testFixedCppMethod() throws Exception {
setupHeader(3, true); setupHeader(3, true);
checkCppMethod("MyClass::method", new String[] {INT, INT, INT}, new String[]{PROTECTED}); checkCppMethod("MyClass::method", new String[] {INT, INT, INT}, new String[]{PROTECTED});
@ -493,7 +489,6 @@ public class IndexUpdateTests extends IndexTestBase {
// class MyClass {protected: MyClass(char a, int b);}; // class MyClass {protected: MyClass(char a, int b);};
// class MyClass {private: MyClass(char a, int b);}; // class MyClass {private: MyClass(char a, int b);};
public void testCppConstructor() throws Exception { public void testCppConstructor() throws Exception {
setupFile(6, true); setupFile(6, true);
checkCppConstructor("MyClass::MyClass", new String[] {"", INT, INT}, new String[]{PRIVATE}); checkCppConstructor("MyClass::MyClass", new String[] {"", INT, INT}, new String[]{PRIVATE});
@ -587,7 +582,8 @@ public class IndexUpdateTests extends IndexTestBase {
} }
checkCppConstructor((ICPPConstructor) ctors[0], new String[]{"", constRefType}, m2); checkCppConstructor((ICPPConstructor) ctors[0], new String[]{"", constRefType}, m2);
IIndexBinding[] assignmentOps= fIndex.findBindings(new char[][]{nchars, "operator =".toCharArray()}, IndexFilter.ALL_DECLARED_OR_IMPLICIT, npm()); IIndexBinding[] assignmentOps= fIndex.findBindings(
new char[][] {nchars, "operator =".toCharArray() }, IndexFilter.ALL_DECLARED_OR_IMPLICIT, npm());
count= 0; count= 0;
for (int i = 0; i < assignmentOps.length; i++) { for (int i = 0; i < assignmentOps.length; i++) {
IIndexBinding assignmentOp= assignmentOps[i]; IIndexBinding assignmentOp= assignmentOps[i];
@ -717,7 +713,6 @@ public class IndexUpdateTests extends IndexTestBase {
} }
} }
// class myType { // class myType {
// int a; // int a;
// }; // };
@ -1183,7 +1178,6 @@ public class IndexUpdateTests extends IndexTestBase {
} }
} }
// void funcTypeDeletion(int); // void funcTypeDeletion(int);
// #include "header.h" // #include "header.h"

View file

@ -24,7 +24,6 @@ import org.eclipse.core.runtime.CoreException;
/** /**
* @author Doug Schaefer * @author Doug Schaefer
*
*/ */
public abstract class PDOMNamedNode extends PDOMNode { public abstract class PDOMNamedNode extends PDOMNode {
/** /**
@ -104,7 +103,6 @@ public abstract class PDOMNamedNode extends PDOMNode {
fName= nameCharArray; fName= nameCharArray;
} }
@Override @Override
public void delete(PDOMLinkage linkage) throws CoreException { public void delete(PDOMLinkage linkage) throws CoreException {
final Database db = getDB(); final Database db = getDB();

View file

@ -75,7 +75,6 @@ import org.eclipse.cdt.internal.ui.search.actions.OpenDeclarationsAction;
* @author dsteffle * @author dsteffle
*/ */
public class CPPSelectionTestsNoIndexer extends BaseUITestCase { public class CPPSelectionTestsNoIndexer extends BaseUITestCase {
private static final String INDEX_FILE_ID = "2946365241"; //$NON-NLS-1$ private static final String INDEX_FILE_ID = "2946365241"; //$NON-NLS-1$
static NullProgressMonitor monitor; static NullProgressMonitor monitor;
static IWorkspace workspace; static IWorkspace workspace;

View file

@ -12,7 +12,6 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.internal.ui.text; package org.eclipse.cdt.internal.ui.text;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;

View file

@ -10,7 +10,6 @@
# Anton Leherbauer (Wind River Systems) # Anton Leherbauer (Wind River Systems)
# Sergey Prigogin (Google) # Sergey Prigogin (Google)
############################################################################### ###############################################################################
AbstractAnnotationHover_action_configureAnnotationPreferences= Configure Annotation Preferences AbstractAnnotationHover_action_configureAnnotationPreferences= Configure Annotation Preferences
AbstractAnnotationHover_message_singleQuickFix= 1 quick fix available: AbstractAnnotationHover_message_singleQuickFix= 1 quick fix available:
AbstractAnnotationHover_message_multipleQuickFix= {0} quick fixes available: AbstractAnnotationHover_message_multipleQuickFix= {0} quick fixes available:

View file

@ -46,5 +46,4 @@ public class AnnotationHover implements IAnnotationHover {
} }
return null; return null;
} }
} }

View file

@ -25,7 +25,6 @@ import org.eclipse.cdt.core.parser.OffsetLimitReachedException;
* TODO move into an internal package * TODO move into an internal package
*/ */
public class CPreprocessorAdapter { public class CPreprocessorAdapter {
/** /**
* During content assist the preprocessor may return a completion token * During content assist the preprocessor may return a completion token
* which represents the identifier on which the user invoked content assist. * which represents the identifier on which the user invoked content assist.

View file

@ -31,7 +31,6 @@ import org.eclipse.cdt.internal.core.dom.lrparser.gcc.GCCParser;
* @author Mike Kucera * @author Mike Kucera
*/ */
public class GCCLanguage extends BaseExtensibleLanguage { public class GCCLanguage extends BaseExtensibleLanguage {
public static final String ID = "org.eclipse.cdt.core.lrparser.gcc"; //$NON-NLS-1$ public static final String ID = "org.eclipse.cdt.core.lrparser.gcc"; //$NON-NLS-1$
private static GCCLanguage DEFAULT = new GCCLanguage(); private static GCCLanguage DEFAULT = new GCCLanguage();

View file

@ -18,7 +18,6 @@ public class CPPRules {
static Map fRules = new HashMap(); static Map fRules = new HashMap();
static { static {
fRules.put(Integer.valueOf(3), "] ::= RightBracket"); fRules.put(Integer.valueOf(3), "] ::= RightBracket");
fRules.put(Integer.valueOf(4), "] ::= EndOfCompletion"); fRules.put(Integer.valueOf(4), "] ::= EndOfCompletion");
fRules.put(Integer.valueOf(5), ") ::= RightParen"); fRules.put(Integer.valueOf(5), ") ::= RightParen");