Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 333271 - XML perspective throws PartInitException for TemplatesView if no JDT installed
Summary: XML perspective throws PartInitException for TemplatesView if no JDT installed
Status: RESOLVED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.xml (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 3.3 RC1   Edit
Assignee: Nitin Dahyabhai CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-28 11:53 EST by Norbert Schöpke CLA
Modified: 2011-04-25 16:19 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Norbert Schöpke CLA 2010-12-28 11:53:45 EST
Build Identifier: 20100917-0705

Switching to the XML perspective throws a PartInitException because the TemplatesView is contributed by the jdt.ui plugin (which itself might be a bug). When developing RCP applications that include XML editing capability but not Java development tools, the TemplatesView never gets initialized. Strangely enough the TemplatesView itself is located in the o.e.ui.workbench.texteditor plugin, which may be a source of confusion here.

The XML perspective wasn't there in Ganymede, I've seen it first in Helios. I also never used the templates view, so I can't gauge how serious this problem is. On one hand the whole templates view never gets shown so a complete feature is broken. On the other hand there is no sign of this in the UI, no error message, just a nasty log entry every time the XML perspective is used.

Reproducible: Always

Steps to Reproduce:
1. Create target platform that includes Eclipse platform and WST XML feature
2. Create Eclipse application which uses that target platform
3. Open the XML perspective
Comment 1 Nitin Dahyabhai CLA 2010-12-31 04:12:07 EST
Can you append or attach the contents of that log entry?
Comment 2 Nitin Dahyabhai CLA 2010-12-31 04:59:17 EST
n/m, I see now that the org.eclipse.ui.texteditor.TemplatesView part comes from org.eclipse.jdt.ui.
Comment 3 Nitin Dahyabhai CLA 2010-12-31 05:08:10 EST
Moving to JDT since I'm really not sure why the view definition is there when the code is already in an agreeable place.
Comment 4 Norbert Schöpke CLA 2010-12-31 10:24:36 EST
Maybe simple code rot? The templates view was probably first developed for Java only. Then, judging from bug 277393 and some forum threads I read, people asked for it to be generalized. The code may have been moved, but the view definition was forgotten? Only speculating here, of course...
Anyway, it should be easy to fix.
Comment 5 Dani Megert CLA 2011-01-03 04:17:34 EST
The platform has the code for it but it does not want to surface it in the UI because most RCPs don't need such a view. If someone uses/refers that view it must make sure it's registered (e.g. by requiring JDT UI or by copying the view contribution from JDT UI).
Comment 6 Norbert Schöpke CLA 2011-01-04 11:27:03 EST
Requiring JDT UI isn't a good option imho, because most RCPs don't need or don't want to include JDT either...
Comment 7 Dani Megert CLA 2011-01-04 11:29:05 EST
(In reply to comment #6)
> Requiring JDT UI isn't a good option imho, 
Sure, in this case this wouldn't be the way to go.
Comment 8 Nitin Dahyabhai CLA 2011-04-25 16:19:08 EDT
Won't happen in RC1.