mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-05 08:46:02 +02:00
Refactor core.tests/suite/org.eclipse.cdt.testplugin and
ui.tests/src/org.eclipse.cdt.testplugin packages to org.eclipse.cdt.core.testplugin and org.eclipse.cdt.ui.testplugin respectively. This fixes a problem where the tests were incorrectly loading the wrong test plugin class.
This commit is contained in:
parent
a6a5451a0c
commit
b2ff153008
61 changed files with 169 additions and 172 deletions
|
@ -18,7 +18,7 @@ import junit.framework.TestCase;
|
|||
import junit.framework.TestSuite;
|
||||
|
||||
import org.eclipse.cdt.core.model.ICProject;
|
||||
import org.eclipse.cdt.testplugin.CProjectHelper;
|
||||
import org.eclipse.cdt.core.testplugin.CProjectHelper;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||
|
|
|
@ -28,6 +28,8 @@ import org.eclipse.cdt.core.search.ICSearchResultCollector;
|
|||
import org.eclipse.cdt.core.search.ICSearchScope;
|
||||
import org.eclipse.cdt.core.search.IMatch;
|
||||
import org.eclipse.cdt.core.search.SearchEngine;
|
||||
import org.eclipse.cdt.core.testplugin.CProjectHelper;
|
||||
import org.eclipse.cdt.core.testplugin.CTestPlugin;
|
||||
import org.eclipse.cdt.internal.core.index.impl.IFileDocument;
|
||||
import org.eclipse.cdt.internal.core.search.PathCollector;
|
||||
import org.eclipse.cdt.internal.core.search.PatternSearchJob;
|
||||
|
@ -36,8 +38,6 @@ import org.eclipse.cdt.internal.core.search.matching.CSearchPattern;
|
|||
import org.eclipse.cdt.internal.core.search.processing.IJob;
|
||||
import org.eclipse.cdt.internal.core.sourcedependency.DependencyQueryJob;
|
||||
import org.eclipse.cdt.internal.core.sourcedependency.UpdateDependency;
|
||||
import org.eclipse.cdt.testplugin.CProjectHelper;
|
||||
import org.eclipse.cdt.testplugin.CTestPlugin;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
|
|
|
@ -27,14 +27,14 @@ import org.eclipse.cdt.core.index.IIndexChangeListener;
|
|||
import org.eclipse.cdt.core.index.IIndexDelta;
|
||||
import org.eclipse.cdt.core.index.IndexChangeEvent;
|
||||
import org.eclipse.cdt.core.model.ICProject;
|
||||
import org.eclipse.cdt.core.testplugin.CProjectHelper;
|
||||
import org.eclipse.cdt.core.testplugin.CTestPlugin;
|
||||
import org.eclipse.cdt.internal.core.index.IEntryResult;
|
||||
import org.eclipse.cdt.internal.core.index.IIndex;
|
||||
import org.eclipse.cdt.internal.core.index.IQueryResult;
|
||||
import org.eclipse.cdt.internal.core.index.impl.IFileDocument;
|
||||
import org.eclipse.cdt.internal.core.search.indexing.IIndexConstants;
|
||||
import org.eclipse.cdt.internal.core.search.indexing.IndexManager;
|
||||
import org.eclipse.cdt.testplugin.CProjectHelper;
|
||||
import org.eclipse.cdt.testplugin.CTestPlugin;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
|
|
|
@ -21,7 +21,7 @@ import org.eclipse.cdt.core.ICDescriptor;
|
|||
import org.eclipse.cdt.core.ICDescriptorListener;
|
||||
import org.eclipse.cdt.core.ICExtensionReference;
|
||||
import org.eclipse.cdt.core.ICOwnerInfo;
|
||||
import org.eclipse.cdt.testplugin.CTestPlugin;
|
||||
import org.eclipse.cdt.core.testplugin.CTestPlugin;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IProjectDescription;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
|
|
|
@ -33,7 +33,7 @@ import org.eclipse.cdt.core.internal.filetype.CFileType;
|
|||
import org.eclipse.cdt.core.internal.filetype.CFileTypeAssociation;
|
||||
import org.eclipse.cdt.core.internal.filetype.CLanguage;
|
||||
import org.eclipse.cdt.core.internal.filetype.ResolverModel;
|
||||
import org.eclipse.cdt.testplugin.CTestPlugin;
|
||||
import org.eclipse.cdt.core.testplugin.CTestPlugin;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IProjectDescription;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
|
|
|
@ -16,9 +16,9 @@ import org.eclipse.cdt.core.model.IArchive;
|
|||
import org.eclipse.cdt.core.model.IBinary;
|
||||
import org.eclipse.cdt.core.model.ICElement;
|
||||
import org.eclipse.cdt.core.model.ICProject;
|
||||
import org.eclipse.cdt.testplugin.CProjectHelper;
|
||||
import org.eclipse.cdt.testplugin.CTestPlugin;
|
||||
import org.eclipse.cdt.testplugin.util.ExpectedStrings;
|
||||
import org.eclipse.cdt.core.testplugin.CProjectHelper;
|
||||
import org.eclipse.cdt.core.testplugin.CTestPlugin;
|
||||
import org.eclipse.cdt.core.testplugin.util.ExpectedStrings;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IWorkspace;
|
||||
import org.eclipse.core.resources.IWorkspaceRoot;
|
||||
|
|
|
@ -19,9 +19,9 @@ import org.eclipse.cdt.core.model.CModelException;
|
|||
import org.eclipse.cdt.core.model.IBinary;
|
||||
import org.eclipse.cdt.core.model.ICElement;
|
||||
import org.eclipse.cdt.core.model.ICProject;
|
||||
import org.eclipse.cdt.testplugin.CProjectHelper;
|
||||
import org.eclipse.cdt.testplugin.CTestPlugin;
|
||||
import org.eclipse.cdt.testplugin.util.ExpectedStrings;
|
||||
import org.eclipse.cdt.core.testplugin.CProjectHelper;
|
||||
import org.eclipse.cdt.core.testplugin.CTestPlugin;
|
||||
import org.eclipse.cdt.core.testplugin.util.ExpectedStrings;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IWorkspace;
|
||||
import org.eclipse.core.resources.IWorkspaceRoot;
|
||||
|
|
|
@ -41,11 +41,11 @@ import org.eclipse.cdt.core.model.ITypeDef;
|
|||
import org.eclipse.cdt.core.model.IVariable;
|
||||
import org.eclipse.cdt.core.model.IVariableDeclaration;
|
||||
import org.eclipse.cdt.core.parser.ast.ASTAccessVisibility;
|
||||
import org.eclipse.cdt.core.testplugin.CProjectHelper;
|
||||
import org.eclipse.cdt.core.testplugin.CTestPlugin;
|
||||
import org.eclipse.cdt.internal.core.model.FunctionTemplate;
|
||||
import org.eclipse.cdt.internal.core.model.MethodTemplate;
|
||||
import org.eclipse.cdt.internal.core.model.StructureTemplate;
|
||||
import org.eclipse.cdt.testplugin.CProjectHelper;
|
||||
import org.eclipse.cdt.testplugin.CTestPlugin;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||
|
|
|
@ -15,8 +15,8 @@ import junit.framework.TestSuite;
|
|||
import org.eclipse.cdt.core.CCProjectNature;
|
||||
import org.eclipse.cdt.core.model.CoreModel;
|
||||
import org.eclipse.cdt.core.model.ICProject;
|
||||
import org.eclipse.cdt.testplugin.CProjectHelper;
|
||||
import org.eclipse.cdt.testplugin.CTestPlugin;
|
||||
import org.eclipse.cdt.core.testplugin.CProjectHelper;
|
||||
import org.eclipse.cdt.core.testplugin.CTestPlugin;
|
||||
import org.eclipse.core.internal.resources.ResourceException;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
|
|
|
@ -21,7 +21,7 @@ import org.eclipse.cdt.core.model.IPathEntry;
|
|||
import org.eclipse.cdt.core.model.ICProject;
|
||||
import org.eclipse.cdt.core.model.IElementChangedListener;
|
||||
import org.eclipse.cdt.core.model.IPathEntryContainer;
|
||||
import org.eclipse.cdt.testplugin.CProjectHelper;
|
||||
import org.eclipse.cdt.core.testplugin.CProjectHelper;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IWorkspace;
|
||||
import org.eclipse.core.resources.IWorkspaceDescription;
|
||||
|
|
|
@ -31,10 +31,10 @@ import org.eclipse.cdt.core.model.ICProject;
|
|||
import org.eclipse.cdt.core.model.IElementChangedListener;
|
||||
import org.eclipse.cdt.core.model.ITranslationUnit;
|
||||
import org.eclipse.cdt.core.model.IWorkingCopy;
|
||||
import org.eclipse.cdt.core.testplugin.CProjectHelper;
|
||||
import org.eclipse.cdt.core.testplugin.CTestPlugin;
|
||||
import org.eclipse.cdt.core.testplugin.TestPluginLauncher;
|
||||
import org.eclipse.cdt.internal.core.model.CModelManager;
|
||||
import org.eclipse.cdt.testplugin.CProjectHelper;
|
||||
import org.eclipse.cdt.testplugin.CTestPlugin;
|
||||
import org.eclipse.cdt.testplugin.TestPluginLauncher;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||
|
|
|
@ -13,8 +13,8 @@ import org.eclipse.cdt.core.CCorePlugin;
|
|||
import org.eclipse.cdt.core.model.CoreModel;
|
||||
import org.eclipse.cdt.core.model.ICProject;
|
||||
import org.eclipse.cdt.core.model.ITranslationUnit;
|
||||
import org.eclipse.cdt.testplugin.CProjectHelper;
|
||||
import org.eclipse.cdt.testplugin.CTestPlugin;
|
||||
import org.eclipse.cdt.core.testplugin.CProjectHelper;
|
||||
import org.eclipse.cdt.core.testplugin.CTestPlugin;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||
|
|
|
@ -42,11 +42,11 @@ import org.eclipse.cdt.core.model.ITypeDef;
|
|||
import org.eclipse.cdt.core.model.IVariable;
|
||||
import org.eclipse.cdt.core.model.IVariableDeclaration;
|
||||
import org.eclipse.cdt.core.parser.ast.ASTAccessVisibility;
|
||||
import org.eclipse.cdt.core.testplugin.CProjectHelper;
|
||||
import org.eclipse.cdt.core.testplugin.CTestPlugin;
|
||||
import org.eclipse.cdt.internal.core.model.FunctionTemplate;
|
||||
import org.eclipse.cdt.internal.core.model.MethodTemplate;
|
||||
import org.eclipse.cdt.internal.core.model.StructureTemplate;
|
||||
import org.eclipse.cdt.testplugin.CProjectHelper;
|
||||
import org.eclipse.cdt.testplugin.CTestPlugin;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||
|
|
|
@ -15,8 +15,8 @@ import java.io.FileInputStream;
|
|||
import junit.framework.TestCase;
|
||||
|
||||
import org.eclipse.cdt.core.model.ICProject;
|
||||
import org.eclipse.cdt.testplugin.CProjectHelper;
|
||||
import org.eclipse.cdt.testplugin.CTestPlugin;
|
||||
import org.eclipse.cdt.core.testplugin.CProjectHelper;
|
||||
import org.eclipse.cdt.core.testplugin.CTestPlugin;
|
||||
import org.eclipse.core.internal.resources.ResourceException;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IWorkspace;
|
||||
|
|
|
@ -15,8 +15,8 @@ import org.eclipse.cdt.core.model.CModelException;
|
|||
import org.eclipse.cdt.core.model.ICElement;
|
||||
import org.eclipse.cdt.core.model.IInclude;
|
||||
import org.eclipse.cdt.core.model.ITranslationUnit;
|
||||
import org.eclipse.cdt.testplugin.CProjectHelper;
|
||||
import org.eclipse.cdt.testplugin.util.ExpectedStrings;
|
||||
import org.eclipse.cdt.core.testplugin.CProjectHelper;
|
||||
import org.eclipse.cdt.core.testplugin.util.ExpectedStrings;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
|
||||
|
||||
|
|
|
@ -23,9 +23,9 @@ import org.eclipse.cdt.core.model.IBuffer;
|
|||
import org.eclipse.cdt.core.model.ICProject;
|
||||
import org.eclipse.cdt.core.model.ITranslationUnit;
|
||||
import org.eclipse.cdt.core.model.IWorkingCopy;
|
||||
import org.eclipse.cdt.testplugin.CProjectHelper;
|
||||
import org.eclipse.cdt.testplugin.CTestPlugin;
|
||||
import org.eclipse.cdt.testplugin.TestPluginLauncher;
|
||||
import org.eclipse.cdt.core.testplugin.CProjectHelper;
|
||||
import org.eclipse.cdt.core.testplugin.CTestPlugin;
|
||||
import org.eclipse.cdt.core.testplugin.TestPluginLauncher;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||
|
|
|
@ -73,13 +73,13 @@ import org.eclipse.cdt.core.parser.ast.IASTUsingDeclaration;
|
|||
import org.eclipse.cdt.core.parser.ast.IASTUsingDirective;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTVariable;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTVariableReference;
|
||||
import org.eclipse.cdt.core.testplugin.CProjectHelper;
|
||||
import org.eclipse.cdt.core.testplugin.CTestPlugin;
|
||||
import org.eclipse.cdt.core.testplugin.FileManager;
|
||||
|
||||
import org.eclipse.cdt.internal.core.parser.Parser;
|
||||
import org.eclipse.cdt.internal.core.parser.ParserException;
|
||||
import org.eclipse.cdt.internal.core.search.indexing.IndexManager;
|
||||
import org.eclipse.cdt.testplugin.CProjectHelper;
|
||||
import org.eclipse.cdt.testplugin.CTestPlugin;
|
||||
import org.eclipse.cdt.testplugin.FileManager;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
id="org.eclipse.cdt.core.tests"
|
||||
name="org.eclipse.cdt.core.tests"
|
||||
version="3.0.0"
|
||||
class="org.eclipse.cdt.testplugin.CTestPlugin">
|
||||
class="org.eclipse.cdt.core.testplugin.CTestPlugin">
|
||||
|
||||
<runtime>
|
||||
<library name="cdtcoretests.jar">
|
||||
|
@ -39,7 +39,7 @@
|
|||
name="C/C++ Test Project"
|
||||
point="org.eclipse.cdt.core.CProject">
|
||||
<cproject
|
||||
class="org.eclipse.cdt.testplugin.TestProject">
|
||||
class="org.eclipse.cdt.core.testplugin.TestProject">
|
||||
</cproject>
|
||||
</extension>
|
||||
<extension
|
||||
|
@ -48,7 +48,7 @@
|
|||
point="org.eclipse.cdt.core.ScannerInfoProvider">
|
||||
<cextension>
|
||||
<run
|
||||
class="org.eclipse.cdt.testplugin.TestScannerProvider">
|
||||
class="org.eclipse.cdt.core.testplugin.TestScannerProvider">
|
||||
</run>
|
||||
</cextension>
|
||||
</extension>
|
||||
|
|
|
@ -21,9 +21,9 @@ import junit.framework.TestCase;
|
|||
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.core.model.ICProject;
|
||||
import org.eclipse.cdt.core.testplugin.CProjectHelper;
|
||||
import org.eclipse.cdt.core.testplugin.FileManager;
|
||||
import org.eclipse.cdt.internal.core.search.indexing.IndexManager;
|
||||
import org.eclipse.cdt.testplugin.CProjectHelper;
|
||||
import org.eclipse.cdt.testplugin.FileManager;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
|
|
|
@ -25,10 +25,10 @@ import org.eclipse.cdt.core.search.ICSearchPattern;
|
|||
import org.eclipse.cdt.core.search.ICSearchResultCollector;
|
||||
import org.eclipse.cdt.core.search.ICSearchScope;
|
||||
import org.eclipse.cdt.core.search.SearchEngine;
|
||||
import org.eclipse.cdt.core.testplugin.CProjectHelper;
|
||||
import org.eclipse.cdt.core.testplugin.CTestPlugin;
|
||||
import org.eclipse.cdt.core.testplugin.FileManager;
|
||||
import org.eclipse.cdt.internal.core.search.indexing.IndexManager;
|
||||
import org.eclipse.cdt.testplugin.CProjectHelper;
|
||||
import org.eclipse.cdt.testplugin.CTestPlugin;
|
||||
import org.eclipse.cdt.testplugin.FileManager;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IWorkspace;
|
||||
|
|
|
@ -22,11 +22,11 @@ import org.eclipse.cdt.core.search.ICSearchPattern;
|
|||
import org.eclipse.cdt.core.search.IMatch;
|
||||
import org.eclipse.cdt.core.search.OrPattern;
|
||||
import org.eclipse.cdt.core.search.SearchEngine;
|
||||
import org.eclipse.cdt.core.testplugin.CTestPlugin;
|
||||
import org.eclipse.cdt.internal.core.CharOperation;
|
||||
import org.eclipse.cdt.internal.core.search.matching.FieldDeclarationPattern;
|
||||
import org.eclipse.cdt.internal.core.search.matching.MatchLocator;
|
||||
import org.eclipse.cdt.internal.core.search.matching.NamespaceDeclarationPattern;
|
||||
import org.eclipse.cdt.testplugin.CTestPlugin;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
|
||||
/**
|
||||
|
|
|
@ -23,7 +23,7 @@ import org.eclipse.cdt.core.parser.ParserFactory;
|
|||
import org.eclipse.cdt.core.parser.ParserLanguage;
|
||||
import org.eclipse.cdt.core.parser.ParserMode;
|
||||
import org.eclipse.cdt.core.parser.ScannerInfo;
|
||||
import org.eclipse.cdt.testplugin.CTestPlugin;
|
||||
import org.eclipse.cdt.core.testplugin.CTestPlugin;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
|
||||
/**
|
||||
|
|
|
@ -19,7 +19,7 @@ import java.util.zip.ZipFile;
|
|||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.eclipse.cdt.testplugin.CTestPlugin;
|
||||
import org.eclipse.cdt.core.testplugin.CTestPlugin;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IProjectDescription;
|
||||
import org.eclipse.core.resources.IWorkspace;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* (c) Copyright IBM Corp. 2000, 2001.
|
||||
* All Rights Reserved.
|
||||
*/
|
||||
package org.eclipse.cdt.testplugin;
|
||||
package org.eclipse.cdt.core.testplugin;
|
||||
|
||||
import org.eclipse.swt.graphics.Image;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.eclipse.cdt.testplugin;
|
||||
package org.eclipse.cdt.core.testplugin;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.zip.ZipFile;
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
* (c) Copyright IBM Corp. 2000, 2001.
|
||||
* All Rights Reserved.
|
||||
*/
|
||||
package org.eclipse.cdt.testplugin;
|
||||
package org.eclipse.cdt.core.testplugin;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
|
@ -2,7 +2,7 @@
|
|||
* (c) Copyright IBM Corp. 2000, 2001.
|
||||
* All Rights Reserved.
|
||||
*/
|
||||
package org.eclipse.cdt.testplugin;
|
||||
package org.eclipse.cdt.core.testplugin;
|
||||
|
||||
import junit.extensions.TestSetup;
|
||||
import junit.framework.Test;
|
|
@ -4,7 +4,7 @@
|
|||
* To change the template for this generated file go to
|
||||
* Window>Preferences>Java>Code Generation>Code and Comments
|
||||
*/
|
||||
package org.eclipse.cdt.testplugin;
|
||||
package org.eclipse.cdt.core.testplugin;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
|
@ -1,4 +1,4 @@
|
|||
package org.eclipse.cdt.testplugin;
|
||||
package org.eclipse.cdt.core.testplugin;
|
||||
|
||||
// copied from startup.jar. planned to be removed soon
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
* (c) Copyright IBM Corp. 2000, 2001.
|
||||
* All Rights Reserved.
|
||||
*/
|
||||
package org.eclipse.cdt.testplugin;
|
||||
package org.eclipse.cdt.core.testplugin;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
|
@ -2,7 +2,7 @@
|
|||
* (c) Copyright IBM Corp. 2000, 2001.
|
||||
* All Rights Reserved.
|
||||
*/
|
||||
package org.eclipse.cdt.testplugin;
|
||||
package org.eclipse.cdt.core.testplugin;
|
||||
|
||||
import java.net.URL;
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
* Contributors:
|
||||
* QNX Software Systems - Initial API and implementation
|
||||
***********************************************************************/
|
||||
package org.eclipse.cdt.testplugin;
|
||||
package org.eclipse.cdt.core.testplugin;
|
||||
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.core.ICDescriptor;
|
|
@ -6,7 +6,7 @@
|
|||
* Contributors:
|
||||
* QNX Software Systems - Initial API and implementation
|
||||
***********************************************************************/
|
||||
package org.eclipse.cdt.testplugin;
|
||||
package org.eclipse.cdt.core.testplugin;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
|
@ -6,7 +6,7 @@
|
|||
* Contributors:
|
||||
* QNX Software Systems - Initial API and implementation
|
||||
***********************************************************************/
|
||||
package org.eclipse.cdt.testplugin;
|
||||
package org.eclipse.cdt.core.testplugin;
|
||||
|
||||
import org.eclipse.cdt.core.AbstractCExtension;
|
||||
import org.eclipse.cdt.core.parser.IScannerInfo;
|
|
@ -1,4 +1,4 @@
|
|||
package org.eclipse.cdt.testplugin.util;
|
||||
package org.eclipse.cdt.core.testplugin.util;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
|
@ -1,4 +1,4 @@
|
|||
package org.eclipse.cdt.testplugin.util;
|
||||
package org.eclipse.cdt.core.testplugin.util;
|
||||
|
||||
|
||||
import java.util.Stack;
|
|
@ -1,4 +1,4 @@
|
|||
package org.eclipse.cdt.testplugin.util;
|
||||
package org.eclipse.cdt.core.testplugin.util;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import junit.framework.TestSuite;
|
|
@ -1,4 +1,4 @@
|
|||
package org.eclipse.cdt.testplugin.util;
|
||||
package org.eclipse.cdt.core.testplugin.util;
|
||||
|
||||
|
||||
/*
|
|
@ -1,4 +1,4 @@
|
|||
package org.eclipse.cdt.testplugin.util;
|
||||
package org.eclipse.cdt.core.testplugin.util;
|
||||
|
||||
|
||||
/*
|
|
@ -1,4 +1,4 @@
|
|||
package org.eclipse.cdt.testplugin.util;
|
||||
package org.eclipse.cdt.core.testplugin.util;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
|
@ -1,4 +1,4 @@
|
|||
package org.eclipse.cdt.testplugin.util;
|
||||
package org.eclipse.cdt.core.testplugin.util;
|
||||
|
||||
|
||||
/*
|
|
@ -1,4 +1,4 @@
|
|||
package org.eclipse.cdt.testplugin.util;
|
||||
package org.eclipse.cdt.core.testplugin.util;
|
||||
|
||||
|
||||
import java.util.Iterator;
|
|
@ -4,7 +4,7 @@
|
|||
id="org.eclipse.cdt.ui.tests"
|
||||
name="org.eclipse.cdt.ui.tests"
|
||||
version="3.0.0"
|
||||
class="org.eclipse.cdt.testplugin.CTestPlugin">
|
||||
class="org.eclipse.cdt.ui.testplugin.CTestPlugin">
|
||||
|
||||
<runtime>
|
||||
<library name="cdtuitests.jar">
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* (c) Copyright IBM Corp. 2000, 2001.
|
||||
* All Rights Reserved.
|
||||
*/
|
||||
package org.eclipse.cdt.testplugin;
|
||||
package org.eclipse.cdt.ui.testplugin;
|
||||
|
||||
import org.eclipse.swt.graphics.Image;
|
||||
|
||||
|
@ -25,6 +25,6 @@ public class CElementDecorator extends LabelProvider implements ILabelDecorator
|
|||
* @see ILabelDecorator#decorateText(String, Object)
|
||||
*/
|
||||
public String decorateText(String text, Object element) {
|
||||
return text + "*";
|
||||
return text + "*"; //$NON-NLS-1$
|
||||
}
|
||||
}
|
|
@ -2,7 +2,7 @@
|
|||
* (c) Copyright IBM Corp. 2000, 2001.
|
||||
* All Rights Reserved.
|
||||
*/
|
||||
package org.eclipse.cdt.testplugin;
|
||||
package org.eclipse.cdt.ui.testplugin;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
|
@ -2,7 +2,7 @@
|
|||
* (c) Copyright IBM Corp. 2000, 2001.
|
||||
* All Rights Reserved.
|
||||
*/
|
||||
package org.eclipse.cdt.testplugin;
|
||||
package org.eclipse.cdt.ui.testplugin;
|
||||
|
||||
import junit.extensions.TestSetup;
|
||||
import junit.framework.Test;
|
|
@ -1,4 +1,4 @@
|
|||
package org.eclipse.cdt.testplugin;
|
||||
package org.eclipse.cdt.ui.testplugin;
|
||||
|
||||
// copied from startup.jar. planned to be removed soon
|
||||
|
||||
|
@ -107,24 +107,24 @@ public class Main {
|
|||
private static String endSplash = null;
|
||||
|
||||
// constants
|
||||
private static final String APPLICATION = "-application";
|
||||
private static final String BOOT = "-boot";
|
||||
private static final String DEBUG = "-debug";
|
||||
private static final String DEV = "-dev";
|
||||
private static final String ENDSPLASH = "-endsplash";
|
||||
private static final String UNINSTALL = "-uninstall";
|
||||
private static final String PI_BOOT = "org.eclipse.core.boot";
|
||||
private static final String BOOTLOADER = "org.eclipse.core.boot.BootLoader";
|
||||
private static final String UPDATELOADER = "org.eclipse.core.internal.boot.LaunchInfo";
|
||||
private static final String APPLICATION = "-application"; //$NON-NLS-1$
|
||||
private static final String BOOT = "-boot"; //$NON-NLS-1$
|
||||
private static final String DEBUG = "-debug"; //$NON-NLS-1$
|
||||
private static final String DEV = "-dev"; //$NON-NLS-1$
|
||||
private static final String ENDSPLASH = "-endsplash"; //$NON-NLS-1$
|
||||
private static final String UNINSTALL = "-uninstall"; //$NON-NLS-1$
|
||||
private static final String PI_BOOT = "org.eclipse.core.boot"; //$NON-NLS-1$
|
||||
private static final String BOOTLOADER = "org.eclipse.core.boot.BootLoader"; //$NON-NLS-1$
|
||||
private static final String UPDATELOADER = "org.eclipse.core.internal.boot.LaunchInfo"; //$NON-NLS-1$
|
||||
|
||||
// The project containing the boot loader code. This is used to construct
|
||||
// the correct class path for running in VAJ and VAME.
|
||||
private static final String PROJECT_NAME = "Eclipse Core Boot";
|
||||
private static final String PROJECT_NAME = "Eclipse Core Boot"; //$NON-NLS-1$
|
||||
|
||||
private static boolean inVAJ;
|
||||
static {
|
||||
try {
|
||||
Class.forName("com.ibm.uvm.lang.ProjectClassLoader");
|
||||
Class.forName("com.ibm.uvm.lang.ProjectClassLoader"); //$NON-NLS-1$
|
||||
inVAJ = true;
|
||||
} catch (Exception e) {
|
||||
inVAJ = false;
|
||||
|
@ -133,7 +133,7 @@ public class Main {
|
|||
private static boolean inVAME;
|
||||
static {
|
||||
try {
|
||||
Class.forName("com.ibm.eclipse.core.VAME");
|
||||
Class.forName("com.ibm.eclipse.core.VAME"); //$NON-NLS-1$
|
||||
inVAME = true;
|
||||
} catch (Exception e) {
|
||||
inVAME = false;
|
||||
|
@ -149,14 +149,13 @@ public class Main {
|
|||
*/
|
||||
protected Object basicRun(String[] args) throws Exception {
|
||||
Class clazz = getBootLoader(bootLocation);
|
||||
Method method = clazz.getDeclaredMethod("run", new Class[] { String.class, URL.class, String.class, String[].class });
|
||||
Method method = clazz.getDeclaredMethod("run", new Class[] { String.class, URL.class, String.class, String[].class }); //$NON-NLS-1$
|
||||
try {
|
||||
return method.invoke(clazz, new Object[] { application, pluginPathLocation, location, args });
|
||||
} catch (InvocationTargetException e) {
|
||||
if (e.getTargetException() instanceof Error)
|
||||
throw (Error) e.getTargetException();
|
||||
else
|
||||
throw e;
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -167,13 +166,13 @@ protected Object basicRun(String[] args) throws Exception {
|
|||
* @param prop the initial comma-separated string
|
||||
*/
|
||||
private String[] getArrayFromList(String prop) {
|
||||
if (prop == null || prop.trim().equals(""))
|
||||
if (prop == null || prop.trim().equals("")) //$NON-NLS-1$
|
||||
return new String[0];
|
||||
Vector list = new Vector();
|
||||
StringTokenizer tokens = new StringTokenizer(prop, ",");
|
||||
StringTokenizer tokens = new StringTokenizer(prop, ","); //$NON-NLS-1$
|
||||
while (tokens.hasMoreTokens()) {
|
||||
String token = tokens.nextToken().trim();
|
||||
if (!token.equals(""))
|
||||
if (!token.equals("")) //$NON-NLS-1$
|
||||
list.addElement(token);
|
||||
}
|
||||
return list.isEmpty() ? new String[0] : (String[]) list.toArray(new String[0]);
|
||||
|
@ -203,7 +202,7 @@ protected URL[] getDevPath(URL base) throws MalformedURLException {
|
|||
URL url;
|
||||
String devBase = base.toExternalForm();
|
||||
if (!inDevelopmentMode) {
|
||||
url = new URL(devBase + "boot.jar");
|
||||
url = new URL(devBase + "boot.jar"); //$NON-NLS-1$
|
||||
return new URL[] {url};
|
||||
}
|
||||
String[] locations = getArrayFromList(devClassPath);
|
||||
|
@ -211,15 +210,15 @@ protected URL[] getDevPath(URL base) throws MalformedURLException {
|
|||
for (int i = 0; i < locations.length; i++) {
|
||||
String spec = devBase + locations[i];
|
||||
char lastChar = spec.charAt(spec.length() - 1);
|
||||
if ((spec.endsWith(".jar") || (lastChar == '/' || lastChar == '\\')))
|
||||
if ((spec.endsWith(".jar") || (lastChar == '/' || lastChar == '\\'))) //$NON-NLS-1$
|
||||
url = new URL (spec);
|
||||
else
|
||||
url = new URL(spec + "/");
|
||||
url = new URL(spec + "/"); //$NON-NLS-1$
|
||||
//make sure URL exists before adding to path
|
||||
if (new java.io.File(url.getFile()).exists())
|
||||
result.add(url);
|
||||
}
|
||||
url = new URL(devBase + "boot.jar");
|
||||
url = new URL(devBase + "boot.jar"); //$NON-NLS-1$
|
||||
if (new java.io.File(url.getFile()).exists())
|
||||
result.add(url);
|
||||
return (URL[])result.toArray(new URL[result.size()]);
|
||||
|
@ -238,7 +237,7 @@ protected URL[] getBootPath(String base) throws MalformedURLException {
|
|||
if (base != null) {
|
||||
url = new URL(base);
|
||||
if (debug)
|
||||
System.out.println("Boot URL: " + url.toExternalForm());
|
||||
System.out.println("Boot URL: " + url.toExternalForm()); //$NON-NLS-1$
|
||||
return new URL[] {url};
|
||||
}
|
||||
// Create a URL based on the location of this class' code.
|
||||
|
@ -247,15 +246,15 @@ protected URL[] getBootPath(String base) throws MalformedURLException {
|
|||
URL[] result = null;
|
||||
url = getClass().getProtectionDomain().getCodeSource().getLocation();
|
||||
String path = url.getFile();
|
||||
if (path.endsWith(".jar"))
|
||||
path = path.substring(0, path.lastIndexOf("/"));
|
||||
if (path.endsWith(".jar")) //$NON-NLS-1$
|
||||
path = path.substring(0, path.lastIndexOf("/")); //$NON-NLS-1$
|
||||
else
|
||||
if (path.endsWith("/"))
|
||||
if (path.endsWith("/")) //$NON-NLS-1$
|
||||
path = path.substring(0, path.length() - 1);
|
||||
if (inVAJ || inVAME) {
|
||||
int ix = path.lastIndexOf("/");
|
||||
int ix = path.lastIndexOf("/"); //$NON-NLS-1$
|
||||
path = path.substring(0, ix + 1);
|
||||
path = path + PROJECT_NAME + "/";
|
||||
path = path + PROJECT_NAME + "/"; //$NON-NLS-1$
|
||||
url = new URL(url.getProtocol(), url.getHost(), url.getPort(), path);
|
||||
result = new URL[] {url};
|
||||
} else {
|
||||
|
@ -266,9 +265,9 @@ protected URL[] getBootPath(String base) throws MalformedURLException {
|
|||
result = getDevPath(url);
|
||||
}
|
||||
if (debug) {
|
||||
System.out.println("Boot URL:");
|
||||
System.out.println("Boot URL:"); //$NON-NLS-1$
|
||||
for (int i = 0; i < result.length; i++)
|
||||
System.out.println(" " + result[i].toExternalForm());
|
||||
System.out.println(" " + result[i].toExternalForm()); //$NON-NLS-1$
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -284,13 +283,13 @@ protected URL[] getBootPath(String base) throws MalformedURLException {
|
|||
protected String searchForPlugins(String start) {
|
||||
File path = new File(start);
|
||||
while (path != null) {
|
||||
File test = new File(path, "plugins");
|
||||
File test = new File(path, "plugins"); //$NON-NLS-1$
|
||||
if (test.exists())
|
||||
return test.toString();
|
||||
path = path.getParentFile();
|
||||
path = (path == null || path.length() == 1) ? null : path;
|
||||
}
|
||||
return "";
|
||||
return ""; //$NON-NLS-1$
|
||||
}
|
||||
/**
|
||||
* Searches for a boot directory starting at a given location. If one
|
||||
|
@ -330,8 +329,8 @@ protected String searchForBoot(String start) {
|
|||
}
|
||||
}
|
||||
if (result == null)
|
||||
throw new RuntimeException("Could not find bootstrap code. Check location of boot plug-in or specify -boot.");
|
||||
return result.replace(File.separatorChar, '/') + "/";
|
||||
throw new RuntimeException("Could not find bootstrap code. Check location of boot plug-in or specify -boot."); //$NON-NLS-1$
|
||||
return result.replace(File.separatorChar, '/') + "/"; //$NON-NLS-1$
|
||||
}
|
||||
/**
|
||||
* Returns the update loader for the given boot path.
|
||||
|
@ -366,7 +365,7 @@ public static void main(String[] args) {
|
|||
} catch (Throwable e) {
|
||||
// try and take down the splash screen.
|
||||
endSplash();
|
||||
System.out.println("Exception launching the Eclipse Platform:");
|
||||
System.out.println("Exception launching the Eclipse Platform:"); //$NON-NLS-1$
|
||||
e.printStackTrace();
|
||||
}
|
||||
int exitCode = result instanceof Integer ? ((Integer) result).intValue() : 0;
|
||||
|
@ -392,8 +391,8 @@ public static void endSplash() {
|
|||
*/
|
||||
public static void main(String argString) throws Exception {
|
||||
Vector list = new Vector(5);
|
||||
for (StringTokenizer tokens = new StringTokenizer(argString, " "); tokens.hasMoreElements();)
|
||||
list.addElement((String) tokens.nextElement());
|
||||
for (StringTokenizer tokens = new StringTokenizer(argString, " "); tokens.hasMoreElements();) //$NON-NLS-1$
|
||||
list.addElement(tokens.nextElement());
|
||||
main((String[]) list.toArray(new String[list.size()]));
|
||||
}
|
||||
|
||||
|
@ -421,7 +420,7 @@ protected String[] processCommandLine(String[] args) throws Exception {
|
|||
// If this is the last arg or there is a following arg (i.e., arg+1 has a leading -),
|
||||
// simply enable development mode. Otherwise, assume that that the following arg is
|
||||
// actually some additional development time class path entries. This will be processed below.
|
||||
if (args[i].equalsIgnoreCase(DEV) && ((i + 1 == args.length) || ((i + 1 < args.length) && (args[i + 1].startsWith("-"))))) {
|
||||
if (args[i].equalsIgnoreCase(DEV) && ((i + 1 == args.length) || ((i + 1 < args.length) && (args[i + 1].startsWith("-"))))) { //$NON-NLS-1$
|
||||
inDevelopmentMode = true;
|
||||
// do not mark the arg as found so it will be passed through
|
||||
continue;
|
||||
|
@ -434,7 +433,7 @@ protected String[] processCommandLine(String[] args) throws Exception {
|
|||
}
|
||||
// check for args with parameters. If we are at the last argument or if the next one
|
||||
// has a '-' as the first character, then we can't have an arg with a parm so continue.
|
||||
if (i == args.length - 1 || args[i + 1].startsWith("-"))
|
||||
if (i == args.length - 1 || args[i + 1].startsWith("-")) //$NON-NLS-1$
|
||||
continue;
|
||||
String arg = args[++i];
|
||||
|
||||
|
@ -501,8 +500,7 @@ public Object run(String[] args) throws Exception {
|
|||
String[] passThruArgs = processCommandLine(args);
|
||||
if (uninstall)
|
||||
return updateRun(UNINSTALL, uninstallCookie, passThruArgs);
|
||||
else
|
||||
return basicRun(passThruArgs);
|
||||
return basicRun(passThruArgs);
|
||||
}
|
||||
/**
|
||||
* Performs an update run.
|
||||
|
@ -515,14 +513,13 @@ public Object run(String[] args) throws Exception {
|
|||
*/
|
||||
protected Object updateRun(String flag, String value, String[] args) throws Exception {
|
||||
Class clazz = getUpdateLoader(bootLocation);
|
||||
Method method = clazz.getDeclaredMethod("run", new Class[] { String.class, String.class, String.class, String[].class });
|
||||
Method method = clazz.getDeclaredMethod("run", new Class[] { String.class, String.class, String.class, String[].class }); //$NON-NLS-1$
|
||||
try {
|
||||
return method.invoke(clazz, new Object[] { flag, value, location, args });
|
||||
} catch (InvocationTargetException e) {
|
||||
if (e.getTargetException() instanceof Error)
|
||||
throw (Error) e.getTargetException();
|
||||
else
|
||||
throw e;
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -2,7 +2,7 @@
|
|||
* (c) Copyright IBM Corp. 2000, 2001.
|
||||
* All Rights Reserved.
|
||||
*/
|
||||
package org.eclipse.cdt.testplugin;
|
||||
package org.eclipse.cdt.ui.testplugin;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
|
@ -17,7 +17,7 @@ import java.util.Vector;
|
|||
*/
|
||||
|
||||
public class NewMain extends Main {
|
||||
private static final String DEFAULT_APPLICATION= "org.eclipse.ui.workbench";
|
||||
private static final String DEFAULT_APPLICATION= "org.eclipse.ui.workbench"; //$NON-NLS-1$
|
||||
|
||||
|
||||
public NewMain(String application, String location, URL pluginPathLocation, String bootLocation, boolean debug) throws IOException {
|
||||
|
@ -29,10 +29,10 @@ public class NewMain extends Main {
|
|||
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
String location= getLocationFromProperties("platform");
|
||||
String location= getLocationFromProperties("platform"); //$NON-NLS-1$
|
||||
new NewMain(DEFAULT_APPLICATION, location, null, null, true).run(args);
|
||||
} catch (Throwable e) {
|
||||
System.out.println("Exception launching the Eclipse Platform UI:");
|
||||
System.out.println("Exception launching the Eclipse Platform UI:"); //$NON-NLS-1$
|
||||
e.printStackTrace();
|
||||
}
|
||||
System.exit(0);
|
||||
|
@ -46,8 +46,8 @@ public class NewMain extends Main {
|
|||
*/
|
||||
public static void main(String argString) throws Exception {
|
||||
Vector list= new Vector(5);
|
||||
for (StringTokenizer tokens= new StringTokenizer(argString, " "); tokens.hasMoreElements();)
|
||||
list.addElement((String) tokens.nextElement());
|
||||
for (StringTokenizer tokens= new StringTokenizer(argString, " "); tokens.hasMoreElements();) //$NON-NLS-1$
|
||||
list.addElement(tokens.nextElement());
|
||||
main((String[]) list.toArray(new String[list.size()]));
|
||||
}
|
||||
|
||||
|
@ -63,11 +63,11 @@ public class NewMain extends Main {
|
|||
}
|
||||
|
||||
private static File getSettingsFile() {
|
||||
String home= System.getProperty("user.home");
|
||||
String home= System.getProperty("user.home"); //$NON-NLS-1$
|
||||
if (home == null) {
|
||||
System.out.println("Home dir not defined");
|
||||
System.out.println("Home dir not defined"); //$NON-NLS-1$
|
||||
return null;
|
||||
}
|
||||
return new File(home, "eclipse-workspaces.properties");
|
||||
return new File(home, "eclipse-workspaces.properties"); //$NON-NLS-1$
|
||||
}
|
||||
}
|
|
@ -2,7 +2,7 @@
|
|||
* (c) Copyright IBM Corp. 2000, 2001.
|
||||
* All Rights Reserved.
|
||||
*/
|
||||
package org.eclipse.cdt.testplugin;
|
||||
package org.eclipse.cdt.ui.testplugin;
|
||||
|
||||
import java.net.URL;
|
||||
|
||||
|
@ -11,7 +11,7 @@ import java.net.URL;
|
|||
*/
|
||||
public class TestPluginLauncher {
|
||||
|
||||
public static final String APP_NAME= "org.eclipse.jdt.ui.tests.app";
|
||||
public static final String APP_NAME= "org.eclipse.jdt.ui.tests.app"; //$NON-NLS-1$
|
||||
|
||||
public static void run(String location, Class testCase, String[] args) {
|
||||
run(APP_NAME, location, testCase, args);
|
||||
|
@ -26,9 +26,9 @@ public class TestPluginLauncher {
|
|||
for (int i= 0; i < nArgs; i++) {
|
||||
newArgs[1 + i]= args[i];
|
||||
}
|
||||
newArgs[1 + nArgs]= "-dev";
|
||||
newArgs[1 + nArgs + 1]= "bin";
|
||||
newArgs[1 + nArgs + 2]= "-debug";
|
||||
newArgs[1 + nArgs]= "-dev"; //$NON-NLS-1$
|
||||
newArgs[1 + nArgs + 1]= "bin"; //$NON-NLS-1$
|
||||
newArgs[1 + nArgs + 2]= "-debug"; //$NON-NLS-1$
|
||||
NewMain newMain= new NewMain(application, location, null, bootLocation, false);
|
||||
newMain.run(newArgs);
|
||||
} catch (Exception e) {
|
||||
|
@ -41,17 +41,17 @@ public class TestPluginLauncher {
|
|||
}
|
||||
|
||||
public static String getLocationFromProperties() {
|
||||
return NewMain.getLocationFromProperties("tests");
|
||||
return NewMain.getLocationFromProperties("tests"); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
public static String getBootLocation() {
|
||||
URL url= TestPluginLauncher.class.getResource("TestPluginLauncher.class");
|
||||
URL url= TestPluginLauncher.class.getResource("TestPluginLauncher.class"); //$NON-NLS-1$
|
||||
String s= url.toString();
|
||||
int index= s.indexOf("/org.eclipse.jdt.ui.tests");
|
||||
int index= s.indexOf("/org.eclipse.jdt.ui.tests"); //$NON-NLS-1$
|
||||
if (index == -1)
|
||||
throw new IllegalArgumentException();
|
||||
s= s.substring(0, index);
|
||||
s= s + "/org.eclipse.core.boot/boot.jar";
|
||||
s= s + "/org.eclipse.core.boot/boot.jar"; //$NON-NLS-1$
|
||||
return s;
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package org.eclipse.cdt.testplugin.util;
|
||||
package org.eclipse.cdt.ui.testplugin.util;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
|
@ -1,4 +1,4 @@
|
|||
package org.eclipse.cdt.testplugin.util;
|
||||
package org.eclipse.cdt.ui.testplugin.util;
|
||||
|
||||
|
||||
import java.util.Stack;
|
|
@ -1,4 +1,4 @@
|
|||
package org.eclipse.cdt.testplugin.util;
|
||||
package org.eclipse.cdt.ui.testplugin.util;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import junit.framework.TestSuite;
|
|
@ -1,4 +1,4 @@
|
|||
package org.eclipse.cdt.testplugin.util;
|
||||
package org.eclipse.cdt.ui.testplugin.util;
|
||||
|
||||
|
||||
/*
|
|
@ -1,4 +1,4 @@
|
|||
package org.eclipse.cdt.testplugin.util;
|
||||
package org.eclipse.cdt.ui.testplugin.util;
|
||||
|
||||
|
||||
/*
|
|
@ -1,4 +1,4 @@
|
|||
package org.eclipse.cdt.testplugin.util;
|
||||
package org.eclipse.cdt.ui.testplugin.util;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
|
@ -1,4 +1,4 @@
|
|||
package org.eclipse.cdt.testplugin.util;
|
||||
package org.eclipse.cdt.ui.testplugin.util;
|
||||
|
||||
|
||||
/*
|
|
@ -1,4 +1,4 @@
|
|||
package org.eclipse.cdt.testplugin.util;
|
||||
package org.eclipse.cdt.ui.testplugin.util;
|
||||
|
||||
|
||||
import java.util.Iterator;
|
|
@ -13,8 +13,8 @@ package org.eclipse.cdt.ui.tests.DOMAST;
|
|||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
|
||||
import org.eclipse.cdt.testplugin.CTestPlugin;
|
||||
import org.eclipse.cdt.ui.CUIPlugin;
|
||||
import org.eclipse.cdt.ui.testplugin.CTestPlugin;
|
||||
import org.eclipse.jface.resource.ImageDescriptor;
|
||||
import org.eclipse.jface.resource.ImageRegistry;
|
||||
import org.eclipse.swt.graphics.Image;
|
||||
|
|
|
@ -16,10 +16,10 @@ import junit.framework.TestSuite;
|
|||
|
||||
import org.eclipse.cdt.core.model.ICProject;
|
||||
import org.eclipse.cdt.core.model.ITranslationUnit;
|
||||
import org.eclipse.cdt.core.testplugin.CProjectHelper;
|
||||
import org.eclipse.cdt.internal.ui.CHelpProviderManager;
|
||||
import org.eclipse.cdt.internal.ui.text.CHelpBookDescriptor;
|
||||
import org.eclipse.cdt.internal.ui.text.CHelpSettings;
|
||||
import org.eclipse.cdt.testplugin.CProjectHelper;
|
||||
import org.eclipse.cdt.ui.CUIPlugin;
|
||||
import org.eclipse.cdt.ui.ICHelpBook;
|
||||
import org.eclipse.cdt.ui.ICHelpResourceDescriptor;
|
||||
|
@ -35,10 +35,10 @@ import org.eclipse.core.runtime.Platform;
|
|||
* CHelpProvider tests
|
||||
*/
|
||||
public class CHelpTest extends TestCase {
|
||||
public final static String TEST_EXTENSION_ID_PREFIX = "org.eclipse.cdt.ui.tests.chelp.extension";
|
||||
private final static String C_PROJECT_NAME = "cHelpTestProject";
|
||||
private final static String CC_PROJECT_NAME = "ccHelpTestProject";
|
||||
private final static String BIN_DIR_NAME = "bin";
|
||||
public final static String TEST_EXTENSION_ID_PREFIX = "org.eclipse.cdt.ui.tests.chelp.extension"; //$NON-NLS-1$
|
||||
private final static String C_PROJECT_NAME = "cHelpTestProject"; //$NON-NLS-1$
|
||||
private final static String CC_PROJECT_NAME = "ccHelpTestProject"; //$NON-NLS-1$
|
||||
private final static String BIN_DIR_NAME = "bin"; //$NON-NLS-1$
|
||||
|
||||
private ICProject fCProject = null;
|
||||
private ICProject fCCProject = null;
|
||||
|
@ -94,15 +94,15 @@ public class CHelpTest extends TestCase {
|
|||
public void testCHelpProviderManagerGeneral(){
|
||||
CHelpProviderManager mngr = CHelpProviderManager.getDefault();
|
||||
if(mngr == null)
|
||||
fail("manager not created");
|
||||
fail("manager not created"); //$NON-NLS-1$
|
||||
if(mngr != CHelpProviderManager.getDefault())
|
||||
fail("getDefault returned an other instance of manager");
|
||||
fail("getDefault returned an other instance of manager"); //$NON-NLS-1$
|
||||
|
||||
try{
|
||||
ICHelpInvocationContext cContext = getDefaultCHelpContext();
|
||||
ICHelpInvocationContext ccContext = getDefaultCCHelpContext();
|
||||
|
||||
String requestedName = "dummyName";
|
||||
String requestedName = "dummyName"; //$NON-NLS-1$
|
||||
CHelpProviderManager.getDefault().getMatchingFunctions(cContext,requestedName);
|
||||
CHelpProviderManager.getDefault().getMatchingFunctions(ccContext,requestedName);
|
||||
|
||||
|
@ -115,14 +115,14 @@ public class CHelpTest extends TestCase {
|
|||
IConfigurationElement configElements[] = Platform.getExtensionRegistry().getConfigurationElementsFor(CUIPlugin.PLUGIN_ID, CHelpSettings.CONTRIBUTION_EXTENSION);
|
||||
int numExts = 0;
|
||||
for(int i = 0; i < configElements.length; i++){
|
||||
String id = configElements[i].getAttribute("id");
|
||||
String id = configElements[i].getAttribute("id"); //$NON-NLS-1$
|
||||
if(id.startsWith(TEST_EXTENSION_ID_PREFIX))
|
||||
numExts++;
|
||||
}
|
||||
|
||||
assertTrue("number of provider instances created (" + CHelpTestInfoProvider.getNumProviders() + ") is not equal to number of extensions (" + numExts + ")",numExts == CHelpTestInfoProvider.getNumProviders());
|
||||
assertTrue("number of provider instances created (" + CHelpTestInfoProvider.getNumProviders() + ") is not equal to number of extensions (" + numExts + ")",numExts == CHelpTestInfoProvider.getNumProviders()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
}catch(CoreException e){
|
||||
fail("CoreException occured: " + e.getMessage());
|
||||
fail("CoreException occured: " + e.getMessage()); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -135,7 +135,7 @@ public class CHelpTest extends TestCase {
|
|||
ICHelpInvocationContext cContext = getDefaultCHelpContext();
|
||||
ICHelpInvocationContext ccContext = getDefaultCCHelpContext();
|
||||
|
||||
String requestedName = "dummyName";
|
||||
String requestedName = "dummyName"; //$NON-NLS-1$
|
||||
IFunctionSummary summaries[] = CHelpProviderManager.getDefault().getMatchingFunctions(cContext,requestedName);
|
||||
CHelpProviderTester.getDefault().checkMatchingFunctions(summaries, cContext, requestedName);
|
||||
|
||||
|
@ -143,7 +143,7 @@ public class CHelpTest extends TestCase {
|
|||
CHelpProviderTester.getDefault().checkMatchingFunctions(summaries, ccContext, requestedName);
|
||||
}
|
||||
catch(CoreException e){
|
||||
fail("CoreException occured: " + e.getMessage());
|
||||
fail("CoreException occured: " + e.getMessage()); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -156,7 +156,7 @@ public class CHelpTest extends TestCase {
|
|||
ICHelpInvocationContext cContext = getDefaultCHelpContext();
|
||||
ICHelpInvocationContext ccContext = getDefaultCCHelpContext();
|
||||
|
||||
String requestedName = "dummyName";
|
||||
String requestedName = "dummyName"; //$NON-NLS-1$
|
||||
IFunctionSummary summary = CHelpProviderManager.getDefault().getFunctionInfo(cContext,requestedName);
|
||||
CHelpProviderTester.getDefault().checkFunctionInfo(summary, cContext, requestedName);
|
||||
|
||||
|
@ -164,7 +164,7 @@ public class CHelpTest extends TestCase {
|
|||
CHelpProviderTester.getDefault().checkFunctionInfo(summary, ccContext, requestedName);
|
||||
}
|
||||
catch(CoreException e){
|
||||
fail("CoreException occured: " + e.getMessage());
|
||||
fail("CoreException occured: " + e.getMessage()); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -177,7 +177,7 @@ public class CHelpTest extends TestCase {
|
|||
ICHelpInvocationContext cContext = getDefaultCHelpContext();
|
||||
ICHelpInvocationContext ccContext = getDefaultCCHelpContext();
|
||||
|
||||
String requestedName = "dummyName";
|
||||
String requestedName = "dummyName"; //$NON-NLS-1$
|
||||
ICHelpResourceDescriptor resourceDes[] = CHelpProviderManager.getDefault().getHelpResources(cContext,requestedName);
|
||||
CHelpProviderTester.getDefault().checkHelpResources(resourceDes, cContext, requestedName);
|
||||
|
||||
|
@ -185,7 +185,7 @@ public class CHelpTest extends TestCase {
|
|||
CHelpProviderTester.getDefault().checkHelpResources(resourceDes, ccContext, requestedName);
|
||||
}
|
||||
catch(CoreException e){
|
||||
fail("CoreException occured: " + e.getMessage());
|
||||
fail("CoreException occured: " + e.getMessage()); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -196,19 +196,19 @@ public class CHelpTest extends TestCase {
|
|||
CHelpBookDescriptor ccBookDescriptors[] = mngr.getCHelpBookDescriptors(getDefaultCCHelpContext());
|
||||
CHelpBookDescriptor cBookDescriptors[] = mngr.getCHelpBookDescriptors(getDefaultCHelpContext());
|
||||
|
||||
assertTrue("CC book descriptors length (" + ccBookDescriptors.length + ") is less than C book descriptors length (" + cBookDescriptors.length + ")",
|
||||
assertTrue("CC book descriptors length (" + ccBookDescriptors.length + ") is less than C book descriptors length (" + cBookDescriptors.length + ")", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
ccBookDescriptors.length >= cBookDescriptors.length);
|
||||
|
||||
for(int i = 0; i < cBookDescriptors.length; i++){
|
||||
CHelpBookDescriptor curBookDes = cBookDescriptors[i];
|
||||
assertTrue("book \"" + curBookDes.getCHelpBook().getTitle() + "\" of type HELP_TYPE_CPP in book descriptors for C project \"" + getDefaultCHelpContext().getProject().getName() + "\"",
|
||||
assertTrue("book \"" + curBookDes.getCHelpBook().getTitle() + "\" of type HELP_TYPE_CPP in book descriptors for C project \"" + getDefaultCHelpContext().getProject().getName() + "\"", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
curBookDes.getCHelpBook().getCHelpType() != ICHelpBook.HELP_TYPE_CPP);
|
||||
int j = 0;
|
||||
for(; j < ccBookDescriptors.length; j++){
|
||||
if(ccBookDescriptors[j].getCHelpBook().getTitle().equals(curBookDes.getCHelpBook().getTitle()))
|
||||
break;
|
||||
}
|
||||
assertTrue("book \"" + curBookDes.getCHelpBook().getTitle() + "\" was not found in CC books",j < ccBookDescriptors.length);
|
||||
assertTrue("book \"" + curBookDes.getCHelpBook().getTitle() + "\" was not found in CC books",j < ccBookDescriptors.length); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
|
||||
for(int i = 0; i < ccBookDescriptors.length; i++){
|
||||
|
@ -218,12 +218,12 @@ public class CHelpTest extends TestCase {
|
|||
if(cBookDescriptors[j].getCHelpBook().getTitle().equals(curBookDes.getCHelpBook().getTitle()))
|
||||
break;
|
||||
}
|
||||
assertTrue("book \"" + curBookDes.getCHelpBook().getTitle() + "\" of type HELP_TYPE_C was not found in C books",
|
||||
assertTrue("book \"" + curBookDes.getCHelpBook().getTitle() + "\" of type HELP_TYPE_C was not found in C books", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
j < cBookDescriptors.length || curBookDes.getCHelpBook().getCHelpType() == ICHelpBook.HELP_TYPE_CPP);
|
||||
}
|
||||
}
|
||||
catch(CoreException e){
|
||||
fail("CoreException occured: " + e.getMessage());
|
||||
fail("CoreException occured: " + e.getMessage()); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,10 +30,10 @@ import org.eclipse.cdt.core.model.IWorkingCopy;
|
|||
import org.eclipse.cdt.core.parser.ast.IASTCompletionNode;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTNode;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTScope;
|
||||
import org.eclipse.cdt.core.testplugin.CProjectHelper;
|
||||
import org.eclipse.cdt.internal.core.search.indexing.IndexManager;
|
||||
import org.eclipse.cdt.internal.ui.text.contentassist.CCompletionProcessor;
|
||||
import org.eclipse.cdt.testplugin.CProjectHelper;
|
||||
import org.eclipse.cdt.testplugin.CTestPlugin;
|
||||
import org.eclipse.cdt.ui.testplugin.CTestPlugin;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IProjectDescription;
|
||||
|
@ -46,8 +46,8 @@ import org.eclipse.jface.text.contentassist.ICompletionProposal;
|
|||
|
||||
public abstract class CompletionProposalsBaseTest extends TestCase{
|
||||
protected static final String EMPTY_STRING = ""; //$NON-NLS-1$
|
||||
private final String projectName = "TestProject1";
|
||||
private final String projectType = "bin";
|
||||
private final String projectName = "TestProject1"; //$NON-NLS-1$
|
||||
private final String projectType = "bin"; //$NON-NLS-1$
|
||||
private ICProject fCProject;
|
||||
private IFile fCFile;
|
||||
private IFile fHeaderFile;
|
||||
|
@ -133,7 +133,7 @@ public abstract class CompletionProposalsBaseTest extends TestCase{
|
|||
try{
|
||||
wc = tu.getWorkingCopy();
|
||||
}catch (CModelException e){
|
||||
fail("Failed to get working copy");
|
||||
fail("Failed to get working copy"); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
// call the CompletionProcessor
|
||||
|
@ -150,7 +150,7 @@ public abstract class CompletionProposalsBaseTest extends TestCase{
|
|||
// context
|
||||
IASTNode context = completionNode.getCompletionContext();
|
||||
if(context == null)
|
||||
assertTrue(getExpectedContextClassName().equals("null"));
|
||||
assertTrue(getExpectedContextClassName().equals("null")); //$NON-NLS-1$
|
||||
else
|
||||
assertTrue(context.getClass().getName().endsWith(getExpectedContextClassName()));
|
||||
// kind
|
||||
|
|
|
@ -28,12 +28,12 @@ import org.eclipse.cdt.core.model.CoreModel;
|
|||
import org.eclipse.cdt.core.model.ICProject;
|
||||
import org.eclipse.cdt.core.model.ITranslationUnit;
|
||||
import org.eclipse.cdt.core.model.IWorkingCopy;
|
||||
import org.eclipse.cdt.core.testplugin.CProjectHelper;
|
||||
import org.eclipse.cdt.core.testplugin.FileManager;
|
||||
import org.eclipse.cdt.internal.core.search.indexing.IndexManager;
|
||||
import org.eclipse.cdt.internal.ui.CHelpProviderManager;
|
||||
import org.eclipse.cdt.internal.ui.text.CHelpBookDescriptor;
|
||||
import org.eclipse.cdt.internal.ui.text.contentassist.CCompletionProcessor;
|
||||
import org.eclipse.cdt.testplugin.CProjectHelper;
|
||||
import org.eclipse.cdt.testplugin.FileManager;
|
||||
import org.eclipse.cdt.ui.text.ICHelpInvocationContext;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
|
|
Loading…
Add table
Reference in a new issue