Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Plug-in conversion of the Dialog 2 testing framework. This should com…
…pile and accept commands, e.g. echo '{ menuItems = ({title = 'foo';});}' | "$DIALOG" menu Note: currently I’ve set it up to hijack the $DIALOG environment variable, this has been working fine for me but I’m not sure if it’s a long-term solution (is the plug-in load order consistent?). When tm_dialog2 is called it checks the first character of the argument list, and if it’s a ‘-’ then it replaces itself with the corresponding call to tm_dialog git-svn-id: http://svn.textmate.org/branches/WIP/Tools/Dialog2@8484 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
- Loading branch information
ciaran
committed
Nov 20, 2007
1 parent
13a1f39
commit 0a9875c
Showing
35 changed files
with
3,095 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
Commands/ExtendedPopUp/IncrementalPopUpMenu.nib/classes.nib
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,16 @@ | |||
// | |||
// TMDBorderLessWindow.h | |||
// Dialog | |||
// | |||
// Created by Joachim Mårtensson on 2007-08-14. | |||
// Copyright 2007 __MyCompanyName__. All rights reserved. | |||
// | |||
|
|||
#import <Cocoa/Cocoa.h> | |||
|
|||
|
|||
@interface TMDBorderLessWindow : NSWindow { | |||
|
|||
} | |||
- (BOOL)canBecomeMainWindow; | |||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,54 @@ | |||
// | |||
// TMDBorderLessWindow.m | |||
// Dialog | |||
// | |||
// Created by Joachim Mårtensson on 2007-08-14. | |||
// Copyright 2007 __MyCompanyName__. All rights reserved. | |||
// | |||
|
|||
#import "TMDBorderLessWindow.h" | |||
|
|||
|
|||
@implementation TMDBorderLessWindow | |||
|
|||
- (id)initWithContentRect:(NSRect)contentRect | |||
styleMask:(unsigned int)aStyle | |||
backing:(NSBackingStoreType)bufferingType | |||
defer:(BOOL)flag | |||
{ | |||
self = [super initWithContentRect:contentRect styleMask:NSBorderlessWindowMask backing:bufferingType defer:NO]; | |||
|
|||
// [result setBackgroundColor:[NSColor clearColor]]; | |||
[self setAlphaValue:0]; | |||
[self setHasShadow:YES]; | |||
[self setOpaque:NO]; | |||
//[self makeKeyWindow]; | |||
return self; | |||
} | |||
|
|||
- (BOOL)canBecomeMainWindow | |||
{ | |||
return YES; | |||
} | |||
|
|||
- (BOOL) canBecomeKeyWindow | |||
{ | |||
return YES; | |||
} | |||
|
|||
-(BOOL)acceptsFirstResponder | |||
{ | |||
return YES; | |||
} | |||
|
|||
- (BOOL)showsResizeIndicator | |||
{ | |||
return NO; | |||
} | |||
|
|||
-(BOOL)resignFirstResponder | |||
{ | |||
return NO; | |||
} | |||
|
|||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,47 @@ | |||
// | |||
// TMDIncrementalPopUpMenu.h | |||
// | |||
// Created by Joachim MŒrtensson on 2007-08-10. | |||
// Copyright (c) 2007 __MyCompanyName__. All rights reserved. | |||
// | |||
|
|||
#import <Cocoa/Cocoa.h> | |||
#define MAX_ROWS 15 | |||
|
|||
@interface TMDIncrementalPopUpMenu : NSWindowController | |||
{ | |||
IBOutlet NSArrayController* anArrayController; | |||
NSArray* suggestions; | |||
NSMutableString* mutablePrefix; | |||
NSString* staticPrefix; | |||
NSArray* filtered; | |||
NSString* shell; | |||
NSMutableAttributedString* attrString; | |||
IBOutlet id theTableView; | |||
float stringWidth; | |||
NSPoint caretPos; | |||
BOOL isAbove; | |||
NSRect mainScreen; | |||
BOOL closeMe; | |||
id ed; | |||
id controllerObject; | |||
} | |||
- (id)initWithDictionary:(NSDictionary*)aDictionary | |||
andEditor:(id)editor; | |||
- (void)filter; | |||
- (NSMutableString*)mutablePrefix; | |||
- (id)theTableView; | |||
- (void)keyDown:(NSEvent*)anEvent; | |||
- (void)tab; | |||
- (int)stringWidth; | |||
- (void)writeToTM:(NSString*)aString asSnippet:(BOOL)snippet; | |||
- (NSString*)executeShellCommand:(NSString*)command WithDictionary:(NSDictionary*)dict; | |||
- (NSArray*)filtered; | |||
- (void)setFiltered:(NSArray*)aValue; | |||
- (void)setCaretPos:(NSPoint)aPos; | |||
- (void)setMainScreen:(NSRect)aScreen; | |||
- (void)setAbove:(BOOL)aBool; | |||
- (void)completeAndInsertSnippet:(id)nothing; | |||
- (BOOL)getCloseStatus; | |||
|
|||
@end |
Oops, something went wrong.