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 66857 Details for
Bug 185170
[working sets] New wizards started off working sets have wrong init values
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_185170.txt (text/plain), 3.71 KB, created by
Benno Baumgartner
on 2007-05-11 10:40:09 EDT
(
hide
)
Description:
fix
Filename:
MIME Type:
Creator:
Benno Baumgartner
Created:
2007-05-11 10:40:09 EDT
Size:
3.71 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.ui >Index: ui/org/eclipse/jdt/internal/ui/wizards/NewSourceFolderWizardPage.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewSourceFolderWizardPage.java,v >retrieving revision 1.40 >diff -u -r1.40 NewSourceFolderWizardPage.java >--- ui/org/eclipse/jdt/internal/ui/wizards/NewSourceFolderWizardPage.java 9 May 2007 13:21:11 -0000 1.40 >+++ ui/org/eclipse/jdt/internal/ui/wizards/NewSourceFolderWizardPage.java 11 May 2007 14:39:38 -0000 >@@ -141,58 +141,35 @@ > // -------- Initialization --------- > > public void init(IStructuredSelection selection) { >- if (selection == null || selection.isEmpty()) { >- setDefaultAttributes(); >- return; >+ String projPath= getProjectPath(selection); >+ if (projPath != null) { >+ fProjectField.setText(projPath); > } >- >- Object selectedElement= selection.getFirstElement(); >- if (selectedElement == null) { >+ fRootDialogField.setText(""); //$NON-NLS-1$ >+ } >+ >+ private String getProjectPath(IStructuredSelection selection) { >+ Object selectedElement= null; >+ if (selection == null || selection.isEmpty()) { > selectedElement= EditorUtility.getActiveEditorJavaInput(); >- } >- >- String projPath= null; >+ } else if (selection.size() == 1) { >+ selectedElement= selection.getFirstElement(); >+ } > > if (selectedElement instanceof IResource) { > IProject proj= ((IResource)selectedElement).getProject(); > if (proj != null) { >- projPath= proj.getFullPath().makeRelative().toString(); >+ return proj.getFullPath().makeRelative().toString(); > } > } else if (selectedElement instanceof IJavaElement) { > IJavaProject jproject= ((IJavaElement)selectedElement).getJavaProject(); > if (jproject != null) { >- projPath= jproject.getProject().getFullPath().makeRelative().toString(); >+ return jproject.getProject().getFullPath().makeRelative().toString(); > } > } >- >- if (projPath != null) { >- fProjectField.setText(projPath); >- fRootDialogField.setText(""); //$NON-NLS-1$ >- } else { >- setDefaultAttributes(); >- } >- } >- >- private void setDefaultAttributes() { >- String projPath= ""; //$NON-NLS-1$ >- >- try { >- // find the first java project >- IProject[] projects= fWorkspaceRoot.getProjects(); >- for (int i= 0; i < projects.length; i++) { >- IProject proj= projects[i]; >- if (proj.hasNature(JavaCore.NATURE_ID)) { >- projPath= proj.getFullPath().makeRelative().toString(); >- break; >- } >- } >- } catch (CoreException e) { >- // ignore here >- } >- fProjectField.setText(projPath); >- fRootDialogField.setText(""); //$NON-NLS-1$ >+ >+ return null; > } >- > > // -------- UI Creation --------- > >#P org.eclipse.jdt.junit >Index: src/org/eclipse/jdt/junit/wizards/NewTestSuiteWizardPage.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestSuiteWizardPage.java,v >retrieving revision 1.16 >diff -u -r1.16 NewTestSuiteWizardPage.java >--- src/org/eclipse/jdt/junit/wizards/NewTestSuiteWizardPage.java 11 Dec 2006 15:41:27 -0000 1.16 >+++ src/org/eclipse/jdt/junit/wizards/NewTestSuiteWizardPage.java 11 May 2007 14:39:39 -0000 >@@ -213,7 +213,6 @@ > * @see org.eclipse.jface.dialogs.IDialogPage#setVisible(boolean) > */ > public void setVisible(boolean visible) { >- super.setVisible(visible); > if (visible) { > setFocus(); > updateClassesInSuiteTable(); >@@ -221,6 +220,7 @@ > } else { > saveWidgetValues(); > } >+ super.setVisible(visible); > } > > private void handleAllFieldsChanged() {
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 185170
: 66857