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 29438 Details for
Bug 114740
[build path] Configuring JREs from New Java Project wizard does not update list
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]
fix
fix_114740.txt (text/plain), 5.84 KB, created by
Benno Baumgartner
on 2005-11-07 11:17:25 EST
(
hide
)
Description:
fix
Filename:
MIME Type:
Creator:
Benno Baumgartner
Created:
2005-11-07 11:17:25 EST
Size:
5.84 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.ui >Index: ui/org/eclipse/jdt/internal/ui/wizards/JavaProjectWizardFirstPage.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/JavaProjectWizardFirstPage.java,v >retrieving revision 1.31 >diff -u -r1.31 JavaProjectWizardFirstPage.java >--- ui/org/eclipse/jdt/internal/ui/wizards/JavaProjectWizardFirstPage.java 4 Nov 2005 13:28:57 -0000 1.31 >+++ ui/org/eclipse/jdt/internal/ui/wizards/JavaProjectWizardFirstPage.java 7 Nov 2005 16:17:26 -0000 >@@ -331,12 +331,56 @@ > private final SelectionButtonDialogField fUseDefaultJRE, fUseProjectJRE; > private final ComboDialogField fJRECombo; > private final Group fGroup; >- private final String[] fComplianceLabels; >- private final String[] fComplianceData; >+ private String[] fComplianceLabels; >+ private String[] fComplianceData; > private final Link fPreferenceLink; >- private final IVMInstall[] fInstalledJVMs; >+ private IVMInstall[] fInstalledJVMs; > > public JREGroup(Composite composite) { >+ fGroup= new Group(composite, SWT.NONE); >+ fGroup.setFont(composite.getFont()); >+ fGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); >+ fGroup.setLayout(initGridLayout(new GridLayout(3, false), true)); >+ fGroup.setText(NewWizardMessages.JavaProjectWizardFirstPage_JREGroup_title); >+ >+ fUseDefaultJRE= new SelectionButtonDialogField(SWT.RADIO); >+ fUseDefaultJRE.setLabelText(getDefaultJVMLabel()); >+ fUseDefaultJRE.doFillIntoGrid(fGroup, 2); >+ >+ fPreferenceLink= new Link(fGroup, SWT.NONE); >+ fPreferenceLink.setFont(fGroup.getFont()); >+ fPreferenceLink.setText(NewWizardMessages.JavaProjectWizardFirstPage_JREGroup_link_description); >+ fPreferenceLink.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false)); >+ fPreferenceLink.addSelectionListener(this); >+ >+ fUseProjectJRE= new SelectionButtonDialogField(SWT.RADIO); >+ fUseProjectJRE.setLabelText(NewWizardMessages.JavaProjectWizardFirstPage_JREGroup_specific_compliance); >+ fUseProjectJRE.doFillIntoGrid(fGroup, 1); >+ fUseProjectJRE.setDialogFieldListener(this); >+ >+ fJRECombo= new ComboDialogField(SWT.READ_ONLY); >+ fillInstalledJREs(fJRECombo); >+ fJRECombo.setDialogFieldListener(this); >+ >+ Combo comboControl= fJRECombo.getComboControl(fGroup); >+ comboControl.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, true, false)); // make sure column 2 is grabing (but no fill) >+ >+ DialogField.createEmptySpace(fGroup); >+ >+ fUseDefaultJRE.setSelection(true); >+ fJRECombo.setEnabled(fUseProjectJRE.isSelected()); >+ } >+ >+ private void fillInstalledJREs(ComboDialogField comboField) { >+ String selectedItem= null; >+ int selectionIndex= -1; >+ if (fUseProjectJRE.isSelected()) { >+ selectionIndex= comboField.getSelectionIndex(); >+ if (selectionIndex != -1) {//paranoia >+ selectedItem= comboField.getItems()[selectionIndex]; >+ } >+ } >+ > fInstalledJVMs= getWorkspaceJREs(); > Arrays.sort(fInstalledJVMs, new Comparator() { > >@@ -360,10 +404,14 @@ > } > > }); >+ selectionIndex= -1;//find new index > fComplianceLabels= new String[fInstalledJVMs.length]; > fComplianceData= new String[fInstalledJVMs.length]; > for (int i= 0; i < fInstalledJVMs.length; i++) { > fComplianceLabels[i]= fInstalledJVMs[i].getName(); >+ if (selectedItem != null && fComplianceLabels[i].equals(selectedItem)) { >+ selectionIndex= i; >+ } > if (fInstalledJVMs[i] instanceof IVMInstall2) { > String compliance= JavaModelUtil.getCompilerCompliance((IVMInstall2)fInstalledJVMs[i]); > if (compliance != null) { >@@ -375,40 +423,12 @@ > fComplianceData[i]= JavaCore.VERSION_1_4; > } > } >- >- fGroup= new Group(composite, SWT.NONE); >- fGroup.setFont(composite.getFont()); >- fGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); >- fGroup.setLayout(initGridLayout(new GridLayout(3, false), true)); >- fGroup.setText(NewWizardMessages.JavaProjectWizardFirstPage_JREGroup_title); >- >- fUseDefaultJRE= new SelectionButtonDialogField(SWT.RADIO); >- fUseDefaultJRE.setLabelText(getDefaultJVMLabel()); >- fUseDefaultJRE.doFillIntoGrid(fGroup, 2); >- >- fPreferenceLink= new Link(fGroup, SWT.NONE); >- fPreferenceLink.setFont(fGroup.getFont()); >- fPreferenceLink.setText(NewWizardMessages.JavaProjectWizardFirstPage_JREGroup_link_description); >- fPreferenceLink.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false)); >- fPreferenceLink.addSelectionListener(this); >- >- fUseProjectJRE= new SelectionButtonDialogField(SWT.RADIO); >- fUseProjectJRE.setLabelText(NewWizardMessages.JavaProjectWizardFirstPage_JREGroup_specific_compliance); >- fUseProjectJRE.doFillIntoGrid(fGroup, 1); >- fUseProjectJRE.setDialogFieldListener(this); >- >- fJRECombo= new ComboDialogField(SWT.READ_ONLY); >- fJRECombo.setItems(fComplianceLabels); >- fJRECombo.selectItem(getDefaultJVMName()); >- fJRECombo.setDialogFieldListener(this); >- >- Combo comboControl= fJRECombo.getComboControl(fGroup); >- comboControl.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, true, false)); // make sure column 2 is grabing (but no fill) >- >- DialogField.createEmptySpace(fGroup); >- >- fUseDefaultJRE.setSelection(true); >- fJRECombo.setEnabled(fUseProjectJRE.isSelected()); >+ comboField.setItems(fComplianceLabels); >+ if (selectionIndex == -1) { >+ fJRECombo.selectItem(getDefaultJVMName()); >+ } else { >+ fJRECombo.selectItem(selectedItem); >+ } > } > > private IVMInstall[] getWorkspaceJREs() { >@@ -469,6 +489,7 @@ > > public void handlePossibleJVMChange() { > fUseDefaultJRE.setLabelText(getDefaultJVMLabel()); >+ fillInstalledJREs(fJRECombo); > } > >
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 114740
: 29438