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 117939 Details for
Bug 249482
Duplicate Filters can be created if changing the filter pool
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 with connection-unique awareness
patch.txt (text/plain), 4.82 KB, created by
David McKnight
on 2008-11-14 15:11:39 EST
(
hide
)
Description:
patch with connection-unique awareness
Filename:
MIME Type:
Creator:
David McKnight
Created:
2008-11-14 15:11:39 EST
Size:
4.82 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rse.ui >Index: UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardNamePage.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardNamePage.java,v >retrieving revision 1.13 >diff -u -r1.13 SystemNewFilterWizardNamePage.java >--- UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardNamePage.java 10 Jul 2008 18:32:22 -0000 1.13 >+++ UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardNamePage.java 14 Nov 2008 19:51:12 -0000 >@@ -15,6 +15,7 @@ > * David Dykstal (IBM) - [160403] filters should be connection private by default > * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types > * David McKnight (IBM) - [226948] [api][regression] SystemNewFilterWizard.createNamePage() is no longer available >+ * David McKnight (IBM) - [249482] Duplicate Filters can be created if changing the filter pool > *******************************************************************************/ > > package org.eclipse.rse.ui.filters.dialogs; >@@ -310,22 +311,91 @@ > if (src == poolCombo) > { > int selection = poolCombo.getSelectionIndex(); >- if ((selection >= 0) && (nameValidators!=null)) >+ >+ if ((selection >= 0) && (nameValidators!=null)){ > nameValidator = nameValidators[selection]; >+ >+ ISystemFilterPool currentPool = poolsToSelectFrom[selection]; >+ if (currentPool == parentPool){ // if this is the connection-unique filter pool, set the uniqueCB >+ uniqueCB.setSelection(true); >+ poolCombo.setEnabled(false); >+ } >+ } > } > else if (src == poolWrapperCombo) > { > int selection = poolWrapperCombo.getSelectionIndex(); >- if ((selection >= 0) && (nameValidators!=null)) >+ >+ if ((selection >= 0) && (nameValidators!=null)){ > nameValidator = nameValidators[selection]; >+ >+ ISystemFilterPoolWrapper currentPool = poolWrappers[selection]; >+ if (currentPool == poolWrapperInformation.getPreSelectWrapper()){ // if this is the connection-unique filter pool, set the uniqueCB >+ uniqueCB.setSelection(true); >+ poolWrapperCombo.setEnabled(false); >+ } >+ } > } > else if (src == uniqueCB) > { > boolean selected = uniqueCB.getSelection(); > if (poolVerbiage != null) > poolVerbiage.setEnabled(!selected); >- if (poolCombo != null) >+ if (poolCombo != null){ > poolCombo.setEnabled(!selected); >+ >+ >+ // if unique to connection then only connection-private filter pool can be used >+ // if it's not unique to connection, then the connection-private filter pool should not be selected >+ boolean foundPool = false; >+ int filterPoolSelectionIndex = 0; >+ if (poolsToSelectFrom != null){ >+ >+ int currentIndex = poolCombo.getSelectionIndex(); >+ ISystemFilterPool currentPool = poolsToSelectFrom[currentIndex]; >+ if (currentPool != parentPool && !selected){ >+ // then the current pool is okay >+ filterPoolSelectionIndex = currentIndex; >+ } >+ else { >+ for (int idx=0; idx<poolsToSelectFrom.length && !foundPool; idx++){ >+ ISystemFilterPool pool = poolsToSelectFrom[idx]; >+ >+ boolean isConnectionUnique = pool == parentPool; >+ >+ if ((isConnectionUnique && selected) || (!isConnectionUnique && !selected)){ >+ filterPoolSelectionIndex = idx; >+ foundPool = true; >+ } >+ } >+ poolCombo.select(filterPoolSelectionIndex); >+ } >+ } >+ else if (poolWrappers != null){ >+ int currentIndex = poolWrapperCombo.getSelectionIndex(); >+ ISystemFilterPoolWrapper currentPoolWrapper = poolWrappers[currentIndex]; >+ if (currentPoolWrapper == poolWrapperInformation.getPreSelectWrapper()){ >+ // then the current pool is okay >+ filterPoolSelectionIndex = currentIndex; >+ } >+ else { >+ for (int idx=0; idx<poolWrappers.length && !foundPool; idx++){ >+ >+ boolean isConnectionUnique = poolWrapperInformation.getPreSelectWrapper() == poolWrappers[idx]; >+ if ((isConnectionUnique && selected) || (!isConnectionUnique && !selected)){ >+ filterPoolSelectionIndex = idx; >+ foundPool = true; >+ } >+ } >+ poolWrapperCombo.select(filterPoolSelectionIndex); >+ } >+ } >+ >+ if (nameValidators != null){ >+ nameValidator = nameValidators[filterPoolSelectionIndex]; >+ } >+ >+ } > if (poolWrapperCombo != null) > poolWrapperCombo.setEnabled(!selected); > if (poolComboLabel != null)
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 249482
: 117939