diff options
Diffstat (limited to 'org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/IProblem.java')
-rw-r--r-- | org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/IProblem.java | 64 |
1 files changed, 45 insertions, 19 deletions
diff --git a/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/IProblem.java b/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/IProblem.java index bbab313..d12806d 100644 --- a/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/IProblem.java +++ b/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/IProblem.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009 Alena Laskavaia + * 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 @@ -10,56 +10,82 @@ *******************************************************************************/ package org.eclipse.cdt.codan.core.model; -import java.util.Collection; +import org.eclipse.cdt.codan.core.param.IProblemPreference; /** - * Interface representing code analysis problem - * + * 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. 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 + * + * @return pattern */ String getMessagePattern(); - void setSeverity(CodanSeverity sev); - - void setEnabled(boolean checked); - - void setMessagePattern(String message); - - public void setProperty(Object key, Object value); + /** + * 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 custom property - * @param property name - * @return property object + * Get short description of a problem + * + * @return description */ - public Object getProperty(Object key); + public String getDescription(); - public Collection<Object> getPropertyKeys(); + /** + * Return marker id for the problem + * + * @return marker id + */ + public String getMarkerType(); } |