Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
Plugin for Fortran
darmar:
Thank you Morten for your reply.
--- Quote from: MortenMacFly on September 16, 2009, 01:47:07 pm ---Can't you manage all that just with dependencies as it's done in C/C++, too? I mean: If you setup the module as external dependency through the project's (targets) option, then if the module has changed the main project will automatically be re-linked, re-compiled (if needed).
--- End quote ---
Yes, I think, I could solve dependency problems by using targets. This solution will ensure right order of compilation and that all dependent files is updated. But I am unsure if it is best solution from user's point of view, because instead of, say, two targets (debug, release) he will see additional, say, 20 (depending on how many files with modules are) automatically generated targets. And I am unsure if I could manage to make up-to-date these targets when the user change something.
--- Quote from: MortenMacFly on September 16, 2009, 01:47:07 pm ---Can you provide a sample so that I can better understand?
--- End quote ---
I don't know what kind of sample do you like? Code sample? I will try to explain how Fortran'90 works.
For example, we have two files in a project: one file with main function a_main.f90 and second file b_file.f90. In second file b_file.f90 is declared module b_file_module. a_main.f90 uses this module. When compiler is asked to compile b_file.f90, it generates not only b_file.o file, but additionally b_file_module.mod file. This *.mod file is like *.h file in c++. If we change something in b_file.f90, then b_file.f90 will be re-compiled and new b_file_module.mod file will be generated. Because a_main.f90 uses this mod file, a_main.f90 has to be recompiled too.
darmar:
Hello
I have made new version of FortranProject plugin. Now, besides code browser for Fortran, the plugin manages file dependencies when modules are used, and enables the compilation of Fortran files in right sequence (file weights are used for it).
[attachment deleted by admin]
darmar:
Hello
I have updated FortranProject plugin. In this version I added code-completion (for names of function/subroutines only) and call-tips for Fortran files.
As was suggested by MortenMacFly (forums.codeblocks.org/index.php/topic,11119.0.html) I set my web page where you can download pre-compiled binaries: darmar.vgtu.lt
By the way I would like to write about the problems I met by developing FP plugin:
1) Code-Completion plugin tries to parse every file in a project regardless of which programming language the file is. It shows code-completion list even for Fortran files. This behaviour prevents FP plugin to show own code-completion list.
2) By default the key combination Ctrl+Space is used to show code-completion list with CC plugin. I haven't found a way how can I use the same key combination for FP plugin. I think it is inconvenient for user to have different key combinations for every different programming language he use.
As a consequence in FP plugin I made so, that the user should disable CC plugin if he wants to use code completion for Fortran files. I have read the proposal on C::B wiki to split CC plugin (wiki.codeblocks.org/index.php?title=Code::Completion_Rewrite). I think it would solve my mentioned problems, but I do not know how far the C::B team with it is.
[attachment deleted by admin]
dmoore:
Hi darmar.
Nice to see someone doing this. Thankyou.
--- Quote from: darmar on January 22, 2010, 06:09:33 pm ---By the way I would like to write about the problems I met by developing FP plugin:
1) Code-Completion plugin tries to parse every file in a project regardless of which programming language the file is. It shows code-completion list even for Fortran files. This behaviour prevents FP plugin to show own code-completion list.
2) By default the key combination Ctrl+Space is used to show code-completion list with CC plugin. I haven't found a way how can I use the same key combination for FP plugin. I think it is inconvenient for user to have different key combinations for every different programming language he use.
--- End quote ---
I think we can make the CC plugin a bit more accomodative by using mimetype/syntax checks to disable its functionality for unsupported languages (presumably we do this for plain text files?). Better yet would be restructuring the CC plugin to allow people to more easily build onto it for different languages, but that is a much bigger job.
MortenMacFly:
--- Quote from: dmoore on January 22, 2010, 07:01:19 pm ---I think we can make the CC plugin a bit more accomodative by using mimetype/syntax checks
--- End quote ---
That's not so easy as you might think. What about libs like iostream? They have no extension and can be any language (e.g. C++ or D...). How to differ?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version