Creating Language Plugin not used for new language

Roland Plüss roland at rptd.ch
Mon Sep 17 17:50:44 BST 2018


Hi,

I had mixed success with this approach. I've done now an implementation
along this line of pseudo-code:

void getLanguageDocumentsContexts():
  if notReadyYet
    if inProgressOfParsing
      if all files are parsed
        inProgressOfParsing = false
        notReadyYet = false
        reschedule all context files // ensure cross-uses properly work
        return context list
      else
        return empty list // tells caller to reschedule
    else
        if all files are parsed
          notReadyYet = false
          return context list
        else:
          inProgressOfParsing = true
          schedule parsing for all not yet parsed files
          return empty list

Basically I reschedule until all language documentation files have been
processed. then I reschedule them once again since they cross-reference
each other to ensure everything lines up.

Now what happens is this. When I delete all duchain from disk and start
KDevelop the language files get parsed but the open source file is
rescheduled. After all is done the source still has broken use. If I
trigger a re-build (for example typing something) the uses all properly
resolve so the language documentation files are properly parsed and
prepared. For some reason though it seems the source file is not
re-parsed if the language files are finished parsing "the second time".

How can I force source files to be reparsed? Actually any source file
which imports the language documentation files (which are all except the
language documentation files themselves)?


On 09/14/2018 08:13 PM, Sven Brauch wrote:
> Hi,
>
> On Friday, 14 September 2018 18:41:05 CEST Roland Plüss wrote:
>> I experiment a lot with this stuff looking at the python plugin to
>> figure out how this is supposed to work. As I understand it I need to
>> parse the files with the background parser. What I don't get though is
>> how I can link this "in the process of being parsed" source files to
>> actual source files opened in KDevelop. I think I am missing here
>> something but without proper documentation I'm guessing around left and
>> right.
> You need to enqueue them with the background parser and then basically wait 
> for the job to complete. You cannot import a "pending" top-context into 
> another one. You probably want to do someting like aborting the job and 
> queueing the file again with a lower priority if you notice that the built-in 
> files are not parsed yet.
>
> Hope that helps and good luck,
> Sven 


-- 
Mit freundlichen Grüssen
Plüss Roland

Leader und Head Programmer
- Game: Epsylon ( http://www.indiedb.com/games/epsylon )
- Game Engine: Drag[en]gine ( http://www.indiedb.com/engines/dragengine
, http://dragengine.rptd.ch/wiki )
- Sowie verschiedene Blender Export-Skripts und Game-Tools

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: OpenPGP digital signature
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20180917/78339244/attachment.sig>


More information about the KDevelop-devel mailing list