mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
JavaDoc: discourage using of methods which don't support scopes
This commit is contained in:
+9
-1
@@ -341,11 +341,19 @@ public class InspectionProfileImpl extends NewInspectionProfile {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Warning: Usage of this method is discouraged as if separate tool options are defined for different scopes, it just returns
|
||||
* the options for the first scope which may lead to unexpected results. Consider using {@link #getInspectionTool(String, PsiElement)} instead.
|
||||
*
|
||||
* @param shortName an inspection short name
|
||||
* @param project a project
|
||||
* @return an InspectionToolWrapper associated with this tool.
|
||||
*/
|
||||
@Override
|
||||
@Nullable
|
||||
public InspectionToolWrapper getInspectionTool(@NotNull String shortName, Project project) {
|
||||
final ToolsImpl tools = getToolsOrNull(shortName, project);
|
||||
return tools != null? tools.getTool() : null;
|
||||
return tools != null ? tools.getTool() : null;
|
||||
}
|
||||
|
||||
public InspectionToolWrapper getToolById(@NotNull String id, @NotNull PsiElement element) {
|
||||
|
||||
@@ -229,6 +229,12 @@ public class ToolsImpl implements Tools {
|
||||
myEnabled = isEnabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Warning: Usage of this method is discouraged as if separate tool options are defined for different scopes, it just returns
|
||||
* the options for the first scope which may lead to unexpected results. Consider using {@link #getInspectionTool(PsiElement)} instead.
|
||||
*
|
||||
* @return an InspectionToolWrapper associated with this tool.
|
||||
*/
|
||||
@NotNull
|
||||
@Override
|
||||
public InspectionToolWrapper getTool() {
|
||||
|
||||
Reference in New Issue
Block a user