diff --git a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/CommandMiner.java b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/CommandMiner.java index fadabd27689..e4b9ed1b394 100644 --- a/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/CommandMiner.java +++ b/rse/plugins/org.eclipse.rse.services.dstore/miners/org/eclipse/rse/dstore/universal/miners/CommandMiner.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2008 IBM Corporation and others. + * Copyright (c) 2006, 2010 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 @@ -18,6 +18,7 @@ * Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients * Noriaki Takatsu (IBM) - [230399] [multithread] changes to stop CommandMiner threads when clients disconnect * David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed + * David McKnight (IBM) - [286671] Dstore shell service interprets < and > sequences - cmd descriptor to identify ability *******************************************************************************/ package org.eclipse.rse.dstore.universal.miners; @@ -143,6 +144,10 @@ public class CommandMiner extends Miner DataElement shellD = createCommandDescriptor(fsD, "Shell", "C_SHELL", false); //$NON-NLS-1$ //$NON-NLS-2$ _dataStore.createReference(cancellable, shellD, "abstracts", "abstracted by"); //$NON-NLS-1$ //$NON-NLS-2$ + + // indicates support for char conversion in version 3.2 + createCommandDescriptor(fsD, "CharConversion", "C_CHAR_CONVERSION", false); + // DataElement inputD = _dataStore.createObject(cmdD, "input", "Enter command"); _dataStore.createObject(cmdD, "input", "Enter command"); //$NON-NLS-1$ //$NON-NLS-2$ diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/shells/DStoreShellThread.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/shells/DStoreShellThread.java index ca8b8972291..0f3c28518a2 100644 --- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/shells/DStoreShellThread.java +++ b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/shells/DStoreShellThread.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2009 IBM Corporation and others. + * Copyright (c) 2006, 2010 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 @@ -24,6 +24,7 @@ import java.io.File; import org.eclipse.dstore.core.model.DE; import org.eclipse.dstore.core.model.DataElement; import org.eclipse.dstore.core.model.DataStore; +import org.eclipse.dstore.core.model.DataStoreResources; import org.eclipse.dstore.core.model.DataStoreSchema; import org.eclipse.rse.dstore.universal.miners.IUniversalDataStoreConstants; @@ -263,7 +264,13 @@ public class DStoreShellThread if (cmd != null) { - cmd = convertSpecialCharacters(cmd); + // first, find out if the server support conversion + DataElement fsD= dataStore.findObjectDescriptor(DataStoreResources.model_directory); + DataElement convDes = dataStore.localDescriptorQuery(fsD, "C_CHAR_CONVERSION", 1); //$NON-NLS-1$ + if (convDes != null){ + cmd = convertSpecialCharacters(cmd); + } + DataElement commandDescriptor = getSendInputDescriptor(commandElement); if (commandDescriptor != null) { diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/internal/subsystems/shells/dstore/DStoreServiceCommandShell.java b/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/internal/subsystems/shells/dstore/DStoreServiceCommandShell.java index 50448d2bd8b..4b83675d31c 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/internal/subsystems/shells/dstore/DStoreServiceCommandShell.java +++ b/rse/plugins/org.eclipse.rse.subsystems.shells.dstore/src/org/eclipse/rse/internal/subsystems/shells/dstore/DStoreServiceCommandShell.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2009 IBM Corporation and others. + * Copyright (c) 2006, 2010 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 @@ -22,6 +22,7 @@ package org.eclipse.rse.internal.subsystems.shells.dstore; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.dstore.core.model.DataElement; import org.eclipse.dstore.core.model.DataStore; +import org.eclipse.dstore.core.model.DataStoreResources; import org.eclipse.dstore.extra.DomainEvent; import org.eclipse.dstore.extra.IDomainListener; import org.eclipse.rse.internal.services.dstore.shells.DStoreHostOutput; @@ -169,8 +170,17 @@ public class DStoreServiceCommandShell extends ServiceCommandShell { output = new RemoteOutput(this, type); } + + DataStore dataStore = line.getDataStore(); + DataElement fsD= dataStore.findObjectDescriptor(DataStoreResources.model_directory); + DataElement convDes = dataStore.localDescriptorQuery(fsD, "C_CHAR_CONVERSION", 1); //$NON-NLS-1$ + + String text = line.getName(); + if (convDes != null){ + text = convertSpecialCharacters(text); + } - output.setText(convertSpecialCharacters(line.getName())); + output.setText(convertSpecialCharacters(text)); int colonSep = src.indexOf(':'); // line numbers