update eclipse workspace with ant-errors - eclipse

I have LaTeX project that is hosted in the eclipse environment. To compile the LaTeX code I'm using an ant script that calls pdflatex.exe from a local MiKTeX installation. This works fine for me so far.
Now the question: In case the compilation with pdflatex.exe detects some errors in the .tex files. Is there any way to tell eclipse from the ant script, what files have errors and to mark those files in the project explorer with a red mark or something so that they are easily to identify?
The marks are called label decorations. How do I set them via an ant script? Is there some file-property that could be set eventually?

You can't add error markers on project resources from an Ant script, but you could try TeXlipse plugin that may do the work for you.

Related

Recovery of Qt4 Designer Integration with PyDev for Eclipse neon.2

My Eclipse Neon.2 crashed recently and now the integration of PyQt, in particular the integration with Qt4 Designer seems to have become corrupted. It was the case that I could open a *.ui file from Neon.2 to Qt Designer, make some changes & then run (from Neon.2) a *.py file which accesses the variables created in Qt4D. Now python fails on any new variables I add in Qt4D, but is ok with those created before the crash. I suspect the PyDev integration in my Neon.2 has been corrupted such that the auto pyuic4 does not get run. Question. How do I get out of this mess, eg re-install PyDev in Eclipse (or some other way perhaps)?
Well, PyDev didn't actually do anything automatic in this regard (i.e.: by default it doesn't translate .ui files to .py files with pyiuc4).
The way to do that automatically would be creating a custom builder (right click a project > properties > builders > new > program) and then configure it to run some program which would check if it was a .ui file changed and call pyuic4 on it.
Eclipse external tool for Qt .ui to .py with pyuic has something you could probably use.
Not sure how it worked before for you though... maybe some co-worker had it configured for you or your project already had those settings saved?
Well this does what I wanted:
qtcreator_file = "test1.ui" # Enter file here.
Ui_Dialog, QtBaseClass = uic.loadUiType(qtcreator_file)
My guess is it basically runs something like pyuic4 this avoiding running ones self after having made changes is QtDesigner.

Acceleo UI doesn't generate any files

I have a GMF editor and an Acceleo UI project that I would like to bundle in a single plugin. That's not the matter though.
You see, when executed in the runtime (Run as > Eclipse Application), both the GMF editor and the Acceleo UI project work fine and dandy.
However, when exported as plugins and installed into Eclipse, only the GMF editor will work. The Acceleo UI item WILL show up in the context menu, and it will create the target folder for the files. But this folder will be empty.
Is there a reason why one plugin would work properly while the other does not? Is there any additional configuring that must be done in the Acceleo UI for it to work outside the runtime?
Searching the Eclipse Forums, I found something about adding a line 'outputFolder="${target.folder}"' to a file "acceleo.build", but I can't find neither the file nor the line anywhere.
Any help would be greatly appreciated. I'm working on Eclipse Mars with version 3.6.3.201602090916 of Acceleo.
So, I know nobody ever replied to me, but I found out the problem so I might as well post it in case someone runs into the same issue in the future.
The issue was that Acceleo needs a file with extension .emtl to work. This file wasn't showing up anywhere when exporting the plugin, though. I thought it was failing to compile it (as the .etml is actually a compiled form of the .mtl file).
After some digging, I found out Acceleo does actually create said file, but it doesn't put it in the same place where the .mtl is - it actually places it in a folder called "bin", which isn't created by default when exporting the plugin. In order to see this "bin" folder, I had to mark it in "Build Configuration", in the build.properties file.
Then, I manually copied the .etml in "bin" to the plugin's "main" folder (where the .mtl file resides) and that was it, it worked like a charm.

Access eclipse variables outside eclipse

I am working on an ant scrip that can be located in one place, but can be targeted to run on each project. I am able to do this in eclipse using the ${project_loc} variable in eclipse. I was also able to get this variable to work in ant, by setting it as a variable to through the eclipse preferences. This works fine, but it only works in eclipse. Is there any way that I could get the path to a specific project through a script so that I could run my ant script outside of eclipse?
Any help is appreciated.
Thanks
http://ant.apache.org/faq.html#passing-cli-args
ant -Dname=value

eclipse run configuration- program does not exist - but it does

just what the heck is it?
the program is there right in the projects folder.
it cant seem to detect its own project folders debug.
i am using posix style paths for cygwin on windows. it compiles and builds the exe fine.
now it cant auto detect the exe in the projects workspace.
I had even tried adding the project folder path to the include settings. both in windows and posix style . but neither does that show up in the project explorer nor does it work.
earlier i tried using gnu style paths but the gdb didnt work.

Setting up Pylint with PyDev

I have installed pylint via easy_install. I can run pylint <filename> with success. But pydev refuses to use it.
I checked "use pylint"
I configured correct path
I updated my python interpreter in eclipse to have pylit in pythonpath
I use Eclipse Galileo
I have build automatically checked
I tried cleaning whole project and no errors
What am I doing wrong?
I'm guessing you may need to mark the folder that contains your code as a source folder. You can do this under project properties.
Project->Properties->PyDev-PYTHONPATH
add relevant folders to the list of sources.
I've noticed that Pydev won't run Pylint on files with dashes (hyphens) the the filename; according to the Pydev devs, '-' is not a valid Python module name character, and it doesn't look like they intend to fix it:
http://sourceforge.net/tracker/index.php?func=detail&aid=1915426&group_id=85796&atid=577329
http://sourceforge.net/tracker/index.php?func=detail&aid=2888890&group_id=85796&atid=577332
As if nobody writes scripts in Python... Grumble grumble...
To provide an alternative solution, pylint can be used as an External Tool in Eclipse. This requires having previously installed the pylint package for a Python installation.
Remember to first have a pylintrc file somewhere where pylint can find it, failing which a "No config file found" error is printed. Typically I would touch pylintrc inside the project directory, and keep the file in version control. For reference, see pylint command-line options.
In Eclipse, select Run, External Tools, External Tools Configurations.... Click the toolbar button to create a New launch configuration. Configure as below or as desired:
Name: pylint
Location: ${system_path:pylint}
Working Directory: ${project_loc}
Arguments: --reports=n "${resource_loc}"
Remember to click inside an open file to switch focus to it before running the above external tool for it. Failing this, an error can occur.
The output of the external tool will by default be printed to the console.
Related: Setting up pep8 as an External Tool in Eclipse