Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to automatic register handler annotated with RegisterActionH... #292

Merged
merged 4 commits into from
Jul 18, 2013

Conversation

igieon
Copy link
Contributor

@igieon igieon commented Jul 17, 2013

No description provided.

* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not valid license

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant this it not the license headers used in others files

@jDramaix
Copy link
Contributor

Thanks for contributing !

I think we could do the same for the non-spring part of gwt-dispatch ?

@igieon
Copy link
Contributor Author

igieon commented Jul 17, 2013

Need to something to change in my contribution ?
"I think we could do the same for the non-spring part of gwt-dispatch ?" what about this ?

@jDramaix
Copy link
Contributor

Need to something to change in my contribution ?

Put the right license header on all files and remove the @author definition in your javadocs. Check also the length of your lines, they should not exceed 120 chars.

"I think we could do the same for the non-spring part of gwt-dispatch ?" what about this ?

It was just a suggestion/ open question. IIRC, when you define a ActionHandler and that you don't use Spring, you have to bind your handler using :

bindHandler( Action.class, Handler.class, Validator.class ); 

We could maybe implements the same mechanism with guice : simply detect the ActionHandler annotated with RegisterActionHandler and bind them automatically (I guess it should be doable). I just want to offer the same feature whatever your are using spring or not.

@igieon
Copy link
Contributor Author

igieon commented Jul 17, 2013

Ok I modify it and resubmit patch.

@igieon
Copy link
Contributor Author

igieon commented Jul 17, 2013

About guice i need to look into guice more to understand how do it on it.

@jDramaix
Copy link
Contributor

Ok I modify it and resubmit patch.

Just commit your changes in your branch and push your branch in the remote repo, that should update this PR

@branflake2267
Copy link
Contributor

Nice job on the source.

Teamcity pull build is complaining a little about checkstyle yet. Might be the first new line after the first class curly.

@igieon
Copy link
Contributor Author

igieon commented Jul 17, 2013

Could you provide update for checkstyle because now maven checkstyle didn't complain about class curly. Or eclipse formater and clean up for you style. Thanks.

@branflake2267
Copy link
Contributor

Here are the rules for the checkstyle, and one of these can be added to the eclipse plugin https://github.com/ArcBees/GWTP/tree/master/gwtp-build-tools/src/main/resources

*
*/
public class AnnotatedActionBeandHandlerRegistrator implements BeanPostProcessor, Ordered {

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove new lines after the first class curly. :) This may be one of the checkstyle complaints.

@igieon
Copy link
Contributor Author

igieon commented Jul 17, 2013

I use https://github.com/ArcBees/GWTP/tree/master/gwtp-build-tools/src/main/resources this one but the eclipse nor the maven checkstyle doesn't complain about this lines.

@branflake2267
Copy link
Contributor

Good question, not sure which items its complaining about, I thought maybe that might be it. :) mvn checkstyle:checkstyle might tell a better story.

@igieon
Copy link
Contributor Author

igieon commented Jul 17, 2013

ok here is my command line about checkstyle after remove new lines no checkstyle complain and before alse

C:\Users\davidignjic\Documents\GitHub\GWTP\gwtp-core\gwtp-dispatch-server-spring [master +1 ~1 -0 !]> git log -2
commit 8d7b2456849fa10d84d7e57a90c04902edfbdc49
Author: David Ignjić <[email protected]>
Date:   Wed Jul 17 16:32:22 2013 +0200

    Remove empty new lines

commit 6d7f8fe8a961018183ef5dfa5862dc1f8098da89
Author: David Ignjić <[email protected]>
Date:   Wed Jul 17 15:05:48 2013 +0200

    Modify source to  comply with checkstyle
C:\Users\davidignjic\Documents\GitHub\GWTP\gwtp-core\gwtp-dispatch-server-spring [master +1 ~1 -0 !]> mvn checkstyle:che
ckstyle
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building GWTP Dispatch Server, Spring implementation 1.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-checkstyle-plugin:2.7:checkstyle (default-cli) @ gwtp-dispatch-server-spring ---
[INFO] Starting audit...
Audit done.

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.027s
[INFO] Finished at: Wed Jul 17 16:36:18 CEST 2013
[INFO] Final Memory: 17M/217M
[INFO] ------------------------------------------------------------------------
C:\Users\davidignjic\Documents\GitHub\GWTP\gwtp-core\gwtp-dispatch-server-spring [master +1 ~1 -0 !]> git checkout 6d7f8
fe8a961018183ef5dfa5862dc1f8098da89
M       gwtp-core/gwtp-dispatch-server-guice/src/main/java/com/gwtplatform/dispatch/server/guice/actionhandlervalidator/
LazyActionHandlerValidatorRegistryImpl.java
Note: checking out '6d7f8fe8a961018183ef5dfa5862dc1f8098da89'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b new_branch_name

HEAD is now at 6d7f8fe... Modify source to  comply with checkstyle
C:\Users\davidignjic\Documents\GitHub\GWTP\gwtp-core\gwtp-dispatch-server-spring [(6d7f8fe...) +1 ~1 -0 !]> mvn clean ch
eckstyle:checkstyle
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building GWTP Dispatch Server, Spring implementation 1.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ gwtp-dispatch-server-spring ---
[INFO] Deleting C:\Users\davidignjic\Documents\GitHub\GWTP\gwtp-core\gwtp-dispatch-server-spring\target
[INFO]
[INFO] --- maven-checkstyle-plugin:2.7:checkstyle (default-cli) @ gwtp-dispatch-server-spring ---
[INFO] Starting audit...
Audit done.

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.354s
[INFO] Finished at: Wed Jul 17 16:36:50 CEST 2013
[INFO] Final Memory: 18M/217M
[INFO] ------------------------------------------------------------------------
C:\Users\davidignjic\Documents\GitHub\GWTP\gwtp-core\gwtp-dispatch-server-spring [(6d7f8fe...) +1 ~1 -0 !]>

@branflake2267
Copy link
Contributor

Hmm... @meriouma do you know what might be going on with checkstyle?

@meriouma
Copy link
Member

I'm looking at it

@meriouma
Copy link
Member

Your ArcBees/GWTP git remote seems out of date (hence the conflict). You need to merge ArcBees/GWTP:master in your igieon/GWTP:master branch

Conflicts:
	gwtp-core/gwtp-dispatch-server-spring/src/main/java/com/gwtplatform/dispatch/server/spring/actionhandlervalidator/LazyActionHandlerValidatorRegistryImpl.java
@igieon
Copy link
Contributor Author

igieon commented Jul 18, 2013

Merged with master

@christiangoudreau
Copy link
Member

@imrabti could you do a review?

@imrabti
Copy link
Contributor

imrabti commented Jul 18, 2013

LGTM,
To use this new annotation, we need to declare AnnotatedActionBeandHandlerRegistrator as a Bean Right ?

@igieon
Copy link
Contributor Author

igieon commented Jul 18, 2013

Yes, as you can see in test.

christiangoudreau added a commit that referenced this pull request Jul 18, 2013
Add support to automatic register handler annotated with RegisterActionH...
@christiangoudreau christiangoudreau merged commit f53d899 into ArcBees:master Jul 18, 2013
@christiangoudreau
Copy link
Member

This seems undocumented. @imrabti could you please document this feature in the wiki?

@igieon
Copy link
Contributor Author

igieon commented Aug 13, 2013

Provide some example in wiki or what ?

@christiangoudreau
Copy link
Member

Exactly

christiangoudreau added a commit that referenced this pull request Apr 4, 2014
Add support to automatic register handler annotated with RegisterActionH...
hpehl pushed a commit to hpehl/GWTP that referenced this pull request Dec 9, 2014
Add support to automatic register handler annotated with RegisterActionH...


Former-commit-id: fec0ac4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants