~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to src/addins/MonoDevelop.GtkCore/MonoDevelop.GtkCore.GuiBuilder/CombinedDesignView.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
230
230
                {
231
231
                }
232
232
                
233
 
                public override T GetContent<T> ()
 
233
                public override object GetContent (Type type)
234
234
                {
235
235
//                      if (type == typeof(IEditableTextBuffer)) {
236
236
//                              // Intercept the IPositionable interface, since we need to
241
241
//                                      return null;
242
242
//                      }
243
243
//                      
244
 
                        return  base.GetContent<T> () ?? content.GetContent<T> ();
 
244
                        return  base.GetContent (type) ?? (content !=null  ? content.GetContent (type) : null);
245
245
                }
246
246
 
247
247
                public void JumpTo (int line, int column)
248
248
                {
249
 
                        IEditableTextBuffer ip = content.GetContent<IEditableTextBuffer> ();
 
249
                        IEditableTextBuffer ip = (IEditableTextBuffer) content.GetContent (typeof(IEditableTextBuffer));
250
250
                        if (ip != null) {
251
251
                                ShowPage (0);
252
252
                                ip.SetCaretTo (line, column);
265
265
                        this.content = content;
266
266
                }
267
267
                
268
 
                public override T GetContent<T> ()
 
268
                public override object GetContent (Type type)
269
269
                {
270
 
                        if (Control is T)
271
 
                                return (T) (object) Control;
272
 
                        return base.GetContent<T> ();
 
270
                        if (type.IsInstanceOfType (Control))
 
271
                                return Control;
 
272
                        return base.GetContent (type);
273
273
                }
274
274
                
275
275
                #region IAttachableViewContent implementation