Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 181384 - "Unknown content type" message for IPathEditorInput instances
Summary: "Unknown content type" message for IPathEditorInput instances
Status: CLOSED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.xml (show other bugs)
Version: 1.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 2.0 RC0   Edit
Assignee: Nitin Dahyabhai CLA
QA Contact: David Williams CLA
URL:
Whiteboard:
Keywords:
: 169906 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-04-06 04:00 EDT by Alexander Gurov CLA
Modified: 2007-08-01 16:26 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Gurov CLA 2007-04-06 04:00:59 EDT
The Subversive users reported to us a bug in result of which Subversive cannot
open XML files in his Repositories View (in WTP environment) with the "Unknown
content type" message.
I investigated the problem and found that the reason of the problem is
additional constraints in the
org.eclipse.wst.sse.ui.StructuredTextEditor.setDocumentProvider() method:

...........
else if (input instanceof IStorageEditorInput && !(input instanceof
IFileEditorInput) && !(input instanceof IPathEditorInput)) {
        setDocumentProvider(StorageModelProvider.getInstance());
}
...........

The Subversive editor input implements not only IStorageEditorInput but IPathEditorInput interface also because it is
required for opening files with external editors (for example Subversive allows you to view pictures with the external viewers or view MS Word Document content in the MS Word etc.).

From my point of view these additional constraints is unreasonable and can be
easily removed from the code. Could you please remove it or tell me the reason for these contstraints and propose another acceptable solution which can solve the problem?

P.S.
>org.eclipse.team.internal.ccvs.ui.RemoteFileEditorInput works fine
Why it works with CVS?
With CVS it works because CVS have no functionaly which allows users to view repository documents with external tools and CVS RepositoryFileEditorInput do not implements IPathEditorInput interface.

>IPathEditorInput is really meant for files on the local filesystem.
We exported files content into temporary files on the file system in order to reduce memory usage and allow users to view files content with external tools.

>I'll need more concrete details on what kind of editor input is being used
Our editor input implements IAdaptable, IWorkbenchAdapter, IStorageEditorInput and IPathEditorInput interfaces.
Comment 1 Mike Youngstrom CLA 2007-04-12 13:17:21 EDT
In case it helps bump the priority of this issue it appears Subclipse has the same problem trying to view xml files from a SVN repository.

Mike
Comment 2 Nitin Dahyabhai CLA 2007-04-30 17:35:37 EDT
Fixed.
Comment 3 Nitin Dahyabhai CLA 2007-05-08 13:42:00 EDT
*** Bug 169906 has been marked as a duplicate of this bug. ***
Comment 4 Ali B. CLA 2007-05-12 15:25:50 EDT
Hi,

It is stated that this is fixed, but where can I find the fix?
Comment 5 Nitin Dahyabhai CLA 2007-05-13 13:52:00 EDT
As indicated in the target field, it would be in the 2.0 RC0 builds.
Comment 6 Ali B. CLA 2007-05-13 13:55:18 EDT
Ops.. sorry about that:)

pretty new to eclipse and bugzilla. Thank you
Comment 7 Nitin Dahyabhai CLA 2007-07-30 22:52:04 EDT
Alexander, could I get you to verify the fix asap?  If it is not working for you, I'd want to revisit it for 2.0.1.
Comment 8 Alexander Gurov CLA 2007-07-31 06:16:48 EDT
Checked with wtp-all-in-one-sdk-R-2.0-200706260303-win32.zip. The problem is disappear now.
Comment 9 John Lanuti CLA 2007-08-01 16:26:54 EDT
Verified, closing.