package com.bitdecay.jump.leveleditor.ui.component;

import com.bitdecay.jump.geom.BitPoint;
import com.bitdecay.jump.properties.BitBodyProperties;

import java.util.HashMap;
import java.util.Map;

public class ComponentBuilderFactory {

    public static final String GENERIC_BUILDER = "generic";

    public static final String INT = "int";
    public static final String FLOAT = "float";
    public static final String BOOLEAN = "boolean";

    private static Map<String, ComponentBuilder> components;

    static {
        components = new HashMap<String, ComponentBuilder>();
        components.put(GENERIC_BUILDER, new GenericComponentBuilder());
        components.put(BitBodyProperties.class.getName(), new GenericComponentBuilder());
        components.put(BitPoint.class.getName(), new BitPointComponentBuilder());
        components.put(INT, new IntComponentBuilder());
        components.put(FLOAT, new FloatComponentBuilder());
        components.put(BOOLEAN, new BooleanComponentBuilder());
    }

    public static ComponentBuilder getBuilder(String name) {
        return components.get(name);
    }
}

@@ -1078,36 +1078,194 @@
     
-return components.get(name);
+ComponentBuilder builder = components.get(name);%0A        if (builder == null) %7B%0A            return components.get(GENERIC_BUILDER);%0A        %7D else %7B%0A            return builder;%0A        %7D
 %0A   

Fix minor inspect error