[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[List Home]
|
[tm-cvs-commit] dmcknight org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems SubSystem.java
|
- From: Eclipse CVS Genie <genie@xxxxxxxxxxx>
- Date: Fri, 20 May 2011 18:26:56 +0000
- Delivered-to: tm-cvs-commit@eclipse.org
Update of /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems
In directory dev2:/tmp/cvs-serv17183/subsystems/org/eclipse/rse/core/subsystems
Modified Files:
Tag: R3_2_maintenance
SubSystem.java
Log Message:
[318836] Period in filter name causes wrong message on drag and drop
Index: SubSystem.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystem.java,v
retrieving revision 1.125.4.2
retrieving revision 1.125.4.3
diff -C2 -d -r1.125.4.2 -r1.125.4.3
*** SubSystem.java 4 Jan 2011 13:57:22 -0000 1.125.4.2
--- SubSystem.java 20 May 2011 18:26:54 -0000 1.125.4.3
***************
*** 1,4 ****
/********************************************************************************
! * Copyright (c) 2002, 2009 IBM Corporation and others. All rights reserved.
* This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
--- 1,4 ----
/********************************************************************************
! * Copyright (c) 2002, 2011 IBM Corporation and others. All rights reserved.
* This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
***************
*** 50,54 ****
* David McKnight (IBM) - [284018] concurrent SubSystem.connect() calls can result in double login-prompt
* David McKnight (IBM) - [326555] Dead lock when debug session starts
! * ********************************************************************************/
package org.eclipse.rse.core.subsystems;
--- 50,55 ----
* David McKnight (IBM) - [284018] concurrent SubSystem.connect() calls can result in double login-prompt
* David McKnight (IBM) - [326555] Dead lock when debug session starts
! * David McKnight (IBM) - [318836] Period in filter name causes wrong message on drag and drop
! *********************************************************************************/
package org.eclipse.rse.core.subsystems;
***************
*** 924,928 ****
{
// figure out if there is a filter
! String filterID = key;
try
{
--- 925,929 ----
{
// figure out if there is a filter
! String filterID = key;
try
{
***************
*** 941,973 ****
if (mgr != null && segments.length > 1){
- // name of the filter is the last segment
- String filterName = segments[segments.length - 1];
-
- // filter pool name is the 3rd and 2nd to last segment
- //String filterPoolName =
- // segments[segments.length - 3] + '.' +
- // segments[segments.length - 2];
ISystemFilterPool filterPool = null;
ISystemFilterPool[] filterPools = mgr.getSystemFilterPools();
for (int p = 0; p < filterPools.length && filterPool == null; p++){
ISystemFilterPool pool = filterPools[p];
String realPoolName = pool.getName();
! // check for match
! String filterPoolName = segments[segments.length - 2];
! for (int s = 3; s < segments.length && filterPool == null; s++){
! if (filterPoolName.equals(realPoolName)){
! filterPool = pool;
! }
! else if (realPoolName.endsWith(filterPoolName)){
! filterPoolName = segments[segments.length - s] + '.' + filterPoolName;
! }
! else {
! // no match
! break;
}
! }
}
--- 942,977 ----
if (mgr != null && segments.length > 1){
+ int segNo = 0;
ISystemFilterPool filterPool = null;
ISystemFilterPool[] filterPools = mgr.getSystemFilterPools();
for (int p = 0; p < filterPools.length && filterPool == null; p++){
+ segNo = 2; // initial segment number for filter pool is 2nd to last
+
ISystemFilterPool pool = filterPools[p];
String realPoolName = pool.getName();
! // check for match
!
! while (filterPool == null && segNo < segments.length){
! String filterPoolName = segments[segments.length - segNo];
!
! for (int s = segNo + 1; s < segments.length && filterPool == null; s++){
! if (filterPoolName.equals(realPoolName)){
! filterPool = pool;
! }
! else if (realPoolName.endsWith(filterPoolName)){
! filterPoolName = segments[segments.length - s] + '.' + filterPoolName;
! }
! else {
! // no match
! break;
! }
! }
! if (filterPool == null){
! segNo++; // move further up the string
}
! }
}
***************
*** 975,978 ****
--- 979,994 ----
if (filterPool != null)
{
+ // name of the filter is the last segment
+ //String filterName = segments[segments.length - 1];
+ StringBuffer filterBuf = new StringBuffer();
+ for (int i = segNo - 1; i > 0; i--){ // dealing with filtername that potentially had a dot in it
+ String filterPartName = segments[segments.length - i];
+ filterBuf.append(filterPartName);
+ if (i > 1){
+ filterBuf.append('.');
+ }
+ }
+ String filterName = filterBuf.toString();
+
ISystemFilter filter = filterPool.getSystemFilter(filterName);
ISystemFilterReference ref = filterMgr.getSystemFilterReference(this, filter);