Bug 187678 - Document Open Resource Dialog and Filtered Search dialog
Summary: Document Open Resource Dialog and Filtered Search dialog
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows NT
: P3 normal (vote)
Target Milestone: 3.3 RC4   Edit
Assignee: Krzysztof Michalski CLA
QA Contact:
URL:
Whiteboard:
Keywords: Documentation
Depends on: 191611
Blocks:
  Show dependency tree
 
Reported: 2007-05-17 16:38 EDT by Tod Creasey CLA
Modified: 2007-06-22 07:01 EDT (History)
4 users (show)

See Also:


Attachments
Proposition of isv doc (24.05 KB, patch)
2007-06-01 07:39 EDT, Krzysztof Michalski CLA
no flags Details | Diff
Poposition of doc 002 (15.54 KB, patch)
2007-06-06 11:02 EDT, Krzysztof Michalski CLA
no flags Details | Diff
Image 1 (14.97 KB, image/png)
2007-06-06 11:04 EDT, Krzysztof Michalski CLA
no flags Details
Image 2 (16.54 KB, image/png)
2007-06-06 11:04 EDT, Krzysztof Michalski CLA
no flags Details
Image 3 (16.34 KB, image/png)
2007-06-06 11:04 EDT, Krzysztof Michalski CLA
no flags Details
Image 4 (22.05 KB, image/png)
2007-06-06 11:05 EDT, Krzysztof Michalski CLA
no flags Details
Proposition of doc 003 (15.78 KB, patch)
2007-06-06 13:47 EDT, Krzysztof Michalski CLA
no flags Details | Diff
My example (9.51 KB, application/octet-stream)
2007-06-07 14:49 EDT, Tod Creasey CLA
no flags Details
Tod's example with my implementation of FilteredResourcesSelectionDialogExample (14.36 KB, application/octet-stream)
2007-06-07 20:28 EDT, Krzysztof Michalski CLA
no flags Details
Two small changes in example doc (2.01 KB, patch)
2007-06-07 20:35 EDT, Krzysztof Michalski CLA
no flags Details | Diff
Image 1 (18.30 KB, image/png)
2007-06-08 08:59 EDT, Krzysztof Michalski CLA
no flags Details
Image 2 (17.76 KB, image/png)
2007-06-08 09:00 EDT, Krzysztof Michalski CLA
no flags Details
Image 3 (17.41 KB, image/png)
2007-06-08 09:00 EDT, Krzysztof Michalski CLA
no flags Details
Image 4 (21.51 KB, image/png)
2007-06-08 09:00 EDT, Krzysztof Michalski CLA
no flags Details
Update patch 005 (2.83 KB, patch)
2007-06-08 12:59 EDT, Krzysztof Michalski CLA
no flags Details | Diff
Patch refreshed to head (1.64 KB, patch)
2007-06-08 13:07 EDT, Krzysztof Michalski CLA
no flags Details | Diff
Update patch 006 (1.99 KB, patch)
2007-06-08 13:32 EDT, Krzysztof Michalski CLA
no flags Details | Diff
Example as it stands now (12.01 KB, application/octet-stream)
2007-06-11 09:51 EDT, Tod Creasey CLA
no flags Details
Update patch 007 (5.44 KB, patch)
2007-06-11 11:47 EDT, Krzysztof Michalski CLA
no flags Details | Diff
Update patch 008 (6.18 KB, patch)
2007-06-11 15:35 EDT, Krzysztof Michalski CLA
no flags Details | Diff
Updated patch 009 (6.76 KB, patch)
2007-06-11 16:11 EDT, Krzysztof Michalski CLA
no flags Details | Diff
Patch fixes some typos (2.45 KB, patch)
2007-06-12 07:08 EDT, Krzysztof Michalski CLA
no flags Details | Diff
Patch fixes some typos 002 (3.76 KB, patch)
2007-06-12 07:15 EDT, Krzysztof Michalski CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tod Creasey CLA 2007-05-17 16:38:32 EDT
In user and isv doc respectively
Comment 1 Krzysztof Michalski CLA 2007-06-01 07:39:33 EDT
Created attachment 69680 [details]
Proposition of isv doc

Simon, Tod could you look at this and give me a feedback if it has a good structure. Moreover i want to add next chapter advanced using of search dialog and describe all features.
Comment 2 Tod Creasey CLA 2007-06-01 09:17:24 EDT
I'll tidy up the grammar for you when you are done. It does read like a Polish guy wrote it <grin>. The use of "the" is one of the hard things to get right in English.

Some comments

org.eclipse.platform.doc.isv\guide\dialog_FilteredItemsSelectionDialog_ex

To illustrate how to create new search dialog based on FilteredItemsSelectionDialog we present all steps needed to do it.  - this is redundant


Check the spelling errors - there are quite a few.

lines like
org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#fillContentProvider(org.eclipse.ui.dialogs.FilteredItemsSelectionDialog.AbstractContentProvider, org.eclipse.ui.dialogs.FilteredItemsSelectionDialog.ItemsFilter, org.eclipse.core.runtime.IProgressMonitor) 

are just confusing - don't bother with the path prefixes

there is a missing screenshot

Advanced using a Search Dialog is empty

org.eclipse.platform.doc.isv\guide\dialogs_FilteredItemsSelectionDialog.htm

should link to the first page

the features that were a refactoring of the old idloag (like the menu) don't need to be mentioned - that is just confusing.

Comment 3 Krzysztof Michalski CLA 2007-06-06 11:02:55 EDT
Created attachment 70340 [details]
Poposition of doc 002
Comment 4 Krzysztof Michalski CLA 2007-06-06 11:04:02 EDT
Created attachment 70341 [details]
Image 1
Comment 5 Krzysztof Michalski CLA 2007-06-06 11:04:26 EDT
Created attachment 70342 [details]
Image 2
Comment 6 Krzysztof Michalski CLA 2007-06-06 11:04:44 EDT
Created attachment 70343 [details]
Image 3
Comment 7 Krzysztof Michalski CLA 2007-06-06 11:05:07 EDT
Created attachment 70344 [details]
Image 4
Comment 8 Krzysztof Michalski CLA 2007-06-06 13:47:54 EDT
Created attachment 70384 [details]
Proposition of doc 003
Comment 9 Tod Creasey CLA 2007-06-07 10:04:13 EDT
These screenshots do not follow our doc guidelines (wrong resolution and custom theme).

Tomek has been following them and can help you get set up.

See http://wiki.eclipse.org/index.php/Eclipse_Doc_Style_Guide under graphics.
Comment 10 Tod Creasey CLA 2007-06-07 14:44:29 EDT
The example should not refer to import org.eclipse.ui.internal.WorkbenchPlugin as it is internal.

If you test this example you get an NPE. I am also not getting the contents filled in. Your example shows no constructors so I am not sure if you are doing anything else there.

!ENTRY org.eclipse.ui 4 0 2007-06-07 14:31:44.750
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NullPointerException
	at org.eclipse.ui.dialogs.FilteredItemsSelectionDialog$ContentProvider.saveHistory(FilteredItemsSelectionDialog.java:2712)
	at org.eclipse.ui.dialogs.FilteredItemsSelectionDialog.storeDialog(FilteredItemsSelectionDialog.java:390)
	at org.eclipse.ui.dialogs.FilteredItemsSelectionDialog.close(FilteredItemsSelectionDialog.java:376)
	at org.eclipse.jface.dialogs.Dialog.cancelPressed(Dialog.java:480)
	at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:466)
	at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:616)
	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:3682)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
	at org.eclipse.jface.window.Window.open(Window.java:796)
	at filtereddialogtest.popup.actions.NewAction.run(NewAction.java:34)
	at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:256)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402)
	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:3682)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
	at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1144)
Comment 11 Tod Creasey CLA 2007-06-07 14:49:08 EDT
Created attachment 70550 [details]
My example

Here is my example to help you see what the differences might be.
Comment 12 Boris Bokowski CLA 2007-06-07 16:53:27 EDT
Fixed a CHKPII issue in dialogs_FilteredItemsSelectionDialog_example_advanced.htm (&amp;&amp; instead of &&) >20070607. (Thanks, Markus)
Comment 13 Markus Keller CLA 2007-06-07 16:57:09 EDT
BTW: you can use Alt+PrtSc to take a screenshot of just the topmost dialog/window.
Comment 14 Krzysztof Michalski CLA 2007-06-07 20:28:25 EDT
Created attachment 70612 [details]
Tod's example with my implementation of FilteredResourcesSelectionDialogExample

I got NPE the same when i commented setSelectionHistory in constructor. It's problem with missing null check on selectionHistory. I reported the bug 191611 and I attached  fix patch.
Comment 15 Krzysztof Michalski CLA 2007-06-07 20:35:25 EDT
Created attachment 70614 [details]
Two small changes in example doc
Comment 16 Krzysztof Michalski CLA 2007-06-08 08:59:36 EDT
Created attachment 70671 [details]
Image 1
Comment 17 Krzysztof Michalski CLA 2007-06-08 09:00:00 EDT
Created attachment 70672 [details]
Image 2
Comment 18 Krzysztof Michalski CLA 2007-06-08 09:00:26 EDT
Created attachment 70673 [details]
Image 3
Comment 19 Krzysztof Michalski CLA 2007-06-08 09:00:57 EDT
Created attachment 70674 [details]
Image 4
Comment 20 Tod Creasey CLA 2007-06-08 11:23:26 EDT
Some more issues

setSelectionHistory(new ResourceSelectionHistory()); needs to be mentioned in the doc

Resources is misspelled

DIALOG_SETTINGS is not defined in the doc
Comment 21 Tod Creasey CLA 2007-06-08 11:25:58 EDT
ResourceSelectionHistory is also a private class defined within your example and mentioned nowhere in the doc
Comment 22 Tod Creasey CLA 2007-06-08 11:29:23 EDT
The example also does not populate when you just run the basic example. This documentation will be pulled from the table of contents until it is fixed.
Comment 23 Krzysztof Michalski CLA 2007-06-08 12:59:45 EDT
Created attachment 70710 [details]
Update patch 005
Comment 24 Tod Creasey CLA 2007-06-08 13:04:35 EDT
This patch does not apply against HEAD. Please update
Comment 25 Krzysztof Michalski CLA 2007-06-08 13:07:58 EDT
Created attachment 70713 [details]
Patch refreshed to head
Comment 26 Tod Creasey CLA 2007-06-08 13:14:26 EDT
This patch still had the selection history NPE of 191611. You need to add a selectionHistory implementation in your basic example
Comment 27 Krzysztof Michalski CLA 2007-06-08 13:32:42 EDT
Created attachment 70717 [details]
Update patch 006

I attached part about implementation of SelectionHistory but if we applied my patch from 191611 this part will be unnecessay.
Comment 28 Tod Creasey CLA 2007-06-11 09:51:45 EDT
Created attachment 70840 [details]
Example as it stands now

This example still does not populate as the image shows. Here is my code following your example so you can see what got missed

Some more notes

1) We need to mention the setup for this example (I got it wrong when I tried it)

It needs to be a plug-in project that 
     has an Activator
     contributes to the UI

otherwise your code will not compile (runtime dependency) and none of the required methods will get generated.

I would even suggest you get them to generate the Hello World Command example and then modify it. Walking them through the options in the new class dialog would also be useful.

2) The constructors would be better as 

public FilteredResourcesSelectionDialogExample(Shell shell, boolean multi) {
		super(shell, multi);
		setTitle("Filtered Resources Selection Dialog Example");
		setSelectionHistory(new ResourceSelectionHistory());

	}

	public FilteredResourcesSelectionDialogExample(Shell shell) {
		this(shell, false);
	}
Comment 29 Krzysztof Michalski CLA 2007-06-11 11:47:12 EDT
Created attachment 70858 [details]
Update patch 007

I updated patch as Tod suggested.
Comment 30 Tod Creasey CLA 2007-06-11 12:22:17 EDT
This still doesn't solve the problem of the list not getting populated initially. Do you know why we get an empty dialog with this example?
Comment 31 Krzysztof Michalski CLA 2007-06-11 15:35:04 EDT
Created attachment 70888 [details]
Update patch 008
Comment 32 Krzysztof Michalski CLA 2007-06-11 16:11:07 EDT
Created attachment 70894 [details]
Updated patch 009
Comment 33 Tod Creasey CLA 2007-06-11 16:25:55 EDT
Patch released for build >20070611. I have also restored the topic entries. Please verify the doc before we close this.
Comment 34 Krzysztof Michalski CLA 2007-06-12 07:08:34 EDT
Created attachment 70986 [details]
Patch fixes some typos

I created all examples from scratch and I found only some typos fixed in patch. Except for it i don't have any prroblems.
Comment 35 Krzysztof Michalski CLA 2007-06-12 07:15:38 EDT
Created attachment 70992 [details]
Patch fixes some typos 002

All from previous patch and i added missed "s" in topics_Guide.xml.
Comment 36 Tod Creasey CLA 2007-06-12 09:04:09 EDT
Final patch released to HEAD