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

Max Rydahl Andersen max.andersen at redhat.com
Thu Jul 5 12:02:15 EDT 2007


> 1) Custom Preferences?
>  
>  > Why aren't these just normal eclipse properties ?
> The Exadel framework for prefernces was created a long ago
> and migrated to Eclipse with minimal changes. It describes preferences 
> in terms
> of XModel which allows to reuse in preference pages same forms that are
> used in editors and dialogs
> (org.jboss.tools.common.model.ui.preferences.XMOBasedPreferencesPage).

okey...I would just wish the code was simpler - or at least typesafe ;)

> ReportPreference is a utility class accessing the XModel object keeping the
> preferences. "Struts Studio" is an awkward slip, it can be fixed.

Well its a pretty big "slip" since it occurs about 47 times in the code 
base :)

>  > Where are they stored ?
> %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 ;)

>  > How can the user toggle them ?
> 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 ?

> Also, some of these preferences are saved according to user
> choice in checkboxes in
> org.jboss.tools.common.model.ui.dialog.ErrorDialog

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

>  > 2) ATT_ATTACH_REDHAT_LOG and ATT_ATTACH_ECLIPSE_LOG
>  > What is REDHAT_LOG ?
>  
> %workspace%/.metadata/.plugins/org.jboss.tools.common/.log
> When error dialog appears it prompts user either to report problem 
> immediately
> or to save it into that log to be sent at a later time (by action Report 
> Problem).

How can I reproduce this ?

>  > Why aren't these attributes used for anything ?
>  > Attaching the eclipse log would be an relavant option.
> ATT_ATTACH_REDHAT_LOG is used - when reporting a problem user may
> type a letter without attaching content of the log (result of 
> previously preferring  
> to postpone reporting in error dialog).

Ok - so we should have a checkbox in the report problem dialog for this.


> ATT_ATTACH_ECLIPSE_LOG had been used in the same way, but later was
> commented out from ReportProblemWizard (I do not remember exact reason,
> maybe a caution because eclipse log may be quite lo-o-ong).

solvable by only including a subset of it (e.g. the 100 last lines or 
lines since the latest startup or something like newer than 2 days or 
something)

>  > 3) What is AbstractQueryWizard ? The dialog extends it but what does it
>  > help with ?
>  
> Again, this framework for dialogs was developed a long before Eclipse epoch
> and migrated to Eclipse with reimplementing AbstractQueryDialog that 
> extends
> standard TitleAreaDialog. AbstractQueryWizard implements SpecialWizard
> which makes it a common service that can be loaded by id and executed
> without bothering if it is a dialog or not.

When is it not a dialog ?

>  > 4) The layout looks weird on linux
> That must be studied and fixed. In Windows dialog looked fine.

I fixed it - there was not width hint so the preferredsize was being 
honored but the width of the textfield was as big as the text inside it.

>  > 5) what is XAttributeSupport ?
> It manages an input form in dialogs, editors and preferences.
> A set of input fields is described in XModel metadata.
> This approach is very helpful because it sets the standard for all forms,
> and in most cases allows to create a form just putting few tags to
> *.meta file.

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?

/max



More information about the jbosstools-dev mailing list