alxsty / idea-generate-fluent-interface Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/idea-generate-fluent-interface
Automatically exported from code.google.com/p/idea-generate-fluent-interface
What steps will reproduce the problem?
1. Select "Generate Fluent Interface Methods..."
2. Select fields and click OK
What is the expected output? What do you see instead?
I expect to see generated getters and setters but I got an exception instead:
2:17:23 PM NoClassDefFoundError: Error during dispatching of
java.awt.event.InvocationEvent[INVOCATION_DEFAULT,runnable=com.googlecode.genera
tefluentinterface.GenerateFluentInterfaceActionHandlerImpl$1@3ed30f96,notifier=n
ull,catchExceptions=false,when=1365419841143] on sun.awt.X11.XToolkit@4da8bb5d:
com/sixrr/rpp/intention/PsiElementPredicate
What version of the product are you using? On what operating system?
Plugin version: 0.7.8
Intellij IDEA 12.1 (Community Edition)
OpenJDK 1.7.0_15
Ubuntu 12.04
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 8 Apr 2013 at 11:34
a check box is show in member chooser, having the user able to choose when
getter methods are generated
-- extra enhancement:
has a default of unchecked, and should remember the user's choice
Original issue reported on code.google.com by [email protected]
on 10 Jun 2011 at 6:17
Generated methods should be present at caret
Original issue reported on code.google.com by [email protected]
on 7 Jun 2011 at 10:09
It would be nice if the dialog persisted the settings across launches. For
example, if I select the getters checkbox and provide a value for the setters
prefix then it should remember that the next time I launch the action.
I believe IntelliJ has a mechanism for this:
http://confluence.jetbrains.net/display/IDEADEV/Persisting+State+of+Components
Original issue reported on code.google.com by [email protected]
on 10 Aug 2012 at 11:40
For a class like this:
public static class Parameters {
String testName;
int numThreads;
}
When I try to generate Fluent methods, it says "No members exist for which
fluent interface can be generated". Even when I create getters and setters
using the built-in IJ task it reports this error.
Original issue reported on code.google.com by [email protected]
on 17 Jun 2013 at 6:45
The setters & getters seem to be always inserted right after the class fields.
The user should be able to choose where they are inserted, and the behaviour
should be consistent with the native setter/getter intention of IntelliJ:
insertion at the cursor position.
Original issue reported on code.google.com by [email protected]
on 26 Jul 2014 at 4:16
It would be nice if the plugin could be configured to delegate to an existing
setter if it exists in the fluent method rather than doing the assignment
itself.
Example:
class Foo {
private String bar;
public void setBar(String s) {
bar = s;
}
public Foo withBar(String s) {
setBar(s);
}
}
Original issue reported on code.google.com by [email protected]
on 5 Dec 2013 at 1:42
It would be great if the setter prefix was persisted.
This could be achieved either through a settings page window as a preferred
prefix.
Original issue reported on code.google.com by [email protected]
on 20 Aug 2012 at 11:47
The dialog should allow for the setting of a prefix for the getters. This would
allow the generation standard getters along with the fluent style methods.
Granted, there are ways around this. One could run the standard getter/setter
plugin followed by running the fluent plugin for fluent only. The value of
offering this in the fluent api is that it saves the step of the extra
generation.
Original issue reported on code.google.com by [email protected]
on 10 Aug 2012 at 11:44
As the getter / setter generation in idea pack, when multiple fields are picked
up from member chooser having some of them getter / setter are present,
duplicate generation should be avoid.
Original issue reported on code.google.com by [email protected]
on 10 Jun 2011 at 6:19
I've been taking to annotating all of my generated code like toString, fluent,
equals, hashCode, etc with the @Generated annotation. This serves as a hint to
future developers that they should consider regenerating the code as opposed to
hand modifying it.
I haven't modified the GUI to capture this as a checkbox but here's what I've
done in the worker that generates the code:
private void createMethodFromText(String methodText) {
PsiMethod psiMethod = elementFactory.createMethodFromText(methodText, null);
PsiAnnotation annotation = elementFactory.createAnnotationFromText("@javax.annotation.Generated(value=\"intellij\")", psiMethod);
psiMethod.getModifierList().addAfter(annotation, null);
JavaCodeStyleManager.getInstance(project).shortenClassReferences(psiMethod);
codeStyleManager.reformat(psiMethod);
psiClass.add(psiMethod);
}
The value attribute for the annotation is required. I've simply hard coded it
to "intellij". I could see having this as a text field on the UI as well.
Original issue reported on code.google.com by [email protected]
on 10 Aug 2012 at 11:48
when implementing a DSL, user might want to add some certain prefix(like
'with') to the setters.
ui design:
there should be a input box in member chooser where user can type in their
prefix, defaults to blank but should remember the user's last prefix.
Original issue reported on code.google.com by [email protected]
on 10 Jun 2011 at 6:25
Allow generating for protected fields
Original issue reported on code.google.com by [email protected]
on 15 Nov 2012 at 10:08
Expected: CTRL-N provide selection for for public and private fields alike.
Rational: fluent interface is convenient for building data transfer objects,
and DTO by they nature do not need to have private fields at all
Original issue reported on code.google.com by [email protected]
on 7 Nov 2013 at 11:02
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.