Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add usings on paste #48501

Merged
merged 37 commits into from
Nov 20, 2020
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
2568592
Hook up paste command to also automatically add usings. Operation uses
ryzngard Oct 5, 2020
0091ea7
Merge remote-tracking branch 'upstream/master' into feature/usings_on…
ryzngard Oct 12, 2020
df94296
PR cleanup
ryzngard Oct 13, 2020
493b1b3
Split into analyze and add for imports service
ryzngard Oct 13, 2020
59ea5b0
Move to own paste handler
ryzngard Oct 14, 2020
152c6c4
Add options to disable using/import on paste
ryzngard Oct 14, 2020
3873ece
Update xlf files
ryzngard Oct 15, 2020
27d5d86
Update src/Features/Core/Portable/CodeRefactorings/AddMissingImports/…
ryzngard Oct 15, 2020
97ac747
String updates
ryzngard Oct 15, 2020
0524931
Fix for interactive window test. Fix paste integration test
ryzngard Oct 15, 2020
5f61773
Fix nullable stuff
ryzngard Oct 16, 2020
97f4015
Make IPackageInstallerService an optional service for implementation
ryzngard Oct 16, 2020
d8f65bf
Nullable enable IAddImportFeatureService
ryzngard Oct 16, 2020
fe5ee18
Undo unneeded changes
ryzngard Oct 19, 2020
166f67d
Small fixes from PR comments
ryzngard Oct 19, 2020
941bdb9
Merge remote-tracking branch 'upstream/master' into feature/usings_on…
ryzngard Oct 19, 2020
1e6b5ab
Fix change to document
ryzngard Oct 19, 2020
7b9804d
Update strings
ryzngard Oct 20, 2020
ec24927
Remove TextSpan and bool from AddMissingImportsAnalysisResult
ryzngard Oct 20, 2020
a515b46
Merge remote-tracking branch 'upstream/master' into feature/usings_on…
ryzngard Oct 23, 2020
ec66018
Only use CSharp and VB content type. Some PR feedback
ryzngard Oct 27, 2020
f3581a3
Add back check
ryzngard Oct 27, 2020
b425c0a
Go back to using a function
ryzngard Oct 27, 2020
37fd002
Merge branch 'feature/usings_on_paste' of https://github.com/ryzngard…
ryzngard Oct 27, 2020
bce4b47
Move the GetCommandState function
ryzngard Oct 27, 2020
78a0270
Split paste command handler into VB and CSharp
ryzngard Oct 27, 2020
0c61992
WIP
ryzngard Oct 28, 2020
44ca881
Merge branch 'master' into feature/usings_on_paste
ryzngard Nov 17, 2020
898f074
Turn off by default
ryzngard Nov 17, 2020
4c43c6a
idk anymore I'm just tired and want this in
ryzngard Nov 17, 2020
8567a39
Fix nullability warning
ryzngard Nov 18, 2020
4bbf76f
Apply suggestions from code review
ryzngard Nov 19, 2020
aaae96c
Merge remote-tracking branch 'upstream/master' into feature/usings_on…
ryzngard Nov 19, 2020
2bc116a
Fixup after merge/suggestions
ryzngard Nov 19, 2020
c33060a
Undo changes to GetChangesForCodeActionsAsync. Rename that was missed…
ryzngard Nov 20, 2020
4428713
Modify ExecuteCommand ordering
ryzngard Nov 20, 2020
279d531
Whitespace should never been seen nor heard
ryzngard Nov 20, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System;
using System.ComponentModel.Composition;
using Microsoft.CodeAnalysis.Editor.Host;
using Microsoft.CodeAnalysis.Editor.Shared.Extensions;
using Microsoft.CodeAnalysis.Editor.Shared.Utilities;
using Microsoft.CodeAnalysis.Host.Mef;
using Microsoft.VisualStudio.Text;
Expand Down Expand Up @@ -56,9 +57,7 @@ public InlineHintsTaggerProvider(

public ITagger<T>? CreateTagger<T>(ITextView textView, ITextBuffer buffer) where T : ITag
{
// Determining of the textView's buffer does not match the buffer in order to skip showing the hints for
// the interactive window
if (buffer != textView.TextBuffer)
if (textView.IsBufferInInteractiveWindow(buffer))
{
return null;
}
Expand Down
7 changes: 7 additions & 0 deletions src/EditorFeatures/Core/EditorFeaturesResources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -945,6 +945,13 @@ Do you want to proceed?</value>
<data name="Error_creating_instance_of_CodeFixProvider" xml:space="preserve">
<value>Error creating instance of CodeFixProvider</value>
</data>
<data name="Adding_missing_import_directives" xml:space="preserve">
<value>Adding missing import directives...</value>
<comment>Used as a thread awaited dialog letting the user know that work is being done on paste. "import" is a language specific term</comment>
</data>
<data name="Add_Missing_Imports_On_Paste" xml:space="preserve">
<value>Add Missing Imports On Paste</value>
</data>
<data name="User_Types_Records" xml:space="preserve">
<value>User Types - Records</value>
</data>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,11 @@ internal static class PredefinedCommandHandlerNames
/// </summary>
public const string PasteTrackingPaste = "Paste Tracking Paste Command Handler";

/// <summary>
/// Command handler name for Paste in Add Imports.
/// </summary>
public const string AddImportsPaste = "Add Imports Paste Command Handler";

/// <summary>
/// Command handler name for Edit and Continue file save handler.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System;
using System.ComponentModel.Composition;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.AddMissingImports;
using Microsoft.CodeAnalysis.Editor.Shared.Extensions;
using Microsoft.CodeAnalysis.Editor.Shared.Options;
using Microsoft.CodeAnalysis.Editor.Shared.Utilities;
using Microsoft.CodeAnalysis.Host.Mef;
using Microsoft.CodeAnalysis.Shared.Extensions;
using Microsoft.CodeAnalysis.Text;
using Microsoft.VisualStudio.Commanding;
using Microsoft.VisualStudio.Text;
using Microsoft.VisualStudio.Text.Editor.Commanding.Commands;
using Microsoft.VisualStudio.Utilities;

namespace Microsoft.CodeAnalysis.Editor.Implementation.AddImports
{
[Export]
[Export(typeof(ICommandHandler))]
[ContentType(ContentTypeNames.RoslynContentType)]
[Name(PredefinedCommandHandlerNames.AddImportsPaste)]
// Order is important here, this command needs to execute before PasteTracking
// since it may modify the pasted span. Paste tracking dismisses if
// the span is modified. It doesn't need to be before FormatDocument, but
// this helps the order of execution be more constant in case there
// are problems that arise. This command will always execute the next
// command before doing operations.
[Order(After = PredefinedCommandHandlerNames.PasteTrackingPaste)]
[Order(Before = PredefinedCommandHandlerNames.FormatDocument)]
internal class AddImportsPasteCommandHandler : IChainedCommandHandler<PasteCommandArgs>
{
public string DisplayName => EditorFeaturesResources.Add_Missing_Imports_On_Paste;

private readonly IThreadingContext _threadingContext;

[ImportingConstructor]
[Obsolete(MefConstruction.ImportingConstructorMessage, error: true)]
public AddImportsPasteCommandHandler(IThreadingContext threadingContext)
=> _threadingContext = threadingContext;

public void ExecuteCommand(PasteCommandArgs args, Action nextCommandHandler, CommandExecutionContext executionContext)
{
// Capture the pre-paste caret position
var caretPosition = args.TextView.GetCaretPoint(args.SubjectBuffer);
if (!caretPosition.HasValue)
{
return;
}

nextCommandHandler();

if (!args.SubjectBuffer.CanApplyChangeDocumentToWorkspace())
{
return;
}

// Don't perform work if we're inside the interactive window
if (args.TextView.IsBufferInInteractiveWindow(args.SubjectBuffer))
{
return;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this means we don't support this for razor. is that ok?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's fine for now. I'll follow up with razor folks to see if it is something they want enabled.


if (!args.SubjectBuffer.GetFeatureOnOffOption(FeatureOnOffOptions.AddImportsOnPaste))
{
return;
}

// Create a tracking span from the pre-paste caret position that will grow as text is inserted.
var trackingSpan = caretPosition.Value.Snapshot.CreateTrackingSpan(caretPosition.Value.Position, 0, SpanTrackingMode.EdgeInclusive);

// Applying the post-paste snapshot to the tracking span gives us the span of pasted text.
var snapshotSpan = trackingSpan.GetSpan(args.SubjectBuffer.CurrentSnapshot);
var textSpan = TextSpan.FromBounds(snapshotSpan.Start, snapshotSpan.End);

AddMissingImportsForPaste(args, executionContext, textSpan);
}

public CommandState GetCommandState(PasteCommandArgs args, Func<CommandState> nextCommandHandler)
=> nextCommandHandler();

private void AddMissingImportsForPaste(PasteCommandArgs args, CommandExecutionContext executionContext, TextSpan textSpan)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't totally see the beneift of extracting this method. why not just have it be in Execute?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It helps me mentally break apart the goal of execute, which is to do/not do something. That something is this method call. I don't feel strongly if it's blocker, but it does add value to my understanding of the code when I reread it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, github doesn't show me these items. They're in a collapsed block, and they don't appear when i'm in the 'files' portoin of the review (where i do 100% of my reviewing).

In this case, the major issue i see is that the split doesn't actually make sense. I agree that the split should be which is to do/not do something.. However, that's not the split here. For example, despite calling AddMissingImportsForPaste, there are still several more checks that are done which cause the missing imports to not be added. If you change it so that all the bail out checks are done frst, and then extract the code to actually add the imports, that would make a lot more sense to me. Thanks!

{
var sourceTextContainer = args.SubjectBuffer.AsTextContainer();
if (!Workspace.TryGetWorkspace(sourceTextContainer, out var workspace))
{
return;
}

var document = sourceTextContainer.GetOpenDocumentInCurrentContext();
if (document is null)
{
return;
}

using var _ = executionContext.OperationContext.AddScope(allowCancellation: true, EditorFeaturesResources.Adding_missing_import_directives);
var cancellationToken = executionContext.OperationContext.UserCancellationToken;

#pragma warning disable VSTHRD102 // Implement internal logic asynchronously
var updatedDocument = _threadingContext.JoinableTaskFactory.Run(() => AddMissingImportsAsync(document, textSpan, cancellationToken));
#pragma warning restore VSTHRD102 // Implement internal logic asynchronously
if (updatedDocument is null)
{
return;
}

updatedDocument.Project.Solution.Workspace.TryApplyChanges(updatedDocument.Project.Solution);
}

private static async Task<Document?> AddMissingImportsAsync(Document document, TextSpan textSpan, CancellationToken cancellationToken)
{
var addMissingImportsService = document.GetRequiredLanguageService<IAddMissingImportsFeatureService>();
return await addMissingImportsService.AddMissingImportsAsync(document, textSpan, cancellationToken).ConfigureAwait(false);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

#nullable disable

using System;
using System.ComponentModel.Composition;
using Microsoft.CodeAnalysis.Editor;
Expand Down Expand Up @@ -35,7 +33,9 @@ internal class PasteTrackingPasteCommandHandler : IChainedCommandHandler<PasteCo
[ImportingConstructor]
[Obsolete(MefConstruction.ImportingConstructorMessage, error: true)]
public PasteTrackingPasteCommandHandler(PasteTrackingService pasteTrackingService)
=> _pasteTrackingService = pasteTrackingService;
{
_pasteTrackingService = pasteTrackingService;
}

public CommandState GetCommandState(PasteCommandArgs args, Func<CommandState> nextCommandHandler)
=> nextCommandHandler();
Expand All @@ -44,15 +44,14 @@ public void ExecuteCommand(PasteCommandArgs args, Action nextCommandHandler, Com
{
// Capture the pre-paste caret position
var caretPosition = args.TextView.GetCaretPoint(args.SubjectBuffer);

// Allow the pasted text to be inserted and formatted.
nextCommandHandler();

if (!args.SubjectBuffer.CanApplyChangeDocumentToWorkspace())
if (!caretPosition.HasValue)
{
return;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you clarify why we still need the PasteTrackingCommandHandler if we have your new feature?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a user has this feature disabled, then we still want to provide a fix that they can use.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we then have the features flip/flop? in essence, if you have 'add imports on paste', then this would be disabled, and vice versa?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment still applies. do we still want both running at the same time? just trying to get some clarity on the overall design. i do think we should possibly have the features flip. so if add-import-on-paste is on, then we disable the other feature. thoughts?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want both of these available for now. Even if the command is enabled for usings on paste, if the user cancels then presenting the option after may still be useful. If the command does execute and usings are added, it should be very little overhead to determine that there are no missing usings that need to be added.


// Allow the pasted text to be inserted and formatted.
nextCommandHandler();

// Create a tracking span from the pre-paste caret position that will grow as text is inserted.
var trackingSpan = caretPosition.Value.Snapshot.CreateTrackingSpan(caretPosition.Value.Position, 0, SpanTrackingMode.EdgeInclusive);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -377,5 +377,12 @@ public static bool TryGetSurfaceBufferSpan(

return span;
}

/// <summary>
/// Determines if the textbuffer passed in matches the buffer for the textview. If it does
/// not, we assume that the textview is in the interactive window.
/// </summary>
public static bool IsBufferInInteractiveWindow(this ITextView textView, ITextBuffer textBuffer)
=> textBuffer != textView.TextBuffer;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this isn't accurate as per the method name. All this is saying is are we on the root buffer or not? Other examples that trigger this would be just a normal razor projection view.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the same hack that was used in inline parameter hints (where I got the code from), I just moved it to be shared so at least we're all being hacky in the same way. The name/comment came from there. Do you know a better way? Better name?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see above for better name.

note: this won't work for razor.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the previous comment (which you actually reviewed iirc :P) was wrong? That's fine. I just don't think a name like IsRootBuffer is meaningful to intent. Instead it just tells me what the line of code is, and acts like a needless comment. The intent of the code was to check that we weren't performing these actions on the interactive window. Again, is there a better way to check that we're in the interactive window?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, is there a better way to check that we're in the interactive window?

I'm not sure. @tmat may know.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so i'm ok with this helper. but we should just basically say "IsNotSurfaceBufferOfTextView" to at least be honest about what it is doing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IsNotSurfaceBufferOfTextView seems fine to me, I'll rename.

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ internal static class FeatureOnOffOptions
public static readonly Option2<int> UseEnhancedColors = new(
nameof(FeatureOnOffOptions), nameof(UseEnhancedColors), defaultValue: 1,
storageLocations: new RoamingProfileStorageLocation("WindowManagement.Options.UseEnhancedColorsForManagedLanguages"));

public static readonly PerLanguageOption2<bool> AddImportsOnPaste = new(
nameof(FeatureOnOffOptions), nameof(AddImportsOnPaste), defaultValue: true);
}

[ExportOptionProvider, Shared]
Expand Down Expand Up @@ -112,6 +115,7 @@ public FeatureOnOffOptionsProvider()
FeatureOnOffOptions.RefactoringVerification,
FeatureOnOffOptions.StreamingGoToImplementation,
FeatureOnOffOptions.NavigateToDecompiledSources,
FeatureOnOffOptions.UseEnhancedColors);
FeatureOnOffOptions.UseEnhancedColors,
FeatureOnOffOptions.AddImportsOnPaste);
}
}
10 changes: 10 additions & 0 deletions src/EditorFeatures/Core/xlf/EditorFeaturesResources.cs.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="cs" original="../EditorFeaturesResources.resx">
<body>
<trans-unit id="Add_Missing_Imports_On_Paste">
<source>Add Missing Imports On Paste</source>
<target state="new">Add Missing Imports On Paste</target>
<note />
</trans-unit>
<trans-unit id="Adding_missing_import_directives">
<source>Adding missing import directives...</source>
<target state="new">Adding missing import directives...</target>
<note>Used as a thread awaited dialog letting the user know that work is being done on paste. "import" is a language specific term</note>
</trans-unit>
<trans-unit id="An_inline_rename_session_is_active_for_identifier_0">
<source>An inline rename session is active for identifier '{0}'. Invoke inline rename again to access additional options. You may continue to edit the identifier being renamed at any time.</source>
<target state="translated">Relace přejmenování na řádku je pro identifikátor {0} aktivní. Pokud chcete získat přístup k dalším možnostem, znovu volejte přejmenování na řádku. Můžete kdykoli pokračovat v úpravách identifikátoru, který se přejmenovává.</target>
Expand Down
10 changes: 10 additions & 0 deletions src/EditorFeatures/Core/xlf/EditorFeaturesResources.de.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="de" original="../EditorFeaturesResources.resx">
<body>
<trans-unit id="Add_Missing_Imports_On_Paste">
<source>Add Missing Imports On Paste</source>
<target state="new">Add Missing Imports On Paste</target>
<note />
</trans-unit>
<trans-unit id="Adding_missing_import_directives">
<source>Adding missing import directives...</source>
<target state="new">Adding missing import directives...</target>
<note>Used as a thread awaited dialog letting the user know that work is being done on paste. "import" is a language specific term</note>
</trans-unit>
<trans-unit id="An_inline_rename_session_is_active_for_identifier_0">
<source>An inline rename session is active for identifier '{0}'. Invoke inline rename again to access additional options. You may continue to edit the identifier being renamed at any time.</source>
<target state="translated">Für den Bezeichner "{0}" ist eine Inline-Umbenennungssitzung aktiv. Rufen Sie die Inline-Umbenennung erneut auf, um auf zusätzliche Optionen zuzugreifen. Sie können den Bezeichner, der gerade umbenannt wird, jederzeit weiterbearbeiten.</target>
Expand Down
10 changes: 10 additions & 0 deletions src/EditorFeatures/Core/xlf/EditorFeaturesResources.es.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="es" original="../EditorFeaturesResources.resx">
<body>
<trans-unit id="Add_Missing_Imports_On_Paste">
<source>Add Missing Imports On Paste</source>
<target state="new">Add Missing Imports On Paste</target>
<note />
</trans-unit>
<trans-unit id="Adding_missing_import_directives">
<source>Adding missing import directives...</source>
<target state="new">Adding missing import directives...</target>
<note>Used as a thread awaited dialog letting the user know that work is being done on paste. "import" is a language specific term</note>
</trans-unit>
<trans-unit id="An_inline_rename_session_is_active_for_identifier_0">
<source>An inline rename session is active for identifier '{0}'. Invoke inline rename again to access additional options. You may continue to edit the identifier being renamed at any time.</source>
<target state="translated">Hay una sesión de cambio de nombre insertado que está activa para el identificador "{0}". Vuelva a invocar el cambio de nombre insertado para acceder a más opciones. Puede continuar editando el identificador cuyo nombre se va a cambiar en cualquier momento.</target>
Expand Down
10 changes: 10 additions & 0 deletions src/EditorFeatures/Core/xlf/EditorFeaturesResources.fr.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="fr" original="../EditorFeaturesResources.resx">
<body>
<trans-unit id="Add_Missing_Imports_On_Paste">
<source>Add Missing Imports On Paste</source>
<target state="new">Add Missing Imports On Paste</target>
<note />
</trans-unit>
<trans-unit id="Adding_missing_import_directives">
<source>Adding missing import directives...</source>
<target state="new">Adding missing import directives...</target>
<note>Used as a thread awaited dialog letting the user know that work is being done on paste. "import" is a language specific term</note>
</trans-unit>
<trans-unit id="An_inline_rename_session_is_active_for_identifier_0">
<source>An inline rename session is active for identifier '{0}'. Invoke inline rename again to access additional options. You may continue to edit the identifier being renamed at any time.</source>
<target state="translated">Une session de renommage inline est active pour l'identificateur '{0}'. Appelez à nouveau le renommage inline pour accéder à des options supplémentaires. Vous pouvez continuer à modifier l'identificateur renommé à tout moment.</target>
Expand Down
10 changes: 10 additions & 0 deletions src/EditorFeatures/Core/xlf/EditorFeaturesResources.it.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="it" original="../EditorFeaturesResources.resx">
<body>
<trans-unit id="Add_Missing_Imports_On_Paste">
<source>Add Missing Imports On Paste</source>
<target state="new">Add Missing Imports On Paste</target>
<note />
</trans-unit>
<trans-unit id="Adding_missing_import_directives">
<source>Adding missing import directives...</source>
<target state="new">Adding missing import directives...</target>
<note>Used as a thread awaited dialog letting the user know that work is being done on paste. "import" is a language specific term</note>
</trans-unit>
<trans-unit id="An_inline_rename_session_is_active_for_identifier_0">
<source>An inline rename session is active for identifier '{0}'. Invoke inline rename again to access additional options. You may continue to edit the identifier being renamed at any time.</source>
<target state="translated">Per l'identificatore '{0}' è attiva una sessione di ridenominazione inline. Richiamare nuovamente la ridenominazione inline per accedere alle opzioni aggiuntive. È possibile continuare a modificare l'identificatore da rinominare in qualsiasi momento.</target>
Expand Down
10 changes: 10 additions & 0 deletions src/EditorFeatures/Core/xlf/EditorFeaturesResources.ja.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="ja" original="../EditorFeaturesResources.resx">
<body>
<trans-unit id="Add_Missing_Imports_On_Paste">
<source>Add Missing Imports On Paste</source>
<target state="new">Add Missing Imports On Paste</target>
<note />
</trans-unit>
<trans-unit id="Adding_missing_import_directives">
<source>Adding missing import directives...</source>
<target state="new">Adding missing import directives...</target>
<note>Used as a thread awaited dialog letting the user know that work is being done on paste. "import" is a language specific term</note>
</trans-unit>
<trans-unit id="An_inline_rename_session_is_active_for_identifier_0">
<source>An inline rename session is active for identifier '{0}'. Invoke inline rename again to access additional options. You may continue to edit the identifier being renamed at any time.</source>
<target state="translated">識別子 '{0}' のインラインの名前変更セッションがアクティブです。追加オプションにアクセスするには、インラインの名前変更をもう一度呼び出します。名前を変更する識別子はいつでも引き続き編集できます。</target>
Expand Down
Loading