2005-05-13 00:25:27 +00:00
|
|
|
/**
|
|
|
|
MainModelEditor.m
|
|
|
|
|
2007-01-05 16:17:04 +00:00
|
|
|
Author: Matt Rice <ratmice@gmail.com>
|
2006-09-21 07:24:22 +00:00
|
|
|
Date: 2005, 2006
|
2005-05-13 00:25:27 +00:00
|
|
|
|
|
|
|
This file is part of DBModeler.
|
|
|
|
|
|
|
|
<license>
|
|
|
|
DBModeler is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
2007-07-12 06:39:22 +00:00
|
|
|
the Free Software Foundation; either version 3 of the License, or
|
2005-05-13 00:25:27 +00:00
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
DBModeler is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with DBModeler; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
</license>
|
|
|
|
**/
|
|
|
|
|
2008-05-09 20:21:17 +00:00
|
|
|
#ifdef NeXT_Foundation_LIBRARY
|
|
|
|
#include <Foundation/Foundation.h>
|
|
|
|
#else
|
* DBModeler/AdaptorsPanel.m (-init): Add parenthesis around
assignment. Replace label with window title.
(-runAdaptorsPanel:): Remove unused variable.
* DBModeler/DefaultColumnProvider.m: Add missing braces, remove
unused ivars.
(-cellForColumnNamed:): Autorelease cells.
* DBModeler/EOAdditions.m: New EOAttribute KVC methods -allowNull and
-setAllowNull:.
* DBModeler/GNUmakefile: Add new to project.
* DBModeler/KVDataSource.m (-createObject:): Return nil after
throwing exception.
* DBModeler/MainModelEditor.m
(-dragImageForRows:event:dragImageOffset:):: Enable drag and
drop for relationships.
(-initWithDocument:): Add parenthesis around assignment. Don't
release the document window on close.
(-ecStuff:): temporarily reload everything in the outline view when
something changes.
(-viewSelectedObject:): Remove NSLog. Rewrite editor activation.
Fix leaks.
* DBModeler/Modeler.m (-applicationWillFinishLaunching:): Add new menu
items. Don't order our menu in.
(-new:,-open:): Move document initializition to _newDocumentWithModel:.
(-_newDocumentWithModel:,-newFromDatabase:): New methods.
(-validateMenuItem:,-generateSQL:): Ditto.
* DBModeler/ModelerAttributeEditor.m (-initWithParentEditor:):
Remove unused variables.
(-displayGroupDidChangeSelection:): return early if there is no
longer a selection.
* DBModeler/ModelerEntityEditor.m:
(-canSupportCurrentSelection): Remove NSLog.
(-displayGroupDidChangeSelection:): Ditto.
(-dealloc:): New method.
(-initWithParentEditor:): Remove unused variables. Add parens around
assignment. Release local variables.
* DBModeler/ModelerTableEmbedibleEditor:
(-addDefaultTableColumnsForTableView:displayGroup:): Release table
columns.
(-addTableColumnForItem:tableView:): Ditto.
* DBModeler/Inspectors/RelationshipInspector.m:
(-selectedEntity, -selectedDestinationAttribute): New methods.
(-selectedSourceAttribute, -indexOfSourceAttribute:): Ditto.
(-indexOfDestinationAttribute:,joinWithSource:destination:): Ditto.
(-selectedJoin:,updateConnectButton,): Ditto.
(-refresh): Rewrite using new methods.
(-numberOfRowsInTableView:): Add fallback return value.
(-tableView:objectValueForTableColumn:row:): Ditto.
(-tableView:selectionDidChange:): If a source or destination
attribute is now selected, select its counterpart.
(-tableView:shouldSelectRow:): New method to disallow entity
selection if there is a destination entity.
(-tableView:willDisplayCell:forTableColumn:row:): New method,
set the cell text color to disabled text color, if we would disallow
selection.
(-connectionChanged:): Implement disconnection.
* DBModeler/SQLGenerator.h/m: New files initial implementation.
* DBModeler/Resources/SQLGenerator.gorm: Ditto.
* DBModeler/ConsistencyChecker.h/m: Ditto.
* DBModeler/ConsistencyResults.h/m: Ditto.
* DBModeler/ConsistencyResults.gorm: Ditto.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21438 72102866-910b-0410-8b05-ffd578937521
2005-07-09 02:07:42 +00:00
|
|
|
#include <Foundation/NSRunLoop.h>
|
2008-05-09 20:21:17 +00:00
|
|
|
#include <Foundation/NSNotification.h>
|
|
|
|
#endif
|
2005-05-13 00:25:27 +00:00
|
|
|
|
|
|
|
#include "MainModelEditor.h"
|
|
|
|
#include "ModelerEntityEditor.h"
|
|
|
|
|
|
|
|
#include <EOModeler/EOModelerApp.h>
|
|
|
|
|
|
|
|
#include <EOModeler/EOModelerDocument.h>
|
|
|
|
#include <EOModeler/EOModelerEditor.h>
|
|
|
|
|
|
|
|
#include <EOAccess/EOModel.h>
|
|
|
|
#include <EOAccess/EOEntity.h>
|
|
|
|
#include <EOAccess/EOAttribute.h>
|
2008-05-09 20:21:17 +00:00
|
|
|
#include <EOAccess/EORelationship.h>
|
2005-05-13 00:25:27 +00:00
|
|
|
|
|
|
|
#include <EOControl/EOObserver.h>
|
|
|
|
#include <EOControl/EOEditingContext.h>
|
|
|
|
|
2008-05-09 20:21:17 +00:00
|
|
|
#ifdef NeXT_GUI_LIBRARY
|
|
|
|
#include <AppKit/AppKit.h>
|
|
|
|
#else
|
* DBModeler/AdaptorsPanel.m (-init): Add parenthesis around
assignment. Replace label with window title.
(-runAdaptorsPanel:): Remove unused variable.
* DBModeler/DefaultColumnProvider.m: Add missing braces, remove
unused ivars.
(-cellForColumnNamed:): Autorelease cells.
* DBModeler/EOAdditions.m: New EOAttribute KVC methods -allowNull and
-setAllowNull:.
* DBModeler/GNUmakefile: Add new to project.
* DBModeler/KVDataSource.m (-createObject:): Return nil after
throwing exception.
* DBModeler/MainModelEditor.m
(-dragImageForRows:event:dragImageOffset:):: Enable drag and
drop for relationships.
(-initWithDocument:): Add parenthesis around assignment. Don't
release the document window on close.
(-ecStuff:): temporarily reload everything in the outline view when
something changes.
(-viewSelectedObject:): Remove NSLog. Rewrite editor activation.
Fix leaks.
* DBModeler/Modeler.m (-applicationWillFinishLaunching:): Add new menu
items. Don't order our menu in.
(-new:,-open:): Move document initializition to _newDocumentWithModel:.
(-_newDocumentWithModel:,-newFromDatabase:): New methods.
(-validateMenuItem:,-generateSQL:): Ditto.
* DBModeler/ModelerAttributeEditor.m (-initWithParentEditor:):
Remove unused variables.
(-displayGroupDidChangeSelection:): return early if there is no
longer a selection.
* DBModeler/ModelerEntityEditor.m:
(-canSupportCurrentSelection): Remove NSLog.
(-displayGroupDidChangeSelection:): Ditto.
(-dealloc:): New method.
(-initWithParentEditor:): Remove unused variables. Add parens around
assignment. Release local variables.
* DBModeler/ModelerTableEmbedibleEditor:
(-addDefaultTableColumnsForTableView:displayGroup:): Release table
columns.
(-addTableColumnForItem:tableView:): Ditto.
* DBModeler/Inspectors/RelationshipInspector.m:
(-selectedEntity, -selectedDestinationAttribute): New methods.
(-selectedSourceAttribute, -indexOfSourceAttribute:): Ditto.
(-indexOfDestinationAttribute:,joinWithSource:destination:): Ditto.
(-selectedJoin:,updateConnectButton,): Ditto.
(-refresh): Rewrite using new methods.
(-numberOfRowsInTableView:): Add fallback return value.
(-tableView:objectValueForTableColumn:row:): Ditto.
(-tableView:selectionDidChange:): If a source or destination
attribute is now selected, select its counterpart.
(-tableView:shouldSelectRow:): New method to disallow entity
selection if there is a destination entity.
(-tableView:willDisplayCell:forTableColumn:row:): New method,
set the cell text color to disabled text color, if we would disallow
selection.
(-connectionChanged:): Implement disconnection.
* DBModeler/SQLGenerator.h/m: New files initial implementation.
* DBModeler/Resources/SQLGenerator.gorm: Ditto.
* DBModeler/ConsistencyChecker.h/m: Ditto.
* DBModeler/ConsistencyResults.h/m: Ditto.
* DBModeler/ConsistencyResults.gorm: Ditto.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21438 72102866-910b-0410-8b05-ffd578937521
2005-07-09 02:07:42 +00:00
|
|
|
#include <AppKit/NSPanel.h>
|
2008-05-09 20:21:17 +00:00
|
|
|
#include <AppKit/NSBox.h>
|
2005-05-13 00:25:27 +00:00
|
|
|
#include <AppKit/NSImage.h>
|
|
|
|
#include <AppKit/NSOutlineView.h>
|
|
|
|
#include <AppKit/NSPasteboard.h>
|
|
|
|
#include <AppKit/NSScrollView.h>
|
|
|
|
#include <AppKit/NSSplitView.h>
|
|
|
|
#include <AppKit/NSTableColumn.h>
|
2006-09-05 22:18:35 +00:00
|
|
|
#include <AppKit/NSView.h>
|
2008-05-09 20:21:17 +00:00
|
|
|
#include <AppKit/NSWindowController.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <GNUstepBase/GNUstep.h>
|
2008-05-23 02:11:42 +00:00
|
|
|
#include <GNUstepBase/GSVersionMacros.h>
|
2005-05-13 00:25:27 +00:00
|
|
|
|
* DBModeler/AdaptorsPanel.m (-init): Add parenthesis around
assignment. Replace label with window title.
(-runAdaptorsPanel:): Remove unused variable.
* DBModeler/DefaultColumnProvider.m: Add missing braces, remove
unused ivars.
(-cellForColumnNamed:): Autorelease cells.
* DBModeler/EOAdditions.m: New EOAttribute KVC methods -allowNull and
-setAllowNull:.
* DBModeler/GNUmakefile: Add new to project.
* DBModeler/KVDataSource.m (-createObject:): Return nil after
throwing exception.
* DBModeler/MainModelEditor.m
(-dragImageForRows:event:dragImageOffset:):: Enable drag and
drop for relationships.
(-initWithDocument:): Add parenthesis around assignment. Don't
release the document window on close.
(-ecStuff:): temporarily reload everything in the outline view when
something changes.
(-viewSelectedObject:): Remove NSLog. Rewrite editor activation.
Fix leaks.
* DBModeler/Modeler.m (-applicationWillFinishLaunching:): Add new menu
items. Don't order our menu in.
(-new:,-open:): Move document initializition to _newDocumentWithModel:.
(-_newDocumentWithModel:,-newFromDatabase:): New methods.
(-validateMenuItem:,-generateSQL:): Ditto.
* DBModeler/ModelerAttributeEditor.m (-initWithParentEditor:):
Remove unused variables.
(-displayGroupDidChangeSelection:): return early if there is no
longer a selection.
* DBModeler/ModelerEntityEditor.m:
(-canSupportCurrentSelection): Remove NSLog.
(-displayGroupDidChangeSelection:): Ditto.
(-dealloc:): New method.
(-initWithParentEditor:): Remove unused variables. Add parens around
assignment. Release local variables.
* DBModeler/ModelerTableEmbedibleEditor:
(-addDefaultTableColumnsForTableView:displayGroup:): Release table
columns.
(-addTableColumnForItem:tableView:): Ditto.
* DBModeler/Inspectors/RelationshipInspector.m:
(-selectedEntity, -selectedDestinationAttribute): New methods.
(-selectedSourceAttribute, -indexOfSourceAttribute:): Ditto.
(-indexOfDestinationAttribute:,joinWithSource:destination:): Ditto.
(-selectedJoin:,updateConnectButton,): Ditto.
(-refresh): Rewrite using new methods.
(-numberOfRowsInTableView:): Add fallback return value.
(-tableView:objectValueForTableColumn:row:): Ditto.
(-tableView:selectionDidChange:): If a source or destination
attribute is now selected, select its counterpart.
(-tableView:shouldSelectRow:): New method to disallow entity
selection if there is a destination entity.
(-tableView:willDisplayCell:forTableColumn:row:): New method,
set the cell text color to disabled text color, if we would disallow
selection.
(-connectionChanged:): Implement disconnection.
* DBModeler/SQLGenerator.h/m: New files initial implementation.
* DBModeler/Resources/SQLGenerator.gorm: Ditto.
* DBModeler/ConsistencyChecker.h/m: Ditto.
* DBModeler/ConsistencyResults.h/m: Ditto.
* DBModeler/ConsistencyResults.gorm: Ditto.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21438 72102866-910b-0410-8b05-ffd578937521
2005-07-09 02:07:42 +00:00
|
|
|
#define DEBUG_STUFF 0
|
2005-05-13 00:25:27 +00:00
|
|
|
|
|
|
|
@interface ModelerOutlineView : NSOutlineView
|
|
|
|
@end
|
|
|
|
@implementation ModelerOutlineView
|
|
|
|
|
|
|
|
- (NSImage *) dragImageForRows:(NSArray *)dragRows
|
Replaced tabs with spaces throughout the DBModeler sub-project.
* DBModeler/AdaptorsPanel.m, DBModeler/AttributeCell.m,
DBModeler/ConsistencyChecker.m, DBModeler/DefaultColumnProvider.m,
DBModeler/DiagramView.m, DBModeler/EOAdditions.m, DBModeler/EntityView.m,
DBModeler/GNUmakefile, DBModeler/KVDataSource.m,
DBModeler/MainModelEditor.h, DBModeler/MainModelEditor.m,
DBModeler/ModelerAttributeEditor.m, DBModeler/ModelerEntityEditor.h,
DBModeler/ModelerEntityEditor.m,
DBModeler/ModelerTableEmbedibleEditor.h,
DBModeler/ModelerTableEmbedibleEditor.m,
DBModeler/NSView+Additions.m, DBModeler/Preferences.m,
DBModeler/SQLGenerator.m, DBModeler/Inspectors/AdvancedEntityInspector.m,
DBModeler/Inspectors/AttributeInspector.h,
DBModeler/Inspectors/AttributeInspector.m,
DBModeler/Inspectors/RelationshipInspector.h,
DBModeler/Inspectors/RelationshipInspector.m
White-space clean-up. Replaced tabs with spaces.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@26556 72102866-910b-0410-8b05-ffd578937521
2008-05-23 12:11:26 +00:00
|
|
|
event: (NSEvent *)dragEvent
|
|
|
|
dragImageOffset: (NSPoint *)dragImageOffset
|
2005-05-13 00:25:27 +00:00
|
|
|
{
|
|
|
|
id foo = [self itemAtRow:[[dragRows objectAtIndex:0] intValue]];
|
|
|
|
NSImage *img = nil;
|
|
|
|
|
* DBModeler/AdaptorsPanel.m (-init): Add parenthesis around
assignment. Replace label with window title.
(-runAdaptorsPanel:): Remove unused variable.
* DBModeler/DefaultColumnProvider.m: Add missing braces, remove
unused ivars.
(-cellForColumnNamed:): Autorelease cells.
* DBModeler/EOAdditions.m: New EOAttribute KVC methods -allowNull and
-setAllowNull:.
* DBModeler/GNUmakefile: Add new to project.
* DBModeler/KVDataSource.m (-createObject:): Return nil after
throwing exception.
* DBModeler/MainModelEditor.m
(-dragImageForRows:event:dragImageOffset:):: Enable drag and
drop for relationships.
(-initWithDocument:): Add parenthesis around assignment. Don't
release the document window on close.
(-ecStuff:): temporarily reload everything in the outline view when
something changes.
(-viewSelectedObject:): Remove NSLog. Rewrite editor activation.
Fix leaks.
* DBModeler/Modeler.m (-applicationWillFinishLaunching:): Add new menu
items. Don't order our menu in.
(-new:,-open:): Move document initializition to _newDocumentWithModel:.
(-_newDocumentWithModel:,-newFromDatabase:): New methods.
(-validateMenuItem:,-generateSQL:): Ditto.
* DBModeler/ModelerAttributeEditor.m (-initWithParentEditor:):
Remove unused variables.
(-displayGroupDidChangeSelection:): return early if there is no
longer a selection.
* DBModeler/ModelerEntityEditor.m:
(-canSupportCurrentSelection): Remove NSLog.
(-displayGroupDidChangeSelection:): Ditto.
(-dealloc:): New method.
(-initWithParentEditor:): Remove unused variables. Add parens around
assignment. Release local variables.
* DBModeler/ModelerTableEmbedibleEditor:
(-addDefaultTableColumnsForTableView:displayGroup:): Release table
columns.
(-addTableColumnForItem:tableView:): Ditto.
* DBModeler/Inspectors/RelationshipInspector.m:
(-selectedEntity, -selectedDestinationAttribute): New methods.
(-selectedSourceAttribute, -indexOfSourceAttribute:): Ditto.
(-indexOfDestinationAttribute:,joinWithSource:destination:): Ditto.
(-selectedJoin:,updateConnectButton,): Ditto.
(-refresh): Rewrite using new methods.
(-numberOfRowsInTableView:): Add fallback return value.
(-tableView:objectValueForTableColumn:row:): Ditto.
(-tableView:selectionDidChange:): If a source or destination
attribute is now selected, select its counterpart.
(-tableView:shouldSelectRow:): New method to disallow entity
selection if there is a destination entity.
(-tableView:willDisplayCell:forTableColumn:row:): New method,
set the cell text color to disabled text color, if we would disallow
selection.
(-connectionChanged:): Implement disconnection.
* DBModeler/SQLGenerator.h/m: New files initial implementation.
* DBModeler/Resources/SQLGenerator.gorm: Ditto.
* DBModeler/ConsistencyChecker.h/m: Ditto.
* DBModeler/ConsistencyResults.h/m: Ditto.
* DBModeler/ConsistencyResults.gorm: Ditto.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21438 72102866-910b-0410-8b05-ffd578937521
2005-07-09 02:07:42 +00:00
|
|
|
if ([foo isKindOfClass: [EOEntity class]]
|
|
|
|
|| [foo isKindOfClass:[EORelationship class]])
|
2005-05-13 00:25:27 +00:00
|
|
|
{
|
|
|
|
img = [NSImage imageNamed:@"ModelDrag"];
|
|
|
|
[img setScalesWhenResized:NO];
|
|
|
|
}
|
|
|
|
return img;
|
|
|
|
}
|
2009-01-26 05:32:38 +00:00
|
|
|
|
|
|
|
|
|
|
|
- (NSDragOperation) draggingSourceOperationMaskForLocal:(BOOL)flag
|
|
|
|
{
|
|
|
|
return NSDragOperationAll;
|
|
|
|
}
|
|
|
|
|
2005-05-13 00:25:27 +00:00
|
|
|
@end
|
|
|
|
@implementation MainModelEditor
|
|
|
|
- (id) initWithDocument:(EOModelerDocument *)document
|
|
|
|
{
|
* DBModeler/AdaptorsPanel.m (-init): Add parenthesis around
assignment. Replace label with window title.
(-runAdaptorsPanel:): Remove unused variable.
* DBModeler/DefaultColumnProvider.m: Add missing braces, remove
unused ivars.
(-cellForColumnNamed:): Autorelease cells.
* DBModeler/EOAdditions.m: New EOAttribute KVC methods -allowNull and
-setAllowNull:.
* DBModeler/GNUmakefile: Add new to project.
* DBModeler/KVDataSource.m (-createObject:): Return nil after
throwing exception.
* DBModeler/MainModelEditor.m
(-dragImageForRows:event:dragImageOffset:):: Enable drag and
drop for relationships.
(-initWithDocument:): Add parenthesis around assignment. Don't
release the document window on close.
(-ecStuff:): temporarily reload everything in the outline view when
something changes.
(-viewSelectedObject:): Remove NSLog. Rewrite editor activation.
Fix leaks.
* DBModeler/Modeler.m (-applicationWillFinishLaunching:): Add new menu
items. Don't order our menu in.
(-new:,-open:): Move document initializition to _newDocumentWithModel:.
(-_newDocumentWithModel:,-newFromDatabase:): New methods.
(-validateMenuItem:,-generateSQL:): Ditto.
* DBModeler/ModelerAttributeEditor.m (-initWithParentEditor:):
Remove unused variables.
(-displayGroupDidChangeSelection:): return early if there is no
longer a selection.
* DBModeler/ModelerEntityEditor.m:
(-canSupportCurrentSelection): Remove NSLog.
(-displayGroupDidChangeSelection:): Ditto.
(-dealloc:): New method.
(-initWithParentEditor:): Remove unused variables. Add parens around
assignment. Release local variables.
* DBModeler/ModelerTableEmbedibleEditor:
(-addDefaultTableColumnsForTableView:displayGroup:): Release table
columns.
(-addTableColumnForItem:tableView:): Ditto.
* DBModeler/Inspectors/RelationshipInspector.m:
(-selectedEntity, -selectedDestinationAttribute): New methods.
(-selectedSourceAttribute, -indexOfSourceAttribute:): Ditto.
(-indexOfDestinationAttribute:,joinWithSource:destination:): Ditto.
(-selectedJoin:,updateConnectButton,): Ditto.
(-refresh): Rewrite using new methods.
(-numberOfRowsInTableView:): Add fallback return value.
(-tableView:objectValueForTableColumn:row:): Ditto.
(-tableView:selectionDidChange:): If a source or destination
attribute is now selected, select its counterpart.
(-tableView:shouldSelectRow:): New method to disallow entity
selection if there is a destination entity.
(-tableView:willDisplayCell:forTableColumn:row:): New method,
set the cell text color to disabled text color, if we would disallow
selection.
(-connectionChanged:): Implement disconnection.
* DBModeler/SQLGenerator.h/m: New files initial implementation.
* DBModeler/Resources/SQLGenerator.gorm: Ditto.
* DBModeler/ConsistencyChecker.h/m: Ditto.
* DBModeler/ConsistencyResults.h/m: Ditto.
* DBModeler/ConsistencyResults.gorm: Ditto.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21438 72102866-910b-0410-8b05-ffd578937521
2005-07-09 02:07:42 +00:00
|
|
|
if ((self = [super initWithDocument:document]))
|
2005-05-13 00:25:27 +00:00
|
|
|
{
|
|
|
|
NSTableColumn *_col;
|
|
|
|
NSScrollView *sv = [[NSScrollView alloc] initWithFrame:NSMakeRect(0,0,100,400)];
|
2006-09-05 22:18:35 +00:00
|
|
|
|
|
|
|
_vSplit = [[NSSplitView alloc] initWithFrame:NSMakeRect(0,0,600,400)];
|
2005-05-13 00:25:27 +00:00
|
|
|
|
2006-09-05 22:18:35 +00:00
|
|
|
[_vSplit setVertical:YES];
|
2005-05-13 00:25:27 +00:00
|
|
|
|
|
|
|
_iconPath = [[ModelerOutlineView alloc] initWithFrame:NSMakeRect(0,0,100,400)];
|
|
|
|
[_iconPath setIndentationPerLevel:8.0];
|
|
|
|
[_iconPath setIndentationMarkerFollowsCell:YES];
|
|
|
|
|
|
|
|
[_iconPath setDelegate:self];
|
|
|
|
[_iconPath setDataSource:self];
|
|
|
|
_col = [(NSTableColumn *)[NSTableColumn alloc] initWithIdentifier:@"name"];
|
|
|
|
[_iconPath addTableColumn:_col];
|
|
|
|
[_iconPath setOutlineTableColumn:AUTORELEASE(_col)];
|
2008-05-23 02:11:42 +00:00
|
|
|
|
|
|
|
#if OS_API_VERSION(GS_API_NONE, MAC_OS_X_VERSION_10_4)
|
2005-05-13 00:25:27 +00:00
|
|
|
[_iconPath setAutoresizesAllColumnsToFit:YES];
|
2008-05-23 02:11:42 +00:00
|
|
|
#else
|
|
|
|
[_iconPath setColumnAutoresizingStyle:NSTableViewUniformColumnAutoresizingStyle];
|
|
|
|
#endif
|
|
|
|
|
2005-05-13 00:25:27 +00:00
|
|
|
[_iconPath sizeToFit];
|
|
|
|
|
2006-09-05 22:18:35 +00:00
|
|
|
_window = [[NSWindow alloc] initWithContentRect:NSMakeRect(20,80,600,400)
|
Replaced tabs with spaces throughout the DBModeler sub-project.
* DBModeler/AdaptorsPanel.m, DBModeler/AttributeCell.m,
DBModeler/ConsistencyChecker.m, DBModeler/DefaultColumnProvider.m,
DBModeler/DiagramView.m, DBModeler/EOAdditions.m, DBModeler/EntityView.m,
DBModeler/GNUmakefile, DBModeler/KVDataSource.m,
DBModeler/MainModelEditor.h, DBModeler/MainModelEditor.m,
DBModeler/ModelerAttributeEditor.m, DBModeler/ModelerEntityEditor.h,
DBModeler/ModelerEntityEditor.m,
DBModeler/ModelerTableEmbedibleEditor.h,
DBModeler/ModelerTableEmbedibleEditor.m,
DBModeler/NSView+Additions.m, DBModeler/Preferences.m,
DBModeler/SQLGenerator.m, DBModeler/Inspectors/AdvancedEntityInspector.m,
DBModeler/Inspectors/AttributeInspector.h,
DBModeler/Inspectors/AttributeInspector.m,
DBModeler/Inspectors/RelationshipInspector.h,
DBModeler/Inspectors/RelationshipInspector.m
White-space clean-up. Replaced tabs with spaces.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@26556 72102866-910b-0410-8b05-ffd578937521
2008-05-23 12:11:26 +00:00
|
|
|
styleMask: NSTitledWindowMask | NSMiniaturizableWindowMask | NSClosableWindowMask | NSResizableWindowMask
|
|
|
|
backing:NSBackingStoreBuffered
|
|
|
|
defer:YES];
|
2006-12-26 16:41:37 +00:00
|
|
|
[_window setTitle:[[document model] name]];
|
* DBModeler/AdaptorsPanel.m (-init): Add parenthesis around
assignment. Replace label with window title.
(-runAdaptorsPanel:): Remove unused variable.
* DBModeler/DefaultColumnProvider.m: Add missing braces, remove
unused ivars.
(-cellForColumnNamed:): Autorelease cells.
* DBModeler/EOAdditions.m: New EOAttribute KVC methods -allowNull and
-setAllowNull:.
* DBModeler/GNUmakefile: Add new to project.
* DBModeler/KVDataSource.m (-createObject:): Return nil after
throwing exception.
* DBModeler/MainModelEditor.m
(-dragImageForRows:event:dragImageOffset:):: Enable drag and
drop for relationships.
(-initWithDocument:): Add parenthesis around assignment. Don't
release the document window on close.
(-ecStuff:): temporarily reload everything in the outline view when
something changes.
(-viewSelectedObject:): Remove NSLog. Rewrite editor activation.
Fix leaks.
* DBModeler/Modeler.m (-applicationWillFinishLaunching:): Add new menu
items. Don't order our menu in.
(-new:,-open:): Move document initializition to _newDocumentWithModel:.
(-_newDocumentWithModel:,-newFromDatabase:): New methods.
(-validateMenuItem:,-generateSQL:): Ditto.
* DBModeler/ModelerAttributeEditor.m (-initWithParentEditor:):
Remove unused variables.
(-displayGroupDidChangeSelection:): return early if there is no
longer a selection.
* DBModeler/ModelerEntityEditor.m:
(-canSupportCurrentSelection): Remove NSLog.
(-displayGroupDidChangeSelection:): Ditto.
(-dealloc:): New method.
(-initWithParentEditor:): Remove unused variables. Add parens around
assignment. Release local variables.
* DBModeler/ModelerTableEmbedibleEditor:
(-addDefaultTableColumnsForTableView:displayGroup:): Release table
columns.
(-addTableColumnForItem:tableView:): Ditto.
* DBModeler/Inspectors/RelationshipInspector.m:
(-selectedEntity, -selectedDestinationAttribute): New methods.
(-selectedSourceAttribute, -indexOfSourceAttribute:): Ditto.
(-indexOfDestinationAttribute:,joinWithSource:destination:): Ditto.
(-selectedJoin:,updateConnectButton,): Ditto.
(-refresh): Rewrite using new methods.
(-numberOfRowsInTableView:): Add fallback return value.
(-tableView:objectValueForTableColumn:row:): Ditto.
(-tableView:selectionDidChange:): If a source or destination
attribute is now selected, select its counterpart.
(-tableView:shouldSelectRow:): New method to disallow entity
selection if there is a destination entity.
(-tableView:willDisplayCell:forTableColumn:row:): New method,
set the cell text color to disabled text color, if we would disallow
selection.
(-connectionChanged:): Implement disconnection.
* DBModeler/SQLGenerator.h/m: New files initial implementation.
* DBModeler/Resources/SQLGenerator.gorm: Ditto.
* DBModeler/ConsistencyChecker.h/m: Ditto.
* DBModeler/ConsistencyResults.h/m: Ditto.
* DBModeler/ConsistencyResults.gorm: Ditto.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21438 72102866-910b-0410-8b05-ffd578937521
2005-07-09 02:07:42 +00:00
|
|
|
[_window setReleasedWhenClosed:NO];
|
2005-05-13 00:25:27 +00:00
|
|
|
|
|
|
|
[sv setHasHorizontalScroller:YES];
|
|
|
|
[sv setHasVerticalScroller:YES];
|
|
|
|
[sv setAutoresizingMask: NSViewWidthSizable];
|
|
|
|
[_iconPath setAutoresizingMask: NSViewWidthSizable|NSViewHeightSizable];
|
|
|
|
[sv setDocumentView:_iconPath];
|
|
|
|
RELEASE(_iconPath);
|
2006-09-05 22:18:35 +00:00
|
|
|
[_vSplit addSubview:sv];
|
2005-05-13 00:25:27 +00:00
|
|
|
RELEASE(sv);
|
|
|
|
|
2006-09-05 22:18:35 +00:00
|
|
|
_editorView = [[NSBox alloc] initWithFrame:NSMakeRect(0,0,500,400)];
|
2005-05-13 00:25:27 +00:00
|
|
|
|
2006-09-05 22:18:35 +00:00
|
|
|
[_vSplit addSubview: _editorView];
|
|
|
|
RELEASE(_editorView);
|
2005-05-13 00:25:27 +00:00
|
|
|
|
2006-09-05 22:18:35 +00:00
|
|
|
[_vSplit setAutoresizesSubviews:YES];
|
|
|
|
[_vSplit setAutoresizingMask: NSViewWidthSizable
|
Replaced tabs with spaces throughout the DBModeler sub-project.
* DBModeler/AdaptorsPanel.m, DBModeler/AttributeCell.m,
DBModeler/ConsistencyChecker.m, DBModeler/DefaultColumnProvider.m,
DBModeler/DiagramView.m, DBModeler/EOAdditions.m, DBModeler/EntityView.m,
DBModeler/GNUmakefile, DBModeler/KVDataSource.m,
DBModeler/MainModelEditor.h, DBModeler/MainModelEditor.m,
DBModeler/ModelerAttributeEditor.m, DBModeler/ModelerEntityEditor.h,
DBModeler/ModelerEntityEditor.m,
DBModeler/ModelerTableEmbedibleEditor.h,
DBModeler/ModelerTableEmbedibleEditor.m,
DBModeler/NSView+Additions.m, DBModeler/Preferences.m,
DBModeler/SQLGenerator.m, DBModeler/Inspectors/AdvancedEntityInspector.m,
DBModeler/Inspectors/AttributeInspector.h,
DBModeler/Inspectors/AttributeInspector.m,
DBModeler/Inspectors/RelationshipInspector.h,
DBModeler/Inspectors/RelationshipInspector.m
White-space clean-up. Replaced tabs with spaces.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@26556 72102866-910b-0410-8b05-ffd578937521
2008-05-23 12:11:26 +00:00
|
|
|
| NSViewHeightSizable];
|
2006-09-05 22:18:35 +00:00
|
|
|
[_vSplit adjustSubviews];
|
|
|
|
[[_window contentView] addSubview:_vSplit];
|
|
|
|
RELEASE(_vSplit);
|
2005-05-13 00:25:27 +00:00
|
|
|
|
2006-10-14 00:51:32 +00:00
|
|
|
/* so addEntity: addAttribute: ... menu items work,
|
|
|
|
* and it gets close notifications */
|
2005-05-13 00:25:27 +00:00
|
|
|
[_window setDelegate: document];
|
2006-10-14 00:51:32 +00:00
|
|
|
|
2005-05-13 00:25:27 +00:00
|
|
|
[[NSNotificationCenter defaultCenter] addObserver: self
|
Replaced tabs with spaces throughout the DBModeler sub-project.
* DBModeler/AdaptorsPanel.m, DBModeler/AttributeCell.m,
DBModeler/ConsistencyChecker.m, DBModeler/DefaultColumnProvider.m,
DBModeler/DiagramView.m, DBModeler/EOAdditions.m, DBModeler/EntityView.m,
DBModeler/GNUmakefile, DBModeler/KVDataSource.m,
DBModeler/MainModelEditor.h, DBModeler/MainModelEditor.m,
DBModeler/ModelerAttributeEditor.m, DBModeler/ModelerEntityEditor.h,
DBModeler/ModelerEntityEditor.m,
DBModeler/ModelerTableEmbedibleEditor.h,
DBModeler/ModelerTableEmbedibleEditor.m,
DBModeler/NSView+Additions.m, DBModeler/Preferences.m,
DBModeler/SQLGenerator.m, DBModeler/Inspectors/AdvancedEntityInspector.m,
DBModeler/Inspectors/AttributeInspector.h,
DBModeler/Inspectors/AttributeInspector.m,
DBModeler/Inspectors/RelationshipInspector.h,
DBModeler/Inspectors/RelationshipInspector.m
White-space clean-up. Replaced tabs with spaces.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@26556 72102866-910b-0410-8b05-ffd578937521
2008-05-23 12:11:26 +00:00
|
|
|
selector:@selector(ecStuff:)
|
|
|
|
name: EOObjectsChangedInEditingContextNotification
|
|
|
|
object: [[self document] editingContext]];
|
2006-10-14 00:51:32 +00:00
|
|
|
|
2005-05-13 00:25:27 +00:00
|
|
|
[self setViewedObjectPath:[NSArray arrayWithObject:[document model]]];
|
|
|
|
}
|
|
|
|
return self;
|
|
|
|
}
|
2006-09-05 22:18:35 +00:00
|
|
|
|
2005-05-13 00:25:27 +00:00
|
|
|
- (void) dealloc
|
|
|
|
{
|
|
|
|
[[NSNotificationCenter defaultCenter] removeObserver: self];
|
|
|
|
RELEASE(_window);
|
|
|
|
[super dealloc];
|
|
|
|
}
|
2006-09-05 22:18:35 +00:00
|
|
|
|
2005-05-13 00:25:27 +00:00
|
|
|
- (void) ecStuff:(NSNotification *)notif
|
|
|
|
{
|
|
|
|
if ([[notif object] isKindOfClass:[EOEditingContext class]])
|
|
|
|
{
|
* DBModeler/AdaptorsPanel.m (-init): Add parenthesis around
assignment. Replace label with window title.
(-runAdaptorsPanel:): Remove unused variable.
* DBModeler/DefaultColumnProvider.m: Add missing braces, remove
unused ivars.
(-cellForColumnNamed:): Autorelease cells.
* DBModeler/EOAdditions.m: New EOAttribute KVC methods -allowNull and
-setAllowNull:.
* DBModeler/GNUmakefile: Add new to project.
* DBModeler/KVDataSource.m (-createObject:): Return nil after
throwing exception.
* DBModeler/MainModelEditor.m
(-dragImageForRows:event:dragImageOffset:):: Enable drag and
drop for relationships.
(-initWithDocument:): Add parenthesis around assignment. Don't
release the document window on close.
(-ecStuff:): temporarily reload everything in the outline view when
something changes.
(-viewSelectedObject:): Remove NSLog. Rewrite editor activation.
Fix leaks.
* DBModeler/Modeler.m (-applicationWillFinishLaunching:): Add new menu
items. Don't order our menu in.
(-new:,-open:): Move document initializition to _newDocumentWithModel:.
(-_newDocumentWithModel:,-newFromDatabase:): New methods.
(-validateMenuItem:,-generateSQL:): Ditto.
* DBModeler/ModelerAttributeEditor.m (-initWithParentEditor:):
Remove unused variables.
(-displayGroupDidChangeSelection:): return early if there is no
longer a selection.
* DBModeler/ModelerEntityEditor.m:
(-canSupportCurrentSelection): Remove NSLog.
(-displayGroupDidChangeSelection:): Ditto.
(-dealloc:): New method.
(-initWithParentEditor:): Remove unused variables. Add parens around
assignment. Release local variables.
* DBModeler/ModelerTableEmbedibleEditor:
(-addDefaultTableColumnsForTableView:displayGroup:): Release table
columns.
(-addTableColumnForItem:tableView:): Ditto.
* DBModeler/Inspectors/RelationshipInspector.m:
(-selectedEntity, -selectedDestinationAttribute): New methods.
(-selectedSourceAttribute, -indexOfSourceAttribute:): Ditto.
(-indexOfDestinationAttribute:,joinWithSource:destination:): Ditto.
(-selectedJoin:,updateConnectButton,): Ditto.
(-refresh): Rewrite using new methods.
(-numberOfRowsInTableView:): Add fallback return value.
(-tableView:objectValueForTableColumn:row:): Ditto.
(-tableView:selectionDidChange:): If a source or destination
attribute is now selected, select its counterpart.
(-tableView:shouldSelectRow:): New method to disallow entity
selection if there is a destination entity.
(-tableView:willDisplayCell:forTableColumn:row:): New method,
set the cell text color to disabled text color, if we would disallow
selection.
(-connectionChanged:): Implement disconnection.
* DBModeler/SQLGenerator.h/m: New files initial implementation.
* DBModeler/Resources/SQLGenerator.gorm: Ditto.
* DBModeler/ConsistencyChecker.h/m: Ditto.
* DBModeler/ConsistencyResults.h/m: Ditto.
* DBModeler/ConsistencyResults.gorm: Ditto.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21438 72102866-910b-0410-8b05-ffd578937521
2005-07-09 02:07:42 +00:00
|
|
|
[_iconPath reloadData];
|
2005-05-13 00:25:27 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void)activateEmbeddedEditor:(EOModelerEmbedibleEditor *)editor
|
|
|
|
{
|
|
|
|
NSView *mainView = [editor mainView];
|
2006-09-05 22:18:35 +00:00
|
|
|
[mainView setFrame: [_editorView frame]];
|
|
|
|
[_vSplit replaceSubview:_editorView with:mainView];
|
|
|
|
_editorView = mainView;
|
|
|
|
[_editorView setNeedsDisplay:YES];
|
2006-10-09 18:56:25 +00:00
|
|
|
[super activateEmbeddedEditor:editor];
|
2005-05-13 00:25:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
- (void)activateEditorWithClass:(Class)embedibleEditorClass
|
|
|
|
{
|
|
|
|
[super activateEditorWithClass:embedibleEditorClass];
|
|
|
|
[self activateEmbeddedEditor:
|
|
|
|
[self embedibleEditorOfClass:embedibleEditorClass]];
|
|
|
|
[_iconPath reloadData];
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void) activate
|
|
|
|
{
|
|
|
|
if (![_window isVisible] || ![_window isKeyWindow])
|
|
|
|
{
|
|
|
|
[_window makeKeyAndOrderFront:self];
|
|
|
|
[self activateEmbeddedEditor:
|
Replaced tabs with spaces throughout the DBModeler sub-project.
* DBModeler/AdaptorsPanel.m, DBModeler/AttributeCell.m,
DBModeler/ConsistencyChecker.m, DBModeler/DefaultColumnProvider.m,
DBModeler/DiagramView.m, DBModeler/EOAdditions.m, DBModeler/EntityView.m,
DBModeler/GNUmakefile, DBModeler/KVDataSource.m,
DBModeler/MainModelEditor.h, DBModeler/MainModelEditor.m,
DBModeler/ModelerAttributeEditor.m, DBModeler/ModelerEntityEditor.h,
DBModeler/ModelerEntityEditor.m,
DBModeler/ModelerTableEmbedibleEditor.h,
DBModeler/ModelerTableEmbedibleEditor.m,
DBModeler/NSView+Additions.m, DBModeler/Preferences.m,
DBModeler/SQLGenerator.m, DBModeler/Inspectors/AdvancedEntityInspector.m,
DBModeler/Inspectors/AttributeInspector.h,
DBModeler/Inspectors/AttributeInspector.m,
DBModeler/Inspectors/RelationshipInspector.h,
DBModeler/Inspectors/RelationshipInspector.m
White-space clean-up. Replaced tabs with spaces.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@26556 72102866-910b-0410-8b05-ffd578937521
2008-05-23 12:11:26 +00:00
|
|
|
[self embedibleEditorOfClass:
|
|
|
|
NSClassFromString(@"ModelerEntityEditor")]];
|
2005-05-13 00:25:27 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
[_iconPath reloadData];
|
|
|
|
[super activate];
|
|
|
|
}
|
|
|
|
|
|
|
|
/* NSOutlineView datasource stuff */
|
|
|
|
- (BOOL)outlineView: (NSOutlineView *)outlineView
|
|
|
|
isItemExpandable: (id)item
|
|
|
|
{
|
|
|
|
BOOL ret = NO;
|
|
|
|
|
|
|
|
if (item == nil)
|
|
|
|
ret = ([[[_document model] entities] count] > 0);
|
|
|
|
else if ([item isKindOfClass:[EOModel class]])
|
|
|
|
ret = ([[item entities] count] > 0);
|
|
|
|
else if ([item isKindOfClass:[EOEntity class]])
|
|
|
|
ret = ([[item relationships] count] > 0);
|
|
|
|
else if ([item isKindOfClass:[EORelationship class]])
|
|
|
|
ret = 0;
|
|
|
|
#if DEBUG_STUFF == 1
|
* DBModeler/AdaptorsPanel.m (-init): Add parenthesis around
assignment. Replace label with window title.
(-runAdaptorsPanel:): Remove unused variable.
* DBModeler/DefaultColumnProvider.m: Add missing braces, remove
unused ivars.
(-cellForColumnNamed:): Autorelease cells.
* DBModeler/EOAdditions.m: New EOAttribute KVC methods -allowNull and
-setAllowNull:.
* DBModeler/GNUmakefile: Add new to project.
* DBModeler/KVDataSource.m (-createObject:): Return nil after
throwing exception.
* DBModeler/MainModelEditor.m
(-dragImageForRows:event:dragImageOffset:):: Enable drag and
drop for relationships.
(-initWithDocument:): Add parenthesis around assignment. Don't
release the document window on close.
(-ecStuff:): temporarily reload everything in the outline view when
something changes.
(-viewSelectedObject:): Remove NSLog. Rewrite editor activation.
Fix leaks.
* DBModeler/Modeler.m (-applicationWillFinishLaunching:): Add new menu
items. Don't order our menu in.
(-new:,-open:): Move document initializition to _newDocumentWithModel:.
(-_newDocumentWithModel:,-newFromDatabase:): New methods.
(-validateMenuItem:,-generateSQL:): Ditto.
* DBModeler/ModelerAttributeEditor.m (-initWithParentEditor:):
Remove unused variables.
(-displayGroupDidChangeSelection:): return early if there is no
longer a selection.
* DBModeler/ModelerEntityEditor.m:
(-canSupportCurrentSelection): Remove NSLog.
(-displayGroupDidChangeSelection:): Ditto.
(-dealloc:): New method.
(-initWithParentEditor:): Remove unused variables. Add parens around
assignment. Release local variables.
* DBModeler/ModelerTableEmbedibleEditor:
(-addDefaultTableColumnsForTableView:displayGroup:): Release table
columns.
(-addTableColumnForItem:tableView:): Ditto.
* DBModeler/Inspectors/RelationshipInspector.m:
(-selectedEntity, -selectedDestinationAttribute): New methods.
(-selectedSourceAttribute, -indexOfSourceAttribute:): Ditto.
(-indexOfDestinationAttribute:,joinWithSource:destination:): Ditto.
(-selectedJoin:,updateConnectButton,): Ditto.
(-refresh): Rewrite using new methods.
(-numberOfRowsInTableView:): Add fallback return value.
(-tableView:objectValueForTableColumn:row:): Ditto.
(-tableView:selectionDidChange:): If a source or destination
attribute is now selected, select its counterpart.
(-tableView:shouldSelectRow:): New method to disallow entity
selection if there is a destination entity.
(-tableView:willDisplayCell:forTableColumn:row:): New method,
set the cell text color to disabled text color, if we would disallow
selection.
(-connectionChanged:): Implement disconnection.
* DBModeler/SQLGenerator.h/m: New files initial implementation.
* DBModeler/Resources/SQLGenerator.gorm: Ditto.
* DBModeler/ConsistencyChecker.h/m: Ditto.
* DBModeler/ConsistencyResults.h/m: Ditto.
* DBModeler/ConsistencyResults.gorm: Ditto.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21438 72102866-910b-0410-8b05-ffd578937521
2005-07-09 02:07:42 +00:00
|
|
|
NSLog(@"%@\n\t %@ %i", NSStringFromSelector(_cmd), [item class], ret);
|
2005-05-13 00:25:27 +00:00
|
|
|
#endif
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (int) outlineView: (NSOutlineView *)outlineView
|
|
|
|
numberOfChildrenOfItem: (id)item
|
|
|
|
{
|
|
|
|
int ret = 0;
|
|
|
|
|
|
|
|
if (item == nil)
|
|
|
|
ret = 1;
|
|
|
|
else if ([item isKindOfClass: [EOModel class]])
|
|
|
|
ret = [[item entities] count];
|
|
|
|
else if ([item isKindOfClass: [EOEntity class]])
|
|
|
|
ret = [[item relationships] count];
|
|
|
|
else if ([item isKindOfClass: [EORelationship class]])
|
|
|
|
ret = 0;
|
|
|
|
|
|
|
|
#if DEBUG_STUFF == 1
|
* DBModeler/AdaptorsPanel.m (-init): Add parenthesis around
assignment. Replace label with window title.
(-runAdaptorsPanel:): Remove unused variable.
* DBModeler/DefaultColumnProvider.m: Add missing braces, remove
unused ivars.
(-cellForColumnNamed:): Autorelease cells.
* DBModeler/EOAdditions.m: New EOAttribute KVC methods -allowNull and
-setAllowNull:.
* DBModeler/GNUmakefile: Add new to project.
* DBModeler/KVDataSource.m (-createObject:): Return nil after
throwing exception.
* DBModeler/MainModelEditor.m
(-dragImageForRows:event:dragImageOffset:):: Enable drag and
drop for relationships.
(-initWithDocument:): Add parenthesis around assignment. Don't
release the document window on close.
(-ecStuff:): temporarily reload everything in the outline view when
something changes.
(-viewSelectedObject:): Remove NSLog. Rewrite editor activation.
Fix leaks.
* DBModeler/Modeler.m (-applicationWillFinishLaunching:): Add new menu
items. Don't order our menu in.
(-new:,-open:): Move document initializition to _newDocumentWithModel:.
(-_newDocumentWithModel:,-newFromDatabase:): New methods.
(-validateMenuItem:,-generateSQL:): Ditto.
* DBModeler/ModelerAttributeEditor.m (-initWithParentEditor:):
Remove unused variables.
(-displayGroupDidChangeSelection:): return early if there is no
longer a selection.
* DBModeler/ModelerEntityEditor.m:
(-canSupportCurrentSelection): Remove NSLog.
(-displayGroupDidChangeSelection:): Ditto.
(-dealloc:): New method.
(-initWithParentEditor:): Remove unused variables. Add parens around
assignment. Release local variables.
* DBModeler/ModelerTableEmbedibleEditor:
(-addDefaultTableColumnsForTableView:displayGroup:): Release table
columns.
(-addTableColumnForItem:tableView:): Ditto.
* DBModeler/Inspectors/RelationshipInspector.m:
(-selectedEntity, -selectedDestinationAttribute): New methods.
(-selectedSourceAttribute, -indexOfSourceAttribute:): Ditto.
(-indexOfDestinationAttribute:,joinWithSource:destination:): Ditto.
(-selectedJoin:,updateConnectButton,): Ditto.
(-refresh): Rewrite using new methods.
(-numberOfRowsInTableView:): Add fallback return value.
(-tableView:objectValueForTableColumn:row:): Ditto.
(-tableView:selectionDidChange:): If a source or destination
attribute is now selected, select its counterpart.
(-tableView:shouldSelectRow:): New method to disallow entity
selection if there is a destination entity.
(-tableView:willDisplayCell:forTableColumn:row:): New method,
set the cell text color to disabled text color, if we would disallow
selection.
(-connectionChanged:): Implement disconnection.
* DBModeler/SQLGenerator.h/m: New files initial implementation.
* DBModeler/Resources/SQLGenerator.gorm: Ditto.
* DBModeler/ConsistencyChecker.h/m: Ditto.
* DBModeler/ConsistencyResults.h/m: Ditto.
* DBModeler/ConsistencyResults.gorm: Ditto.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21438 72102866-910b-0410-8b05-ffd578937521
2005-07-09 02:07:42 +00:00
|
|
|
NSLog(@"%@\n\t %i %@", NSStringFromSelector(_cmd), ret, [item class]);
|
2005-05-13 00:25:27 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (id)outlineView: (NSOutlineView *)outlineView
|
|
|
|
child: (int)index
|
|
|
|
ofItem: (id)item
|
|
|
|
{
|
|
|
|
id ret = @"blah.";
|
|
|
|
|
|
|
|
if (item == nil)
|
|
|
|
ret = [_document model];
|
|
|
|
else if ([item isKindOfClass: [EOModel class]])
|
|
|
|
ret = [[item entities] objectAtIndex:index];
|
|
|
|
else if ([item isKindOfClass: [EOEntity class]])
|
|
|
|
ret = [[item relationships] objectAtIndex:index];
|
|
|
|
else if ([item isKindOfClass: [EORelationship class]])
|
|
|
|
ret = nil;
|
|
|
|
#if DEBUG_STUFF == 1
|
* DBModeler/AdaptorsPanel.m (-init): Add parenthesis around
assignment. Replace label with window title.
(-runAdaptorsPanel:): Remove unused variable.
* DBModeler/DefaultColumnProvider.m: Add missing braces, remove
unused ivars.
(-cellForColumnNamed:): Autorelease cells.
* DBModeler/EOAdditions.m: New EOAttribute KVC methods -allowNull and
-setAllowNull:.
* DBModeler/GNUmakefile: Add new to project.
* DBModeler/KVDataSource.m (-createObject:): Return nil after
throwing exception.
* DBModeler/MainModelEditor.m
(-dragImageForRows:event:dragImageOffset:):: Enable drag and
drop for relationships.
(-initWithDocument:): Add parenthesis around assignment. Don't
release the document window on close.
(-ecStuff:): temporarily reload everything in the outline view when
something changes.
(-viewSelectedObject:): Remove NSLog. Rewrite editor activation.
Fix leaks.
* DBModeler/Modeler.m (-applicationWillFinishLaunching:): Add new menu
items. Don't order our menu in.
(-new:,-open:): Move document initializition to _newDocumentWithModel:.
(-_newDocumentWithModel:,-newFromDatabase:): New methods.
(-validateMenuItem:,-generateSQL:): Ditto.
* DBModeler/ModelerAttributeEditor.m (-initWithParentEditor:):
Remove unused variables.
(-displayGroupDidChangeSelection:): return early if there is no
longer a selection.
* DBModeler/ModelerEntityEditor.m:
(-canSupportCurrentSelection): Remove NSLog.
(-displayGroupDidChangeSelection:): Ditto.
(-dealloc:): New method.
(-initWithParentEditor:): Remove unused variables. Add parens around
assignment. Release local variables.
* DBModeler/ModelerTableEmbedibleEditor:
(-addDefaultTableColumnsForTableView:displayGroup:): Release table
columns.
(-addTableColumnForItem:tableView:): Ditto.
* DBModeler/Inspectors/RelationshipInspector.m:
(-selectedEntity, -selectedDestinationAttribute): New methods.
(-selectedSourceAttribute, -indexOfSourceAttribute:): Ditto.
(-indexOfDestinationAttribute:,joinWithSource:destination:): Ditto.
(-selectedJoin:,updateConnectButton,): Ditto.
(-refresh): Rewrite using new methods.
(-numberOfRowsInTableView:): Add fallback return value.
(-tableView:objectValueForTableColumn:row:): Ditto.
(-tableView:selectionDidChange:): If a source or destination
attribute is now selected, select its counterpart.
(-tableView:shouldSelectRow:): New method to disallow entity
selection if there is a destination entity.
(-tableView:willDisplayCell:forTableColumn:row:): New method,
set the cell text color to disabled text color, if we would disallow
selection.
(-connectionChanged:): Implement disconnection.
* DBModeler/SQLGenerator.h/m: New files initial implementation.
* DBModeler/Resources/SQLGenerator.gorm: Ditto.
* DBModeler/ConsistencyChecker.h/m: Ditto.
* DBModeler/ConsistencyResults.h/m: Ditto.
* DBModeler/ConsistencyResults.gorm: Ditto.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21438 72102866-910b-0410-8b05-ffd578937521
2005-07-09 02:07:42 +00:00
|
|
|
NSLog(@"%@\n\tchild %@ atIndex: %i ofItem %@", NSStringFromSelector(_cmd), [ret class], index, [item class]);
|
2005-05-13 00:25:27 +00:00
|
|
|
#endif
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (id) outlineView: (NSOutlineView *)outlineView
|
|
|
|
objectValueForTableColumn: (NSTableColumn *)tableColumn
|
|
|
|
byItem: (id)item
|
|
|
|
{
|
|
|
|
id ret;
|
|
|
|
if (item == nil)
|
|
|
|
ret = [[_document model] name];
|
|
|
|
else
|
|
|
|
ret = [item valueForKey:@"name"];
|
|
|
|
#if DEBUG_STUFF == 1
|
|
|
|
NSLog(@"objectValue: %@", ret);
|
|
|
|
#endif
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void) outlineViewSelectionDidChange:(NSNotification *)notif
|
|
|
|
{
|
|
|
|
NSMutableArray *foo = [[NSMutableArray alloc] init];
|
|
|
|
EOModel *bar = [_document model];
|
|
|
|
id item = nil;
|
|
|
|
int selectedRow = [_iconPath selectedRow];
|
2006-09-05 22:18:35 +00:00
|
|
|
|
2005-05-13 00:25:27 +00:00
|
|
|
if (selectedRow == -1)
|
|
|
|
return;
|
|
|
|
while (bar != item)
|
|
|
|
{
|
|
|
|
if (item == nil)
|
Replaced tabs with spaces throughout the DBModeler sub-project.
* DBModeler/AdaptorsPanel.m, DBModeler/AttributeCell.m,
DBModeler/ConsistencyChecker.m, DBModeler/DefaultColumnProvider.m,
DBModeler/DiagramView.m, DBModeler/EOAdditions.m, DBModeler/EntityView.m,
DBModeler/GNUmakefile, DBModeler/KVDataSource.m,
DBModeler/MainModelEditor.h, DBModeler/MainModelEditor.m,
DBModeler/ModelerAttributeEditor.m, DBModeler/ModelerEntityEditor.h,
DBModeler/ModelerEntityEditor.m,
DBModeler/ModelerTableEmbedibleEditor.h,
DBModeler/ModelerTableEmbedibleEditor.m,
DBModeler/NSView+Additions.m, DBModeler/Preferences.m,
DBModeler/SQLGenerator.m, DBModeler/Inspectors/AdvancedEntityInspector.m,
DBModeler/Inspectors/AttributeInspector.h,
DBModeler/Inspectors/AttributeInspector.m,
DBModeler/Inspectors/RelationshipInspector.h,
DBModeler/Inspectors/RelationshipInspector.m
White-space clean-up. Replaced tabs with spaces.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@26556 72102866-910b-0410-8b05-ffd578937521
2008-05-23 12:11:26 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
item = [_iconPath itemAtRow:selectedRow];
|
|
|
|
[foo insertObject:[NSArray arrayWithObject:item] atIndex:0];
|
|
|
|
}
|
2005-05-13 00:25:27 +00:00
|
|
|
else if ([item isKindOfClass:[EOEntity class]])
|
Replaced tabs with spaces throughout the DBModeler sub-project.
* DBModeler/AdaptorsPanel.m, DBModeler/AttributeCell.m,
DBModeler/ConsistencyChecker.m, DBModeler/DefaultColumnProvider.m,
DBModeler/DiagramView.m, DBModeler/EOAdditions.m, DBModeler/EntityView.m,
DBModeler/GNUmakefile, DBModeler/KVDataSource.m,
DBModeler/MainModelEditor.h, DBModeler/MainModelEditor.m,
DBModeler/ModelerAttributeEditor.m, DBModeler/ModelerEntityEditor.h,
DBModeler/ModelerEntityEditor.m,
DBModeler/ModelerTableEmbedibleEditor.h,
DBModeler/ModelerTableEmbedibleEditor.m,
DBModeler/NSView+Additions.m, DBModeler/Preferences.m,
DBModeler/SQLGenerator.m, DBModeler/Inspectors/AdvancedEntityInspector.m,
DBModeler/Inspectors/AttributeInspector.h,
DBModeler/Inspectors/AttributeInspector.m,
DBModeler/Inspectors/RelationshipInspector.h,
DBModeler/Inspectors/RelationshipInspector.m
White-space clean-up. Replaced tabs with spaces.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@26556 72102866-910b-0410-8b05-ffd578937521
2008-05-23 12:11:26 +00:00
|
|
|
{
|
|
|
|
item = [item model];
|
2005-05-13 00:25:27 +00:00
|
|
|
[foo insertObject:item atIndex:0];
|
Replaced tabs with spaces throughout the DBModeler sub-project.
* DBModeler/AdaptorsPanel.m, DBModeler/AttributeCell.m,
DBModeler/ConsistencyChecker.m, DBModeler/DefaultColumnProvider.m,
DBModeler/DiagramView.m, DBModeler/EOAdditions.m, DBModeler/EntityView.m,
DBModeler/GNUmakefile, DBModeler/KVDataSource.m,
DBModeler/MainModelEditor.h, DBModeler/MainModelEditor.m,
DBModeler/ModelerAttributeEditor.m, DBModeler/ModelerEntityEditor.h,
DBModeler/ModelerEntityEditor.m,
DBModeler/ModelerTableEmbedibleEditor.h,
DBModeler/ModelerTableEmbedibleEditor.m,
DBModeler/NSView+Additions.m, DBModeler/Preferences.m,
DBModeler/SQLGenerator.m, DBModeler/Inspectors/AdvancedEntityInspector.m,
DBModeler/Inspectors/AttributeInspector.h,
DBModeler/Inspectors/AttributeInspector.m,
DBModeler/Inspectors/RelationshipInspector.h,
DBModeler/Inspectors/RelationshipInspector.m
White-space clean-up. Replaced tabs with spaces.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@26556 72102866-910b-0410-8b05-ffd578937521
2008-05-23 12:11:26 +00:00
|
|
|
}
|
2005-05-13 00:25:27 +00:00
|
|
|
else if ([item isKindOfClass:[EORelationship class]])
|
|
|
|
{
|
Replaced tabs with spaces throughout the DBModeler sub-project.
* DBModeler/AdaptorsPanel.m, DBModeler/AttributeCell.m,
DBModeler/ConsistencyChecker.m, DBModeler/DefaultColumnProvider.m,
DBModeler/DiagramView.m, DBModeler/EOAdditions.m, DBModeler/EntityView.m,
DBModeler/GNUmakefile, DBModeler/KVDataSource.m,
DBModeler/MainModelEditor.h, DBModeler/MainModelEditor.m,
DBModeler/ModelerAttributeEditor.m, DBModeler/ModelerEntityEditor.h,
DBModeler/ModelerEntityEditor.m,
DBModeler/ModelerTableEmbedibleEditor.h,
DBModeler/ModelerTableEmbedibleEditor.m,
DBModeler/NSView+Additions.m, DBModeler/Preferences.m,
DBModeler/SQLGenerator.m, DBModeler/Inspectors/AdvancedEntityInspector.m,
DBModeler/Inspectors/AttributeInspector.h,
DBModeler/Inspectors/AttributeInspector.m,
DBModeler/Inspectors/RelationshipInspector.h,
DBModeler/Inspectors/RelationshipInspector.m
White-space clean-up. Replaced tabs with spaces.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@26556 72102866-910b-0410-8b05-ffd578937521
2008-05-23 12:11:26 +00:00
|
|
|
item = [item entity];
|
2005-05-13 00:25:27 +00:00
|
|
|
[foo insertObject:item atIndex:0];
|
Replaced tabs with spaces throughout the DBModeler sub-project.
* DBModeler/AdaptorsPanel.m, DBModeler/AttributeCell.m,
DBModeler/ConsistencyChecker.m, DBModeler/DefaultColumnProvider.m,
DBModeler/DiagramView.m, DBModeler/EOAdditions.m, DBModeler/EntityView.m,
DBModeler/GNUmakefile, DBModeler/KVDataSource.m,
DBModeler/MainModelEditor.h, DBModeler/MainModelEditor.m,
DBModeler/ModelerAttributeEditor.m, DBModeler/ModelerEntityEditor.h,
DBModeler/ModelerEntityEditor.m,
DBModeler/ModelerTableEmbedibleEditor.h,
DBModeler/ModelerTableEmbedibleEditor.m,
DBModeler/NSView+Additions.m, DBModeler/Preferences.m,
DBModeler/SQLGenerator.m, DBModeler/Inspectors/AdvancedEntityInspector.m,
DBModeler/Inspectors/AttributeInspector.h,
DBModeler/Inspectors/AttributeInspector.m,
DBModeler/Inspectors/RelationshipInspector.h,
DBModeler/Inspectors/RelationshipInspector.m
White-space clean-up. Replaced tabs with spaces.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@26556 72102866-910b-0410-8b05-ffd578937521
2008-05-23 12:11:26 +00:00
|
|
|
}
|
2005-05-13 00:25:27 +00:00
|
|
|
}
|
|
|
|
#if DEBUG_STUFF == 1
|
|
|
|
{
|
|
|
|
int i,c;
|
|
|
|
NSArray *selpath = [self selectionPath];
|
|
|
|
NSLog(@"current selection path");
|
|
|
|
for (i = 0, c = [selpath count]; i < c; i++)
|
|
|
|
{
|
Replaced tabs with spaces throughout the DBModeler sub-project.
* DBModeler/AdaptorsPanel.m, DBModeler/AttributeCell.m,
DBModeler/ConsistencyChecker.m, DBModeler/DefaultColumnProvider.m,
DBModeler/DiagramView.m, DBModeler/EOAdditions.m, DBModeler/EntityView.m,
DBModeler/GNUmakefile, DBModeler/KVDataSource.m,
DBModeler/MainModelEditor.h, DBModeler/MainModelEditor.m,
DBModeler/ModelerAttributeEditor.m, DBModeler/ModelerEntityEditor.h,
DBModeler/ModelerEntityEditor.m,
DBModeler/ModelerTableEmbedibleEditor.h,
DBModeler/ModelerTableEmbedibleEditor.m,
DBModeler/NSView+Additions.m, DBModeler/Preferences.m,
DBModeler/SQLGenerator.m, DBModeler/Inspectors/AdvancedEntityInspector.m,
DBModeler/Inspectors/AttributeInspector.h,
DBModeler/Inspectors/AttributeInspector.m,
DBModeler/Inspectors/RelationshipInspector.h,
DBModeler/Inspectors/RelationshipInspector.m
White-space clean-up. Replaced tabs with spaces.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@26556 72102866-910b-0410-8b05-ffd578937521
2008-05-23 12:11:26 +00:00
|
|
|
id obj = [selpath objectAtIndex:i];
|
|
|
|
|
|
|
|
if ([obj isKindOfClass:[NSArray class]])
|
|
|
|
{
|
|
|
|
int j,d;
|
|
|
|
for (j = 0, d = [obj count]; j < d; j++)
|
|
|
|
{
|
|
|
|
GSPrintf(stderr, @"* %@(%@)\n", [[obj objectAtIndex:j] class], [(EOModel *)[obj objectAtIndex:j] name]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
GSPrintf(stderr, @"%@(%@)\n", [obj class], [(EOModel *)obj name]);
|
2005-05-13 00:25:27 +00:00
|
|
|
}
|
|
|
|
NSLog(@"changing to");
|
|
|
|
selpath = foo;
|
|
|
|
for (i = 0, c = [selpath count]; i < c; i++)
|
|
|
|
{
|
|
|
|
id obj = [selpath objectAtIndex:i];
|
|
|
|
|
|
|
|
if ([obj isKindOfClass:[NSArray class]])
|
|
|
|
{
|
|
|
|
int j,d;
|
|
|
|
for (j = 0, d = [obj count]; j < d; j++)
|
|
|
|
{
|
|
|
|
GSPrintf(stderr, @"* %@(%@)\n", [[obj objectAtIndex:j] class], [(EOModel *)[obj objectAtIndex:j] name]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
GSPrintf(stderr, @"%@(%@)\n", [obj class], [(EOModel *)obj name]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
[self setSelectionPath:AUTORELEASE(foo)];
|
2009-03-03 23:46:44 +00:00
|
|
|
[self activateSelection];
|
2005-05-13 00:25:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
- (BOOL) outlineView:(NSOutlineView *)view
|
|
|
|
writeItems:(NSArray *)rows
|
|
|
|
toPasteboard:(NSPasteboard *)pboard
|
|
|
|
{
|
|
|
|
NSMutableArray *foo = [[NSMutableArray alloc] init];
|
|
|
|
EOModel *bar = [_document model];
|
|
|
|
int selectedRow = [_iconPath selectedRow];
|
|
|
|
id item = [_iconPath itemAtRow:selectedRow];
|
|
|
|
|
|
|
|
if (selectedRow == -1)
|
|
|
|
return NO;
|
|
|
|
while (item != nil)
|
|
|
|
{
|
|
|
|
if (item == bar)
|
|
|
|
{
|
Replaced tabs with spaces throughout the DBModeler sub-project.
* DBModeler/AdaptorsPanel.m, DBModeler/AttributeCell.m,
DBModeler/ConsistencyChecker.m, DBModeler/DefaultColumnProvider.m,
DBModeler/DiagramView.m, DBModeler/EOAdditions.m, DBModeler/EntityView.m,
DBModeler/GNUmakefile, DBModeler/KVDataSource.m,
DBModeler/MainModelEditor.h, DBModeler/MainModelEditor.m,
DBModeler/ModelerAttributeEditor.m, DBModeler/ModelerEntityEditor.h,
DBModeler/ModelerEntityEditor.m,
DBModeler/ModelerTableEmbedibleEditor.h,
DBModeler/ModelerTableEmbedibleEditor.m,
DBModeler/NSView+Additions.m, DBModeler/Preferences.m,
DBModeler/SQLGenerator.m, DBModeler/Inspectors/AdvancedEntityInspector.m,
DBModeler/Inspectors/AttributeInspector.h,
DBModeler/Inspectors/AttributeInspector.m,
DBModeler/Inspectors/RelationshipInspector.h,
DBModeler/Inspectors/RelationshipInspector.m
White-space clean-up. Replaced tabs with spaces.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@26556 72102866-910b-0410-8b05-ffd578937521
2008-05-23 12:11:26 +00:00
|
|
|
NSString *modelPath = [item valueForKey:@"path"];
|
|
|
|
if (modelPath == nil)
|
|
|
|
{
|
|
|
|
NSRunAlertPanel(@"Error", @"Must save before dragging", @"OK",@"Cancel",nil);
|
|
|
|
return NO;
|
|
|
|
}
|
2005-05-13 00:25:27 +00:00
|
|
|
[foo insertObject:modelPath atIndex:0];
|
Replaced tabs with spaces throughout the DBModeler sub-project.
* DBModeler/AdaptorsPanel.m, DBModeler/AttributeCell.m,
DBModeler/ConsistencyChecker.m, DBModeler/DefaultColumnProvider.m,
DBModeler/DiagramView.m, DBModeler/EOAdditions.m, DBModeler/EntityView.m,
DBModeler/GNUmakefile, DBModeler/KVDataSource.m,
DBModeler/MainModelEditor.h, DBModeler/MainModelEditor.m,
DBModeler/ModelerAttributeEditor.m, DBModeler/ModelerEntityEditor.h,
DBModeler/ModelerEntityEditor.m,
DBModeler/ModelerTableEmbedibleEditor.h,
DBModeler/ModelerTableEmbedibleEditor.m,
DBModeler/NSView+Additions.m, DBModeler/Preferences.m,
DBModeler/SQLGenerator.m, DBModeler/Inspectors/AdvancedEntityInspector.m,
DBModeler/Inspectors/AttributeInspector.h,
DBModeler/Inspectors/AttributeInspector.m,
DBModeler/Inspectors/RelationshipInspector.h,
DBModeler/Inspectors/RelationshipInspector.m
White-space clean-up. Replaced tabs with spaces.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@26556 72102866-910b-0410-8b05-ffd578937521
2008-05-23 12:11:26 +00:00
|
|
|
item = nil;
|
2005-05-13 00:25:27 +00:00
|
|
|
}
|
|
|
|
else if ([item isKindOfClass:[EOEntity class]])
|
|
|
|
{
|
|
|
|
[foo insertObject:[item valueForKey:@"name"] atIndex:0];
|
Replaced tabs with spaces throughout the DBModeler sub-project.
* DBModeler/AdaptorsPanel.m, DBModeler/AttributeCell.m,
DBModeler/ConsistencyChecker.m, DBModeler/DefaultColumnProvider.m,
DBModeler/DiagramView.m, DBModeler/EOAdditions.m, DBModeler/EntityView.m,
DBModeler/GNUmakefile, DBModeler/KVDataSource.m,
DBModeler/MainModelEditor.h, DBModeler/MainModelEditor.m,
DBModeler/ModelerAttributeEditor.m, DBModeler/ModelerEntityEditor.h,
DBModeler/ModelerEntityEditor.m,
DBModeler/ModelerTableEmbedibleEditor.h,
DBModeler/ModelerTableEmbedibleEditor.m,
DBModeler/NSView+Additions.m, DBModeler/Preferences.m,
DBModeler/SQLGenerator.m, DBModeler/Inspectors/AdvancedEntityInspector.m,
DBModeler/Inspectors/AttributeInspector.h,
DBModeler/Inspectors/AttributeInspector.m,
DBModeler/Inspectors/RelationshipInspector.h,
DBModeler/Inspectors/RelationshipInspector.m
White-space clean-up. Replaced tabs with spaces.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@26556 72102866-910b-0410-8b05-ffd578937521
2008-05-23 12:11:26 +00:00
|
|
|
item = [item model];
|
2005-05-13 00:25:27 +00:00
|
|
|
}
|
|
|
|
else if ([item isKindOfClass:[EORelationship class]])
|
|
|
|
{
|
|
|
|
[foo insertObject:[item valueForKey:@"name"] atIndex:0];
|
Replaced tabs with spaces throughout the DBModeler sub-project.
* DBModeler/AdaptorsPanel.m, DBModeler/AttributeCell.m,
DBModeler/ConsistencyChecker.m, DBModeler/DefaultColumnProvider.m,
DBModeler/DiagramView.m, DBModeler/EOAdditions.m, DBModeler/EntityView.m,
DBModeler/GNUmakefile, DBModeler/KVDataSource.m,
DBModeler/MainModelEditor.h, DBModeler/MainModelEditor.m,
DBModeler/ModelerAttributeEditor.m, DBModeler/ModelerEntityEditor.h,
DBModeler/ModelerEntityEditor.m,
DBModeler/ModelerTableEmbedibleEditor.h,
DBModeler/ModelerTableEmbedibleEditor.m,
DBModeler/NSView+Additions.m, DBModeler/Preferences.m,
DBModeler/SQLGenerator.m, DBModeler/Inspectors/AdvancedEntityInspector.m,
DBModeler/Inspectors/AttributeInspector.h,
DBModeler/Inspectors/AttributeInspector.m,
DBModeler/Inspectors/RelationshipInspector.h,
DBModeler/Inspectors/RelationshipInspector.m
White-space clean-up. Replaced tabs with spaces.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@26556 72102866-910b-0410-8b05-ffd578937521
2008-05-23 12:11:26 +00:00
|
|
|
item = [item entity];
|
2005-05-13 00:25:27 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
[pboard declareTypes: [NSArray arrayWithObject: EOMPropertyPboardType] owner:nil];
|
|
|
|
[pboard setPropertyList:foo forType:EOMPropertyPboardType];
|
|
|
|
return YES;
|
|
|
|
}
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
- (void) outlineView: (NSOutlineView *)outlineView
|
|
|
|
willDisplayCell:(NSCell *)cell
|
|
|
|
forTableColumn:(NSTableColumn *)tc
|
|
|
|
item:(id)item
|
|
|
|
{
|
|
|
|
//if (![[tc identifier] isEqual:@"name"])
|
Replaced tabs with spaces throughout the DBModeler sub-project.
* DBModeler/AdaptorsPanel.m, DBModeler/AttributeCell.m,
DBModeler/ConsistencyChecker.m, DBModeler/DefaultColumnProvider.m,
DBModeler/DiagramView.m, DBModeler/EOAdditions.m, DBModeler/EntityView.m,
DBModeler/GNUmakefile, DBModeler/KVDataSource.m,
DBModeler/MainModelEditor.h, DBModeler/MainModelEditor.m,
DBModeler/ModelerAttributeEditor.m, DBModeler/ModelerEntityEditor.h,
DBModeler/ModelerEntityEditor.m,
DBModeler/ModelerTableEmbedibleEditor.h,
DBModeler/ModelerTableEmbedibleEditor.m,
DBModeler/NSView+Additions.m, DBModeler/Preferences.m,
DBModeler/SQLGenerator.m, DBModeler/Inspectors/AdvancedEntityInspector.m,
DBModeler/Inspectors/AttributeInspector.h,
DBModeler/Inspectors/AttributeInspector.m,
DBModeler/Inspectors/RelationshipInspector.h,
DBModeler/Inspectors/RelationshipInspector.m
White-space clean-up. Replaced tabs with spaces.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@26556 72102866-910b-0410-8b05-ffd578937521
2008-05-23 12:11:26 +00:00
|
|
|
// return;
|
2005-05-13 00:25:27 +00:00
|
|
|
if ([item isKindOfClass:[EOModel class]])
|
|
|
|
[cell setImage: [NSImage imageNamed:@"Model_small.tiff"]];
|
|
|
|
if ([item isKindOfClass:[EOEntity class]])
|
|
|
|
[cell setImage: [NSImage imageNamed:@"Entity_small.tiff"]];
|
|
|
|
if ([item isKindOfClass:[EORelationship class]])
|
|
|
|
[cell setImage: [NSImage imageNamed:@"Relationship_small.tiff"]];
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
@end
|