mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-18 13:45:45 +02:00
[168197] Fix Terminal for CDC-1.1/Foundation-1.1
This commit is contained in:
parent
c99db80573
commit
400e0612fa
7 changed files with 65 additions and 31 deletions
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src/"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/CDC-1.1%Foundation-1.1"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
#Fri Mar 28 14:14:24 CET 2008
|
||||
#Fri Apr 11 02:37:35 CEST 2008
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.4
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.doc.comment.support=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
|
|
|
@ -10,7 +10,8 @@ Require-Bundle: org.eclipse.core.runtime,
|
|||
org.eclipse.ui
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Eclipse-LazyStart: true
|
||||
Bundle-RequiredExecutionEnvironment: J2SE-1.4
|
||||
Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
|
||||
J2SE-1.4
|
||||
Bundle-ClassPath: .
|
||||
Export-Package: org.eclipse.tm.internal.terminal.connector;x-friends:="org.eclipse.tm.terminal.test",
|
||||
org.eclipse.tm.internal.terminal.control;x-friends:="org.eclipse.tm.terminal.view",
|
||||
|
|
|
@ -9,10 +9,10 @@
|
|||
* Michael Scharf (Wind River) - initial implementation
|
||||
* Michael Scharf (Wing River) - [211659] Add field assist to terminal input field
|
||||
* Michael Scharf (Wing River) - [196447] The optional terminal input line should be resizeable
|
||||
* Martin Oberhuber (Wind River) - [168197] Fix Terminal for CDC-1.1/Foundation-1.1
|
||||
*******************************************************************************/
|
||||
package org.eclipse.tm.internal.terminal.control;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
@ -143,7 +143,20 @@ public class CommandInputFieldWithHistory implements ICommandInputField {
|
|||
fHistory.clear();
|
||||
if(history==null)
|
||||
return;
|
||||
fHistory.addAll(Arrays.asList(history.split("\n"))); //$NON-NLS-1$
|
||||
// add history entries separated by '\n'
|
||||
// fHistory.addAll(Arrays.asList(history.split("\n"))); //$NON-NLS-1$
|
||||
//<J2ME CDC-1.1 Foundation-1.1 variant>
|
||||
int i = 0;
|
||||
int j = history.indexOf('\n');
|
||||
while (j > i) {
|
||||
fHistory.add(history.substring(i, j));
|
||||
do {
|
||||
j++;
|
||||
} while (j < history.length() && history.charAt(j) == '\n');
|
||||
i = j;
|
||||
j = history.indexOf('\n', i);
|
||||
}
|
||||
//</J2ME CDC-1.1 Foundation-1.1 variant>
|
||||
}
|
||||
/**
|
||||
* @return the current content of the history buffer and new line separated list
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
* Michael Scharf (Wind River) - split into core, view and connector plugins
|
||||
* Martin Oberhuber (Wind River) - fixed copyright headers and beautified
|
||||
* Michael Scharf (Wind River) - [209746] There are cases where some colors not displayed correctly
|
||||
* Martin Oberhuber (Wind River) - [168197] Fix Terminal for CDC-1.1/Foundation-1.1
|
||||
*******************************************************************************/
|
||||
package org.eclipse.tm.internal.terminal.emulator;
|
||||
|
||||
|
@ -23,7 +24,6 @@ import java.io.InputStreamReader;
|
|||
import java.io.OutputStreamWriter;
|
||||
import java.io.Reader;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.nio.charset.Charset;
|
||||
|
||||
import org.eclipse.swt.events.ControlEvent;
|
||||
import org.eclipse.swt.events.ControlListener;
|
||||
|
@ -839,10 +839,8 @@ public class VT100Emulator implements ControlListener {
|
|||
String positionReport = "\u001b[" + (relativeCursorLine() + 1) + ";" + //$NON-NLS-1$ //$NON-NLS-2$
|
||||
(getCursorColumn() + 1) + "R"; //$NON-NLS-1$
|
||||
|
||||
OutputStreamWriter streamWriter = new OutputStreamWriter(terminal
|
||||
.getOutputStream(), Charset.forName("ISO-8859-1")); //$NON-NLS-1$
|
||||
|
||||
try {
|
||||
OutputStreamWriter streamWriter = new OutputStreamWriter(terminal.getOutputStream(), "ISO-8859-1"); //$NON-NLS-1$
|
||||
streamWriter.write(positionReport, 0, positionReport.length());
|
||||
streamWriter.flush();
|
||||
} catch (IOException ex) {
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
*
|
||||
* Contributors:
|
||||
* Michael Scharf (Wind River) - initial API and implementation
|
||||
* Martin Oberhuber (Wind River) - [168197] Fix Terminal for CDC-1.1/Foundation-1.1
|
||||
*******************************************************************************/
|
||||
package org.eclipse.tm.internal.terminal.model;
|
||||
|
||||
|
@ -54,7 +55,16 @@ public class TerminalTextData implements ITerminalTextData {
|
|||
buff.append(term.getChar(line, column));
|
||||
}
|
||||
}
|
||||
return buff.toString().replaceAll("\000+", ""); //$NON-NLS-1$//$NON-NLS-2$
|
||||
// get rid of the empty space at the end of the lines
|
||||
//return buff.toString().replaceAll("\000+", ""); //$NON-NLS-1$//$NON-NLS-2$
|
||||
//<J2ME CDC-1.1 Foundation-1.1 variant>
|
||||
int i = buff.length() - 1;
|
||||
while (i >= 0 && buff.charAt(i) == '\000') {
|
||||
i--;
|
||||
}
|
||||
buff.setLength(i + 1);
|
||||
return buff.toString();
|
||||
//</J2ME CDC-1.1 Foundation-1.1 variant>
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2007 Wind River Systems, Inc. and others.
|
||||
* Copyright (c) 2007, 2008 Wind River Systems, Inc. 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
|
||||
|
@ -7,6 +7,7 @@
|
|||
*
|
||||
* Contributors:
|
||||
* Michael Scharf (Wind River) - initial API and implementation
|
||||
* Martin Oberhuber (Wind River) - [168197] Fix Terminal for CDC-1.1/Foundation-1.1
|
||||
*******************************************************************************/
|
||||
package org.eclipse.tm.internal.terminal.textcanvas;
|
||||
|
||||
|
@ -293,7 +294,14 @@ abstract public class AbstractTextCanvasModel implements ITextCanvasModel {
|
|||
if(line==fSelectionStartLine)
|
||||
text=text.substring(Math.min(fSelectionStartCoumn,text.length()));
|
||||
// get rid of the empty space at the end of the lines
|
||||
text=text.replaceAll("\000+$",""); //$NON-NLS-1$//$NON-NLS-2$
|
||||
// text=text.replaceAll("\000+$",""); //$NON-NLS-1$//$NON-NLS-2$
|
||||
// <J2ME-CDC-1.1 version>
|
||||
int i = text.length() - 1;
|
||||
while (i >= 0 && text.charAt(i) == '\000') {
|
||||
i--;
|
||||
}
|
||||
text = text.substring(0, i + 1);
|
||||
// </J2ME-CDC-1.1 version>
|
||||
// null means space
|
||||
text=text.replace('\000', ' ');
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue