Ignore:
Timestamp:
02/22/08 19:53:07 (16 years ago)
Author:
Nicholas Riley
Message:

APEMain.m: Note missing Xcode 3 support. Add Terminal 2.0 support.

English.lproj/APE Manager plugin.nib:

English.lproj/APEInfo.rtfd:

ICeCoffEE.[hm]: Bring triggering window and app to front if error
dialog displayed in ICCF_HandleException. Remove initial word
selection. Launch preexisting selection if present. Remove 10.3
support. Update for new ICeCoffEETrigger API. Rename downEvent
parameter for consistency.

ICeCoffEE.xcodeproj: Added files.

ICeCoffEEParser.m: Handle multiline URLs.

ICeCoffEETTView.[hm]: Terminal 2.0 support (thank you for having a
usable NSTextInput implementation!)

ICeCoffEETTViewTrigger.[hm]: ICeCoffEETrigger implementation for
TTView. Can't set range as we do for NSTextView because you can't
have an arbitrary empty selection range in Terminal, so we pass it
directly to ICCF_LaunchURLFromTTView.

ICeCoffEETerminal.[hm]: Fix capitalization on ICeCoffEETermSubviewSuper.
Pass downEvent to ICCF_HandleException so it can bring the triggering
window to the front.

ICeCoffEETextViewTrigger.[hm]: Moved from ICeCoffEETrigger.

ICeCoffEETrigger.[hm]: Now an abstract superclass. Replace direct
access to ICCF_sharedTrigger with +cancel. Create 0-character range
(if click outside selectedRange) or save selectedRange. Move
debugging logs here from ICeCoffEE.m. Add description method.

ICeCoffEEWebKit.m: Pass downEvent to ICCF_HandleException so it can
bring the triggering window to the front.

Installer components/ui/ui.plist: Updated for 1.5d3.

TestParser.m: Handle multiline URLs; newlines are printed as \ and
tabs as >. Implement ICCF_StringByRemovingCharactersInSet, which will
move elsewhere once Internet Config support is removed.

VERSION.xcconfig: Updated for 1.5d3.

urls.plist: Test for multiline URLs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ICeCoffEE/ICeCoffEE/ICeCoffEEParser.m

    r384 r388  
    115115
    116116static BOOL ICCF_StringIncludesCharacter(NSString *s, unichar character, NSRange range) {
    117     return ([s rangeOfCharacterFromSet: [NSCharacterSet characterSetWithCharactersInString:
     117    NSRange result = [s rangeOfCharacterFromSet: [NSCharacterSet characterSetWithCharactersInString:
    118118                                         [NSString stringWithCharacters: &character length: 1]]
    119                                options: NSLiteralSearch range: range].location != NSNotFound);
     119                                        options: NSLiteralSearch range: range];
     120    return (result.location != NSNotFound);
    120121}
    121122
     
    135136    NSRange delimiterRange;
    136137    unsigned extraLen;
     138    BOOL multiLine = NO;
    137139   
    138140    ICCF_CheckRange(range);
     
    161163    } else {
    162164        NSCAssert(delimiterRange.length == 1, @"Internal error: delimiter matched range is not of length 1");
     165        if ([s characterAtIndex: delimiterRange.location] == '<') { // XXX move to expandBoth to handle clicking in middle
     166            multiLine = YES;
     167            urlRightDelimiters = [NSCharacterSet characterSetWithCharactersInString: @">"];
     168        }
    163169        range.length += range.location - delimiterRange.location - 1;
    164170        range.location = delimiterRange.location + 1;
    165171    }
    166172   
     173
    167174expandBack:
    168175    // XXX instead of length of string, make this stop at the max URL length to prevent protracted searches
     
    182189        extraLen = [s length] - NSMaxRange(range);
    183190
     191        unichar opening, closing = [s characterAtIndex: delimiterRange.location];
     192        if (closing == '>' && !multiLine && ICCF_StringIncludesCharacter(s, '<', NSMakeRange(0, range.location))) {
     193            urlLeftDelimiters = [NSCharacterSet characterSetWithCharactersInString: @"<"];
     194            goto expandFront; // XXX move to expandBoth to handle clicking in middle
     195        }
    184196        // grow URL past closing paren/brace/bracket if we've seen an open paren/brace/bracket
    185         unichar opening, closing = [s characterAtIndex: delimiterRange.location];
    186197        if (closing == ')') opening = '(';
    187198        else if (closing == '}') opening = '{';
Note: See TracChangeset for help on using the changeset viewer.