1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-04 23:05:47 +02:00

[202630][api][persistence] SystemProfileManager.getDefaultPrivateSystemProfile() is inconsistent with ensureDefaultPrivateProfile()

https://bugs.eclipse.org/bugs/show_bug.cgi?id=202630
This commit is contained in:
David Dykstal 2008-03-14 17:39:14 +00:00
parent af25ae2828
commit 29da955c06
12 changed files with 383 additions and 545 deletions

View file

@ -3,7 +3,7 @@
<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." />
<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>
@ -13,30 +13,27 @@
</a> <h1 class="topictitle1"> Remote System Explorer Profiles </h1> </a> <h1 class="topictitle1"> Remote System Explorer Profiles </h1>
<div> <div>
<p> <p>
When you define your first connection to your remote server, you will also define your first profile. 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 a unique profile per team member (that person's <em>private profile</em>), plus a common 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>
<div class="p"> <div class="p">
Profiles contain: Profiles contain:
<ul> <ul>
<li> <li>
Connections -- including subsystem properties. User IDs and passwords are not shared. Connections -- including subsystem properties. User IDs and passwords are not shared.
</li> </li>
<li> <li>
Filters, filter pools, and filters pool references Filters, filter pools, and filters pool references
</li> </li>
<li> <li>
User-defined actions Other artifacts associated with a profile
</li>
<li>
Compile commands
</li> </li>
</ul> </ul>
</div> </div>
<p> <p>
Profiles can be active, or inactive. By default, only your private profile and the Team profile are active. The Remote System Explorer displays all connections from all active profiles and, within a connection, allows filter pools to be referenced from any active profile. Further, the user actions and compile commands shown in the right-click menu for a remote resource are from all active profiles. Profiles can be active or inactive. The Remote System Explorer displays all connections from all active profiles and, within a connection, allows filter pools to be referenced from any active profile. Further, the user actions and compile commands shown in the right-click menu for a remote resource are from all active profiles.
</p> </p>
<p> <p>
Your first profile will be for your local workstation. When you complete the steps for your first connection, you can decide whether to use your personal profile or the Team profile so that in the future you can share resources and information with other people. Your private profile cannot be deleted or made inactive.
</p> </p>
<div class="p"> <div class="p">
<!-- TODO rework <!-- TODO rework

View file

@ -16,6 +16,7 @@
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
* David Dykstal (IBM) - [197036] removed createHost() shortcut (should use ISystemRegistry), * David Dykstal (IBM) - [197036] removed createHost() shortcut (should use ISystemRegistry),
* cleaned javadoc for getFilterPools() * cleaned javadoc for getFilterPools()
* David Dykstal (IBM) - [202630] getDefaultPrivateProfile() and ensureDefaultPrivateProfile() are inconsistent
*******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.core.model; package org.eclipse.rse.core.model;
@ -96,7 +97,8 @@ public interface ISystemProfile extends IRSEModelObject {
/** /**
* Activates or deactivates a profile. If the profile is already in the * Activates or deactivates a profile. If the profile is already in the
* requested state, this will do nothing. * requested state, this will do nothing. The default private system profile
* cannot be deactivated and such a request will be ignored.
* @param flag true to activate the profile, false to deactivate it. * @param flag true to activate the profile, false to deactivate it.
* @see ISystemProfile#isActive() * @see ISystemProfile#isActive()
*/ */

View file

@ -13,6 +13,7 @@
* *
* Contributors: * Contributors:
* David Dykstal (IBM) - [197036] added commitSystemProfile operation to interface * David Dykstal (IBM) - [197036] added commitSystemProfile operation to interface
* David Dykstal (IBM) - [202630] getDefaultPrivateProfile() and ensureDefaultPrivateProfile() are inconsistent
*******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.core.model; package org.eclipse.rse.core.model;
@ -38,7 +39,8 @@ public interface ISystemProfileManager {
public ISystemProfile createSystemProfile(String name, boolean makeActive); public ISystemProfile createSystemProfile(String name, boolean makeActive);
/** /**
* Toggle an existing profile's state between active and inactive * Toggle an existing profile's state between active and inactive.
* The default private profile cannot be deactivated and such a request will be ignored.
* @param profile the profile to (in)activate * @param profile the profile to (in)activate
* @param makeActive the state to make this profile * @param makeActive the state to make this profile
*/ */
@ -97,7 +99,7 @@ public interface ISystemProfileManager {
public void renameSystemProfile(ISystemProfile profile, String newName); public void renameSystemProfile(ISystemProfile profile, String newName);
/** /**
* Delete the given profile * Delete the given profile. The default private profile cannot be deleted and such a request will be ignored.
* @param profile the name of the profile to delete. * @param profile the name of the profile to delete.
* @param persist true if the deletion is meant to be persisted as well, false if the deletion is just in the * @param persist true if the deletion is meant to be persisted as well, false if the deletion is just in the
* model. * model.

View file

@ -24,6 +24,7 @@
* are able to delay the creation of subsystems. * are able to delay the creation of subsystems.
* David Dykstal (IBM) - [217556] remove service subsystem types * David Dykstal (IBM) - [217556] remove service subsystem types
* Martin Oberhuber (Wind River) - [215820] Move SystemRegistry implementation to Core * Martin Oberhuber (Wind River) - [215820] Move SystemRegistry implementation to Core
* David Dykstal (IBM) - [202630] getDefaultPrivateProfile() and ensureDefaultPrivateProfile() are inconsistent
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.core.model; package org.eclipse.rse.core.model;
@ -188,6 +189,7 @@ public interface ISystemRegistry extends ISchedulingRule, IAdaptable, ISystemVie
/** /**
* Delete a SystemProfile. Prior to physically deleting the profile, we delete all * Delete a SystemProfile. Prior to physically deleting the profile, we delete all
* the connections it has, all the subsystems they have. * the connections it has, all the subsystems they have.
* The default private profile cannot be deleted and such a request will be ignored.
* <p> * <p>
* As well, all the filter pools for this profile are deleted, and subsequently any * As well, all the filter pools for this profile are deleted, and subsequently any
* cross references from subsystems in connections in other profiles are removed. * cross references from subsystems in connections in other profiles are removed.
@ -197,7 +199,9 @@ public interface ISystemRegistry extends ISchedulingRule, IAdaptable, ISystemVie
public void deleteSystemProfile(ISystemProfile profile) throws Exception; public void deleteSystemProfile(ISystemProfile profile) throws Exception;
/** /**
* Make or unmake the given profile active * Make or unmake the given profile active.
* The default private profile cannot be deactivated and such
* a request will be ignored.
*/ */
public void setSystemProfileActive(ISystemProfile profile, boolean makeActive); public void setSystemProfileActive(ISystemProfile profile, boolean makeActive);

View file

@ -17,6 +17,7 @@
* Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
* David Dykstal (IBM) - [197036] changed getFilterPools to not force the loading of subsystem configurations * David Dykstal (IBM) - [197036] changed getFilterPools to not force the loading of subsystem configurations
* removed createHost, migrated commit logic to SystemProfileManager * removed createHost, migrated commit logic to SystemProfileManager
* David Dykstal (IBM) - [202630] getDefaultPrivateProfile() and ensureDefaultPrivateProfile() are inconsistent
*******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.internal.core.model; package org.eclipse.rse.internal.core.model;
@ -28,6 +29,7 @@ import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.Platform;
import org.eclipse.rse.core.RSECorePlugin; import org.eclipse.rse.core.RSECorePlugin;
import org.eclipse.rse.core.RSEPreferencesManager;
import org.eclipse.rse.core.filters.ISystemFilterPool; import org.eclipse.rse.core.filters.ISystemFilterPool;
import org.eclipse.rse.core.filters.ISystemFilterPoolManager; import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.core.model.IHost;
@ -129,13 +131,33 @@ public class SystemProfile extends RSEModelObject implements ISystemProfile, IAd
{ {
return isActive; return isActive;
} }
/**
* Reset whether this profile is currently active. /* (non-Javadoc)
* @see org.eclipse.rse.core.model.ISystemProfile#setActive(boolean)
*/ */
public void setActive(boolean active) public void setActive(boolean activate) {
{ if (activate) {
this.isActive = active; activate();
setDirty(true); } else {
deactivate();
}
}
private void activate() {
if (!isActive) {
isActive = true;
setDirty(true);
RSEPreferencesManager.addActiveProfile(getName());
}
}
private void deactivate() {
ISystemProfile defaultProfile = mgr.getDefaultPrivateSystemProfile();
if (isActive && this != defaultProfile) {
isActive = false;
setDirty(true);
RSEPreferencesManager.deleteActiveProfile(getName());
}
} }
/** /**
@ -176,13 +198,18 @@ public class SystemProfile extends RSEModelObject implements ISystemProfile, IAd
return RSECoreMessages.RESID_MODELOBJECTS_PROFILE_DESCRIPTION; return RSECoreMessages.RESID_MODELOBJECTS_PROFILE_DESCRIPTION;
} }
/** /* (non-Javadoc)
* @generated This field/method will be replaced during code generation. * @see org.eclipse.rse.core.model.ISystemProfile#setName(java.lang.String)
*/ */
public void setName(String newName) public void setName(String newName) {
{ String oldName = name;
name = newName; if (!newName.equals(oldName)) {
setDirty(true); name = newName;
setDirty(true);
if (isActive) {
RSEPreferencesManager.renameActiveProfile(oldName, newName);
}
}
} }
/** /**

View file

@ -19,6 +19,7 @@
* - [189219] [team] Inactive Profiles become active after workbench restart * - [189219] [team] Inactive Profiles become active after workbench restart
* David Dykstal (IBM) - [197036] added implementation of run() for commit transaction support * David Dykstal (IBM) - [197036] added implementation of run() for commit transaction support
* David Dykstal (IBM) - [222376] NPE if starting on a workspace with an old mark and a renamed default profile * David Dykstal (IBM) - [222376] NPE if starting on a workspace with an old mark and a renamed default profile
* David Dykstal (IBM) - [202630] getDefaultPrivateProfile() and ensureDefaultPrivateProfile() are inconsistent
*******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.internal.core.model; package org.eclipse.rse.internal.core.model;
@ -151,10 +152,7 @@ public class SystemProfileManager implements ISystemProfileManager {
deleteSystemProfile(existingProfile, false); // replace the existing one with a new profile deleteSystemProfile(existingProfile, false); // replace the existing one with a new profile
} }
ISystemProfile newProfile = internalCreateSystemProfile(name); ISystemProfile newProfile = internalCreateSystemProfile(name);
newProfile.setActive(makeActive); newProfile.setActive(makeActive);
if (makeActive) {
RSEPreferencesManager.addActiveProfile(name);
}
newProfile.commit(); newProfile.commit();
return newProfile; return newProfile;
} }
@ -163,11 +161,6 @@ public class SystemProfileManager implements ISystemProfileManager {
* @see org.eclipse.rse.core.model.ISystemProfileManager#makeSystemProfileActive(org.eclipse.rse.core.model.ISystemProfile, boolean) * @see org.eclipse.rse.core.model.ISystemProfileManager#makeSystemProfileActive(org.eclipse.rse.core.model.ISystemProfile, boolean)
*/ */
public void makeSystemProfileActive(ISystemProfile profile, boolean makeActive) { public void makeSystemProfileActive(ISystemProfile profile, boolean makeActive) {
boolean wasActive = isSystemProfileActive(profile.getName());
if (wasActive && !makeActive)
RSEPreferencesManager.deleteActiveProfile(profile.getName());
else if (makeActive && !wasActive)
RSEPreferencesManager.addActiveProfile(profile.getName());
profile.setActive(makeActive); profile.setActive(makeActive);
profile.commit(); profile.commit();
} }
@ -236,12 +229,8 @@ public class SystemProfileManager implements ISystemProfileManager {
* @see org.eclipse.rse.core.model.ISystemProfileManager#renameSystemProfile(org.eclipse.rse.core.model.ISystemProfile, java.lang.String) * @see org.eclipse.rse.core.model.ISystemProfileManager#renameSystemProfile(org.eclipse.rse.core.model.ISystemProfile, java.lang.String)
*/ */
public void renameSystemProfile(ISystemProfile profile, String newName) { public void renameSystemProfile(ISystemProfile profile, String newName) {
boolean isActive = isSystemProfileActive(profile.getName());
String oldName = profile.getName(); String oldName = profile.getName();
profile.setName(newName); profile.setName(newName);
if (isActive) {
RSEPreferencesManager.renameActiveProfile(oldName, newName);
}
// Commit the profile to reflect the name change // Commit the profile to reflect the name change
RSECorePlugin.getThePersistenceManager().commitProfile(profile, 5000); RSECorePlugin.getThePersistenceManager().commitProfile(profile, 5000);
// Delete the profile by the old name, which is done in a separate job. // Delete the profile by the old name, which is done in a separate job.
@ -252,19 +241,17 @@ public class SystemProfileManager implements ISystemProfileManager {
* @see org.eclipse.rse.core.model.ISystemProfileManager#deleteSystemProfile(org.eclipse.rse.core.model.ISystemProfile, boolean) * @see org.eclipse.rse.core.model.ISystemProfileManager#deleteSystemProfile(org.eclipse.rse.core.model.ISystemProfile, boolean)
*/ */
public void deleteSystemProfile(ISystemProfile profile, boolean persist) { public void deleteSystemProfile(ISystemProfile profile, boolean persist) {
String oldName = profile.getName(); if (profile != defaultProfile) {
boolean isActive = isSystemProfileActive(oldName); String oldName = profile.getName();
_profiles.remove(profile); boolean isActive = isSystemProfileActive(oldName);
if (isActive) { _profiles.remove(profile);
RSEPreferencesManager.deleteActiveProfile(oldName); if (isActive) {
} RSEPreferencesManager.deleteActiveProfile(oldName);
if (persist) { }
IRSEPersistenceProvider provider = profile.getPersistenceProvider(); if (persist) {
RSECorePlugin.getThePersistenceManager().deleteProfile(provider, oldName); IRSEPersistenceProvider provider = profile.getPersistenceProvider();
} RSECorePlugin.getThePersistenceManager().deleteProfile(provider, oldName);
if (profile == defaultProfile) { }
defaultProfile = null;
ensureDefaultPrivateProfile();
} }
} }
@ -504,6 +491,7 @@ public class SystemProfileManager implements ISystemProfileManager {
logger.logWarning("Only one Profile Team exists - there is no Default Profile"); //$NON-NLS-1$ logger.logWarning("Only one Profile Team exists - there is no Default Profile"); //$NON-NLS-1$
createDefaultPrivateProfile(); createDefaultPrivateProfile();
} }
defaultProfile.setActive(true); // ensure that the default profile is active
} }
private void ensureDefaultTeamProfile() { private void ensureDefaultTeamProfile() {

View file

@ -44,6 +44,7 @@
* rewrote getSubSystemConfigurationsBySystemType to be able to delay the creation (and loading) of subsystem configurations * rewrote getSubSystemConfigurationsBySystemType to be able to delay the creation (and loading) of subsystem configurations
* David Dykstal (IBM) - [217556] remove service subsystem types * David Dykstal (IBM) - [217556] remove service subsystem types
* Martin Oberhuber (Wind River) - [215820] Move SystemRegistry implementation to Core * Martin Oberhuber (Wind River) - [215820] Move SystemRegistry implementation to Core
* David Dykstal (IBM) - [202630] getDefaultPrivateProfile() and ensureDefaultPrivateProfile() are inconsistent
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.core.model; package org.eclipse.rse.internal.core.model;
@ -620,149 +621,99 @@ public class SystemRegistry implements ISystemRegistry
return newProfile; return newProfile;
} }
/** /* (non-Javadoc)
* Delete a SystemProfile. Prior to physically deleting the profile, we delete all * @see org.eclipse.rse.core.model.ISystemRegistry#deleteSystemProfile(org.eclipse.rse.core.model.ISystemProfile)
* the connections it has (first disconnecting if they are connected), and all the subsystems they have.
* <p>
* As well, all the filter pools for this profile are deleted, and subsequently any
* cross references from subsystems in connections in other profiles are removed.
* <p>
* A delete event is fired for every connection deleted.
*/ */
public void deleteSystemProfile(ISystemProfile profile) throws Exception public void deleteSystemProfile(ISystemProfile profile) throws Exception {
{ ISystemProfileManager manager = getSystemProfileManager();
// step 0: load the world! ISystemProfile defaultProfile = manager.getDefaultPrivateSystemProfile();
loadAll(); // force the world into memory! if (profile != defaultProfile) {
// load everything
// step 1: delete subsystems and connections loadAll();
IHost[] connections = getHostsByProfile(profile); // remove connections
//SystemConnectionPool pool = getConnectionPool(profile); IHost[] connections = getHostsByProfile(profile);
for (int idx = 0; idx < connections.length; idx++) for (int idx = 0; idx < connections.length; idx++) {
{ deleteHost(connections[idx]);
deleteHost(connections[idx]);
}
// step 2: bring to life every factory and ask it to delete all filter pools for this profile
if (subsystemConfigurationProxies != null)
{
for (int idx = 0; idx < subsystemConfigurationProxies.length; idx++)
{
ISubSystemConfiguration factory = subsystemConfigurationProxies[idx].getSubSystemConfiguration();
if (factory != null)
factory.deletingSystemProfile(profile);
} }
// remove filter pools for this profile
if (subsystemConfigurationProxies != null) {
for (int idx = 0; idx < subsystemConfigurationProxies.length; idx++) {
ISubSystemConfiguration factory = subsystemConfigurationProxies[idx].getSubSystemConfiguration();
if (factory != null) factory.deletingSystemProfile(profile);
}
}
// remove the profile
manager.deleteSystemProfile(profile, true);
// fire events
if (connections.length > 0) { // defect 42112
fireEvent(new SystemResourceChangeEvent(connections, ISystemResourceChangeEvents.EVENT_DELETE_MANY, this));
}
fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_REMOVED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_PROFILE, profile, null);
} }
// last step... physically blow away the profile...
getSystemProfileManager().deleteSystemProfile(profile, true);
////Listening to Events now
//SystemPreferencesManager.setConnectionNamesOrder(); // update preferences order list
if (connections.length > 0) // defect 42112
fireEvent(new SystemResourceChangeEvent(connections, ISystemResourceChangeEvents.EVENT_DELETE_MANY, this));
fireModelChangeEvent(
ISystemModelChangeEvents.SYSTEM_RESOURCE_REMOVED,
ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_PROFILE,
profile, null);
} }
/** /* (non-Javadoc)
* Make or unmake the given profile active. * @see org.eclipse.rse.core.model.ISystemRegistry#setSystemProfileActive(org.eclipse.rse.core.model.ISystemProfile, boolean)
* If switching to inactive, we force a disconnect for all subsystems of all connections in this profile.
*/ */
public void setSystemProfileActive(ISystemProfile profile, boolean makeActive) public void setSystemProfileActive(ISystemProfile profile, boolean makeActive) {
{ ISystemProfileManager manager = getSystemProfileManager();
// Test if there are any filter pools in this profile that are referenced by another active profile... ISystemProfile defaultProfile = manager.getDefaultPrivateSystemProfile();
Vector activeReferenceVector = new Vector(); if (profile != defaultProfile) {
if (!makeActive && (subsystemConfigurationProxies != null)) // Test if there are any filter pools in this profile that are referenced by another active profile...
{ Vector activeReferenceVector = new Vector();
for (int idx = 0; idx < subsystemConfigurationProxies.length; idx++) if (!makeActive && (subsystemConfigurationProxies != null)) {
{ for (int idx = 0; idx < subsystemConfigurationProxies.length; idx++) {
//if (subsystemConfigurationProxies[idx].isSubSystemConfigurationActive()) // don't bother if not yet alive
{
ISubSystemConfiguration factory = subsystemConfigurationProxies[idx].getSubSystemConfiguration(); ISubSystemConfiguration factory = subsystemConfigurationProxies[idx].getSubSystemConfiguration();
if (factory != null) if (factory != null) {
{
ISubSystem[] activeReferences = factory.testForActiveReferences(profile); ISubSystem[] activeReferences = factory.testForActiveReferences(profile);
if (activeReferences != null) if (activeReferences != null) for (int jdx = 0; jdx < activeReferences.length; jdx++)
for (int jdx = 0; jdx < activeReferences.length; jdx++) activeReferenceVector.addElement(activeReferences[jdx]);
activeReferenceVector.addElement(activeReferences[jdx]);
} }
} }
} }
} if (activeReferenceVector.size() > 0) {
if (activeReferenceVector.size() > 0) String msg = NLS.bind(RSECoreMessages.MSG_LOADING_PROFILE_WARNING_FILTERPOOL_REFS, profile.getName());
{ RSECorePlugin.getDefault().getLogger().logWarning(msg);
//RSEG1069: De-Activativing profile {0} for which there are subsystems containing references to filter pools: for (int idx = 0; idx < activeReferenceVector.size(); idx++) {
String msg = NLS.bind(RSECoreMessages.MSG_LOADING_PROFILE_WARNING_FILTERPOOL_REFS, profile.getName()); ISubSystem activeReference = (ISubSystem) activeReferenceVector.elementAt(idx);
RSECorePlugin.getDefault().getLogger().logWarning(msg); msg = " " + activeReference.getName(); //$NON-NLS-1$
for (int idx = 0; idx < activeReferenceVector.size(); idx++) msg += NLS.bind(RSECoreMessages.MSG_LOADING_PROFILE_WARNING_FILTERPOOL_REF, activeReference.getHost().getAliasName(), activeReference.getSystemProfileName());
{ RSECorePlugin.getDefault().getLogger().logWarning(msg);
//\ \ {refname} in connection {1} in profile {2} }
ISubSystem activeReference = (ISubSystem) activeReferenceVector.elementAt(idx); ISubSystem firstSubSystem = (ISubSystem) activeReferenceVector.elementAt(0);
msg = " " + activeReference.getName(); //$NON-NLS-1$ String connectionName = firstSubSystem.getHost().getSystemProfileName() + "." + firstSubSystem.getHost().getAliasName(); //$NON-NLS-1$
msg += NLS.bind(RSECoreMessages.MSG_LOADING_PROFILE_WARNING_FILTERPOOL_REF, msg = NLS.bind(RSECoreMessages.MSG_LOADING_PROFILE_SHOULDNOTBE_DEACTIVATED, profile.getName(), connectionName);
activeReference.getHost().getAliasName(),
activeReference.getSystemProfileName());
RSECorePlugin.getDefault().getLogger().logWarning(msg); RSECorePlugin.getDefault().getLogger().logWarning(msg);
} }
ISubSystem firstSubSystem = (ISubSystem) activeReferenceVector.elementAt(0); getSystemProfileManager().makeSystemProfileActive(profile, makeActive);
String connectionName = firstSubSystem.getHost().getSystemProfileName() + "." + firstSubSystem.getHost().getAliasName(); //$NON-NLS-1$ // Each factory may have to load the subsystems for connections that are suddenly active.
//RSEG1069: Warning. Profile '%1' should be active. Active connection '%2' contains a reference to it. if (subsystemConfigurationProxies != null) {
msg = NLS.bind(RSECoreMessages.MSG_LOADING_PROFILE_SHOULDNOTBE_DEACTIVATED, profile.getName(), connectionName); for (int idx = 0; idx < subsystemConfigurationProxies.length; idx++) {
RSECorePlugin.getDefault().getLogger().logWarning(msg); if (subsystemConfigurationProxies[idx].isSubSystemConfigurationActive()) { // don't bother if not yet alive
//// I think it should be sufficient to log this as warning rather than open a dialog ISubSystemConfiguration factory = subsystemConfigurationProxies[idx].getSubSystemConfiguration();
//SystemMessage sysMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_LOADING_PROFILE_SHOULDNOTBE_DEACTIVATED); if (factory != null) factory.changingSystemProfileActiveStatus(profile, makeActive);
//sysMsg.makeSubstitution(profile.getName(), connectionName); }
//SystemMessageDialog msgDlg = new SystemMessageDialog(null, sysMsg);
//msgDlg.open();
}
getSystemProfileManager().makeSystemProfileActive(profile, makeActive);
// To be safe, we tell each subsystem factory about the change in status.
// At a minimum, each factory may have to load the subsystems for connections that
// are suddenly active.
if (subsystemConfigurationProxies != null)
{
for (int idx = 0; idx < subsystemConfigurationProxies.length; idx++)
{
if (subsystemConfigurationProxies[idx].isSubSystemConfigurationActive()) // don't bother if not yet alive
{
ISubSystemConfiguration factory = subsystemConfigurationProxies[idx].getSubSystemConfiguration();
if (factory != null)
factory.changingSystemProfileActiveStatus(profile, makeActive);
} }
} }
} // notify the hosts that are affected by this change
IHost[] affectedConnections = getHostsByProfile(profile);
IHost[] affectedConnections = getHostsByProfile(profile); // delete...
//System.out.println("Affected Connection Count: " + affectedConnections.length); if (!makeActive) { // better disconnect all connections before we lose sight of them
if ((affectedConnections != null) && (affectedConnections.length > 0)) {
// delete... for (int idx = 0; idx < affectedConnections.length; idx++) {
if (!makeActive) // better disconnect all connections before we lose sight of them disconnectAllSubSystems(affectedConnections[idx]);
{ }
if ((affectedConnections != null) && (affectedConnections.length > 0)) SystemResourceChangeEvent event = new SystemResourceChangeEvent(affectedConnections, ISystemResourceChangeEvents.EVENT_DELETE_MANY, this);
{ fireEvent(event);
for (int idx = 0; idx < affectedConnections.length; idx++)
{
disconnectAllSubSystems(affectedConnections[idx]);
} }
SystemResourceChangeEvent event = new SystemResourceChangeEvent(affectedConnections, ISystemResourceChangeEvents.EVENT_DELETE_MANY, this); }
// add...
else if ((affectedConnections != null) && (affectedConnections.length > 0)) {
SystemResourceChangeEvent event = new SystemResourceChangeEvent(affectedConnections, ISystemResourceChangeEvents.EVENT_ADD_MANY, this);
fireEvent(event); fireEvent(event);
} }
fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_CHANGED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_PROFILE, profile, null);
} }
// add...
else if ((affectedConnections != null) && (affectedConnections.length > 0))
{
SystemResourceChangeEvent event = new SystemResourceChangeEvent(affectedConnections, ISystemResourceChangeEvents.EVENT_ADD_MANY, this);
fireEvent(event);
}
////Listening to Events now
//SystemPreferencesManager.setConnectionNamesOrder(); // update preferences order list
fireModelChangeEvent(
ISystemModelChangeEvents.SYSTEM_RESOURCE_CHANGED,
ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_PROFILE,
profile, null);
} }
// private profile methods... // private profile methods...
@ -2905,7 +2856,7 @@ public class SystemRegistry implements ISystemRegistry
proxies[idx].getSubSystemConfiguration(); proxies[idx].getSubSystemConfiguration();
} }
// step 0_b: force every subsystem of every connection to be active! // step 0_b: force every subsystem of every connection to be active
IHost[] connections = getHosts(); IHost[] connections = getHosts();
for (int idx = 0; idx < connections.length; idx++) for (int idx = 0; idx < connections.length; idx++)
getSubSystems(connections[idx]); getSubSystems(connections[idx]);

View file

@ -1,89 +0,0 @@
/********************************************************************************
* Copyright (c) 2002, 2007 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
* available at http://www.eclipse.org/legal/epl-v10.html
*
* Initial Contributors:
* The following IBM employees contributed to the Remote System Explorer
* component that contains this file: David McKnight, Kushal Munir,
* Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
*
* Contributors:
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
********************************************************************************/
package org.eclipse.rse.internal.ui.view.team;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.rse.core.RSECorePlugin;
import org.eclipse.rse.core.model.ISystemProfile;
import org.eclipse.rse.core.model.ISystemProfileManager;
import org.eclipse.rse.core.model.ISystemRegistry;
import org.eclipse.rse.internal.core.model.SystemProfileManager;
import org.eclipse.rse.internal.ui.SystemResources;
import org.eclipse.rse.ui.ISystemContextMenuConstants;
import org.eclipse.rse.ui.ISystemIconConstants;
import org.eclipse.rse.ui.RSEUIPlugin;
import org.eclipse.rse.ui.actions.SystemBaseAction;
import org.eclipse.swt.widgets.Shell;
/**
* The action allows users to activate/de-activate a selected profile.
* @deprecated
* TODO: delete this action after next MRI rev, as it will be replaced by
* {@link org.eclipse.rse.internal.ui.view.team.SystemTeamViewActiveProfileAction} and
* {@link org.eclipse.rse.internal.ui.view.team.SystemTeamViewMakeInActiveProfileAction}.
*/
public class SystemTeamViewActiveProfileAction extends SystemBaseAction
{
/**
* Constructor
*/
public SystemTeamViewActiveProfileAction(Shell parent)
{
super(SystemResources.ACTION_PROFILE_ACTIVATE_LABEL,SystemResources.ACTION_PROFILE_ACTIVATE_TOOLTIP,
RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_MAKEPROFILEACTIVE_ID),
parent);
allowOnMultipleSelection(true); // as requested by WSDD team
setContextMenuGroup(ISystemContextMenuConstants.GROUP_CHANGE);
setHelp(RSEUIPlugin.HELPPREFIX+"actnactp"); //$NON-NLS-1$
setChecked(false);
}
/**
* @see SystemBaseAction#updateSelection(IStructuredSelection)
*/
public boolean updateSelection(IStructuredSelection selection)
{
ISystemProfile profile = (ISystemProfile)getFirstSelection();
if (profile == null)
return false;
ISystemProfileManager mgr = SystemProfileManager.getDefault();
// todo... we need to have two actions, one to make active, and one to make inactive.
while (profile != null)
{
setChecked(mgr.isSystemProfileActive(profile.getName()));
profile = (ISystemProfile)getNextSelection();
}
return true;
}
/**
* This is the method called when the user selects this action.
*/
public void run()
{
ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
ISystemProfile profile = (ISystemProfile)getFirstSelection();
boolean check = isChecked();
while (profile != null)
{
sr.setSystemProfileActive(profile, check);
profile = (ISystemProfile)getNextSelection();
}
}
}

View file

@ -12,9 +12,11 @@
* *
* Contributors: * Contributors:
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
* David Dykstal (IBM) - [202630] getDefaultPrivateProfile() and ensureDefaultPrivateProfile() are inconsistent
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.ui.view.team; package org.eclipse.rse.internal.ui.view.team;
import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.rse.core.RSECorePlugin; import org.eclipse.rse.core.RSECorePlugin;
import org.eclipse.rse.core.model.ISystemProfile; import org.eclipse.rse.core.model.ISystemProfile;
@ -28,25 +30,22 @@ import org.eclipse.rse.ui.RSEUIPlugin;
import org.eclipse.rse.ui.actions.SystemBaseAction; import org.eclipse.rse.ui.actions.SystemBaseAction;
import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Shell;
/** /**
* The action allows users to activate all selected profiles * The action allows users to activate all selected profiles
*/ */
public class SystemTeamViewMakeActiveProfileAction extends SystemBaseAction public class SystemTeamViewMakeActiveProfileAction extends SystemBaseAction
{ {
/** /**
* Constructor * Constructor
*/ */
public SystemTeamViewMakeActiveProfileAction(Shell parent) public SystemTeamViewMakeActiveProfileAction(Shell parent) {
{ super(SystemResources.ACTION_PROFILE_MAKEACTIVE_LABEL, SystemResources.ACTION_PROFILE_MAKEACTIVE_TOOLTIP, RSEUIPlugin.getDefault().getImageDescriptor(
super(SystemResources.ACTION_PROFILE_MAKEACTIVE_LABEL,SystemResources.ACTION_PROFILE_MAKEACTIVE_TOOLTIP, ISystemIconConstants.ICON_SYSTEM_MAKEPROFILEACTIVE_ID), parent);
RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_MAKEPROFILEACTIVE_ID), allowOnMultipleSelection(true);
parent);
allowOnMultipleSelection(true);
setContextMenuGroup(ISystemContextMenuConstants.GROUP_CHANGE); setContextMenuGroup(ISystemContextMenuConstants.GROUP_CHANGE);
setHelp(RSEUIPlugin.HELPPREFIX+"ActionMakeActive"); //$NON-NLS-1$ setHelp(RSEUIPlugin.HELPPREFIX + "ActionMakeActive"); //$NON-NLS-1$
} }
/** /**
@ -55,38 +54,38 @@ public class SystemTeamViewMakeActiveProfileAction extends SystemBaseAction
* that every selected profile is already active. * that every selected profile is already active.
* @see SystemBaseAction#updateSelection(IStructuredSelection) * @see SystemBaseAction#updateSelection(IStructuredSelection)
*/ */
public boolean updateSelection(IStructuredSelection selection) public boolean updateSelection(IStructuredSelection selection) {
{ ISystemProfileManager manager = SystemProfileManager.getDefault();
Object currsel = getFirstSelection(); ISystemProfile defaultProfile = manager.getDefaultPrivateSystemProfile();
if (!(currsel instanceof ISystemProfile)) boolean enabled = false;
return false; if (!getSelection().isEmpty()) {
ISystemProfile profile = (ISystemProfile)currsel; enabled = true;
ISystemProfileManager mgr = SystemProfileManager.getDefault(); Object currsel = getFirstSelection();
boolean allActive = true; while (currsel != null && enabled) {
while (profile != null) if (currsel instanceof ISystemProfile) {
{ ISystemProfile profile = (ISystemProfile) currsel;
if (!mgr.isSystemProfileActive(profile.getName())) if (profile.isActive() || profile == defaultProfile) {
allActive = false; enabled = false;
currsel = getNextSelection(); }
if ((currsel!=null) && !(currsel instanceof ISystemProfile)) } else {
return false; enabled = false;
profile = (ISystemProfile)currsel; }
} currsel = getNextSelection();
return !allActive; }
}
return enabled;
} }
/** /**
* This is the method called when the user selects this action. * This is the method called when the user selects this action.
* It walks through all the selected profiles and make them all active * It walks through all the selected profiles and make them all active
*/ */
public void run() public void run() {
{
ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry(); ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
ISystemProfile profile = (ISystemProfile)getFirstSelection(); ISystemProfile profile = (ISystemProfile) getFirstSelection();
while (profile != null) while (profile != null) {
{
sr.setSystemProfileActive(profile, true); sr.setSystemProfileActive(profile, true);
profile = (ISystemProfile)getNextSelection(); profile = (ISystemProfile) getNextSelection();
} }
} }
} }

View file

@ -12,9 +12,11 @@
* *
* Contributors: * Contributors:
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
* David Dykstal (IBM) - [202630] getDefaultPrivateProfile() and ensureDefaultPrivateProfile() are inconsistent
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.ui.view.team; package org.eclipse.rse.internal.ui.view.team;
import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.rse.core.RSECorePlugin; import org.eclipse.rse.core.RSECorePlugin;
import org.eclipse.rse.core.model.ISystemProfile; import org.eclipse.rse.core.model.ISystemProfile;
@ -28,25 +30,22 @@ import org.eclipse.rse.ui.RSEUIPlugin;
import org.eclipse.rse.ui.actions.SystemBaseAction; import org.eclipse.rse.ui.actions.SystemBaseAction;
import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Shell;
/** /**
* The action allows users to de-activate all selected profiles * The action allows users to de-activate all selected profiles
*/ */
public class SystemTeamViewMakeInActiveProfileAction extends SystemBaseAction public class SystemTeamViewMakeInActiveProfileAction extends SystemBaseAction
{ {
/** /**
* Constructor * Constructor
*/ */
public SystemTeamViewMakeInActiveProfileAction(Shell parent) public SystemTeamViewMakeInActiveProfileAction(Shell parent) {
{ super(SystemResources.ACTION_PROFILE_MAKEINACTIVE_LABEL, SystemResources.ACTION_PROFILE_MAKEINACTIVE_TOOLTIP, RSEUIPlugin.getDefault().getImageDescriptor(
super(SystemResources.ACTION_PROFILE_MAKEINACTIVE_LABEL,SystemResources.ACTION_PROFILE_MAKEINACTIVE_TOOLTIP, ISystemIconConstants.ICON_SYSTEM_MAKEPROFILEINACTIVE_ID), parent);
RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_MAKEPROFILEINACTIVE_ID), allowOnMultipleSelection(true);
parent);
allowOnMultipleSelection(true);
setContextMenuGroup(ISystemContextMenuConstants.GROUP_CHANGE); setContextMenuGroup(ISystemContextMenuConstants.GROUP_CHANGE);
setHelp(RSEUIPlugin.HELPPREFIX+"ActionMakeInactive"); //$NON-NLS-1$ setHelp(RSEUIPlugin.HELPPREFIX + "ActionMakeInactive"); //$NON-NLS-1$
} }
/** /**
@ -55,40 +54,38 @@ public class SystemTeamViewMakeInActiveProfileAction extends SystemBaseAction
* that every selected profile is already inactive. * that every selected profile is already inactive.
* @see SystemBaseAction#updateSelection(IStructuredSelection) * @see SystemBaseAction#updateSelection(IStructuredSelection)
*/ */
public boolean updateSelection(IStructuredSelection selection) public boolean updateSelection(IStructuredSelection selection) {
{ ISystemProfileManager manager = SystemProfileManager.getDefault();
Object currsel = getFirstSelection(); ISystemProfile defaultProfile = manager.getDefaultPrivateSystemProfile();
if (!(currsel instanceof ISystemProfile)) boolean enabled = false;
return false; if (!getSelection().isEmpty()) {
ISystemProfile profile = (ISystemProfile)currsel; enabled = true;
ISystemProfileManager mgr = SystemProfileManager.getDefault(); Object currsel = getFirstSelection();
boolean allInActive = true; while (currsel != null && enabled) {
while (profile != null) if (currsel instanceof ISystemProfile) {
{ ISystemProfile profile = (ISystemProfile) currsel;
if (mgr.isSystemProfileActive(profile.getName())) if (!profile.isActive() || profile == defaultProfile) {
allInActive = false; enabled = false;
currsel = getNextSelection(); }
if ((currsel!=null) && !(currsel instanceof ISystemProfile)) } else {
return false; enabled = false;
profile = (ISystemProfile)currsel; }
} currsel = getNextSelection();
return !allInActive; }
}
return enabled;
} }
/** /**
* This is the method called when the user selects this action. * This is the method called when the user selects this action.
* It walks through all the selected profiles and make them all inactive * It walks through all the selected profiles and make them all inactive
*/ */
public void run() public void run() {
{
// TODO: test if attempting to disable all profiles, and issue an error
// that at least one needs to be active. Or, at least a warning.
ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry(); ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
ISystemProfile profile = (ISystemProfile)getFirstSelection(); ISystemProfile profile = (ISystemProfile) getFirstSelection();
while (profile != null) while (profile != null) {
{
sr.setSystemProfileActive(profile, false); sr.setSystemProfileActive(profile, false);
profile = (ISystemProfile)getNextSelection(); profile = (ISystemProfile) getNextSelection();
} }
} }
} }

View file

@ -19,6 +19,7 @@
* Rupen Mardirossian (IBM) - [187741] Implemented the handleDoubleClick method * Rupen Mardirossian (IBM) - [187741] Implemented the handleDoubleClick method
* Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
* Martin Oberhuber (Wind River) - [cleanup] Avoid using SystemStartHere in production code * Martin Oberhuber (Wind River) - [cleanup] Avoid using SystemStartHere in production code
* David Dykstal (IBM) - [202630] getDefaultPrivateProfile() and ensureDefaultPrivateProfile() are inconsistent
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.ui.view.team; package org.eclipse.rse.internal.ui.view.team;
@ -1026,31 +1027,29 @@ public class SystemTeamViewPart
{ {
return true; return true;
} }
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.rse.core.ui.ISystemDeleteTarget#canDelete() * @see org.eclipse.rse.core.ui.ISystemDeleteTarget#canDelete()
*/ */
public boolean canDelete() public boolean canDelete() {
{ boolean ok = false;
boolean ok = true; IStructuredSelection selection = getStructuredSelection();
IStructuredSelection selection= getStructuredSelection(); if (!selection.isEmpty()) {
Iterator elements= selection.iterator(); ok = true;
ISystemProfileManager mgr = RSECorePlugin.getTheSystemRegistry().getSystemProfileManager(); ISystemProfileManager manager = RSECorePlugin.getTheSystemRegistry().getSystemProfileManager();
int nbrActiveProfiles = mgr.getActiveSystemProfiles().length; ISystemProfile defaultProfile = manager.getDefaultPrivateSystemProfile();
int activeCount = 0; for (Iterator z = selection.iterator(); z.hasNext() && ok;) {
while (ok && elements.hasNext()) Object object = z.next();
{ if (object instanceof ISystemProfile) {
Object currObj = elements.next(); ISystemProfile profile = (ISystemProfile) object;
if (!(currObj instanceof ISystemProfile)) if (profile == defaultProfile) {
{ ok = false;
ok = false; }
//System.out.println("selection: "+currObj.getClass().getName()); } else {
ok = false;
}
} }
else if (!mgr.isSystemProfileActive(((ISystemProfile)currObj).getName()))
activeCount++;
} }
if (ok && (activeCount == nbrActiveProfiles)) // attempting to delete all active profiles?
ok = false; // don't allow that!
//System.out.println("Inside canDelete: "+ok);
return ok; return ok;
} }

View file

@ -20,9 +20,12 @@
* David Dykstal (IBM) - [191130] use new getRemoteSystemsProject(boolean) call * David Dykstal (IBM) - [191130] use new getRemoteSystemsProject(boolean) call
* Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
* Martin Oberhuber (Wind River) - [cleanup] Avoid using SystemStartHere in production code * Martin Oberhuber (Wind River) - [cleanup] Avoid using SystemStartHere in production code
* David Dykstal (IBM) - [202630] getDefaultPrivateProfile() and ensureDefaultPrivateProfile() are inconsistent
* David Dykstal (IBM) - [cleanup] formatted
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.ui.view.team; package org.eclipse.rse.internal.ui.view.team;
import java.util.Arrays; import java.util.Arrays;
import java.util.Hashtable; import java.util.Hashtable;
import java.util.Vector; import java.util.Vector;
@ -34,6 +37,7 @@ import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.rse.core.RSECorePlugin; import org.eclipse.rse.core.RSECorePlugin;
import org.eclipse.rse.core.SystemResourceManager; import org.eclipse.rse.core.SystemResourceManager;
import org.eclipse.rse.core.model.ISystemProfile; import org.eclipse.rse.core.model.ISystemProfile;
import org.eclipse.rse.core.model.ISystemProfileManager;
import org.eclipse.rse.internal.ui.SystemResources; import org.eclipse.rse.internal.ui.SystemResources;
import org.eclipse.rse.internal.ui.actions.SystemCommonDeleteAction; import org.eclipse.rse.internal.ui.actions.SystemCommonDeleteAction;
import org.eclipse.rse.internal.ui.actions.SystemCommonRenameAction; import org.eclipse.rse.internal.ui.actions.SystemCommonRenameAction;
@ -51,31 +55,26 @@ import org.eclipse.rse.ui.view.ISystemPropertyConstants;
import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.views.properties.PropertyDescriptor; import org.eclipse.ui.views.properties.PropertyDescriptor;
/** /**
* Adapter for displaying and processing SystemProfile objects in tree views, such as * Adapter for displaying and processing SystemProfile objects in tree views, such as
* the Team view. * the Team view.
*/ */
public class SystemTeamViewProfileAdapter public class SystemTeamViewProfileAdapter extends AbstractSystemViewAdapter {
extends AbstractSystemViewAdapter
{
private boolean actionsCreated = false; private boolean actionsCreated = false;
private Hashtable categoriesByProfile = new Hashtable(); private Hashtable categoriesByProfile = new Hashtable();
// context menu actions for profiles... // context menu actions for profiles...
protected SystemTeamViewActiveProfileAction activeProfileAction;
protected SystemTeamViewMakeActiveProfileAction makeProfileActiveAction; protected SystemTeamViewMakeActiveProfileAction makeProfileActiveAction;
protected SystemTeamViewMakeInActiveProfileAction makeProfileInactiveAction; protected SystemTeamViewMakeInActiveProfileAction makeProfileInactiveAction;
protected SystemCommonRenameAction renameAction; protected SystemCommonRenameAction renameAction;
protected SystemCommonDeleteAction deleteAction; protected SystemCommonDeleteAction deleteAction;
protected SystemProfileNameCopyAction copyProfileAction; protected SystemProfileNameCopyAction copyProfileAction;
// ------------------- // -------------------
// property descriptors // property descriptors
// ------------------- // -------------------
private static PropertyDescriptor[] propertyDescriptorArray = null; private static PropertyDescriptor[] propertyDescriptorArray = null;
/** /**
* Returns any actions that should be contributed to the popup menu * Returns any actions that should be contributed to the popup menu
* for the given element. * for the given element.
@ -84,86 +83,63 @@ public class SystemTeamViewProfileAdapter
* @param shell Shell of viewer * @param shell Shell of viewer
* @param menuGroup recommended menu group to add actions to. If added to another group, you must be sure to create that group first. * @param menuGroup recommended menu group to add actions to. If added to another group, you must be sure to create that group first.
*/ */
public void addActions(SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup) public void addActions(SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup) {
{ if (!actionsCreated) {
if (!actionsCreated) createActions();
createActions();
boolean privateProfileStillExists = (RSECorePlugin.getTheSystemProfileManager().getDefaultPrivateSystemProfile() != null);
copyProfileAction.setProfile((ISystemProfile)selection.getFirstElement());
if (activeProfileAction != null)
{
activeProfileAction.setEnabled(!privateProfileStillExists);
menu.add(ISystemContextMenuConstants.GROUP_CHANGE,activeProfileAction);
} }
else copyProfileAction.setProfile((ISystemProfile) selection.getFirstElement());
{ menu.add(ISystemContextMenuConstants.GROUP_CHANGE, makeProfileActiveAction);
menu.add(ISystemContextMenuConstants.GROUP_CHANGE,makeProfileActiveAction); menu.add(ISystemContextMenuConstants.GROUP_CHANGE, makeProfileInactiveAction);
menu.add(ISystemContextMenuConstants.GROUP_CHANGE,makeProfileInactiveAction); menu.add(ISystemContextMenuConstants.GROUP_REORGANIZE, copyProfileAction);
} menu.add(ISystemContextMenuConstants.GROUP_REORGANIZE, deleteAction);
menu.add(ISystemContextMenuConstants.GROUP_REORGANIZE,copyProfileAction); menu.add(ISystemContextMenuConstants.GROUP_REORGANIZE, renameAction);
menu.add(ISystemContextMenuConstants.GROUP_REORGANIZE,deleteAction);
menu.add(ISystemContextMenuConstants.GROUP_REORGANIZE,renameAction);
} }
private void createActions()
{
// activate profile action...
// TODO: Delete the activeProfileAction logic when we have another mri rev, and can use the new actions.
if (SystemResources.ACTION_PROFILE_MAKEACTIVE_LABEL.equals("test")) //$NON-NLS-1$
activeProfileAction = new SystemTeamViewActiveProfileAction(getShell());
else
{
makeProfileActiveAction = new SystemTeamViewMakeActiveProfileAction(getShell());
makeProfileInactiveAction = new SystemTeamViewMakeInActiveProfileAction(getShell());
}
copyProfileAction = new SystemProfileNameCopyAction(getShell()); private void createActions() {
makeProfileActiveAction = new SystemTeamViewMakeActiveProfileAction(getShell());
makeProfileInactiveAction = new SystemTeamViewMakeInActiveProfileAction(getShell());
copyProfileAction = new SystemProfileNameCopyAction(getShell());
deleteAction = new SystemCommonDeleteAction(getShell(),getTeamViewPart()); deleteAction = new SystemCommonDeleteAction(getShell(), getTeamViewPart());
deleteAction.setHelp(RSEUIPlugin.HELPPREFIX+"actndlpr"); //$NON-NLS-1$ deleteAction.setHelp(RSEUIPlugin.HELPPREFIX + "actndlpr"); //$NON-NLS-1$
deleteAction.setDialogHelp(RSEUIPlugin.HELPPREFIX+"ddltprfl"); //$NON-NLS-1$ deleteAction.setDialogHelp(RSEUIPlugin.HELPPREFIX + "ddltprfl"); //$NON-NLS-1$
deleteAction.setPromptLabel(SystemResources.RESID_DELETE_PROFILES_PROMPT); deleteAction.setPromptLabel(SystemResources.RESID_DELETE_PROFILES_PROMPT);
renameAction = new SystemCommonRenameAction(getShell(),getTeamViewPart()); renameAction = new SystemCommonRenameAction(getShell(), getTeamViewPart());
renameAction.setHelp(RSEUIPlugin.HELPPREFIX+"actnrnpr"); //$NON-NLS-1$ renameAction.setHelp(RSEUIPlugin.HELPPREFIX + "actnrnpr"); //$NON-NLS-1$
renameAction.setDialogSingleSelectionHelp(RSEUIPlugin.HELPPREFIX+"drnsprfl"); //$NON-NLS-1$ renameAction.setDialogSingleSelectionHelp(RSEUIPlugin.HELPPREFIX + "drnsprfl"); //$NON-NLS-1$
renameAction.setDialogMultiSelectionHelp(RSEUIPlugin.HELPPREFIX+"drnmprfl"); //$NON-NLS-1$ renameAction.setDialogMultiSelectionHelp(RSEUIPlugin.HELPPREFIX + "drnmprfl"); //$NON-NLS-1$
renameAction.setSingleSelectPromptLabel(SystemResources.RESID_SIMPLE_RENAME_PROFILE_PROMPT_LABEL, renameAction.setSingleSelectPromptLabel(SystemResources.RESID_SIMPLE_RENAME_PROFILE_PROMPT_LABEL, SystemResources.RESID_SIMPLE_RENAME_PROFILE_PROMPT_TIP);
SystemResources.RESID_SIMPLE_RENAME_PROFILE_PROMPT_TIP);
renameAction.setMultiSelectVerbiage(SystemResources.RESID_MULTI_RENAME_PROFILE_VERBIAGE); renameAction.setMultiSelectVerbiage(SystemResources.RESID_MULTI_RENAME_PROFILE_VERBIAGE);
actionsCreated = true; actionsCreated = true;
} }
/** /**
* Returns an image descriptor for the image. More efficient than getting the image. * Returns an image descriptor for the image. More efficient than getting the image.
* @param element The element for which an image is desired * @param element The element for which an image is desired
*/ */
public ImageDescriptor getImageDescriptor(Object element) public ImageDescriptor getImageDescriptor(Object element) {
{ ISystemProfile profile = (ISystemProfile) element;
ISystemProfile profile = (ISystemProfile)element;
if (RSECorePlugin.getTheSystemRegistry().getSystemProfileManager().isSystemProfileActive(profile.getName())) if (RSECorePlugin.getTheSystemRegistry().getSystemProfileManager().isSystemProfileActive(profile.getName()))
return RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_PROFILE_ACTIVE_ID); return RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_PROFILE_ACTIVE_ID);
else else
return RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_PROFILE_ID); return RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_PROFILE_ID);
} }
/** /**
* Return the team view part * Return the team view part
*/ */
private SystemTeamViewPart getTeamViewPart() private SystemTeamViewPart getTeamViewPart() {
{ SystemTeamView viewer = (SystemTeamView) getViewer();
SystemTeamView viewer = (SystemTeamView)getViewer();
//System.out.println("Team view part set? " + (viewer != null));
return viewer.getTeamViewPart(); return viewer.getTeamViewPart();
} }
/** /**
* Return the label for this object * Return the label for this object
*/ */
public String getText(Object element) public String getText(Object element) {
{ return ((ISystemProfile) element).getName();
return ((ISystemProfile)element).getName();
} }
/** /**
@ -171,70 +147,62 @@ public class SystemTeamViewProfileAdapter
* <p> * <p>
* Called by common rename and delete actions. * Called by common rename and delete actions.
*/ */
public String getName(Object element) public String getName(Object element) {
{ return ((ISystemProfile) element).getName();
return ((ISystemProfile)element).getName();
} }
/* /*
* (non-Javadoc) * (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.IRemoteObjectIdentifier#getAbsoluteName(java.lang.Object) * @see org.eclipse.rse.core.subsystems.IRemoteObjectIdentifier#getAbsoluteName(java.lang.Object)
*/ */
public String getAbsoluteName(Object element) public String getAbsoluteName(Object element) {
{ return ((ISystemProfile) element).getName();
return ((ISystemProfile)element).getName();
} }
/** /**
* Return the type label for this object * Return the type label for this object
*/ */
public String getType(Object element) public String getType(Object element) {
{
return SystemViewResources.RESID_PROPERTY_PROFILE_TYPE_VALUE; return SystemViewResources.RESID_PROPERTY_PROFILE_TYPE_VALUE;
} }
/** /**
* Return the string to display in the status line when the given object is selected. * Return the string to display in the status line when the given object is selected.
* We return: * We return:
* Connection: name - Host name: hostName - Description: description * Connection: name - Host name: hostName - Description: description
*/ */
public String getStatusLineText(Object element) public String getStatusLineText(Object element) {
{ ISystemProfile profile = (ISystemProfile) element;
ISystemProfile profile = (ISystemProfile)element;
boolean active = RSECorePlugin.getTheSystemRegistry().getSystemProfileManager().isSystemProfileActive(profile.getName()); boolean active = RSECorePlugin.getTheSystemRegistry().getSystemProfileManager().isSystemProfileActive(profile.getName());
return getType(element) + ": " + profile.getName() + ", " + //$NON-NLS-1$ //$NON-NLS-2$ return getType(element) + ": " + profile.getName() + ", " + //$NON-NLS-1$ //$NON-NLS-2$
SystemViewResources.RESID_PROPERTY_PROFILESTATUS_LABEL + ": " + //$NON-NLS-1$ SystemViewResources.RESID_PROPERTY_PROFILESTATUS_LABEL + ": " + //$NON-NLS-1$
(active ? SystemViewResources.RESID_PROPERTY_PROFILESTATUS_ACTIVE_LABEL : SystemViewResources.RESID_PROPERTY_PROFILESTATUS_NOTACTIVE_LABEL); (active ? SystemViewResources.RESID_PROPERTY_PROFILESTATUS_ACTIVE_LABEL : SystemViewResources.RESID_PROPERTY_PROFILESTATUS_NOTACTIVE_LABEL);
} }
/** /**
* Return the parent of this object. We return the RemoteSystemsConnections project * Return the parent of this object. We return the RemoteSystemsConnections project
*/ */
public Object getParent(Object element) public Object getParent(Object element) {
{
return SystemResourceManager.getRemoteSystemsProject(false); return SystemResourceManager.getRemoteSystemsProject(false);
} }
/** /**
* Return the children of this profile. * Return the children of this profile.
*/ */
public Object[] getChildren(IAdaptable element, IProgressMonitor monitor) public Object[] getChildren(IAdaptable element, IProgressMonitor monitor) {
{ ISystemProfile profile = (ISystemProfile) element;
ISystemProfile profile = (ISystemProfile)element;
return getCategoryChildren(profile); return getCategoryChildren(profile);
} }
/** /**
* Given a profile, return all the category children for it. If this child objects have yet to be created, * Given a profile, return all the category children for it. If this child objects have yet to be created,
* create them now. * create them now.
*/ */
public SystemTeamViewCategoryNode[] getCategoryChildren(ISystemProfile profile) public SystemTeamViewCategoryNode[] getCategoryChildren(ISystemProfile profile) {
{ SystemTeamViewCategoryNode[] children = (SystemTeamViewCategoryNode[]) categoriesByProfile.get(profile);
SystemTeamViewCategoryNode[] children = (SystemTeamViewCategoryNode[])categoriesByProfile.get(profile); if (children == null) {
if (children == null)
{
children = new SystemTeamViewCategoryNode[2]; //5]; children = new SystemTeamViewCategoryNode[2]; //5];
for (int idx=0; idx<children.length; idx++) for (int idx = 0; idx < children.length; idx++)
children[idx] = new SystemTeamViewCategoryNode(profile); children[idx] = new SystemTeamViewCategoryNode(profile);
children[0].setLabel(SystemResources.RESID_TEAMVIEW_CATEGORY_CONNECTIONS_LABEL); children[0].setLabel(SystemResources.RESID_TEAMVIEW_CATEGORY_CONNECTIONS_LABEL);
children[0].setDescription(SystemResources.RESID_TEAMVIEW_CATEGORY_CONNECTIONS_TOOLTIP); children[0].setDescription(SystemResources.RESID_TEAMVIEW_CATEGORY_CONNECTIONS_TOOLTIP);
@ -255,152 +223,146 @@ public class SystemTeamViewProfileAdapter
children[3].setDescription(SystemResources.RESID_TEAMVIEW_CATEGORY_COMPILECMDS_TOOLTIP); children[3].setDescription(SystemResources.RESID_TEAMVIEW_CATEGORY_COMPILECMDS_TOOLTIP);
children[3].setImageDescriptor(RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_COMPILE_ID)); children[3].setImageDescriptor(RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_COMPILE_ID));
children[3].setMementoHandle(SystemTeamViewCategoryNode.MEMENTO_COMPILECMDS); children[3].setMementoHandle(SystemTeamViewCategoryNode.MEMENTO_COMPILECMDS);
*/ */
/* /*
children[4].setLabel(SystemResources.RESID_TEAMVIEW_CATEGORY_TARGETS_LABEL); children[4].setLabel(SystemResources.RESID_TEAMVIEW_CATEGORY_TARGETS_LABEL);
children[4].setDescription(SystemResources.RESID_TEAMVIEW_CATEGORY_TARGETS_TOOLTIP); children[4].setDescription(SystemResources.RESID_TEAMVIEW_CATEGORY_TARGETS_TOOLTIP);
children[4].setImageDescriptor(RSEUIPlugin.getDefault().getImageDescriptor(ISystemConstants.ICON_SYSTEM_TARGET_ID)); children[4].setImageDescriptor(RSEUIPlugin.getDefault().getImageDescriptor(ISystemConstants.ICON_SYSTEM_TARGET_ID));
children[4].setMementoHandle(SystemTeamViewCategoryNode.MEMENTO_TARGETS); children[4].setMementoHandle(SystemTeamViewCategoryNode.MEMENTO_TARGETS);
*/ */
categoriesByProfile.put(profile, children); categoriesByProfile.put(profile, children);
} }
return children; return children;
} }
/** /**
* Given a profile and memento handle, return the appropriate category node. This is used when * Given a profile and memento handle, return the appropriate category node. This is used when
* restoring the expansion and selection state of the team view. * restoring the expansion and selection state of the team view.
*/ */
public SystemTeamViewCategoryNode restoreCategory(ISystemProfile profile, String mementoHandle) public SystemTeamViewCategoryNode restoreCategory(ISystemProfile profile, String mementoHandle) {
{
SystemTeamViewCategoryNode[] children = getCategoryChildren(profile); SystemTeamViewCategoryNode[] children = getCategoryChildren(profile);
SystemTeamViewCategoryNode category = null; SystemTeamViewCategoryNode category = null;
for (int idx=0; (category==null) && (idx<2); idx++) for (int idx = 0; (category == null) && (idx < 2); idx++) {
{ if (children[idx].getMementoHandle().equals(mementoHandle)) category = children[idx];
if (children[idx].getMementoHandle().equals(mementoHandle))
category = children[idx];
} }
return category; return category;
} }
/** /**
* Return true if this profile has children. We return true. * Return true if this profile has children. We return true.
*/ */
public boolean hasChildren(IAdaptable element) public boolean hasChildren(IAdaptable element) {
{ return true;
return true;
} }
// Property sheet descriptors defining all the properties we expose in the Property Sheet // Property sheet descriptors defining all the properties we expose in the Property Sheet
/** /**
* Return our unique property descriptors, which getPropertyDescriptors adds to the common properties. * Return our unique property descriptors, which getPropertyDescriptors adds to the common properties.
*/ */
protected org.eclipse.ui.views.properties.IPropertyDescriptor[] internalGetPropertyDescriptors() protected org.eclipse.ui.views.properties.IPropertyDescriptor[] internalGetPropertyDescriptors() {
{ if (propertyDescriptorArray == null) {
if (propertyDescriptorArray == null) propertyDescriptorArray = new PropertyDescriptor[1];
{ int idx = 0;
propertyDescriptorArray = new PropertyDescriptor[1]; // status
int idx = 0; propertyDescriptorArray[idx++] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_IS_ACTIVE, SystemViewResources.RESID_PROPERTY_PROFILESTATUS_LABEL,
// status SystemViewResources.RESID_PROPERTY_PROFILESTATUS_TOOLTIP);
propertyDescriptorArray[idx++] = createSimplePropertyDescriptor(ISystemPropertyConstants.P_IS_ACTIVE,SystemViewResources.RESID_PROPERTY_PROFILESTATUS_LABEL, SystemViewResources.RESID_PROPERTY_PROFILESTATUS_TOOLTIP); }
}
return propertyDescriptorArray; return propertyDescriptorArray;
} }
/** /**
* Returns the current value for the named property. * Returns the current value for the named property.
* The parent handles P_TEXT and P_TYPE only, and we augment that here. * The parent handles P_TEXT and P_TYPE only, and we augment that here.
* @param key - the name of the property as named by its property descriptor * @param key - the name of the property as named by its property descriptor
* @return the current value of the property * @return the current value of the property
*/ */
public Object internalGetPropertyValue(Object key) public Object internalGetPropertyValue(Object key) {
{ String name = (String) key;
String name = (String)key; ISystemProfile profile = (ISystemProfile) propertySourceInput;
ISystemProfile profile = (ISystemProfile)propertySourceInput;
if (name.equals(ISystemPropertyConstants.P_IS_ACTIVE)) {
if (name.equals(ISystemPropertyConstants.P_IS_ACTIVE))
{
boolean active = RSECorePlugin.getTheSystemRegistry().getSystemProfileManager().isSystemProfileActive(profile.getName()); boolean active = RSECorePlugin.getTheSystemRegistry().getSystemProfileManager().isSystemProfileActive(profile.getName());
if (active) if (active)
return SystemViewResources.RESID_PROPERTY_PROFILESTATUS_ACTIVE_LABEL; return SystemViewResources.RESID_PROPERTY_PROFILESTATUS_ACTIVE_LABEL;
else else
return SystemViewResources.RESID_PROPERTY_PROFILESTATUS_NOTACTIVE_LABEL; return SystemViewResources.RESID_PROPERTY_PROFILESTATUS_NOTACTIVE_LABEL;
} } else
else return null;
return null; }
}
// FOR COMMON DELETE ACTIONS // FOR COMMON DELETE ACTIONS
/** /**
* Return true if this object is deletable by the user. If so, when selected, * Return true if this object is deletable by the user. If so, when selected,
* the Edit->Delete menu item will be enabled. * the Edit->Delete menu item will be enabled.
*/ */
public boolean canDelete(Object element) public boolean canDelete(Object element) {
{
boolean ok = true; boolean ok = true;
if (!(element instanceof ISystemProfile)) if (!(element instanceof ISystemProfile)) {
{
ok = false; ok = false;
//System.out.println("selection: "+currObj.getClass().getName()); } else {
ISystemProfile profile = (ISystemProfile) element;
ISystemProfileManager manager = RSECorePlugin.getTheSystemProfileManager();
ISystemProfile defaultProfile = manager.getDefaultPrivateSystemProfile();
if (profile == defaultProfile) {
ok = false;
}
} }
return ok; return ok;
} }
/** /**
* Perform the delete action. * Perform the delete action.
*/ */
public boolean doDelete(Shell shell, Object element, IProgressMonitor monitor) throws Exception public boolean doDelete(Shell shell, Object element, IProgressMonitor monitor) throws Exception {
{
boolean ok = true; boolean ok = true;
RSECorePlugin.getTheSystemRegistry().deleteSystemProfile((ISystemProfile)element); RSECorePlugin.getTheSystemRegistry().deleteSystemProfile((ISystemProfile) element);
return ok; return ok;
} }
// FOR COMMON RENAME ACTIONS // FOR COMMON RENAME ACTIONS
/** /**
* Return true if this object is renamable by the user. If so, when selected, * Return true if this object is renamable by the user. If so, when selected,
* the Rename popup menu item will be enabled. * the Rename popup menu item will be enabled.
*/ */
public boolean canRename(Object element) public boolean canRename(Object element) {
{
boolean ok = true; boolean ok = true;
if (!(element instanceof ISystemProfile)) if (!(element instanceof ISystemProfile)) ok = false;
ok = false;
return ok; return ok;
} }
/** /**
* Perform the rename action. * Perform the rename action.
*/ */
public boolean doRename(Shell shell, Object element, String newName, IProgressMonitor monitor) throws Exception public boolean doRename(Shell shell, Object element, String newName, IProgressMonitor monitor) throws Exception {
{ boolean ok = true;
boolean ok = true; RSECorePlugin.getTheSystemRegistry().renameSystemProfile((ISystemProfile) element, newName);
RSECorePlugin.getTheSystemRegistry().renameSystemProfile((ISystemProfile)element, newName);
return ok; return ok;
} }
/** /**
* Return a validator for verifying the new name is correct. * Return a validator for verifying the new name is correct.
*/ */
public ISystemValidator getNameValidator(Object element) public ISystemValidator getNameValidator(Object element) {
{ String[] nameArray = RSECorePlugin.getTheSystemRegistry().getSystemProfileManager().getSystemProfileNames();
String[] nameArray = RSECorePlugin.getTheSystemRegistry().getSystemProfileManager().getSystemProfileNames(); Vector names = new Vector(nameArray.length);
Vector names = new Vector(nameArray.length); names.addAll(Arrays.asList(nameArray));
names.addAll(Arrays.asList(nameArray)); ISystemValidator validator = new ValidatorProfileName(names);
ISystemValidator validator = new ValidatorProfileName(names);
return validator; return validator;
} }
/**
* Parent override. /**
* <p> * Parent override.
* Form and return a new canonical (unique) name for this object, given a candidate for the new * <p>
* name. This is called by the generic multi-rename dialog to test that all new names are unique. * Form and return a new canonical (unique) name for this object, given a candidate for the new
* To do this right, sometimes more than the raw name itself is required to do uniqueness checking. * name. This is called by the generic multi-rename dialog to test that all new names are unique.
* <p> * To do this right, sometimes more than the raw name itself is required to do uniqueness checking.
* Returns profile.connectionName, upperCased * <p>
*/ * Returns profile.connectionName, upperCased
public String getCanonicalNewName(Object element, String newName) */
{ public String getCanonicalNewName(Object element, String newName) {
return newName.toUpperCase(); return newName.toUpperCase();
} }
// ------------------------------------------------------------ // ------------------------------------------------------------
// METHODS FOR SAVING AND RESTORING EXPANSION STATE OF VIEWER... // METHODS FOR SAVING AND RESTORING EXPANSION STATE OF VIEWER...
@ -408,19 +370,18 @@ public class SystemTeamViewProfileAdapter
/** /**
* Return what to save to disk to identify this element in the persisted list of expanded elements. * Return what to save to disk to identify this element in the persisted list of expanded elements.
*/ */
public String getMementoHandle(Object element) public String getMementoHandle(Object element) {
{ ISystemProfile profile = (ISystemProfile) element;
ISystemProfile profile = (ISystemProfile)element; return profile.getName();
return profile.getName();
} }
/** /**
* Return a short string to uniquely identify the type of resource. * Return a short string to uniquely identify the type of resource.
*/ */
public String getMementoHandleKey(Object element) public String getMementoHandleKey(Object element) {
{
return ISystemMementoConstants.MEMENTO_KEY_PROFILE; return ISystemMementoConstants.MEMENTO_KEY_PROFILE;
} }
/** /**
* This is a local RSE artifact so returning false * This is a local RSE artifact so returning false
* *