Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 30104 Details for
Bug 114810
Hardware and OS attributes not auto determined in New Bug Report wizard
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch to determine hardware
AbstractWizardDataPage.txt (text/plain), 4.73 KB, created by
Ian Bull
on 2005-11-16 19:12:24 EST
(
hide
)
Description:
Patch to determine hardware
Filename:
MIME Type:
Creator:
Ian Bull
Created:
2005-11-16 19:12:24 EST
Size:
4.73 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.mylar.bugzilla.ui >Index: src/org/eclipse/mylar/bugzilla/ui/wizard/AbstractWizardDataPage.java >=================================================================== >RCS file: /home/technology/org.eclipse.mylar/org.eclipse.mylar.bugzilla.ui/src/org/eclipse/mylar/bugzilla/ui/wizard/AbstractWizardDataPage.java,v >retrieving revision 1.7 >diff -u -r1.7 AbstractWizardDataPage.java >--- src/org/eclipse/mylar/bugzilla/ui/wizard/AbstractWizardDataPage.java 22 Sep 2005 20:55:23 -0000 1.7 >+++ src/org/eclipse/mylar/bugzilla/ui/wizard/AbstractWizardDataPage.java 17 Nov 2005 00:04:30 -0000 >@@ -16,6 +16,7 @@ > import java.util.Set; > > import org.eclipse.core.runtime.IStatus; >+import org.eclipse.core.runtime.Platform; > import org.eclipse.core.runtime.Status; > import org.eclipse.jface.wizard.IWizardPage; > import org.eclipse.jface.wizard.WizardPage; >@@ -359,6 +360,7 @@ > protected void setControl(Control c) { > super.setControl(c); > } >+ > > /* > * (non-Javadoc) >@@ -374,6 +376,9 @@ > // get the model for the new bug > AbstractBugWizard wizard = (AbstractBugWizard) getWizard(); > NewBugModel nbm = wizard.model; >+ >+ // Set the current platform and OS on the model >+ setPlatformOptions(nbm); > > // Attributes Composite- this holds all the combo fields and text > // fields >@@ -647,4 +652,128 @@ > public boolean offlineSelected() { > return (offlineButton == null) ? false : offlineButton.getSelection(); > } >+ >+ >+ /* The following are Bugzilla's OS's >+ All >+ AIX >+ Windows 95 >+ Windows 98 >+ Windows CE >+ Windows Mobile 2003 >+ Windows Mobile 2005 >+ Windows ME >+ Windows 2000 >+ Windows NT >+ Windows XP >+ Windows 2003 Server >+ Windows All >+ MacOS X >+ Linux >+ Linux-GTK >+ Linux-Motif >+ HP-UX >+ Neutrino >+ QNX-Photon >+ Solaris >+ Solaris-GTK >+ Solaris-Motif >+ SymbianOS-Series 80 >+ Unix All >+ other >+ // The following are the platforsm in Bugzilla >+ All >+ Macintosh >+ PC >+ Power >+ PC >+ Sun >+ Other >+ >+ // The following are Java's Archictures >+ [PA_RISC, ppc, sparc, x86, x86_64, ia64, ia64_32] >+ >+ // The following are Java's OS's >+ [aix, hpux, linux, macosx, qnx, solaris, win32] >+ */ >+ >+ >+ >+ >+ >+ /** >+ * Sets the OS and Platform for the new bug >+ * @param newBugModel The bug to set the options for >+ */ >+ private void setPlatformOptions( NewBugModel newBugModel ) { >+ >+ // A Map from Java's OS and Platform to Buzilla's >+ Map<String,String> java2buzillaOSMap = new HashMap<String, String>(); >+ Map<String,String> java2buzillaPlatformMap = new HashMap<String, String>(); >+ >+ java2buzillaPlatformMap.put("x86", "PC"); >+ java2buzillaPlatformMap.put("x86_64","PC"); >+ java2buzillaPlatformMap.put("ia64", "PC"); >+ java2buzillaPlatformMap.put("ia64_32", "PC"); >+ java2buzillaPlatformMap.put("sparc","Sun"); >+ java2buzillaPlatformMap.put("ppc", "Power"); >+ >+ java2buzillaOSMap.put("aix", "AIX"); >+ java2buzillaOSMap.put("hpux", "HP-UX"); >+ java2buzillaOSMap.put("linux", "Linux"); >+ java2buzillaOSMap.put("macosx", "MacOS X"); >+ java2buzillaOSMap.put("qnx", "QNX-Photon"); >+ java2buzillaOSMap.put("solaris", "Solaris"); >+ java2buzillaOSMap.put("win32", "Windows All"); >+ >+ >+ // Get OS >+ // Lookup Map >+ // Check that the result is in Values, if it is not, set it to other >+ >+ Attribute opSysAttribute = newBugModel.getAttribute("OS"); >+ Attribute platformAttribute = newBugModel.getAttribute("Platform"); >+ >+ String OS = Platform.getOS(); >+ String platform = Platform.getOSArch(); >+ >+ String bugzillaOS = null; // Bugzilla String for OS >+ String bugzillaPlatform = null; // Bugzilla String for Platform >+ >+ if ( java2buzillaOSMap.containsKey(OS) ) { >+ bugzillaOS = java2buzillaOSMap.get(OS); >+ if ( !opSysAttribute.getOptionValues().values().contains(bugzillaOS)) { >+ // If the OS we found is not in the list of available options, set bugzillaOS >+ // to null, and just use "other" >+ bugzillaOS = null; >+ } >+ } >+ else { >+ // If we have a strangeOS, then just set buzillaOS to null, and use "other" >+ bugzillaOS = null; >+ } >+ >+ >+ if ( java2buzillaPlatformMap.containsKey(platform)) { >+ bugzillaPlatform = java2buzillaPlatformMap.get( platform ); >+ if ( !platformAttribute.getOptionValues().values().contains(bugzillaPlatform)) { >+ // If the platform we found is not int the list of available optinos, set the >+ // Bugzilla Platform to null, and juse use "other" >+ bugzillaPlatform = null; >+ } >+ } >+ else { >+ // If we have a strange platform, then just set bugzillaPatforrm to null, and use "other" >+ bugzillaPlatform = null; >+ } >+ >+ // Set the OS and the Platform in the model >+ if ( bugzillaOS != null ) >+ opSysAttribute.setValue(bugzillaOS); >+ >+ if ( bugzillaPlatform != null ) >+ platformAttribute.setValue(bugzillaPlatform); >+ } >+ >+ > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 114810
: 30104 |
30655