How can I add workspaces (tabs groups) to PhpStorm? - intellij-idea

Is there exists workspaces like in NuSphere phped (saved opened files) inside one project in PhpStorm?
Maybe any plugin exists? I need opened files profiles within one project (tabs groups)...

Such functionality is called "Contexts" in PhpStorm and you can switch between them using Tools | Tasks & Contexts | Load Context.
More on this in official Help pages: https://www.jetbrains.com/phpstorm/help/switching-between-contexts.html?search=context
P.S. If you are using VCS in your project and you are using integration with an Issue Tracking System in PhpStorm then IDE will load your tabs that you had open when last time worked on that particular ticket/task.

Related

IntelliJ different project settings based on used IDE

I have a Git repo with two directories:
backend (PHP/Laravel code)
frontend (TypeScript/Vue code)
I would like that backend is marked as excluded when the project is opened in WebStorm and frontend to be excluded when it is opened in PhpStorm.
This is to ensure that searches/indexing only happen for the files that I would actually edit in that specific IDE.
When I change the excluded directory it seems to automatically apply this to the other IDE as well. Is there some way to keep this setting separate?
Comments:
I intentionally have both frontend and backend in one repository.
Opening the subdirectories in their own IDEA projects does not seem
to be an option because the Git integration only works when the
project is in the root folder of the repository.
When I change the excluded directory it seems to automatically apply this to the other IDE as well.
It is expected. That's because the project settings are stored in the .idea subfolder. All IDEA-based IDEs use the same .idea settings format. So opening the same folder/project in different IDEs simply makes them use that already-made config (shared between IDEs).
Plus, both PhpStorm and WebStorm use the same module type ID (WEB_MODULE) and can have only 1 module in total in a project. IntelliJ IDEA and some other IDEs (like PyCharm for example) can work with projects that can have more than one module and of different types.
Is there some way to keep this setting separate?
Yes, with the help of a small workaround: you need to store .idea used by another IDE in another place. As simple as that.
The setup and steps:
Lets assume that you have your project in C:\Projects\MyProject.
Make a brand new empty project in another place, e.g. C:\Projects\IDEProjectsStore\MyProject-frontend. It will be used for a frontend.
Go to Settings/Preferences | Directories and remove an existing Content Root (which will be C:\Projects\IDEProjectsStore\MyProject-frontend from the previous step).
Add new Content Root instead -- point to the actual project (C:\Projects\MyProject from step #1)
Save and configure as needed.
What you will have now:
This frontend project will now have its settings stored in C:\Projects\IDEProjectsStore\MyProject-frontend\.idea while another (original project with backend) will have them in C:\Projects\MyProject\.idea.
Projects (project-specific IDE settings) are stored in 2 separate places while they both use the same folder with the code.
Basically: a project in the IDE's eyes is an .idea folder with a parent folder added as a Content Root by default. Our workaround keeps the second project in a different folder while sharing the same Content Root between them.
https://youtrack.jetbrains.com/issue/IDEA-170102/ -- that's a ticket that asks for a straightforward way of doing this.
I would like that backend is marked as excluded when the project is opened in WebStorm and frontend to be excluded when it is opened in PhpStorm.
Why do you need two IDEs for this?
In case if you do not know: PhpStorm = WebStorm + PHP + Database. You do not really need WebStorm here. Just install any missing plugins that come bundled with WebStorm.

How do you set up a 1.14.4 Minecraft Mod in the java IDE Eclipse?

I have set up a minecraft mod in eclipse before, only it was in 1.12.2. I installed the ´src´ forge for 1.12.2, but there is no src option for 1.14.4. I have heard that the code for minecraft was changed, so modding minecraft in 1.14.4 is different to modding 1.12.2 minecraft. Can somebody please help?
Go here: https://files.minecraftforge.net/
Click this:
You may alternatively download the recommended build. Forge for 1.14 is still under active development and some features may not be present in the recommended build.
Create a folder where you would like your workspace to live, eg workspace (I name it with the Forge version number, personally). Inside it create another folder, I name it project, but the name isn't important, just that having this extra layer will make things play nice (I will use these names in this answer only to make it clear which folder I'm talking about).
Extract the downloaded zip into the project folder
Shift-right click on the project folder and "open power shell here."
Run the two commands listed in the readme: ./gradlew genEclipseRuns and ./gradlew eclipse (note: do not do steps 4 and 5 of the readme, they are outdated)
Open eclipse, switch workspace (File -> Switch Workspace -> Other) to the workspace folder. Eclipse will restart.
File -> Import...
General -> Existing projects into workspace
Where it says "select root directory" point it at the project folder and check "search for nested projects"
Pretty much hit next until its done (or you can hit Finish right away).
This should leave you with a Package Explorer that looks like this:
Your code and assets will go inside src/main/java and src/main/resources (note that assets will contain both "assets" and "data" folders, for client-side assets and datapack assets respectively). Minecraft read-only source is available in the Project and External Dependencies group, note that many of the vanilla assets (including data packs) are found in the client-extra.jar file.
Lastly:
Find the src/main/resources/META-INF/mods.toml file
Edit as necessary with your mod ID and other information. The file is well commented.
Any further issues should be directed to the Modder Support forum.

How do I use PyCharm and WebStorm in the same project simultaneously?

I am working on a Django project using React for some aspects and seeing that I have licenses for both WebStorm and PyCharm, I would like to use both.
If I open them simultaneously, they keep having to reload the project. More specifically every time one of the IDEs receives focus, it prompts me to reload the project iff, the other IDE received focus since the last window switch.
I suspect this is because they are using the same folder (i.e. {project_root}/.idea) to store there cache/shelved changes etc.
Were can I change the setting, where these infos are stored in order to allow both IDEs to function alongside each other?
Idea-based IDEs (WebStorm, PyCharm, PHPStorm, IDEA, etc) have the same project format (.idea) but different settings/module types that aren't always compatible, plus each IDE needs to write its stuff to project files (for example, .idea/workspace.xml is updated each time you open editor tab, etc., as information about recently opened files, cursor positions, etc. is stored there), so having the project opened in 2 IDEs at the same time will cause such issues.
If you like to work on the same sources in different IDEs, I'd suggest sharing the sources folder(s) but keeping the .idea folders separated: just create a new empty WebStorm project in preferred WebStorm-specific location and add your shared sources root as additional content root to it in Settings | Directories, Add Content root. Same thing should be done for PyCharm. As a result, you will have IDE-specific .idea folders and shared sources

How do I share IntelliJ Run/Debug configurations between projects?

I have many different versions of my app. Each one is a separate IntelliJ project. Every time I open a new one, the list of configurations starts blank:
The annoying thing about this is I deploy to 1 VM and I have to copy and paste the debug configurations each time I want to test a different version. IntelliJ makes this dialog modal per IntelliJ Instance, so I can't copy and paste the fields between Project Instances.
I end up taking a screenshot of one configuration and copying the fields by hand into the other project. It's a pretty primitive solution. Is there a more convenient way to get a run configuration from one project to another?
I'm using IntelliJ 13 on Windows 7.
Can I share settings for IntelliJ Idea across different projects? may have the answer to this, but the question is different. It's about window layout. Therefore I don't consider it a duplicate.
The best way to do this is to click the "share" checkmark next to Name field when you edit/create the configuration. You can get to this Dialog with Run > Edit Configurations.
The share check-mark pulls the setting out of your workspace.xml and instead puts it in the directory .idea\runConfigurations. This is designed so you can share the setting with others.
You could copy this file and put it in the same location in all your idea projects.
However, in the future, you might want to consider using source control branches for app versions rather than separate projects. IntelliJ handles these very well.
UPDATE (June 2021):
IntelliJ now puts this in the .run folder as its own file, no longer in .idea/runConfigurations.
Run configurations are stored in .idea/workspace.xml by default. First alternative is to share this file but it is not feasible because you also share a lot of unnecessary configurations.
As already said, the first step is to check "share" option to separate run configurations from workspace.xml.
After that, I recommend adding runConfigurations to source control. But the main problem is, probably you have already marked .idea folder as ignored.
You can unignore the folder by configuring your source control system. For example, if you are using git, you can change .gitignore file as follows:
.idea/*
!/.idea/runConfigurations
don't forget adding * after .idea/
As the last step, add your run configurations to source control and enjoy your shared configurations!
goto
Run > Edit Configuration > create or select existing configuration you want to use > click save and persist it on file system > click on share check mark
now copy this file from
PROJECT_ROOT_DIRECTORY/.idea/runConfigurations/ConfigurationName.xml
to your NEW_PROJECT_ROOT_DIRECTORY/.idea/runConfigurations at the same place and it is available now to your run configuration
You should copy the folder
~/your-old-project/.idea/runConfigurations
to
~/your-new-project/.idea/
That's the folder that contains the run configurations.
An update for this question with the new IntelliJ updates:
Now you can "Store as project file" which will create a folder named ".run" and export your setting to that folder. In the example below, I did it for all my test settings. This removes the requirement of editing .gitignore since files are now not outside of ./idea
This is not exactly an answer to your question but it answers a question similar to your question and one that I had, and I'm assuming others might as well.
That is, How to save unit and instrumentation test run configurations? I usually right-click on the test directory which brings up a menu with the option to Run whatever is in that directory. AndroidStudio then creates a run configuration on the fly and in the Run Configuration drop-down menu a new option will appear, "Save new configuration?" or something similar.
Clicking that option brings up the Run Configuration menu and at that point I check the Share box as many others have already mentioned. This then will prompt the version control system to ask me if I want to add this new run configuration file. If you haven't registered your version control system you can find the new files under .idea/runConfigurations.

Notepad++ workspace refresh?

How do i refresh the workspace / project in notepad++ when the file-system changes ( files and folders added or removed ).
at the moment it does not keep up with the local file system and i have to re-create the project each time!! frustrating..
I followed Rechtar's suggestion.
I had a similar issue. Notepad++'s Project pane doesn't update when I change or create new files. What I ended up doing was downloading the explorer plugin through
PLUGINS > PLUGIN MANAGER > SHOW PLUGIN MANAGER
Then install the explorer plugin.
After it's installed go to PLUGINS > EXPLORER and select the explorer.
It's not really comparable to something like Eclipse's project navigation.
In Notepad++ 7.5.8, this issue has been fixed. I suggest you update your notepad++ to the latest version.
In order to do this, go to ? -> Update Notepad++ and it will automatically detect a new update package. Update Notepad++ normally.
Otherwise, you could download the update from here:
https://notepad-plus-plus.org/news/notepad-7.5.8-released.html
In case you're curious, here's the changelog for 7.5.8:
Notepad++ v7.5.8 bug-fixes:
1. Remove annoying "no update" notification.
2. Fix Folder as Workspace not updating regression.
3. Fixed crash issue by checking & unchecking "Disable extension column" option in preferences dialog.
4. Fixed a crash when trying to launch a secondary instance with command line arguments.
5. Fix "Explorer Here" from "Folder as Workspace" problem if folder name contains comma.
Included plugins:
1. NppExport v0.2.8 (32-bit x86 only)
2. Converter 4.2.1
3. Mime Tool 2.1
4. DSpellCheck 1.3.5
Updater (Installer only):
* WinGup (for Notepad++) v5.0.2
I'm currently running version 6.3.3 of notepad ++ and instead of adding the entire project all over again, you can right-click the folder in your project that has the new file and choose: "Add files...". From there, you can select your new file and open it. This will add it to your project in the appropriate folder.
There doesn't seem to be a proper way to do this in Notepad++. The Project panel was born just 2 or 3 releases ago, so it's naturally immature. I suggest that you install either the Explorer plugin or the Light Explorer plugin - they are much more usable.
Or better yet, go learn Vim and fall in love with the NERDTree ;-)