[jbosstools-issues] [JBoss JIRA] (JBIDE-9898) Completion proposals don't have () in the end of the method names.
Victor Rubezhny (Issue Comment Edited) (JIRA)
jira-events at lists.jboss.org
Thu Oct 13 07:55:16 EDT 2011
[ https://issues.jboss.org/browse/JBIDE-9898?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12634431#comment-12634431 ]
Victor Rubezhny edited comment on JBIDE-9898 at 10/13/11 7:53 AM:
------------------------------------------------------------------
initialiserCalls is not a method, but property having appropriate setter and getter:
{code:title=Debugged Bean Type}
class InitializerSimpleBean [in InitializerSimpleBean.java [in org.jboss.jsr299.tck.tests.implementation.enterprise.newBean [in JavaSource [in tck]]]]
long serialVersionUID
int initializerCalls
void initializer()
void businessMethod()
int getInitializerCalls()
void setInitializerCalls(int)
{code}
{code:title=Source code of InitializerSimpleBean.java}
/*
* JBoss, Home of Professional Open Source
* Copyright 2010, Red Hat, Inc., and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jboss.jsr299.tck.tests.implementation.enterprise.newBean;
import java.io.Serializable;
import javax.ejb.Stateful;
import javax.enterprise.context.SessionScoped;
import javax.enterprise.inject.Default;
import javax.inject.Inject;
import javax.inject.Named;
@Stateful
@SessionScoped
@Named("Charlie")
@Default
public class InitializerSimpleBean implements Serializable, InitializerSimpleBeanLocal
{
private static final long serialVersionUID = 1L;
private static int initializerCalls = 0;
@Inject
public void initializer()
{
initializerCalls++;
}
public void businessMethod()
{
}
public int getInitializerCalls()
{
return initializerCalls;
}
public void setInitializerCalls(int initializerCalls)
{
InitializerSimpleBean.initializerCalls = initializerCalls;
}
}
{code}
You might set the value of "Show Getters and Setters for the properties" preference to true (See: Window->Preferences->JBoss Tools->Web->Editors->Visual Page Editor->Content Assist Preference page) due to see its getter and setter among the proposals.
So, IMO, there is nothing to fix.
was (Author: vrubezhny):
initialiserCalls is not a method, but property having appropriate setter and getter:
{code:title="Debugged Bean Type"}
class InitializerSimpleBean [in InitializerSimpleBean.java [in org.jboss.jsr299.tck.tests.implementation.enterprise.newBean [in JavaSource [in tck]]]]
long serialVersionUID
int initializerCalls
void initializer()
void businessMethod()
int getInitializerCalls()
void setInitializerCalls(int)
{code}
{code:title=InitializerSimpleBean.java}
/*
* JBoss, Home of Professional Open Source
* Copyright 2010, Red Hat, Inc., and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jboss.jsr299.tck.tests.implementation.enterprise.newBean;
import java.io.Serializable;
import javax.ejb.Stateful;
import javax.enterprise.context.SessionScoped;
import javax.enterprise.inject.Default;
import javax.inject.Inject;
import javax.inject.Named;
@Stateful
@SessionScoped
@Named("Charlie")
@Default
public class InitializerSimpleBean implements Serializable, InitializerSimpleBeanLocal
{
private static final long serialVersionUID = 1L;
private static int initializerCalls = 0;
@Inject
public void initializer()
{
initializerCalls++;
}
public void businessMethod()
{
}
public int getInitializerCalls()
{
return initializerCalls;
}
public void setInitializerCalls(int initializerCalls)
{
InitializerSimpleBean.initializerCalls = initializerCalls;
}
}
{code}
You might set the value of "Show Getters and Setters for the properties" preference to true (See: Window->Preferences->JBoss Tools->Web->Editors->Visual Page Editor->Content Assist Preference page) due to see its getter and setter among the proposals.
So, IMO, there is nothing to fix.
> Completion proposals don't have () in the end of the method names.
> ------------------------------------------------------------------
>
> Key: JBIDE-9898
> URL: https://issues.jboss.org/browse/JBIDE-9898
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: CDI, common/jst/core
> Affects Versions: 3.3.0.M4
> Reporter: Alexey Kazakov
> Assignee: Victor Rubezhny
> Fix For: 3.3.0.M4
>
> Attachments: java.png, nobrackets.png
>
>
> EXECUTE: Open CDI tck project (you can use our test tck project from o.j.t.cdi.core.test plug-in)
> EXECUTE: Open any xhtml file
> EXECUTE: Add the following EL: #{Charlie.}
> EXECUTE: Ctrl+Space on #{Charlie.|}
> FAILURE: There are three proposals of Charlie methods but initializerCalls doesn't have () in the end of the label/replacement string:
> !nobrackets.png!
> !java.png!
> What so special in this method?
--
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