Skip to content

cesards/HakunaMatataIntelliJPlugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hakuna Matata Development IntelliJ / AS Plugin

Table of Contents


### Motivation

There are already a bunch of postfix completions for both IntelliJ / Android Studio, but this list could be happily improved by adding more completions and templates to related libraries we use in our day to day. Moreover, the easiest way to share live templates is by a plugin, not to copy manually all files in IntelliJ / Android Studio configuration folder.

Whenever the repo reaches the final version, would be good to merge some of this completions to IntelliJ Community, but first I wanted to give a try to all of you and improve/change/add some other completions and useful templates.

#### Existing templates

These are some of the most important ones (not source information related yet):

Android AndroidLog AndroidParcelable iterations other output plain
const logd Parcelable fori geti serr psf
foreach loge ParcelableEnum itar ifn souf psfi
gone logi ParcelableEnumTest itco inn sout psfs
IntentView logm ParcelBoolean iten inst soutm St
key logr UnparcelBoolean iter lazy soutp thr
newInstance logt UnparcelIntArray itit last soutv
noInstance logw UnparcelStringArray itli mn
rgS wtf ittok mx
rouiT itve psvm
sbc ritar toar
Sfmt
starter
Toast
ViewConstructors
visible
wrapIt

### Description #### Live templates

Plain extra

  • prsf: private static final

  • prsfi: private static final int

  • prsfs: private static final String

Other extra

  • ifElse: Inserts ''if else'' statement

Timber

(Basically offers the same functionality as the android log live templates)

  • time: Timber.e(exception, String)

  • timd: Timber.d(String)

  • timv: Timber.v(String)

  • timm: Log method name and its arguments

  • timw: Timber.w(Exception, String)

  • timi: Timber.i(String)

  • timr: Log result of this method

  • timwtf: Timber.wtf(Exception, String)

Easter Egg

  • trolling (not working yet)
### Postfix autocompletions

Java

  • newInstanceWithAssignment:

  • newInstanceReplacement

  • ifElse

  • ifElseIf (not working yet - experimental)

Asserts

  • assertEquals:

  • assertNotEquals:

  • assertSame:

  • assertNotSame:

  • assertThat:

  • assertTrue:

  • assertFalse:

Mockito

  • whenThen

  • whenThenCallRealMethod

  • whenThenAnswer

  • whenThenReturn

  • whenThenThrow

  • verify

  • verifyNoMoreInteractions

  • verifyZeroInteractions

  • doNothingWhen

  • doReturnWhen

  • doThrowWhen

  • mock

Android

  • emptyCheck


### How to use

The plugin is available in the IntelliJ plugin repository. Navigate to IntelliJ Preferences -> Plugins screnn, search for Hakuna and install the plugin.


### Changelog
  • 0.4.0.5 (2016-06-29)
    • Minor compatibility fixes.
  • 0.4 (2016-06-27)
    • First Android, Mockito, Java and Assert type completions added.
    • Plain extra and Other extra live templates added.

### Feedback and contribution

This has been open-sourced for a main purpose, make developing's life easier during your day to day. I encourage you to suggest improvements, like better namings for the completions or templates, parametrizations and so on. Feel free to ask for anything and contribute to whatever you would like to improve.


### Main contributors - [__César Díez__](github.com/cesards)
### References
### License
Copyright 2016 César Díez (@cesards)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

Plugin for IntelliJ in order to help our day to day development with more completions and liveTemplates, for IntelliJ & Android Studio

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published