ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

roslaunch syntax highlight for qt creator

asked 2014-07-10 04:37:32 -0600

bvbdort gravatar image

updated 2014-07-10 04:47:38 -0600

Hi,

Did someone used roslaunch syntax highlight in qt creator ? How to do it ?

thanks.

edit retag flag offensive close merge delete

Comments

1

I am not using qt creator but roslaunch is XML

martimorta gravatar image martimorta  ( 2014-07-10 05:00:26 -0600 )edit

i am using qt creator but its not detecting .launch extension as xml

bvbdort gravatar image bvbdort  ( 2014-07-10 06:01:04 -0600 )edit

3 Answers

Sort by ยป oldest newest most voted
4

answered 2019-11-18 10:58:42 -0600

max11gen gravatar image

updated 2019-12-13 07:06:50 -0600

The solution mentioned here to use Tools->Options->Generic Highlighter path and copying a file didn't work for me, because that path is just empty.
What actually worked was this:
1. Going to Tools->Options->Environment->MIME Types
2. Filter for xml
3. Click on the entry "application/xml
4. in The field "Patterns" append ";*.launch" to the already existing patterns

edit flag offensive delete link more

Comments

I also couldn't find the xml.xml and this answer worked for me.

alex_ gravatar image alex_  ( 2019-12-13 04:17:03 -0600 )edit
6

answered 2015-06-29 08:00:23 -0600

cbandera gravatar image

The solution that worked for me was:

  1. Find out, where your Syntax Highlight Definition Files are located by navigating to: Tools->Options->Text Editor->Generic Highlighter and note the given paths.
  2. Find the syntax file for xml: xml.xml in one of the paths noted above.
  3. You can either edit this file directly or make a copy and name it launch.xml (You might need sudo to do this). Then edit the line that starts with <language name="XML" by adding *.launch to the extensions="... argument. Mine looks like this now:

<language name="XML" version="2.03" kateversion="2.4" section="Markup" extensions="*.launch;*.docbook;*.xml;*.rc;*.daml;*.rdf;*.rss;*.xspf;*.xsd;*.svg;*.ui;*.kcfg;*.qrc;*.wsdl" mimetype="text/xml;text/book;text/daml;text/rdf;application/rss+xml;application/xspf+xml;image/svg+xml;application/x-designer;application/xml" casesensitive="1" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL">

edit flag offensive delete link more

Comments

it works after restart QT, thank you.

Chuong Nguyen gravatar image Chuong Nguyen  ( 2015-10-27 09:41:21 -0600 )edit

I am not able to edit the file ..... is this common?

Nicky0201 gravatar image Nicky0201  ( 2016-11-21 21:07:19 -0600 )edit

Hi @Nicky0201, you probably don't have the necessary rights. As I mentioned in my answer, you can try editing the file, using the sudo command in the terminal.

cbandera gravatar image cbandera  ( 2016-11-22 00:55:14 -0600 )edit

okay thank you

Nicky0201 gravatar image Nicky0201  ( 2016-11-22 01:19:56 -0600 )edit
1

answered 2014-07-11 11:22:07 -0600

allenh1 gravatar image

The way to get syntax highlighting is actually pretty simple. Open QtCreator and go to Tools->Options->Generic Highlighter. Then navigate to whatever directory is listed. Lastly,

cp xml.xml launch.xml

You may need to sudo that command, depending on where it is installed. After that, you should be good.

edit flag offensive delete link more

Comments

thanks for reply but it didnt work.

bvbdort gravatar image bvbdort  ( 2014-07-14 04:02:14 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2014-07-10 04:37:32 -0600

Seen: 1,873 times

Last updated: Dec 13 '19