Giter VIP home page Giter VIP logo

lambda4jdt's Introduction

lambda4jdt

2012 version of lambda4jdt. Eclipse plugin to fold anonymous inner classes as lambdas in Java Editor.

Read original description at http://code.google.com/p/lambda4jdt/. What's here:

  • Support for Eclipse Indigo SR2 3.7.2
  • Remove need for marker comment, simplify to one-size fits all
  • No further development planned, no features, no Juno support etc

EPL License http://www.eclipse.org/legal/epl-v10.html

Update site: https://github.com/elucash/lambda4jdt/raw/master/com.github.elucash.lambda4jdt.site/

Install plugins and then goto Preferences->Java->Editor->Folding, select folding to use "Lambda4jdt Folding". Any newly opened Java editor will pickup lambda4jdt

Read also http://code.google.com/p/guava-libraries/wiki/FunctionalExplained#Caveats

Examples

Executor e =...
e.execute {
   doSomething(a);
}
final int i = 1;//you still need final to access i in function
h.invoke(obj, () doSomethingWithIn(i));
Arrays.sort(array, (o1, o2) o1.hashCode() - o2.hashCode());

//Nested closure constructs are supported to some degree
interface Provider<T> {
  T get(Object context);
}

public Provider<Provider<Provider<String>>> myProvider() {
  return new Provider<Provider<Provider<String>>>() {
    public Provider<Provider<String>> get(Object c) {
      return new Provider<Provider<String>>() {
        public Provider<String> get(Object c) {
          return new Provider<String>() {
            public String get(Object c) {
              return "MyFavoriteStringFactory" + c;
            }
          };
        }
      };
    }
  };
}
//....
// Which may be collapsed to..
public Provider<Provider<Provider<String>>> myProvider() {
  return (c) (c) (c) "MyFavoriteStringFactory" + c;
}

lambda4jdt's People

Contributors

elucash avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

growthinky

lambda4jdt's Issues

Eclipse Mars : folding hides whole block

Hello,

I stumbled upon your nice little project to provide "lambda folding" as in IntelliJ in eclipse. However, it doesn't seem to work right in eclipse Mars. The whole anonymous class gets hidden and no way to expand.

Any idea if this is going to be fixed?

Kind regards

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.