1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-04 15:45:25 +02:00

[286671] Dstore shell service interprets < and > sequences

This commit is contained in:
David McKnight 2010-05-10 19:57:14 +00:00
parent 67f524bda1
commit 7c1a2d0673
3 changed files with 27 additions and 5 deletions

View file

@ -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$

View file

@ -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)
{

View file

@ -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