Giter Club home page Giter Club logo

fluent-builders-generator-eclipse-plugin's People

Watchers

 avatar  avatar

fluent-builders-generator-eclipse-plugin's Issues

Add support to run as a Maven plugin

Add support to run the builder generator as a Maven plugin so that it can be 
run on any project that uses Maven as the build tool and is not tied to Eclipse.

Original issue reported on code.google.com by [email protected] on 25 Apr 2011 at 3:40

Not working with eclipse Juno (4.2)

What steps will reproduce the problem?
Try to generate any simple Fluent builder with a simple class. The dialog 
appears, but with no fields to select and generate the correct builder.

I'm running eclipse 4.2 under mac os x, java 1.6.0_33

When I open the dialog, i get 2 exceptions regarding the logo:

{{{
java.io.FileNotFoundException: /images/logo.png
    at org.eclipse.osgi.framework.internal.protocol.bundleentry.Handler.findBundleEntry(Handler.java:44)
    at org.eclipse.osgi.framework.internal.core.BundleResourceHandler.openConnection(BundleResourceHandler.java:175)
    at java.net.URL.openConnection(URL.java:945)
    at org.eclipse.core.runtime.internal.adaptor.URLConverterImpl.toFileURL(URLConverterImpl.java:32)
    at org.eclipse.core.runtime.FileLocator.toFileURL(FileLocator.java:206)
    at org.eclipse.jface.resource.URLImageDescriptor.getFilePath(URLImageDescriptor.java:137)
    at org.eclipse.jface.resource.URLImageDescriptor.createImage(URLImageDescriptor.java:157)
    at org.eclipse.jface.resource.ImageDescriptor.createResource(ImageDescriptor.java:165)
    at org.eclipse.jface.resource.DeviceResourceManager.allocate(DeviceResourceManager.java:56)
    at org.eclipse.jface.resource.AbstractResourceManager.create(AbstractResourceManager.java:88)
    at org.eclipse.jface.resource.ResourceManager.createImageWithDefault(ResourceManager.java:192)
    at org.eclipse.jface.wizard.Wizard.getDefaultPageImage(Wizard.java:218)
    at org.eclipse.jface.wizard.WizardPage.getImage(WizardPage.java:151)
    at org.eclipse.jface.wizard.WizardDialog.updateTitleBar(WizardDialog.java:1487)
    at org.eclipse.jface.wizard.WizardDialog.update(WizardDialog.java:1331)
    at org.eclipse.jface.wizard.WizardDialog.showStartingPage(WizardDialog.java:1288)
    at org.eclipse.jface.wizard.WizardDialog.createContents(WizardDialog.java:610)
    at org.eclipse.jface.window.Window.create(Window.java:431)
    at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
    at org.eclipse.jface.window.Window.open(Window.java:790)
    at com.sabre.buildergenerator.ui.actions.GenerateBuilderAction.execute(GenerateBuilderAction.java:83)
    at com.sabre.buildergenerator.ui.actions.GenerateBuilderCompilationUnitEditorAction.run(GenerateBuilderCompilationUnitEditorAction.java:60)
    at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
    at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4134)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1458)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1481)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1466)
    at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1271)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3980)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3619)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1022)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:916)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:585)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:540)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
}}}

And the other one:
{{{
org.eclipse.jface.resource.DeviceResourceException: Unable to create resource 
URLImageDescriptor(bundleentry://1133.fwk1957835280/images/logo.png)
    at org.eclipse.jface.resource.ImageDescriptor.createResource(ImageDescriptor.java:167)
    at org.eclipse.jface.resource.DeviceResourceManager.allocate(DeviceResourceManager.java:56)
    at org.eclipse.jface.resource.AbstractResourceManager.create(AbstractResourceManager.java:88)
    at org.eclipse.jface.resource.ResourceManager.createImageWithDefault(ResourceManager.java:192)
    at org.eclipse.jface.wizard.Wizard.getDefaultPageImage(Wizard.java:218)
    at org.eclipse.jface.wizard.WizardPage.getImage(WizardPage.java:151)
    at org.eclipse.jface.wizard.WizardDialog.updateTitleBar(WizardDialog.java:1487)
    at org.eclipse.jface.wizard.WizardDialog.update(WizardDialog.java:1331)
    at org.eclipse.jface.wizard.WizardDialog.showStartingPage(WizardDialog.java:1288)
    at org.eclipse.jface.wizard.WizardDialog.createContents(WizardDialog.java:610)
    at org.eclipse.jface.window.Window.create(Window.java:431)
    at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
    at org.eclipse.jface.window.Window.open(Window.java:790)
    at com.sabre.buildergenerator.ui.actions.GenerateBuilderAction.execute(GenerateBuilderAction.java:83)
    at com.sabre.buildergenerator.ui.actions.GenerateBuilderCompilationUnitEditorAction.run(GenerateBuilderCompilationUnitEditorAction.java:60)
    at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
    at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4134)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1458)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1481)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1466)
    at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1271)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3980)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3619)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1022)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:916)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:585)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:540)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1438)

}}}

If i click select all (even with no fields), I get this excepction in the error 
log:

{{{
java.util.NoSuchElementException
    at java.util.LinkedHashMap$LinkedHashIterator.nextEntry(LinkedHashMap.java:375)
    at java.util.LinkedHashMap$ValueIterator.next(LinkedHashMap.java:388)
    at com.sabre.buildergenerator.ui.TypeTree.populateStateChange(TypeTree.java:120)
    at com.sabre.buildergenerator.ui.wizard.GenerateBuilderWizardPage.transferTreeModelToUI(GenerateBuilderWizardPage.java:737)
    at com.sabre.buildergenerator.ui.wizard.GenerateBuilderWizardPage.access$0(GenerateBuilderWizardPage.java:735)
    at com.sabre.buildergenerator.ui.wizard.GenerateBuilderWizardPage$4.widgetSelected(GenerateBuilderWizardPage.java:342)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4134)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1458)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1481)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1466)
    at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1271)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3980)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3619)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
    at org.eclipse.jface.window.Window.open(Window.java:801)
    at com.sabre.buildergenerator.ui.actions.GenerateBuilderAction.execute(GenerateBuilderAction.java:83)
    at com.sabre.buildergenerator.ui.actions.GenerateBuilderCompilationUnitEditorAction.run(GenerateBuilderCompilationUnitEditorAction.java:60)
    at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
    at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4134)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1458)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1481)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1466)
    at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1271)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3980)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3619)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1022)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:916)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:585)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:540)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1438)

}}}

Thanks
jordi

Original issue reported on code.google.com by [email protected] on 6 Sep 2012 at 3:29

Missing generic comments for files and classes.

Hi Folks.

It would be a nice feature if your FluentBuilder generator could create a
java file with all the default comments which are by default defined in:

Preferences->Java->Code Style->Code Templates->Comments.

Regards
W.K.

Original issue reported on code.google.com by [email protected] on 29 Apr 2010 at 1:47

Use Setters with more then one formal parameter

Enhancement request

Why is it not possible to build the fluent interface for
setter which are have more then one formal input parameter?

E.g, for a small application I want to have a builder to
create some control-flows (if/elseif/else) in a object (see below - MainFlow).

Your version 1.0.9 only detects setters with exact one formal input parameter.

Uwe


MainFlow.java
-----
import org.apache.log4j.BasicConfigurator;
import org.apache.log4j.ConsoleAppender;
import org.apache.log4j.PatternLayout;

public class MainFlow {

    /**
     * @param args
     */
    public static void main(String[] args) {
        BasicConfigurator.configure(new ConsoleAppender (new PatternLayout ("%m [%d:%14t:%C:%L]%n")));

        ControlFlow flow = ControlFlowBuilder.controlFlow()
        .withIf("cond1")
          .withStep("lhs1", "rhs1")
          .withStep("lhs2", "rhs2")
          .withStep("lhs3", "rhs3")
        .withElseIf("cond2")
          .withStep("lhs4", "rhs4")
                .withElse().
                  .withStep("lhs5", "rhs5")
          .build();

    }

}

ControlFlow.java

---
import org.apache.log4j.Logger;


public class ControlFlow {
    private static final Logger logger = Logger.getLogger(ControlFlow.class);

    public void setIF (String expression) {
        logger.info("IF: expression=" + expression);
    }

    public void setStep (String lhsExpression, String rhsExpression) {
        logger.info("  STEP: lhs=" + lhsExpression + " rhs=" + rhsExpression);
    }

    public void setElseIf (String expression) {
        logger.info("ELSEIF: expression=" + expression);
    }

    public void setElse () {
        logger.info("ELSE");
    }

}

Original issue reported on code.google.com by [email protected] on 17 Nov 2010 at 4:54

Cannot invoke builder on some classes

What steps will reproduce the problem?

1. source -> generate fluent builder (see 1st screenshot)
2. once again: source -> generate fluent builder (see 2nd screenshot)

System: WinXP, Galileo.

Generaly: the plugin works on some classes, on some it does not.

Original issue reported on code.google.com by [email protected] on 16 Mar 2010 at 9:34

Attachments:

Can't Complile for test

Having this compilation error
The method endParameter() is undefined for the type 
JavaSourceBuilderBase.MethodParameterBuilderBase

in the file BuilderSourceGenerator line 259 and 354

How to fix that ?

Original issue reported on code.google.com by [email protected] on 21 Apr 2014 at 6:20

Doesn't works when class has self-relatioship

What steps will reproduce the problem?
1. Create a class X
2. create an attribute Set<X> childXs;
3. execute the generator.

What is the expected output? What do you see instead?
There is a error on the generated internal class.

What version of the product are you using? On what operating system?
1.0.8

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 21 Jul 2010 at 2:08

I can't install plugin with org.eclipse.equinox.p2.core

Hi,
I have the following script to install this plugin on a new developing machine,

/opt/homebrew-cask/Caskroom/eclipse-jee/4.5/Eclipse.app/Contents/MacOS/eclipse \
-clean -purgeHistory \
-application org.eclipse.equinox.p2.director \
-noSplash \
-repository http://moreunit.sourceforge.net/update-site/, 
http://fluent-builders-generator-eclipse-plugin.googlecode.com/hg/site/ \
-installIUs org.moreunit, ?

But I don't have any feature name. What feature I have to use?

Thank you very much
Alberto 

Original issue reported on code.google.com by [email protected] on 2 Aug 2015 at 2:27

Add ability to build in-place

It would be nice to have an option not to seperate building to a builder,
but leaving it in class. like here
http://en.wikipedia.org/wiki/Fluent_interface#Java

and then I would start from 

class Car {

private int year;
private String model;

}

and the expected result is

class Car {

private int year;
private String model;

public Car year(int year) {
    this.year= year;
    return this;
}


public Car make(String make) {
    this.make = make;
    return this;
}

}

of course the prefix should be configurable but not obligatory.

Original issue reported on code.google.com by [email protected] on 17 Mar 2010 at 9:43

Not able to generate builder for classes having a poperty which type is a (self) static inner class

What steps will reproduce the problem?
1. Try to generate the builder for the attached SimpleClassWithInnerClass.java
2. You will be presented the attached error

Expected output: builder classes
Actual output: attached error (sorry for the screenshot I was not able to
extract the text)

What version of the product are you using? On what operating system?
Eclipse 3.5.2 - Ubuntu Lucid Linux (x86)

Original issue reported on code.google.com by [email protected] on 27 May 2010 at 12:59

Attachments:

cannot select default setters

What steps will reproduce the problem?
1. create a class with default and public setters
2. generate builder in eclipse
3. cannot see any default setters in "Select Setters" (only public setters are 
shown)

What is the expected output? What do you see instead?
I think I should be able to select  'default' setters since the XXXBuilder is 
in the same package

What version of the product are you using? On what operating system?
plugin 1.0.9
Ubuntu 10.04
Eclipse 3.5

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 21 Aug 2010 at 6:42

Support immutable object builders as static inner classes (as proposed by Josh Bloch)

This is a request for an enhancement to your plugin to support Java builders as 
static inner classes as proposed by Josh Bloch in Effective Java (item #2 and 
here: http://drdobbs.com/java/208403883?pgno=2 ).

This pattern enforces immutability on the object being built, which is 
important in a multi-threaded environment. Encapsulating the builder inside the 
class that it builds also facilitates code maintenance. 

Original issue reported on code.google.com by [email protected] on 16 Apr 2011 at 3:24

Doesn't work with eclipse galileo

What steps will reproduce the problem?
1.Install the plugin on eclipse Galileo
2.Open the examples project
3.Right click on a class name.

What is the expected output? 
A new option inside the Source menu, to generate the builder.

What do you see instead?
No new option.

What version of the product are you using? On what operating system?
Ubuntu 10.10
Eclipse Galileo 3.5.2 installed from aptitude.
Fluent Builders Generator 1.0.9 installed from the update site.

Please provide any additional information below.


I like the idea of your project a lot. From what I can see it is just what I 
require. But I haven't been able to generate the builder. Am I missing 
something or is it just not working with Galileo?

I would love to help you, because this project will help me a lot :D
thanks,
pura vida.

Original issue reported on code.google.com by [email protected] on 10 Nov 2010 at 6:49

Ability to generate a parent Builder

Is it possible to generate a parent builder class that references and invoke 
all the generated builders?

It will lead to something like this.

Given two model Classes: User and Account
Actually, FB generates two builder, UserBuilder and AccountBuilder, that allow 
this:

Account ac = AccountBuilder.account().withNumber("555-...").build();
and
user u = UserBuilder.user().withName("toto").withAccount(ac).build();


My purpose is the ability to generates a parent builder.
The code will now seem like this:
Account ac = Builder.account().withNumber("555-...").build();
and 
User u = Builder.user().withName("toto").withAccount(ac).build();

Here, we don't reference any specific Builder but the generic.

Its implementation will seem like this:

public class Builder {
public static UserBuilder user() {
return UserBuilder.user();}
public static Account Builder user() {
return Account Builder.account();}
}

An alternative is something with generics like

Builder<User>.instance().withName("toto").build();

It may be more difficult to implement, but a little more usable isn't it?



It's just a little improvement, but it could be clever ;).

Regards, thank you for this nice plugin.

Tcharl

Original issue reported on code.google.com by [email protected] on 5 Dec 2011 at 1:43

Change existing instances with fluent interfaces

Hello developers,

I'm new with fluent interfaces but want to ask for an enhancement,
if this makes sense.

Assuming we have a bean/pojo class (e.g. Person) and have
generated an instance (conventionell or with the fluent interface 
"PersonBuilder") like this:

Person p = 
PersonBuilder.person().withFirstName("Ula").withLastName("Uvula").withAge(99).wi
thActive(true).build();

If we want to modify the already create instance in a later situation,
it would be nice to use the fluent interface like this:

p.modify().withAge(33).withActive(false);

To enable this, the POJO class must extended by a method

public PersonBuilder modify () {
  return new PersonBuilder(this);
}

and the generated code must get a second constructor.

Does this make sense?

Ula


Original issue reported on code.google.com by [email protected] on 22 Sep 2010 at 10:42

Creates the builder from a class file

It would be great to have the possibility to generate the builder from a class 
file.

I use beans from external apis with a lot of fields but I don't have source 
file.

Actually, I have to decompile the class file, copy the source into my project, 
generate the builder and modify the import after.

Original issue reported on code.google.com by [email protected] on 10 Mar 2011 at 1:11

Primitive Type short gets imported

What steps will reproduce the problem?
package some.package.needed.to.reproduce;
public class Pojo {
    private short a;

    public short getA() {
        return a;
    }

    public void setA(short a) {
        this.a = a;
    } 
}



What is the expected output? What do you see instead?
package some.package.needed.to.reproduce;

import short;//<-- primitive is imported

public class PojoBuilder extends PojoBuilderBase<PojoBuilder> {
...



What version of the product are you using? On what operating system?
1.0.9 on Eclipse Indigo


Please provide any additional information below.
The plugin works perfectly otherwise.  I just removed the import statement and 
everything is as expected.

Original issue reported on code.google.com by [email protected] on 8 Jul 2011 at 4:59

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.