CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > visual_studio.visual_studio_2008 Tags:
Item Type: NewsGroup Date Entered: 1/29/2008 7:05:20 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 4 Views: 59 Favorited: 0 Favorite
5 Items, 1 Pages 1 |< << Go >> >|
Dermot Hogan
Asp.Net User
VS 2008 HTML Editor and Document Outliner bug?1/29/2008 7:05:20 PM

0

Hi,

I have an HTML Editor embedded in a text editor and I'm trying to get the Document Outliner to work with both my custom text editor and the HTML Editor. I start off in my text editor and display my document outline in the Document Outline window. This works and I see my document outline displayed. I then switch to the HTML Editor  - and the HTML Document Outline is not displayed. This works in VS 2005

The way I do this is to multiplex the Document Outliner by getting the IVsDocumentOutlineProvider interface from the HTML Editor and calling the HTML Editor on that interface if its frame is visible. If it isn't visible, I call my document outliner.

 I just dont get a GetOutline call from VS2008 as the HTML Editor frame is activated. However, I can get the outline displayed by its only after some switching back & forwards between the Document Outline and the HTML Editor. And I do then see the GetOutline call from VS 2008 and I call into the HTML Editor and get the outline to display. But this is prettty clunky to do and I don't get the correct logical view displayed.

As I've said, this works fine in VS2005 - so I guess something has changed in VS2008. Is it a bug?

 

Dermot

Mikhail Arkhipo
Asp.Net User
Re: VS 2008 HTML Editor and Document Outliner bug?1/29/2008 10:13:27 PM

0

I don't think this ia a bug since behavior can change between versions. We do not guarantee backward compatible behavior of the editor via VSIP interfaces. HTML outline implementation changed significantly in 2008. I guess I could help you to find a solution if you provide more information on what exactly are you trying to do with the HTML editor and document outline.


Thanks

------------------------------------------------------------

This posting is provided "AS IS" with no warranties, and confers no rights.
Dermot Hogan
Asp.Net User
Re: VS 2008 HTML Editor and Document Outliner bug?1/29/2008 10:56:10 PM

0

Thanks!.Yes, I appreciate behaviour isn't guaranteed. But it sure looks like a bug to the end user!

This is what I'm doing. I have a multitabbed editor which can switch between the HTML Editor and the core text editor. The core text Editor is wrapped in my editor object which implements IVsOLeCommandTarget, IVsCodeWindow, IVsDocOutlineProvider, etc. To switch, I first get the HTML Editor's frame and code window interfaces like this:

logical = new Guid(LogicalViewID.Primary);
ErrorHandler.ThrowOnFailure(uiShellOpenDocument.OpenSpecificEditor(0, htmlFileName, ref GuidList.guidHTMLEditor, null, ref logical, editorCaption.Caption(), pIVsUIHierarchy, itemId, docData, serviceProvider, out htmlFrame));
ErrorHandler.ThrowOnFailure(htmlFrame.SetProperty((int)__VSFPROPID2.VSFPROPID_ParentFrame, _frame));
ErrorHandler.ThrowOnFailure(htmlFrame.SetProperty((int)__VSFPROPID2.VSFPROPID_ParentHwnd, htmlControl.Handle));

object o;
r = htmlFrame.GetProperty((int)__VSFPROPID.VSFPROPID_DocView, out o);
htmlCodeWindow = (IVsCodeWindow)o;
htmlDocOutlineProvider = (IVsDocOutlineProvider)htmlCodeWindow;

 I then show the frame (selecting the design/source view as required by the user) and the HTML Editor appears. Next, I implement the IVsDocumentProvider like this:

int IVsDocOutlineProvider.GetOutline(out IntPtr phwnd, out IOleCommandTarget ppCmdTarget) {

   if (htmlFrame != null) {
      int r;
      r = htmlDocOutlineProvider.GetOutline(out phwnd, out ppCmdTarget);
      return r;
   } else {
      // do my stuff
     ppCmdTarget = this;
     phwnd = outliner.Handle;
     outliner.Refresh();
  }
 

and similarly for the other parts of the IVsDocOutlineProvider interface. When the HTML Editor is closed, I set the htmlFrame to null and this allows me to display my Outliner rather than the HTML one.

It all works rather nicely in VS2005 but not in VS2008!

 

Dermot 

 

Mikhail Arkhipo
Asp.Net User
Re: VS 2008 HTML Editor and Document Outliner bug?1/31/2008 12:52:32 AM

0

I think the reason is that HTML editor no longer provides separate outline for Source and Design views. In VS 2005 views were completely separate and each provided its own outline implementation. In VS 2008 both parts are working together (hence Split view is possible) and Document outline is driven by Source view (even if you are in Design view) Source is synchronized from Design all the time (no difference from Split view) so it is possible to have single implementation. Therefore GetOutline is called only once for all views. GetOutline does get called each time editor frame is activated when I click on the file tab in the IDE.


Thanks

------------------------------------------------------------

This posting is provided "AS IS" with no warranties, and confers no rights.
Dermot Hogan
Asp.Net User
Re: VS 2008 HTML Editor and Document Outliner bug?1/31/2008 9:19:02 PM

0

OK. That explains why the behaviour is different between VS2005 & VS2008. But it doesn?t explain why it doesn?t work in VS 2008. I?ve done some careful experiments on the HTML Editor and this is what I get:

a) If I open the HTML Editor in the primary logical view, I do get a call to GetOutline (which I route through to the HTML Editor and get a return status of zero. In fact both ReleaseOutline and GetOutline always succeed). If I open the HTML Editor in the Design view (or switch to the Design view before displaying the window), I do not get any such call. The Document Outline window is blank.

b) On the other hand, opening the HTML Editor with the primary view, I get the the initial GetOutline call from VS (and pass it through to the HTML Editor) but the Document Outline window is completely blank. If I click in the HTML text, I do not get anything displayed in the Document Outline window.

c) Now if I then click on the Document Outline tab itself, I get a single ?document? node displayed in the Document Outline (this is the name of my file). There is no outline tree. If I click on the this single document node, all of the text in the Source panel is highlighted but no tree is displayed in the Document Outline window. To get any sort of non-blank Document Outline, I always have to click on the Document Outline tab.

d) If I then click on the Split/Design tab in the HTML Editor or in the HTML text, I get the correct tree displayed in the Document Outline. Once I get the full tree (by the above procedure) everything is ok (we are ?synched?) until I move out of the HTML Editor ? at which point we?re back to square one.

It looks to me as if something is not being synchronized correctly.

Dermot

5 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Refactoring HTML: Improving the Design of Existing Web Applications Authors: Elliotte Rusty Harold, Pages: 340, Published: 2008

Web:
VS 2008 HTML Editor and Document Outliner bug? - ASP.NET Forums Hi,. I have an HTML Editor embedded in a text editor and I'm trying to get the Document Outliner to work with both my custom text editor and the HTML Editor ...
Cascading Style Sheets The AH Formatter lays out XML and (X)HTML documents for print or PDF. ... 2008- 12-04 SyncRO Soft released version 10 of the XML Editor and XSLT Debugger, which includes .... The CSS Pointers Group documents CSS bugs in major browsers. .... with a GUI based on GTK2, syntax highlighting, outline view, etc. ...
HTML editor, freeware HTML editor Added support for embedded FreeMarker/HTML editing; [February 11-2008] ... Fixed HTML, XML, and Java documents after saving bug. [April 07-2006]; WebTide 1.3 released. [Bug fix] Fixed CSS outline. Fixed PHP editor/HTML editor syntax ...
TSW • View topic - WC09 final beta 4 bugs Related to the above, in a PHP file with HTML highlighter the && gets marked as a ... KasperTSW: Site Admin: Posts: 1159: Joined: Mon Jan 28, 2008 5:55 pm ... I 've found an extra step which is causing the document outline issue, ... but all other non-editor apps I've looked at use the last search. ...
HTML editor - Wikipedia, the free encyclopedia Adobe GoLive provides an outline editor to expand and collapse HTML objects ... Instead of focusing on the format or presentation of the document, ... Wide Web would need re-coding to suit the new bugs and the new fixes. ... Hidden categories: Articles to be expanded since June 2008 | All articles to be expanded ...

VS 2008 problem - Negating the minimum value of a twos complement ... How do you select multiple hyperlinks - ng.asp-net-forum ... vs 2008 html editor and document outliner bug? vs 2008 problem - negating the ...






copy website -> ftp very slow

where is asp:history control?

which is better . vs08 professional or visual studio team system 2008 team suite ??

vs2008 (trial) without xml schema 'designer' support?

vs2008 hangs intermittently on vista

how to install visual studio 2008 on fresh install of vista 32bit?

vss with visual studio 2008

access to reource object

building asp.net 2.0 with visual studio 2008

visual studio 2008 beta 2-linq?

subversion and web site (not web application)

performance hotfix is available

data access layer in vs 2008

vs2008 beta 2 master pages and iis6

system.data.entity failed to load in orcas ctp

use custom web server option is greyed out in project property pages

datapager and linqdatasource - where does it get the number of total pages.

"resetting" visual studio to different configurations

problem with asp.net development server in visual studio 2008 pro.wrong ports

zoom out in html design mode

_default instead of default in vs2008 beta2

how to change column bg color?

web application deploy

linq to entities framework for asp.net framework 3.5

web.config excluded from project causes debugging not enabled dialog to appear

choose items crashing visual studio 2008

dissapointed in vs 2008

vs08 is very slow

help with solution directory

ide smart code analyzer stopped working after vs2008 installation

   
  Privacy | Contact Us
All Times Are GMT