Page 1 of 2

patchoffer for 4426 and 4375: autodisplay wordcompletion box

Posted: Mon Oct 04, 2010 3:34 pm
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.

Re: patchoffer for 4426: autodisplay wordcompletion box

Posted: Mon Oct 04, 2010 4:51 pm
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

Re: patchoffer for 4426 and 4375: autodisplay wordcompletion box

Posted: Mon Oct 04, 2010 4:57 pm
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

Re: patchoffer for 4426 and 4375: autodisplay wordcompletion box

Posted: Mon Oct 04, 2010 11:36 pm
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.

Re: patchoffer for 4426 and 4375: autodisplay wordcompletion box

Posted: Tue Oct 05, 2010 12:05 am
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

Re: patchoffer for 4426 and 4375: autodisplay wordcompletion box

Posted: Tue Oct 05, 2010 12:11 am
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.

Re: patchoffer for 4426 and 4375: autodisplay wordcompletion box

Posted: Tue Oct 05, 2010 12:14 am
by nemesis
should be the same. just get the program. http://gnuwin32.sourceforge.net/packages/patch.htm

greets,
nem

Re: patchoffer for 4426 and 4375: autodisplay wordcompletion box

Posted: Tue Oct 05, 2010 12:59 am
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

Re: patchoffer for 4426 and 4375: autodisplay wordcompletion box

Posted: Thu Oct 07, 2010 7:52 am
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?

Re: patchoffer for 4426 and 4375: autodisplay wordcompletion box

Posted: Thu Oct 07, 2010 7:54 am
by foxmuldr
aprilmot wrote:"Long live open source and humanity."
Open source is where it's at. Period and paragraph. ;)