Ask Your Question
1

roslaunch syntax highlight for qt creator

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

bvbdort gravatar image

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

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 imagemartimorta ( 2014-07-10 05:00:26 -0500 )edit

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

bvbdort gravatar imagebvbdort ( 2014-07-10 06:01:04 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
5

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

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 imageChuong Nguyen ( 2015-10-27 09:41:21 -0500 )edit

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

Nicky0201 gravatar imageNicky0201 ( 2016-11-21 21:07:19 -0500 )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 imagecbandera ( 2016-11-22 00:55:14 -0500 )edit

okay thank you

Nicky0201 gravatar imageNicky0201 ( 2016-11-22 01:19:56 -0500 )edit
1

answered 2014-07-11 11:22:07 -0500

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 imagebvbdort ( 2014-07-14 04:02:14 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

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

Seen: 978 times

Last updated: Jun 29 '15