diff --git a/.vitepress/sidebars/develop.ts b/.vitepress/sidebars/develop.ts index 48882c29c..8449f0a5e 100644 --- a/.vitepress/sidebars/develop.ts +++ b/.vitepress/sidebars/develop.ts @@ -46,10 +46,6 @@ export default [ { text: "develop.gettingStarted.launchGame", link: "/develop/getting-started/launching-the-game" - }, - { - text: "develop.gettingStarted.ideTipsAndTricks", - link: "/develop/getting-started/ide-tips-and-tricks" } ] }, @@ -202,6 +198,10 @@ export default [ { text: "develop.misc.text-and-translations", link: "/develop/text-and-translations" + }, + { + text: "develop.misc.ideTipsAndTricks", + link: "/develop/ide-tips-and-tricks" } ] } diff --git a/develop/getting-started/ide-tips-and-tricks.md b/develop/ide-tips-and-tricks.md similarity index 87% rename from develop/getting-started/ide-tips-and-tricks.md rename to develop/ide-tips-and-tricks.md index 5b9eb00a1..e1ab75908 100644 --- a/develop/getting-started/ide-tips-and-tricks.md +++ b/develop/ide-tips-and-tricks.md @@ -22,27 +22,27 @@ Refer to the `File > Setings > Keymap` Settings or search for the functionality IntelliJ has many different ways of traversing projects. If you have generated sources using the `./gradlew genSources` commands in the terminal or used the `Tasks > fabric > genSources` Gradle Tasks in the Gradle Window, you can manually go through the source files of Minecraft in the Project Window's External Libraries. -![Gradle Task](/assets/develop/getting-started/using-the-ide/traversing_01.png) +![Gradle Task](/assets/develop/misc/using-the-ide/traversing_01.png) The Minecraft Source code can be found if you look for `net.minecraft` in the Project Window's External Libraries. If your project uses split sources from the online [Template mod generator](https://fabricmc.net/develop/template/), there will be two sources, as indicated by the name (client/common). Additionally other sources of projects, libraries and dependencies, which are imported via the `build.gradle` file will also be available. This method is often used when browsing for assets, tags and other files. -![External Library](/assets/develop/getting-started/using-the-ide/traversing_02_1.png) +![External Library](/assets/develop/misc/using-the-ide/traversing_02_1.png) -![Split sources](/assets/develop/getting-started/using-the-ide/traversing_02_2.png) +![Split sources](/assets/develop/misc/using-the-ide/traversing_02_2.png) ### Search{#search} Pressing Shift twice opens up a Search window. In there you can search for your project's files and classes. When Activating the checkbox `include non-project items` or by pressing Shift two times again, the search will look not only in your own project, but also in other's, such as the External Libraries. -![Search Window](/assets/develop/getting-started/using-the-ide/traversing_03.png) +![Search Window](/assets/develop/misc/using-the-ide/traversing_03.png) ### Recent Window{#recent-window} Another useful tool in IntelliJ is the `Recent` window. You can open it with the Shortcut CTRL + E. In there you can jump to the files, which you have already visited and open tool windows, such as the [Structure](#structure-of-a-class) or [Bookmarks](#bookmarks) window. -![Recent window](/assets/develop/getting-started/using-the-ide/traversing_04.png) +![Recent window](/assets/develop/misc/using-the-ide/traversing_04.png) ## Traversing Code{#traversing-code} @@ -60,12 +60,12 @@ Especially when researching source codes, it can help out to mark spots which yo Either right click a file in the `Project` window, an editor tab or the line number in a file. Creating `Mnemonic Bookmarks` enables you to quickly switch back to those bookmarks using their hotkeys, CTRL and the digit, which you have chosen for it. -![set Bookmark](/assets/develop/getting-started/using-the-ide/traversing_05.png) +![set Bookmark](/assets/develop/misc/using-the-ide/traversing_05.png) It is possible to create multiple Bookmark lists at the same time if you need to separate or order them, in the `Bookmarks` window. [Breakpoints](./basic-problem-solving#breakpoint) will also be displayed in there. -![Bookmark window](/assets/develop/getting-started/using-the-ide/traversing_06.png) +![Bookmark window](/assets/develop/misc/using-the-ide/traversing_06.png) ## Analyzing Classes{#analyzing-classes} @@ -77,13 +77,13 @@ are located in that file, which methods have been implemented and which fields a Sometimes it can be helpful, to activate the `Inherited` option at the top in the View options as well, when looking for potential methods to override. -![Structure window](/assets/develop/getting-started/using-the-ide/analyzing_01.png) +![Structure window](/assets/develop/misc/using-the-ide/analyzing_01.png) ### Type Hierarchy of a Class{#type-hierarchy-of-a-class} By placing the cursor on a class name and pressing CTRL + H you can open a new Type Hierarchy window, which shows all parent and child classes. -![Type Hierarchy window](/assets/develop/getting-started/using-the-ide/analyzing_02.png) +![Type Hierarchy window](/assets/develop/misc/using-the-ide/analyzing_02.png) ## Code Utility{#code-utility} @@ -94,7 +94,7 @@ accident or just moved your cursor to a new place, you can use CTRL + For example, when using Lambdas, you can write them quickly using this method. -![Lambda with many parameters](/assets/develop/getting-started/using-the-ide/util_01.png) +![Lambda with many parameters](/assets/develop/misc/using-the-ide/util_01.png) ### Displaying Parameters{#displaying-parameters} @@ -104,7 +104,7 @@ If you closed them by accident or just moved your cursor to a new place, you can Methods and classes can have multiple implementations with different parameters, also known as Overloading. This way you can decide on which implementation you want to use, while writing the method call. -![Displaying method parameters](/assets/develop/getting-started/using-the-ide/util_02.png) +![Displaying method parameters](/assets/develop/misc/using-the-ide/util_02.png) ### Refactoring{#refactoring} @@ -113,7 +113,7 @@ but things like extracting parts of the code into separate methods and introduci Many IDEs have an extensive tool kit to aid in this process. In IntelliJ simply right click files or parts of the code to get access to the available refactoring tools. -![Refactoring](/assets/develop/getting-started/using-the-ide/refactoring_01.png) +![Refactoring](/assets/develop/misc/using-the-ide/refactoring_01.png) It is especially useful to get used to the `Rename` refactoring tool's key bind, Shift + F6, since you will rename many things in the future. Using this feature, every code occurrence of the renamed code will be renamed and will stay functionally the same. @@ -131,7 +131,7 @@ Sometimes simpler tools are needed to edit code occurrences. If enabled, all of those tools allow for a more specific pattern matching using "[Regex](https://en.wikipedia.org/wiki/Regular_expression)". -![Regex replace](/assets/develop/getting-started/using-the-ide/search_and_replace_01.png) +![Regex replace](/assets/develop/misc/using-the-ide/search_and_replace_01.png) ## Comments{#comments} @@ -143,7 +143,7 @@ comments are necessary to leave notes or **temporarily** disable code for testin To comment out code faster, open IntelliJ's Settings, look for the `Comment with Line Comment` and the `Comment with Block Comment` entries, and set their Key binds to your preferences. -![Keymap settings](/assets/develop/getting-started/using-the-ide/comments_01.png) +![Keymap settings](/assets/develop/misc/using-the-ide/comments_01.png) Now you can highlight the necessary code and use the shortcuts, to comment the section out. @@ -181,7 +181,7 @@ if you are not actively working on them. To create a custom block which can be c // endregion ``` -![Region collapse](/assets/develop/getting-started/using-the-ide/comments_02.png) +![Region collapse](/assets/develop/misc/using-the-ide/comments_02.png) ::: warning If you notice that you are using too many of them, consider refactoring your code to make it more readable! @@ -193,14 +193,14 @@ When working on code, it can come in handy to leave notes, on what still needs t a potential issue in the code, but you don't want to stop focusing on the current problem. In this case, use the `TODO` or `FIXME` comments. -![TODO and FIXME comments](/assets/develop/getting-started/using-the-ide/comments_03.png) +![TODO and FIXME comments](/assets/develop/misc/using-the-ide/comments_03.png) IntelliJ will keep track of them in the `TODO` window and may notify you, if you commit code, which uses those type of comments. -![TODO and FIXME comments](/assets/develop/getting-started/using-the-ide/comments_04.png) +![TODO and FIXME comments](/assets/develop/misc/using-the-ide/comments_04.png) -![Commit with TODO](/assets/develop/getting-started/using-the-ide/comments_05.png) +![Commit with TODO](/assets/develop/misc/using-the-ide/comments_05.png) ### Javadocs{#javadocs} @@ -209,14 +209,14 @@ deeply integrated into IntelliJ. When hovering over method or class names, which have JavaDoc comments added to them, they will display this information in their information window. -![JavaDoc](/assets/develop/getting-started/using-the-ide/comments_06.png) +![JavaDoc](/assets/develop/misc/using-the-ide/comments_06.png) To get started, simply write `/**` above the method or class definition and press enter. IntelliJ will automatically generate lines for the return value and the parameters but you can change them however you want. There are many custom functionalities available and you can also use HTML if needed. Minecraft's `ScreenHandler` class has some examples. To toggle the render view, use the pen button near the line numbers. -![JavaDoc editing](/assets/develop/getting-started/using-the-ide/comments_07.png) +![JavaDoc editing](/assets/develop/misc/using-the-ide/comments_07.png) ## Optimizing IntelliJ Further{#optimizing-intellij-further} diff --git a/public/assets/develop/getting-started/using-the-ide/analyzing_01.png b/public/assets/develop/misc/using-the-ide/analyzing_01.png similarity index 100% rename from public/assets/develop/getting-started/using-the-ide/analyzing_01.png rename to public/assets/develop/misc/using-the-ide/analyzing_01.png diff --git a/public/assets/develop/getting-started/using-the-ide/analyzing_02.png b/public/assets/develop/misc/using-the-ide/analyzing_02.png similarity index 100% rename from public/assets/develop/getting-started/using-the-ide/analyzing_02.png rename to public/assets/develop/misc/using-the-ide/analyzing_02.png diff --git a/public/assets/develop/getting-started/using-the-ide/analyzing_03.png b/public/assets/develop/misc/using-the-ide/analyzing_03.png similarity index 100% rename from public/assets/develop/getting-started/using-the-ide/analyzing_03.png rename to public/assets/develop/misc/using-the-ide/analyzing_03.png diff --git a/public/assets/develop/getting-started/using-the-ide/comments_01.png b/public/assets/develop/misc/using-the-ide/comments_01.png similarity index 100% rename from public/assets/develop/getting-started/using-the-ide/comments_01.png rename to public/assets/develop/misc/using-the-ide/comments_01.png diff --git a/public/assets/develop/getting-started/using-the-ide/comments_02.png b/public/assets/develop/misc/using-the-ide/comments_02.png similarity index 100% rename from public/assets/develop/getting-started/using-the-ide/comments_02.png rename to public/assets/develop/misc/using-the-ide/comments_02.png diff --git a/public/assets/develop/getting-started/using-the-ide/comments_03.png b/public/assets/develop/misc/using-the-ide/comments_03.png similarity index 100% rename from public/assets/develop/getting-started/using-the-ide/comments_03.png rename to public/assets/develop/misc/using-the-ide/comments_03.png diff --git a/public/assets/develop/getting-started/using-the-ide/comments_04.png b/public/assets/develop/misc/using-the-ide/comments_04.png similarity index 100% rename from public/assets/develop/getting-started/using-the-ide/comments_04.png rename to public/assets/develop/misc/using-the-ide/comments_04.png diff --git a/public/assets/develop/getting-started/using-the-ide/comments_05.png b/public/assets/develop/misc/using-the-ide/comments_05.png similarity index 100% rename from public/assets/develop/getting-started/using-the-ide/comments_05.png rename to public/assets/develop/misc/using-the-ide/comments_05.png diff --git a/public/assets/develop/getting-started/using-the-ide/comments_06.png b/public/assets/develop/misc/using-the-ide/comments_06.png similarity index 100% rename from public/assets/develop/getting-started/using-the-ide/comments_06.png rename to public/assets/develop/misc/using-the-ide/comments_06.png diff --git a/public/assets/develop/getting-started/using-the-ide/comments_07.png b/public/assets/develop/misc/using-the-ide/comments_07.png similarity index 100% rename from public/assets/develop/getting-started/using-the-ide/comments_07.png rename to public/assets/develop/misc/using-the-ide/comments_07.png diff --git a/public/assets/develop/getting-started/using-the-ide/refactoring_01.png b/public/assets/develop/misc/using-the-ide/refactoring_01.png similarity index 100% rename from public/assets/develop/getting-started/using-the-ide/refactoring_01.png rename to public/assets/develop/misc/using-the-ide/refactoring_01.png diff --git a/public/assets/develop/getting-started/using-the-ide/search_and_replace_01.png b/public/assets/develop/misc/using-the-ide/search_and_replace_01.png similarity index 100% rename from public/assets/develop/getting-started/using-the-ide/search_and_replace_01.png rename to public/assets/develop/misc/using-the-ide/search_and_replace_01.png diff --git a/public/assets/develop/getting-started/using-the-ide/traversing_01.png b/public/assets/develop/misc/using-the-ide/traversing_01.png similarity index 100% rename from public/assets/develop/getting-started/using-the-ide/traversing_01.png rename to public/assets/develop/misc/using-the-ide/traversing_01.png diff --git a/public/assets/develop/getting-started/using-the-ide/traversing_02_1.png b/public/assets/develop/misc/using-the-ide/traversing_02_1.png similarity index 100% rename from public/assets/develop/getting-started/using-the-ide/traversing_02_1.png rename to public/assets/develop/misc/using-the-ide/traversing_02_1.png diff --git a/public/assets/develop/getting-started/using-the-ide/traversing_02_2.png b/public/assets/develop/misc/using-the-ide/traversing_02_2.png similarity index 100% rename from public/assets/develop/getting-started/using-the-ide/traversing_02_2.png rename to public/assets/develop/misc/using-the-ide/traversing_02_2.png diff --git a/public/assets/develop/getting-started/using-the-ide/traversing_03.png b/public/assets/develop/misc/using-the-ide/traversing_03.png similarity index 100% rename from public/assets/develop/getting-started/using-the-ide/traversing_03.png rename to public/assets/develop/misc/using-the-ide/traversing_03.png diff --git a/public/assets/develop/getting-started/using-the-ide/traversing_04.png b/public/assets/develop/misc/using-the-ide/traversing_04.png similarity index 100% rename from public/assets/develop/getting-started/using-the-ide/traversing_04.png rename to public/assets/develop/misc/using-the-ide/traversing_04.png diff --git a/public/assets/develop/getting-started/using-the-ide/traversing_05.png b/public/assets/develop/misc/using-the-ide/traversing_05.png similarity index 100% rename from public/assets/develop/getting-started/using-the-ide/traversing_05.png rename to public/assets/develop/misc/using-the-ide/traversing_05.png diff --git a/public/assets/develop/getting-started/using-the-ide/traversing_06.png b/public/assets/develop/misc/using-the-ide/traversing_06.png similarity index 100% rename from public/assets/develop/getting-started/using-the-ide/traversing_06.png rename to public/assets/develop/misc/using-the-ide/traversing_06.png diff --git a/public/assets/develop/getting-started/using-the-ide/util_01.png b/public/assets/develop/misc/using-the-ide/util_01.png similarity index 100% rename from public/assets/develop/getting-started/using-the-ide/util_01.png rename to public/assets/develop/misc/using-the-ide/util_01.png diff --git a/public/assets/develop/getting-started/using-the-ide/util_02.png b/public/assets/develop/misc/using-the-ide/util_02.png similarity index 100% rename from public/assets/develop/getting-started/using-the-ide/util_02.png rename to public/assets/develop/misc/using-the-ide/util_02.png diff --git a/sidebar_translations.json b/sidebar_translations.json index 4debb6cc2..2fa47d894 100644 --- a/sidebar_translations.json +++ b/sidebar_translations.json @@ -19,7 +19,6 @@ "develop.gettingStarted.creatingProject": "Creating a Project", "develop.gettingStarted.projectStructure": "Project Structure", "develop.gettingStarted.launchGame": "Launching the Game", - "develop.gettingStarted.ideTipsAndTricks": "IDE Tips and Tricks", "develop.gettingStarted.solvingProblems": "Basic Problem-Solving", "develop.items": "Items", "develop.items.first-item": "Creating Your First Item", @@ -52,6 +51,7 @@ "develop.misc.codecs": "Codecs", "develop.misc.events": "Events", "develop.misc.text-and-translations": "Text and Translations", + "develop.misc.ideTipsAndTricks": "IDE Tips and Tricks", "develop.sounds": "Sounds", "develop.sounds.using-sounds": "Playing Sounds", "develop.sounds.custom": "Creating Custom Sounds"