Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 208831

Summary: Add a platform check and an appropriate error message for unsupported platforms
Product: z_Archived Reporter: Matthew Phillips <matthew.phillips>
Component: TPTPAssignee: Bing Xu <xubing>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P1 CC: ewchan, ian, jgwest, jkubasta, paulslau
Version: unspecifiedKeywords: plan
Target Milestone: ---Flags: paulslau: review-
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard: closed460
Attachments:
Description Flags
Patch to add error message in Preference and Profile Dialog.
none
New patch with typo corrected.
none
Latest patch after implementing Paul's comment #6
none
Update patch with Jonathan's latest code fix in AdminUtil.java none

Description Matthew Phillips CLA 2007-11-05 19:13:16 EST
To avoid confusion, TPTP should show an "unsupported platform" message when launching, rather than an "agent not found" message. See also bug #68111.
Comment 1 Bing Xu CLA 2007-11-15 14:07:27 EST
Matthew, can you describe your scenario a little bit more?  Are you using the standlone agent controller or the IAC?   

For the standalone Agent Controller, it's not possible to log error for unsupported platform because it's in native code (C and C++).  If it was run on wrong platform it wouldn't even start.

For IAC, I think we can add some Java code to check the platform info and log some error messages.  Is this what you meant?
Comment 2 Matthew Phillips CLA 2007-11-18 18:23:28 EST
(In reply to comment #1)

> For IAC, I think we can add some Java code to check the platform info and log
> some error messages.  Is this what you meant?

Yes, that's the kind of thing I had in mind. When you try to run a profile session, a dialog would let you know the current platform is not supported, rather than telling you it couldn't connect. The basic idea is to avoid making the user believe it's a configuration problem that can be fixed rather than a fundamental one.

Comment 3 Bing Xu CLA 2007-11-30 13:22:51 EST
Created attachment 84210 [details]
Patch to add error message in Preference and Profile Dialog.

Add fix and here is the new behavior:

1. In Preference page under Agent Contoller->Integrated Agent Controller, if platform is not supported, an error message will be displayed and all selections are disabled.  No changes to Agent Controller->Security Certificate.

2. In Profile Dialog Window, an error will pop up when Integrated Agent Controller tries to start for the first time.   This error will only show once during whole Eclipse session.

Joanna, I need someone with Eclipse UI experience to review the patch.
Comment 4 jkubasta CLA 2007-11-30 13:33:18 EST
Paul, would you please review this patch when you have the chance? Thx
Comment 5 Bing Xu CLA 2007-11-30 13:59:34 EST
Created attachment 84213 [details]
New patch with typo corrected.

New patch with typo corrected.
Comment 6 Paul Slauenwhite CLA 2007-12-03 13:37:36 EST
Reviewed with comments:

-Use title case for Agent Controller and Integrated Agent Controller in the messages.
-Change standalone to stand-alone in the messages.
-Change AdminUtil#isSupportedPlatform() to:

return (getPlatformSymbolicName() != null);

and remvoe AdminUtil#supportedPlatforms.
-Why is Samson's CVS ID in IACPreferencePage.java:

- * $Id: IACPreferencePage.java,v 1.7 2007/11/30 16:51:23 samwai Exp $

-Has this patch been tested on all supported platforms?
-Another committer with more experience with this code should also review this patch.
Comment 7 Paul Slauenwhite CLA 2007-12-19 07:45:46 EST
If this Bugzilla is planed to be completed in 4.5, please add the plan keyword.  Otherwise, please target to future.

In addition, if this Bugzilla is committed to be completed in 4.5, please change the priority to P1.
Comment 8 Bing Xu CLA 2008-01-18 11:18:46 EST
Created attachment 87276 [details]
Latest patch after implementing Paul's comment #6
Comment 9 Bing Xu CLA 2008-01-18 11:19:58 EST
Eugene, can you review this patch since you have more experience with plugin GUI.   Thanks.
Comment 10 Eugene Chan CLA 2008-01-30 00:54:41 EST
Hi Bing, I cannot smoke test the patch as org.eclipse.tptp.platform.common does not compile with dependency sun.security.action.GetPropertyAction in org.eclipse.hyades.ui.internal.util.FileUtil. I have however reviewed the patch and it looks safe to be checked in.
Comment 11 Bing Xu CLA 2008-01-31 12:42:54 EST
Created attachment 88432 [details]
Update patch with Jonathan's latest code fix in AdminUtil.java

Joanna, can you check in the patch for me.   Thanks.
Comment 12 jkubasta CLA 2008-01-31 14:35:02 EST
Patch committed to Head
Comment 13 Paul Slauenwhite CLA 2009-06-30 12:10:01 EDT
As of TPTP 4.6.0, TPTP is in maintenance mode and focusing on improving quality by resolving relevant enhancements/defects and increasing test coverage through test creation, automation, Build Verification Tests (BVTs), and expanded run-time execution. As part of the TPTP Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes), this enhancement/defect is verified/closed by the Project Lead since this enhancement/defect has been resolved and unverified for more than 1 year and considered to be fixed. If this enhancement/defect is still unresolved and reproducible in the latest TPTP release (http://www.eclipse.org/tptp/home/downloads/), please re-open.