SlickEdit Community
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
September 02, 2010, 11:45:48 AM  


Login with username, password and session length

Pages: [1] 2 3
  Print  
Author Topic: Open project file macro and new open local symbol macro  (Read 15068 times)
asandler
Community Member


Hero Points: 16
Posts: 123


« on: November 14, 2007, 07:42:30 AM »

Here's another macro. This one, once triggered, opens list of all project file. The list is search-able, like in open local symbol macro (http://community.slickedit.com/index.php?topic=2245.0). Note that older version of open local symbol WILL NOT work with this macro. Hence the new version of open local symbol. Have fun!

Logged

Alexander Sandler
Alex on Linux
asandler
Community Member


Hero Points: 16
Posts: 123


« Reply #1 on: November 18, 2007, 10:38:32 AM »

One important note. Thanks to hs2 for inspiring me to fix old abandoned macro and bring it to daylight  Grin Grin Grin
Logged

Alexander Sandler
Alex on Linux
hs2
Community Member


Hero Points: 221
Posts: 2151


« Reply #2 on: November 18, 2007, 09:01:06 PM »

Hi Alexander, it's really good to read this kind of feedback !!
And as already mentioned it also helped me to get a long missed feature and to get better in Slick-C programming too.
Because I'm using it very, very often I didn't stop to improve 'ols'...
(Added 'Quick tag filter' + Preview TB support and it scales much better with buffers containing a large number of tags.)
But there were quite a lot of internal changes so I need to do some more testing (simple enough - I'm just using it).
I've to say that I learned a lot again since I've done some of the things the first time.
I'll post it here when it passed (my own) QA and I've finished a short description to be prepared for the new 'User Macros' list/board/whatever Wink
Stay tuned,
HS2

BTW: I don't want to get in conflict with your versions - any idea about a proper naming scheme ?
Logged
asandler
Community Member


Hero Points: 16
Posts: 123


« Reply #3 on: November 19, 2007, 08:59:07 AM »

Oh.. it's getting messy. In general I'd like to keep single branch of both macros. They are simply too small to make several different versions. Also, you'll need changes that I made in ols3 to run opf3. I suggest that you pick changes from ols3 (diff ols2 ols3 - there are not so many of them) and merge them into your version of the macro. How about that?
Logged

Alexander Sandler
Alex on Linux
hs2
Community Member


Hero Points: 221
Posts: 2151


« Reply #4 on: November 19, 2007, 08:58:08 PM »

Ok Alex - I've checked the diffs and it should be pretty easy to merge/resolve the 'namespace' conflict.
Oh my - after I've finished the version which could handle a large number of tags better (in UI) I've realized that there is already a probably even better (undocumented) method available ...
Tested it and now I know that this is the way to go. It's really blazing fast even for large tree lists and also simplifies the code. This would speed up 'opf' as well. I'll send you an example howto use it after finishing the changes.
HS2
Edit: My bad - the super-fast method filters the caption only but this makes not much sense for 'ols' b/c we don't want to get argument list matches...
« Last Edit: November 19, 2007, 09:57:02 PM by hs2 » Logged
asandler
Community Member


Hero Points: 16
Posts: 123


« Reply #5 on: December 09, 2007, 06:03:29 AM »

Latest open_local_symbol release by hs2 from here
http://community.slickedit.com/index.php?topic=2245.30
has no conflicts with open_project_file macro. Therefore, open_project_file3 is void. Please find attached "without '3'" version of the macro. It also includes nice copyright notice Grin and distributed as hotfix (credit goes to hs2 Grin) From now on, please download this version of the macro.
Logged

Alexander Sandler
Alex on Linux
myrkle
Community Member


Hero Points: 1
Posts: 18


« Reply #6 on: December 14, 2007, 04:25:10 PM »

 I really like this macro, but it doesn't work as-is for me. It assumes that the files in the project share a common root path with the project file. I keep my project files in a separate directory and so this doesn't work. For now I've hacked it to just prepend the drive letter part of the project file path to the file path.
Logged
asandler
Community Member


Hero Points: 16
Posts: 123


« Reply #7 on: December 15, 2007, 07:34:36 AM »

I see. Thanks for reporting this. Give me few days and I'll fix it for you.
Logged

Alexander Sandler
Alex on Linux
asandler
Community Member


Hero Points: 16
Posts: 123


« Reply #8 on: January 03, 2008, 08:31:11 AM »

Finally got some time to work on it. Sorry for delay.
I think I fixed the issue you reported. Please give this new version a try.
Thanks.
In general, this is the latest version of the macro and is the version that should be downloaded.
Logged

Alexander Sandler
Alex on Linux
myrkle
Community Member


Hero Points: 1
Posts: 18


« Reply #9 on: January 04, 2008, 03:44:21 PM »

I gave the new version a try but it doesn't fix the issue.


The problem is here: (~line 355)
Code:
        name = _TreeGetCaption( index );
        proj = _project_get_filename();
        proj = strip_filename( proj, "N" );
        name = proj :+ name;

This assumes the path part of the project filename can be prepended to the relative path of the file to get the full path. The problem is, my project files are not in some parent directory of the source files. So, for example:

My project file is here: c:\projects\oob
My source files are here: c:\source\test\test.cpp

The code above tries to open: c:\projects\oob\/source/test/test.cpp

Thanks!

Logged
asandler
Community Member


Hero Points: 16
Posts: 123


« Reply #10 on: January 06, 2008, 09:51:18 AM »

You are right. My tests were incomplete and I missed this point. I fixed this in a new version and hope that it will work now. Sorry for the inconvenience and thanks a lot for pointing this spot.

This version supersede any previous versions of the macro.
Logged

Alexander Sandler
Alex on Linux
myrkle
Community Member


Hero Points: 1
Posts: 18


« Reply #11 on: January 09, 2008, 09:43:18 PM »

It works perfectly now!

Thanks for fixing this and creating this very useful macro in the first place!
Logged
asandler
Community Member


Hero Points: 16
Posts: 123


« Reply #12 on: January 21, 2008, 10:54:43 AM »

I found another bug in the code. Sometimes, depending on the slickedit's current directory, it wouldn't open the file. I fixed it and it should now work well. Please use this version if you experience the problem I described.

This version supersedes any previous versions of the macro.
Logged

Alexander Sandler
Alex on Linux
asandler
Community Member


Hero Points: 16
Posts: 123


« Reply #13 on: January 25, 2008, 04:22:00 PM »

Finally, as promised, my macros for SlickEdit web-page:
http://www.alexandersandler.net/stuff/software-projects/slickedit-macros
Logged

Alexander Sandler
Alex on Linux
hs2
Community Member


Hero Points: 221
Posts: 2151


« Reply #14 on: January 25, 2008, 06:32:42 PM »

Congratulations - it's an absolutely great web site ! HP++
HS2
Logged
Pages: [1] 2 3
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC

©1988-2008 SlickEdit Inc.   •  1 919.473.0070   •  1.800.934.EDIT
Contact Us   •   Privacy Policy   •   Terms of Use