Perl5 plugins for IntelliJ IDEA - perl

I've tried to get an IDE for Perl 5 but with just while line
print "8";
it cycles many minutes and does nothing after all.

I tested this on Windows 10. First I installed the community edition of IntelliJ IDEA on Windows from here. Then I opened the IDE and installed the Perl plugin as described here :
Then configured the plugin by going to Settings->Languages & Frameworks->Perl5 :
Click the cogwheel at the right side of Perl5 Interpreter and select your installed Perl exe (I am using Strawberry Perl):
Close the settings dialog and choose File->New project.. and select Perl5 from the list:
click Next and then choose the Perl interpreter to use:
Choose a project name and its location:
Click the name of the project in the project view at the left side of the window, and choose File->New->Perl5 file. Type in the name of the script, and choose Script from the list :
Type in the hello.pl script in the editor:
Select Run->Run.. from the menu, and click Add new.. configuration:
In the dialog enter a new name for the run configuration, and enter the location of the script:
Then click Run and you should get output like this:

Related

How to run system shell/terminal inside Eclipse?

I am using Eclipse Neon, and I would like to execute system commands on a shell/terminal, inside Eclipse.
In particular, I will need to open the system shell using the path of the current project folder on which I'm working in Eclipse.
In some Eclipse packages, like STS or Eclipse for JEE Developers, the Terminal is already installed in your IDE. If not, you can install the TM Terminal from the Eclipse */release update site, as you can see in the image below.
To open the command prompt (shell or terminal) using the path of a project directory inside Eclipse, you just need to select the folder, and press Ctrl+Alt+T, or right-click and select Show In Local Terminal > Terminal.
Then, the terminal will open in a new view inside Eclipse.
The Eclipse IDE which I am working there is no Terminal is there. So I needed to add the plug in like this and it works fine when you try clicking Alt+Ctrl+T
Click on Help in Eclipse-->Eclipse Marketplace--> in Find box (Search terminal and Enter)--> You will see TM Terminal 4.0 Version and just install it.
You may need to restart afterwards
And finally you will be able to get the Terminal when you will type
Alt+Ctrl+T on Console.
If you don't have the TM Terminal plugin installed, you could use external run configurations.
Click on the arrow near run button with the toolbox and add a new external run configuration.
Here, you can enter the path of your program(if you want to run commands, it will be C:\Windows\System32\cmd.exe (or the path to PowerShell on windows and /bin/bash (or similar if you use another shell) on linux.
In this dialog, you can also specify running directory of the application(the current project in your case)
After that, you can save this configuration and start it using the external run configuration menu(run button with toolbox)
Click on Run Cofiguration--> arguments --> Program Arguments (write any number of String) -->click on run
Go to Window > show view > Other.
A dialog will show up, type Terminal in the search field, select Terminal and click open.
A new empty view will show up in Eclipse.
On the top right corner of the view there is a button Labeled "open a Terminal".
Click on it, a dialog will show up
click OK and there you go, you got a Terminal.

Open directory containing a source file via Eclipse

In Visual Studio, or MyEclipse, you have a button which is able to locate a source file on disk, and open the containing directory in Windows explorer.
This is useful, for example, to browse images, or to use an other tool when a conflict occurs in CVS or SVN.
What would be the way to do it in Eclipse with a free plugin, or without any plugin ?
I found it :
"In eclipse, it is common requirement to open the folder containing source file but there is no direct method to do that like in Visual studio of Microsoft."
http://shivasoft.in/blog/others/tips/locate-source-file-on-local-disc-in-eclipse-external-tool/
An actual plugin can be found at http://blog.samsonis.me/2009/02/open-explorer-plugin-for-eclipse/
And version 1.5 can be found here http://blog.samsonis.me/2011/08/openexplorer-eclipse-plugin-1-5-0/
One that I've since upgraded to & find more useful
http://basti1302.github.io/startexplorer/
I always do this:
right click on file/folder, show in..., system explorer. Done.
I guess we don't need a plugin to do that, or I am misunderstanding the question?? I am using Luna 4.4.2 on Windows 7.
On Mac you can follow this steps to add it without a plug-in:
Click the disclosure icon to the right of the External Tools icon:
Select External Tools Configuration:
The External Tools Configuration window will appear. Select Programs and then click New Launch Configuration:
This will create a new launch configuration. Enter a name of the configuration in the name field:
In the Location field enter the path to the Open Finder, "/usr/bin/open" without quotes:
In the Arguments field enter the following argument, "${container_loc}" with quotes:
Click Apply. It should look like the following:
Switch to the build tab and deselect Build before launch:
Switch to the Common tab and select the External Tools checkbox in Favorites. Click Apply again and close out of the window.
You are done. Now to use:
Select a file or folder in Eclipse Package Explorer.
Click the disclosure icon to the right of the External Tools icon:
Select the Open Containing Folder from the drop down menu:
You're file or folder should open in Finder.
PRO TIP: After you use the external tool once you can click the External Tools icon again and it will run the last used external tool. In other words, you won't need to select it from the pop up menu each time.
You can also look up the source directory by right clicking on the project, going to properties, and looking at "Location: ... "

How do I set the build path for E-P-I-C in Eclipse Galileo?

I have E-P-I-C installed on Eclipse Galileo. When I go to run a Perl script nothing happens because I don't believe is any connection from Eclipse to the Perl SDK (is that the right term? I don't know if it is different because it's Perl).
I'm pretty sure it has something to do with C:\Perl\bin
If I click on Perl E-P-I-C project and click on properties I can then see
Perl include Path. I have added the above but it didn't change anything.
What this comes down to is: How do I set up the build path for Perl in Eclipse Galileo?
Normally, the PerlDistribution asks to be added to your %PATH%. For me it added D:\strawberry\c\bin and D:\strawberry\perl\bin. My Eclipse Galileo uses that environment variable out of the box.
You can set the perl executable for a .pl file using Window->Preferences->Perl EPIC and use the File Selector. Works for me with strawberry and standard cywin perl. The perl version shipped with MsysGit seems like it can't handle EPIC breakpoints. Haven't tested with ActiveState Perl so far.
Vista user here. I have Activestate Perl and it also installed into c:\perl5.10, and added the executable to the %PATH%.
Thus, In my Window/Prefrences/Perl EPIC Menu, the executable is called "perl". No .exe, no absolute path. E-P-i-C has probably found it by searching in the default install locations.
In eclipse, you need to run your perl script once using a right mouse click "run as ...perl local".
THen this script shows up in the Menu "Run > Run configurations." For simple scripts, the default values in the tab dialogs are all ok (most are empty). Output is written to the console window. Make it visible using Menu Window > View > Console.
Does your perl script generate any output?
Perl Debugging from Eclipse does not work for me either. A dialog box pops up and says I shpuld read the discussion thread for ticket #290... on sourceforge. A very complex matter indeed.

Eclipse on Windows 7

Every time I open eclipse Galilio on Windows 7 64bit this message appear
and it won't work
-------------------------------------------------------------------------------------
Faild to load the JNI shared library "C:\Program Files(x86)\java\jre6\client\jvm.dll"
-------------------------------------------------------------------------------------
Help me please.
If you are using the 64-bit distribution of Galileo, you need a 64bit distribution of JRE (not a 32bit installed in "C:\Program Files(x86)").
If not (you are using a 32bit) version, you can (as in this thread),
Check your path variable,
make sure that if you type "java -version" at a command prompt you get the version you expect.
Or better yet, edit your eclipse.ini file to specify a particular JVM location.
See http://wiki.eclipse.org/Eclipse.ini for examples.
Now check out what's below. This should help you fix your Eclipse issue with Java and Windows 7 64-bit.
Eclipse will not open when the exe is clicked on Windows 7 64-bit OS.
Eclipse Standard/SDK
Version: Kepler Release
Build ID: 2013614-0229
This is for the Firefox v22 64-bit browser
OS: Windows OS 64-bit
Okay, you assume that Java is set properly on your Windows 64-bit PC and you've loaded Eclipse in a folder on your desktop. You've also created a separate folder called Eclipse Workspace which also resides on the desktop. Now you're ready to go and then in the Eclipse/Eclipse directory you click the Eclipse.exe and then you get this janky error message after the Eclipse window opens:
"Java was started but returned exit code=1" (with other related data)
or ------->
You clicked the Eclipse.exe file and this message was displayed: "A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse. No Java Virtual Machine was found after sending the following locations: c:\Program Files (x86)\Java\jre7\javaw.exe" or something like this. Now I'm not saying that this solution will work for everyone but note that this is a good baseline starting point to find out your solution.
--- or ---
2b. In DOS, you typed Java or java -version in the command line, pressed then this error was thrown:
"Picked up_Java_options:
-Xrunjvmhook -Xbootclasspath/a:C"\Program~2\hp\Quickt~1\bin\Java_S~1\classes;c:\Progra~2\hp\Quickt~1\bin\Java_S~1\classes\jasmine.jar
Error occurred during initialization fo VM could not find agent library JVMhook on the library path; with error" Can't find dependent libraries..."
* Again, keep in mind, this process is being done with the FireFox v22 64-bit browser** If using this browser, you need to check the following, to see if Java is enabled in the browser. I know what you're thinking but just do it!
Open or maximize the Firefox browser.
At the top left of the page, click Tools then the Add-ons option.
Click the Plugins option in the left pane.
You should see:
Java Development Toolkit 7.0.250.17 10.25.2.17 NPRuntime Script Plug-in Library for
Java (TM) Deploy. (or a plugin with a relevant version number)
Look to the right and make sure this plugin is Enabled~! If it is not Enabled, enable it!
If you do not see this plugin, at the top of this page, enter "Java" in the Search All Add-ons field, locate the plugin then install it.
Now go to Java.com and download the current version of Java for 64-bit. You need a JRE (Java Runtime Environment) and a JDK (Java Development Kit files and both have to be 64-bit!!!!!!! Once downloaded run both. They usually sit at either of these locations with these path distinctions:
c:\Program Files\Java\jre7 (This is the location of the JRE=Java Runtime Environment)
c:\Program Files\Java\jdk1.7.0_25 (This is the location of the JDK=Java Development Kit)
--- or ---
c:\Program Files (x86)\Java\jre7 (This is the location of the JRE=Java Runtime Environment)
c:\Program Files (x86)\Java\jdk1.7.0_25 (This is the location of the JDK=Java Development Kit)
* Now keep in the these version numbers will change but here are the preferred locations.
Environment Variables Edits
Click Windows Start button (bottom left on Windows 7) then click Computer.
At the upper left, click System Properties. The Control Panel Home window opens.
Click the Advanced System Settings option.
Your User Account Control window may open.
Click the [Yes] button.
The Systems Properties window opens.
Click the [Environment Variables] button.
Go to the User Variables for (Your System Name here).
Delete everything here accept, the following:
PATH
TEMP
TMP
Now highlight the PATH variable and then click the [Edit] button.
The Edit User Variable window opens.
You want to add the following:
;c:\users\Your User Name\desktop\eclipse\eclipse\jre\bin;c:\Program Files (x86)\Java
\jre\bin;c:\Program Files (x86)\jre7\;c:\Program Files (x86)\Java\jdk1.7.0_25\bin
Click the [OK] button and the Edit User Variable window closes.
Now go to the System Variables section.
Delete all the Variables accept the following:
asl.log
CLASSPATH
Comspec
FP_NO_HOST_C...
NUMBER_Of_P...
OnlineServices
OD
PATH
PATHTEXT
PCBRANDS
Platform
PROCESSOR_A...
PROCESSOR_id...
PROCESSOR_LE...
PROCESSOR_R...
PSModulePath
TEMP
TERM
TMP
USERNAME
Click the [New...] button.
The New System Variable window opens.
In the Variable Name field (which the cursor is currently blinking in...), enter JAVA_HOME.
Then go to the Variable Value field and enter c:\Program Files (x86)\Java\jdk1.7.0_25\bin;%JAVA_HOME%/bin.(Without the period, of course!)
Click the [OK] button and the New System Variable window closes.
Now highlight the PATH option and click the [Edit...] button.
The Edit System Variable window opens.
Go to the Variable value field and add the following at the end of the string already there:
;c:\Users\Your username here\desktop\eclipse\eclipse\jre\bin;c:\Program Files
(x86)\Java\jre7\;c:\Program Files (x86)\Java \jdk1.7.0_25\bin
Click the [OK] button and the Edit System Variable window closes.
Click the [OK] button to close the Environment Variables window.
Click the [OK] button to close the System Properties window.
Now for the Pista Resistance!!!!!!! Go back to the Eclipse folder on your desktop (or alternative location), then click open. Now download Notepad ++ from http://notepad-plus-plus.com and install it.
Use Notepad ++ to open the eclipse.ini file from the Eclipse folder. Using Notepad ++ keeps the eclipse.ini file's format correct.
With the eclipse.ini file opened with Notepad ++, look for -- launcher.append Vmargs. Once you've found this entry, place the cursor after it and then press . You should now see a space.
In that space enter the following: (and this must be entered exactly like what's listed below)
-vm
c:\Program Files (x86)\Java\jre7\bin\
c:\Program Files (x86)\Java\jdk1.7.0_25\bin
Now click File then Save as, with the file name as Eclipse.ini, then click the [Save] button.
A message box will display asking "Do you want to replace the file?", click the [Yes] button.
Now click File then Exit and Notepad ++ closes.
Now close then restart the Firefox browser.
Now close then reopen the Eclipse folder. ( I know what you're thinking but just listen and nod and do it.)
Click the Eclipse.exe file and now you should see the Eclipse splash screen.
After a few seconds, a message displays asking you to select an Eclipse Workspace. You should have this Workspace on your desktop
or some where you can make this connection.
Now Eclipse is working! Let me know if this process worked for you!

Use an external editor for some file types with Netbeans

So with eclipse I would instruct it to open html/css/js files in textmate, and pretty much just use if for the php side of things.
Would like to do a similar thing with nb if possible.
Any thoughts?
Best,
Bob
There exists a Path Tools plugin for Netbeans. It has a command "Edit path...". With this you can select a file in the tree, click "Edit path..." and the file will be opened in an external editor.
You can customize the external program which is called under "Tools" -> "Options" -> "Miscellaneous" -> "Path Tools" -> "Edit Commands For File" .
You can't assign it to specific file types, but at least you can open files without leaving Netbeans.
The webpage of the Path Tools plugin looks not very active, but it works in Netbeans 6.9.1 without problems (Works on My Machine).
It also has other useful actions:
Copy Paths Action Copy the full paths of the files/folder of selected node to the clipboard.
Explore Action Launch the OS File Explorer
Shell On Path Action Launch the OS shell
Edit Action Launch the editor
This plugin should be integrated to Netbeans.
Thank you for the help on this.
Here is a way for the Path Tools 'Edit' toolbar button to pop up the Windows 'Open With...' dialog box for the selected file.
In Options, Path Tools... 'Edit Commands' 'For File' - change the command to this:
rundll32.exe C:\WINDOWS\system32\shell32.dll,OpenAs_RunDLL {path}
(Edit: I forgot to say this is for XP - idea is the same for newer Windows)
If you don't want to deal with manipulating plugins and configs, you can do it this way (valid for version 8.2):
Go to Tools > Options > Kepmap
search for "path"
It defaults to Alt + Shift + L
use that command in any editor window to get the path for the file, then simply open that path in whichever editor.
I agree it's not as smooth and savvy as having a readily-available "open in external editor" command, but it's almost there.