This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 202690 - Unable to add xml catalog entry due to missing icon from common dialog
Summary: Unable to add xml catalog entry due to missing icon from common dialog
Status: CLOSED FIXED
Alias: None
Product: WTP Common Tools
Classification: WebTools
Component: wst.common (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.0 M2   Edit
Assignee: David Williams CLA
QA Contact: Konstantin Komissarchik CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-07 16:35 EDT by Amy Wu CLA
Modified: 2007-10-02 17:01 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Amy Wu CLA 2007-09-07 16:35:56 EDT
WTP 3.0 Sept 7 2007 build (this does not happen in wtp 2.x)

1. go to xml catalog preference page
2. click on Add.. button
3. In Add XML Catalog Entry dialog box, click on the Location button
4. Select Workspace..
5. Get the below exception and you're unable to add an entry from workspace
6. Looks like SelectSingleFileDialog needs to handle image lookup better.

I'm marking this major because users are unable to add workspace files to the XML Catalog.

org.eclipse.jface.resource.DeviceResourceException: Unable to create resource FileImageDescriptor(location=class org.eclipse.wst.xml.ui.internal.catalog.EditCatalogEntryDialog$FilterableSelectSingleFileDialog, name=saveas_wiz.png)
at org.eclipse.jface.resource.ImageDescriptor.createResource(ImageDescriptor.java:167)
at org.eclipse.wst.common.ui.internal.dialogs.SelectSingleFileDialog.getSaveAsImage(SelectSingleFileDialog.java:100)
at org.eclipse.wst.common.ui.internal.dialogs.SelectSingleFileDialog.create(SelectSingleFileDialog.java:84)
at org.eclipse.wst.xml.ui.internal.catalog.EditCatalogEntryDialog$FilterableSelectSingleFileDialog.createAndOpen(EditCatalogEntryDialog.java:436)
at org.eclipse.wst.xml.ui.internal.catalog.EditCatalogEntryDialog$DropDownSelectionListener.invokeWorkspaceFileSelectionDialog(EditCatalogEntryDialog.java:951)
at org.eclipse.wst.xml.ui.internal.catalog.EditCatalogEntryDialog$5.widgetSelected(EditCatalogEntryDialog.java:910)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3742)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3353)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at org.eclipse.wst.xml.ui.internal.catalog.XMLCatalogEntriesView.invokeDialog(XMLCatalogEntriesView.java:191)
at org.eclipse.wst.xml.ui.internal.catalog.XMLCatalogEntriesView.performNew(XMLCatalogEntriesView.java:200)
at org.eclipse.wst.xml.ui.internal.catalog.XMLCatalogEntriesView$2.widgetSelected(XMLCatalogEntriesView.java:116)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3742)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3353)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at org.eclipse.ui.internal.OpenPreferencesAction.run(OpenPreferencesAction.java:65)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:543)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:489)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:401)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
....
Comment 1 Amy Wu CLA 2007-09-07 16:58:57 EDT
CCing Keith and David because it looks like there changes from bug 155876 might have caused this bug.
Comment 2 David Williams CLA 2007-09-07 17:13:36 EDT
Thanks Amy, it does look like I caused this, so I'll fix. 

I must have put the image file in a bad place, so will look for the right place. 

Comment 3 David Williams CLA 2007-09-09 22:17:43 EDT
I moved the icon to the 'icons' directory and used methods similar to other "getImage" methods in this plugin. 

Comment 4 David Williams CLA 2007-09-09 23:04:13 EDT
I actually discovered, in testing Amy's steps (thanks much) the original 
problem was just that I had been using saveas.png instead of the original saveas_wiz.png ... so, fixed that too. 

Comment 5 Amy Wu CLA 2007-09-19 16:32:26 EDT
verified with wtp 3.0M2 20070913072017
Comment 6 Valentin Baciu CLA 2007-10-02 17:01:02 EDT
Closing.