Author Topic: New code completion plugin w/ refactoring  (Read 58262 times)

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: New code completion plugin w/ refactoring
« Reply #15 on: February 14, 2006, 11:40:40 pm »
In the original idea I was going to add some sort of meta block to the cache and every language could add some important data to it for further usage.
That would certainly add some flexibility and ease-of-use to it -- but is it the best way to do it? I just know someone would come along and implement the entire language in the meta block, or do something else stupid with it.

I think we shouldn't look too hard for common structure between languages when it isn't there. How, for instance, would you design a cache system that could store C++ abstract syntax trees, F77 structure models, CSS structures, and Bison grammars? I haven't tried, but there might end up being so many differences that the best common ground we find would be reading and writing some sort of "nodes" whose structures depend on the language.

In the end, I don't know exactly what I'm saying, except "do it right". The interfaces you design should be, if not simple, then hopefully intuitive.
« Last Edit: February 14, 2006, 11:59:13 pm by TDragon »
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Offline artoj

  • Almost regular
  • **
  • Posts: 206
  • Location: Supporting my team
    • http://ajonsson.kapsi.fi/
Re: New code completion plugin w/ refactoring
« Reply #16 on: February 15, 2006, 11:30:20 am »
The only thing you can do with the current level of information the code-completion provides is code complete.  You need a full abstract syntax tree of a language to create good UML diagrams and do reliable refactoring.  That AST will be at the very least langauge specific and even parser specific.  The current code completion plugin is general enough for any language.  Non OO languages can just have everything at global scope for now.

Yup, the refactoring part is pretty tricky. With code completion we can just scan the function names and put them to cache, but for refactoring we need every functions local data aswell. I haven't tought the details yet because I want to have a basic layout of the plugin first and then build more specific features on top of it.

Quote
I don't think you can create a general AST that a UML/Refactoring program can rely on.  The UML/Refactoring program is going to have to be dependent on the langauge module (parser and AST).

Correct, that's why the refactoring engine worked under the specific language (seen in the first message), so it can use its specification.

Quote
Like you said it will probably be possible to create a general thread safe cache system that can store any kind of data you want.

That's the plan, but I don't know if that's possible (store any kind of data), we shall see. Code completion for brainf*ck would be quite cool though. :lol:

Quote
Maybe if I have the time I will whip a UML diagram, in the end there should definetly be one made before the codeing starts.

Yes, there will definitely be UML diagrams of this plugin. The whole coding process is not important issue right now. The most important thing now is to create a basic layout of the plugin and then specialize it. This planning phase is the most important thing in order this plugin to be successful. Like I said, when we have the full documentation this plugin is 50 % ready.

That would certainly add some flexibility and ease-of-use to it -- but is it the best way to do it? I just know someone would come along and implement the entire language in the meta block, or do something else stupid with it.

Yeah, I see your point. We could however expose the whole cache system for the language plugin. So it could itself create the database tables and use any information it wants. This would allow us to extend the cache system any language we want. This would put more stress to the language plugin developer though.

Quote
I think we shouldn't look too hard for common structure between languages when it isn't there. How, for instance, would you design a cache system that could store C++ abstract syntax trees, F77 structure models, CSS structures, and Bison grammars? I haven't tried, but there might end up being so many differences that the best common ground we find would be reading and writing some sort of "nodes" whose structures depend on the language.

Yeah, the language would itself define the structure of its database tables. These values (structures) could be asked from the language plugin for example if some new UI/whatever plugin needs them.

Quote
In the end, I don't know exactly what I'm saying, except "do it right". The interfaces you design should be, if not simple, then hopefully intuitive.

You raised some important topics, that's good. It's important remember that this is a community project and it's very important that the community will provide feedback and new ideas, we're all in this together. Only as a community we can do this right.

        Arto

Offline artoj

  • Almost regular
  • **
  • Posts: 206
  • Location: Supporting my team
    • http://ajonsson.kapsi.fi/
Re: New code completion plugin w/ refactoring
« Reply #17 on: March 08, 2006, 11:39:10 am »
I think it's time update this topic aswell so you know what's going on.

About three weeks ago I was in a car accident. It was a side collision so I hit my head to the side glass and my left arm got some pretty bad hit too. Later it was discovered that my back had taken some damage too.

I don't know how long it will take to recover so I won't be working with this plugin anymore. Sorry.

It's been great working with you and hopefully we will meet again someday.

Until then, goodbye. :(

        Arto

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: New code completion plugin w/ refactoring
« Reply #18 on: March 08, 2006, 12:12:51 pm »
I think it's time update this topic aswell so you know what's going on.

About three weeks ago I was in a car accident. It was a side collision so I hit my head to the side glass and my left arm got some pretty bad hit too. Later it was discovered that my back had taken some damage too.

I don't know how long it will take to recover so I won't be working with this plugin anymore. Sorry.

It's been great working with you and hopefully we will meet again someday.

Until then, goodbye. :(

        Arto

I am sorry to hear about your accident.

I hope you will get well soon.

Thank you very much for all the work you have done.

I wish you all the best.

Best wishes,
Michael

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: New code completion plugin w/ refactoring
« Reply #19 on: March 08, 2006, 12:28:56 pm »
Artoj,

Get well soon, I hope you can fully recover.
It was a pleasure working with you.

All the best,
Lieven

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: New code completion plugin w/ refactoring
« Reply #20 on: March 08, 2006, 11:15:14 pm »
Same here. Please get well!

Ptomaine

  • Guest
Re: New code completion plugin w/ refactoring
« Reply #21 on: March 21, 2006, 01:19:39 am »
Don't you see what's happenning, guys?
We just talk too much and nothing is going to be done.
Blah-blah-blah. People just come and go.

Arto. Get well, be careful and do not snivel. Join us again as soon as possible. It takes too much time to transfer your work on others' shoulders. If you cannot operate with your hands so you can speak anyway. For instance, you can help us in source code reviews or you can control the programming process by making your architectual amendments and improvements while you are getting well. Anyway, if you are really interested in this "child"'s growth you CAN do something. Do not sit about.

Do not just talk. We all know that we really NEED code completion and refactoring tools (plugins or whatsoever) with the minimum sufficient functionalities. Just keep in mind to improve it with the multilingual possibilities and so on but JUST KEEP IN MIND. Anyway, the sooner we'll have some sane code completion and refactoring tools the sooner we'll be able to improve them with their own help :) Honestly, the present code completion tool is just a disaster. Just look inside the "UltimateCPP IDE's Code Assistant" code to learn how the open source code completion tool might work (no ad.).

I do not want to be rude, guys, but time is going fast and it won't be waiting for us while we are making conversations. We must be flexible and that's it for now. While we're deciding "milk or water" other competitive products are going on and smiling while passing us by.

Sorry guys. It seethed up.
« Last Edit: March 21, 2006, 01:37:03 am by Ptomaine »

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: New code completion plugin w/ refactoring
« Reply #22 on: March 21, 2006, 11:28:06 am »
Don't you see what's happenning, guys?
We just talk too much and nothing is going to be done.
Blah-blah-blah. People just come and go.

Sorry, but I am quite shocked by your post :shock:.

First of all, I find that the devs of Code::Blocks are doing a great work :D. Morevover, they work in their free time and they get not paid for it.

Second, I do not like to much to always ask for new features, bug fixes, and so on without trying to contribute to the project. Consequently, I try to help as I can in my free and not free time :D.

Third, it is true that code completion needs some improvments, but anyway, it is not so bad. Rickg22 did a good job with it :D. Arto has had an accident (I hope he will get well soon). If not I am sure he would have done a good job.

And also, help is welcome :D. May be you can help in developing the code completion or taking the work initially started by Arto :).

Best wishes,
Michael 

Ptomaine

  • Guest
Re: New code completion plugin w/ refactoring
« Reply #23 on: March 21, 2006, 02:05:31 pm »
Sorry, but I am quite shocked by your post :shock:.

That's alright. Sometimes it is very good for our health to be shoked (adrenaline, you know) :)

First of all, I find that the devs of Code::Blocks are doing a great work :D. Morevover, they work in their free time and they get not paid for it.

My big respect to all of devs. But the difference between October's RC2 and the most recent one is quite small. I don't feel relief from version to version. I don't care how much IDE is looking good, but I care the functionalities it offers. Wrong development accents?

Second, I do not like to much to always ask for new features, bug fixes, and so on without trying to contribute to the project. Consequently, I try to help as I can in my free and not free time :D.

Applauses. But I prefer to do things that I can do best. If I have no idea how refactoring or effective parcer work than I will not begin to do this because others already have some good ideas on this account. So, why to create doubts and chaos? Donation? :)

Third, it is true that code completion needs some improvments, but anyway, it is not so bad. Rickg22 did a good job with it :D. Arto has had an accident (I hope he will get well soon). If not I am sure he would have done a good job.

Aha. I always turn this plugin off because it slows down my programming but it's supposed to make programming faster! When I download a new version of Code::Blocks, in hope, the first thing I do is turning the code completion plugin on, testing it for a minute and than turning it off again. Know why, because it's not helping me but slowing down my work. I need it but I cannot work faster with the present version of the plugin.

And also, help is welcome :D. May be you can help in developing the code completion or taking the work initially started by Arto :).

I'm kind of a sound programmer :). Will multimedia save the world and relief the pain? :)

Best wishes,
Michael 

Thank you, Michael, for your respond. I really like the way you've tried to protect development and to argue back to me, but...
All the best to you.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: New code completion plugin w/ refactoring
« Reply #24 on: March 21, 2006, 02:45:15 pm »
You do have a couple of valid points in your original post, although I cannot agree with it as a whole. In particular the fact that Arto had his accident is a rather unpleasant condition (mostly for him), so I perceive the above as a bit upsetting.

But then this line is simply funny:
Quote
But the difference between October's RC2 and the most recent one is quite small. I don't feel relief from version to version.
Not sure whether or not to take that statement for serious... an ousider might be tempted to believe that you have never used a recent build. :)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: New code completion plugin w/ refactoring
« Reply #25 on: March 21, 2006, 09:21:19 pm »
Sorry, but I am quite shocked by your post :shock:.

That's alright. Sometimes it is very good for our health to be shoked (adrenaline, you know) :)

Thank you, but in these weeks I have had enough adrenaline for the next 10 years, especially today :).

First of all, I find that the devs of Code::Blocks are doing a great work :D. Morevover, they work in their free time and they get not paid for it.

My big respect to all of devs. But the difference between October's RC2 and the most recent one is quite small. I don't feel relief from version to version. I don't care how much IDE is looking good, but I care the functionalities it offers. Wrong development accents?

Ehm. Here I should agree with Thomas. Compare RC2 with the latest nightly build and you will see the differences. IMHO the development accent is put on the right place :D.

Second, I do not like to much to always ask for new features, bug fixes, and so on without trying to contribute to the project. Consequently, I try to help as I can in my free and not free time :D.

Applauses. But I prefer to do things that I can do best. If I have no idea how refactoring or effective parcer work than I will not begin to do this because others already have some good ideas on this account. So, why to create doubts and chaos? Donation? :)

I can accept your point of view, anyway, even if you do not have knowledge about parsing/refactoring, but interest and a bit of time, then you can try to create a code completion. Moreover, you will become help from the other users/devs. Consequently, you will learn something new and that it could be useful in the future :).

Third, it is true that code completion needs some improvments, but anyway, it is not so bad. Rickg22 did a good job with it :D. Arto has had an accident (I hope he will get well soon). If not I am sure he would have done a good job.

Aha. I always turn this plugin off because it slows down my programming but it's supposed to make programming faster! When I download a new version of Code::Blocks, in hope, the first thing I do is turning the code completion plugin on, testing it for a minute and than turning it off again. Know why, because it's not helping me but slowing down my work. I need it but I cannot work faster with the present version of the plugin.

I let it on. I use it sometimes and normally it does not disturb me.

And also, help is welcome :D. May be you can help in developing the code completion or taking the work initially started by Arto :).

I'm kind of a sound programmer :). Will multimedia save the world and relief the pain? :)

I am also involved in the multimedia domain, mostly MPEG-7/21, UMA and semantic.

If multimedia would save the world? Let we hope for it.... :lol:

Best wishes,
Michael 

Thank you, Michael, for your respond. I really like the way you've tried to protect development and to argue back to me, but...
All the best to you.

I think that all the devs here deserve respect for what they are doing. Just my humble opinion anyway :). Rickg22 put a lot of time and passion in his work and the results are very good.

Anyway more than argue, I see this discussion as an exchange of opinions :D.

Best wishes,
Michael

Ptomaine

  • Guest
Re: New code completion plugin w/ refactoring
« Reply #26 on: March 21, 2006, 10:58:51 pm »
Ok, guys.

First, I'm sorry, guys, for my offensive words towards Arto. I'm really sorry. I didn't mean that.

Well, let's imagine my situation.
I've started using CB about a half year ago. I've created a project and been working on it. I update CB bona fide, time to time with the nightly builds. And continue working. An IDE for me is a kind of a tool that helps me to EDIT my source code, BUILD it and DEBUG it in a convenient way. Generally, it must help me to work. When I said that there was no difference between RC2 and the most recent build then I've ment that the new versions hadn't facilitate eighter my EDITing or BUILDing or DEBUGing processes. For me, CB has changed visually but its new features didn't reflect on my work. For instance, I use a cup to drink and I really do not care how it looks like. The main thing is the cup lets me drink - it is its general usage (it does the work it's supposed to do) :). So, here it is. Moreover, it seems to me that CB's RC2 state had been frozen forever (kidding :))

Anyway, guys, I love what you are doing. And sure, you want to turn CB into something amazing.
All my strict words were said because I want CB become something amazing and I care it.
I've just been frightened of myself when I wanted to change the IDE I love (CB) to UPP... so, I've seethed up...

Hugs and kisses :) (the patient's rescued :))
« Last Edit: March 21, 2006, 11:25:19 pm by Ptomaine »

takeshimiya

  • Guest
Re: New code completion plugin w/ refactoring
« Reply #27 on: March 21, 2006, 11:12:16 pm »
Ok, guys.

First, I'm sorry, guys, for my offensive words towards Arto. I'm really sorry. I didn't mean that.

Well, let's imagine my situation.
I've started using CB about a half year ago. I've created a project and been working on it. I update CB bona fide, time to time with the nightly builds. And continue working. An IDE for me is a kind of a tool that helps me to EDIT my source code, BUILD it and DEBUG it in a convenient way. Generally, it must help me to work. When I said that there was no difference between RC2 and the most recent build then I've ment that the new versions hadn't facilitate eighter my EDITing or BUILDing or DEBUGing processes. For me, CB has changed visually for me but its new features didn't reflect on my work. For instance, I use cups to drink and I really do not care how it looks like. The main thing, the cup lets me drink - it is its general usage (it does the work it's supposed to do) :). So, here it is.

Anyway, guys, I love what you are doing. And sure, you want to turn CB into something amazing.
All my strict words were said because I want CB become something amazing and I care it.
I've just been frightened of myself when I wanted to change the IDE I love (CB) to UPP... so, I've seethed up...

I understand all the features you might want, but you must understand two things:
-C::B is under heavy development.
-Lack of human resources (time). All of this is being done by few people in spare time and in a free way.

What you can do from your position is: spread the word, so more developers can join the effort, report bugs, send patches, etc.

Particularly on CodeCompletion, right now, the only devs working (coding) on redesign it are TDragon and ddiego (in separate ways).

You might know that C++ parsing is hell, and so is CodeCompletion, along with threading, performance issues, etc.
It's not an easy topic.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: New code completion plugin w/ refactoring
« Reply #28 on: March 21, 2006, 11:17:28 pm »
Quote
When I said that there was no difference between RC2 and the most recent build then I've ment that the new versions hadn't facilitate eighter my EDITing or BUILDing or DEBUGing processes
And here is the proof, you have *obviously* never used the debugger :lol:

The debugger in RC2 was unusable, a pain at best. The present version is (although still work in progress) simply amazing.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Ptomaine

  • Guest
Re: New code completion plugin w/ refactoring
« Reply #29 on: March 21, 2006, 11:32:30 pm »
Quote
When I said that there was no difference between RC2 and the most recent build then I've ment that the new versions hadn't facilitate eighter my EDITing or BUILDing or DEBUGing processes
And here is the proof, you have *obviously* never used the debugger :lol:

The debugger in RC2 was unusable, a pain at best. The present version is (although still work in progress) simply amazing.

Debugging... debugging... ok. true! But editing and building goes before, Ha! :)