SharpDevelop——Condition List

Condition List

This file was generated by the tool 'BuildAddinDocumentation'. It is based on SharpDevelop 2.1.0.1750.

ActiveContentExtension

Tests the file extension of the file edited in the active window content.

Condition name: ICSharpCode.Core.ActiveContentExtensionConditionEvaluator

Attributes:

activeextension: The file extension the file should have.

Example: Test if a C# file is being edited

            <Condition name = "ActiveContentExtension" activeextension=".cs">

 

ActiveViewContentUntitled

Tests if the active view content is untitled.

Condition name: ICSharpCode.Core.ActiveViewContentUntitledConditionEvaluator
Attributes: Boolean value to test against.

Example: Test if the active view content is untitled

            <Condition name = "ActiveViewContentUntitled" activewindowuntitled="True">
            - or -
            <Condition name = "ActiveViewContentUntitled">

 

Example: Test if the active view content has a title

            <Condition name = "ActiveViewContentUntitled" activewindowuntitled="False">

 

ActiveWindowState

Tests the window state of the active workbench window.

Condition name: ICSharpCode.Core.ActiveWindowStateConditionEvaluator

BrowserLocation

Conditions that tries to match the URL of a HtmlViewPane with a regex.

Condition name: ICSharpCode.SharpDevelop.BrowserDisplayBinding.BrowserLocationConditionEvaluator

Attributes:

urlRegex: The regular expression that must match the URL.
options: Optional; options that are passed as RegexOptions.

Example: Test if the browser is showing a HtmlHelp page

            <Condition name = "BrowserLocation" urlRegex = "^ms-help:">

 

CanNavigateBack

Tests the NavigationService for the presence of points to jump back to.

Condition name: ICSharpCode.Core.CanNavigateBackConditionEvaluator

Example: Test if the NavigationService can jump back.

            <Condition name = "CanNavigateBack" >

 

CanNavigateForward

Tests the NavigationService for the presence of points to jump forward to.

Condition name: ICSharpCode.Core.CanNavigateForwardConditionEvaluator

Example: Test if the NavigationService can jump forward.

            <Condition name = "CanNavigateForward" >

 

Compare

Compares two strings. The strings are passed through the StringParser, so it is possible to compare SharpDevelop properties.
Useful if you want to run a command only when a setting is active to prevent loading your addin if that setting isn't set.

Condition name: ICSharpCode.Core.CompareConditionEvaluator

Attributes:

string: The first string.
equals: The second string.
comparisonType: The mode of the comparison: a field of the System.StringComparison enumeration. The default is 'InvariantCultureIgnoreCase'.

Example: Check the value of a property in the PropertyService

            <Condition name = "Compare" string = "${property:SharpDevelop.FiletypesRegisterStartup}" equals = "True">

 

CompareProjectProperty

Compares a project property with a string.
Uses the conditions' caller as project; or the current project, if the caller is not a project. The property name and string are passed through the StringParser.

Condition name: ICSharpCode.SharpDevelop.CompareProjectPropertyConditionEvaluator

Attributes:

property: The name of the MSBuild property to read the value from.
equals: The second string.
comparisonType: The mode of the comparison: a field of the System.StringComparison enumeration. The default is 'InvariantCultureIgnoreCase'.

Example: Check if the project output type in the active configuration is a Windows Application

            <Condition name = "CompareProjectProperty" property = "OutputType" equals = "WinExe">

 

DebuggerSupports

Tests if the debugger supports a certain feature.

Condition name: ICSharpCode.Core.DebuggerSupportsConditionEvaluator

Attributes:

debuggersupports: The name of the feature the debugger must support. Possible feature names: "Start", "StartWithoutDebugging", "Stop", "ExecutionControl", "Stepping".

Example: Test if the debugger supports stepping

            <Condition name = "DebuggerSupports" debuggersupports="Stepping">

 

Example: Test if the debugger supports killing the running application

            <Condition name = "DebuggerSupports" debuggersupports="Stop">

 

IsProcessRunning

Tests the values of DebuggerService.CurrentDebugger.IsDebugging (debugger attached to a process) and DebuggerService.CurrentDebugger.IsProcessRunning (process is running and not in break mode).

Condition name: ICSharpCode.Core.IsProcessRunningConditionEvaluator
Attributes: Optional; boolean value IsDebugging should have.
Attributes: Optional; boolean value IsProcessRunning should have.

Example: Test if currently no process is running

            <Condition name = "IsProcessRunning" isdebugging="False">

 

Example: Test if the debugger is attached to anything

            <Condition name = "IsProcessRunning" isdebugging="True">

 

Example: Test if the debugger is attached and we are in break mode

            <Condition name = "IsProcessRunning" isdebugging="True" isprocessrunning="False">

 

Example: Test if the debugger is attached and the process is running

            <Condition name = "IsProcessRunning" isdebugging="True" isprocessrunning="True">

 

OpenWindowState

Tests if any open window has a specified window state.

Condition name: ICSharpCode.Core.OpenWindowStateConditionEvaluator

OwnerState

Condition evaluator that compares the state of the caller/owner with a specified value. The caller/owner has to implement IOwnerState.

Condition name: ICSharpCode.Core.OwnerStateConditionEvaluator

ProjectActive

Tests if any project is active or if a project of a specific language is active. Can also be used to test the type of the project passed as caller to the condition - when a project is passed as caller, the language of that project is tested; otherwise the language of the active project is tested.

Condition name: ICSharpCode.Core.ProjectActiveConditionEvaluator

Attributes:

activeproject: The language name the project should have. "*" to test if any project is active.

Example: Test if any project is active

            <Condition name = "ProjectActive" activeproject="*">

 

Example: Test if a C# project is active

            <Condition name = "ProjectActive" activeproject="C#">

 

RefactoringProviderSupports

Tests if the refactoring provider for the current document supports the specified option.

Condition name: ICSharpCode.SharpDevelop.Refactoring.RefactoringProviderSupportsConditionEvaluator

Attributes:

supports: Same of the action that should be supported. "*" to test if refactoring is supported at all.

Example: Test if refactoring is supported

            <Condition name="RefactoringProviderSupports" supports="*">

 

Example: Test if managing imports is supported

            <Condition name="RefactoringProviderSupports" supports="FindUnusedUsingDeclarations">

 

SolutionOpen

Tests if a solution is open.

Condition name: ICSharpCode.Core.SolutionOpenConditionEvaluator

Example: Test if a solution is opened

            <Condition name = "SolutionOpen">

 

TextContent

Tests the name of the highlighting strategy of the text editor.

Condition name: ICSharpCode.SharpDevelop.DefaultEditor.Conditions.TextContentConditionEvaluator

Attributes:

textcontent: The name of the highlighting strategy that should be active.

Example: Test if any XML file is being edited

            <Condition name = "TextContent" textcontent="XML">

 

WindowActive

Tests if the current workbench window is a specified type or implements an interface.

Condition name: ICSharpCode.Core.WindowActiveConditionEvaluator

Attributes:

activewindow: The fully qualified name of the type the active window should be or the interface name it should implement. "*" to test if any window is active.

Example: Test if the current window is a text editor

            <Condition name="WindowActive" activewindow="ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor.ITextEditorControlProvider">

 

Example: Test if any window is active

            <Condition name="WindowActive" activewindow="*">

 

WindowOpen

Tests if a window of a specified type or implementing an interface is open. The window does not need to be the active window.

Condition name: ICSharpCode.Core.WindowOpenConditionEvaluator

Attributes:

openwindow: The fully qualified name of the type the window should be or the interface name it should implement. "*" to test if any window is open.

Example: Test if a text editor is opened

            <Condition name="WindowOpen" openwindow="ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor.ITextEditorControlProvider">

 

Example: Test if any window is open

            <Condition name="WindowOpen" openwindow="*">

 

 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值