blob: d12806da4ceb83fdc6e0de962135c034b6c3787c (
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
/*******************************************************************************
* 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.core.model;
import org.eclipse.cdt.codan.core.param.IProblemPreference;
/**
* Interface representing code analysis problem type. For example
* "Null Pointer Dereference" is a problem. It has user visible Name and Message
* (translatable), as well as some other parameters, changeable by user such as
* enablement, severity and so on. Same problem cannot have two severities
* determined by runtime. If it is the case - two Problems should be created
* (i.e. one for error and one for warning). All of problem attributes are
* defined in a checker extension point.
*
* <p>
* <strong>EXPERIMENTAL</strong>. This class or interface has been added as part
* of a work in progress. There is no guarantee that this API will work or that
* it will remain the same.
* </p>
*
* @noextend This interface is not intended to be extended by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IProblem extends IProblemElement {
/**
* Name of the problem - user visible "title", not the message
*
* @return title of the problem
*/
String getName();
/**
* Unique problem id. Should be qualified by plugin name to maintain
* uniqueness.
*
* @return unique problem id
*/
String getId();
/**
* Is enabled in current context (usually within profile)
*
* @return true if enabled
*/
boolean isEnabled();
/**
* Get current severity
*
* @return severity
*/
CodanSeverity getSeverity();
/**
* Message pattern, java patter like 'Variable {0} is never used here'
*
* @return pattern
*/
String getMessagePattern();
/**
* Get root preference descriptor or null if not defined (used by ui to
* generate user controls for changing parameters)
*
* @return root preference or null
*/
public IProblemPreference getPreference();
/**
* Get short description of a problem
*
* @return description
*/
public String getDescription();
/**
* Return marker id for the problem
*
* @return marker id
*/
public String getMarkerType();
}
|