Giter Site home page Giter Site logo

knorxx's People

Contributors

janscheible avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

knorxx's Issues

Add Java 8 support to JavaSourceDependencyCollector

The currently used com.google.code.javaparser only supports Java 5 sources. Replacing it by a newer parser (e.g. the Java 8 parser of PMD) would allow the usage of Java 8 (st-js already supports Java 8).
The implementation of this ticket is a prerequesite for #4.

Missing namespace of enum types without source

Because the enum types outside of the web project are not reloaded by the ReloadingClassLoader they receive no @Namespace annotation and therefore st-js treats them as default package residents.

EnumGenerator should also support arbitrary additional fields

The EnumGenerator class should also support enum fields with a getter. For a enum like

public enum TestEnumWithValues {    
    FIRST("Test");

    private final String text;

    private TestEnumWithValues(String text) {
        this.text = text;
    }

    public String getText() {
        return text;
    }
}

it should be possible to use TestEnumWithValues.FIRST.getText() in the classes which are transpiled to JavaScript.

Enum types from other JARs still need the Java source in the JARs

This is related to #10 which indeed allows the usage of enum types from other JARs.
But the other JARs still need the Java source embedded. This is not the fault of the EnumGenerator but a problem in the JavaScriptGenerator. It looks up the source with new JavaFileWithSource<>(javaClass, generationRoots); even if it is not needed for EnumGenerator.

This bug is not a real problem for own JARs for which we simple can embed the Java source. But for third-party JARs it's a problem...

Dependent class not found by ByteCodeDependencyCollector

The ByteCodeDependencyCollector is not able to identify the usage of the class StaticHelperClass in the following example:

package knorxx.framework.generator.dependency.testclass.bytecode;

public class AnonymousInnerClassWithStaticHelperInSamePackage {

    public void test() {
        System.out.println(new Runnable() {

            @Override
            public void run() {
                StaticHelperClass.doIt();
            }
        });
    }
}

Add an annotation for defining a scope for the generated CSS rules

@StyleScope(".myApplication")
public class Appearance extends CssDefinition {
    String HEADING_STYLE = build(Properties.builder()
            .setBackground(convertColor(DEFAULT_COLOR))
            .setColor(convertColor(Color.WHITE)));
}

This should still lead to the corresponding generated JavaScript for referencing the rule:

Appearance.HEADING_STYLE = 'headingStyle';

But to an additional selector for the generated CSS rules:

.myApplication .headingStyle {
    background-color: #ff0000;
    color: #ffffff;
}

Enum types without sources are not generatable

St-js needs the source of classes to generate available. Unfortunately for enum types in JAR libraries this is not possible. The special generator EnumGenerator will do that instead of st-js. The EnumGenerator will only rely on the byte code, no source is needed.

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.