1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-16 13:35:22 +02:00

[235800] Document and enforce underscore naming restriction for profiles and filter pools

https://bugs.eclipse.org/bugs/show_bug.cgi?id=235800
This commit is contained in:
David Dykstal 2008-06-06 20:02:11 +00:00
parent 80b7353f12
commit ead0d0ca2d
10 changed files with 71 additions and 22 deletions

View file

@ -3,7 +3,8 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2004, 2007. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." /> <meta name="copyright" content="Copyright (c) IBM Corporation and others 2004, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." />
<!-- David Dykstal (IBM) - [235800] Document naming restriction for profiles and filter pools -->
<link rel="stylesheet" type="text/css" href="../book.css" /> <link rel="stylesheet" type="text/css" href="../book.css" />
<title>Filters, filter pools, and filter pool references</title> <title>Filters, filter pools, and filter pool references</title>
</head> </head>
@ -12,6 +13,7 @@
<a name="cfilters"></a> <a name="cfilters"></a>
<h1 class="topictitle1">Filters, filter pools, and filter pool references</h1> <h1 class="topictitle1">Filters, filter pools, and filter pool references</h1>
<div> <div>
<h2>Filters and Filtering Resources</h2>
<p> <p>
The Remote System Explorer is a set of local client tools you use to The Remote System Explorer is a set of local client tools you use to
organize organize
@ -52,10 +54,10 @@ directory to a remote system will result in all the files in that folder being
copied, not just those that are revealed by the filter. This is consistent with copied, not just those that are revealed by the filter. This is consistent with
the way resources are managed elsewhere in Eclipse. the way resources are managed elsewhere in Eclipse.
</p> </p>
<h2>Filter Pools</h2>
<p> <p>
<a name="cfilters__poolsdesc"></a> <a name="cfilters__poolsdesc"></a>
If If you have been using the Remote System Explorer for some
you have been using the Remote System Explorer for some
time, your workspace might contain too many filters to navigate easily. time, your workspace might contain too many filters to navigate easily.
Or, Or,
you might just want to keep groups of filters separate if, for example, you might just want to keep groups of filters separate if, for example,
@ -85,7 +87,11 @@ appear in any other connections. (See the related links for more
information information
about filter pools.) about filter pools.)
</p> </p>
<p><a name="cfilters__filterstrings"></a>You <p>
Note: at time this filter pool names cannot contain three consecutive underscore characters.
</p>
<h2>Sharing Filters</h2>
<p>You
can share filter pools among many connections through can share filter pools among many connections through
the use of a <i>filter pool reference</i>. A filter pool reference is the use of a <i>filter pool reference</i>. A filter pool reference is
a mechanism a mechanism

View file

@ -1,9 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2004, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." /> <meta name="copyright" content="Copyright (c) IBM Corporation and others 2004, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." />
<!-- David Dykstal (IBM) - [235800] Document naming restriction for profiles and filter pools -->
<link rel="stylesheet" type="text/css" href="../book.css" /> <link rel="stylesheet" type="text/css" href="../book.css" />
<title> Remote System Explorer Profiles </title> <title> Remote System Explorer Profiles </title>
</head> </head>
@ -15,6 +17,9 @@
<p> <p>
All Remote System Explorer resources such as connections, filters, and filter pools are owned by a profile. Profiles help you manage these resources when you have a lot of connections. The Remote System Explorer creates two profiles when starting up for the first time: a <em>private profile</em>, usually named after the host name of the machine that creates the workspace, and a profile called <i> Team</i>. The intent is to be able to share the Team profile in the future with other members of your team. You can also create your own profiles. All Remote System Explorer resources such as connections, filters, and filter pools are owned by a profile. Profiles help you manage these resources when you have a lot of connections. The Remote System Explorer creates two profiles when starting up for the first time: a <em>private profile</em>, usually named after the host name of the machine that creates the workspace, and a profile called <i> Team</i>. The intent is to be able to share the Team profile in the future with other members of your team. You can also create your own profiles.
</p> </p>
<p>
Note: due to an internal restriction a profile name cannot contain three consecutive underscore characters at this time.
</p>
<div class="p"> <div class="p">
Profiles contain: Profiles contain:
<ul> <ul>

View file

@ -4,7 +4,8 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2004, 2007. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page."/> <meta name="copyright" content="Copyright (c) IBM Corporation and others 2004, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page."/>
<!-- David Dykstal (IBM) - [235800] Document naming restriction for profiles and filter pools -->
<link rel="stylesheet" type="text/css" href="../book.css"/> <link rel="stylesheet" type="text/css" href="../book.css"/>
<title>Creating a second profile</title> <title>Creating a second profile</title>
</head> </head>
@ -20,6 +21,9 @@ shared by all team members.</p>
<li>From the Team view's menu bar, click the "Create a new profile" button</li> <li>From the Team view's menu bar, click the "Create a new profile" button</li>
<li>Complete the "New Profile" wizard.</li> <li>Complete the "New Profile" wizard.</li>
</ol> </ol>
<p>
Note: due to an internal restriction a profile name cannot contain three consecutive underscore characters at this time.
</p>
<p><b class="reltaskshd">Related tasks</b><br/> <p><b class="reltaskshd">Related tasks</b><br/>
<a href="tbegindeleteprofile.html" title="">Deleting a profile</a><br/> <a href="tbegindeleteprofile.html" title="">Deleting a profile</a><br/>
</p> </p>

View file

@ -4,7 +4,8 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2004, 2007. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page."/> <meta name="copyright" content="Copyright (c) IBM Corporation and others 2004, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page."/>
<!-- David Dykstal (IBM) - [235800] Document naming restriction for profiles and filter pools -->
<link rel="stylesheet" type="text/css" href="../book.css"/> <link rel="stylesheet" type="text/css" href="../book.css"/>
<title>Configuring filter pools</title> <title>Configuring filter pools</title>
</head> </head>
@ -13,8 +14,8 @@
<a name="tmanagepools"></a> <a name="tmanagepools"></a>
<h1 class="topictitle1">Configuring filter pools</h1> <h1 class="topictitle1">Configuring filter pools</h1>
<div> <div>
<div class="p"> <p>
<p>If you have been using the Remote System Explorer for some If you have been using the Remote System Explorer for some
time, your workspace might contain too many filters to navigate easily. time, your workspace might contain too many filters to navigate easily.
Or, Or,
you might just want to keep groups of filters separate if, for example, you might just want to keep groups of filters separate if, for example,
@ -23,45 +24,52 @@ need to represent two distinct server environments in the Remote System
Explorer, Explorer,
regardless of how many filters you have. In either case, you can group regardless of how many filters you have. In either case, you can group
filters filters
into <i>filter pools</i>. </p> into <i>filter pools</i>.
<p>All filters live in filter pools, but these remain hidden unless you choose </p>
<p>
All filters live in filter pools, but these remain hidden unless you choose
to manage them explicitly. If you do not manage them yourself the Remote to manage them explicitly. If you do not manage them yourself the Remote
System Explorer manages them for you and all of your filters appear together System Explorer manages them for you and all of your filters appear together
in all connections. When you create filter pools, however, any filter you in all connections. When you create filter pools, however, any filter you
create within that filter pool is only present in connections that reference create within that filter pool is only present in connections that reference
that filter pool, and will not appear in any other connections. (See the that filter pool, and will not appear in any other connections. (See the
related links for more information about filter pools.)</p> related links for more information about filter pools.)
To illustrate the </p>
use of filter pools,</div> <p>To illustrate the use of filter pools,</p>
<ol> <ol>
<li><span>Click the menu button <img src="../images/gsarrow.gif" alt=""/> on <li><span>Click the menu button <img src="../images/gsarrow.gif" alt=""/> on
the toolbar for the Remote Systems view, and select <b>Show Filter the toolbar for the Remote Systems view, and select <b>Show Filter
Pools</b>.</span></li> Pools</b>.</span></li>
<li><span>Expand the <span style="font-weight: bold;">Local </span>system <li><span>Expand the <span style="font-weight: bold;">Local </span>system
and the <span style="font-weight: bold;">Local Files</span> subsystem, and the <span style="font-weight: bold;">Local Files</span> subsystem,
and you can now see your filters and you can now see your filters
listed under <b><i>Connection name</i> Filter Pool</b>.</span></li> listed under <b><i>Connection name</i> Filter Pool</b>.</span></li>
<li><span>Right-click <b>Local Files</b> and select <b>New &gt; <li><span>Right-click <b>Local Files</b> and select <b>New &gt;
Filter Pool</b>.</span></li> Filter Pool</b>.</span></li>
<li><span>Enter a pool name and click <b>Finish</b>. (You do not <li><span>Enter a pool name and click <b>Finish</b>. (You do not
need to need to
change your profile selection.) Your new filter pool displays change your profile selection.) Your new filter pool displays
underneath your underneath your
connection.</span></li> connection.</span></li>
<li><span>Right-click your new filter pool and select <b>New &gt; <li><span>Right-click your new filter pool and select <b>New &gt;
Filter</b><b></b>.</span></li> Filter</b><b></b>.</span></li>
<li><span>Complete the wizards as you normally would (see related <li><span>Complete the wizards as you normally would (see related
tasks). tasks).
When you are finished, you can see your new filters displayed in your When you are finished, you can see your new filters displayed in your
new filter pool.</span></li> new filter pool.</span></li>
</ol> </ol>
<div class="p">If you decide not to see the filter pools anymore, click <p>
If you decide not to see the filter pools anymore, click
the menu the menu
button <img src="../images/gsarrow.gif" alt=""/> on the toolbar for the button <img src="../images/gsarrow.gif" alt=""/> on the toolbar for the
Remote Remote
Systems view, and select <b>Show Filter Pools</b> again to deselect Systems view, and select <b>Show Filter Pools</b> again to deselect
the check the check
mark.</div> mark.
</p>
<p>
Note: at time this filter pool names cannot contain three consecutive underscore characters.
</p>
</div> </div>
<div> <div>
<p><b class="relconceptshd">Related concepts</b><br></br> <p><b class="relconceptshd">Related concepts</b><br></br>

View file

@ -15,6 +15,7 @@
* David Dykstal (IBM) - cleanup - format and javadoc * David Dykstal (IBM) - cleanup - format and javadoc
* Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
* David Dykstal (IBM) - [226561] Add API markup to RSE Javadocs where extend / implement is allowed * David Dykstal (IBM) - [226561] Add API markup to RSE Javadocs where extend / implement is allowed
* David Dykstal (IBM) - [235800] Document naming restriction for profiles and filter pools
*******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.core.filters; package org.eclipse.rse.core.filters;
@ -122,7 +123,11 @@ public interface ISystemFilterPool extends IRSEPersistableReferencedObject, ISys
public String getName(); public String getName();
/** /**
* @param value The new value of the Name attribute * Sets the filter pool name for this filter pool.
* Filter pool names must not contain 3 consecutive underscores "___" since these are used to separate
* profile names from filter pool names in a filter pool reference.
* @param value The new value of the Name attribute.
* @throws IllegalArgumentException if the name contains three consecutive underscore characters.
*/ */
public void setName(String value); public void setName(String value);

View file

@ -17,6 +17,7 @@
* David Dykstal (IBM) - [222270] clean up interfaces in org.eclipse.rse.core.filters * David Dykstal (IBM) - [222270] clean up interfaces in org.eclipse.rse.core.filters
* Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
* David Dykstal (IBM) - [226561] Add API markup to RSE Javadocs where extend / implement is allowed * David Dykstal (IBM) - [226561] Add API markup to RSE Javadocs where extend / implement is allowed
* David Dykstal (IBM) - [235800] Document naming restriction for profiles and filter pools
*******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.core.filters; package org.eclipse.rse.core.filters;
@ -155,6 +156,7 @@ public interface ISystemFilterPoolManager extends IRSEPersistableContainer {
* If the operation is successful, the pool will be saved to disk. * If the operation is successful, the pool will be saved to disk.
* <p> * <p>
* If this operation fails unexpectedly, an exception will be thrown. * If this operation fails unexpectedly, an exception will be thrown.
* @see ISystemFilterPool#setName(String)
*/ */
public ISystemFilterPool createSystemFilterPool(String name, boolean isDeletable) throws Exception; public ISystemFilterPool createSystemFilterPool(String name, boolean isDeletable) throws Exception;
@ -197,6 +199,7 @@ public interface ISystemFilterPoolManager extends IRSEPersistableContainer {
* </ul> * </ul>
* @param pool The filter pool object to rename * @param pool The filter pool object to rename
* @param newName The new name to give the pool * @param newName The new name to give the pool
* @see ISystemFilterPool#setName(String)
*/ */
public void renameSystemFilterPool(ISystemFilterPool pool, String newName) throws Exception; public void renameSystemFilterPool(ISystemFilterPool pool, String newName) throws Exception;
@ -214,6 +217,7 @@ public interface ISystemFilterPoolManager extends IRSEPersistableContainer {
* @param pool The filter pool to copy * @param pool The filter pool to copy
* @param newName The new name to give the copied pool * @param newName The new name to give the copied pool
* @return the new copy of the copied system filter pool * @return the new copy of the copied system filter pool
* @see ISystemFilterPool#setName(String)
*/ */
public ISystemFilterPool copySystemFilterPool(ISystemFilterPoolManager targetMgr, ISystemFilterPool pool, String newName) throws Exception; public ISystemFilterPool copySystemFilterPool(ISystemFilterPoolManager targetMgr, ISystemFilterPool pool, String newName) throws Exception;
@ -249,6 +253,7 @@ public interface ISystemFilterPoolManager extends IRSEPersistableContainer {
* @param oldPool The filter pool to move * @param oldPool The filter pool to move
* @param newName The new name to give the moved pool * @param newName The new name to give the moved pool
* @return the new copy of the moved system filter pool * @return the new copy of the moved system filter pool
* @see ISystemFilterPool#setName(String)
*/ */
public ISystemFilterPool moveSystemFilterPool(ISystemFilterPoolManager targetMgr, ISystemFilterPool oldPool, String newName) throws Exception; public ISystemFilterPool moveSystemFilterPool(ISystemFilterPoolManager targetMgr, ISystemFilterPool oldPool, String newName) throws Exception;

View file

@ -19,6 +19,7 @@
* David Dykstal (IBM) - [202630] getDefaultPrivateProfile() and ensureDefaultPrivateProfile() are inconsistent * David Dykstal (IBM) - [202630] getDefaultPrivateProfile() and ensureDefaultPrivateProfile() are inconsistent
* David Dykstal (IBM) - [200735][Persistence] Delete a profile that contains a connection and restart, profile is back without connections * David Dykstal (IBM) - [200735][Persistence] Delete a profile that contains a connection and restart, profile is back without connections
* David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement * David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement
* David Dykstal (IBM) - [235800] Document naming restriction for profiles and filter pools
*******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.core.model; package org.eclipse.rse.core.model;
@ -63,6 +64,7 @@ public interface ISystemProfile extends IRSEModelObject {
* Profile names must not contain three consecutive underscores "___", since these are used * Profile names must not contain three consecutive underscores "___", since these are used
* to separate a profile name from a filter pool name in a filter pool reference. * to separate a profile name from a filter pool name in a filter pool reference.
* @param value The new value of the Name attribute * @param value The new value of the Name attribute
* @throws IllegalArgumentException if the name contains three consecutive underscore characters.
*/ */
void setName(String value); void setName(String value);

View file

@ -28,6 +28,7 @@
* Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags * Martin Oberhuber (Wind River) - [cleanup] Add API "since" Javadoc tags
* David Dykstal (IBM) - [168976][api] move ISystemNewConnectionWizardPage from core to UI * David Dykstal (IBM) - [168976][api] move ISystemNewConnectionWizardPage from core to UI
* David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement * David Dykstal (IBM) - [226561] Add API markup to RSE javadocs for extend / implement
* David Dykstal (IBM) - [235800] Document naming restriction for profiles and filter pools
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.core.model; package org.eclipse.rse.core.model;
@ -179,11 +180,15 @@ public interface ISystemRegistry extends ISchedulingRule, IAdaptable, ISystemVie
/** /**
* Create a SystemProfile given its name and whether or not to make it active * Create a SystemProfile given its name and whether or not to make it active
* Note that there are some naming restrictions on profile names.
* @see ISystemProfile#setName(String)
*/ */
public ISystemProfile createSystemProfile(String profileName, boolean makeActive) throws Exception; public ISystemProfile createSystemProfile(String profileName, boolean makeActive) throws Exception;
/** /**
* Copy a SystemProfile. All connections connection data is copied. * Copy a SystemProfile. All connections connection data is copied.
* Note that there are some naming restrictions on profile names.
* @see ISystemProfile#setName(String)
* @param profile Source profile to copy * @param profile Source profile to copy
* @param newName Unique name to give copied profile * @param newName Unique name to give copied profile
* @param makeActive whether to make the copied profile active or not * @param makeActive whether to make the copied profile active or not
@ -195,6 +200,8 @@ public interface ISystemRegistry extends ISchedulingRule, IAdaptable, ISystemVie
/** /**
* Rename a SystemProfile. Rename is propagated to all subsystem factories so * Rename a SystemProfile. Rename is propagated to all subsystem factories so
* they can rename their filter pool managers and whatever else is required. * they can rename their filter pool managers and whatever else is required.
* Note that there are some naming restrictions on profile names.
* @see ISystemProfile#setName(String)
*/ */
public void renameSystemProfile(ISystemProfile profile, String newName) throws Exception; public void renameSystemProfile(ISystemProfile profile, String newName) throws Exception;

View file

@ -359,6 +359,9 @@ public class SystemFilterPool extends SystemPersistableReferencedObject
*/ */
public void setName(String name) public void setName(String name)
{ {
if (name.indexOf(SystemFilterPoolReference.DELIMITER) >= 0) {
throw new IllegalArgumentException("Cannot have ___ in filter pool name.");
}
if (this.name == null || !this.name.equals(name) ) if (this.name == null || !this.name.equals(name) )
{ {
this.name = name; this.name = name;

View file

@ -42,6 +42,7 @@ import org.eclipse.rse.core.model.RSEModelObject;
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
import org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy; import org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy;
import org.eclipse.rse.internal.core.RSECoreMessages; import org.eclipse.rse.internal.core.RSECoreMessages;
import org.eclipse.rse.internal.core.filters.SystemFilterPoolReference;
import org.eclipse.rse.persistence.IRSEPersistenceProvider; import org.eclipse.rse.persistence.IRSEPersistenceProvider;
/** /**
@ -230,6 +231,9 @@ public class SystemProfile extends RSEModelObject implements ISystemProfile, IAd
* @see org.eclipse.rse.core.model.ISystemProfile#setName(java.lang.String) * @see org.eclipse.rse.core.model.ISystemProfile#setName(java.lang.String)
*/ */
public void setName(String newName) { public void setName(String newName) {
if (newName.indexOf(SystemFilterPoolReference.DELIMITER) >= 0) {
throw new IllegalArgumentException("Cannot have ___ in profile name.");
}
String oldName = name; String oldName = name;
if (!newName.equals(oldName)) { if (!newName.equals(oldName)) {
name = newName; name = newName;