[jbosstools-dev] Questions found while looking at report problemreimplementation

Viacheslav Kabanovich scabanovich at exadel.com
Thu Jul 5 13:16:31 EDT 2007


> > 1) Custom Preferences?
> > (org.jboss.tools.common.model.ui.preferences.XMOBasedPreferencesPage).

> > %workspace%/.metadata/.plugins/org.jboss.tools.common.model/Preferences.xml
> 
> hmm - I can't find such file in any of the workspaces I have run jboss 
> tools with ? the only one I can see is .rule-sets.xml which I also is 
> wondering why is there ;)

It appears their only after user changes preferences in dialog.

.rule-sets.xml  keeps preferences for verification rules (jsf and struts)
edited on page RedHat/Verification That is one more example of our 
old framework.

 
> > There was preference page 'Report Problem'. Someone removed it when
> > migrating to RedHat. It is quite easy to restore it.
> 
> Ok - we should do that. How is that enabled ?

ReportProblemPreferencesPage should be registered in plugin.xml as preference page, I will do it.

> How does that dialog relate to the "report problems" dialog ?

Example:
ProblemReportingHelper.reportProblem(WebUiPlugin.PLUGIN_ID, "Exception caught in AppRegisterWizard.performFinish(): " + ex.getMessage(), ex);
that results in opening our error dialog.

The idea was to prompt users to report problems, by showing this dialog instead of silent 
writing to log. Also, only through this call the redhat log we discussed can be filled with
problems most interesting to us (we can define places for that by call as above example), 
while writing to Eclipse log mixes our errors with other stuff that maybe of not much interest.
Now, I checked in the workspace and found that ProblemReportingHelper is used much 
less than it used to. For instance, most often used class DefaultSpecialWizard made 
such call and now it is replaced with silent logging. Should not we resume the practice of 
using this error dialog more often?

> >  > 2) ATT_ATTACH_REDHAT_LOG and ATT_ATTACH_ECLIPSE_LOG
> >  > What is REDHAT_LOG ?
> >  
> How can I reproduce this ? 
Insert call to ProblemReportingHelper to any part of code and pass it exception instance.

> >  > 3) What is AbstractQueryWizard ? The dialog extends it but what does it
> >  > help with ?
> > AbstractQueryWizard implements SpecialWizard
> 
> When is it not a dialog ?

I mean that SpecialWizard has a lot of implementations that are not dialogs.

> >  > 4) The layout looks weird on linux

Well, I think that problem appeared after swt widgets were added to 
that dialog in addition to XAttributeSupport that behaves quite well.

> 
> >  > 5) what is XAttributeSupport ?
> 
> Can you point me to an example of this ?
> 
> The ReportProblemWizard has alot of ui code so I assume it is not a
> good example of xattributesupport usage?

As I understood after having refreshed this class, someone else added 
swt components to it instead of extending meta data for used support.
So result is a cumbersome change of two approaches. 

Nice examples:
XMOBasedPreferencesPage - base for most model preference pages
SpecialWizardStep - default page for most dialogs for XModel.
Form - default implementation for most forms in editors, 
it is more complex because it adds table for lists of child objects, 
but part for attributes is simple enough.

Slava Kabanovich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jbosstools-dev/attachments/20070705/7187aa3f/attachment.html 


More information about the jbosstools-dev mailing list