patchoffer for 4426 and 4375: autodisplay wordcompletion box

Discussion about CodeLite development process and patches
nemesis
CodeLite Enthusiast
Posts: 37
Joined: Fri Oct 01, 2010 8:32 pm
Genuine User: Yes
IDE Question: all
Contact:

patchoffer for 4426 and 4375: autodisplay wordcompletion box

Post by nemesis »

hi there!

according to http://codelite.org/forum/viewtopic.php?f=11&t=1125 i patched the current trunk (4426) and created a diff file.
added option under tags menu to enable autodisplay (default: off) and slider for minimum number of chars to be typed to appear the box.
the changes are the same i did with my working version 4375.

greets,
nem

edit:
i also added a patchdiff for the latest stable 4375 for people who like to work with stable versions. just apply the patch, recompile and replace binary.

edit:
i quickfixed the 4375 diff for the stableusers since the slider wasn't shown correctly.
You do not have the required permissions to view the files attached to this post.
Last edited by nemesis on Mon Oct 04, 2010 7:34 pm, edited 1 time in total.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: patchoffer for 4426: autodisplay wordcompletion box

Post by eranif »

I modified the patch a bit:
1) I changed the UI layout of the tags options dialog (2 files failed in the patch, however, both of them are auto generated files, so regenerating them using the fbp file solved this issue)
2) I "linked" between the check box that enables this feature and the other 2 controls (the slider and the text control) to enable / disable them

Other than that its working as expected

Committed in revision 4428
Eran
Make sure you have read the HOW TO POST thread
nemesis
CodeLite Enthusiast
Posts: 37
Joined: Fri Oct 01, 2010 8:32 pm
Genuine User: Yes
IDE Question: all
Contact:

Re: patchoffer for 4426 and 4375: autodisplay wordcompletion box

Post by nemesis »

hm, weird. patching works just fine here and i rebuilt supposed code with fbp tool, too.
well anyway, thanks for adding.

greets,
nem
User avatar
aprilmot
CodeLite Enthusiast
Posts: 24
Joined: Sun Jul 04, 2010 1:20 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: patchoffer for 4426 and 4375: autodisplay wordcompletion box

Post by aprilmot »

Hello Nemesis, Eran,

Could you please let me know how to apply patches for Codelite(In General).
I am using windows and ubuntu 10.04.
I have downloaded the
codelite-2.7.0.4375.tar.gz
source package.
and the patch file
codelite_4375_patch_autodisplaywordcompletion_quickfix.gz
I would like to apply the patch and build the codelite.

I found the help for building codelite from this webpage
.
I hope it is similar in Ubuntu also.

Sorry if I am posting a silly question.
Regards
Aprilmot.
Long Live the Open Source and Humanity
nemesis
CodeLite Enthusiast
Posts: 37
Joined: Fri Oct 01, 2010 8:32 pm
Genuine User: Yes
IDE Question: all
Contact:

Re: patchoffer for 4426 and 4375: autodisplay wordcompletion box

Post by nemesis »

hi there!

checkout revision 4375 from the svn repo in a new directory (i.e. ~/codelitepatch):

Code: Select all

mkdir ~/codelitepatch
cd ~/codelitepatch
svn -r 4375 co https://codelite.svn.sourceforge.net/svnroot/codelite/trunk 4375
copy the patchfile to ~/codelitepatch/4375, change to it on the commandline and unzip it. then apply the patch with:

Code: Select all

patch -p0 -i codelite_4375_patch_autodisplaywordcompletion_quickfix
then you're ready to configure and compile with:

Code: Select all

./configure && make
this takes a while. if it's ended with

Code: Select all

==========================================================
Done, please run sudo make install.
==========================================================
just copy the binary from ~/codelitepatch/4375/Runtime/codelite to /usr/bin/codelite (if the old codelite-binary is somewhere else, replace it there of course).

greets,
nem
User avatar
aprilmot
CodeLite Enthusiast
Posts: 24
Joined: Sun Jul 04, 2010 1:20 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: patchoffer for 4426 and 4375: autodisplay wordcompletion box

Post by aprilmot »

One more quick question. Could you please let me know the command equivalent of "patch -p0 -i codelite_4375_patch_autodisplaywordcompletion_quickfix" for windows.
Long Live the Open Source and Humanity
nemesis
CodeLite Enthusiast
Posts: 37
Joined: Fri Oct 01, 2010 8:32 pm
Genuine User: Yes
IDE Question: all
Contact:

Re: patchoffer for 4426 and 4375: autodisplay wordcompletion box

Post by nemesis »

should be the same. just get the program. http://gnuwin32.sourceforge.net/packages/patch.htm

greets,
nem
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: patchoffer for 4426 and 4375: autodisplay wordcompletion box

Post by eranif »

nemesis wrote:just get the program. http://gnuwin32.sourceforge.net/packages/patch.htm
codelite installer already includes patch.exe, so no need to download it (it is located under C:\Program Files\CodeLite)

Eran
Make sure you have read the HOW TO POST thread
foxmuldr
CodeLite Expert
Posts: 120
Joined: Sun May 10, 2009 6:56 am
Contact:

Re: patchoffer for 4426 and 4375: autodisplay wordcompletion box

Post by foxmuldr »

What would be involved in creating an auto-completion box for global and local+parameter variable names? I see almost no value in common C++ keywords popping up, but would find function/method-specific variable names showing up most helpful. Visual Assist X does this brilliantly in Microsoft's Visual Studio.

And for my programs, I use a common convention for non-member variable names, such that the first character indicates locality:

Code: Select all

g = global
l = local
t = parameter
The second character indicates the type:

Code: Select all

c = character
n = numeric
l = logical (boolean)
f = float or double
And the name proceeds after that. Examples:

Code: Select all

bool  glSomeBool     = false;
int   gnSomeNumber   = 0;
char  gcSomeString[] = "Hello, ball.";
float gfPi           = 3.14159;

void my_function(int tnSomeInt, bool tlSomeBool)
{
    int lnIterator;
    bool llFlag = false;

    for (lnIterator = 0; !llFlag && lnIterator < tnSomeInt; lnIterator++)
        llFlag = some_function(lnIterator, tnSomeInt, tlSomeBool);
}
Could we set up this feature such that if a user-defined combination of letters appeared (in my case, it would be gc, gl, gt, gf, lc, ll, lt, lf, tc, tl, tt or tf) then it would show all local, global and parameter variable names?

Possible?
Last edited by foxmuldr on Thu Oct 07, 2010 7:57 am, edited 2 times in total.
Best regards,
Rick C. Hodgin
www.Visual-FreePro.org
www.LibSF.org
foxmuldr
CodeLite Expert
Posts: 120
Joined: Sun May 10, 2009 6:56 am
Contact:

Re: patchoffer for 4426 and 4375: autodisplay wordcompletion box

Post by foxmuldr »

aprilmot wrote:"Long live open source and humanity."
Open source is where it's at. Period and paragraph. ;)
Best regards,
Rick C. Hodgin
www.Visual-FreePro.org
www.LibSF.org
Post Reply