mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-06 17:26:01 +02:00
Fixed spelling in a class name
This commit is contained in:
parent
3c2fd7ab95
commit
bf4c760f6a
6 changed files with 14 additions and 14 deletions
|
@ -14,7 +14,7 @@ import org.eclipse.cdt.codan.core.model.ICheckersRegistry;
|
||||||
import org.eclipse.cdt.codan.core.model.ICodanBuilder;
|
import org.eclipse.cdt.codan.core.model.ICodanBuilder;
|
||||||
import org.eclipse.cdt.codan.core.model.IProblemLocationFactory;
|
import org.eclipse.cdt.codan.core.model.IProblemLocationFactory;
|
||||||
import org.eclipse.cdt.codan.core.model.IProblemReporter;
|
import org.eclipse.cdt.codan.core.model.IProblemReporter;
|
||||||
import org.eclipse.cdt.codan.internal.core.CheckersRegisry;
|
import org.eclipse.cdt.codan.internal.core.CheckersRegistry;
|
||||||
import org.eclipse.cdt.codan.internal.core.CodanBuilder;
|
import org.eclipse.cdt.codan.internal.core.CodanBuilder;
|
||||||
import org.eclipse.cdt.codan.internal.core.model.CodanMarkerProblemReporter;
|
import org.eclipse.cdt.codan.internal.core.model.CodanMarkerProblemReporter;
|
||||||
import org.eclipse.cdt.codan.internal.core.model.ProblemLocationFactory;
|
import org.eclipse.cdt.codan.internal.core.model.ProblemLocationFactory;
|
||||||
|
@ -34,7 +34,7 @@ public class CodanRuntime {
|
||||||
private static CodanRuntime instance = new CodanRuntime();
|
private static CodanRuntime instance = new CodanRuntime();
|
||||||
private IProblemReporter problemReporter = new CodanMarkerProblemReporter();
|
private IProblemReporter problemReporter = new CodanMarkerProblemReporter();
|
||||||
private ICodanBuilder builder = new CodanBuilder();
|
private ICodanBuilder builder = new CodanBuilder();
|
||||||
private CheckersRegisry checkers = CheckersRegisry.getInstance();
|
private CheckersRegistry checkers = CheckersRegistry.getInstance();
|
||||||
private IProblemLocationFactory locFactory = new ProblemLocationFactory();
|
private IProblemLocationFactory locFactory = new ProblemLocationFactory();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
package org.eclipse.cdt.codan.core.model;
|
package org.eclipse.cdt.codan.core.model;
|
||||||
|
|
||||||
import org.eclipse.cdt.codan.core.CodanRuntime;
|
import org.eclipse.cdt.codan.core.CodanRuntime;
|
||||||
import org.eclipse.cdt.codan.internal.core.CheckersRegisry;
|
import org.eclipse.cdt.codan.internal.core.CheckersRegistry;
|
||||||
import org.eclipse.core.resources.IFile;
|
import org.eclipse.core.resources.IFile;
|
||||||
import org.eclipse.core.resources.IResource;
|
import org.eclipse.core.resources.IResource;
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ public abstract class AbstractChecker implements IChecker {
|
||||||
* @return problem instance
|
* @return problem instance
|
||||||
*/
|
*/
|
||||||
public IProblem getProblemById(String id, IFile file) {
|
public IProblem getProblemById(String id, IFile file) {
|
||||||
IProblem problem = CheckersRegisry.getInstance().getResourceProfile(
|
IProblem problem = CheckersRegistry.getInstance().getResourceProfile(
|
||||||
file).findProblem(id);
|
file).findProblem(id);
|
||||||
if (problem == null)
|
if (problem == null)
|
||||||
throw new IllegalArgumentException("Id is not registered"); //$NON-NLS-1$
|
throw new IllegalArgumentException("Id is not registered"); //$NON-NLS-1$
|
||||||
|
|
|
@ -21,8 +21,8 @@ package org.eclipse.cdt.codan.core.model;
|
||||||
* with the same id can exist in the same profile (i.e. two category can have same problem listed in both,
|
* with the same id can exist in the same profile (i.e. two category can have same problem listed in both,
|
||||||
* but they both should point to the same problem instance).
|
* but they both should point to the same problem instance).
|
||||||
*
|
*
|
||||||
* To obtain read-only profile use method {@link CheckersRegisry#getResourceProfile,
|
* To obtain read-only profile use method {@link CheckersRegistry#getResourceProfile,
|
||||||
* CheckersRegisry#getDefaultProfile() or CheckersRegisry#getWorkspaceProfile()}
|
* CheckersRegistry#getDefaultProfile() or CheckersRegistry#getWorkspaceProfile()}
|
||||||
*
|
*
|
||||||
* @noextend This interface is not intended to be extended by clients.
|
* @noextend This interface is not intended to be extended by clients.
|
||||||
* @noimplement This interface is not intended to be implemented by clients.
|
* @noimplement This interface is not intended to be implemented by clients.
|
||||||
|
|
|
@ -37,7 +37,7 @@ import org.eclipse.core.runtime.IExtensionPoint;
|
||||||
import org.eclipse.core.runtime.Platform;
|
import org.eclipse.core.runtime.Platform;
|
||||||
import org.osgi.service.prefs.Preferences;
|
import org.osgi.service.prefs.Preferences;
|
||||||
|
|
||||||
public class CheckersRegisry implements Iterable<IChecker>, ICheckersRegistry {
|
public class CheckersRegistry implements Iterable<IChecker>, ICheckersRegistry {
|
||||||
private static final String NAME_ATTR = "name"; //$NON-NLS-1$
|
private static final String NAME_ATTR = "name"; //$NON-NLS-1$
|
||||||
private static final String ID_ATTR = "id"; //$NON-NLS-1$
|
private static final String ID_ATTR = "id"; //$NON-NLS-1$
|
||||||
private static final String EXTENSION_POINT_NAME = "checkers"; //$NON-NLS-1$
|
private static final String EXTENSION_POINT_NAME = "checkers"; //$NON-NLS-1$
|
||||||
|
@ -46,11 +46,11 @@ public class CheckersRegisry implements Iterable<IChecker>, ICheckersRegistry {
|
||||||
private static final String CATEGORY_ELEMENT = "category"; //$NON-NLS-1$
|
private static final String CATEGORY_ELEMENT = "category"; //$NON-NLS-1$
|
||||||
private static final Object DEFAULT = "DEFAULT"; //$NON-NLS-1$
|
private static final Object DEFAULT = "DEFAULT"; //$NON-NLS-1$
|
||||||
private Collection<IChecker> checkers = new ArrayList<IChecker>();
|
private Collection<IChecker> checkers = new ArrayList<IChecker>();
|
||||||
private static CheckersRegisry instance;
|
private static CheckersRegistry instance;
|
||||||
private HashMap<Object, IProblemProfile> profiles = new HashMap<Object, IProblemProfile>();
|
private HashMap<Object, IProblemProfile> profiles = new HashMap<Object, IProblemProfile>();
|
||||||
private HashMap<IChecker, Collection<IProblem>> problemList = new HashMap<IChecker, Collection<IProblem>>();
|
private HashMap<IChecker, Collection<IProblem>> problemList = new HashMap<IChecker, Collection<IProblem>>();
|
||||||
|
|
||||||
private CheckersRegisry() {
|
private CheckersRegistry() {
|
||||||
instance = this;
|
instance = this;
|
||||||
profiles.put(DEFAULT, new ProblemProfile());
|
profiles.put(DEFAULT, new ProblemProfile());
|
||||||
readCheckersRegistry();
|
readCheckersRegistry();
|
||||||
|
@ -239,9 +239,9 @@ public class CheckersRegisry implements Iterable<IChecker>, ICheckersRegistry {
|
||||||
return checkers.iterator();
|
return checkers.iterator();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static CheckersRegisry getInstance() {
|
public static CheckersRegistry getInstance() {
|
||||||
if (instance == null)
|
if (instance == null)
|
||||||
return new CheckersRegisry();
|
return new CheckersRegistry();
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,7 +93,7 @@ public class CodanBuilder extends IncrementalProjectBuilder implements
|
||||||
|
|
||||||
protected void processResource(IResource resource,
|
protected void processResource(IResource resource,
|
||||||
IProgressMonitor monitor, Object model, boolean inEditor) {
|
IProgressMonitor monitor, Object model, boolean inEditor) {
|
||||||
CheckersRegisry chegistry = CheckersRegisry.getInstance();
|
CheckersRegistry chegistry = CheckersRegistry.getInstance();
|
||||||
int checkers = chegistry.getCheckersSize();
|
int checkers = chegistry.getCheckersSize();
|
||||||
int memsize = 0;
|
int memsize = 0;
|
||||||
if (resource instanceof IContainer) {
|
if (resource instanceof IContainer) {
|
||||||
|
|
|
@ -21,7 +21,7 @@ import org.eclipse.cdt.codan.core.model.ICheckersRegistry;
|
||||||
import org.eclipse.cdt.codan.core.model.IProblem;
|
import org.eclipse.cdt.codan.core.model.IProblem;
|
||||||
import org.eclipse.cdt.codan.core.model.IProblemLocation;
|
import org.eclipse.cdt.codan.core.model.IProblemLocation;
|
||||||
import org.eclipse.cdt.codan.core.model.IProblemReporterPersistent;
|
import org.eclipse.cdt.codan.core.model.IProblemReporterPersistent;
|
||||||
import org.eclipse.cdt.codan.internal.core.CheckersRegisry;
|
import org.eclipse.cdt.codan.internal.core.CheckersRegistry;
|
||||||
import org.eclipse.core.resources.IFile;
|
import org.eclipse.core.resources.IFile;
|
||||||
import org.eclipse.core.resources.IMarker;
|
import org.eclipse.core.resources.IMarker;
|
||||||
import org.eclipse.core.resources.IResource;
|
import org.eclipse.core.resources.IResource;
|
||||||
|
@ -44,7 +44,7 @@ public class CodanMarkerProblemReporter implements IProblemReporterPersistent {
|
||||||
throw new NullPointerException("file"); //$NON-NLS-1$
|
throw new NullPointerException("file"); //$NON-NLS-1$
|
||||||
if (id == null)
|
if (id == null)
|
||||||
throw new NullPointerException("id"); //$NON-NLS-1$
|
throw new NullPointerException("id"); //$NON-NLS-1$
|
||||||
IProblem problem = CheckersRegisry.getInstance().getResourceProfile(
|
IProblem problem = CheckersRegistry.getInstance().getResourceProfile(
|
||||||
file).findProblem(id);
|
file).findProblem(id);
|
||||||
if (problem == null)
|
if (problem == null)
|
||||||
throw new IllegalArgumentException("Id is not registered:" + id); //$NON-NLS-1$
|
throw new IllegalArgumentException("Id is not registered:" + id); //$NON-NLS-1$
|
||||||
|
|
Loading…
Add table
Reference in a new issue