[jbosstools-issues] [JBoss JIRA] (JBIDE-10187) Add support for a @SuppressWarnings

Daniel Azarov (Issue Comment Edited) (JIRA) jira-events at lists.jboss.org
Wed Dec 21 17:09:10 EST 2011


    [ https://issues.jboss.org/browse/JBIDE-10187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12652635#comment-12652635 ] 

Daniel Azarov edited comment on JBIDE-10187 at 12/21/11 5:08 PM:
-----------------------------------------------------------------

Noticed validator's issues:

1. @SuppressWarnings("seam-duplicated-component") does not work for "Duplicate component name" problem marker

2. @SuppressWarnings("seam-scope") does not work for "Stateful component "<name>" should not have org.jboss.seam.ScopeType.PAGE, nor org.jboss.seam.ScopeType.STATELESS" problem marker

3. Exception
{code}
org.eclipse.core.internal.resources.ResourceException: Marker id 70530 not found.
	at org.eclipse.core.internal.resources.Marker.checkInfo(Marker.java:57)
	at org.eclipse.core.internal.resources.Marker.setAttribute(Marker.java:237)
	at org.eclipse.core.internal.resources.Marker.setAttribute(Marker.java:223)
	at org.eclipse.wst.validation.internal.TaskListUtility.getValidationTasks(TaskListUtility.java:255)
	at org.eclipse.wst.validation.internal.TaskListUtility.getValidationTasks(TaskListUtility.java:285)
	at org.eclipse.wst.validation.internal.TaskListUtility.getValidationTasks(TaskListUtility.java:330)
	at org.eclipse.wst.validation.internal.TaskListUtility.removeTaskSubset(TaskListUtility.java:423)
	at org.eclipse.wst.validation.internal.TaskListUtility.removeAllTasks(TaskListUtility.java:403)
	at org.eclipse.wst.validation.internal.TaskListUtility.removeAllTasks(TaskListUtility.java:399)
	at org.eclipse.wst.validation.internal.operations.WorkbenchReporter.removeAllMessages(WorkbenchReporter.java:164)
	at org.jboss.tools.seam.internal.core.validation.SeamProjectPropertyValidator.validateSeamProject(SeamProjectPropertyValidator.java:275)
	at org.jboss.tools.seam.internal.core.validation.SeamProjectPropertyValidator.validateInJob(SeamProjectPropertyValidator.java:125)
	at org.eclipse.wst.validation.internal.operations.ValidatorJob.run(ValidatorJob.java:78)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
{code}

4. @SuppressWarnings("cdi-annotated-observer") does not work for "Observer method cannot be annotated @Inject [JSR-299 §10.4.2]" problem marker in case of parameter:

{code}
 @Inject
   public void initialize(@SuppressWarnings({"cdi-annotated-observer", "cdi-ambiguous-dependency"}) @Observes String string)
   {
   }
{code}

5. @SuppressWarnings("cdi-annotated-parameter") does not work for "Observer method has a parameter annotated @Disposes" problem marker
and @SuppressWarnings("cdi-missing-producer") does not work for "There is no producer method declared by the (same) bean class that is assignable to the disposed parameter of a disposer method" problem marker:

{code}
public void observeInitialized(@SuppressWarnings("cdi-annotated-parameter") @Observes BeforeBeanDiscovery event, @SuppressWarnings("cdi-missing-producer") @Disposes String badParam)
{
}
{code}
                
      was (Author: dazarov):
    Noticed validator's issues:

1. @SuppressWarnings("seam-duplicated-component") does not work for "Duplicate component name" problem marker

2. @SuppressWarnings("seam-scope") does not work for "Stateful component "<name>" should not have org.jboss.seam.ScopeType.PAGE, nor org.jboss.seam.ScopeType.STATELESS" problem marker

3. Exception
{code}
org.eclipse.core.internal.resources.ResourceException: Marker id 70530 not found.
	at org.eclipse.core.internal.resources.Marker.checkInfo(Marker.java:57)
	at org.eclipse.core.internal.resources.Marker.setAttribute(Marker.java:237)
	at org.eclipse.core.internal.resources.Marker.setAttribute(Marker.java:223)
	at org.eclipse.wst.validation.internal.TaskListUtility.getValidationTasks(TaskListUtility.java:255)
	at org.eclipse.wst.validation.internal.TaskListUtility.getValidationTasks(TaskListUtility.java:285)
	at org.eclipse.wst.validation.internal.TaskListUtility.getValidationTasks(TaskListUtility.java:330)
	at org.eclipse.wst.validation.internal.TaskListUtility.removeTaskSubset(TaskListUtility.java:423)
	at org.eclipse.wst.validation.internal.TaskListUtility.removeAllTasks(TaskListUtility.java:403)
	at org.eclipse.wst.validation.internal.TaskListUtility.removeAllTasks(TaskListUtility.java:399)
	at org.eclipse.wst.validation.internal.operations.WorkbenchReporter.removeAllMessages(WorkbenchReporter.java:164)
	at org.jboss.tools.seam.internal.core.validation.SeamProjectPropertyValidator.validateSeamProject(SeamProjectPropertyValidator.java:275)
	at org.jboss.tools.seam.internal.core.validation.SeamProjectPropertyValidator.validateInJob(SeamProjectPropertyValidator.java:125)
	at org.eclipse.wst.validation.internal.operations.ValidatorJob.run(ValidatorJob.java:78)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
{code}

4. @SuppressWarnings("cdi-annotated-observer") does not work for "Observer method cannot be annotated @Inject [JSR-299 §10.4.2]" problem marker in case of parameter:

{code}
 @Inject
   public void initialize(@SuppressWarnings({"cdi-annotated-observer", "cdi-ambiguous-dependency"}) @Observes String string)
   {
   }
{code}
                  
> Add support for a @SuppressWarnings
> -----------------------------------
>
>                 Key: JBIDE-10187
>                 URL: https://issues.jboss.org/browse/JBIDE-10187
>             Project: Tools (JBoss Tools)
>          Issue Type: Feature Request
>          Components: common/jst/core
>    Affects Versions: 3.3.0.M4
>            Reporter: Cody Lerum
>            Assignee: Alexey Kazakov
>             Fix For: 3.3.0.Beta1
>
>         Attachments: Add_ at SuppressWarnings.png, Add_ at SuppressWarnings2.png, Add_ at SuppressWarnings2.png, Add_ at SuppressWarnings3.png, Add_ at SuppressWarnings3.png, ButtonNameBorrowedFromProject.png, ManySuggestionsToAddSuppressWarnings.png
>
>
> Would be nice to place a 
> @SuppressWarning("ambigiousinjection") or similar on an injection point that tooling can't figure out.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the jbosstools-issues mailing list