Changeset 2826 for trunk/SlickEdit


Ignore:
Timestamp:
Aug 14, 2016, 3:58:02 PM (9 years ago)
Author:
bird
Message:

kdev.e: updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SlickEdit/kdev.e

    r2820 r2826  
    36393639                     | VSCODEHELPFLAG_MOUSE_OVER_INFO \
    36403640                     | VSCODEHELPFLAG_AUTO_LIST_VALUES \
    3641                      | VSCODEHELPFLAG_FIND_TAG_PREFERS_DEFINITION \
     3641                     | VSCODEHELPFLAG_HIGHLIGHT_TAGS \
    36423642                     | VSCODEHELPFLAG_FIND_TAG_PREFERS_ALTERNATE \
    3643                      | VSCODEHELPFLAG_HIGHLIGHT_TAGS \
    36443643                     ;
    36453644    fNewCodeHelp &= ~(  VSCODEHELPFLAG_SPACE_COMPLETION \
     
    36483647                      | VSCODEHELPFLAG_STRICT_LIST_SELECT \
    36493648                      | VSCODEHELPFLAG_AUTO_LIST_VALUES \
     3649                      | VSCODEHELPFLAG_FIND_TAG_PREFERS_DECLARATION \
     3650                      | VSCODEHELPFLAG_FIND_TAG_PREFERS_DEFINITION \
     3651                      | VSCODEHELPFLAG_FIND_TAG_HIDE_OPTIONS \
    36503652                     );
    36513653    def_codehelp_flags = fNewCodeHelp;
     
    36663668    message("Please restart SlickEdit.")
    36673669}
     3670
     3671
     3672static int kfile_to_array(_str sFile, _str (&asLines)[])
     3673{
     3674    asLines._makeempty();
     3675
     3676    int idTempView = 0;
     3677    int idOrgView  = 0;
     3678    int rc = _open_temp_view(sFile, idTempView, idOrgView);
     3679    if (!rc)
     3680    {
     3681        _GoToROffset(0); /* top of the file. */
     3682
     3683        int i = 0;
     3684        do
     3685        {
     3686            _str sLine = '';
     3687            get_line(sLine);
     3688            asLines[i] = sLine;
     3689            i += 1;
     3690        } while (down() == 0);
     3691
     3692        _delete_temp_view(idTempView);
     3693        activate_window(idOrgView);
     3694    }
     3695    return rc;
     3696}
     3697
     3698
     3699_command void kload_files(_str sFile = "file-not-specified.lst")
     3700{
     3701    _str sFileDir = absolute(_strip_filename(sFile, 'NE'));
     3702    _str aFiles[];
     3703    int  rc = kfile_to_array(sFile, asFiles);
     3704    if (rc == 0)
     3705    {
     3706        _str sFile;
     3707        int i;
     3708        for (i = 0; i < asFiles._length(); i++)
     3709        {
     3710            _str sFile = strip(asFiles[i]);
     3711            if (length(sFile) > 0)
     3712            {
     3713                sAbsFile = absolute(sFile, sFileDir);
     3714                message("Loading \"" :+ sAbsFile :+ "\"...");
     3715                //say("sAbsFile=" :+ sAbsFile);
     3716                edit(sAbsFile);
     3717            }
     3718        }
     3719    }
     3720    else
     3721        message("_GetFileContents failed: " :+ rc);
     3722}
     3723
    36683724
    36693725/**
Note: See TracChangeset for help on using the changeset viewer.