GithubHelp home page GithubHelp logo

idea-generate-fluent-interface's Issues

Doesn't work in IntelliJ 12?

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

Support calling setter instead of duplicating it

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

don't generate if exists

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

Insertion point

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

persist the selections across invocations

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

Support optional javax.annotation.Generated annotation on all of the generated methods

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

NoClassDefFoundError: com/sixrr/rpp/intention/PsiElementPredicate

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

provide option to define setter method name prefix

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

Support prefix for getters

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.