Create a code Generator Addin for Visual Studio [closed] - c#

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
So I understand this may appear to be a strange question but I couldnt really find any information on this (maybe I was searching for the wrong thing)
I have a selection of code snippets ive created in visual studio. The snippets work great but what I want to do is to build some sort of code builder addin that will create the .CS files in the project based on several inputs.
Its for use with Selenium in C# to essentially build up a page object model. So for example the user would choose and object they want to add to the page from a dropdown, then click add, and it would add it to the c# code.
Can I create an addin for this and if so wheres the best place to read on up on how to do this, any useful tutorials are articles would be helpful.
Any help would be much appreciated.

Your question is off topic for asking for tutorials, however there are two ways to do what you are looking for.
COM based plugins and T4 code template generators.
The COM plugin kind is if you want a code generator that you expect to use over and over again across all projects you write. They might be "easier" to write as you are just writing C# code but the plugin must be "installed" in to visual studio and if you give the project to someone else the plugin does not travel with the project. The recipient would also need to "install" your plugin to get it to compile on his machine.
The T4 style lets you write the code generation code right inside your project but has a odd syntax, It is fairly similar to how ASP.NET .cshtml pages are generated, you just are generating compliable code instead of a web page. The editor for T4 templates built in to visual studio is not very good, I don't think it even does code highlighting, but there are plugins for visual studio you can get that add more features to the T4 Editor. I have used this one in the past, but a lot of the features are restricted if you do not use the paid version. There are other fully free ones out there.

Related

A C# Equivalent of the ACE syntax highlighter [duplicate]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I want create my own IDE but I want a code editor that would
syntax highlighting.
I want to embed it as a control into a WPF window.
Malcolm
The Sharp Develop IDE has a great code editor that can be used in your programs relatively easily (it does require a little bit of work to figure out how it works, and it doesn't have "plug and play" documentation). If you look at the source for Kaxaml you can see how to embed it in WPF.
If you do not mind having no documentation whatsoever, AvalonEdit is a good choice. I am currently using for a project, and it is a great tool. I have not encountered a single bug even in complex scenarios.
You can find its source at svn://svnmirror.sharpdevelop.net/sharpdevelop/trunk/SharpDevelop/src/Libraries/AvalonEdit.
Another option is Scintilla.NET (UPDATED https://github.com/jacobslusser/ScintillaNET).
It is a .NET 2.0 wrapper around the Scintilla Native Control. We have successfully used to display/edit HLSL, XML, Text, and other internal scripting languages. It is easy to write a language description file for your own language if needed.
I'm currently hosting the WinForms control in our WPF applications. The only difficulty was getting a WPF context menu to activate when clicking within the control; solved it by listening for a MouseRightButtonDown event on the WinFormsHost and then setting the ContextMenu visible (ContextMenu.IsOpen = true) :/
I have been in contact with Actipro Software re: SyntaxEditor and the WPF version is being actively developed and will available soon. For the time-being we will continue to use Scintilla.NET

Is there a tool to analyse if a C# and WPF project can be ported to Silverlight? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I have a WPF and C# application, and I want to know if it can be ported to silverlight. Is there a tool to analyse the dependencies and tell me what I can't use, and what I can ?
Thanks.
As far as I know there is not. The best way to find out is to create a Silverlight project and copy your code across, then start analysing all the build errors. It is not a great solution, but I don't know of any better way.
As an aside, there is a nice white paper that details the differences between WPF and Silverlight here:
http://wpfslguidance.codeplex.com/Release/ProjectReleases.aspx
I have not seen such tool, but there is WPF compatibility list on MSDN which i use.
I've just remembered that when I tried to port a C# app to Linux/Mono I used Moma analyser, it helps to identify issues you may have when porting a .Net application to Mono, and I know that Mono only implement Silverlight not WPF, so I will give it a try.
And you can see and change the data for what Moma consider to be implemented or not. In the Definition directory there is a 2.8-4.0-defs.zip file, inside there are 4 text files exception.txt, missing.txt, monotodo.txt, and version.txt, it is 3 lists of functions that will produce errors. So maybe someone can scrape the info about what Silverlight implements, and change the files accordingly.

Open Source C# Syntax Editor with Intellisense [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
Can anyone please suggest me a good open source C# code editor control with syntax highlighting and intellisense to use in my application. I am not asking for any IDE like VS or #develop, I need only a winform code editor control so that I can use it in my application for scripting.
Can you please suggest me a good one ...
I found ScintillaNET, but I want some other alternative..
Sounds like you want something like Avalon Edit:
http://www.codeproject.com/KB/edit/AvalonEdit.aspx
The editor for SharpDevelop, but its also a component you can download and use on your own stuff.
It is possible to host #Develop in your application,
http://laputa.sharpdevelop.net/AnnouncingSharpDevelopForApplicationsSDA.aspx
Wpf Source Code Editor is an alternative for ScintillaNET
I used the SharpDevelop code to do this a while back. Another alternative might be to take a look at the code for MonoDevelop and see if you can pull out the part you need and reuse that. Technically MonoDevelop is a fork of SharpDevelop but its been a long time so they might be completely different now.
After considering all the options I decided to go for ScintillaNet, cause it is very easy to use.

How do i get visual studio like tabs? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I've been thinking for a while in my head and I've not been able to find the solution to it ! Please help me.
I've always loved the visual studio tabs and how they look. They're small and perfect. The normal .NET TabControl, well is plain and boring! I've seen these tabs being used in many applications. My question is:
Is there a DLL that is available that has this kind of tabcontrol?
Here's a picture for reference:
You need "DockPanel Suite by mtwombley, spudcud, weifenluo".
It's an awsome open-source project, and you can get it at http://sourceforge.net/projects/dockpanelsuite/
I was looking for the same thing. A tab control with VS-like tabs.
DocPanel Suite is great, but it's like filling a hole with a bulldozer. Here is an extension of the existing tab control that does what I was looking for:
http://www.codeproject.com/Articles/91387/Painting-Your-Own-Tabs-Second-Edition
found this googling
http://www.freevbcode.com/ShowCode.asp?ID=3266
Telerik has a great TabStrip product whether you are looking for WinForms, WebForms, WPF, Silverlight, or MVC. All of these tabs can be customized and they come with some great default styles, you can find many more (including some VS templates) online, or you can create your own, which isn't that hard. They even provide a tool to help you create your own. Some of their products cost money and some are free, so it depends on what you're looking for.

Are there good tools for C# reverse engineering? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
can you say me if there are good tools for reverse-engineering my C# applications. I need UML-class-diagrams of my written software and i don't want to draw these diagrams by myself. I've already tested StarUML but it didn't work because I used generics an something.
Would be great if there a some advices.
Greetings,
Martin
Have you checked out .NET reflector? Has a diagram plugin too..
List of Add-Ins
Coincidentally enough a colleague of had a meeting with some MS guys regarding Visual Studio 2010 team foundation server. They told him that it has the ability to reverse engineer your assemblies and produce UML diagrams. A quick look on MSDN (link text) seems to partially confirm this. It doesn’t say UML but it confirms architectural diagrams can be derived and your code which can be validated against at compile time. But it’s obviously not available yet and I’m sure it will carry a hefty price tag.
Altova UModel
Sparx enterprise architect is very good. I use it at my work.
ILSpy looks alot like Reflector.
http://wiki.sharpdevelop.net/ILSpy.ashx
I've used it many times and it's very handy.
There's also dotPeek(Creators of Resharper)
http://www.jetbrains.com/decompiler/index.html?topDP
They Are both free :D
The NDepend tool is certainly what you are looking for C# code reverse engineering. NDepend comes with a dependency graph coupled with a dependency matrix. You can try NDepend straight on your code thanks to a Free Trial Edition. As a picture is worth a thousands words, see NDepend's screenshoots extracted from this blog post: Interactive Code Dependencies Graph
alt text http://codebetter.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/patricksmacchia.Graph/InternalDependenciesGraphSmall2.jpg
alt text http://codebetter.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/patricksmacchia.Graph/CycleGraphSmall2.jpg
alt text http://codebetter.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/patricksmacchia.CQLExport/Graph1.jpg
Visual Studio 2010 Ultimate supports UML class diagrams as well as sequence, component, use case, and activity diagrams. It also supports creating sequence, dependency graphs, and layer diagrams from code. Regarding your question about generating UML diagrams from code, there's a response here in the VS Architecture & Modeling tools forum: Is it possible to reverse engineer C# code into an UML Class Diagram?
Other tools include Architecture Explorer, which lets you browse and explore your solution.
For more info, see the following links:
To download the RC release, visit: Microsoft Visual Studio 2010 Ultimate RC
To see the RC documentation, see Modeling the Application.
To discuss these tools, visit the Visual Studio 2010 Architectural Discovery & Modeling Tools forum.

Categories

Resources