-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #511 from ajm01/issue-105
fix issue 134 - add quick fixes for CDI Produces and Disposes diagnos…
- Loading branch information
Showing
8 changed files
with
126 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
...rg/eclipse/lsp4jakarta/jdt/internal/cdi/RemoveInvalidProducerParamAnnotationQuickFix.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2023 IBM Corporation and others. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License v. 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* IBM Corporation - initial implementation | ||
*******************************************************************************/ | ||
package org.eclipse.lsp4jakarta.jdt.internal.cdi; | ||
|
||
import org.eclipse.lsp4jakarta.commons.codeaction.ICodeActionId; | ||
import org.eclipse.lsp4jakarta.commons.codeaction.JakartaCodeActionId; | ||
|
||
/** | ||
* Removes the @Disposes, @Observes and @ObservesAsync annotations from | ||
* the declaring element. | ||
*/ | ||
public class RemoveInvalidProducerParamAnnotationQuickFix extends RemoveMethodParamAnnotationQuickFix { | ||
|
||
/** | ||
* Constructor. | ||
*/ | ||
public RemoveInvalidProducerParamAnnotationQuickFix() { | ||
super(Constants.INVALID_PRODUCER_PARAMS.toArray((String[]::new))); | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
@Override | ||
public String getParticipantId() { | ||
return RemoveInvalidProducerParamAnnotationQuickFix.class.getName(); | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
@Override | ||
protected ICodeActionId getCodeActionId() { | ||
return JakartaCodeActionId.CDIRemoveInvalidProducesAnnotations; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters