Giter Club home page Giter Club logo

docs's People

Contributors

achimstuy avatar bluetarpmedia avatar hefaistos68 avatar jamesc-skyward avatar madskristensen avatar mariasolos avatar martinjw avatar rickrat avatar ross-thanscheidt avatar shaggygi avatar shaneharper avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

docs's Issues

Documentation Request for Theme support

I'd like to request documentation that explains how my extension UI can match the VS Theme for a more consistent look and feel. Not just the Window Background and Foreground, but also controls like Buttons and TextBoxes.

Add Docs for making custom themes.

I would like a detailed document that documents (hopefully) all of the color options with an sample image of what the setting changes within the IDE.

My goal of this issue is to help people new to making Visual Studio themes understand and learn what each specific color option that is possible to be set easier.

For my theme, I needed transparency which sadly the theme designer for VS2022 lacked the ability to set a specific transparency value for all of the colors (excluding the document editor text) to be partially transparent which would be helpful for those who use ClaudiaIDE to expand a specific background image throughout the entire IDE.

For example I want to recolor this part but do not know where to look:
image

cc: @madskristensen

How to use Checkboxes for true/false in Tools Options Menu for your Extension

@madskristensen, @Rickrat, @bluetarpmedia, @shaneharper, and @martinjw:

Is it possible using the VsixCommunity/Community.VisualStudio.Toolkit to have checkboxes like the other Tools Options menus currently display, instead of a bool field? Also, I have multi-level menus that look like the other Code Style menus, but how do you get the options to be listed in each indented menu structure? Currently they all show up in the first option listed, not under each indented menu as expected. The following code is from my LinqLanguageEditor2022 Project, that I am working on to create documentation/walkthrough on how to create a Language Extension Editor to be add to the VSIX Cookbook, I have most of the project working correctly, but want to make sure I am using as much of the VsixCommunity/Community.VisualStudio.Toolkit as possible for the walkthroughs. Once I have the project correct, I will then create the walkthrough for the Editor using the Toolkit and upload it for @madskristensen review and release to the VSIX Cookbook.

Sample Package lines: (**Can this be shortened? **)

    [ProvideLanguageEditorOptionPage(typeof(Options.LinqOptionsProvider.LinqAdvancedOptions), Constants.LinqLanguageName, "", "Advanced", null, 0)]
    [ProvideLanguageEditorOptionPage(typeof(Options.LinqOptionsProvider.LinqCodeStyleOptions), Constants.LinqLanguageName, "", "Code Style", null, 0)]
    [ProvideLanguageEditorOptionPage(typeof(Options.LinqOptionsProvider.LinqCodeStyleOptions), Constants.LinqLanguageName, "", @"Code Style\General", null, 0)]
    [ProvideLanguageEditorOptionPage(typeof(Options.LinqOptionsProvider.LinqCodeStyleOptions), Constants.LinqLanguageName, "", @"Code Style\Formatting", null, 0)]
    [ProvideLanguageEditorOptionPage(typeof(Options.LinqOptionsProvider.LinqCodeStyleOptions), Constants.LinqLanguageName, "", @"Code Style\Formatting\Indentation", null, 0)]
    [ProvideLanguageEditorOptionPage(typeof(Options.LinqOptionsProvider.LinqCodeStyleOptions), Constants.LinqLanguageName, "", @"Code Style\Formatting\New lines", null, 0)]
    [ProvideLanguageEditorOptionPage(typeof(Options.LinqOptionsProvider.LinqCodeStyleOptions), Constants.LinqLanguageName, "", @"Code Style\Formatting\Spacing", null, 0)]
    [ProvideLanguageEditorOptionPage(typeof(Options.LinqOptionsProvider.LinqCodeStyleOptions), Constants.LinqLanguageName, "", @"Code Style\Formatting\Wrapping", null, 0)]
    [ProvideLanguageEditorOptionPage(typeof(Options.LinqOptionsProvider.LinqIntelliSenseOptions), Constants.LinqLanguageName, "", "IntelliSense", null, 0)]

Sample OptionsProvider lines:

        [ComVisible(true)]
        public class LinqAdvancedOptions : BaseOptionPage<Options.LinqAdvancedOptions> { }

        [ComVisible(true)]
        public class LinqCodeStyleOptions : BaseOptionPage<Options.LinqCodeStyleOptions> { }

        [ComVisible(true)]
        public class LinqIntelliSenseOptions : BaseOptionPage<Options.LinqIntelliSenseOptions> { }

Sample Options Settings:

Note: There is one class for each of the above listed BaseOptionPage's.

(These do not show up under each indented option but under the first option as a list.)

    public class LinqCodeStyleOptions : BaseOptionModel<LinqCodeStyleOptions>
    {
        [Category(@"General")]
        [DisplayName("Automatically format when typing")]
        [Description("Automatically format when typing.")]
        [DefaultValue(true)]
        public bool AutoFormatWhenTyping { get; set; } = true;

        [Category(@"General")]
        [DisplayName("Automatically format statement on ;")]
        [Description("Automatically format statement on ;.")]
        [DefaultValue(true)]
        public bool AutoFormatStatementOn { get; set; } = true;

        [Category(@"General")]
        [DisplayName("Automatically format statement on }")]
        [Description("Automatically format statement on }.")]
        [DefaultValue(true)]
        public bool AutoFormatBlockOn { get; set; } = true;

        [Category(@"General")]
        [DisplayName("Automatically format on return")]
        [Description("Automatically format on return.")]
        [DefaultValue(true)]
        public bool AutoFormatOnReturn { get; set; } = true;

        [Category("Indentation")]
        [DisplayName("Indent block contents")]
        [Description("Indent block contents.")]
        [DefaultValue(true)]
        public bool IndentBlockContents { get; set; } = true;

        [Category("Indentation")]
        [DisplayName("Indent open and close braces")]
        [Description("Indent open and close braces.")]
        [DefaultValue(true)]
        public bool IndentOpenCloseBraces { get; set; } = true;

        [Category("Indentation")]
        [DisplayName("Indent case contents")]
        [Description("Indent case contents.")]
        [DefaultValue(true)]
        public bool IndentCaseContents { get; set; } = true;

        [Category("Indentation")]
        [DisplayName("Indent case contents (when block)")]
        [Description("Indent case contents (when block).")]
        [DefaultValue(true)]
        public bool IndentCaseContentsInBlock { get; set; } = true;

        [Category("Indentation")]
        [DisplayName("Indent case labels")]
        [Description("Indent caselabels.")]
        [DefaultValue(true)]
        public bool IndentCaseLabels { get; set; } = true;

        [Category("New Lines")]
        [DisplayName("Place open brace on new line for types")]
        [Description("Place open brace on new line for types.")]
        [DefaultValue(true)]
        public bool OpenBraceOnNewLineForTypes { get; set; } = true;

        [Category("New Lines")]
        [DisplayName("Place open brace on new line for methods and local functions")]
        [Description("Place open brace on new line for methods and local functions.")]
        [DefaultValue(true)]
        public bool OpenBraceOnNewLineForMethods { get; set; } = true;

        [Category("Spacing")]
        [DisplayName("Insert space between method name and its opening parenthesis")]
        [Description("Insert space between method name and its opening parenthesis.")]
        [DefaultValue(true)]
        public bool InsertSpaceBetweenMethodNameOpenParenthesis { get; set; } = true;

        [Category("Spacing")]
        [DisplayName("Insert space within parameter list parentheses")]
        [Description("Insert space within parameter list parentheses.")]
        [DefaultValue(true)]
        public bool InsertSpaceInParameterlistParentheses { get; set; } = true;

        [Category("Wrapping")]
        [DisplayName("Leave block on single line")]
        [Description("Leave block on single line.")]
        [DefaultValue(true)]
        public bool LeaveBlockOnSingleLine { get; set; } = true;

        [Category("Wrapping")]
        [DisplayName("Leave statements and member declarations on the same line")]
        [Description("Leave statements and member declarations on the same line.")]
        [DefaultValue(true)]
        public bool LeaveStatementMemberDeclareOnSameLine { get; set; } = true;
    }

Please Provide Event Code Samples

@madskristensen; Please provide some code samples for the events used in the ToolKit. I tried to create some from the code in the ToolKit on GitHub, but nothing is working correctly, or the events fire five times per action. Specifically, Editor document opened/created, and Editor document closed/destroyed.

Suggested topic restructure

Right now the topics under Walkthroughs are focused on things like commands, tool windows, options, notifications. I'd suggest renaming this category to something like Extending the UI, and then using Walkthroughs for functional scenarios like:

  • How to customize the Editor margin?
  • How to build the solution?
  • How to add or remove a breakpoint?
  • How to nest files in Solution Explorer?
  • How to open a new text file in the Editor?
  • How to enumerate all files in a project?
  • How to intercept key strokes in the Editor?
  • etc

Add docs on how to automate publishing

A follow-up from here: VsixCommunity/Community.VisualStudio.Toolkit#267 (comment)

Some possible topics to cover:

  • How to set up a build pipeline for:
    • GitHub Actions
    • Azure Pipelines?
    • AppVeyor?
  • What to define in a publish.json manifest file (there's already good docs on this here, so maybe all we need to do is provide a link to that page.
  • How to create a personal access token (there's some docs on that here, so again, we may not need to document too much on this).

Let me suggest the additional topics for documentation

from my experience, I think it would be cool to highlight the following topics:

  1. in-text adornments (adding a controls, borders, etc; additional under-the-hood aspects like a reusing adornment controls)
  2. custom codelenses (example; aspects related with out-of-process execution; any ideas how to automate attaching to servicehub of exp-VS - new VSIX?; duplex datafrom from codelens and host-VSIX? streamjsonrpc? etc etc etc a lot of details are not covered at all)

I implemented both features in the different VSIXes, but it was painful :)

Second topic relates with https://github.com/MicrosoftDocs/visualstudio-docs/issues/6509

Thanks you!

Threaded Wait Dialog example: compiler warning for statement that calls Dispose on object returned by ThreadedWaitDialogHelper.CreateInstance

Regarding
(twd as IDisposable).Dispose();
from the Threaded Wait Dialog example:

  1. The compiler outputs:

     warning CS8602: Dereference of a possibly null reference.
    

    What should be done to get rid of that warning?

  2. Until I saw the example code it had never occurred to me that there could be a need to call Dispose for the object returned by ThreadedWaitDialogHelper.CreateInstance(IVsThreadedWaitDialogFactory). Could a comment be added to the example explaining the need for it? Perhaps the best place to mention it would be in the documentation for CreateInstance.

Connected Services creation and migration to 2022

Could you add some documentation on creating Connected Services?
Now there is no understanding of how to translate an existing connected service to 2022. And all the previous documentation is outdated long ago.

Researching the Custom Editor Walkthrough Solution

Researching the Custom Editor Walkthrough Solution

I am including Leslie Richardson and Mads
Kristensen
in this question since they are the best resource
for Extending Visual Studio 2022.

Hi Leslie, my name is Danny McNaught
I have been a developer for over 25 years, but this is the first time I am
creating an Editor Extension for Visual Studio. So, when I offered to contribute
to Mads Kristensen’s VSIX Cookbook; a complete
‘Walkthrough’ on how to include a Language Editor in a Visual Studio 2022
Extension. I found documentation that sends you everywhere but the right place.
I can create the Editor Extension using the LanguageFactory using Mads examples
and it works great. The issue that I am finding is that the current available
MEF documentation
dated 11/06/2021 does not provide any examples/walkthroughs on how to add syntax
coloring (CSharp file like code coloring) using MEF, there are examples for
legacy language services using IScanner, Colorizer… But they do not provide
information on using the IScanner or Colorizer in MEF. The Legacy Language
Services documentation also states:

image

Then on top of that when you follow the Managed Extensibility Framework
(MEF)
and to the Next
steps

section the included link for: For more information and code examples, see
Managed Extensibility Framework

This link takes you to GitHub where the Readme.md states:

MEF

This project has been migrated from CodePlex and isn't actively maintained.
It's provided for archival purposes only.

You can find the original wiki home page
here.

Replaced by
CoreFx

If you're looking for the current MEF code base, you should go to
CoreFx.

This CoreFx link then takes you to another broken GitHub page that states:

Going forward, the .NET team is using
https://github.com/dotnet/runtime to
develop the code and issues formerly in this repository.

Please see the following for more context:

dotnet/announcements#119 "Consolidating .NET GitHub
repos"

Now that we are at the currently supported GitHub site, but remember I wanted
information on MEF and Visual Studio 2022. I was dropped at the root of the
dotnet/runtime site.

I am still using these documents no closer than I was to getting the CSharp
syntax highlighting I am wanting for the walkthrough in the VSIX Cookbook.

The walkthrough: VSIXLinqLanguageEditor2022 (Sample code is located
here
)

Once I get the code to work as expected then
I will create the documentation on how to do it
for the VSIX Cookbook). I have tried many things, so the sample project has a lot of
extra stuff that would be removed once I get it working correctly. (i.e.
LinqEditorLightBulb.cs, etc.)

The Walkthrough I am creating for the VSIX Cookbook is as follows:

  1. Visual Studio 2022 Extension

  2. Language Editor using the LanguageFactory from the
    Community.VisualStudio.Toolkit.LanguageBase.

  3. ToolWindow allows you to select a line of LINQ code from your open CSharp
    file, select a method that contains a LINQ query, or open a .linq file.

  4. The ToolWindow command then opens your selection in a new Editor window
    where you can modify/test it and get and display query results from the LINQ
    query inside of Visual Studio. (Note: Currently works using LinqPad’s
    “LPRun7-x64.exe, and LINQPad.Runtime.dll”)

  5. The new Editor window with the file extension .linq instead of .cs contains
    you code. This still works as expected and allows you to get the results of
    the query in the ToolWindow or a Dump Window based on Options settings for
    the linq Text Editor.

  6. What does not work is the code syntax colorization of the code.
    Test.cs file looks like this:
    image
    So, if I select the private static void method above and click the
    image button the new editor will
    display the private static void method and the ToolWindow will display the
    results.
    image)
    But the new editor window does not have any syntax colorization.

    NOTE: I have noticed that if I take a CSharp (.cs) file in the solution copy
    it back in the solution and rename the extension to (.linq) all the
    colorization remains, but only if my sample extension is installed. This does not work if I open a .linq file or create
    the .linq file from the selection with or without the extension installed.

    My questions are:

    How to you get CSharp style colorization to work in MEF and Visual Studio
    2022 Editor extension?

    Can you use IScanner and IVsColorizer in a MEF Extension? If so, how do you,
    [Import] [Export] IScanner and IVsColorizer in your MEF package?

    Do you currently have documentation on using MEF package to colorize your code?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.