#LETSMEETUP - 11 IntelliJ features you MUST know

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
right folks how's it going today i'll show you 11 intelligent idea features that you must know let's meet up [Music] thank you so much for watching the previous episodes if you haven't seen them please take a look both and the at the scala one and the javascript one thank you so much for all the engagement and all the comments you've left for now let's take a look at intellij idea whenever i start presenting i can never remember how to enter the presentation mode i can't even actually remember a keyboard shortcut which i might have defined at some point but i can never remember it so what i always do in this case i use the first intellij feature that i find most helpful is search everywhere i just double tap my shift key and then i can start searching everywhere which includes my class files any other files that i might have in my repository and also allows me to kind of execute various commands within my um intellij and this includes entering presentation mode and this is what i always do to enter presentation mode number two is find next occurrence admittedly this is not something that i use on a daily basis um this is not something that i use very frequently but when i do need it then this functionality is really very very helpful and it saves me from doing repeated minor edits which i find very very annoying so what you do is you just place your cursor your carrot at the key the keyword the word that you want to edit and then you clone your carrot how many times you want and then you very quickly change this to whatever you want you might for example turn various multiple methods which are private to being for example internal or protected something that is related to this functionality and i find quite helpful as well is cloning a carrot below it clones your car right below at the next line you actually need to specify a keyboard shocker yourself if you want to have a keyboard shortcut for it which i did and i find it very helpful for for example indenting multiple lines which are one one below the other and then i can indent them at the same time so we've written some implementation and now we want to write an actual test for for our production code and this is where a pretty helpful functionality of intellij comes in which is go to related tests when you hit your keyboard shortcut you can either go to an existing test file or you can generate a new one now that we've gone to our test file we want to run a test sometimes you simply want to execute all the test cases or execute a single test case of all the of the entire test suite and intellij will allow you to do it pretty easily just by hitting the play icon but sometimes you might want to do something more like you might want to sometimes it is necessary to include certain run parameters you might also want to execute multiple tasks from your build tool for example from gradle where you might want to tear down your entire docker compose clean up your working directory like execute clean and then regenerate for example some of the files for example in duke schema if you happen to use any sort of source code generation to do either of these you can either go to the configuration menu and simply manually type in all the parameters and all the steps that you might want to execute or in case of gradle you can shift-click the multiple files that you want to select and then save these as a new run configuration when you've got your run configuration saved this is where number three comes in running your saved when you hit your keyboard shortcut then you get access to the menu with all your saved configuration and you can simply start typing to select the one that you need hit enter and off you go number four is a pretty small functionality which is really very very helpful when you want to use it with your kind of tdd cycle and it is commit separately when you actually develop in you know kind of proper tdd then you might want to stick to your test implementation and refactor cycle and what is quite nice is if you commit at each of these steps it allows you to kind of retrace your steps very easily it allows you to kind of scrap any step that you've taken previously and it turns out that this is not a change that you want to include and if you've actually edited more files than you might want to include in the commit say you're working on your test files and you've edited some of the production files to keep your comment nice and clean you only want to include the test files you obviously are able to do it with you know manually with a command line with with uh all the git commands but it's just so much easier to tick the files that you simply want to include it here commit and commit only these the remaining files will be untouched number five is something that is very related to the previous one and it is using shelf this is something quite similar to the kind of very basic built-in functionality of git itself which is stash but when you stash with git then all your files will be actually moved to your stash and will be unavailable for you shelf comes in very handy for me when i start working on something i've got multiple files edited and it turns out i've got a kind of suspicion that one of these files is doing something nasty like it's you know it's breaking my code so i want to move it like put it aside just for a second and see what's what happens and then bring it back later and shelf is perfect for this because it allows you to shelf only selected files you can select multiple files so you can move just one and it's there saved for you ready and you can restore it back later just bear in mind that it's only in intellij you won't actually have access to it from your get client in the command line number six is refactor when you hit your keyboard shortcut assigned to opening up the refactor menu then you'll have access to all the refactor commands that intellij can do for you which means that first of all you don't need to remember all these refactor commands but second of all intellij will actually you know show you what it's got one of the most helpful refactor commands that i find very useful are first of all move command which allows you to move a selected method or a class to to a different place and it also updates all the imports which you know be what they will be fixed um immediately when you move the selected piece of code and i find it really very helpful another one is extracting a parameter and putting it into the method signature and we can also do is you can edit the method signature straight away and you can move for example the order of the parameters um if you are such a perfect perfectionist as i am and you might want to shuffle around the the ordering of the parameters then intellij will also move the order of the parameters um at the call site where you actually use the method quite often i find myself not knowing the the exact implementation details of a library that i use and number seven quick documentation is a feature that i use very often when i hit my keyboard shortcut then it opens up a little pop-up which allows me to see the javadoc and all the parameters and so on i can move it to the side to keep it open all the time when i execute when i write my implementation code quite often i actually end up jumping to the source code itself and i find it very helpful because source code never lies it can never be outdated just like the documentation can and um something that is quite useful when you browse through you know especially kind of large files which library files admittedly quite often are then you can use the the file structure keyboard shortcut which will show you all the member parameters of your class that you're looking at and all the methods and you can very quickly find what you're looking at and you can jump between various various places when you kind of you know browse through you'll eventually want to go back to your code if you don't want to use mouse just like i do then you'll probably use the go to the previous location keyboard shortcut which will actually just kind of jump back to the previous location where your card was and your screen will kind of flicker and when i kind of browse through multiple multiple locations and i look at multiple things then when i go back then my carriage just kind of keeps them jumping and it just jumps and jumps and i'm like oh what is happening and this is where go to show recent locations keyboard shortcut is very helpful as it shows you very neatly all the previous locations where you've been without actually blinking the entire screen in front of your eyes you can simply choose the the exact location where you want to go and then you can navigate straight to it this brings me to number eight bookmarks you might want to use bookmarks when when you know that you want to work on multiple various pieces of code like located for example in different files or in different parts of the file and you don't want to kind of keep on jumping between various locations and looking for them if you know that you will want to edit multiple of these and kind of navigate between them then you can set a bookmark with a mnemonic as intellij calls them and you can assign a keyboard shortcut to go to this specific location very quickly without having to search for anything even without having to browse through your recent locations right so we've written some implementation we've written some test code now it's time to debug our code which will inevitably come at some point when you write your production code intellij debugger is very rich in functionality and it probably deserves an entire video just on this topic but there are two important features that are very very helpful and i find it very cool that i want to mention so when you start debugging your application and you start looking at the execution of your code you might end up looking at something similar to this where for example you've got an array and you are iterating through it and something interesting or unexpected that you want to debug only happens after nth iteration and you kind of want to discard the first few iterations and only stop at a certain iteration and this is where number nine comes in which are conditional breakpoints with conditional breakpoints you can either type in very simple expressions such as allowing you to check what the counter is like in the case of iterating through an array or you can type in any kind of complex expression that you might actually need for this specific breakpoint what is pretty helpful with with breakpoints is also being able to set breakpoints conditionally one upon another um kind of linking them if you will in intellij you can say that a specific breakpoint will only be executed when the first breakpoint was already hit which in english means that you're only interested in debugging this piece of code when something else has actually happened within your application number 10 is evaluating expressions in your debugger sometimes you might want to investigate the state of your application or see what various expressions evaluate to so you can pause your debugger and for example just like in the case here we can for example see what the swapping index will actually evaluate to and what it will point to recently i came across a quite an interesting scenario where i wanted to write an integration test and i needed some data for it so what i did is i grabbed an actual json response from the dev environment and it pasted it in into my intellij the thing is that it was all red because of the warnings that i was missing quotation marks around all my keys and all my words admittedly i probably could have left it like that but it would just drive me nuts if i had all these warnings blinking all the time so what i started doing was just you know manually adding quotation marks at the beginning and an end of a word but i got quite bored of it pretty quickly and after the fourth keyword that i've edited manually i decided to do something clever about it and this is where number 11 recording macros came in very helpful with intellij you can very easily record your behavior and then play it back from your user interface admittedly it is pretty disappointing that you can't play back the recorded macro multiple times but what you can do is you can assign a keyboard shortcut and simply press and hold or press multiple times the shortcut and get all the get the macro played back as many times as you want so this is one more addition that will hopefully make your life a tired easier that's all folks please let me know what is your favorite functionality do you have any other functionalities that you frequently use have you learned anything from this video did you have you learned any new functionalities that you're going to use daily now please let me know down in the comments below i would love to know let me know if you've got any other questions do like comment and subscribe if you so desire it'll help us reach even more developers and share our knowledge thank you so much for watching and i'll see you in the next one let's meet up you
Info
Channel: Codete
Views: 18,908
Rating: 5 out of 5
Keywords: letsmeetup, codete, webinar, software, it, hitech, technology
Id: 72uAie1Ii8I
Channel Id: undefined
Length: 14min 47sec (887 seconds)
Published: Fri Jul 16 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.