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 / IDE / March 2005

Tip: Looking for answers? Try searching our database.

Losing indent and other features when handling LineChanged

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ralf Berkvens - 22 Mar 2005 08:49 GMT
Hi,

I've been trying to make an add-in in VS.NET 2003 using Visual Basic. This
add-in should add a comment block to functions among other things. I'm
coding it in VB.Net.

This is a snippet of the code, starting in the OnConnect Sub:
--------------------
 objTextEvents = New TextEvents
 objTextEvents.objApp = applicationObject
 objTextEvents.objTextEvents = applicationObject.Events.TextEditorEvents

End Sub
End Class

Public Class TextEvents
Public WithEvents objTextEvents As TextEditorEvents
Public objApp As EnvDTE.DTE

Public Sub LineChanged(ByVal StartPoint As TextPoint, ByVal EndPoint As
TextPoint, ByVal Hint As Integer) Handles objTextEvents.LineChanged
 Dim objSelection As TextSelection = objApp.ActiveDocument.Selection

 Dim objStartEdit As EditPoint = StartPoint.CreateEditPoint
 Dim objVElement As CodeElement =
objStartEdit.CodeElement(vsCMElement.vsCMElementOther)
----------------------

The very last line in the snippet causes all the things that VS normally
does on a newline (indent, adding 'End Function' or 'End Sub' to not work
anymore.

Is there a way around this? Or can this only ever work in C#?

Ralf
Elena Arzac [msft] - 30 Mar 2005 01:46 GMT
Hi Ralf:
I can not repro your problem, can you give me a complete repro scenario?
Maybe it is something that you have in your code somewhere else that is
causing this?

Thanks,

Elena Arzac
Microsoft Visual Basic
This posting is provided "AS IS" with no warranties, and confers no rights
--------------------
>>>From: "Ralf Berkvens" <ralf@stack.nl>
>>>Subject: Losing indent and other features when handling LineChanged
[quoted text clipped - 8 lines]
>>>NNTP-Posting-Host: 213.160.202.226
>>>Path:
TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP1
2.phx.gbl
>>>Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.vsnet.ide:15544
>>>X-Tomcat-NG: microsoft.public.vsnet.ide
>>>
>>>Hi,
>>>
>>>I've been trying to make an add-in in VS.NET 2003 using Visual Basic.
This
>>>add-in should add a comment block to functions among other things. I'm
>>>coding it in VB.Net.
[quoted text clipped - 28 lines]
>>>
>>>Ralf

Rate this thread:







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.