mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 06:32:10 +02:00
Bug 458686 - Add terminal connector for org.eclipse.remote
Change-Id: I054a3b9b2c39d2d20181745ccfa84f5900ca8221 Signed-off-by: Greg Watson <g.watson@computer.org>
This commit is contained in:
parent
97c6c5986a
commit
69042ba083
35 changed files with 2046 additions and 0 deletions
17
features/org.eclipse.tm.terminal.remote-feature/.project
Normal file
17
features/org.eclipse.tm.terminal.remote-feature/.project
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>org.eclipse.tm.terminal.remote-feature</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.pde.FeatureBuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.pde.FeatureNature</nature>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
|
@ -0,0 +1,9 @@
|
||||||
|
###############################################################################
|
||||||
|
# Copyright (c) 2015 IBM Corp. 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
|
||||||
|
###############################################################################
|
||||||
|
bin.includes = feature.xml,\
|
||||||
|
feature.properties
|
|
@ -0,0 +1,165 @@
|
||||||
|
###############################################################################
|
||||||
|
# Copyright (c) 2015 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
|
||||||
|
###############################################################################
|
||||||
|
# feature.properties
|
||||||
|
# contains externalized strings for feature.xml
|
||||||
|
# "%foo" in feature.xml corresponds to the key "foo" in this file
|
||||||
|
# java.io.Properties file (ISO 8859-1 with "\" escapes)
|
||||||
|
# This file should be translated.
|
||||||
|
|
||||||
|
# "featureName" property - name of the feature
|
||||||
|
featureName=Target Management Terminal Remote Connector
|
||||||
|
|
||||||
|
# "providerName" property - name of the company that provides the feature
|
||||||
|
providerName=Eclipse TM Project
|
||||||
|
|
||||||
|
# "tmUpdateSiteName" property - label for the update site
|
||||||
|
tmUpdateSiteName=Target Management 3.7 Updates
|
||||||
|
|
||||||
|
# "description" property - description of the feature
|
||||||
|
description=An remote connector implementation for the Terminal.
|
||||||
|
|
||||||
|
# "copyright" property - text of the "Feature Update Copyright"
|
||||||
|
copyright=\
|
||||||
|
Copyright (c) 2015 IBM Corporation and others.\n\
|
||||||
|
All rights reserved. This program and the accompanying materials\n\
|
||||||
|
are made available under the terms of the Eclipse Public License v1.0\n\
|
||||||
|
which accompanies this distribution, and is available at\n\
|
||||||
|
http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
################ end of copyright property ####################################
|
||||||
|
|
||||||
|
# "licenseURL" property - URL of the "Feature License"
|
||||||
|
# do not translate value - just change to point to a locale-specific HTML page
|
||||||
|
licenseURL=license.html
|
||||||
|
|
||||||
|
# "license" property - text of the "Feature Update License"
|
||||||
|
# should be plain text version of license agreement pointed to be "licenseURL"
|
||||||
|
license=\
|
||||||
|
Eclipse Foundation Software User Agreement\n\
|
||||||
|
February 1, 2011\n\
|
||||||
|
\n\
|
||||||
|
Usage Of Content\n\
|
||||||
|
\n\
|
||||||
|
THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
|
||||||
|
OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
|
||||||
|
USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
|
||||||
|
AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
|
||||||
|
NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
|
||||||
|
AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
|
||||||
|
AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
|
||||||
|
OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
|
||||||
|
TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
|
||||||
|
OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
|
||||||
|
BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
|
||||||
|
\n\
|
||||||
|
Applicable Licenses\n\
|
||||||
|
\n\
|
||||||
|
Unless otherwise indicated, all Content made available by the\n\
|
||||||
|
Eclipse Foundation is provided to you under the terms and conditions of\n\
|
||||||
|
the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
|
||||||
|
provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
|
||||||
|
For purposes of the EPL, "Program" will mean the Content.\n\
|
||||||
|
\n\
|
||||||
|
Content includes, but is not limited to, source code, object code,\n\
|
||||||
|
documentation and other files maintained in the Eclipse Foundation source code\n\
|
||||||
|
repository ("Repository") in software modules ("Modules") and made available\n\
|
||||||
|
as downloadable archives ("Downloads").\n\
|
||||||
|
\n\
|
||||||
|
- Content may be structured and packaged into modules to facilitate delivering,\n\
|
||||||
|
extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
|
||||||
|
plug-in fragments ("Fragments"), and features ("Features").\n\
|
||||||
|
- Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
|
||||||
|
in a directory named "plugins".\n\
|
||||||
|
- A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
|
||||||
|
Each Feature may be packaged as a sub-directory in a directory named "features".\n\
|
||||||
|
Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
|
||||||
|
numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
|
||||||
|
- Features may also include other Features ("Included Features"). Within a Feature, files\n\
|
||||||
|
named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
|
||||||
|
\n\
|
||||||
|
The terms and conditions governing Plug-ins and Fragments should be\n\
|
||||||
|
contained in files named "about.html" ("Abouts"). The terms and\n\
|
||||||
|
conditions governing Features and Included Features should be contained\n\
|
||||||
|
in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
|
||||||
|
Licenses may be located in any directory of a Download or Module\n\
|
||||||
|
including, but not limited to the following locations:\n\
|
||||||
|
\n\
|
||||||
|
- The top-level (root) directory\n\
|
||||||
|
- Plug-in and Fragment directories\n\
|
||||||
|
- Inside Plug-ins and Fragments packaged as JARs\n\
|
||||||
|
- Sub-directories of the directory named "src" of certain Plug-ins\n\
|
||||||
|
- Feature directories\n\
|
||||||
|
\n\
|
||||||
|
Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
|
||||||
|
Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
|
||||||
|
Update License") during the installation process. If the Feature contains\n\
|
||||||
|
Included Features, the Feature Update License should either provide you\n\
|
||||||
|
with the terms and conditions governing the Included Features or inform\n\
|
||||||
|
you where you can locate them. Feature Update Licenses may be found in\n\
|
||||||
|
the "license" property of files named "feature.properties" found within a Feature.\n\
|
||||||
|
Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
|
||||||
|
terms and conditions (or references to such terms and conditions) that\n\
|
||||||
|
govern your use of the associated Content in that directory.\n\
|
||||||
|
\n\
|
||||||
|
THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
|
||||||
|
TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
|
||||||
|
SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
|
||||||
|
\n\
|
||||||
|
- Eclipse Distribution License Version 1.0 (available at http://www.eclipse.org/licenses/edl-v1.0.html)\n\
|
||||||
|
- Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
|
||||||
|
- Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
|
||||||
|
- Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
|
||||||
|
- Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
|
||||||
|
- Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
|
||||||
|
\n\
|
||||||
|
IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
|
||||||
|
TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
|
||||||
|
is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
|
||||||
|
govern that particular Content.\n\
|
||||||
|
\n\
|
||||||
|
\n\Use of Provisioning Technology\n\
|
||||||
|
\n\
|
||||||
|
The Eclipse Foundation makes available provisioning software, examples of which include,\n\
|
||||||
|
but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
|
||||||
|
the purpose of allowing users to install software, documentation, information and/or\n\
|
||||||
|
other materials (collectively "Installable Software"). This capability is provided with\n\
|
||||||
|
the intent of allowing such users to install, extend and update Eclipse-based products.\n\
|
||||||
|
Information about packaging Installable Software is available at\n\
|
||||||
|
http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
|
||||||
|
\n\
|
||||||
|
You may use Provisioning Technology to allow other parties to install Installable Software.\n\
|
||||||
|
You shall be responsible for enabling the applicable license agreements relating to the\n\
|
||||||
|
Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
|
||||||
|
in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
|
||||||
|
making it available in accordance with the Specification, you further acknowledge your\n\
|
||||||
|
agreement to, and the acquisition of all necessary rights to permit the following:\n\
|
||||||
|
\n\
|
||||||
|
1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
|
||||||
|
the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
|
||||||
|
extending or updating the functionality of an Eclipse-based product.\n\
|
||||||
|
2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
|
||||||
|
Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
|
||||||
|
3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
|
||||||
|
govern the use of the Installable Software ("Installable Software Agreement") and such\n\
|
||||||
|
Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
|
||||||
|
with the Specification. Such Installable Software Agreement must inform the user of the\n\
|
||||||
|
terms and conditions that govern the Installable Software and must solicit acceptance by\n\
|
||||||
|
the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
|
||||||
|
indication of agreement by the user, the provisioning Technology will complete installation\n\
|
||||||
|
of the Installable Software.\n\
|
||||||
|
\n\
|
||||||
|
Cryptography\n\
|
||||||
|
\n\
|
||||||
|
Content may contain encryption software. The country in which you are\n\
|
||||||
|
currently may have restrictions on the import, possession, and use,\n\
|
||||||
|
and/or re-export to another country, of encryption software. BEFORE\n\
|
||||||
|
using any encryption software, please check the country's laws,\n\
|
||||||
|
regulations and policies concerning the import, possession, or use, and\n\
|
||||||
|
re-export of encryption software, to see if this is permitted.\n\
|
||||||
|
\n\
|
||||||
|
Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
|
||||||
|
########### end of license property ##########################################
|
57
features/org.eclipse.tm.terminal.remote-feature/feature.xml
Normal file
57
features/org.eclipse.tm.terminal.remote-feature/feature.xml
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright (c) 2015 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
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
IBM Corporation - initial API and implementation
|
||||||
|
-->
|
||||||
|
<feature
|
||||||
|
id="org.eclipse.tm.terminal.remote.feature"
|
||||||
|
label="%featureName"
|
||||||
|
version="3.7.0.qualifier"
|
||||||
|
provider-name="%providerName"
|
||||||
|
license-feature="org.eclipse.license"
|
||||||
|
license-feature-version="1.0.1.qualifier">
|
||||||
|
|
||||||
|
<description>
|
||||||
|
%description
|
||||||
|
</description>
|
||||||
|
|
||||||
|
<copyright>
|
||||||
|
%copyright
|
||||||
|
</copyright>
|
||||||
|
|
||||||
|
<license url="%licenseURL">
|
||||||
|
%license
|
||||||
|
</license>
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<update label="%tmUpdateSiteName" url="http://download.eclipse.org/tm/updates/3.7"/>
|
||||||
|
<discovery label="%tmUpdateSiteName" url="http://download.eclipse.org/tm/updates/3.7"/>
|
||||||
|
</url>
|
||||||
|
|
||||||
|
<requires>
|
||||||
|
<import plugin="org.eclipse.ui"/>
|
||||||
|
<import plugin="org.eclipse.core.runtime"/>
|
||||||
|
<import plugin="org.eclipse.tm.terminal" version="3.3.0" match="equivalent"/>
|
||||||
|
<import plugin="org.eclipse.remote.core"/>
|
||||||
|
<import plugin="org.eclipse.remote.ui"/>
|
||||||
|
<import plugin="org.eclipse.core.resources"/>
|
||||||
|
<import plugin="org.eclipse.tm.terminal.view"/>
|
||||||
|
<import plugin="org.eclipse.swt"/>
|
||||||
|
<import plugin="org.eclipse.jface"/>
|
||||||
|
<import plugin="org.eclipse.ui.ide"/>
|
||||||
|
</requires>
|
||||||
|
|
||||||
|
<plugin
|
||||||
|
id="org.eclipse.tm.terminal.remote"
|
||||||
|
download-size="0"
|
||||||
|
install-size="0"
|
||||||
|
version="0.0.0"
|
||||||
|
unpack="false"/>
|
||||||
|
|
||||||
|
</feature>
|
30
features/org.eclipse.tm.terminal.remote-feature/pom.xml
Normal file
30
features/org.eclipse.tm.terminal.remote-feature/pom.xml
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<artifactId>org.eclipse.tm.maven-build</artifactId>
|
||||||
|
<groupId>org.eclipse.tm</groupId>
|
||||||
|
<version>4.0.0-SNAPSHOT</version>
|
||||||
|
<relativePath>../../../admin/pom-build.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
<groupId>org.eclipse.tm.features</groupId>
|
||||||
|
<artifactId>org.eclipse.tm.terminal.remote.feature</artifactId>
|
||||||
|
<version>3.7.0.qualifier</version>
|
||||||
|
<packaging>eclipse-feature</packaging>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<pluginManagement>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.eclipse.tycho</groupId>
|
||||||
|
<artifactId>tycho-packaging-plugin</artifactId>
|
||||||
|
<version>${tycho-version}</version>
|
||||||
|
<configuration>
|
||||||
|
<timestampProvider>default</timestampProvider>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</pluginManagement>
|
||||||
|
</build>
|
||||||
|
</project>
|
17
features/org.eclipse.tm.terminal.remote.sdk-feature/.project
Normal file
17
features/org.eclipse.tm.terminal.remote.sdk-feature/.project
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>org.eclipse.tm.terminal.remote.sdk-feature</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.pde.FeatureBuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.pde.FeatureNature</nature>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
|
@ -0,0 +1,12 @@
|
||||||
|
###############################################################################
|
||||||
|
# Copyright (c) 2015 IBM Corp. 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
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
bin.includes = feature.xml,\
|
||||||
|
feature.properties
|
||||||
|
|
||||||
|
generate.plugin@org.eclipse.tm.terminal.remote.source=org.eclipse.tm.terminal.remote
|
|
@ -0,0 +1,165 @@
|
||||||
|
###############################################################################
|
||||||
|
# Copyright (c) 2015 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
|
||||||
|
###############################################################################
|
||||||
|
# feature.properties
|
||||||
|
# contains externalized strings for feature.xml
|
||||||
|
# "%foo" in feature.xml corresponds to the key "foo" in this file
|
||||||
|
# java.io.Properties file (ISO 8859-1 with "\" escapes)
|
||||||
|
# This file should be translated.
|
||||||
|
|
||||||
|
# "featureName" property - name of the feature
|
||||||
|
featureName=Target Management Terminal Remote Connector SDK
|
||||||
|
|
||||||
|
# "providerName" property - name of the company that provides the feature
|
||||||
|
providerName=Eclipse TM Project
|
||||||
|
|
||||||
|
# "tmUpdateSiteName" property - label for the update site
|
||||||
|
tmUpdateSiteName=Target Management 3.7 Updates
|
||||||
|
|
||||||
|
# "description" property - description of the feature
|
||||||
|
description=An remote connector implementation for the Terminal.
|
||||||
|
|
||||||
|
# "copyright" property - text of the "Feature Update Copyright"
|
||||||
|
copyright=\
|
||||||
|
Copyright (c) 2015 IBM Corporation and others.\n\
|
||||||
|
All rights reserved. This program and the accompanying materials\n\
|
||||||
|
are made available under the terms of the Eclipse Public License v1.0\n\
|
||||||
|
which accompanies this distribution, and is available at\n\
|
||||||
|
http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
################ end of copyright property ####################################
|
||||||
|
|
||||||
|
# "licenseURL" property - URL of the "Feature License"
|
||||||
|
# do not translate value - just change to point to a locale-specific HTML page
|
||||||
|
licenseURL=license.html
|
||||||
|
|
||||||
|
# "license" property - text of the "Feature Update License"
|
||||||
|
# should be plain text version of license agreement pointed to be "licenseURL"
|
||||||
|
license=\
|
||||||
|
Eclipse Foundation Software User Agreement\n\
|
||||||
|
February 1, 2011\n\
|
||||||
|
\n\
|
||||||
|
Usage Of Content\n\
|
||||||
|
\n\
|
||||||
|
THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
|
||||||
|
OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
|
||||||
|
USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
|
||||||
|
AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
|
||||||
|
NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
|
||||||
|
AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
|
||||||
|
AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
|
||||||
|
OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
|
||||||
|
TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
|
||||||
|
OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
|
||||||
|
BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
|
||||||
|
\n\
|
||||||
|
Applicable Licenses\n\
|
||||||
|
\n\
|
||||||
|
Unless otherwise indicated, all Content made available by the\n\
|
||||||
|
Eclipse Foundation is provided to you under the terms and conditions of\n\
|
||||||
|
the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
|
||||||
|
provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
|
||||||
|
For purposes of the EPL, "Program" will mean the Content.\n\
|
||||||
|
\n\
|
||||||
|
Content includes, but is not limited to, source code, object code,\n\
|
||||||
|
documentation and other files maintained in the Eclipse Foundation source code\n\
|
||||||
|
repository ("Repository") in software modules ("Modules") and made available\n\
|
||||||
|
as downloadable archives ("Downloads").\n\
|
||||||
|
\n\
|
||||||
|
- Content may be structured and packaged into modules to facilitate delivering,\n\
|
||||||
|
extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
|
||||||
|
plug-in fragments ("Fragments"), and features ("Features").\n\
|
||||||
|
- Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
|
||||||
|
in a directory named "plugins".\n\
|
||||||
|
- A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
|
||||||
|
Each Feature may be packaged as a sub-directory in a directory named "features".\n\
|
||||||
|
Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
|
||||||
|
numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
|
||||||
|
- Features may also include other Features ("Included Features"). Within a Feature, files\n\
|
||||||
|
named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
|
||||||
|
\n\
|
||||||
|
The terms and conditions governing Plug-ins and Fragments should be\n\
|
||||||
|
contained in files named "about.html" ("Abouts"). The terms and\n\
|
||||||
|
conditions governing Features and Included Features should be contained\n\
|
||||||
|
in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
|
||||||
|
Licenses may be located in any directory of a Download or Module\n\
|
||||||
|
including, but not limited to the following locations:\n\
|
||||||
|
\n\
|
||||||
|
- The top-level (root) directory\n\
|
||||||
|
- Plug-in and Fragment directories\n\
|
||||||
|
- Inside Plug-ins and Fragments packaged as JARs\n\
|
||||||
|
- Sub-directories of the directory named "src" of certain Plug-ins\n\
|
||||||
|
- Feature directories\n\
|
||||||
|
\n\
|
||||||
|
Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
|
||||||
|
Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
|
||||||
|
Update License") during the installation process. If the Feature contains\n\
|
||||||
|
Included Features, the Feature Update License should either provide you\n\
|
||||||
|
with the terms and conditions governing the Included Features or inform\n\
|
||||||
|
you where you can locate them. Feature Update Licenses may be found in\n\
|
||||||
|
the "license" property of files named "feature.properties" found within a Feature.\n\
|
||||||
|
Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
|
||||||
|
terms and conditions (or references to such terms and conditions) that\n\
|
||||||
|
govern your use of the associated Content in that directory.\n\
|
||||||
|
\n\
|
||||||
|
THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
|
||||||
|
TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
|
||||||
|
SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
|
||||||
|
\n\
|
||||||
|
- Eclipse Distribution License Version 1.0 (available at http://www.eclipse.org/licenses/edl-v1.0.html)\n\
|
||||||
|
- Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
|
||||||
|
- Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
|
||||||
|
- Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
|
||||||
|
- Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
|
||||||
|
- Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
|
||||||
|
\n\
|
||||||
|
IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
|
||||||
|
TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
|
||||||
|
is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
|
||||||
|
govern that particular Content.\n\
|
||||||
|
\n\
|
||||||
|
\n\Use of Provisioning Technology\n\
|
||||||
|
\n\
|
||||||
|
The Eclipse Foundation makes available provisioning software, examples of which include,\n\
|
||||||
|
but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
|
||||||
|
the purpose of allowing users to install software, documentation, information and/or\n\
|
||||||
|
other materials (collectively "Installable Software"). This capability is provided with\n\
|
||||||
|
the intent of allowing such users to install, extend and update Eclipse-based products.\n\
|
||||||
|
Information about packaging Installable Software is available at\n\
|
||||||
|
http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
|
||||||
|
\n\
|
||||||
|
You may use Provisioning Technology to allow other parties to install Installable Software.\n\
|
||||||
|
You shall be responsible for enabling the applicable license agreements relating to the\n\
|
||||||
|
Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
|
||||||
|
in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
|
||||||
|
making it available in accordance with the Specification, you further acknowledge your\n\
|
||||||
|
agreement to, and the acquisition of all necessary rights to permit the following:\n\
|
||||||
|
\n\
|
||||||
|
1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
|
||||||
|
the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
|
||||||
|
extending or updating the functionality of an Eclipse-based product.\n\
|
||||||
|
2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
|
||||||
|
Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
|
||||||
|
3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
|
||||||
|
govern the use of the Installable Software ("Installable Software Agreement") and such\n\
|
||||||
|
Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
|
||||||
|
with the Specification. Such Installable Software Agreement must inform the user of the\n\
|
||||||
|
terms and conditions that govern the Installable Software and must solicit acceptance by\n\
|
||||||
|
the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
|
||||||
|
indication of agreement by the user, the provisioning Technology will complete installation\n\
|
||||||
|
of the Installable Software.\n\
|
||||||
|
\n\
|
||||||
|
Cryptography\n\
|
||||||
|
\n\
|
||||||
|
Content may contain encryption software. The country in which you are\n\
|
||||||
|
currently may have restrictions on the import, possession, and use,\n\
|
||||||
|
and/or re-export to another country, of encryption software. BEFORE\n\
|
||||||
|
using any encryption software, please check the country's laws,\n\
|
||||||
|
regulations and policies concerning the import, possession, or use, and\n\
|
||||||
|
re-export of encryption software, to see if this is permitted.\n\
|
||||||
|
\n\
|
||||||
|
Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
|
||||||
|
########### end of license property ##########################################
|
|
@ -0,0 +1,66 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright (c) 2015 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
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
IBM Corporation - initial API and implementation
|
||||||
|
-->
|
||||||
|
<feature
|
||||||
|
id="org.eclipse.tm.terminal.remote.sdk.feature"
|
||||||
|
label="%featureName"
|
||||||
|
version="3.7.0.qualifier"
|
||||||
|
provider-name="%providerName"
|
||||||
|
license-feature="org.eclipse.license"
|
||||||
|
license-feature-version="1.0.1.qualifier">
|
||||||
|
|
||||||
|
<description>
|
||||||
|
%description
|
||||||
|
</description>
|
||||||
|
|
||||||
|
<copyright>
|
||||||
|
%copyright
|
||||||
|
</copyright>
|
||||||
|
|
||||||
|
<license url="%licenseURL">
|
||||||
|
%license
|
||||||
|
</license>
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<update label="%tmUpdateSiteName" url="http://download.eclipse.org/tm/updates/3.7"/>
|
||||||
|
<discovery label="%tmUpdateSiteName" url="http://download.eclipse.org/tm/updates/3.7"/>
|
||||||
|
</url>
|
||||||
|
|
||||||
|
<includes
|
||||||
|
id="org.eclipse.tm.terminal.view"
|
||||||
|
version="0.0.0"/>
|
||||||
|
|
||||||
|
<includes
|
||||||
|
id="org.eclipse.tm.terminal"
|
||||||
|
version="0.0.0"/>
|
||||||
|
|
||||||
|
<includes
|
||||||
|
id="org.eclipse.tm.terminal.remote.feature"
|
||||||
|
version="0.0.0"/>
|
||||||
|
|
||||||
|
<requires>
|
||||||
|
<import plugin="org.eclipse.cdt.core" version="5.2.0" match="greaterOrEqual"/>
|
||||||
|
<import plugin="org.eclipse.core.runtime"/>
|
||||||
|
<import plugin="org.eclipse.debug.core"/>
|
||||||
|
<import plugin="org.eclipse.debug.ui"/>
|
||||||
|
<import plugin="org.eclipse.jface"/>
|
||||||
|
<import plugin="org.eclipse.ui"/>
|
||||||
|
<import plugin="org.eclipse.ui.externaltools"/>
|
||||||
|
</requires>
|
||||||
|
|
||||||
|
<plugin
|
||||||
|
id="org.eclipse.tm.terminal.remote.source"
|
||||||
|
download-size="0"
|
||||||
|
install-size="0"
|
||||||
|
version="0.0.0"
|
||||||
|
unpack="false"/>
|
||||||
|
|
||||||
|
</feature>
|
30
features/org.eclipse.tm.terminal.remote.sdk-feature/pom.xml
Normal file
30
features/org.eclipse.tm.terminal.remote.sdk-feature/pom.xml
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<artifactId>org.eclipse.tm.maven-build</artifactId>
|
||||||
|
<groupId>org.eclipse.tm</groupId>
|
||||||
|
<version>4.0.0-SNAPSHOT</version>
|
||||||
|
<relativePath>../../../admin/pom-build.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
<groupId>org.eclipse.tm.features</groupId>
|
||||||
|
<artifactId>org.eclipse.tm.terminal.remote.sdk.feature</artifactId>
|
||||||
|
<version>3.7.0.qualifier</version>
|
||||||
|
<packaging>eclipse-feature</packaging>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<pluginManagement>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.eclipse.tycho</groupId>
|
||||||
|
<artifactId>tycho-packaging-plugin</artifactId>
|
||||||
|
<version>${tycho-version}</version>
|
||||||
|
<configuration>
|
||||||
|
<timestampProvider>default</timestampProvider>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</pluginManagement>
|
||||||
|
</build>
|
||||||
|
</project>
|
7
plugins/org.eclipse.tm.terminal.remote/.classpath
Normal file
7
plugins/org.eclipse.tm.terminal.remote/.classpath
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<classpath>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||||
|
<classpathentry kind="src" path="src"/>
|
||||||
|
<classpathentry kind="output" path="bin"/>
|
||||||
|
</classpath>
|
1
plugins/org.eclipse.tm.terminal.remote/.cvsignore
Normal file
1
plugins/org.eclipse.tm.terminal.remote/.cvsignore
Normal file
|
@ -0,0 +1 @@
|
||||||
|
bin
|
34
plugins/org.eclipse.tm.terminal.remote/.project
Normal file
34
plugins/org.eclipse.tm.terminal.remote/.project
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>org.eclipse.tm.terminal.remote</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.pde.PluginNature</nature>
|
||||||
|
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||||
|
<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
|
@ -0,0 +1,74 @@
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
||||||
|
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||||
|
org.eclipse.jdt.core.compiler.compliance=1.7
|
||||||
|
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
|
||||||
|
org.eclipse.jdt.core.compiler.problem.autoboxing=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.deprecation=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||||
|
org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
|
||||||
|
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
|
||||||
|
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
|
||||||
|
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
|
||||||
|
org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
|
||||||
|
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
|
||||||
|
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.nullReference=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
|
||||||
|
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedImport=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
|
||||||
|
org.eclipse.jdt.core.compiler.source=1.7
|
|
@ -0,0 +1,3 @@
|
||||||
|
#Thu Dec 07 03:43:08 CET 2006
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
internal.default.compliance=user
|
24
plugins/org.eclipse.tm.terminal.remote/META-INF/MANIFEST.MF
Normal file
24
plugins/org.eclipse.tm.terminal.remote/META-INF/MANIFEST.MF
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
Manifest-Version: 1.0
|
||||||
|
Bundle-ManifestVersion: 2
|
||||||
|
Bundle-Name: %pluginName
|
||||||
|
Bundle-SymbolicName: org.eclipse.tm.terminal.remote;singleton:=true
|
||||||
|
Bundle-Version: 1.0.0.qualifier
|
||||||
|
Bundle-Vendor: %providerName
|
||||||
|
Bundle-Localization: plugin
|
||||||
|
Require-Bundle: org.eclipse.ui,
|
||||||
|
org.eclipse.core.runtime,
|
||||||
|
org.eclipse.tm.terminal,
|
||||||
|
org.eclipse.remote.core,
|
||||||
|
org.eclipse.remote.ui,
|
||||||
|
org.eclipse.core.resources,
|
||||||
|
org.eclipse.tm.terminal.view,
|
||||||
|
org.eclipse.swt,
|
||||||
|
org.eclipse.jface
|
||||||
|
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
||||||
|
Export-Package: org.eclipse.tm.internal.terminal.remote;x-internal:=true,
|
||||||
|
org.eclipse.tm.terminal.remote
|
||||||
|
Bundle-Activator: org.eclipse.tm.internal.terminal.remote.Activator
|
||||||
|
Bundle-ActivationPolicy: lazy
|
||||||
|
Eclipse-LazyStart: true
|
||||||
|
Import-Package: org.eclipse.core.resources,
|
||||||
|
org.eclipse.ui.ide
|
28
plugins/org.eclipse.tm.terminal.remote/about.html
Normal file
28
plugins/org.eclipse.tm.terminal.remote/about.html
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||||
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
|
||||||
|
<title>About</title>
|
||||||
|
</head>
|
||||||
|
<body lang="EN-US">
|
||||||
|
<h2>About This Content</h2>
|
||||||
|
|
||||||
|
<p>June 5, 2007</p>
|
||||||
|
<h3>License</h3>
|
||||||
|
|
||||||
|
<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
|
||||||
|
indicated below, the Content is provided to you under the terms and conditions of the
|
||||||
|
Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
|
||||||
|
at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
|
||||||
|
For purposes of the EPL, "Program" will mean the Content.</p>
|
||||||
|
|
||||||
|
<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
|
||||||
|
being redistributed by another party ("Redistributor") and different terms and conditions may
|
||||||
|
apply to your use of any object code in the Content. Check the Redistributor's license that was
|
||||||
|
provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
|
||||||
|
indicated below, the terms and conditions of the EPL still apply to any source code in the Content
|
||||||
|
and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
15
plugins/org.eclipse.tm.terminal.remote/build.properties
Normal file
15
plugins/org.eclipse.tm.terminal.remote/build.properties
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
###############################################################################
|
||||||
|
# Copyright (c) 2015 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
|
||||||
|
###############################################################################
|
||||||
|
source.. = src/
|
||||||
|
output.. = bin/
|
||||||
|
bin.includes = META-INF/,\
|
||||||
|
.,\
|
||||||
|
plugin.xml,\
|
||||||
|
plugin.properties,\
|
||||||
|
about.html
|
||||||
|
|
11
plugins/org.eclipse.tm.terminal.remote/plugin.properties
Normal file
11
plugins/org.eclipse.tm.terminal.remote/plugin.properties
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
###############################################################################
|
||||||
|
# Copyright (c) 2015 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
|
||||||
|
###############################################################################
|
||||||
|
pluginName = Target Management Terminal Remote Services Connector
|
||||||
|
providerName = Eclipse PTP
|
||||||
|
connectionName = Remote Services
|
||||||
|
RemoteTerminalPage.name = Remote Terminal
|
33
plugins/org.eclipse.tm.terminal.remote/plugin.xml
Normal file
33
plugins/org.eclipse.tm.terminal.remote/plugin.xml
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<?eclipse version="3.2"?>
|
||||||
|
<!--
|
||||||
|
# Copyright (c) 2015 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
|
||||||
|
-->
|
||||||
|
<plugin>
|
||||||
|
<extension-point id="parsers" name="Terminal Parsers" schema="schema/parsers.exsd"/>
|
||||||
|
<extension
|
||||||
|
point="org.eclipse.tm.terminal.terminalConnectors">
|
||||||
|
<connector name="%connectionName"
|
||||||
|
id="org.eclipse.tm.terminal.RemoteConnector"
|
||||||
|
class="org.eclipse.tm.internal.terminal.remote.RemoteConnector"/>
|
||||||
|
</extension>
|
||||||
|
<extension
|
||||||
|
point="org.eclipse.core.runtime.preferences">
|
||||||
|
<initializer
|
||||||
|
class="org.eclipse.tm.internal.terminal.remote.preferences.RemoteTerminalPreferenceInitializer">
|
||||||
|
</initializer>
|
||||||
|
</extension>
|
||||||
|
<extension
|
||||||
|
point="org.eclipse.ui.preferencePages">
|
||||||
|
<page
|
||||||
|
category="org.eclipse.tm.terminal.TerminalPreferencePage"
|
||||||
|
class="org.eclipse.tm.internal.terminal.remote.preferences.RemoteTerminalPreferencePage"
|
||||||
|
id="org.eclipse.tm.terminal.remote.page"
|
||||||
|
name="%RemoteTerminalPage.name">
|
||||||
|
</page>
|
||||||
|
</extension>
|
||||||
|
</plugin>
|
16
plugins/org.eclipse.tm.terminal.remote/pom.xml
Normal file
16
plugins/org.eclipse.tm.terminal.remote/pom.xml
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>org.eclipse.tm</groupId>
|
||||||
|
<artifactId>org.eclipse.tm.maven-build</artifactId>
|
||||||
|
<version>4.0.0-SNAPSHOT</version>
|
||||||
|
<relativePath>../../../admin/pom-build.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
<groupId>org.eclipse.tm</groupId>
|
||||||
|
<artifactId>org.eclipse.tm.terminal.remote</artifactId>
|
||||||
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
|
<packaging>eclipse-plugin</packaging>
|
||||||
|
</project>
|
109
plugins/org.eclipse.tm.terminal.remote/schema/parsers.exsd
Normal file
109
plugins/org.eclipse.tm.terminal.remote/schema/parsers.exsd
Normal file
|
@ -0,0 +1,109 @@
|
||||||
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
|
<!-- Schema file written by PDE -->
|
||||||
|
<schema targetNamespace="org.eclipse.tm.terminal.remote" xmlns="http://www.w3.org/2001/XMLSchema">
|
||||||
|
<annotation>
|
||||||
|
<appInfo>
|
||||||
|
<meta.schema plugin="org.eclipse.tm.terminal.remote" id="parser" name="Terminal Parser"/>
|
||||||
|
</appInfo>
|
||||||
|
<documentation>
|
||||||
|
Extension point that allows a parser to be added to the terminal view. The parser is intended to process output generated by the remote shell and perform an action based on the content.
|
||||||
|
</documentation>
|
||||||
|
</annotation>
|
||||||
|
|
||||||
|
<element name="extension">
|
||||||
|
<annotation>
|
||||||
|
<appInfo>
|
||||||
|
<meta.element />
|
||||||
|
</appInfo>
|
||||||
|
</annotation>
|
||||||
|
<complexType>
|
||||||
|
<sequence>
|
||||||
|
<element ref="parser"/>
|
||||||
|
</sequence>
|
||||||
|
<attribute name="point" type="string" use="required">
|
||||||
|
<annotation>
|
||||||
|
<documentation>
|
||||||
|
|
||||||
|
</documentation>
|
||||||
|
</annotation>
|
||||||
|
</attribute>
|
||||||
|
<attribute name="id" type="string">
|
||||||
|
<annotation>
|
||||||
|
<documentation>
|
||||||
|
|
||||||
|
</documentation>
|
||||||
|
</annotation>
|
||||||
|
</attribute>
|
||||||
|
<attribute name="name" type="string">
|
||||||
|
<annotation>
|
||||||
|
<documentation>
|
||||||
|
|
||||||
|
</documentation>
|
||||||
|
<appInfo>
|
||||||
|
<meta.attribute translatable="true"/>
|
||||||
|
</appInfo>
|
||||||
|
</annotation>
|
||||||
|
</attribute>
|
||||||
|
</complexType>
|
||||||
|
</element>
|
||||||
|
|
||||||
|
<element name="parser">
|
||||||
|
<complexType>
|
||||||
|
<attribute name="id" type="string" use="required">
|
||||||
|
<annotation>
|
||||||
|
<documentation>
|
||||||
|
Unique identifier for this parser
|
||||||
|
</documentation>
|
||||||
|
</annotation>
|
||||||
|
</attribute>
|
||||||
|
<attribute name="class" type="string" use="required">
|
||||||
|
<annotation>
|
||||||
|
<documentation>
|
||||||
|
|
||||||
|
</documentation>
|
||||||
|
<appInfo>
|
||||||
|
<meta.attribute kind="java" basedOn=":org.eclipse.tm.terminal.remote.IRemoteTerminalParser"/>
|
||||||
|
</appInfo>
|
||||||
|
</annotation>
|
||||||
|
</attribute>
|
||||||
|
</complexType>
|
||||||
|
</element>
|
||||||
|
|
||||||
|
<annotation>
|
||||||
|
<appInfo>
|
||||||
|
<meta.section type="since"/>
|
||||||
|
</appInfo>
|
||||||
|
<documentation>
|
||||||
|
[Enter the first release in which this extension point appears.]
|
||||||
|
</documentation>
|
||||||
|
</annotation>
|
||||||
|
|
||||||
|
<annotation>
|
||||||
|
<appInfo>
|
||||||
|
<meta.section type="examples"/>
|
||||||
|
</appInfo>
|
||||||
|
<documentation>
|
||||||
|
[Enter extension point usage example here.]
|
||||||
|
</documentation>
|
||||||
|
</annotation>
|
||||||
|
|
||||||
|
<annotation>
|
||||||
|
<appInfo>
|
||||||
|
<meta.section type="apiinfo"/>
|
||||||
|
</appInfo>
|
||||||
|
<documentation>
|
||||||
|
[Enter API information here.]
|
||||||
|
</documentation>
|
||||||
|
</annotation>
|
||||||
|
|
||||||
|
<annotation>
|
||||||
|
<appInfo>
|
||||||
|
<meta.section type="implementation"/>
|
||||||
|
</appInfo>
|
||||||
|
<documentation>
|
||||||
|
[Enter information about supplied implementation of this extension point.]
|
||||||
|
</documentation>
|
||||||
|
</annotation>
|
||||||
|
|
||||||
|
|
||||||
|
</schema>
|
|
@ -0,0 +1,111 @@
|
||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2015 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
|
||||||
|
*******************************************************************************/
|
||||||
|
package org.eclipse.tm.internal.terminal.remote;
|
||||||
|
|
||||||
|
import org.eclipse.core.runtime.IStatus;
|
||||||
|
import org.eclipse.core.runtime.Plugin;
|
||||||
|
import org.eclipse.core.runtime.Status;
|
||||||
|
import org.eclipse.jface.resource.ImageDescriptor;
|
||||||
|
import org.eclipse.tm.internal.terminal.remote.messages.Messages;
|
||||||
|
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||||
|
import org.osgi.framework.BundleContext;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The activator class controls the plug-in life cycle
|
||||||
|
*/
|
||||||
|
public class Activator extends Plugin {
|
||||||
|
|
||||||
|
public static final String PLUGIN_ID = "org.eclipse.tm.terminal.remote"; //$NON-NLS-1$
|
||||||
|
private static Activator plugin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The constructor
|
||||||
|
*/
|
||||||
|
public Activator() {
|
||||||
|
super();
|
||||||
|
plugin = this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void start(BundleContext context) throws Exception {
|
||||||
|
super.start(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void stop(BundleContext context) throws Exception {
|
||||||
|
plugin = null;
|
||||||
|
super.stop(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the shared instance
|
||||||
|
*
|
||||||
|
* @return the shared instance
|
||||||
|
*/
|
||||||
|
public static Activator getDefault() {
|
||||||
|
return plugin;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns an image descriptor for the image file at the given plug-in relative path.
|
||||||
|
*
|
||||||
|
* @param path
|
||||||
|
* the path
|
||||||
|
* @return the image descriptor
|
||||||
|
*/
|
||||||
|
public static ImageDescriptor getImageDescriptor(String path) {
|
||||||
|
return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create log entry from an IStatus
|
||||||
|
*
|
||||||
|
* @param status
|
||||||
|
* status to log
|
||||||
|
*/
|
||||||
|
public static void log(IStatus status) {
|
||||||
|
getDefault().getLog().log(status);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create log entry from a string
|
||||||
|
*
|
||||||
|
* @param msg
|
||||||
|
* message to log
|
||||||
|
*/
|
||||||
|
public static void log(String msg) {
|
||||||
|
log(new Status(IStatus.ERROR, getUniqueIdentifier(), IStatus.ERROR, msg, null));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create log entry from a Throwable
|
||||||
|
*
|
||||||
|
* @param e
|
||||||
|
* throwable to log
|
||||||
|
*/
|
||||||
|
public static void log(Throwable e) {
|
||||||
|
log(new Status(IStatus.ERROR, getUniqueIdentifier(), IStatus.ERROR, Messages.TERMINAL_EXCEPTION, e));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get rid of edu.lsu.cct tags
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generate a unique identifier
|
||||||
|
*
|
||||||
|
* @return unique identifier string
|
||||||
|
*/
|
||||||
|
public static String getUniqueIdentifier() {
|
||||||
|
if (getDefault() == null) {
|
||||||
|
// If the default instance is not yet initialized,
|
||||||
|
// return a static identifier. This identifier must
|
||||||
|
// match the plugin id defined in plugin.xml
|
||||||
|
return PLUGIN_ID;
|
||||||
|
}
|
||||||
|
return getDefault().getBundle().getSymbolicName();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,361 @@
|
||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2015 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
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* IBM Corporation - initial API and implementation
|
||||||
|
*******************************************************************************/
|
||||||
|
package org.eclipse.tm.internal.terminal.remote;
|
||||||
|
|
||||||
|
import java.text.CharacterIterator;
|
||||||
|
import java.text.StringCharacterIterator;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Utility class for managing command line arguments.
|
||||||
|
*/
|
||||||
|
public class ArgumentParser {
|
||||||
|
private final List<String> tokens;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a command line representation from the string with a shell command
|
||||||
|
* line. The command line is parsed and split on spaces. Quoted or escaped
|
||||||
|
* spaces are preserved..
|
||||||
|
*/
|
||||||
|
public ArgumentParser(String commandline) {
|
||||||
|
this.tokens = parseCommandline(commandline);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a command line representation from an array of strings. The first
|
||||||
|
* element of the array is assumed to be the command, the remaining, the
|
||||||
|
* arguments. The elements are not parsed not (un)escaped., but taked as the
|
||||||
|
* are.
|
||||||
|
*/
|
||||||
|
public ArgumentParser(String tokenArray[]) {
|
||||||
|
this(Arrays.asList(tokenArray));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a command line representation from an array of strings. The first
|
||||||
|
* element of the list is assumed to be the command, the remaining, the
|
||||||
|
* arguments. The elements are not parsed not (un)escaped., but taked as the
|
||||||
|
* are.
|
||||||
|
*/
|
||||||
|
public ArgumentParser(List<String> tokenList) {
|
||||||
|
this.tokens = new ArrayList<String>(tokenList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a command line representation from the command and an array of
|
||||||
|
* parameters. The elements are not parsed not (un)escaped., but taked as
|
||||||
|
* the are.
|
||||||
|
*/
|
||||||
|
public ArgumentParser(String command, String parameterArray[]) {
|
||||||
|
this(command, Arrays.asList(parameterArray));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a command line representation from the command and an list of
|
||||||
|
* parameters. The elements are not parsed not (un)escaped., but taked as
|
||||||
|
* the are.
|
||||||
|
*/
|
||||||
|
public ArgumentParser(String command, List<String> parameterList) {
|
||||||
|
this.tokens = new ArrayList<String>();
|
||||||
|
this.tokens.add(command);
|
||||||
|
this.tokens.addAll(parameterList);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static List<String> parseCommandline(String commandline) {
|
||||||
|
ArrayList<String> result = new ArrayList<String>();
|
||||||
|
StringCharacterIterator iterator = new StringCharacterIterator(commandline);
|
||||||
|
|
||||||
|
for (iterator.first(); iterator.current() != CharacterIterator.DONE; iterator.next()) {
|
||||||
|
|
||||||
|
// Restart to skip white space
|
||||||
|
if (Character.isWhitespace(iterator.current())) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Read token
|
||||||
|
StringBuffer buffer = new StringBuffer();
|
||||||
|
token_reader: for (; iterator.current() != CharacterIterator.DONE; iterator.next()) {
|
||||||
|
char tokenChar = iterator.current();
|
||||||
|
|
||||||
|
// A white space terminates the token
|
||||||
|
if (Character.isWhitespace(tokenChar)) {
|
||||||
|
break token_reader;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Handle character that composes the token
|
||||||
|
switch (tokenChar) {
|
||||||
|
case '"': {
|
||||||
|
/*
|
||||||
|
* Read all text within double quotes or until end of
|
||||||
|
* string. Allows escaping.
|
||||||
|
*/
|
||||||
|
iterator.next(); // Skip quote
|
||||||
|
quoted_reader: while ((iterator.current() != CharacterIterator.DONE) && (iterator.current() != '"')) {
|
||||||
|
char innerChar = iterator.current();
|
||||||
|
switch (innerChar) {
|
||||||
|
case '\\':
|
||||||
|
char nextChar = iterator.next();
|
||||||
|
switch (nextChar) {
|
||||||
|
case CharacterIterator.DONE:
|
||||||
|
break quoted_reader;
|
||||||
|
case '"':
|
||||||
|
// Add the character, but remove the escape
|
||||||
|
buffer.append(nextChar);
|
||||||
|
iterator.next();
|
||||||
|
continue quoted_reader;
|
||||||
|
default:
|
||||||
|
// Add the character and keep escape
|
||||||
|
buffer.append(innerChar);
|
||||||
|
buffer.append(nextChar);
|
||||||
|
iterator.next();
|
||||||
|
continue quoted_reader;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
buffer.append(innerChar);
|
||||||
|
iterator.next();
|
||||||
|
continue quoted_reader;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
continue token_reader;
|
||||||
|
}
|
||||||
|
case '\'': {
|
||||||
|
/*
|
||||||
|
* Read all text within single quotes or until end of
|
||||||
|
* string. No escaping.
|
||||||
|
*/
|
||||||
|
iterator.next(); // Skip the quote
|
||||||
|
while ((iterator.current() != CharacterIterator.DONE) && (iterator.current() != '\'')) {
|
||||||
|
buffer.append(iterator.current());
|
||||||
|
iterator.next();
|
||||||
|
}
|
||||||
|
continue token_reader;
|
||||||
|
}
|
||||||
|
case '\\': {
|
||||||
|
/*
|
||||||
|
* Read escaped char.
|
||||||
|
*/
|
||||||
|
char nextChar = iterator.next();
|
||||||
|
switch (nextChar) {
|
||||||
|
case CharacterIterator.DONE:
|
||||||
|
break token_reader;
|
||||||
|
case '\n':
|
||||||
|
// Ignore newline. Both lines are concatenated.
|
||||||
|
continue token_reader;
|
||||||
|
default:
|
||||||
|
// Add the character, but remove the escape
|
||||||
|
buffer.append(nextChar);
|
||||||
|
continue token_reader;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
/*
|
||||||
|
* Any other char, add to the buffer.
|
||||||
|
*/
|
||||||
|
buffer.append(tokenChar);
|
||||||
|
continue token_reader;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
result.add(buffer.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert all tokens in a full command line that can be executed in a
|
||||||
|
* shell.
|
||||||
|
*
|
||||||
|
* @param fullEscape
|
||||||
|
* If every special character shall be escaped. If false, only
|
||||||
|
* white spaces are escaped and the shell will interpret the
|
||||||
|
* special chars. If true, then all special chars are quoted.
|
||||||
|
*/
|
||||||
|
public String getCommandLine(boolean fullEscape) {
|
||||||
|
StringBuffer buffer = new StringBuffer();
|
||||||
|
Iterator<String> iterator = this.tokens.iterator();
|
||||||
|
boolean first = true;
|
||||||
|
while (iterator.hasNext()) {
|
||||||
|
String token = iterator.next();
|
||||||
|
if (!first) {
|
||||||
|
buffer.append(' ');
|
||||||
|
} else {
|
||||||
|
first = false;
|
||||||
|
}
|
||||||
|
buffer.append(escapeToken(token, fullEscape));
|
||||||
|
}
|
||||||
|
return buffer.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
private StringBuffer escapeToken(String token, boolean fullEscape) {
|
||||||
|
StringBuffer buffer = new StringBuffer();
|
||||||
|
StringCharacterIterator iter = new StringCharacterIterator(token);
|
||||||
|
for (char c = iter.first(); c != CharacterIterator.DONE; c = iter.next()) {
|
||||||
|
if (Character.isWhitespace(c)) {
|
||||||
|
buffer.append('\\');
|
||||||
|
buffer.append(c);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
switch (c) {
|
||||||
|
case '(':
|
||||||
|
case ')':
|
||||||
|
case '[':
|
||||||
|
case ']':
|
||||||
|
case '{':
|
||||||
|
case '}':
|
||||||
|
case '|':
|
||||||
|
case '\\':
|
||||||
|
case '*':
|
||||||
|
case '&':
|
||||||
|
case '^':
|
||||||
|
case '%':
|
||||||
|
case '$':
|
||||||
|
case '#':
|
||||||
|
case '@':
|
||||||
|
case '!':
|
||||||
|
case '~':
|
||||||
|
case '`':
|
||||||
|
case '\'':
|
||||||
|
case '"':
|
||||||
|
case ':':
|
||||||
|
case ';':
|
||||||
|
case '?':
|
||||||
|
case '>':
|
||||||
|
case '<':
|
||||||
|
case '\n':
|
||||||
|
if (fullEscape) {
|
||||||
|
buffer.append('\\');
|
||||||
|
}
|
||||||
|
buffer.append(c);
|
||||||
|
continue;
|
||||||
|
case ' ':
|
||||||
|
buffer.append('\\');
|
||||||
|
buffer.append(c);
|
||||||
|
continue;
|
||||||
|
default:
|
||||||
|
buffer.append(c);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return buffer;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a List of all entries of the command line.
|
||||||
|
*
|
||||||
|
* @return The Array
|
||||||
|
*/
|
||||||
|
public String[] getTokenArray() {
|
||||||
|
return this.tokens.toArray(new String[this.tokens.size()]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a List of all entries of the command line.
|
||||||
|
*
|
||||||
|
* @return The List
|
||||||
|
*/
|
||||||
|
public List<String> getTokenList() {
|
||||||
|
return new ArrayList<String>(this.tokens);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the command of the command line, assuming that the first entry is
|
||||||
|
* always the command.
|
||||||
|
*
|
||||||
|
* @return The command or null if the command lines has no command nor
|
||||||
|
* arguments.
|
||||||
|
*/
|
||||||
|
public String getCommand() {
|
||||||
|
if (this.tokens.size() == 0) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return this.tokens.get(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the command of the command line, assuming that the first entry is
|
||||||
|
* always the command.
|
||||||
|
*
|
||||||
|
* @return The command or null if the command lines has no command nor
|
||||||
|
* arguments.
|
||||||
|
* @param fullEscape
|
||||||
|
* If every special character shall be escaped. If false, only
|
||||||
|
* white spaces are escaped and the shell will interpret the
|
||||||
|
* special chars. If true, then all special chars are quoted.
|
||||||
|
*/
|
||||||
|
public String getEscapedCommand(boolean fullEscape) {
|
||||||
|
if (this.tokens.size() == 0) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return escapeToken(this.tokens.get(0), fullEscape).toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a list of all arguments, assuming that the first entry is the
|
||||||
|
* command name.
|
||||||
|
*
|
||||||
|
* @return The Array or null if the command lines has no command nor
|
||||||
|
* arguments.
|
||||||
|
*/
|
||||||
|
public String[] getParameterArray() {
|
||||||
|
if (this.tokens.size() == 0) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return this.tokens.subList(1, this.tokens.size()).toArray(new String[this.tokens.size() - 1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a list of all arguments, assuming that the first entry is the
|
||||||
|
* command name.
|
||||||
|
*
|
||||||
|
* @return The List or null if the command lines has no command nor
|
||||||
|
* arguments.
|
||||||
|
*/
|
||||||
|
public List<String> getParameterList() {
|
||||||
|
if (this.tokens.size() == 0) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return new ArrayList<String>(this.tokens.subList(1, this.tokens.size()));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the total number of entries.
|
||||||
|
*
|
||||||
|
* @return the total number of entries
|
||||||
|
*/
|
||||||
|
public int getSize() {
|
||||||
|
return this.tokens.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a representation of the command line for debug purposes.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuffer buffer = new StringBuffer();
|
||||||
|
buffer.append("<"); //$NON-NLS-1$
|
||||||
|
Iterator<String> iterator = this.tokens.iterator();
|
||||||
|
boolean first = true;
|
||||||
|
while (iterator.hasNext()) {
|
||||||
|
String token = iterator.next();
|
||||||
|
if (!first) {
|
||||||
|
buffer.append('\n');
|
||||||
|
} else {
|
||||||
|
first = false;
|
||||||
|
}
|
||||||
|
buffer.append(token);
|
||||||
|
}
|
||||||
|
buffer.append(">"); //$NON-NLS-1$
|
||||||
|
return buffer.toString();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,179 @@
|
||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2015 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
|
||||||
|
*******************************************************************************/
|
||||||
|
package org.eclipse.tm.internal.terminal.remote;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
|
||||||
|
import org.eclipse.core.runtime.CoreException;
|
||||||
|
import org.eclipse.core.runtime.IConfigurationElement;
|
||||||
|
import org.eclipse.core.runtime.IExtension;
|
||||||
|
import org.eclipse.core.runtime.IExtensionPoint;
|
||||||
|
import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
|
import org.eclipse.core.runtime.IStatus;
|
||||||
|
import org.eclipse.core.runtime.RegistryFactory;
|
||||||
|
import org.eclipse.core.runtime.Status;
|
||||||
|
import org.eclipse.core.runtime.jobs.Job;
|
||||||
|
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
|
||||||
|
import org.eclipse.core.runtime.preferences.InstanceScope;
|
||||||
|
import org.eclipse.osgi.util.NLS;
|
||||||
|
import org.eclipse.remote.core.IRemoteConnection;
|
||||||
|
import org.eclipse.remote.core.IRemoteConnectionManager;
|
||||||
|
import org.eclipse.remote.core.IRemoteProcess;
|
||||||
|
import org.eclipse.remote.core.IRemoteProcessBuilder;
|
||||||
|
import org.eclipse.remote.core.IRemoteServices;
|
||||||
|
import org.eclipse.remote.core.RemoteServices;
|
||||||
|
import org.eclipse.remote.core.exception.RemoteConnectionException;
|
||||||
|
import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl;
|
||||||
|
import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
|
||||||
|
import org.eclipse.tm.internal.terminal.remote.messages.Messages;
|
||||||
|
import org.eclipse.tm.terminal.remote.IRemoteTerminalConstants;
|
||||||
|
import org.eclipse.tm.terminal.remote.IRemoteTerminalParser;
|
||||||
|
|
||||||
|
@SuppressWarnings("restriction")
|
||||||
|
public class RemoteConnectionManager extends Job {
|
||||||
|
private final static String PARSERS_EXTENSION_POINT = "parsers"; //$NON-NLS-1$
|
||||||
|
private final static String PARSER_ELEMENT = "parser"; //$NON-NLS-1$
|
||||||
|
private static int fgNo;
|
||||||
|
|
||||||
|
private final ITerminalControl control;
|
||||||
|
private final RemoteConnector connector;
|
||||||
|
|
||||||
|
private IRemoteTerminalParser parser;
|
||||||
|
|
||||||
|
protected RemoteConnectionManager(RemoteConnector conn, ITerminalControl control) {
|
||||||
|
super("Remote Terminal-" + fgNo++); //$NON-NLS-1$
|
||||||
|
this.control = control;
|
||||||
|
this.connector = conn;
|
||||||
|
setSystem(true);
|
||||||
|
loadParserExtension();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* (non-Javadoc)
|
||||||
|
*
|
||||||
|
* @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
protected IStatus run(IProgressMonitor monitor) {
|
||||||
|
IRemoteProcess remoteProcess = null;
|
||||||
|
IRemoteConnection remoteConnection = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
String remoteServices = connector.getSshSettings().getRemoteServices();
|
||||||
|
IRemoteServices services = RemoteServices.getRemoteServices(remoteServices);
|
||||||
|
if (services != null) {
|
||||||
|
IRemoteConnectionManager connMgr = services.getConnectionManager();
|
||||||
|
if (connMgr != null) {
|
||||||
|
remoteConnection = connMgr.getConnection(connector.getSshSettings().getConnectionName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (remoteConnection == null) {
|
||||||
|
throw new RemoteConnectionException(NLS.bind(Messages.RemoteConnectionManager_0, connector.getSshSettings()
|
||||||
|
.getConnectionName()));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!remoteConnection.isOpen()) {
|
||||||
|
remoteConnection.open(monitor);
|
||||||
|
if (!remoteConnection.isOpen()) {
|
||||||
|
throw new RemoteConnectionException(NLS.bind(Messages.RemoteConnectionManager_1, connector.getSshSettings()
|
||||||
|
.getConnectionName()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (parser != null) {
|
||||||
|
remoteProcess = parser.initialize(remoteConnection);
|
||||||
|
} else {
|
||||||
|
/*
|
||||||
|
* Check the terminal shell command preference. If the preference is empty and we support a command shell,
|
||||||
|
* just use that. Otherwise use the preference value if it is set, or fall back to a default if not.
|
||||||
|
*/
|
||||||
|
IEclipsePreferences prefs = InstanceScope.INSTANCE.getNode(Activator.getUniqueIdentifier());
|
||||||
|
String terminalShellCommand = prefs.get(IRemoteTerminalConstants.PREF_TERMINAL_SHELL_COMMAND, ""); //$NON-NLS-1$
|
||||||
|
if (!("".equals(terminalShellCommand)) //$NON-NLS-1$
|
||||||
|
&& (remoteConnection.getRemoteServices().getCapabilities() & IRemoteServices.CAPABILITY_SUPPORTS_COMMAND_SHELL) != 0) {
|
||||||
|
remoteProcess = remoteConnection.getCommandShell(IRemoteProcessBuilder.ALLOCATE_PTY);
|
||||||
|
} else {
|
||||||
|
if ("".equals(terminalShellCommand)) { //$NON-NLS-1$
|
||||||
|
terminalShellCommand = "/bin/bash -l"; //$NON-NLS-1$
|
||||||
|
}
|
||||||
|
IRemoteProcessBuilder processBuilder = remoteConnection.getProcessBuilder(new ArgumentParser(
|
||||||
|
terminalShellCommand).getTokenList());
|
||||||
|
remoteProcess = processBuilder.start(IRemoteProcessBuilder.ALLOCATE_PTY);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
connector.setInputStream(remoteProcess.getInputStream());
|
||||||
|
control.setState(TerminalState.CONNECTED);
|
||||||
|
control.setTerminalTitle(remoteConnection.getName());
|
||||||
|
connector.setOutputStream(remoteProcess.getOutputStream());
|
||||||
|
|
||||||
|
// read data until the connection gets terminated
|
||||||
|
readData(connector.getInputStream());
|
||||||
|
} catch (IOException e) {
|
||||||
|
return new Status(IStatus.ERROR, Activator.getUniqueIdentifier(), e.getMessage());
|
||||||
|
} catch (RemoteConnectionException e) {
|
||||||
|
return new Status(IStatus.ERROR, Activator.getUniqueIdentifier(), e.getMessage());
|
||||||
|
} finally {
|
||||||
|
// make sure the terminal is disconnected when the thread ends
|
||||||
|
connector.disconnect();
|
||||||
|
synchronized (this) {
|
||||||
|
if (remoteProcess != null && !remoteProcess.isCompleted()) {
|
||||||
|
remoteProcess.destroy();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return Status.OK_STATUS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTerminalSize(int cols, int rows, int width, int height) {
|
||||||
|
// Enable for org.eclipse.remote v1.2
|
||||||
|
// if (remoteProcess instanceof IRemoteTerminal) {
|
||||||
|
// ((IRemoteTerminal) remoteProcess).setTerminalSize(cols, rows, width, height);
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Read the data from the connection and display it in the terminal.
|
||||||
|
*
|
||||||
|
* @param in
|
||||||
|
* @throws IOException
|
||||||
|
*/
|
||||||
|
private void readData(InputStream in) throws IOException {
|
||||||
|
byte[] buf = new byte[32 * 1024];
|
||||||
|
while (getState() == Job.RUNNING) {
|
||||||
|
int n = in.read(buf, 0, buf.length);
|
||||||
|
if (n <= 0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (parser == null || parser.parse(buf)) {
|
||||||
|
control.getRemoteToTerminalOutputStream().write(buf, 0, n);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void loadParserExtension() {
|
||||||
|
IExtensionPoint point = RegistryFactory.getRegistry().getExtensionPoint(Activator.getUniqueIdentifier(),
|
||||||
|
PARSERS_EXTENSION_POINT);
|
||||||
|
if (point != null) {
|
||||||
|
IExtension[] extensions = point.getExtensions();
|
||||||
|
for (IExtension extension : extensions) {
|
||||||
|
IConfigurationElement[] elements = extension.getConfigurationElements();
|
||||||
|
for (IConfigurationElement element : elements) {
|
||||||
|
if (PARSER_ELEMENT.equals(element.getName())) {
|
||||||
|
try {
|
||||||
|
parser = (IRemoteTerminalParser) element.createExecutableExtension("class"); //$NON-NLS-1$
|
||||||
|
} catch (CoreException e) {
|
||||||
|
Activator.log(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,177 @@
|
||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2015 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
|
||||||
|
*******************************************************************************/
|
||||||
|
package org.eclipse.tm.internal.terminal.remote;
|
||||||
|
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.io.OutputStream;
|
||||||
|
|
||||||
|
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage;
|
||||||
|
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
|
||||||
|
import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl;
|
||||||
|
import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
|
||||||
|
import org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl;
|
||||||
|
import org.eclipse.tm.terminal.remote.IRemoteSettings;
|
||||||
|
|
||||||
|
@SuppressWarnings("restriction")
|
||||||
|
public class RemoteConnector extends TerminalConnectorImpl {
|
||||||
|
private OutputStream fOutputStream;
|
||||||
|
private InputStream fInputStream;
|
||||||
|
private RemoteConnectionManager fConnection;
|
||||||
|
private int fWidth;
|
||||||
|
private int fHeight;
|
||||||
|
private final RemoteSettings fSettings;
|
||||||
|
|
||||||
|
public RemoteConnector() {
|
||||||
|
this(new RemoteSettings());
|
||||||
|
}
|
||||||
|
|
||||||
|
public RemoteConnector(RemoteSettings settings) {
|
||||||
|
fSettings = settings;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* (non-Javadoc)
|
||||||
|
*
|
||||||
|
* @see
|
||||||
|
* org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl#connect(org.eclipse.tm.internal.terminal.
|
||||||
|
* provisional.api.ITerminalControl)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void connect(ITerminalControl control) {
|
||||||
|
super.connect(control);
|
||||||
|
fControl.setState(TerminalState.CONNECTING);
|
||||||
|
fConnection = new RemoteConnectionManager(this, control);
|
||||||
|
fConnection.schedule();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* (non-Javadoc)
|
||||||
|
*
|
||||||
|
* @see org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl#doDisconnect()
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public synchronized void doDisconnect() {
|
||||||
|
if (getInputStream() != null) {
|
||||||
|
try {
|
||||||
|
getInputStream().close();
|
||||||
|
} catch (Exception exception) {
|
||||||
|
Activator.log(exception);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (getTerminalToRemoteStream() != null) {
|
||||||
|
try {
|
||||||
|
getTerminalToRemoteStream().close();
|
||||||
|
} catch (Exception exception) {
|
||||||
|
Activator.log(exception);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fConnection.cancel();
|
||||||
|
}
|
||||||
|
|
||||||
|
public InputStream getInputStream() {
|
||||||
|
return fInputStream;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* (non-Javadoc)
|
||||||
|
*
|
||||||
|
* @see org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl#getSettingsSummary()
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String getSettingsSummary() {
|
||||||
|
return fSettings.getSummary();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the SSH Settings.
|
||||||
|
*
|
||||||
|
* @return the settings for a concrete connection.
|
||||||
|
* @since org.eclipse.tm.terminal.ssh 2.0 renamed from getTelnetSettings()
|
||||||
|
*/
|
||||||
|
public IRemoteSettings getSshSettings() {
|
||||||
|
return fSettings;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* (non-Javadoc)
|
||||||
|
*
|
||||||
|
* @see org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl#getTerminalToRemoteStream()
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public OutputStream getTerminalToRemoteStream() {
|
||||||
|
return fOutputStream;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* (non-Javadoc)
|
||||||
|
*
|
||||||
|
* @see org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl#initialize()
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void initialize() throws Exception {
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* (non-Javadoc)
|
||||||
|
*
|
||||||
|
* @see
|
||||||
|
* org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl#load(org.eclipse.tm.internal.terminal.provisional
|
||||||
|
* .api.ISettingsStore)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void load(ISettingsStore store) {
|
||||||
|
fSettings.load(store);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* (non-Javadoc)
|
||||||
|
*
|
||||||
|
* @see org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl#makeSettingsPage()
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ISettingsPage makeSettingsPage() {
|
||||||
|
return new RemoteSettingsPage(fSettings);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* (non-Javadoc)
|
||||||
|
*
|
||||||
|
* @see
|
||||||
|
* org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl#save(org.eclipse.tm.internal.terminal.provisional
|
||||||
|
* .api.ISettingsStore)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void save(ISettingsStore store) {
|
||||||
|
fSettings.save(store);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInputStream(InputStream inputStream) {
|
||||||
|
fInputStream = inputStream;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOutputStream(OutputStream outputStream) {
|
||||||
|
fOutputStream = outputStream;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* (non-Javadoc)
|
||||||
|
*
|
||||||
|
* @see org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl#setTerminalSize(int, int)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void setTerminalSize(int newWidth, int newHeight) {
|
||||||
|
if (fConnection != null && (newWidth != fWidth || newHeight != fHeight)) {
|
||||||
|
// avoid excessive communications due to change size requests by caching previous size
|
||||||
|
fConnection.setTerminalSize(newWidth, newHeight, 8 * newWidth, 8 * newHeight);
|
||||||
|
fWidth = newWidth;
|
||||||
|
fHeight = newHeight;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,61 @@
|
||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2015 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
|
||||||
|
*******************************************************************************/
|
||||||
|
package org.eclipse.tm.internal.terminal.remote;
|
||||||
|
|
||||||
|
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
|
||||||
|
import org.eclipse.tm.terminal.remote.IRemoteSettings;
|
||||||
|
|
||||||
|
@SuppressWarnings("restriction")
|
||||||
|
public class RemoteSettings implements IRemoteSettings {
|
||||||
|
protected String fRemoteServices;
|
||||||
|
protected String fConnectionName;
|
||||||
|
|
||||||
|
public RemoteSettings() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getConnectionName() {
|
||||||
|
return fConnectionName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRemoteServices() {
|
||||||
|
return fRemoteServices;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSummary() {
|
||||||
|
return "Remote:" + getRemoteServices() + '_' + getConnectionName(); //$NON-NLS-1$
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return getSummary();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load information into the RemoteSettings object.
|
||||||
|
*/
|
||||||
|
public void load(ISettingsStore store) {
|
||||||
|
fRemoteServices = store.get(REMOTE_SERVICES);
|
||||||
|
fConnectionName = store.get(CONNECTION_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Extract information from the RemoteSettings object.
|
||||||
|
*/
|
||||||
|
public void save(ISettingsStore store) {
|
||||||
|
store.put(REMOTE_SERVICES, fRemoteServices);
|
||||||
|
store.put(CONNECTION_NAME, fConnectionName);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConnectionName(String name) {
|
||||||
|
fConnectionName = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRemoteServices(String remoteServices) {
|
||||||
|
fRemoteServices = remoteServices;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,62 @@
|
||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2015 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
|
||||||
|
*******************************************************************************/
|
||||||
|
package org.eclipse.tm.internal.terminal.remote;
|
||||||
|
|
||||||
|
import org.eclipse.remote.ui.widgets.RemoteConnectionWidget;
|
||||||
|
import org.eclipse.swt.SWT;
|
||||||
|
import org.eclipse.swt.layout.GridData;
|
||||||
|
import org.eclipse.swt.layout.GridLayout;
|
||||||
|
import org.eclipse.swt.widgets.Composite;
|
||||||
|
import org.eclipse.tm.internal.terminal.provisional.api.AbstractSettingsPage;
|
||||||
|
|
||||||
|
@SuppressWarnings("restriction")
|
||||||
|
public class RemoteSettingsPage extends AbstractSettingsPage {
|
||||||
|
private final RemoteSettings fTerminalSettings;
|
||||||
|
private RemoteConnectionWidget fRemoteConnectionWidget;
|
||||||
|
|
||||||
|
public RemoteSettingsPage(RemoteSettings settings) {
|
||||||
|
fTerminalSettings = settings;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void saveSettings() {
|
||||||
|
fTerminalSettings.setRemoteServices(fRemoteConnectionWidget.getConnection().getRemoteServices().getId());
|
||||||
|
fTerminalSettings.setConnectionName(fRemoteConnectionWidget.getConnection().getName());
|
||||||
|
}
|
||||||
|
|
||||||
|
public void loadSettings() {
|
||||||
|
if (fTerminalSettings != null) {
|
||||||
|
fRemoteConnectionWidget.setConnection(fTerminalSettings.getRemoteServices(), fTerminalSettings.getConnectionName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String get(String value, String def) {
|
||||||
|
if (value == null || value.length() == 0) {
|
||||||
|
return def;
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean validateSettings() {
|
||||||
|
if (fRemoteConnectionWidget.getConnection() == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void createControl(Composite parent) {
|
||||||
|
Composite composite = new Composite(parent, SWT.NONE);
|
||||||
|
GridLayout gridLayout = new GridLayout(2, false);
|
||||||
|
GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
|
||||||
|
|
||||||
|
composite.setLayout(gridLayout);
|
||||||
|
composite.setLayoutData(gridData);
|
||||||
|
|
||||||
|
fRemoteConnectionWidget = new RemoteConnectionWidget(composite, SWT.NONE, null, 0);
|
||||||
|
loadSettings();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,29 @@
|
||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2015 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
|
||||||
|
*******************************************************************************/
|
||||||
|
package org.eclipse.tm.internal.terminal.remote.messages;
|
||||||
|
|
||||||
|
import org.eclipse.osgi.util.NLS;
|
||||||
|
|
||||||
|
public class Messages extends NLS {
|
||||||
|
private static final String BUNDLE_NAME = "org.eclipse.tm.internal.terminal.remote.messages.messages"; //$NON-NLS-1$
|
||||||
|
|
||||||
|
public static String RemoteConnectionManager_0;
|
||||||
|
|
||||||
|
public static String RemoteConnectionManager_1;
|
||||||
|
|
||||||
|
public static String RemoteTerminalPreferencePage_0;
|
||||||
|
|
||||||
|
public static String TERMINAL_EXCEPTION;
|
||||||
|
static {
|
||||||
|
// initialize resource bundle
|
||||||
|
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Messages() {
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,4 @@
|
||||||
|
RemoteConnectionManager_0=Unable to create connection: {0}
|
||||||
|
RemoteConnectionManager_1=Unable to to open connection: {0}
|
||||||
|
RemoteTerminalPreferencePage_0=Initial Shell Command
|
||||||
|
TERMINAL_EXCEPTION=Remote Terminal Exception
|
|
@ -0,0 +1,26 @@
|
||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2015 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
|
||||||
|
*******************************************************************************/
|
||||||
|
package org.eclipse.tm.internal.terminal.remote.preferences;
|
||||||
|
|
||||||
|
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
|
||||||
|
import org.eclipse.core.runtime.preferences.DefaultScope;
|
||||||
|
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
|
||||||
|
import org.eclipse.tm.internal.terminal.remote.Activator;
|
||||||
|
import org.eclipse.tm.terminal.remote.IRemoteTerminalConstants;
|
||||||
|
|
||||||
|
public class RemoteTerminalPreferenceInitializer extends AbstractPreferenceInitializer {
|
||||||
|
|
||||||
|
public RemoteTerminalPreferenceInitializer() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void initializeDefaultPreferences() {
|
||||||
|
IEclipsePreferences defaultPrefs = DefaultScope.INSTANCE.getNode(Activator.getUniqueIdentifier());
|
||||||
|
defaultPrefs.put(IRemoteTerminalConstants.PREF_TERMINAL_SHELL_COMMAND, ""); //$NON-NLS-1$
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,37 @@
|
||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2015 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
|
||||||
|
*******************************************************************************/
|
||||||
|
package org.eclipse.tm.internal.terminal.remote.preferences;
|
||||||
|
|
||||||
|
import org.eclipse.core.runtime.preferences.InstanceScope;
|
||||||
|
import org.eclipse.jface.preference.FieldEditorPreferencePage;
|
||||||
|
import org.eclipse.jface.preference.IPreferenceStore;
|
||||||
|
import org.eclipse.jface.preference.StringFieldEditor;
|
||||||
|
import org.eclipse.swt.widgets.Composite;
|
||||||
|
import org.eclipse.tm.internal.terminal.remote.Activator;
|
||||||
|
import org.eclipse.tm.internal.terminal.remote.messages.Messages;
|
||||||
|
import org.eclipse.tm.terminal.remote.IRemoteTerminalConstants;
|
||||||
|
import org.eclipse.ui.IWorkbench;
|
||||||
|
import org.eclipse.ui.IWorkbenchPreferencePage;
|
||||||
|
import org.eclipse.ui.preferences.ScopedPreferenceStore;
|
||||||
|
|
||||||
|
public class RemoteTerminalPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
|
||||||
|
protected void createFieldEditors() {
|
||||||
|
Composite parent = getFieldEditorParent();
|
||||||
|
addField(new StringFieldEditor(IRemoteTerminalConstants.PREF_TERMINAL_SHELL_COMMAND,
|
||||||
|
Messages.RemoteTerminalPreferencePage_0, parent));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPreferenceStore doGetPreferenceStore() {
|
||||||
|
return new ScopedPreferenceStore(InstanceScope.INSTANCE, Activator.getUniqueIdentifier());
|
||||||
|
}
|
||||||
|
|
||||||
|
public void init(IWorkbench workbench) {
|
||||||
|
// Nothing
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2015 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
|
||||||
|
*******************************************************************************/
|
||||||
|
package org.eclipse.tm.terminal.remote;
|
||||||
|
|
||||||
|
public interface IRemoteSettings {
|
||||||
|
public static final String CONNECTION_NAME = "ConnectionName"; //$NON-NLS-1$
|
||||||
|
public static final String REMOTE_SERVICES = "RemoteServices"; //$NON-NLS-1$
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the host name or IP address of remote system to connect.
|
||||||
|
*
|
||||||
|
* @return host name or IP address of the remote system.
|
||||||
|
*/
|
||||||
|
String getRemoteServices();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the login name for connecting to the remote system.
|
||||||
|
*
|
||||||
|
* @return remote login name
|
||||||
|
*/
|
||||||
|
String getConnectionName();
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2015 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
|
||||||
|
*******************************************************************************/
|
||||||
|
package org.eclipse.tm.terminal.remote;
|
||||||
|
|
||||||
|
public interface IRemoteTerminalConstants {
|
||||||
|
public static final String PREF_TERMINAL_SHELL_COMMAND = "TERMINAL_SHELL_COMMAND"; //$NON-NLS-1$
|
||||||
|
}
|
|
@ -0,0 +1,37 @@
|
||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2015 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
|
||||||
|
*******************************************************************************/
|
||||||
|
package org.eclipse.tm.terminal.remote;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import org.eclipse.remote.core.IRemoteConnection;
|
||||||
|
import org.eclipse.remote.core.IRemoteProcess;
|
||||||
|
|
||||||
|
public interface IRemoteTerminalParser {
|
||||||
|
/**
|
||||||
|
* Initialize the remote shell. This method will be called after the connection has been initialized. Implementors can assume
|
||||||
|
* that the connection is open when this is called.
|
||||||
|
*
|
||||||
|
* @param connection
|
||||||
|
* terminal shell connection
|
||||||
|
* @return IRemoteProcess a remote process corresponding to the remote shell
|
||||||
|
* @throws IOException
|
||||||
|
* if the remote shell fails to start for some reason
|
||||||
|
*/
|
||||||
|
IRemoteProcess initialize(IRemoteConnection connection) throws IOException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parse the input stream. This method will be called with a buffer of characters read from the input stream. If the method
|
||||||
|
* returns true, the characters will be displayed in the terminal view, otherwise they will be ignored.
|
||||||
|
*
|
||||||
|
* @param buf
|
||||||
|
* buffer containing characters from the terminal input stream
|
||||||
|
* @return true if the characters should be displayed in the terminal
|
||||||
|
*/
|
||||||
|
boolean parse(byte[] buf);
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue