This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
nuget "install" "xunit.runner.console" "-OutputDirectory" "tools" "-ExcludeVersion" | |
nuget "install" "FAKE.Core" "-OutputDirectory" "tools" "-ExcludeVersion" | |
nuget restore | |
:Build | |
SET TARGET="Default" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
init: | |
- git config --global core.autocrlf input | |
build_script: | |
- cmd: build.cmd BuildApp | |
- cmd: build.cmd IntegrationTests | |
test: off |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-16"?> | |
<plugin id="Unique id of your plugin" name="name of your plugin" version="the plugin version"> | |
<!--public key token has to be the same for all the plugins so do not change the value from this sample. you need to sign your plugin assembly to have this public key toke--> | |
<extension type="{Name of your type including the namespace}, {Assembly name}, Version={Assembly version}, Culture=neutral, PublicKeyToken=c28cdb26c445c888"> | |
<extensionAttribute type="Sdl.StudioServer.Api.Core.CustomAuthenticationProviderExtentionAttribute, Sdl.StudioServer.Api.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c28cdb26c445c888"> | |
<constructorArgs /> | |
<properties> | |
<property name="CanValidateUserExistance">True</property> | |
</properties> | |
</extensionAttribute> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[AutoSuggestProvider(Id = "SourceCopyAutoSuggestProvider", Name = "AutoSuggest provider for copying the source words")] | |
public class SourceCopyAutoSuggestProvider : AbstractAutoSuggestProvider | |
{ | |
private List<string> _segmentWordSuggestCandidates; | |
public SourceCopyAutoSuggestProvider() | |
{ | |
// Set the default icon for the suggestions from this provider | |
Icon = new Icon(SystemIcons.Exclamation, 16, 16); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var editorController = GetEditorController(); | |
var segmentId = editorController.ActiveDocument.ActiveSegmentPair.Properties.Id.Id; | |
editorController.ActiveDocument.SegmentsConfirmationLevelChanged += ActiveDocument_SegmentsConfirmationLevelChanged; | |
editorController.ActiveDocument.ChangeConfirmationLevelOnSegment(segmentId, ConfirmationLevel.Translated); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var editorController = GetEditorController(); | |
var segmentId = editorController.ActiveDocument.ActiveSegmentPair.Properties.Id.Id; | |
editorController.ActiveDocument.DeleteAllCommentsOnSegment(segmentId); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var editorController = GetEditorController(); | |
var segmentId = editorController.ActiveDocument.ActiveSegmentPair.Properties.Id.Id; | |
var c = editorController.ActiveDocument.GetCommentsFromSegment(segmentId); | |
editorController.ActiveDocument.DeleteCommentOnSegment(segmentId, c.ElementAt(0)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var editorController = GetEditorController(); | |
var segmentId = editorController.ActiveDocument.ActiveSegmentPair.Properties.Id.Id; | |
var c = editorController.ActiveDocument.GetCommentsFromSegment(segmentId); | |
editorController.ActiveDocument.UpdateCommentOnSegment(segmentId, c.ElementAt(0), | |
string.Format("U Comment {0}", ++_commentsCount), | |
Severity.Medium); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var editorController = GetEditorController(); | |
var segmentId = editorController.ActiveDocument.ActiveSegmentPair.Properties.Id.Id; | |
editorController.ActiveDocument.AddCommentOnSegment(segmentId, string.Format("Comment {0}", ++_commentsCount), Severity.Low); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var segmentPair = _editorController.ActiveDocument.ActiveSegmentPair; | |
var paragraphProperties = segmentPair.GetParagraphUnitProperties(); | |
var newComment = _editorController.ActiveDocument.PropertiesFactory.CreateComment("Test Comment", "Test author", | |
Severity.High); | |
if (paragraphProperties.Comments==null) | |
{ | |
paragraphProperties.Comments = _editorController.ActiveDocument.PropertiesFactory.CreateCommentProperties(); | |
} |