org.netbeans.spi.editor.hints/0 1.24.0 7

org.netbeans.spi.editor.hints
Class ErrorDescriptionFactory

java.lang.Object
  extended by org.netbeans.spi.editor.hints.ErrorDescriptionFactory

public class ErrorDescriptionFactory
extends Object

Factory class with static methods that allow creation of ErrorDescription.


Method Summary
static Fix attachSubfixes(Fix to, Iterable<? extends Fix> subfixes)
          Attach given sub-fixes to the given fix.
static ErrorDescription createErrorDescription(Severity severity, String description, Document doc, int lineNumber)
          Should be called inside document read lock to assure consistency
static ErrorDescription createErrorDescription(Severity severity, String description, Document doc, Position start, Position end)
          Acquires read lock on the provided document to assure consistency
static ErrorDescription createErrorDescription(Severity severity, String description, FileObject file, int start, int end)
          Should be called inside document read lock to assure consistency
static ErrorDescription createErrorDescription(Severity severity, String description, LazyFixList fixes, Document doc, int lineNumber)
          Should be called inside document read lock to assure consistency
static ErrorDescription createErrorDescription(Severity severity, String description, LazyFixList fixes, Document doc, Position start, Position end)
          Acquires read lock on the provided document to assure consistency
static ErrorDescription createErrorDescription(Severity severity, String description, LazyFixList fixes, FileObject file, int start, int end)
          Should be called inside document read lock to assure consistency
static ErrorDescription createErrorDescription(Severity severity, String description, List<Fix> fixes, Document doc, int lineNumber)
          Should be called inside document read lock to assure consistency
static ErrorDescription createErrorDescription(Severity severity, String description, List<Fix> fixes, Document doc, Position start, Position end)
          Acquires read lock on the provided document to assure consistency
static ErrorDescription createErrorDescription(Severity severity, String description, List<Fix> fixes, FileObject file, int start, int end)
          Should be called inside document read lock to assure consistency
static ErrorDescription createErrorDescription(String id, Severity severity, String description, CharSequence details, LazyFixList fixes, Document doc, int lineNumber)
          Create a new ErrorDescription with the given parameters.
static ErrorDescription createErrorDescription(String id, Severity severity, String description, CharSequence details, LazyFixList fixes, Document doc, Position start, Position end)
          Create a new ErrorDescription with the given parameters.
static ErrorDescription createErrorDescription(String id, Severity severity, String description, CharSequence details, LazyFixList fixes, FileObject file, int start, int end)
          Create a new ErrorDescription with the given parameters.
static ErrorDescription createErrorDescription(String id, Severity severity, String description, CharSequence details, LazyFixList fixes, FileObject file, PositionBounds errorBounds)
          Create a new ErrorDescription with the given parameters.
static LazyFixList lazyListForDelegates(List<LazyFixList> delegates)
          Concatenates several LazyFixLists into one.
static LazyFixList lazyListForFixes(List<Fix> fixes)
          Converts "normal" list of Fixes into LazyFixList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createErrorDescription

@NonNull
public static ErrorDescription createErrorDescription(@NonNull
                                                              Severity severity,
                                                              @NonNull
                                                              String description,
                                                              @NonNull
                                                              Document doc,
                                                              int lineNumber)
Should be called inside document read lock to assure consistency


createErrorDescription

@NonNull
public static ErrorDescription createErrorDescription(@NonNull
                                                              Severity severity,
                                                              @NonNull
                                                              String description,
                                                              @NonNull
                                                              List<Fix> fixes,
                                                              @NonNull
                                                              Document doc,
                                                              int lineNumber)
Should be called inside document read lock to assure consistency


createErrorDescription

@NonNull
public static ErrorDescription createErrorDescription(@NonNull
                                                              Severity severity,
                                                              @NonNull
                                                              String description,
                                                              @NonNull
                                                              LazyFixList fixes,
                                                              @NonNull
                                                              Document doc,
                                                              int lineNumber)
Should be called inside document read lock to assure consistency


createErrorDescription

@NonNull
public static ErrorDescription createErrorDescription(@NullAllowed
                                                              String id,
                                                              @NonNull
                                                              Severity severity,
                                                              @NonNull
                                                              String description,
                                                              @NullAllowed
                                                              CharSequence details,
                                                              @NonNull
                                                              LazyFixList fixes,
                                                              @NonNull
                                                              Document doc,
                                                              int lineNumber)
Create a new ErrorDescription with the given parameters. Should be called inside document read lock to assure consistency

Parameters:
id - an optional ID of the ErrorDescription. Should represent a "type" of an error/warning. It is recommended that providers prefix the ID with their unique prefix.
severity - the desired Severity
description - the text of the error/warning
details - optional "more details" describing the error/warning
fixes - a collection of Fixes that should be shown for the error/warning
doc - document for which the ErrorDescription should be created
lineNumber - line on which the error/warning should be shown
Returns:
a newly created ErrorDescription based on the given parameters
Since:
1.22

createErrorDescription

@NonNull
public static ErrorDescription createErrorDescription(@NonNull
                                                              Severity severity,
                                                              @NonNull
                                                              String description,
                                                              @NonNull
                                                              Document doc,
                                                              @NonNull
                                                              Position start,
                                                              @NonNull
                                                              Position end)
Acquires read lock on the provided document to assure consistency


createErrorDescription

@NonNull
public static ErrorDescription createErrorDescription(@NonNull
                                                              Severity severity,
                                                              @NonNull
                                                              String description,
                                                              @NonNull
                                                              List<Fix> fixes,
                                                              @NonNull
                                                              Document doc,
                                                              @NonNull
                                                              Position start,
                                                              @NonNull
                                                              Position end)
Acquires read lock on the provided document to assure consistency


createErrorDescription

@NonNull
public static ErrorDescription createErrorDescription(@NonNull
                                                              Severity severity,
                                                              @NonNull
                                                              String description,
                                                              @NonNull
                                                              LazyFixList fixes,
                                                              @NonNull
                                                              Document doc,
                                                              @NonNull
                                                              Position start,
                                                              @NonNull
                                                              Position end)
Acquires read lock on the provided document to assure consistency


createErrorDescription

@NonNull
public static ErrorDescription createErrorDescription(@NullAllowed
                                                              String id,
                                                              @NonNull
                                                              Severity severity,
                                                              @NonNull
                                                              String description,
                                                              @NullAllowed
                                                              CharSequence details,
                                                              @NonNull
                                                              LazyFixList fixes,
                                                              @NonNull
                                                              Document doc,
                                                              @NonNull
                                                              Position start,
                                                              @NonNull
                                                              Position end)
Create a new ErrorDescription with the given parameters. Acquires read lock on the provided document to assure consistency

Parameters:
id - an optional ID of the ErrorDescription. Should represent a "type" of an error/warning. It is recommended that providers prefix the ID with their unique prefix.
severity - the desired Severity
description - the text of the error/warning
details - optional "more details" describing the error/warning
fixes - a collection of Fixes that should be shown for the error/warning
doc - document for which the ErrorDescription should be created
start - starting offset of the error/warning
end - ending offset of the error/warning
Returns:
a newly created ErrorDescription based on the given parameters
Since:
1.22

createErrorDescription

@NonNull
public static ErrorDescription createErrorDescription(@NonNull
                                                              Severity severity,
                                                              @NonNull
                                                              String description,
                                                              @NonNull
                                                              FileObject file,
                                                              int start,
                                                              int end)
Should be called inside document read lock to assure consistency


createErrorDescription

@NonNull
public static ErrorDescription createErrorDescription(@NonNull
                                                              Severity severity,
                                                              @NonNull
                                                              String description,
                                                              @NonNull
                                                              List<Fix> fixes,
                                                              @NonNull
                                                              FileObject file,
                                                              int start,
                                                              int end)
Should be called inside document read lock to assure consistency


createErrorDescription

@NonNull
public static ErrorDescription createErrorDescription(@NonNull
                                                              Severity severity,
                                                              @NonNull
                                                              String description,
                                                              @NonNull
                                                              LazyFixList fixes,
                                                              @NonNull
                                                              FileObject file,
                                                              int start,
                                                              int end)
Should be called inside document read lock to assure consistency


createErrorDescription

@NonNull
public static ErrorDescription createErrorDescription(@NullAllowed
                                                              String id,
                                                              @NonNull
                                                              Severity severity,
                                                              @NonNull
                                                              String description,
                                                              @NullAllowed
                                                              CharSequence details,
                                                              @NonNull
                                                              LazyFixList fixes,
                                                              @NonNull
                                                              FileObject file,
                                                              int start,
                                                              int end)
Create a new ErrorDescription with the given parameters. Should be called inside document read lock to assure consistency

Parameters:
id - an optional ID of the ErrorDescription. Should represent a "type" of an error/warning. It is recommended that providers prefix the ID with their unique prefix.
severity - the desired Severity
description - the text of the error/warning
details - optional "more details" describing the error/warning
fixes - a collection of Fixes that should be shown for the error/warning
file - for which the ErrorDescription should be created
start - starting offset of the error/warning
end - ending offset of the error/warning
Returns:
a newly created ErrorDescription based on the given parameters
Since:
1.22

createErrorDescription

@NonNull
public static ErrorDescription createErrorDescription(@NullAllowed
                                                              String id,
                                                              @NonNull
                                                              Severity severity,
                                                              @NonNull
                                                              String description,
                                                              @NullAllowed
                                                              CharSequence details,
                                                              @NonNull
                                                              LazyFixList fixes,
                                                              @NonNull
                                                              FileObject file,
                                                              @NonNull
                                                              PositionBounds errorBounds)
Create a new ErrorDescription with the given parameters.

Parameters:
id - an optional ID of the ErrorDescription. Should represent a "type" of an error/warning. It is recommended that providers prefix the ID with their unique prefix.
severity - the desired Severity
description - the text of the error/warning
details - optional "more details" describing the error/warning
fixes - a collection of Fixes that should be shown for the error/warning
file - for which the ErrorDescription should be created
errorBounds - start and end position of the error/warning
Returns:
a newly created ErrorDescription based on the given parameters
Since:
1.24

lazyListForFixes

@NonNull
public static LazyFixList lazyListForFixes(@NonNull
                                                   List<Fix> fixes)
Converts "normal" list of Fixes into LazyFixList

Parameters:
fixes -
Returns:
lazy

lazyListForDelegates

@NonNull
public static LazyFixList lazyListForDelegates(@NonNull
                                                       List<LazyFixList> delegates)
Concatenates several LazyFixLists into one.

Parameters:
delegates - the lists to be delegated to
Returns:
one list to contain them all

attachSubfixes

@NonNull
public static Fix attachSubfixes(@NonNull
                                         Fix to,
                                         @NonNull
                                         Iterable<? extends Fix> subfixes)
Attach given sub-fixes to the given fix. The sub-fixes may be shown as a sub-menu for the given fix. Only one level of sub-fixes is currently supported (attaching sub-fixes to any of the sub-fix will not have any effect). The sub-fixes are held in memory as long as the given fix exists.

Parameters:
to - fix to which should be the sub-fixes attached
subfixes - the sub-fixes to attach
Returns:
the given fix
Since:
1.13

org.netbeans.spi.editor.hints/0 1.24.0 7

Built on May 25 2012.  |  Portions Copyright 1997-2012 Oracle. All rights reserved.