mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
SelectionTests: remove unused code.
This commit is contained in:
parent
c27fde83cb
commit
b941080310
1 changed files with 0 additions and 24 deletions
|
@ -42,8 +42,6 @@ import org.eclipse.ui.part.FileEditorInput;
|
||||||
import org.eclipse.ui.texteditor.AbstractTextEditor;
|
import org.eclipse.ui.texteditor.AbstractTextEditor;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.CCorePlugin;
|
import org.eclipse.cdt.core.CCorePlugin;
|
||||||
import org.eclipse.cdt.core.ICDescriptor;
|
|
||||||
import org.eclipse.cdt.core.ICDescriptorOperation;
|
|
||||||
import org.eclipse.cdt.core.dom.ast.IASTName;
|
import org.eclipse.cdt.core.dom.ast.IASTName;
|
||||||
import org.eclipse.cdt.core.dom.ast.IASTNode;
|
import org.eclipse.cdt.core.dom.ast.IASTNode;
|
||||||
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
|
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
|
||||||
|
@ -63,7 +61,6 @@ import org.eclipse.cdt.internal.ui.search.actions.OpenDeclarationsAction;
|
||||||
* @author dsteffle
|
* @author dsteffle
|
||||||
*/
|
*/
|
||||||
public class BaseSelectionTestsIndexer extends BaseUITestCase {
|
public class BaseSelectionTestsIndexer extends BaseUITestCase {
|
||||||
protected boolean fileIndexed;
|
|
||||||
protected IProject project;
|
protected IProject project;
|
||||||
static FileManager fileManager = new FileManager();
|
static FileManager fileManager = new FileManager();
|
||||||
IProgressMonitor monitor = new NullProgressMonitor();
|
IProgressMonitor monitor = new NullProgressMonitor();
|
||||||
|
@ -90,8 +87,6 @@ public class BaseSelectionTestsIndexer extends BaseUITestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected IFile importFile(String fileName, String contents ) throws Exception{
|
protected IFile importFile(String fileName, String contents ) throws Exception{
|
||||||
resetIndexState();
|
|
||||||
|
|
||||||
//Obtain file handle
|
//Obtain file handle
|
||||||
IFile file = project.getProject().getFile(fileName);
|
IFile file = project.getProject().getFile(fileName);
|
||||||
|
|
||||||
|
@ -169,10 +164,6 @@ public class BaseSelectionTestsIndexer extends BaseUITestCase {
|
||||||
return folder;
|
return folder;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void resetIndexState() {
|
|
||||||
fileIndexed = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected IASTNode testF3(IFile file, int offset) throws ParserException, CoreException {
|
protected IASTNode testF3(IFile file, int offset) throws ParserException, CoreException {
|
||||||
return testF3(file, offset, 0);
|
return testF3(file, offset, 0);
|
||||||
}
|
}
|
||||||
|
@ -300,19 +291,4 @@ public class BaseSelectionTestsIndexer extends BaseUITestCase {
|
||||||
assertEquals(numOccurrences, occurs);
|
assertEquals(numOccurrences, occurs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void resetIndexer(final String indexerId){
|
|
||||||
if ( project != null) {
|
|
||||||
ICDescriptorOperation op = new ICDescriptorOperation() {
|
|
||||||
|
|
||||||
public void execute(ICDescriptor descriptor, IProgressMonitor monitor) throws CoreException {
|
|
||||||
descriptor.remove(CCorePlugin.INDEXER_UNIQ_ID);
|
|
||||||
descriptor.create(CCorePlugin.INDEXER_UNIQ_ID,indexerId);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
try {
|
|
||||||
CCorePlugin.getDefault().getCDescriptorManager().runDescriptorOperation(project, op, new NullProgressMonitor());
|
|
||||||
} catch (CoreException e) {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue