Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified Shared Code/XCFixin.h
100644 → 100755
Empty file.
Empty file modified Shared Code/XCFixin.m
100644 → 100755
Empty file.
Empty file modified Shared Code/XCFixin_BuildAllFixins.xcodeproj/project.pbxproj
100644 → 100755
Empty file.
10 changes: 10 additions & 0 deletions XCFixin_CustomizeWarningErrorHighlights/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,21 @@
<string>1</string>
<key>NSPrincipalClass</key>
<string>XCFixin_CustomizeWarningErrorHighlights</string>
<key>DVTPlugInCompatibilityUUIDs</key>
<array>
<string>63FC1C47-140D-42B0-BB4D-A10B2D225574</string>
<string>37B30044-3B14-46BA-ABAA-F01000C27B63</string>
<string>A2E4D43F-41F4-4FB9-BB94-7177011C9AED</string>
<string>AD68E85B-441B-4301-B564-A45E4919A6AD</string>
<string>C4A681B0-4A26-480E-93EC-1218098B9AA0</string>
</array>
<key>XC4Compatible</key>
<true/>
<key>XCGCReady</key>
<true/>
<key>XCPluginHasUI</key>
<false/>
<key>XC5Compatible</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -68,41 +68,42 @@ static void overridenewMessageAttributesForFont(id self, SEL _cmd, DVTTextAnnota


+ (void)pluginDidLoad: (NSBundle *)plugin{

XCFixinPreflight();
float lineAlpha = 0.20; //whole line
float topAlpha = 0.4; //the right-hand label
float bottomAlpha = 0.4;
float lineAlpha = 0.125; //whole line

float labelTopAlpha = 0.125; //the right-hand label
float labelBottomAlpha = 0.125;

//define gradient for warning text highlight
NSColor * warningColor = [NSColor colorWithDeviceRed:1 green:1 blue:0 alpha: lineAlpha];
NSGradient * gWarning = [[NSGradient alloc] initWithStartingColor: [warningColor colorWithAlphaComponent: topAlpha]
endingColor: [warningColor colorWithAlphaComponent: bottomAlpha]];
NSGradient * gWarning = [[NSGradient alloc] initWithStartingColor: [warningColor colorWithAlphaComponent: labelTopAlpha]
endingColor: [warningColor colorWithAlphaComponent: labelBottomAlpha]];
//define warning text highlight theme
warningTheme =
[[DVTTextAnnotationTheme alloc] initWithHighlightColor: warningColor
borderTopColor: [NSColor clearColor]
borderBottomColor: [NSColor clearColor]
borderTopColor: warningColor
borderBottomColor: warningColor
overlayGradient: nil
overlayTintedGradient: nil
messageBubbleBorderColor: [NSColor clearColor]
messageBubbleBorderColor: [NSColor clearColor]
messageBubbleGradient: gWarning
caretColor: [NSColor yellowColor]
highlightedRangeBorderColor: [NSColor clearColor]
caretColor: [NSColor yellowColor]
highlightedRangeBorderColor: [NSColor clearColor]
];

//define gradient for error text highlight
NSColor * errorColor = [NSColor colorWithDeviceRed:1 green:0 blue:0 alpha: lineAlpha];
NSGradient * gError = [[NSGradient alloc] initWithStartingColor: [errorColor colorWithAlphaComponent: topAlpha]
endingColor: [errorColor colorWithAlphaComponent: bottomAlpha]];
NSGradient * gError = [[NSGradient alloc] initWithStartingColor: [errorColor colorWithAlphaComponent: labelTopAlpha]
endingColor: [errorColor colorWithAlphaComponent: labelBottomAlpha]];
//define error text highlight theme
errorTheme =
[[DVTTextAnnotationTheme alloc] initWithHighlightColor: errorColor
borderTopColor: [NSColor clearColor]
borderBottomColor: [NSColor clearColor]
borderTopColor: errorColor
borderBottomColor: errorColor
overlayGradient: nil
overlayTintedGradient: nil
messageBubbleBorderColor: [NSColor clearColor]
messageBubbleBorderColor: [NSColor clearColor]
messageBubbleGradient: gError
caretColor: [NSColor redColor]
highlightedRangeBorderColor: [NSColor clearColor]
Expand All @@ -111,16 +112,16 @@ + (void)pluginDidLoad: (NSBundle *)plugin{

//define gradient for static Analyzer text highlight
NSColor * analyzerColor = [NSColor colorWithDeviceRed:0.5 green:0.5 blue:1 alpha: lineAlpha];
NSGradient * gAnalyzer = [[NSGradient alloc] initWithStartingColor: [analyzerColor colorWithAlphaComponent: topAlpha]
endingColor: [analyzerColor colorWithAlphaComponent: bottomAlpha]];
NSGradient * gAnalyzer = [[NSGradient alloc] initWithStartingColor: [analyzerColor colorWithAlphaComponent: labelTopAlpha]
endingColor: [analyzerColor colorWithAlphaComponent: labelBottomAlpha]];
//define static Analyzer text highlight theme
analyzerTheme =
[[DVTTextAnnotationTheme alloc] initWithHighlightColor: analyzerColor
borderTopColor: [NSColor clearColor]
borderBottomColor: [NSColor clearColor]
borderTopColor: analyzerColor
borderBottomColor: analyzerColor
overlayGradient: nil
overlayTintedGradient: nil
messageBubbleBorderColor: [NSColor clearColor]
messageBubbleBorderColor: [NSColor clearColor]
messageBubbleGradient: gAnalyzer
caretColor: [NSColor blueColor]
highlightedRangeBorderColor: [NSColor clearColor]
Expand All @@ -129,16 +130,16 @@ + (void)pluginDidLoad: (NSBundle *)plugin{

//define gradient for debugger text highlight
NSColor * debuggerColor = [NSColor colorWithDeviceRed:0.0 green:1 blue:0.5 alpha: lineAlpha];
NSGradient * gDebugger = [[NSGradient alloc] initWithStartingColor: [debuggerColor colorWithAlphaComponent: topAlpha]
endingColor: [debuggerColor colorWithAlphaComponent: bottomAlpha]];
NSGradient * gDebugger = [[NSGradient alloc] initWithStartingColor: [debuggerColor colorWithAlphaComponent: labelTopAlpha]
endingColor: [debuggerColor colorWithAlphaComponent: labelBottomAlpha]];
//define static debugger text highlight theme
debuggerTheme =
[[DVTTextAnnotationTheme alloc] initWithHighlightColor: debuggerColor
borderTopColor: [NSColor clearColor]
borderBottomColor: [NSColor clearColor]
borderTopColor: debuggerColor
borderBottomColor: debuggerColor
overlayGradient: nil
overlayTintedGradient: nil
messageBubbleBorderColor: [NSColor clearColor]
messageBubbleBorderColor: [NSColor clearColor]
messageBubbleGradient: gDebugger
caretColor: [NSColor greenColor]
highlightedRangeBorderColor: [NSColor clearColor]
Expand All @@ -147,16 +148,16 @@ + (void)pluginDidLoad: (NSBundle *)plugin{

//define gradient for Notice text highlight
NSColor * noticeColor = [NSColor colorWithDeviceRed:0.25 green:0.25 blue:0.25 alpha: lineAlpha];
NSGradient * gNotice = [[NSGradient alloc] initWithStartingColor: [noticeColor colorWithAlphaComponent: topAlpha]
endingColor: [noticeColor colorWithAlphaComponent: bottomAlpha]];
NSGradient * gNotice = [[NSGradient alloc] initWithStartingColor: [noticeColor colorWithAlphaComponent: labelTopAlpha]
endingColor: [noticeColor colorWithAlphaComponent: labelBottomAlpha]];
//define Notice text highlight theme
grayTheme =
[[DVTTextAnnotationTheme alloc] initWithHighlightColor: noticeColor
borderTopColor: [NSColor clearColor]
borderBottomColor: [NSColor clearColor]
borderTopColor: noticeColor
borderBottomColor: noticeColor
overlayGradient: nil
overlayTintedGradient: nil
messageBubbleBorderColor: [NSColor clearColor]
messageBubbleBorderColor: [NSColor clearColor]
messageBubbleGradient: gNotice
caretColor: [NSColor grayColor]
highlightedRangeBorderColor: [NSColor clearColor]
Expand Down