Skip to content

Commit

Permalink
refact: resolve javadoc warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
sebthom committed Dec 19, 2024
1 parent b64d98b commit fd2cd2c
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public void testConnect() throws Exception {

/**
* Check if {@code isActive()} is correctly synchronized with {@code stop()}
* @see https://github.com/eclipse-lsp4e/lsp4e/pull/688
* @see <a href="https://github.com/eclipse-lsp4e/lsp4e/pull/688">GitHub Pull Request #688</a>
*/
@Test
public void testStartStopAndActive() throws CoreException, AssertionError {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,31 +33,32 @@
import org.eclipse.lsp4e.LanguageServerPlugin;

/**
* Can be implemented by clients as OSGi service
* to provide editor specific formatting regions for the format-on-save feature.
* The OSGi component service has to implement the {@code serverDefinitionId} property.
* Can be implemented by clients as an OSGi service
* to provide editor-specific formatting regions for the format-on-save feature.
* The OSGi component service must implement the {@code serverDefinitionId} property.
* The value must be the {@code server id} of the corresponding {@code languageServer} extension point.
* This service will then be used for documents who are connected to this language server.
* <p>Example:
* <pre>{@code
* @Component(property = { "serverDefinitionId:String=org.eclipse.cdt.lsp.server" })
* This service will then be used for documents connected to this language server.
*
* <p>Example:</p>
* <pre><code>
* @Component(property={"serverDefinitionId:String=org.eclipse.cdt.lsp.server"})
* public class FormatOnSave implements IFormatRegionsProvider {
* @Reference
* private EditorConfiguration configuration;
* @Reference
* private EditorConfiguration configuration;
*
* IRegion[] getFormattingRegions(IDocument document) {
* //formats whole document:
* if(configuration.formatOnSaveEnabled()) {
* if (configuration.formatEditedLines()) {
* return IFormatRegionsProvider.calculateEditedLineRegions(document);
* } else {
* return IFormatRegionsProvider.allLines(document);
* }
* }
* return null;
* }
* IRegion[] getFormattingRegions(IDocument document) {
* // Formats the whole document:
* if (configuration.formatOnSaveEnabled()) {
* if (configuration.formatEditedLines()) {
* return IFormatRegionsProvider.calculateEditedLineRegions(document);
* } else {
* return IFormatRegionsProvider.allLines(document);
* }
* }
* return null;
* }
* }
* </pre>
* </code></pre>
*/
public interface IFormatRegionsProvider {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,12 @@ public void mergeStyleRanges(final TextPresentation textPresentation, @Nullable
}

/**
* Whether a given style must additionally modify beyond the result of textPresentation's merge.
* Checks if the given style requires modifications beyond the
* standard {@code textPresentation} merge.
*
* @param style
* @return
* @param style the {@link StyleRange} to evaluate
* @return {@code true} if additional modifications are needed;
* {@code false} otherwise
*/
protected boolean isStyleModifying(StyleRange style) {
int mask = SWT.NORMAL;
Expand Down

0 comments on commit fd2cd2c

Please sign in to comment.