Perl syntax is not highlighted - eclipse

I have Eclipse SDK Version: 3.5.2 with EPIC 0.5.46 installed on Ubuntu Linux. I was writing some Perl code which I could run/debug correctly. The syntax was always highlighted. recently I had to add one *.pl file to my project and debug it. However, for some reason, the code is not being highlighted. What might be the reason for this behavior? My guess was that maybe there is some issue with Eclipse/EPIC adding/importing new files to the existing project but I'm not sure. Please consider even basic mistakes with Eclipse/EPIC configuration and projects management since I'm new to it. Thanks!

It seems that I found the problem which was preventing my Perl code from being highlighted. I've noticed that in the first lines of my .pl file, there is a commented line which include a weird ? symbol as appears on the screenshot below:
The moment I removed this symbol, all the code became highlighted! So it seems that there was some issue with text encoding which prevented Eclipse ho highlight the coded correctly.

You should right-click the file and then open with "epic perl editor", then everything will be fine!

Related

Why do no programs run in visual studio code?

I recently got a new computer and reinstalled visual studio code but I haven't been able to run any of my files. The error has occurred with both python and C++, so I feel as though it is the IDE that is the problem. I have looked online and there are no straight answers as I have tried following some solutions which have resulted in different errors.
The error above comes up when I run (F5) a simple line of code in c++. Does anyone have a solution?
Thanks, Jacob
[EDIT]
For my python files to work I have to manually select 'Python: current file' but for c++ files they still have the same error.
First step, uninstall python from this machine.
Second, reinstall and make sure that you check the box "add to path".
It's pretty easy to miss as it's a small box, and I missed it my first time installing python earlier in the year. Here's the box you may have missed while installing.
It could be your extensions.
I had a similar error message and simply updated all of my extensions and then my SDK. I was then able to run my code within the IDE. I was using VSCode for c++ and also updated my GCC compiler along with the extensions.
Also look into your computer's environment variables, if you have changed the %PATH variables it may be affecting your ability to run/compile programs.

Error message failure and crash when using pydev embedded jython interpreter

I have a strange problem when using Pydev on my work machine (others at work have the same issue). It does not occur when I do this at home, which makes me think it's something to do with the environment at work. We are running Windows 7.
I am using Pydev 3.9.2 but the same thing happens with earlier versions. It occurs with all versions of Eclipse after 3.7. The problem is this. When I create a jython console (the one running in the Eclipse VM), the error output doesn't work. If I type an invalid python command, there is no output on the console. It just appears that the command worked. If I type a command such as "print 100", the output prints as you would expect.
The second problem is that if I hit the red square which is supposed to remove the console window, Eclipse crashes. There are no errors or any indication of what is going wrong.
I have tried different versons of eclipse, different versions of Pydev, different machines and it doesnt make any difference.
Has anyone seen this? I've tried everything I can think of to debug this issue so any help is appreciated.
thanks,
brian
Unfortunately those quirks are expected...
The internal console in Eclipse is mostly a developers SDK for experimenting with Eclipse itself and is not meant as a general shell (you should configure an interpreter and use it for that).
I don't have plans on improving on that situation (there's already a multi-year backlog on PyDev and this isn't really critical), but if you'd be willing to spend some time and fix those issues, pull requests would be definitely welcome -- see: http://pydev.org/manual.html for details on getting the code and setting up the environment.

Eclipse PyDev is throwing false errors

I updated PyDev (Eclipse) yesterday and now it is telling me that None, name and other reserved words/builtin functions are invalid, but the script runs just fine. I have read on this forum that the problem deals with incorrectly importing the built-ins. I have tried changing the interpreter and re-adding it but no luck. Can somebody help me please?
The errors:
Undefined variable main
Undefined variable None
Undefined variable int
Undefined variable eval
I am running eclipse Juno and PyDev 2.7.4. also, I notice that the errors only appear after the PyDev code analysis ends.
This happened to me as well, the problem was that eclipse couldn't find python.
My fix:
in Eclipse:
Window > Preferences > PyDev > Interpreter - Python
The settings here were blank. I clicked 'Auto Config', which suggested to me the path to python. I chose it, restarted eclipse, and problem solved.
Well, I see nobody has come up with some idea. I found out by myself so I'm posting how I solved it here; maybe it'll help somebody:
The problem was that I had recently changed my local machine's name, but PyDev was still looking for localhost when it tried to connect to the Python Shell. I just updated the files in my operating system containing the hostname, and voila (the automatic wizard did not update all the files for some reason, so I had to do it manually).

How to change the line ending used in Netbeans

Netbeans has this wiki entry on line endings: http://wiki.netbeans.org/FaqEditorEOLs
But it isn't very useful. It just says that you shouldn't develop on different OS and that's that...
In my situation however, I have no power over it. I'm on a windows machine and the PHP app I'm working on needs to end with the UNIX EOL.
There does not seem to be an option to set this for new files. Can anyone tell me where to set this?
Just saw that you can set this as a command-line startup flag: -J-Dline.separator=LF
I haven't tested this myself but I'm looking for ways to bake this into the configs somehow.
Since, a specific plug-in came out: http://plugins.netbeans.org/PluginPortal/faces/PluginDetailPage.jsp?pluginid=36810
I also like #JimLewis suggestion but I work on Windows with a linux virtual machine thus in some cases the versioning system line ending cannot help.
[update 201709]
I no longer use netbeans (sorry, but I need python support and it's too buggy) and almost no longer develop on windows, but #marinos-an in a comment suggests https://github.com/welovecoding/editorconfig-netbeans which uses a common setting file that can be picked up by multiple editors through plugins. Definitely interesting to try since the settings file is committable!
Have you considered managing the line endings at the version control level? Subversion,
for example, lets you set an "eol-style" attribute with values "LF", "CR", "CRLF",
and "native" (which translates the line endings stored in the repository to whatever
is appropriate for the platform where the files are being checked out, and converts
the other way when you check in.)
Please use following Netbeans Plugin
http://plugins.netbeans.org/plugin/36810/show-and-change-line-endings
fentie's answer solved my problem with line endings, as pasting multi-line MySQL from NetBeans into the MySQL command prompt caused errors.
To pass this argument to NetBeans every time it opens, add it to the netbeans.conf file:
/Applications/NetBeans/NetBeans\ 7.1.2.app/Contents/Resources/NetBeans/etc/netbeans.conf on OS X.
From the NetBeans Mac page under Tips & Tricks.
When I pasted multi-line SQL statements from NetBeans to the MySQL command line client on OS X or a remote Linux server, MySQL would list all possible command choices, give me some strange '> type of prompt and I was forced to hit Ctrl+C and log back into MySQL again.
For my Netbeans 12.6
I found a pluging called "Change Line Endings on Save"
https://plugins.netbeans.apache.org/catalogue/?id=31
more details are there
https://github.com/junichi11/netbeans-change-lf
once pluging installed you can configure EOL in there:
Tools > Options > Editor > Line Endings

How can I set up Eclipse to edit Perl without the runtime checking?

I'm working on a project that include both Java (on the client side) and Perl (on the server side), and I would really like to use Eclipse to edit my Perl scripts instead of going to another editor. I've tried to use the EPIC plugin. However, I have no way of setting up a run environment for these scripts on my local machine, so the plugin displays all kinds of errors related to missing libraries and other external dependencies.
I just want a text editor with nice syntax highlighting for Perl. Any suggestions? Any way that you can turn off the runtime error checking when using the EPIC plugin? I wasn't able to find anything with a quick search.
It isn't a setting, per se, in the workbench. It's a per-project setting.
While in your Perl project, select Project->Properties. In that dialog, click on "Builders". You probably have just the one-- "Perl Auto Builder". De-select it and click "Ok".
Unfortunately, you'll have to do this for each separate Perl project.
You could try Perlipse, which appears to be an active project.
You didn't indicate your OS. Try Padre - it is cross-platform. It can be installed with the CPAN shell (if you use Strawberry Perl on Windows, you will need at least the version from October). Padre is still rapidly evolving, but already has support for Perl 5 and 6 (6 will require a plugin). HTML, JavaScript and CSS (also with plugins). Many other plugins are already written, for example for Perl::Critic.
Emacs is a great text editor for Perl.
cperl-mode has the best Perl syntax highlighting support of any
editor (even Padre), and Emacs should meet all of your editing needs.
It is easily scriptable, and there are thousands of extensions
available for it. (Some even make support for Perl better, like Stylish::REPL.)
Use EditPlus, simplest editor for syntax highlighting. Works well for Perl.