Coder Social home page Coder Social logo

cemeyer2 / dagger-plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from madrapps/dagger-plugin

0.0 0.0 0.0 1 MB

Plugin that supports easy usage of Dagger 2 library in IntelliJ iDEA or Android Studio

License: Apache License 2.0

Java 24.93% Kotlin 75.07%

dagger-plugin's Introduction

Dagger Plugin

IntelliJ iDEA plugin to work with Java/Kotlin projects using Dagger 2 library

preview

Install

You can install the plugin from Preferences -> Plugins and search for the plugin. You can also download the plugin from the intelliJ iDEA Marketplace.

Features

  • View the dependency graph in tree format
  • Jump to source code from the graph
  • View parents and children of a node in the graph
  • View basic validation errors directly in the editor
  • Fully supported for project using both Java and Kotlin including Android

Usage

  • Build your project, and the graph will be displayed in the Dagger tool window
  • Tap on Refresh in the Dagger tool window to refresh the graph
  • The plugin itself uses Dagger 2.31 and hence validations and graph will be calculated based on this version. For optimal usage, consider updating Dagger to the latest version

Testing

All validation logic are unit tested. The test data is organised in the following structure:

src
  |_test
    |_testData
      |_component
        |_ ... (directory for each error highlight)
      |_inject
        |_ ... (directory for each error highlight)

For each error highlight multiple test cases are written. You will notice that there are no test cases under test/kotlin/com.madrapps.dagger. For each annotation there will be a KT test file annotated with GenerateTest. The test cases (classes and methods) are created at compile time by means of the annotation processor: dagger-plugin-processor. The above testData directory structure is crucial for the processor to work properly.

For more clarity, take a look at src/test/kotlin/com.madrapps.dagger.InjectTestCase.kt

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.