summaryrefslogtreecommitdiffstats
path: root/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/ProblemLocationFactory.java
blob: 835f6bfac15063801312731cee360b0f5fdf65be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*******************************************************************************
 * Copyright (c) 2009, 2010 Alena Laskavaia 
 * 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
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *    Alena Laskavaia  - initial API and implementation
 *******************************************************************************/
package org.eclipse.cdt.codan.internal.core.model;

import org.eclipse.cdt.codan.core.model.IProblemLocation;
import org.eclipse.cdt.codan.core.model.IProblemLocationFactory;
import org.eclipse.core.resources.IFile;

/**
 * Factory class that allows to create problem locations
 * 
 */
public class ProblemLocationFactory implements IProblemLocationFactory {
	/*
	 * (non-Javadoc)
	 * 
	 * @seeorg.eclipse.cdt.codan.core.model.IProblemLocationFactory#
	 * createProblemLocation(org.eclipse.core.resources.IFile, int)
	 */
	public IProblemLocation createProblemLocation(IFile file, int line) {
		return new CodanProblemLocation(file, line);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @seeorg.eclipse.cdt.codan.core.model.IProblemLocationFactory#
	 * createProblemLocation(org.eclipse.core.resources.IFile, int, int)
	 */
	public IProblemLocation createProblemLocation(IFile file, int startChar,
			int endChar) {
		return new CodanProblemLocation(file, startChar, endChar);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @seeorg.eclipse.cdt.codan.core.model.IProblemLocationFactory#
	 * createProblemLocation(org.eclipse.core.resources.IFile, int, int, int)
	 */
	public IProblemLocation createProblemLocation(IFile file, int startChar,
			int endChar, int line) {
		return new CodanProblemLocation(file, startChar, endChar, line);
	}
}