11 changed files with 17 additions and 76 deletions
@ -1,59 +0,0 @@
@@ -1,59 +0,0 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
using System; |
||||
using ICSharpCode.Core; |
||||
using ICSharpCode.Scripting; |
||||
using ICSharpCode.SharpDevelop.Editor; |
||||
using ICSharpCode.SharpDevelop.Gui; |
||||
|
||||
namespace ICSharpCode.PythonBinding |
||||
{ |
||||
public class PythonTextEditorViewContent |
||||
{ |
||||
IViewContent view; |
||||
IEditable editable; |
||||
ITextEditorProvider textEditorProvider; |
||||
ITextEditor textEditor; |
||||
ITextEditorOptions textEditorOptions; |
||||
|
||||
public PythonTextEditorViewContent(IScriptingWorkbench workbench) |
||||
{ |
||||
Init(workbench.ActiveViewContent); |
||||
} |
||||
|
||||
public PythonTextEditorViewContent(IViewContent view) |
||||
{ |
||||
Init(view); |
||||
} |
||||
|
||||
void Init(IViewContent view) |
||||
{ |
||||
this.view = view; |
||||
editable = view as IEditable; |
||||
textEditorProvider = view as ITextEditorProvider; |
||||
textEditor = textEditorProvider.TextEditor; |
||||
textEditorOptions = textEditor.Options; |
||||
} |
||||
|
||||
public FileName PrimaryFileName { |
||||
get { return view.PrimaryFileName; } |
||||
} |
||||
|
||||
public IEditable EditableView { |
||||
get { return editable; } |
||||
} |
||||
|
||||
public ITextEditor TextEditor { |
||||
get { return textEditor; } |
||||
} |
||||
|
||||
public ITextEditorOptions TextEditorOptions { |
||||
get { return textEditorOptions; } |
||||
} |
||||
} |
||||
} |
Loading…
Reference in new issue