diff --git a/lib.terminalemulator/examples/README b/lib.terminalemulator/examples/README deleted file mode 100644 index 8b9396adc40e..000000000000 --- a/lib.terminalemulator/examples/README +++ /dev/null @@ -1,32 +0,0 @@ -Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements; and to You under the Apache License, Version 2.0. - -"README" - -Current examples ----------------- - -lib.richexecution - A pure NB module (not dependent on other NB modules) which provides - native excecution and tty/pty access via JNA. - -TermExample - A NB module with examples of how to hook up Terminal, the Term-based - IOProvider, with io as well as various interactive testing facilities. - -TermSuite - Suite for hosting lib.richexecution and TermExample. - -TermApp - A standalone terminal emulator application. - -E option enables compiler error processing which requires -t dtterm - as well for hyperlinks to work. - -Older examples --------------- -buildtool - A simple make based build tool which demonstrates hyperlinking - and glyph gutter functionality in ActiveTerm. - -telnet An old telnet application that depends on an external (not supplied) - Java telnet library. - diff --git a/lib.terminalemulator/examples/TermApp/build.xml b/lib.terminalemulator/examples/TermApp/build.xml deleted file mode 100644 index 0c3cc090037f..000000000000 --- a/lib.terminalemulator/examples/TermApp/build.xml +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - - - - - - - Builds, tests, and runs the project TermApp. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/lib.terminalemulator/examples/TermApp/manifest.mf b/lib.terminalemulator/examples/TermApp/manifest.mf deleted file mode 100644 index 328e8e5bc3b7..000000000000 --- a/lib.terminalemulator/examples/TermApp/manifest.mf +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -X-COMMENT: Main-Class will be added automatically by build - diff --git a/lib.terminalemulator/examples/TermApp/nbproject/build-impl.xml b/lib.terminalemulator/examples/TermApp/nbproject/build-impl.xml deleted file mode 100644 index f054160f1822..000000000000 --- a/lib.terminalemulator/examples/TermApp/nbproject/build-impl.xml +++ /dev/null @@ -1,1483 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must set src.dir - Must set test.src.dir - Must set build.dir - Must set dist.dir - Must set build.classes.dir - Must set dist.javadoc.dir - Must set build.test.classes.dir - Must set build.test.results.dir - Must set build.classes.excludes - Must set dist.jar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must set javac.includes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - No tests executed. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must set JVM to use for profiling in profiler.info.jvm - Must set profiler agent JVM arguments in profiler.info.jvmargs.agent - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select some files in the IDE or set javac.includes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - To run this application from the command line without Ant, try: - - java -jar "${dist.jar.resolved}" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select one file in the IDE or set run.class - - - - Must select one file in the IDE or set run.class - - - - - - - - - - - - - - - - - - - - - - - Must select one file in the IDE or set debug.class - - - - - Must select one file in the IDE or set debug.class - - - - - Must set fix.includes - - - - - - - - - - This target only works when run from inside the NetBeans IDE. - - - - - - - - - Must select one file in the IDE or set profile.class - This target only works when run from inside the NetBeans IDE. - - - - - - - - - This target only works when run from inside the NetBeans IDE. - - - - - - - - - - - - - This target only works when run from inside the NetBeans IDE. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select one file in the IDE or set run.class - - - - - - Must select some files in the IDE or set test.includes - - - - - Must select one file in the IDE or set run.class - - - - - Must select one file in the IDE or set applet.url - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select some files in the IDE or set javac.includes - - - - - - - - - - - - - - - - - - - - Some tests failed; see details above. - - - - - - - - - Must select some files in the IDE or set test.includes - - - - Some tests failed; see details above. - - - - Must select some files in the IDE or set test.class - Must select some method in the IDE or set test.method - - - - Some tests failed; see details above. - - - - - Must select one file in the IDE or set test.class - - - - Must select one file in the IDE or set test.class - Must select some method in the IDE or set test.method - - - - - - - - - - - - - - Must select one file in the IDE or set applet.url - - - - - - - - - Must select one file in the IDE or set applet.url - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/lib.terminalemulator/examples/TermApp/nbproject/configs/64bit.properties b/lib.terminalemulator/examples/TermApp/nbproject/configs/64bit.properties deleted file mode 100644 index 1358661f0eb5..000000000000 --- a/lib.terminalemulator/examples/TermApp/nbproject/configs/64bit.properties +++ /dev/null @@ -1,17 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -run.jvmargs=-d64 diff --git a/lib.terminalemulator/examples/TermApp/nbproject/genfiles.properties b/lib.terminalemulator/examples/TermApp/nbproject/genfiles.properties deleted file mode 100644 index e0009bbc9ac9..000000000000 --- a/lib.terminalemulator/examples/TermApp/nbproject/genfiles.properties +++ /dev/null @@ -1,8 +0,0 @@ -build.xml.data.CRC32=dcf35fec -build.xml.script.CRC32=118d8120 -build.xml.stylesheet.CRC32=958a1d3e -# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. -# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=85df0b09 -nbproject/build-impl.xml.script.CRC32=d879da4d -nbproject/build-impl.xml.stylesheet.CRC32=05530350@1.79.1.48 diff --git a/lib.terminalemulator/examples/TermApp/nbproject/project.properties b/lib.terminalemulator/examples/TermApp/nbproject/project.properties deleted file mode 100644 index ed4301894c57..000000000000 --- a/lib.terminalemulator/examples/TermApp/nbproject/project.properties +++ /dev/null @@ -1,98 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -annotation.processing.enabled=true -annotation.processing.enabled.in.editor=false -annotation.processing.processors.list= -annotation.processing.run.all.processors=true -application.title=PtyTest -application.vendor=ivan -build.classes.dir=${build.dir}/classes -build.classes.excludes=**/*.java,**/*.form -# This directory is removed when the project is cleaned: -build.dir=build -build.generated.dir=${build.dir}/generated -build.generated.sources.dir=${build.dir}/generated-sources -# Only compile against the classpath explicitly listed here: -build.sysclasspath=ignore -build.test.classes.dir=${build.dir}/test/classes -build.test.results.dir=${build.dir}/test/results -debug.classpath=\ - ${run.classpath} -debug.test.classpath=\ - ${run.test.classpath} -# This directory is removed when the project is cleaned: -dist.dir=dist -dist.jar=${dist.dir}/TermApp.jar -dist.javadoc.dir=${dist.dir}/javadoc -endorsed.classpath= -excludes= -file.reference.jna-4.1.0.jar=../../../nbbuild/netbeans/platform/modules/ext/jna-4.1.0.jar -file.reference.org-netbeans-lib-terminalemulator.jar=../../../nbbuild/netbeans/cnd/modules/org-netbeans-lib-terminalemulator.jar -includes=** -jar.compress=false -javac.classpath=\ - ${libs.swing-layout.classpath}:\ - ${reference.org_netbeans_lib_terminalemulator.module}:\ - ${reference.org_netbeans_lib_richexecution.module}:\ - ${file.reference.jna-4.1.0.jar} -# Space-separated list of extra javac options -javac.compilerargs= -javac.deprecation=false -javac.external.vm=false -javac.processorpath=\ - ${javac.classpath} -javac.source=1.5 -javac.target=1.5 -javac.test.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir}:\ - ${libs.junit.classpath}:\ - ${libs.junit_4.classpath} -javadoc.additionalparam= -javadoc.author=false -javadoc.encoding=${source.encoding} -javadoc.noindex=false -javadoc.nonavbar=false -javadoc.notree=false -javadoc.private=false -javadoc.splitindex=true -javadoc.use=true -javadoc.version=false -javadoc.windowtitle= -main.class=nbterm.Main -manifest.file=manifest.mf -meta.inf.dir=${src.dir}/META-INF -mkdist.disabled=false -no.dependencies=true -platform.active=default_platform -project.org_netbeans_lib_richexecution=../lib.richexecution -project.org_netbeans_lib_terminalemulator=../.. -reference.org_netbeans_lib_richexecution.module=${project.org_netbeans_lib_richexecution}/../TermSuite/build/cluster/modules/org-netbeans-lib-richexecution.jar -reference.org_netbeans_lib_terminalemulator.module=${project.org_netbeans_lib_terminalemulator}/../nbbuild/netbeans/ide/modules/org-netbeans-lib-terminalemulator.jar -run.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir} -# Space-separated list of JVM arguments used when running the project -# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value -# or test-sys-prop.name=value to set system properties for unit tests): -run.jvmargs=-ea -Dswing.aatext=true -Dawt.useSystemAAFontSettings=lcd -Dsun.java2d.dpiaware=true -Dorg.netbeans.editor.aa.extra.hints=true -Dsun.awt.disableMixing=true\n -run.test.classpath=\ - ${javac.test.classpath}:\ - ${build.test.classes.dir} -source.encoding=UTF-8 -src.dir=src -test.src.dir=test diff --git a/lib.terminalemulator/examples/TermApp/nbproject/project.xml b/lib.terminalemulator/examples/TermApp/nbproject/project.xml deleted file mode 100644 index b1451afb932e..000000000000 --- a/lib.terminalemulator/examples/TermApp/nbproject/project.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - - org.netbeans.modules.java.j2seproject - - - TermApp - 1.6.5 - - - - - - - - - - TermSupport - jar - - jar - clean - jar - - - TermSupport-1 - jar - - jar - clean - jar - - - org_netbeans_lib_richexecution - jar - - netbeans - clean - module - - - org_netbeans_lib_terminalemulator - jar - - netbeans - clean - module - - - - diff --git a/lib.terminalemulator/examples/TermApp/release/nbterm b/lib.terminalemulator/examples/TermApp/release/nbterm deleted file mode 100755 index 7583fe687e6a..000000000000 --- a/lib.terminalemulator/examples/TermApp/release/nbterm +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -# nterm -- A simple Java based ANSI terminal emulator - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - - -if [ -h $0 ] -then - ME=$(ls -l $0) - ME=${ME#*-> } -else - ME=$0 -fi -MEDIR=`/usr/bin/dirname $ME` -INSTALLDIR=`cd ${MEDIR}; /bin/pwd` - -exec java -jar $INSTALLDIR/TermApp.jar $* diff --git a/lib.terminalemulator/examples/TermApp/release/nbterm64 b/lib.terminalemulator/examples/TermApp/release/nbterm64 deleted file mode 100644 index 96e6d58b3aff..000000000000 --- a/lib.terminalemulator/examples/TermApp/release/nbterm64 +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash -# nterm -- A simple Java based ANSI terminal emulator - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -if [ -h $0 ] -then - ME=$(ls -l $0) - ME=${ME#*-> } -else - ME=$0 -fi -MEDIR=`/usr/bin/dirname $ME` -INSTALLDIR=`cd ${MEDIR}; /bin/pwd` - -exec java -d64 -jar $INSTALLDIR/TermApp.jar $* diff --git a/lib.terminalemulator/examples/TermApp/src/nbterm/ErrorProcessor.java b/lib.terminalemulator/examples/TermApp/src/nbterm/ErrorProcessor.java deleted file mode 100644 index 39bf4ae22a71..000000000000 --- a/lib.terminalemulator/examples/TermApp/src/nbterm/ErrorProcessor.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package nbterm; - -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import org.netbeans.lib.terminalemulator.support.LineFilter; - -class ErrorProcessor extends LineFilter { - - @Override - public void processLine(String line, LineSink sink) { - // handle stuff of the form - // :: warning: - // :: error: - - final Pattern errPattern = - Pattern.compile("((.*):(\\d+):)( (.*): .*$)"); - // group 12 3 4 5 - - Matcher errMatcher = errPattern.matcher(line); - if (errMatcher.find()) { - String location = errMatcher.group(1); - String file = errMatcher.group(2); - String lineno = errMatcher.group(3); - String msg = errMatcher.group(4); - String kind = errMatcher.group(5); - - StringBuilder buf = new StringBuilder(); - - buf.append((char) 27); // ESC - if (kind.equals("error")) { - buf.append("[01;31m"); // red - } else if (kind.equals("warning")) { - buf.append("[01;30m"); // grey - } - buf.append(hyperlink(file + ":" + lineno, location)); - buf.append(msg); - buf.append((char) 27); // ESC - buf.append("[0m"); - sink.forwardLine(buf.toString()); - return; - } - - sink.forwardLine(line); - } -} diff --git a/lib.terminalemulator/examples/TermApp/src/nbterm/Injector.java b/lib.terminalemulator/examples/TermApp/src/nbterm/Injector.java deleted file mode 100644 index 1dcbff842aa7..000000000000 --- a/lib.terminalemulator/examples/TermApp/src/nbterm/Injector.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package nbterm; - -import org.netbeans.lib.terminalemulator.TermStream; - -/** - * Utility to inject text into the terminal i/o stream as if it - * was typed by the user. - */ -class Injector extends TermStream { - - /** - * Inject text into the terminal i/o stream as if it was typed - * by the user. - */ - public void inject(String text) { - toDCE.sendChars(text.toCharArray(), 0, text.length()); - } - - @Override - public void flush() { - toDTE.flush(); - } - - @Override - public void putChar(char c) { - toDTE.putChar(c); - } - - @Override - public void putChars(char[] buf, int offset, int count) { - toDTE.putChars(buf, offset, count); - } - - @Override - public void sendChar(char c) { - toDCE.sendChar(c); - } - - @Override - public void sendChars(char[] c, int offset, int count) { - toDCE.sendChars(c, offset, count); - } -} diff --git a/lib.terminalemulator/examples/TermApp/src/nbterm/Main.java b/lib.terminalemulator/examples/TermApp/src/nbterm/Main.java deleted file mode 100644 index 37c74e760285..000000000000 --- a/lib.terminalemulator/examples/TermApp/src/nbterm/Main.java +++ /dev/null @@ -1,211 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package nbterm; - - -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; -import java.util.ArrayList; -import java.util.logging.Level; -import java.util.logging.Logger; -import org.netbeans.lib.richexecution.Pty.Mode; -import org.netbeans.lib.richexecution.program.Command; -import org.netbeans.lib.richexecution.program.Program; -import org.netbeans.lib.richexecution.program.Shell; - -/** - * - * @author ivan - */ -public class Main { - // defaults for unix - static Boolean optLineDiscipline = null; // line_discipline overriden by options - static Mode mode = Mode.REGULAR; - static String termType = "xterm-16color"; - static boolean debug = false; - static boolean processErrors = false; - static int rows = 24; - static int cols = 80; - static ArrayList command = new ArrayList(); - - static private Terminal editorTerminal; - static private Injector injector; - static private String currentFile = ""; - - private static void help() { - System.out.printf("usage: term [