Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 128724 - "unsupported content type" when opening html and css files
Summary: "unsupported content type" when opening html and css files
Status: RESOLVED WORKSFORME
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.html (show other bugs)
Version: 1.5   Edit
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: wst.html CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard:
Keywords:
: 128725 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-02-20 16:54 EST by Thomas Arns CLA
Modified: 2010-04-28 15:21 EDT (History)
9 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Arns CLA 2006-02-20 16:54:23 EST
After installing WebTools 1.5M4 on eclipse 3.2M5 opening HTML and CSS files leads to a message box "unsupported content type" and changing the content type as suggested does not work.
Syntax highlighting does not work either ...
Comment 1 Nitin Dahyabhai CLA 2006-02-20 17:31:43 EST
Were there any other plugins installed as well?
Comment 2 Amy Wu CLA 2006-02-21 10:13:26 EST
*** Bug 128725 has been marked as a duplicate of this bug. ***
Comment 3 Thomas Arns CLA 2006-02-21 12:25:04 EST
sorry for double posting ... my laptop went to power save mode when saving the form :-(

Yes, I installed
- Eclipse 3.2M4 (not M5 as mentioned above!)
- emf sdo xsd 2.2.0M4
- gef 3.2M4
- jem 1.2M1
- tptp 4.1.0
- uml2 2.0M2
- ve 1.2M1
and finally wtp 1.5M4
Comment 4 Thomas Arns CLA 2006-02-22 04:04:32 EST
Now I find, that html and css files are displayed without any problem. no message box appears and syntax highlighting etc. works perfectly.
After changing the content type as suggested by the message box, there was no change. But maybe the restart of eclipse did it, so that today, the problem is gone.
Is it correct that the content type change works after restart or should it work immediately?
Comment 5 Amy Wu CLA 2006-02-22 10:48:58 EST
It should work immediately.
It seems funny that HTML & CSS were not initially associated with the HTML & CSS content type.  It may have been something funny with that particular session.

Could you somewhat test this theory (and check if the content type preference changes are effective immediately) by doing the following:
1. Rename your html/css file to another unsupported extension
2. Try opening the file in the HTML or CSS editor.  (You may need to associate the file extension with the editor)
3. You should get te "unsupported content type" messagebox and no highlighting
4. Update the Content type preference to include your extension
5. Reopen the file
6. There should be no messagebox and syntax highlighting

I'd be curious to read the results.  Thanks.
Comment 6 Amy Wu CLA 2006-03-28 18:11:42 EST
I was able to see someone else recreate this.  Here was what was written in the log:
Warning
2006-03-28 17:50:36.310
        Unexpected IDocumentProvider implementation: org.eclipse.ui.editors.text.TextFileDocumentProvider
Warning
2006-03-28 17:50:36.310
        Unexpected IDocument implementation: org.eclipse.jface.text.Document
Warning
2006-03-28 17:50:36.300
StructuredTextEditor being used without StructuredDocument

When the person restarted the workbench, everything was fine again.  I don't think this is really an issue with unsupported content type.  That dialog is thrown up when something goes wrong when trying to retrieve a structured document/model.  Anything could have caused the retrieving to fail.  The unsupported content type suggestion is just a guess.

I'm still unsure what is going wrong though.  And the fact that it's unpredictable doesn't help.
Comment 7 Bindul Bhowmik CLA 2006-04-16 04:12:23 EDT
I think I hit upon a related issue. I have XmlBuddy plugin installed with WTP 1.0.1. I am unable to open Xml files with the WST Xml Editor, here is what my log says:

<log-entry>

!ENTRY org.eclipse.wst.sse.ui 2 2 2006-04-16 01:55:17.00
!MESSAGE StructuredTextEditor being used without StructuredDocument

!ENTRY org.eclipse.wst.sse.ui 2 2 2006-04-16 01:55:17.00
!MESSAGE          Input Name: web.xml

!ENTRY org.eclipse.wst.sse.ui 2 2 2006-04-16 01:55:17.00
!MESSAGE         Unexpected IDocumentProvider implementation: com.objfac.xmleditor.XMLDocumentProvider

!ENTRY org.eclipse.wst.sse.ui 2 2 2006-04-16 01:55:17.15
!MESSAGE         Unexpected IDocument implementation: org.eclipse.jface.text.Document

</log-entry>

And on screen I see the 'Unsupported Content Type' message.
Comment 8 Jesse Kuhnert CLA 2006-04-17 12:29:12 EDT
The same problem appears to be happening with the latest 3.2rc1 release of eclipse combined with the 1.5m6 version of wtp. 

I do have two seperate installations of eclipse, and a ~slightly~ older version of wtp (built from one of the continuous integration releases on 03/30/06 ) didn't have this issue. The main difference as far as I can tell is that going to "Window->Preferences->Content Types" reveals that in the working version there is no "HTML File" content type associated with text documents, just "HTML". The broken version has both HTML and HTML File content types.
Comment 9 Nitin Dahyabhai CLA 2006-04-17 12:55:18 EDT
(In reply to comment #8)
> The same problem appears to be happening with the latest 3.2rc1 release of
> eclipse combined with the 1.5m6 version of wtp. 

Related to bug 107682?  Do you also have additional plugins in the "broken" installation?
Comment 10 Jesse Kuhnert CLA 2006-04-17 13:03:22 EDT
Hard to tell if my uses are related to bug 107682. The exceptions I see in the error log are similar to the ones referenced in previous comments on this bug, ie 

"!ENTRY org.eclipse.wst.sse.ui 2 2 2006-04-16 01:55:17.15
!MESSAGE         Unexpected IDocument implementation:
org.eclipse.jface.text.Document"

The plugins I have installed are:
-) WTP 1.5rc1 and related required dependencies (jem 1.2 / gef ..whichever ones were listed as the plugins used to build wtp 1.5rc1)
-) Subclipse 1.0.1
-) TestNG 4.7.0.0
-) Maven m2 (don't remmber version, latest)
-) JSEclipse 1.5.1
-) Checkstyle (latest)

It does at least sound plausible that this is related to the other bug that you mentioned, but I don't have enough knowledge about your dev API's to guess what might be happening. The only visible difference I could see as a dumb user was the addition of a new "HTML File" content type which seems to be at odds with the existing "HTML" content type. 
Comment 11 Amy Wu CLA 2006-04-17 16:33:55 EDT
The XML Buddy problem in comment #7 seems to have to do with Bug 107682 like Nitin says.  And I think bug 110530 is the spinoff which deals with document provider/content type conflicts in general.

The HTML vs HTML File problem in comment #8 seems to have to deal with the eclipse help system introducing their own HTML content type into 3.2 RC1: Bug 135107.  I'll try to look more into this one because it seems like it basically disables our HTML editor.
Comment 12 Ian Leslie CLA 2006-05-19 08:12:52 EDT
I am seeing this in 3.2 RC2 with WST 1.5.0.v200604030005-eaxV_ONMDPH-vnA when XML Buddy Pro 2.0.75 is installed too (first).  Here is the information from the error log:

!ENTRY org.eclipse.wst.sse.ui 2 2 2006-05-19 08:06:10.781
!MESSAGE StructuredTextEditor being used without StructuredDocument

!ENTRY org.eclipse.wst.sse.ui 2 2 2006-05-19 08:06:10.781
!MESSAGE          Input Name: test.html

!ENTRY org.eclipse.wst.sse.ui 2 2 2006-05-19 08:06:10.781
!MESSAGE         Unexpected IDocumentProvider implementation: com.objfac.xmleditor.XMLDocumentProvider

!ENTRY org.eclipse.wst.sse.ui 2 2 2006-05-19 08:06:10.781
!MESSAGE         Unexpected IDocument implementation: org.eclipse.jface.text.Document
Comment 13 Jeremy Hanna CLA 2006-06-02 11:13:59 EDT
I'm using RC6 on a Mac (PowerBook) with the JDK 1.5 and OS 10.4.6 and this is happening to me too - that I get the warning when opening up html files and no highlighting.  It works for other types like jsp files though.
I am using most of Callisto and XML Buddy as plugins.  I've also installed the Maven 2.0 and phpclipse plugins.
Comment 14 Lange Pantoja CLA 2006-06-27 06:28:23 EDT
I also encountered this problem. And I also have XML Buddy installed when this occured. I attempted to open an XML using the WST XML editor and the dialog popped out saying: "unsupported content type".

My logs also registered these:
<log_snippet>
!ENTRY org.eclipse.wst.sse.ui 2 2 2006-06-27 17:56:03.06
!MESSAGE StructuredTextEditor being used without StructuredDocument

!ENTRY org.eclipse.wst.sse.ui 2 2 2006-06-27 17:56:03.22
!MESSAGE          Input Name: example1.xml

!ENTRY org.eclipse.wst.sse.ui 2 2 2006-06-27 17:56:03.22
!MESSAGE         Unexpected IDocumentProvider implementation: com.objfac.xmleditor.XMLDocumentProvider

!ENTRY org.eclipse.wst.sse.ui 2 2 2006-06-27 17:56:03.22
!MESSAGE         Unexpected IDocument implementation: org.eclipse.jface.text.Document
</log_snippet>

When I uninstalled XML Buddy and restarted Eclipse, everything workedout fine. I was able to open up XML files without the errors, there was code highlighting, and the XML Outline's working.

My XML Buddy version is: 2.0.72
My Eclipse build is: Version: 3.1.2 Build id: M20060118-1600
Comment 15 Baptiste MATHUS CLA 2006-10-27 07:02:48 EDT
I just had this problem and found how to work around it.

I has justinstalled Eclipse 3.2, with "Together Designer Release 2". Because we are developing in a lot of classical web languages (jsp, xml, jsp, css, and so on), we installed wst, wtp in addition with the pre-installed update site.

The install went OK, but after installing, I got the same error as stated here. 

I put -clean in the eclipse.ini file (renamed Together.ini in my case) once and restarted eclipse => no problem anymore ! Wouhouuuu !!!

Then I removed -clean from the file, and now it works as expected.

Hope this helps.
Comment 16 Amy Wu CLA 2008-10-27 04:27:42 EDT
reassigning to inbox
Comment 17 Ian Tewksbury CLA 2010-02-01 09:48:08 EST
Vote to resolve.  This bug seemed to be prevalent in 06 but no siting of it since. It was spotty to reproduce back then and if it was occurring with any kind of regularity in the latest versions of WTP then it would not be a back burner bug for sure seeing as it destroys the user experience.
Comment 18 Nick Sandonato CLA 2010-04-28 15:21:00 EDT
Cannot reproduce in modern builds.