Browse Source
Support "warm" reloading of designer (without full Unload/Load in view content). Happens automatically on language change -> removed own PropertyValueChanged handler. Fixed the designer not reloading after a load error on the primary file. Show a "please wait" label while loading. Moved DefaultMemberRelationshipService to its own file. Removed unused TypeDescriptorFilterService (that service is in the framework already). Simplified IDEContainer and do actually add the grid to the container. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@3508 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61shortcuts
9 changed files with 206 additions and 207 deletions
@ -0,0 +1,46 @@
@@ -0,0 +1,46 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <owner name="Christian Hornung" email="chhornung@googlemail.com"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
using System; |
||||
using System.ComponentModel.Design.Serialization; |
||||
|
||||
using ICSharpCode.Core; |
||||
|
||||
//#define WFDESIGN_LOG_MEMBERRELATIONSHIPSERVICE
|
||||
|
||||
namespace ICSharpCode.FormsDesigner.Services |
||||
{ |
||||
public class DefaultMemberRelationshipService : MemberRelationshipService |
||||
{ |
||||
public DefaultMemberRelationshipService() |
||||
{ |
||||
} |
||||
|
||||
public override bool SupportsRelationship(MemberRelationship source, MemberRelationship relationship) |
||||
{ |
||||
#if WFDESIGN_LOG_MEMBERRELATIONSHIPSERVICE
|
||||
LoggingService.Debug("MemberRelationshipService: SupportsRelationship called, source=" + ToString(source) + ", relationship=" + ToString(relationship)); |
||||
#endif
|
||||
return true; |
||||
} |
||||
|
||||
#if WFDESIGN_LOG_MEMBERRELATIONSHIPSERVICE
|
||||
protected override MemberRelationship GetRelationship(MemberRelationship source) |
||||
{ |
||||
LoggingService.Debug("MemberRelationshipService: GetRelationship called, source=" + ToString(source)); |
||||
var mrs = base.GetRelationship(source); |
||||
LoggingService.Debug("MemberRelationshipService: -> returning " + ToString(mrs)); |
||||
return mrs; |
||||
} |
||||
|
||||
static string ToString(MemberRelationship mrs) |
||||
{ |
||||
return "[MR: IsEmpty=" + mrs.IsEmpty + ", Owner=[" + (mrs.Owner == null ? "<null>" : mrs.Owner.ToString()) + "], Member=[" + (mrs.Member == null ? "<null>" : mrs.Member.Name) + "]]"; |
||||
} |
||||
#endif
|
||||
} |
||||
} |
@ -1,63 +0,0 @@
@@ -1,63 +0,0 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <owner name="Mike Krüger" email="mike@icsharpcode.net"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
using System; |
||||
using System.ComponentModel; |
||||
using System.ComponentModel.Design; |
||||
|
||||
namespace ICSharpCode.FormsDesigner.Services |
||||
{ |
||||
public class TypeDescriptorFilterService : ITypeDescriptorFilterService |
||||
{ |
||||
IDesignerFilter GetDesignerFilter(IComponent component) |
||||
{ |
||||
ISite site = component.Site; |
||||
|
||||
if (site == null) { |
||||
return null; |
||||
} |
||||
|
||||
IDesignerHost host = (IDesignerHost)site.GetService(typeof(IDesignerHost)); |
||||
if (host == null) |
||||
return null; |
||||
return host.GetDesigner(component) as IDesignerFilter; |
||||
} |
||||
|
||||
|
||||
#region System.ComponentModel.Design.ITypeDescriptorFilterService interface implementation
|
||||
public bool FilterProperties(System.ComponentModel.IComponent component, System.Collections.IDictionary properties) |
||||
{ |
||||
IDesignerFilter designerFilter = GetDesignerFilter(component); |
||||
if (designerFilter != null) { |
||||
designerFilter.PreFilterProperties(properties); |
||||
designerFilter.PostFilterProperties(properties); |
||||
} |
||||
return false; |
||||
} |
||||
|
||||
public bool FilterEvents(System.ComponentModel.IComponent component, System.Collections.IDictionary events) |
||||
{ |
||||
IDesignerFilter designerFilter = GetDesignerFilter(component); |
||||
if (designerFilter != null) { |
||||
designerFilter.PreFilterEvents(events); |
||||
designerFilter.PostFilterEvents(events); |
||||
} |
||||
return false; |
||||
} |
||||
|
||||
public bool FilterAttributes(System.ComponentModel.IComponent component, System.Collections.IDictionary attributes) |
||||
{ |
||||
IDesignerFilter designerFilter = GetDesignerFilter(component); |
||||
if (designerFilter != null) { |
||||
designerFilter.PreFilterAttributes(attributes); |
||||
designerFilter.PostFilterAttributes(attributes); |
||||
} |
||||
return false; |
||||
} |
||||
#endregion
|
||||
} |
||||
} |
Loading…
Reference in new issue