D15532: kdev-astyle : add ObjC mimetypes

René J.V. Bertin noreply at phabricator.kde.org
Wed Sep 19 10:22:05 BST 2018


rjvbb updated this revision to Diff 41929.
rjvbb added a comment.


  I added ObjC previews as requested, and doing so I noticed I had to make a few more changes, justifying a ticket name change. I did mention the change was going to be a bit more elaborate than one might have thought, didn't I? :)
  
  - astyle 3.1 has a number of ObjC-related fixes so I updated the bundled copy. BTW I think that the plugin info blurb should refer to the project it's based on so I added the info. It should probably also mention the fact that the astyle library is under the MIT license (!), somehow.
  - I had to change the order in `supportedMimeTypes()`; without that ObjC files were handled as if they were (C) headerfiles, suggesting the returned list is scanned upstream against the mimetype at hand and the first match is applied. After changing the order things worked as expected so I didn't investigate further. I didn't notice any regressions.
  - I made the beginnings for a full initial implementation supporting other language previews, reusing the AStylePreferences::Language enum, currently just doing ObjC vs. the rest (CPP). I considered moving the Language enum, but thought it's not really better at its place in `AStylePlugin` than in `AStylePreferences`.

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D15532?vs=41695&id=41929

REVISION DETAIL
  https://phabricator.kde.org/D15532

AFFECTED FILES
  plugins/astyle/3rdparty/libastyle/ASBeautifier.cpp
  plugins/astyle/3rdparty/libastyle/ASEnhancer.cpp
  plugins/astyle/3rdparty/libastyle/ASFormatter.cpp
  plugins/astyle/3rdparty/libastyle/ASLocalizer.cpp
  plugins/astyle/3rdparty/libastyle/ASLocalizer.h
  plugins/astyle/3rdparty/libastyle/ASResource.cpp
  plugins/astyle/3rdparty/libastyle/README
  plugins/astyle/3rdparty/libastyle/astyle.h
  plugins/astyle/astyle_formatter.cpp
  plugins/astyle/astyle_formatter.h
  plugins/astyle/astyle_plugin.cpp
  plugins/astyle/astyle_plugin.h
  plugins/astyle/astyle_preferences.cpp
  plugins/astyle/astyle_preferences.h
  plugins/astyle/astyle_stringiterator.h
  plugins/astyle/kdevastyle.json

To: rjvbb, #kdevelop, kossebau
Cc: kossebau, kdevelop-devel, glebaccon, antismap, iodelay, vbspam, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20180919/efc8714e/attachment.html>


More information about the KDevelop-devel mailing list