> Would it be possible to add a getID interface to eu.geclipse.core.reporting.IProblem?
Well, in principle everything
is possible ;-)
> I would like to test which exception I cough as to set appropriate dialogTitle and text in the ProblemDialog. I used to do
this by getting the Id, but the new IProblem interface doesn't provide an interface to get the id of the problem contained
within an ProblemException.
The ID is normally only used
internally and therefore I would
object to introduce such a method. Concerning your use case I do not think that
the dialog title and text should be
problem specific. The problem itself already comes with a specific
description/reasons/solutions. The dialog is created from within the UI and should rather have a general title and a general text that correspond to the UI action
that triggered the problem.
An example would be:
-
The user wants to
set up a new queue and a problem
appears
-
The title could then be something like “Batch System
Error”
-
The text could then be something like “Unable to
create a new queue”
-
The specific problem reports comes then with the problem’s
descriptive text, the reasons, the solutions and
the appended exception
Furthermore if you would make
your dialog titles and texts depend
on the problem’s ID you would have to hardcode this ID somehow which is
not desirable.
Cheers, Mathias