Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-debug-dev] IThread.getPriority() returns int. Not all platforms use int to represent


I believe that a debug model for a debug engine that is currently returning Strings, could provide an implementation that returns an int. It would require that you define ints for your appropriate Strings. Returning an internationalized String, at the model level (i.e. non-ui) does not feel right, as it requires clients of the model that depend on thread priorities to be able to handle internationalized strings (which is messy - i.e. how could one properly test the value of a thread priority to take some action? You would have to have an if statement that checks all the different internationalized values). The only good use for these Strings would be for presentation, which is not what the debug model is intended to do. I would prefer to see you extend the debug model if you need to return the Strings, with a method like #getThreadPriorityLabel(). However, I do not feel that should be part of the core debug model.

Darin




boxall@xxxxxxxxxx
Sent by: platform-debug-dev-admin@xxxxxxxxxxx

01/15/2002 04:23 PM
Please respond to platform-debug-dev

       
        To:        platform-debug-dev@xxxxxxxxxxx
        cc:        
        Subject:        [platform-debug-dev] IThread.getPriority() returns int.   Not all platforms use int to represent


I would have to do a poll of the 10+ engines that we connect to but because
our plugin works with many different platforms we recently changed our
internal representation to a string allowing the engines to use numeric
values or terms like "Critical" or "Batch" for priorties.   We don't do
anything with the values other than display so a string works well.

Alan Boxall - IBM Distributed Debugger



                                                                                                                                               
                   platform-debug-dev-request@e                                                                                                
                   clipse.org                         To:     platform-debug-dev@xxxxxxxxxxx                                                    
                   Sent by:                           cc:                                                                                      
                   platform-debug-dev-admin@ecl       Subject:     platform-debug-dev digest, Vol 1 #32 - 3 msgs                                
                   ipse.org                                                                                                                    
                                                                                                                                               
                                                                                                                                               
                   01/11/2002 12:05 PM                                                                                                          
                   Please respond to                                                                                                            
                   platform-debug-dev                                                                                                          
                                                                                                                                               
                                                                                                                                               



Send platform-debug-dev mailing list submissions to
          platform-debug-dev@xxxxxxxxxxx

To subscribe or unsubscribe via the World Wide Web, visit
          http://dev.eclipse.org/mailman/listinfo/platform-debug-dev
or, via email, send a message with subject or body 'help' to
          platform-debug-dev-request@xxxxxxxxxxx

You can reach the person managing the list at
          platform-debug-dev-admin@xxxxxxxxxxx

When replying, please edit your Subject line so it is more specific
than "Re: Contents of platform-debug-dev digest..."


Today's Topics:

  1. IThread.getPriority() returns int.   Not all platforms use int to
represent
      priority. (boxall@xxxxxxxxxx)
  2. Re: IThread.getPriority() returns int.   Not all platforms use int to
represent priority. (Jared Burns)

--__--__--

Message: 1
From: boxall@xxxxxxxxxx
To: platform-debug-dev@xxxxxxxxxxx
Date: Thu, 10 Jan 2002 14:56:41 -0500
Subject: [platform-debug-dev] IThread.getPriority() returns int.   Not all
platforms use int to represent
priority.
Reply-To: platform-debug-dev@xxxxxxxxxxx

The plugin that I am creating connects to debug engines on various
platforms.   Not all of them necessarily represent a thread's priority with
a number.

/**
* Returns the priority of this thread. The meaning of this
* number is operating-system dependent.
*
* @return thread priority
* @exception DebugException if this method fails.  Reasons include:
* <ul><li>Failure communicating with the VM.  The DebugException's
* status code contains the underlying exception responsible for
* the failure.</li>
*/
public int getPriority() throws DebugException;

Could IThread.getPriority() return a String instead?



--__--__--

Message: 2
From: Jared Burns <jared-eclipse@xxxxxxxxx>
Organization: Object Technology International
To: platform-debug-dev@xxxxxxxxxxx
Subject: Re: [platform-debug-dev] IThread.getPriority() returns int.   Not
all platforms use int to represent priority.
Date: Thu, 10 Jan 2002 14:14:42 -0600
Reply-To: platform-debug-dev@xxxxxxxxxxx

I'm curious, which platform(s?) returns non-numeric thread priorities? What

does it(they?) use?

- Jared

On Thursday 10 January 2002 01:56 pm, you wrote:
> The plugin that I am creating connects to debug engines on various
> platforms.   Not all of them necessarily represent a thread's priority
with
> a number.
>
> /**
>  * Returns the priority of this thread. The meaning of this
>  * number is operating-system dependent.
>  *
>  * @return thread priority
>  * @exception DebugException if this method fails.  Reasons include:
>  * <ul><li>Failure communicating with the VM.  The DebugException's
>  * status code contains the underlying exception responsible for
>  * the failure.</li>
>  */
> public int getPriority() throws DebugException;
>
> Could IThread.getPriority() return a String instead?
>
>
> _______________________________________________
> platform-debug-dev mailing list
> platform-debug-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/platform-debug-dev


--__--__--

_______________________________________________
platform-debug-dev mailing list
platform-debug-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-debug-dev


End of platform-debug-dev Digest



_______________________________________________
platform-debug-dev mailing list
platform-debug-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-debug-dev



Back to the top