Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / Extensibility / December 2004

Tip: Looking for answers? Try searching our database.

Extending the DocData

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bernard - 09 Dec 2004 07:01 GMT
Hi there
I an so confused and lost its not even funny - maybe someone here can help me.
I have created a new VSPackage with a custom editor. The thing I am trying
to do is to have my editor connect to a web service, extract data from the
webservice (which will be C# code), edit the code and then when you save the
document, push it back to the webservice.
So my question is this:  How can I make use of the built-in C# editor in
visual studio (for its intellisence and the likes) and then just override the
persistency object for the editor so that it won't save to a file but call my
webservice?
Regards,
Bernard
Himo - 09 Dec 2004 07:49 GMT
You can use a custom tool, which will fire at the point where the user will
press the savebutton. It implements the BaseCodeGeneratorWithSite interface
and you need to override the method GenerateCode in your childclass to make
it work. Then if you registered the dll, just add the ProgID of the
generatordll to the custom tool property of the desired file. You can find
the basegenerator on the internet really easy.

> Hi there
> I an so confused and lost its not even funny - maybe someone here can help me.
[quoted text clipped - 8 lines]
> Regards,
> Bernard
Bernard - 10 Dec 2004 06:41 GMT
Thanks, Himo.
Not that I am 100% sure what you mean, but at least you have given me a new
direction to look into. I will definately go and read up on those interfaces.

> You can use a custom tool, which will fire at the point where the user will
> press the savebutton. It implements the BaseCodeGeneratorWithSite interface
[quoted text clipped - 15 lines]
> > Regards,
> > Bernard
Himo - 10 Dec 2004 08:15 GMT
I will make it even more clear to you:
A possible implementation of this interface would be:

using System;
using System.Runtime.InteropServices;
using CustomToolGenerator;

namespace Generator

{
    /// <summary>
    /// Summary description for Class1.
    /// </summary>
    [ProgId("Generator")]
    [Guid("53CAA492-A11B-4e52-B4DB-D1A248CE26EE")]
    public class TemtecRDLGenerator: BaseCodeGeneratorWithSite  
    {
        public TemtecRDLGenerator()
        {
            System.Windows.Forms.MessageBox.Show("Tool started");       
        }

        protected override byte[] GenerateCode(string inputFileName, string
inputFileContent)
        {
            System.Windows.Forms.MessageBox.Show("Saving...!");

            return null;
        }

    }
}
Bernard - 10 Dec 2004 10:11 GMT
Himo

I understand now much better what you are telling me, but I think that I
didn't explain my situal well enough. My problem is as follows:

Somewherein visual studio I want to click on a menu item or a toolbar
button, or any other place. This click must open up a properties window where
you specify a URL and credential information.  Once you close the window, my
utility must connect to a web service and extract C# code from it (the
webservice part I can do). This code that is extracted must then be placed in
a C# code editor where you can modify the code.  Then, once you click on
save, the editor must again connect to the webservice and send the modifed
code to this webservice.

Right now I am able to create a new visual studio package with a custom
editor.  The only problem is that this editor seems to be file-bound - you
can only persist the data from the editor to a file. I just can't figure out
how to change it so that I can, for instance, just save a stream to a
repository or anything like that...

> I will make it even more clear to you:
> A possible implementation of this interface would be:
[quoted text clipped - 28 lines]
>     }
> }

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.