Integrating external highlighter tool in Eclipse editor - eclipse

Okay, this is probably easy, but I don't know proper words to describe it, and hence, google it...
I have an external script which takes a file name and outputs this:
/path/to/file.py:683:80: E501 line too long (85 characters)
/path/to/file.py:690:21: other error message
..etc..
Now, I know this output format is widely accepted by other, much simple IDEs, e.g. EditPlus. I don't know how to integrate it with Eclipse though.
I want this script integrated with my editor windows. I want Eclipse to run it in the background, every time I save the file, and then parse the results and mark all the lines which occured in the script's output. It should look something like this:
How can I do that?
Note (for those who know why I need this): I know PyDev has a pep8.py checker integrated, but it's not enough.

Ok, so I implemented that plugin myself. I does exactly what I asked for, I guess. I made it configurable with some rude regular expressions.
I posted the code and installation instructions here (GitHub).

Your own plug-in that runs the script and examines its output can create Markers from that output. See http://www.eclipse.org/articles/Article-Mark%20My%20Words/mark-my-words.html .

Related

"Save as" an open file from Command Line

I have a large folder of DWG files and want to convert them to DXF files, using Solid Edge. After opening the documents, is it possible to "Save As" from the command line or powershell?
Is this a program by program line of code or is it universal for all programs?
So if I wanted to save a .docx document open in Microsoft Word as a .pdf (for want of a better example) can I use that same line of code?
Any help appreciated...
Well since you want to convert from one Autocad format to another, you could do it using Autocad's command line.
https://knowledge.autodesk.com/support/autocad/downloads/caas/downloads/content/autodesk-customization-conversion-tools.html?_ga=2.88877275.1703552679.1574826072-7420195.1574826072
This does require you writing all of the scripting of course.
Alternatively, there is this handy scripted mass converter someone wrote using lisp and they wrote a custom script executor wrapper thingy but their scripting supposedly requires the full version of autocat (at least version 2010 to accomplish this.)
https://www.cadtutor.net/forum/topic/51941-autocad-mass-convert-dwg-to-dxf-batch-convert-dwg-to-dxf-mas-dwg-convert/
That said the official AutocCAD conversion command-line utilities are also going to use LISP scripting, so you might want to just take the second script, and work through it manually testing against the normal AutoCAD utilities until you can get it working for your needs to sort of jump start you.
If you do that I would suggest re-posting with tags for LISP and AutoCAD and give them a sample of what you have got if you end up going the official tools and your own or jump-started script route.
Hope that will be helpful to you and others in the future! :)
As commented beneath my question,
No, it would not be universal
So, no, there is no way of using a single command "save as" on every single program, and as Solid Edge doesn't have a command line API, that I know of, I would have to write a program for it.

Registry command entry isn't running like it runs in command line

My question clarified is, "What's different about running a command from within the registry at command line compared to running the same command from in a command line? Then how do I make it the same to work the way I want?"
Information about my program:
This is a ClickOnce application and from what I see there isn't a great way of getting the exact path of the exe instead of the appref-ms. So there is a caveat to my question this whole thing can be avoided if there was a way to find the exact path of the exe each time the program is deployed and I am able to edit the registry to point to said written down path.
I have this entry in HKEY_CLASSES_ROOT please see evidence below:
So right clicking below should work everything is typed in right, but it doesn't work.
So I figured maybe it didn't like my %APPDATA% which honestly should not matter and I got a new error message.
Just so you know my program does work and it's doing something and pulling paths from the args passed to it.
Thank you for reading my lengthy question.
Here is how you set up what I have been trying to setup for a while now. This explanation is assuming you know exactly what you are trying to do.
Publishing A (Offline) ClickOnce Application With Command Line Args Ran From A Right Click Context Menu Item That You Can Deploy As Many Times As You Want Without Editing the Registry Each Time.
If you are doing an online one just use this CTRL+F and type in deadlydog it has two stellar links in that answer. That is much simpler then this below.
Have a project that is published deployed on a file share using ClickOnce in Visual Studio project properties.
Get this code. (If you need multiple args treat them all as one large string then split it)
'VB.NET style code
Dim activationData() As String = AppDomain.CurrentDomain.SetupInformation.ActivationArguments.ActivationData
MsgBox(activationData(0)) 'Your big long argument before being split editted or modified.
Why I asked this question and my answer to it.
Make a registry entry using ContextEdit as if you were making your very normal run of the mill context menu for your program. HOWEVER!!!! click the check box that says "expand environment variables".
So the command that you type in should look like this.
cmd.exe /C ""%InsertEnvironmentVariable%\Path\Name To\Your File.appref-ms" "%1""
It should work from that it was a ton of googling mostly because I have never done this and I give up easily on ideas. Also would like to comment on the information for command line and the registry is atrociously organized and abundant beyond belief.
Hope this helps someone trying to deploy a neat clickonce lightweight program that seems integrated like a normal program.

Changing Code At Runtime While Debugging

I am using Eclipse Kepler Service Release 2 , EPIC 0.5.46 and Strawberry Perl 5 version 18 for perl programming. For debugging I am using Eclipse debugger and PadWalker .
I have an interactive perl program that writes to files based on answers provided by the users to multiple prompts. While debugging , every time i change a single line of code I have to rerun the whole program again and provide inputs to every prompt , which is really time consuming.
Is there a way to make changes to the code in a sub routine , in the middle of debugging session such that the instruction pointer resets itself to the first line of that sub routine. This way i do not have to restart the session to recompile the new code.
Appreciate your inputs and suggestions. Thank You!!!
What you want to do can be done, and I've done it many times in Perl myself. For example, see this.
However although what you describe may work (and is a bit dangerous), the way it is generally done a bit different and safer.
First one has to assume a regular kind of command structure like a command processor, or say a web server.
In a command processor or web server, you read a command (or get a web request), perform an action, then read another command, perform another action and so on. From your description, it sounds like you have such a structure.
In my case, I have each debugger command stored as in Perl file. This is helpful not only for facilitating this task, but also for understanding, testing and changing the code.
Given this kind of program structure, instead of trying to change the program counter, you complete the command and at the level where you are about to read a new command, you make the change and then reload the file which changes the code.
The specific Perl construct to do this is called do. Don't use require or use which will load in a Perl file only if that file or module hasn't been previously loaded. In your situation, you want to reload even if it has been loaded before.
So now how do you get to be able to issue a do command? As you suggest, you could do it through a debugger. Assuming you have this overall program stucture as described above, you put the breakpoint somewhere a common point in the caller which loops over things to process, rather than try to change things in indvidual commands.
And you don't even need a debugger to do this! Many web frameworks like Ruby on Rails, have a "development" mode where they save timestamps on files that implement functionality. If the file has changed they issue the "do" command before running the request.

System for automatically logging exact file code changes by line item

Does anyone know of a software or system for automatically tracking and logging exact line code changes into a log file?
For example, lets say I edit 7 files on Jan 16th, and I add and modify several lines of code in each file.
Is there a software or tool of any kind that would automagically know what edits I made, what was changed, and log the details in date order line-item file?
I am guessing something exists like this, but I cannot find out what I should be searching for. I looked at SVN and some other similar, but didn't get these capabilities from the descriptions I read.
There's nothing that would automagically know this. This sort of information is easy to come by as a side-effect of using virtually any version control system though. It sounds like you're not using any VCS, you should start doing so now. SVN is a good option to start with.

Easiest way to Filter Eclipse Console Output text

I'm asking this in relation to Flex Builder, but it might apply to Eclipse in general.
Trace statements in Flex Builder get sent to an Eclipse Output Console. What is the easiest way to filter this text on the Eclipse side?
Specifically, I'd like to be able to filter (ignore) lines by patterns.
I came across Logback, but it seems like overkill for this scenario. Is there no way to script something like this Eclipse itself?
Nothing specific to FlexBuilder. If you need such a functionality, you'd need to write an Eclipse plug-in.
Take a look at grep-console one to start off.
Also GrepClipse may help. Also available on the Eclipse Martket.
there is also Easy Console Grepper
which opens up own console, easier at first then grep-console I think. Just define what You searching and it will show after console execution lines with searched expression.
Please use Easy Console Grepper Eclipse Plugin as this is much easier and more intuitive than grep-console.