Skip to content

Latest commit

 

History

History
90 lines (71 loc) · 6.46 KB

integration.asciidoc

File metadata and controls

90 lines (71 loc) · 6.46 KB

Integration

The devon-ide already brings a lot of integration out of the box. This page is for users that want to get even more out of it. For instance this IDE ships with a console script to open a shell with the environment variables properly set for your devon-ide installation, so you get the correct version of your tools (Java, Maven, Yarn, etc.). However, you might want to open a shell from your IDE or your file manager. For some of these use-cases you need additional tweaks that are described on this page.

Windows

OASP4J-IDE ships with a script IDEenv.bat that checks if you are currently in a directory (CWD) that belongs to an devon-ide project. In that case the script will automatically set the environment variables for that projects. Otherwise the script will have no effect and do no harm. Preparation:

  • Please copy IDEenv.bat from system folder into a central scripts folder (e.g. C:\Users\«MyLogin»\scripts or C:\Program Files\scripts)

  • Ensure that this scripts directory is added to your system path:

    • Got to Computer > Properties > Advanced system settings > Environment Variables

    • In the upper group (User variables for …​) select the variable PATH

    • Click on Edit

    • To the end of the Variable value append a semicolon (;) followed by the absolute path of the scripts directory (e.g. append ;C:\Users\«MyLogin»\scripts)

    • Confirm with OK (3 times)

CMD

If you want to open a CMD (MS Dos Shell) directly from Windows Explorer for a folder in your devon-ide project you will also want to have the environment variables set properly so that you can run mvn, yarn, gulp, or whatever directly from that shell. Therefore you once have to follow these steps:

  • Right-click on the file IDEenv.reg from system and choose Merge from Context-Menu.

  • Confirm the dialog User Account Control with Yes.

  • Confrim the dialog Registry Editor with Yes.

  • Click OK.

Now you have the option Open CMD here if you right click on a folder in Windows Explorer that will open CMD and automatically setup your environment according to the devon-ide project containing the folder (if any, see above).

ConEMU

ConEmu is a great extension that brings additional features such as tabs to your windows shells. If you like it, you will also want to have it integrated with devon-ide. All you need to do is follow these simple steps:

  • Copy the file CmdInit.cmd from your ConEmu installation (C:\Program Files\ConEmu\ConEmu\CmdInit.cmd) to a personal folder (e.g. C:\Users\MYLOGIN\scripts).

  • Modify this copy of CmdInit.cmd by adding the line IDEenv (e.g. at line 6) and saving.

  • Go to ConEmu and open the settings (via context menu or [Windows][Alt][p]).

  • Select Startup > Tasks from the left tree.

  • Select the first option form Predefined tasks (command groups) ({Shells::cmd})

  • In the text area at the right bottom modify the location of CmdInit.cmd to your customized copy (%HOME%\scripts\CmdInit.cmd).

  • Select Integration from the left tree.

  • Click on the upper Register button (for ConEmu Here).

  • Click on Save settings

Now you have the option ConEmu here if you right click on a folder in Windows Explorer that will open a new tab in ConEmu and automatically setup your environment according to the devon-ide project containing the folder (if any, see above).

ConEMU and StartExplorer

You can even integrate the Eclipse StartExplorer plug-in and ConEMU to open up console right from the file tree of eclipse into ConEMU. You can do this by adding a custom command to StartExplorer:

  1. Open up eclipse

  2. Open Window > Preferences

  3. Select StartExplorer > Custom Commands on the left

  4. Add on the right and setup the following command: "C:\Program Files\ConEmu\ConEmu64.exe" -Dir ${resource_path} -runlist cmd.exe /k ""%ConEmuBaseDir%\CmdInit.cmd" & "IDEenv"" -cur_console:n Be aware that you potentially have to adapt the ConEmu*.exe path to match your installation.

    You can even add a shell login if you installed git bash on your machine. Please be aware to potentially adapt the sh.exe url to match your installation: "C:\Program Files\ConEmu\ConEmu64.exe" -Dir ${resource_path} -runlist cmd.exe /k ""%ConEmuBaseDir%\CmdInit.cmd" & "IDEenv" & "%SYSTEMDRIVE%\Program Files\Git\bin\sh.exe" --login" -cur_console:n

  5. State two times the "Name for *" to your choice like "ConEMU"

  6. OK → OK

  7. Right click on any folder/file in your eclipse file explorer and select StartExplorer > Custom Commands > ConEMU.

  8. You will get a initialized console at the file/folder location! Have fun!

Cygwin

Ensure to have chere installed in cygwin. Otherwise go the cygwin setup and install it. Then run a cygwin terminal as administrator and call this command: chere -i -t mintty. Now you will have the option Bash Prompt Here in your WindowsExplorer context menu.

In order to integrate with devon-ide you simply add the line . ~/IDEenv.sh this to your ~/.bashrc. The IDEenv.sh shall be located in your unix home directory (~/IDEenv.sh) with this content:

CWD=$PWD
while ! [ -e scripts/environment-project.sh ] && [ "$PWD" != "/" ]
do
  cd ..
done
if [ -e scripts/environment-project.sh ]
then
  . scripts/environment-project.sh
fi
cd $CWD

Eclipse

You might want to open a terminal directly as view inside your Eclipse IDE. Therefore we provide eclipse with the TM terminal plugin. Further the settings already configure that plugin so it automatically sets the environment properties correctly. In other words the integration comes out of the box.

To use it all you need to do is to follow these steps:

  • Open the Terminal view (Window > Show View > Other > Terminal > Terminal > OK).

  • Click on the monitor icon from the left of the icon bar of the Terminal view.

  • Choose terminal (e.g. Local Terminal) and confirm with OK

  • Execute mvn -v to verify your environment.

IntelliJ or WebStorm

You might want to open a terminal directly as view inside your IDEA IDE, that already ships with a feature for this out of the box. If you start your IDE via the start-idea script provided by devon-ide then everything is configured and your environment is set automatically.