| Summary: | Subwords completion proposals generalization | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Paul-Emmanuel Faidherbe <pef041> | ||||||||||||||||||||
| Component: | Recommenders | Assignee: | Marcel Bruch <marcel.bruch> | ||||||||||||||||||||
| Status: | CLOSED FIXED | QA Contact: | |||||||||||||||||||||
| Severity: | normal | ||||||||||||||||||||||
| Priority: | P3 | CC: | lerch | ||||||||||||||||||||
| Version: | unspecified | ||||||||||||||||||||||
| Target Milestone: | --- | ||||||||||||||||||||||
| Hardware: | PC | ||||||||||||||||||||||
| OS: | Windows Vista | ||||||||||||||||||||||
| Whiteboard: | |||||||||||||||||||||||
| Attachments: |
|
||||||||||||||||||||||
|
Description
Paul-Emmanuel Faidherbe
Created attachment 196783 [details]
new generic requestor
Modified to use JDT proposal collector and subword decorator
Created attachment 196784 [details]
Newly created decorator
Decorates jdt proposals with new prefix check
Created attachment 196785 [details]
Modified to match jdt architecture
isPrefix made protected
Created attachment 196786 [details]
Proposal for fields
Created to manage proposals for static members, attributes...
May not entirely compile because not all "subwords proposals" are provided (overrides proposals, casted types...). Comment missing one for testing purposes Created attachment 196829 [details] review comments in patch format I created a patch from your individual changes using 'git format-patch -M master --stdout > review-comments.patch' To apply this patch use 'git apply'. Please read http://ariejan.net/2009/10/26/how-to-create-and-apply-a-patch-with-git/ before doing so. Be sure that you don't overwrite your uncommitted local changes made before :) The patch looks quite good - and best of all: it works :) I added some review comments to methods and classes. Please check them and modify the sources to reflect the comments where appropriate. Next steps: Create a new complete patch following the guidelines described here http://wiki.eclipse.org/Recommenders/Contributor_Guide#Contributing_Patches and attach them to this bug again for review. Also, please add EPL license headers to all newly created files as described in the contributor guide above. Thanks a lot! I'm looking forward to your next patch! :) Marcel Created attachment 196921 [details]
Patch generated by Gitk
Try for Patch generated by Gitk
Created attachment 196922 [details]
Patch Generated by Tortoise
Try for Patch Generated by Tortoise
Hi Pef, unfortunately, I've some trouble applying your patches. The Tortoise-patch worked best - however failed with the error messages below. Did you update to the latest version? If not, please consider rebasing to the latest head and recreating your patch afterwards. Make sure you have a backup copy of repository before doing this! If you get into trouble with this let's go for the simplest solution: # create a new clone of the code recommenders repository using > git clone --branch subwords-patch http://git.eclipse.org/gitroot/recommenders/org.eclipse.recommenders.git Now, you have a clean and latest version of code recommenders and just create a local feature branch called "subwords-patch" # Next, reapply your changes on the files contained in this feature branch/current working directory > edit... # Commit your changes: > git commit -a -m "my changes..." You may double-check with Tortoise that everything seems correct # Then create your patch (I'm assuming that you did just one commit): > git format-patch origin/master --stdout > [description]-[issue-number].patch # Finally attach this patch to this bug report. You may find this resource helpful for creating patches: > http://drupal.org/node/1054616 Thanks, Marcel 0233:org.eclipse.recommenders Marcel$ git apply pef-subwords-completion-generalization_Tortoise.patch.txt pef-subwords-completion-generalization_Tortoise.patch.txt:64: trailing whitespace. pef-subwords-completion-generalization_Tortoise.patch.txt:81: trailing whitespace. /** pef-subwords-completion-generalization_Tortoise.patch.txt:82: trailing whitespace. * Copyright (c) 2010 Darmstadt University of Technology. pef-subwords-completion-generalization_Tortoise.patch.txt:83: trailing whitespace. * All rights reserved. This program and the accompanying materials pef-subwords-completion-generalization_Tortoise.patch.txt:84: trailing whitespace. * are made available under the terms of the Eclipse Public License v1.0 error: patch failed: org.eclipse.recommenders.rcp.codecompletion.subwords/src/org/eclipse/recommenders/rcp/codecompletion/subwords/SubwordsJavaMethodCompletionProposal.java:1 error: org.eclipse.recommenders.rcp.codecompletion.subwords/src/org/eclipse/recommenders/rcp/codecompletion/subwords/SubwordsJavaMethodCompletionProposal.java: patch does not apply error: patch failed: org.eclipse.recommenders.tests.rcp.codecompletion.subwords/src/org/eclipse/recommenders/tests/rcp/codecompletion/subwords/RegexMatcherTest.java:1 error: org.eclipse.recommenders.tests.rcp.codecompletion.subwords/src/org/eclipse/recommenders/tests/rcp/codecompletion/subwords/RegexMatcherTest.java: patch does not apply error: patch failed: org.eclipse.recommenders.tests.rcp.codecompletion.subwords/src/org/eclipse/recommenders/tests/rcp/codecompletion/subwords/SubwordsCompletionProposalComputerTest.java:1 error: org.eclipse.recommenders.tests.rcp.codecompletion.subwords/src/org/eclipse/recommenders/tests/rcp/codecompletion/subwords/SubwordsCompletionProposalComputerTest.java: patch does not apply s0233:org.eclipse.recommenders Marcel$ Created attachment 196929 [details]
Patch from clean branch
This time your cmd worked fine I think... It gave same output as Tortoise. I hope it is a well formed patch!
It worked. Thanks. Johannes, could you review the patch and add your comments if you find major things that may need revision? Thanks, Marcel Patch looks good to me. Just two answers to your questions: 1) SubwordsCompletionProposalFactory: Throws.throwUnreachable can be found in the bundle org.eclipse.recommenders.commons.utils. To use it you will have to add that bundle as dependency first. 2) SubwordsCompletionRequestor: The null check can be removed as the factory is not returning null, right? You also may want to catch the CoreException in the factory already. Handling of that exception could be to just wrap it in a RuntimeException so you do not need to handle it the whole way up. Ah, forgot one important point: Nice you have inserted the license header to new classes. Badly, you forgot to change the name ;-) You're not Marcel. (In reply to comment #12) > Patch looks good to me. > Just two answers to your questions: > 1) SubwordsCompletionProposalFactory: > Throws.throwUnreachable can be found in the bundle > org.eclipse.recommenders.commons.utils. To use it you will have to add that > bundle as dependency first. > 2) SubwordsCompletionRequestor: > The null check can be removed as the factory is not returning null, right? You > also may want to catch the CoreException in the factory already. Handling of > that exception could be to just wrap it in a RuntimeException so you do not > need to handle it the whole way up. How do you create dependencies? Using pom.xml or simply adding project to build path? Thank you Dependencies are managed the eclipse way: by osgi. Just open the META-INF/MANIFEST.MF file and add another required bundle in the dependency tab. Created attachment 197040 [details]
Clean code patch
Clean code patch
Hi Pef. Just for the records: I filed a CQ (contribution request) to the Eclipse IP Team. I've no idea how long it will take to review this patch - especially because of the upcoming Indigo release. Let's hope that someone of the IP team can spent a few minutes on this soon :) Thanks, Marcel I authored 100% of the content I am contributing I have the rights to contribute the content I'm contributing the content under the EPL This contribution has been merged into HEAD. Thanks! |