From 3642aec8d0d8a56e6b261b813474b1057efe3c9e Mon Sep 17 00:00:00 2001 From: Uwe Stieber Date: Tue, 17 Feb 2015 12:50:03 +0100 Subject: [PATCH] Terminal: Remove deprecated local terminal features and plug-in --- .../.project | 17 - .../build.properties | 13 - .../feature.properties | 169 -------- .../feature.xml | 61 --- .../pom.xml | 30 -- .../.project | 17 - .../build.properties | 15 - .../feature.properties | 172 -------- .../feature.xml | 61 --- .../pom.xml | 30 -- .../.project | 17 - .../build.properties | 17 - .../feature.properties | 173 -------- .../feature.xml | 51 --- .../pom.xml | 30 -- .../.project | 17 - .../build.properties | 16 - .../feature.properties | 168 -------- .../feature.xml | 58 --- .../pom.xml | 30 -- .../sourceTemplatePlugin/about.html | 33 -- .../sourceTemplatePlugin/build.properties | 12 - .../sourceTemplatePlugin/plugin.properties | 12 - .../org.eclipse.tm.terminal.local/.classpath | 7 - .../org.eclipse.tm.terminal.local/.cvsignore | 1 - .../org.eclipse.tm.terminal.local/.project | 34 -- .../.settings/org.eclipse.jdt.core.prefs | 82 ---- .../META-INF/MANIFEST.MF | 25 -- .../org.eclipse.tm.terminal.local/about.html | 29 -- .../org.eclipse.tm.terminal.local/about.ini | 27 -- .../about.mappings | 12 - .../about.properties | 19 - .../build.properties | 24 -- .../icons/terminal-launch.gif | Bin 601 -> 0 bytes .../plugin.properties | 20 - .../org.eclipse.tm.terminal.local/plugin.xml | 64 --- .../org.eclipse.tm.terminal.local/pom.xml | 15 - .../local/ILocalTerminalSettings.java | 75 ---- .../local/LocalTerminalActivator.java | 98 ----- .../local/LocalTerminalConnector.java | 400 ------------------ .../LocalTerminalLaunchLabelProvider.java | 72 ---- .../LocalTerminalLaunchListProvider.java | 90 ---- .../terminal/local/LocalTerminalMessages.java | 124 ------ .../local/LocalTerminalMessages.properties | 49 --- .../local/LocalTerminalOutputListener.java | 91 ---- .../local/LocalTerminalOutputStream.java | 185 -------- .../terminal/local/LocalTerminalSettings.java | 109 ----- .../local/LocalTerminalSettingsPage.java | 327 -------------- .../local/LocalTerminalUtilities.java | 158 ------- .../launch/LocalTerminalLaunchDelegate.java | 288 ------------- .../launch/LocalTerminalLaunchUtilities.java | 305 ------------- .../LocalTerminalStillRunningListener.java | 127 ------ .../ui/LocalTerminalLaunchTabGroup.java | 112 ----- .../launch/ui/LocalTerminalSettingsTab.java | 282 ------------ .../ui/LocalTerminalStillRunningDialog.java | 298 ------------- .../local/process/LocalTerminalProcess.java | 191 --------- .../process/LocalTerminalProcessFactory.java | 41 -- .../process/LocalTerminalProcessRegistry.java | 159 ------- .../local/ui/DependentHeightComposite.java | 88 ---- .../org.eclipse.tm.terminal.local/tm32.png | Bin 2275 -> 0 bytes 60 files changed, 5247 deletions(-) delete mode 100644 deprecated/features/org.eclipse.tm.terminal.core.sdk-feature/.project delete mode 100644 deprecated/features/org.eclipse.tm.terminal.core.sdk-feature/build.properties delete mode 100644 deprecated/features/org.eclipse.tm.terminal.core.sdk-feature/feature.properties delete mode 100644 deprecated/features/org.eclipse.tm.terminal.core.sdk-feature/feature.xml delete mode 100644 deprecated/features/org.eclipse.tm.terminal.core.sdk-feature/pom.xml delete mode 100644 deprecated/features/org.eclipse.tm.terminal.local-feature/.project delete mode 100644 deprecated/features/org.eclipse.tm.terminal.local-feature/build.properties delete mode 100644 deprecated/features/org.eclipse.tm.terminal.local-feature/feature.properties delete mode 100644 deprecated/features/org.eclipse.tm.terminal.local-feature/feature.xml delete mode 100644 deprecated/features/org.eclipse.tm.terminal.local-feature/pom.xml delete mode 100644 deprecated/features/org.eclipse.tm.terminal.local.sdk-feature/.project delete mode 100644 deprecated/features/org.eclipse.tm.terminal.local.sdk-feature/build.properties delete mode 100644 deprecated/features/org.eclipse.tm.terminal.local.sdk-feature/feature.properties delete mode 100644 deprecated/features/org.eclipse.tm.terminal.local.sdk-feature/feature.xml delete mode 100644 deprecated/features/org.eclipse.tm.terminal.local.sdk-feature/pom.xml delete mode 100644 deprecated/features/org.eclipse.tm.terminal.test-feature/.project delete mode 100644 deprecated/features/org.eclipse.tm.terminal.test-feature/build.properties delete mode 100644 deprecated/features/org.eclipse.tm.terminal.test-feature/feature.properties delete mode 100644 deprecated/features/org.eclipse.tm.terminal.test-feature/feature.xml delete mode 100644 deprecated/features/org.eclipse.tm.terminal.test-feature/pom.xml delete mode 100644 deprecated/features/org.eclipse.tm.terminal.test-feature/sourceTemplatePlugin/about.html delete mode 100644 deprecated/features/org.eclipse.tm.terminal.test-feature/sourceTemplatePlugin/build.properties delete mode 100644 deprecated/features/org.eclipse.tm.terminal.test-feature/sourceTemplatePlugin/plugin.properties delete mode 100644 deprecated/plugins/org.eclipse.tm.terminal.local/.classpath delete mode 100644 deprecated/plugins/org.eclipse.tm.terminal.local/.cvsignore delete mode 100644 deprecated/plugins/org.eclipse.tm.terminal.local/.project delete mode 100644 deprecated/plugins/org.eclipse.tm.terminal.local/.settings/org.eclipse.jdt.core.prefs delete mode 100644 deprecated/plugins/org.eclipse.tm.terminal.local/META-INF/MANIFEST.MF delete mode 100644 deprecated/plugins/org.eclipse.tm.terminal.local/about.html delete mode 100644 deprecated/plugins/org.eclipse.tm.terminal.local/about.ini delete mode 100644 deprecated/plugins/org.eclipse.tm.terminal.local/about.mappings delete mode 100644 deprecated/plugins/org.eclipse.tm.terminal.local/about.properties delete mode 100644 deprecated/plugins/org.eclipse.tm.terminal.local/build.properties delete mode 100644 deprecated/plugins/org.eclipse.tm.terminal.local/icons/terminal-launch.gif delete mode 100644 deprecated/plugins/org.eclipse.tm.terminal.local/plugin.properties delete mode 100644 deprecated/plugins/org.eclipse.tm.terminal.local/plugin.xml delete mode 100644 deprecated/plugins/org.eclipse.tm.terminal.local/pom.xml delete mode 100644 deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/ILocalTerminalSettings.java delete mode 100644 deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalActivator.java delete mode 100644 deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalConnector.java delete mode 100644 deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalLaunchLabelProvider.java delete mode 100644 deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalLaunchListProvider.java delete mode 100644 deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalMessages.java delete mode 100644 deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalMessages.properties delete mode 100644 deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalOutputListener.java delete mode 100644 deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalOutputStream.java delete mode 100644 deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalSettings.java delete mode 100644 deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalSettingsPage.java delete mode 100644 deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalUtilities.java delete mode 100644 deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/launch/LocalTerminalLaunchDelegate.java delete mode 100644 deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/launch/LocalTerminalLaunchUtilities.java delete mode 100644 deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/launch/LocalTerminalStillRunningListener.java delete mode 100644 deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/launch/ui/LocalTerminalLaunchTabGroup.java delete mode 100644 deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/launch/ui/LocalTerminalSettingsTab.java delete mode 100644 deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/launch/ui/LocalTerminalStillRunningDialog.java delete mode 100644 deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/process/LocalTerminalProcess.java delete mode 100644 deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/process/LocalTerminalProcessFactory.java delete mode 100644 deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/process/LocalTerminalProcessRegistry.java delete mode 100644 deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/ui/DependentHeightComposite.java delete mode 100644 deprecated/plugins/org.eclipse.tm.terminal.local/tm32.png diff --git a/deprecated/features/org.eclipse.tm.terminal.core.sdk-feature/.project b/deprecated/features/org.eclipse.tm.terminal.core.sdk-feature/.project deleted file mode 100644 index 636aa511c46..00000000000 --- a/deprecated/features/org.eclipse.tm.terminal.core.sdk-feature/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - org.eclipse.tm.terminal.core.sdk-feature - - - - - - org.eclipse.pde.FeatureBuilder - - - - - - org.eclipse.pde.FeatureNature - - diff --git a/deprecated/features/org.eclipse.tm.terminal.core.sdk-feature/build.properties b/deprecated/features/org.eclipse.tm.terminal.core.sdk-feature/build.properties deleted file mode 100644 index 3827d2e0577..00000000000 --- a/deprecated/features/org.eclipse.tm.terminal.core.sdk-feature/build.properties +++ /dev/null @@ -1,13 +0,0 @@ -################################################################################ -# Copyright (c) 2012, 2014 Wind River Systems, Inc. and others. -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Eclipse Public License v1.0 -# which accompanies this distribution, and is available at -# http://www.eclipse.org/legal/epl-v10.html -# -# Contributors: -# Wind River Systems - initial API and implementation -# Uwe Stieber (Wind River) - Bug 434937 - Releng: The Terminal Features have an incorrect license -################################################################################ -bin.includes = feature.xml,\ - feature.properties diff --git a/deprecated/features/org.eclipse.tm.terminal.core.sdk-feature/feature.properties b/deprecated/features/org.eclipse.tm.terminal.core.sdk-feature/feature.properties deleted file mode 100644 index ce83ddadf66..00000000000 --- a/deprecated/features/org.eclipse.tm.terminal.core.sdk-feature/feature.properties +++ /dev/null @@ -1,169 +0,0 @@ -############################################################################### -# Copyright (c) 2012, 2014 Wind River Systems, Inc. and others. -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Eclipse Public License v1.0 -# which accompanies this distribution, and is available at -# http://www.eclipse.org/legal/epl-v10.html -# -# Contributors: -# Wind River Systems - initial API and implementation -############################################################################### -# 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 (Core SDK, Deprecated) - -# "description" property - description of the feature -description=An ANSI (vt102) compatible Terminal control including \ -plug-ins for Serial, SSH and Telnet connections. Includes Source Code. - -# "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 - -# "copyright" property - text of the "Feature Update Copyright" -copyright=\ -Copyright (c) 2012 Wind River Systems, Inc. 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 ########################################## diff --git a/deprecated/features/org.eclipse.tm.terminal.core.sdk-feature/feature.xml b/deprecated/features/org.eclipse.tm.terminal.core.sdk-feature/feature.xml deleted file mode 100644 index 7e73f41a107..00000000000 --- a/deprecated/features/org.eclipse.tm.terminal.core.sdk-feature/feature.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - %description - - - - %copyright - - - - %license - - - - - - - - - - - - - - - - - - - - - - - diff --git a/deprecated/features/org.eclipse.tm.terminal.core.sdk-feature/pom.xml b/deprecated/features/org.eclipse.tm.terminal.core.sdk-feature/pom.xml deleted file mode 100644 index 4609c075ad9..00000000000 --- a/deprecated/features/org.eclipse.tm.terminal.core.sdk-feature/pom.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - 4.0.0 - - org.eclipse.tm.maven-build - org.eclipse.tm - 4.0.0-SNAPSHOT - ../../../../admin/pom-build.xml - - org.eclipse.tm.features - org.eclipse.tm.terminal.core.sdk - 4.0.0.qualifier - eclipse-feature - - - - - - org.eclipse.tycho - tycho-packaging-plugin - ${tycho-version} - - default - - - - - - diff --git a/deprecated/features/org.eclipse.tm.terminal.local-feature/.project b/deprecated/features/org.eclipse.tm.terminal.local-feature/.project deleted file mode 100644 index c8b6195f159..00000000000 --- a/deprecated/features/org.eclipse.tm.terminal.local-feature/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - org.eclipse.tm.terminal.local-feature - - - - - - org.eclipse.pde.FeatureBuilder - - - - - - org.eclipse.pde.FeatureNature - - diff --git a/deprecated/features/org.eclipse.tm.terminal.local-feature/build.properties b/deprecated/features/org.eclipse.tm.terminal.local-feature/build.properties deleted file mode 100644 index cc590093375..00000000000 --- a/deprecated/features/org.eclipse.tm.terminal.local-feature/build.properties +++ /dev/null @@ -1,15 +0,0 @@ -#################################################################################################### -# Copyright (c) 2008, 2014 Mirko Raner 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: -# Mirko Raner - initial implementation for Eclipse Bug 196337 -# Martin Oberhuber (Wind River) - Import to Eclipse TM -# Uwe Stieber (Wind River) - Bug 434937 - Releng: The Terminal Features have an incorrect license -#################################################################################################### - -bin.includes = feature.xml,\ - feature.properties diff --git a/deprecated/features/org.eclipse.tm.terminal.local-feature/feature.properties b/deprecated/features/org.eclipse.tm.terminal.local-feature/feature.properties deleted file mode 100644 index 90a5aa59467..00000000000 --- a/deprecated/features/org.eclipse.tm.terminal.local-feature/feature.properties +++ /dev/null @@ -1,172 +0,0 @@ -#################################################################################################### -# Copyright (c) 2008, 2014 Mirko Raner 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: -# Mirko Raner - initial implementation for Eclipse Bug 196337 -# Martin Oberhuber (Wind River) - Import to Eclipse TM -#################################################################################################### -# 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=Local Terminal (Deprecated) - -# "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=A terminal emulation for local shells and external tools.\n\ -Requires CDT Core 7.0 or later. Works on Linux, Solaris and Mac.\n\ -\n\ -Note: This feature is deprecated. Use the "Terminals View" feature from the "Mobile and Device Development" category instead. - -# "copyright" property - text of the "Feature Update Copyright" -copyright=\ -Copyright (c) 2008, 2014 Mirko Raner 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 ########################################## diff --git a/deprecated/features/org.eclipse.tm.terminal.local-feature/feature.xml b/deprecated/features/org.eclipse.tm.terminal.local-feature/feature.xml deleted file mode 100644 index 5c44192d0ba..00000000000 --- a/deprecated/features/org.eclipse.tm.terminal.local-feature/feature.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - %description - - - - %copyright - - - - %license - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/deprecated/features/org.eclipse.tm.terminal.local-feature/pom.xml b/deprecated/features/org.eclipse.tm.terminal.local-feature/pom.xml deleted file mode 100644 index e8192c4c55a..00000000000 --- a/deprecated/features/org.eclipse.tm.terminal.local-feature/pom.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - 4.0.0 - - org.eclipse.tm.maven-build - org.eclipse.tm - 4.0.0-SNAPSHOT - ../../../../admin/pom-build.xml - - org.eclipse.tm.features - org.eclipse.tm.terminal.local - 4.0.0.qualifier - eclipse-feature - - - - - - org.eclipse.tycho - tycho-packaging-plugin - ${tycho-version} - - default - - - - - - diff --git a/deprecated/features/org.eclipse.tm.terminal.local.sdk-feature/.project b/deprecated/features/org.eclipse.tm.terminal.local.sdk-feature/.project deleted file mode 100644 index 150da9a0fdd..00000000000 --- a/deprecated/features/org.eclipse.tm.terminal.local.sdk-feature/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - org.eclipse.tm.terminal.local.sdk-feature - - - - - - org.eclipse.pde.FeatureBuilder - - - - - - org.eclipse.pde.FeatureNature - - diff --git a/deprecated/features/org.eclipse.tm.terminal.local.sdk-feature/build.properties b/deprecated/features/org.eclipse.tm.terminal.local.sdk-feature/build.properties deleted file mode 100644 index 6475308a438..00000000000 --- a/deprecated/features/org.eclipse.tm.terminal.local.sdk-feature/build.properties +++ /dev/null @@ -1,17 +0,0 @@ -#################################################################################################### -# Copyright (c) 2008, 2014 Mirko Raner 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: -# Mirko Raner - initial implementation for Eclipse Bug 196337 -# Martin Oberhuber (Wind River) - Import to Eclipse TM -# Uwe Stieber (Wind River) - Bug 434937 - Releng: The Terminal Features have an incorrect license -#################################################################################################### - -bin.includes = feature.xml,\ - feature.properties - -generate.plugin@org.eclipse.tm.terminal.local.source=org.eclipse.tm.terminal.local diff --git a/deprecated/features/org.eclipse.tm.terminal.local.sdk-feature/feature.properties b/deprecated/features/org.eclipse.tm.terminal.local.sdk-feature/feature.properties deleted file mode 100644 index 531aa31338e..00000000000 --- a/deprecated/features/org.eclipse.tm.terminal.local.sdk-feature/feature.properties +++ /dev/null @@ -1,173 +0,0 @@ -#################################################################################################### -# Copyright (c) 2008, 2014 Mirko Raner 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: -# Mirko Raner - initial implementation for Eclipse Bug 196337 -# Martin Oberhuber (Wind River) - Import to Eclipse TM -#################################################################################################### -# 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=Local Terminal SDK (Deprecated) - -# "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=A terminal emulation for local shells and external tools.\n\ -Requires CDT Core 7.0 or later. Works on Linux, Solaris and Mac. Includes Source,\ -and the Terminal View required to drive the plugin.\n\ -\n\ -Note: This feature is deprecated. Use the "Terminals View" feature from the "Mobile and Device Development" category instead. - -# "copyright" property - text of the "Feature Update Copyright" -copyright=\ -Copyright (c) 2008, 2014 Mirko Raner 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 ########################################## diff --git a/deprecated/features/org.eclipse.tm.terminal.local.sdk-feature/feature.xml b/deprecated/features/org.eclipse.tm.terminal.local.sdk-feature/feature.xml deleted file mode 100644 index 32af09c66f7..00000000000 --- a/deprecated/features/org.eclipse.tm.terminal.local.sdk-feature/feature.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - %description - - - - %copyright - - - - %license - - - - - - - - - - - - - - - diff --git a/deprecated/features/org.eclipse.tm.terminal.local.sdk-feature/pom.xml b/deprecated/features/org.eclipse.tm.terminal.local.sdk-feature/pom.xml deleted file mode 100644 index ee1ccbea2d0..00000000000 --- a/deprecated/features/org.eclipse.tm.terminal.local.sdk-feature/pom.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - 4.0.0 - - org.eclipse.tm.maven-build - org.eclipse.tm - 4.0.0-SNAPSHOT - ../../../../admin/pom-build.xml - - org.eclipse.tm.features - org.eclipse.tm.terminal.local.sdk - 4.0.0.qualifier - eclipse-feature - - - - - - org.eclipse.tycho - tycho-packaging-plugin - ${tycho-version} - - default - - - - - - diff --git a/deprecated/features/org.eclipse.tm.terminal.test-feature/.project b/deprecated/features/org.eclipse.tm.terminal.test-feature/.project deleted file mode 100644 index e5464802aed..00000000000 --- a/deprecated/features/org.eclipse.tm.terminal.test-feature/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - org.eclipse.tm.terminal.test-feature - - - - - - org.eclipse.pde.FeatureBuilder - - - - - - org.eclipse.pde.FeatureNature - - diff --git a/deprecated/features/org.eclipse.tm.terminal.test-feature/build.properties b/deprecated/features/org.eclipse.tm.terminal.test-feature/build.properties deleted file mode 100644 index e54535db6d5..00000000000 --- a/deprecated/features/org.eclipse.tm.terminal.test-feature/build.properties +++ /dev/null @@ -1,16 +0,0 @@ -############################################################################### -# Copyright (c) 2005, 2014 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 -# Martin Oberhuber (Wind River) - Adding source plugin for tests -# Uwe Stieber (Wind River) - Bug 434937 - Releng: The Terminal Features have an incorrect license -############################################################################### -bin.includes = feature.xml,\ - feature.properties - -generate.plugin@org.eclipse.tm.terminal.test.source=org.eclipse.tm.terminal.test diff --git a/deprecated/features/org.eclipse.tm.terminal.test-feature/feature.properties b/deprecated/features/org.eclipse.tm.terminal.test-feature/feature.properties deleted file mode 100644 index 483a59d89ce..00000000000 --- a/deprecated/features/org.eclipse.tm.terminal.test-feature/feature.properties +++ /dev/null @@ -1,168 +0,0 @@ -############################################################################### -# Copyright (c) 2006, 2013 Wind River Systems, Inc. and others. -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Eclipse Public License v1.0 -# which accompanies this distribution, and is available at -# http://www.eclipse.org/legal/epl-v10.html -# -# Contributors: -# Martin Oberhuber (Wind River) - initial API and implementation -############################################################################### -# 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 Unit Tests (Deprecated) - -# "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=TM Terminal Unit Tests. Includes Source. - -# "copyright" property - text of the "Feature Update Copyright" -copyright=\ -Copyright (c) 2007, 2013 Wind River Systems, Inc. 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 ########################################## diff --git a/deprecated/features/org.eclipse.tm.terminal.test-feature/feature.xml b/deprecated/features/org.eclipse.tm.terminal.test-feature/feature.xml deleted file mode 100644 index a67ce1ad361..00000000000 --- a/deprecated/features/org.eclipse.tm.terminal.test-feature/feature.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - %description - - - - %copyright - - - - %license - - - - - - - - - - - - - - - - - - - diff --git a/deprecated/features/org.eclipse.tm.terminal.test-feature/pom.xml b/deprecated/features/org.eclipse.tm.terminal.test-feature/pom.xml deleted file mode 100644 index 57c325814c9..00000000000 --- a/deprecated/features/org.eclipse.tm.terminal.test-feature/pom.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - 4.0.0 - - org.eclipse.tm.maven-build - org.eclipse.tm - 4.0.0-SNAPSHOT - ../../../../admin/pom-build.xml - - org.eclipse.tm.features - org.eclipse.tm.terminal.test - 4.0.0.qualifier - eclipse-feature - - - - - - org.eclipse.tycho - tycho-packaging-plugin - ${tycho-version} - - default - - - - - - diff --git a/deprecated/features/org.eclipse.tm.terminal.test-feature/sourceTemplatePlugin/about.html b/deprecated/features/org.eclipse.tm.terminal.test-feature/sourceTemplatePlugin/about.html deleted file mode 100644 index e7b57cffff2..00000000000 --- a/deprecated/features/org.eclipse.tm.terminal.test-feature/sourceTemplatePlugin/about.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - -About - - -

About This Content

- -

June 5, 2007

-

License

- -

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 http://www.eclipse.org/legal/epl-v10.html. -For purposes of the EPL, "Program" will mean the Content.

- -

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 http://www.eclipse.org.

- -

Source Code

-

This plug-in contains source code zip files ("Source Zips") that correspond to binary content in other plug-ins. These Source Zips may be distributed under different license -agreements and/or notices. Details about these license agreements and notices are contained in "about.html" files ("Abouts") located in sub-directories in the -src/ directory of this plug-in. Such Abouts govern your use of the Source Zips in that directory, not the EPL.

- - - \ No newline at end of file diff --git a/deprecated/features/org.eclipse.tm.terminal.test-feature/sourceTemplatePlugin/build.properties b/deprecated/features/org.eclipse.tm.terminal.test-feature/sourceTemplatePlugin/build.properties deleted file mode 100644 index 52b7dcea95f..00000000000 --- a/deprecated/features/org.eclipse.tm.terminal.test-feature/sourceTemplatePlugin/build.properties +++ /dev/null @@ -1,12 +0,0 @@ -################################################################################ -# Copyright (c) 2007, 2008 Wind River Systems, Inc. and others. -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Eclipse Public License v1.0 -# which accompanies this distribution, and is available at -# http://www.eclipse.org/legal/epl-v10.html -# -# Contributors: -# Martin Oberhuber - initial API and implementation -################################################################################ -bin.includes = about.html, plugin.properties, plugin.xml, src/, META-INF/ -sourcePlugin = true diff --git a/deprecated/features/org.eclipse.tm.terminal.test-feature/sourceTemplatePlugin/plugin.properties b/deprecated/features/org.eclipse.tm.terminal.test-feature/sourceTemplatePlugin/plugin.properties deleted file mode 100644 index 26bbb2a83b8..00000000000 --- a/deprecated/features/org.eclipse.tm.terminal.test-feature/sourceTemplatePlugin/plugin.properties +++ /dev/null @@ -1,12 +0,0 @@ -################################################################################ -# Copyright (c) 2006, 2011 Wind River Systems, Inc. and others. -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Eclipse Public License v1.0 -# which accompanies this distribution, and is available at -# http://www.eclipse.org/legal/epl-v10.html -# -# Contributors: -# Martin Oberhuber - initial API and implementation -################################################################################ -pluginName=Target Management Terminal Unit Tests Source -providerName=Eclipse TM Project diff --git a/deprecated/plugins/org.eclipse.tm.terminal.local/.classpath b/deprecated/plugins/org.eclipse.tm.terminal.local/.classpath deleted file mode 100644 index 64c5e31b7a2..00000000000 --- a/deprecated/plugins/org.eclipse.tm.terminal.local/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/deprecated/plugins/org.eclipse.tm.terminal.local/.cvsignore b/deprecated/plugins/org.eclipse.tm.terminal.local/.cvsignore deleted file mode 100644 index ba077a4031a..00000000000 --- a/deprecated/plugins/org.eclipse.tm.terminal.local/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -bin diff --git a/deprecated/plugins/org.eclipse.tm.terminal.local/.project b/deprecated/plugins/org.eclipse.tm.terminal.local/.project deleted file mode 100644 index cc0395aa2f2..00000000000 --- a/deprecated/plugins/org.eclipse.tm.terminal.local/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - org.eclipse.tm.terminal.local - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - org.eclipse.pde.api.tools.apiAnalysisBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - org.eclipse.pde.api.tools.apiAnalysisNature - - diff --git a/deprecated/plugins/org.eclipse.tm.terminal.local/.settings/org.eclipse.jdt.core.prefs b/deprecated/plugins/org.eclipse.tm.terminal.local/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 6f8bad41ff6..00000000000 --- a/deprecated/plugins/org.eclipse.tm.terminal.local/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,82 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.5 -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.fatalOptionalError=enabled -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=enabled -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected -org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning -org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning -org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore -org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning -org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled -org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected -org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning -org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled -org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected -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.potentialNullReference=warning -org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning -org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning -org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=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=warning -org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning -org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning -org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning -org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning -org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning -org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning -org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled -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=warning -org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled -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.unusedWarningToken=warning -org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning -org.eclipse.jdt.core.compiler.source=1.5 diff --git a/deprecated/plugins/org.eclipse.tm.terminal.local/META-INF/MANIFEST.MF b/deprecated/plugins/org.eclipse.tm.terminal.local/META-INF/MANIFEST.MF deleted file mode 100644 index ab9c6b889c9..00000000000 --- a/deprecated/plugins/org.eclipse.tm.terminal.local/META-INF/MANIFEST.MF +++ /dev/null @@ -1,25 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %pluginName -Bundle-SymbolicName: org.eclipse.tm.terminal.local;singleton:=true -Bundle-Version: 0.2.300.qualifier -Bundle-Activator: org.eclipse.tm.internal.terminal.local.LocalTerminalActivator -Bundle-Localization: plugin -Bundle-Vendor: %providerName -Require-Bundle: org.eclipse.tm.terminal;bundle-version="3.3.0", - org.eclipse.cdt.core;bundle-version="[5.2.0,6.0.0)", - org.eclipse.core.runtime, - org.eclipse.debug.core;bundle-version="3.6", - org.eclipse.debug.ui, - org.eclipse.jface, - org.eclipse.ui, - org.eclipse.ui.externaltools -Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Bundle-ActivationPolicy: lazy -Eclipse-LazyStart: true -Import-Package: org.eclipse.core.variables -Export-Package: org.eclipse.tm.internal.terminal.local;x-internal:=true, - org.eclipse.tm.internal.terminal.local.launch;x-internal:=true, - org.eclipse.tm.internal.terminal.local.launch.ui;x-internal:=true, - org.eclipse.tm.internal.terminal.local.process;x-internal:=true, - org.eclipse.tm.internal.terminal.local.ui;x-internal:=true diff --git a/deprecated/plugins/org.eclipse.tm.terminal.local/about.html b/deprecated/plugins/org.eclipse.tm.terminal.local/about.html deleted file mode 100644 index 47e9ccc8762..00000000000 --- a/deprecated/plugins/org.eclipse.tm.terminal.local/about.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - -About - - -

About This Content

- -

March 1, 2010

-

License

- -

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 http://www.eclipse.org/legal/epl-v10.html. -For purposes of the EPL, "Program" will mean the Content.

- -

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 http://www.eclipse.org.

- - - - \ No newline at end of file diff --git a/deprecated/plugins/org.eclipse.tm.terminal.local/about.ini b/deprecated/plugins/org.eclipse.tm.terminal.local/about.ini deleted file mode 100644 index 3adc27ab587..00000000000 --- a/deprecated/plugins/org.eclipse.tm.terminal.local/about.ini +++ /dev/null @@ -1,27 +0,0 @@ -# about.ini -# contains information about a feature -# java.io.Properties file (ISO 8859-1 with "\" escapes) -# "%key" are externalized strings defined in about.properties -# This file does not need to be translated. - -# Property "aboutText" contains blurb for "About" dialog (translated) -aboutText=%blurb - -# Property "windowImage" contains path to window icon (16x16) -# needed for primary features only - -# Property "featureImage" contains path to feature image (32x32) -featureImage=tm32.png - -# Property "aboutImage" contains path to product image (500x330 or 115x164) -# needed for primary features only - -# Property "appName" contains name of the application (not translated) -# needed for primary features only - -# Property "welcomePage" contains path to welcome page (special XML-based format) -# optional - -# Property "welcomePerspective" contains the id of the perspective in which the -# welcome page is to be opened. -# optional \ No newline at end of file diff --git a/deprecated/plugins/org.eclipse.tm.terminal.local/about.mappings b/deprecated/plugins/org.eclipse.tm.terminal.local/about.mappings deleted file mode 100644 index 14f8af2448b..00000000000 --- a/deprecated/plugins/org.eclipse.tm.terminal.local/about.mappings +++ /dev/null @@ -1,12 +0,0 @@ -#################################################################################################### -# Copyright (c) 2008 Mirko Raner 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: -# Mirko Raner - initial implementation for Eclipse Bug 196337 -#################################################################################################### - -0=@build@ diff --git a/deprecated/plugins/org.eclipse.tm.terminal.local/about.properties b/deprecated/plugins/org.eclipse.tm.terminal.local/about.properties deleted file mode 100644 index e33b47ae863..00000000000 --- a/deprecated/plugins/org.eclipse.tm.terminal.local/about.properties +++ /dev/null @@ -1,19 +0,0 @@ -#################################################################################################### -# Copyright (c) 2008, 2012 Mirko Raner 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: -# Mirko Raner - initial implementation for Eclipse Bug 196337 -# Martin Oberhuber (Wind River) - Import to Eclipse TM -#################################################################################################### - -blurb=Target Management Terminal Local Connector (Incubation)\n\ -\n\ -Version: {featureVersion}\n\ -Build id: {0}\n\ -\n\ -(c) Copyright Mirko Raner and others 2008, 2012. All rights reserved.\n\ -Visit http://www.eclipse.org/tm diff --git a/deprecated/plugins/org.eclipse.tm.terminal.local/build.properties b/deprecated/plugins/org.eclipse.tm.terminal.local/build.properties deleted file mode 100644 index d04873ab0a2..00000000000 --- a/deprecated/plugins/org.eclipse.tm.terminal.local/build.properties +++ /dev/null @@ -1,24 +0,0 @@ -############################################################################### -# Copyright (c) 2010, 2011 Mirko Raner 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: -# Mirko Raner - initial implementation for Eclipse Bug 196337 -############################################################################### -source.. = src/ -output.. = bin/ -bin.includes = plugin.xml,\ - plugin.properties,\ - about.html,\ - about.ini,\ - about.mappings,\ - about.properties,\ - tm32.png,\ - icons/,\ - META-INF/,\ - . -src.includes = about.html -jre.compilation.profile = J2SE-1.5 diff --git a/deprecated/plugins/org.eclipse.tm.terminal.local/icons/terminal-launch.gif b/deprecated/plugins/org.eclipse.tm.terminal.local/icons/terminal-launch.gif deleted file mode 100644 index adfb9c2c80ffdc4b8095cf5838443120db655f75..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 601 zcmZ?wbhEHb6krfwIF`X+<=3bcK0!OYUmHk9Owfv$tQ|2~D{`_{)O4-r>DtlL9m6`b z;umViFLaLR)=FNZm9knhZG%>=ky)9QR@z40Y8TCnty&pdt;+56>rK59CK*+GYUb?I z%sHp8mJ*1X3$EO(w;@mjAAYnxsV*Ipl&37(FVf?`XT`S!*pl&=Ws_jjHi>M_G7 zs(!ui^suN&Az_n}{bodY&5jP55tmlKK4d{m?A(aZCDEyiJ))N+$1cgpSsaAy!I`5lXh0Lp3|GQt8vEu+__g1)}C6s z_Vn5f=QggpQ?~A2(e?}5w_Vz?EvFyOrL#OW?J^%Li!jM~ zUO_xcLynIjC0VTAU&q?Y%tA0KDKY6^f(T2hVo?%X2YXc33XX+|2gN!1B{CjfI?6p= jH%`h%XyJlnCKg#&8>x^5Pfj>0aR>+qBs83GV6X-NoFXk- diff --git a/deprecated/plugins/org.eclipse.tm.terminal.local/plugin.properties b/deprecated/plugins/org.eclipse.tm.terminal.local/plugin.properties deleted file mode 100644 index 7d22fac50e5..00000000000 --- a/deprecated/plugins/org.eclipse.tm.terminal.local/plugin.properties +++ /dev/null @@ -1,20 +0,0 @@ -#################################################################################################### -# Copyright (c) 2008, 2011 Mirko Raner 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: -# Mirko Raner - initial implementation for Eclipse Bug 196337 -# Martin Oberhuber (Wind River) - Import to Eclipse TM -#################################################################################################### - -# NLS_MESSAGEFORMAT_NONE - -pluginName=Local Terminal (Incubation) -providerName=Eclipse TM Project - -terminalLaunch=Terminal -terminalLaunchDescription=Run a program in a terminal -localConnection=Local Program diff --git a/deprecated/plugins/org.eclipse.tm.terminal.local/plugin.xml b/deprecated/plugins/org.eclipse.tm.terminal.local/plugin.xml deleted file mode 100644 index 9a90e159e9f..00000000000 --- a/deprecated/plugins/org.eclipse.tm.terminal.local/plugin.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/deprecated/plugins/org.eclipse.tm.terminal.local/pom.xml b/deprecated/plugins/org.eclipse.tm.terminal.local/pom.xml deleted file mode 100644 index fdc1b866b80..00000000000 --- a/deprecated/plugins/org.eclipse.tm.terminal.local/pom.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - 4.0.0 - - org.eclipse.tm.maven-build - org.eclipse.tm - 4.0.0-SNAPSHOT - ../../../../admin/pom-build.xml - - org.eclipse.tm - org.eclipse.tm.terminal.local - 0.2.300.qualifier - eclipse-plugin - diff --git a/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/ILocalTerminalSettings.java b/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/ILocalTerminalSettings.java deleted file mode 100644 index c4ef10b5f22..00000000000 --- a/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/ILocalTerminalSettings.java +++ /dev/null @@ -1,75 +0,0 @@ -/*************************************************************************************************** - * Copyright (c) 2008 Mirko Raner 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: - * Mirko Raner - [196337] Adapted from org.eclipse.tm.terminal.ssh/ISshSettings - **************************************************************************************************/ - -package org.eclipse.tm.internal.terminal.local; - -import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore; - -/** - * The interface {@link ILocalTerminalSettings} defines the public interface for connector-specific - * settings needed by the {@link LocalTerminalConnector}. The interface is implemented by class - * {@link LocalTerminalSettings}. - * - * @author Mirko Raner - * @version $Revision: 1.3 $ - */ -public interface ILocalTerminalSettings { - - /** - * The line separator setting CR (carriage return only; for example, used by Mac OS 9). - */ - public final static String LINE_SEPARATOR_CR = "\\r"; //$NON-NLS-1$ - - /** - * The line separator setting CRLF (carriage return and line feed; for example, used by - * Windows). - */ - public final static String LINE_SEPARATOR_CRLF = "\\r\\n"; //$NON-NLS-1$ - - /** - * The line separator setting LF (line feed only; used by all UNIX-based systems). - */ - public final static String LINE_SEPARATOR_LF = "\\n"; //$NON-NLS-1$ - - /** - * Loads the settings from a specified {@link ISettings}. - * - * TODO: the {@link #load(ISettings)} method should probably extracted to a super-interface - * as it appears to be common to all customized settings interfaces - * - * @param store the {@link ISettings} to load the settings from - */ - public abstract void load(ISettingsStore store); - - /** - * Saves the settings to a specified {@link ISettings}. - * - * TODO: the {@link #save(ISettings)} method should probably extracted to a super-interface - * as it appears to be common to all customized settings interfaces - * - * @param store the {@link ISettings} for storing the settings - */ - public abstract void save(ISettingsStore store); - - /** - * Gets the name of the launch configuration that will be started in the terminal. - * - * @return the launch configuration name - */ - public abstract String getLaunchConfigurationName(); - - /** - * Sets the name of the launch configuration that will be started in the terminal. - * - * @param configurationName the launch configuration name - */ - public abstract void setLaunchConfigurationName(String configurationName); -} diff --git a/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalActivator.java b/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalActivator.java deleted file mode 100644 index 84ba198d405..00000000000 --- a/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalActivator.java +++ /dev/null @@ -1,98 +0,0 @@ -/*************************************************************************************************** - * Copyright (c) 2008, 2010 Mirko Raner 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: - * Mirko Raner - initial implementation for Eclipse Bug 196337 - **************************************************************************************************/ - -package org.eclipse.tm.internal.terminal.local; - -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.osgi.framework.BundleContext; - -/** - * The class {@link LocalTerminalActivator} is the bundle activator for the Local Terminal - * Connector plug-in. - * - * @author Mirko Raner - * @version $Revision: 1.1 $ - */ -public class LocalTerminalActivator extends AbstractUIPlugin { - - /** - * The plug-in ID of the Local Terminal Connector plug-in. - */ - public static final String PLUGIN_ID = "org.eclipse.tm.terminal.local"; //$NON-NLS-1$ - - /** - * The preference key for confirming process termination during workbench shutdown. - * Value: "CONFIRM_TERMINATE". - * If the corresponding Preference slot is set to "true", a confirmation dialog - * will be shown when quitting Workbench while a local Terminal is still running. - * For details, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=313643 - * @since 0.1 - */ - public final static String PREF_CONFIRM_TERMINATE_ON_SHUTDOWN = "CONFIRM_TERMINATE";//$NON-NLS-1$ - - private static LocalTerminalActivator plugin; - - /** - * Creates a new {@link LocalTerminalActivator}. - */ - public LocalTerminalActivator() { - - super(); - } - - /** - * Returns the shared plug-in instance. - * - * @return the shared instance - */ - public static LocalTerminalActivator getDefault() { - - return plugin; - } - - /** - * Returns an image descriptor for the image file at the given plug-in relative path. - * - * @param path the path to the image - * @return the image descriptor - */ - public static ImageDescriptor getImageDescriptor(String path) { - - return imageDescriptorFromPlugin(PLUGIN_ID, path); - } - - /** - * Starts the bundle and initializes the shared plug-in reference. - * - * @param context the {@link BundleContext} - * - * @see AbstractUIPlugin#start(BundleContext) - */ - public void start(BundleContext context) throws Exception { - - super.start(context); - plugin = this; - } - - /** - * Stops the bundle and resets the the shared plug-in reference. - * - * @param context the {@link BundleContext} - * - * @see AbstractUIPlugin#stop(BundleContext) - */ - public void stop(BundleContext context) throws Exception { - - plugin = null; - super.stop(context); - } -} diff --git a/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalConnector.java b/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalConnector.java deleted file mode 100644 index 52f59f710b0..00000000000 --- a/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalConnector.java +++ /dev/null @@ -1,400 +0,0 @@ -/*************************************************************************************************** - * Copyright (c) 2008, 2012 Mirko Raner 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: - * Mirko Raner - [196337] initial implementation; some methods adapted from - * org.eclipse.tm.terminal.ssh/SshConnector - * Mirko Raner - [314977] Dynamically disable when no PTY is available - * Anna Dushistova(MontaVista) - [386262] NPE in setTerminalSize - **************************************************************************************************/ - -package org.eclipse.tm.internal.terminal.local; - -import java.io.OutputStream; - -import org.eclipse.cdt.utils.Platform; -import org.eclipse.cdt.utils.pty.PTY; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.debug.core.DebugEvent; -import org.eclipse.debug.core.DebugException; -import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.IDebugEventSetListener; -import org.eclipse.debug.core.ILaunch; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; -import org.eclipse.debug.core.ILaunchManager; -import org.eclipse.debug.core.model.IStreamMonitor; -import org.eclipse.debug.core.model.IStreamsProxy; -import org.eclipse.debug.ui.IDebugUIConstants; -import org.eclipse.jface.dialogs.ErrorDialog; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.tm.internal.terminal.local.launch.LocalTerminalLaunchUtilities; -import org.eclipse.tm.internal.terminal.local.process.LocalTerminalProcess; -import org.eclipse.tm.internal.terminal.local.process.LocalTerminalProcessFactory; -import org.eclipse.tm.internal.terminal.local.process.LocalTerminalProcessRegistry; -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.Logger; -import org.eclipse.tm.internal.terminal.provisional.api.TerminalState; -import org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl; - -/** - * The class {@link LocalTerminalConnector} provides a terminal connector implementation for - * connecting to local programs (for example, a locally running bash shell or - * vi editor). - * - * @author Mirko Raner - * @version $Revision: 1.6 $ - */ -public class LocalTerminalConnector extends TerminalConnectorImpl -implements IDebugEventSetListener { - - // Shorthand for attribute names: - // - private final static String ATTR_CAPTURE_IN_CONSOLE = IDebugUIConstants.ATTR_CAPTURE_IN_CONSOLE; - private final static String ATTR_CAPTURE_OUTPUT = DebugPlugin.ATTR_CAPTURE_OUTPUT; - private final static String ATTR_PROCESS_FACTORY_ID = DebugPlugin.ATTR_PROCESS_FACTORY_ID; - - private LocalTerminalOutputStream terminalToLocalProcessStream; - private LocalTerminalOutputListener outputListener; - private LocalTerminalOutputListener errorListener; - private ILocalTerminalSettings settings; - private IStreamMonitor outputMonitor; - private IStreamMonitor errorMonitor; - private LocalTerminalProcess process; - private ILaunch launch; - private int lastHeight; - private int lastWidth; - - /** - * Creates a new {@link LocalTerminalConnector}. This constructor is invoked by the framework. - */ - public LocalTerminalConnector() { - - settings = new LocalTerminalSettings(); - } - - /** - * Initializes the connector. This method checks whether a pty driver is available - * and will fail if that is not the case. - * - * @throws Exception if the connector could not be initialized - */ - public void initialize() throws Exception { - - super.initialize(); - if (!PTY.isSupported()) { - - final String OS = Platform.getOS(); - final String ARCH = Platform.getOSArch(); - String message = NLS.bind(LocalTerminalMessages.errorNoPTYSupport, OS, ARCH); - IStatus status = new Status(IStatus.WARNING, LocalTerminalActivator.PLUGIN_ID, message); - throw new CoreException(status); - } - } - - /** - * Loads the connector's settings from the specified store. - * - * @param store the {@link ISettings} - * - * @see TerminalConnectorImpl#load(ISettings) - * - * TODO: the load(ISettingsStore) method should probably be made abstract in - * TerminalConnectorImpl, otherwise it is not immediately clear that clients need to - * override this method if custom settings are necessary (which they usually are). - * Maybe the whole settings store mechanism should be redesigned. The current scheme - * requires clients to implement load/save methods in their connector implementation - * classes (necessity to override is not immediately obvious) and in the settings store - * implementations (not enforced at all; merely expected by convention). Structurally, - * all client implementations look more or less the same, and probably could be handled - * by the framework in a uniform way. Maybe a configuration mechanism using attributes - * (like, for example, ILaunchConfiguration) might be beneficial here. - */ - public void load(ISettingsStore store) { - - settings.load(store); - } - - /** - * Stores the connector's settings into the specified store. - * See {@link #load(ISettings)} for additional notes. - * - * @param store the {@link ISettings} - * - * @see TerminalConnectorImpl#save(ISettings) - */ - public void save(ISettingsStore store) { - - settings.save(store); - } - - /** - * Creates the {@link ISettingsPage} for the settings of this connector. - * - * @return a new page that can be used in a dialog to setup this connection, or - * null if the connection cannot be customized or configured - * - * @see TerminalConnectorImpl#makeSettingsPage() - */ - public ISettingsPage makeSettingsPage() { - - return new LocalTerminalSettingsPage(settings); - } - - /** - * Returns a string that represents the settings of the connection. - * - * @return the name of the launch configuration that is running in the terminal - * - * @see TerminalConnectorImpl#getSettingsSummary() - * @see ILocalTerminalSettings#getLaunchConfigurationName() - */ - public String getSettingsSummary() { - - return settings.getLaunchConfigurationName(); - } - - /** - * Checks if local echo is required. - * - * @return true if the connection settings specify that local echo is enable, - * false otherwise - * - * @see TerminalConnectorImpl#isLocalEcho() - * @see LocalTerminalLaunchUtilities#ATTR_LOCAL_ECHO - */ - public boolean isLocalEcho() { - - return LocalTerminalUtilities.getLocalEcho(settings); - } - - /** - * Returns an {@link OutputStream} that writes to the local program's standard input. For the - * stream in the other direction (remote to terminal) see - * {@link ITerminalControl#getRemoteToTerminalOutputStream()}. - * - * @return the terminal-to-remote-stream (bytes written to this stream will be sent to the - * local program) - */ - public OutputStream getTerminalToRemoteStream() { - - return terminalToLocalProcessStream; - } - - /** - * Connects a locally launched program to the {@link ITerminalControl}. - * - * @param control the {@link ITerminalControl} through which the user can interact with the - * program - */ - public void connect(ITerminalControl control) { - - super.connect(control); - control.setState(TerminalState.CONNECTING); - ILaunchConfigurationWorkingCopy workingCopy = null; - ILaunchConfiguration configuration = null; - String configurationName = null; - try { - - configurationName = settings.getLaunchConfigurationName(); - configuration = LocalTerminalUtilities.findLaunchConfiguration(configurationName); - } - catch (CoreException exception) { - - Shell shell = Display.getDefault().getActiveShell(); - String title = LocalTerminalMessages.errorTitleCouldNotConnectToTerminal; - String text = LocalTerminalMessages.errorLaunchConfigurationNoLongerExists; - String message = NLS.bind(text, configurationName); - IStatus status = new Status(IStatus.ERROR, LocalTerminalActivator.PLUGIN_ID, message); - ErrorDialog.openError(shell, title, null, status); - control.setState(TerminalState.CLOSED); - return; - } - try { - - String oldFactoryID = configuration.getAttribute(ATTR_PROCESS_FACTORY_ID, (String)null); - workingCopy = configuration.getWorkingCopy(); - workingCopy.setAttribute(ATTR_CAPTURE_OUTPUT, true); - workingCopy.setAttribute(ATTR_CAPTURE_IN_CONSOLE, true); - workingCopy.setAttribute(ATTR_PROCESS_FACTORY_ID, LocalTerminalProcessFactory.ID); - configuration = workingCopy.doSave(); - try { - - launch = configuration.launch(ILaunchManager.RUN_MODE, null); - } - finally { - - // The process factory ID is used to distinguish between launches that originate - // from the terminal connector and launches that originate from the launch dialog. - // After launching, the original ID is restored so that the launch is not mistaken - // as originating from the terminal connector UI when it is launched via the launch - // dialog the next time: - // - workingCopy = configuration.getWorkingCopy(); - workingCopy.setAttribute(ATTR_PROCESS_FACTORY_ID, oldFactoryID); - workingCopy.doSave(); - } - - // To prevent a console from being allocated, the launch will actually not contain a - // reference to the runtime process. The process has to be obtained from the - // LocalTerminalProcessRegistry instead: - // - process = LocalTerminalProcessRegistry.getFromLaunch(launch); - IStreamsProxy streamsProxy = process.getStreamsProxy(); - - // Hook up standard input: - // - terminalToLocalProcessStream = new LocalTerminalOutputStream(process, settings); - - // Hook up standard output: - // - outputMonitor = streamsProxy.getOutputStreamMonitor(); - outputListener = new LocalTerminalOutputListener(control, settings); - outputMonitor.addListener(outputListener); - outputListener.streamAppended(outputMonitor.getContents(), outputMonitor); - - // Hook up standard error: - // - errorMonitor = streamsProxy.getErrorStreamMonitor(); - errorListener = new LocalTerminalOutputListener(control, settings); - errorMonitor.addListener(errorListener); - errorListener.streamAppended(errorMonitor.getContents(), errorMonitor); - // - // TODO: add proper synchronization for incoming data from stdout and stderr: - // currently, the data gets sometimes processed in the wrong order, for example, - // the next prompt (which shells like bash print to stderr) sometimes appears - // before the command's proper output that was sent to stdout. For example, - // you get: - // - // $ echo hello - // $ hello - // - // instead of the correct output of: - // - // $ echo hello - // hello - // $ - - // Listen for process termination and update the terminal state: - // - DebugPlugin.getDefault().addDebugEventListener(this); - control.setState(TerminalState.CONNECTED); - } - catch (CoreException exception) { - - control.setState(TerminalState.CLOSED); - Shell shell = LocalTerminalSettingsPage.getShell(); - ErrorDialog.openError(shell, null, null, exception.getStatus()); - Logger.logException(exception); - } - } - - /** - * Disconnects the connector if it is currently connected or does nothing otherwise. This method - * will try to terminate the underlying launched process and will remove all registered - * listeners. - */ - public void doDisconnect() { - - try { - - removeAllListeners(); - - // To prevent a console from being allocated, Terminal launches don't have an IProcess - // associated with them while they are running. However, to properly terminate a launch - // the launch has to contain at least one process that can be terminated (launches - // without processes effectively cannot be terminated): - // - LocalTerminalProcessRegistry.addProcessBackToFinishedLaunch(launch); - - // Now, terminate the process if it was ever started and hasn't been terminated already: - // - if (launch != null && launch.canTerminate()) { - - launch.terminate(); - // - // NOTE: canTerminate() merely indicates that the launch has not been terminated - // previously already - } - } - catch (DebugException couldNotTerminate) { - - Logger.logException(couldNotTerminate); - } - } - - /** - * Notifies the {@link PTY pty} that the size of the terminal has changed. - * This method gets called rather frequently, even if the terminal size has actually not - * changed. The method stores the last known width and height and will only call - * {@link PTY#setTerminalSize(int, int)} if it was different. - * - * @param width the new terminal width (in columns) - * @param height the new terminal height (in lines) - */ - public void setTerminalSize(int width, int height) { - if(process != null){ - PTY pty = process.getPTY(); - if (pty != null && (width != lastWidth || height != lastHeight)) { - - pty.setTerminalSize(width, height); - lastWidth = width; - lastHeight = height; - } - } - } - - /** - * Listens for self-induced termination of the launched process. For example, this method will - * be notified if a launched shell is terminated by pressing Control-D or by calling - * exit, or if a vi editor is terminated by means of a - * :q! command. - * - * @param event the debug events - * - * @see IDebugEventSetListener#handleDebugEvents(DebugEvent[]) - */ - public void handleDebugEvents(DebugEvent[] event) { - - int numberOfEvents = event.length; - for (int index = 0; index < numberOfEvents; index++) { - - if (event[index].getSource().equals(process) - && (event[index].getKind() == DebugEvent.TERMINATE)) { - - fControl.setState(TerminalState.CLOSED); - removeAllListeners(); - return; - } - } - } - - /** - * Removes any listeners that the {@link LocalTerminalConnector} might have registered in its - * {@link #connect(ITerminalControl)} method. This method is necessary for clean-up when a - * connection is closed. It prevents that orphaned or meaningless listeners keep accumulating - * on certain objects. - */ - protected void removeAllListeners() { - - if (outputMonitor != null && outputListener != null) { - - outputMonitor.removeListener(outputListener); - } - if (errorMonitor != null && errorListener != null) { - - errorMonitor.removeListener(errorListener); - } - DebugPlugin.getDefault().removeDebugEventListener(this); - } -} diff --git a/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalLaunchLabelProvider.java b/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalLaunchLabelProvider.java deleted file mode 100644 index ebac822d946..00000000000 --- a/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalLaunchLabelProvider.java +++ /dev/null @@ -1,72 +0,0 @@ -/*************************************************************************************************** - * Copyright (c) 2008 Mirko Raner. - * 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: - * Mirko Raner - initial implementation for Eclipse Bug 196337 - **************************************************************************************************/ - -package org.eclipse.tm.internal.terminal.local; - -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.jface.viewers.BaseLabelProvider; -import org.eclipse.jface.viewers.ILabelProvider; -import org.eclipse.swt.graphics.Image; -import org.eclipse.tm.internal.terminal.local.launch.LocalTerminalLaunchUtilities; - -/** - * The class {@link LocalTerminalLaunchLabelProvider} is an {@link ILabelProvider} for lists (or - * tables) of {@link ILaunchConfiguration}s. It returns a configuration's name as the text label, - * and the configuration type's regular icon as the image label. - * - * @author Mirko Raner - * @version $Revision: 1.2 $ - */ -public class LocalTerminalLaunchLabelProvider extends BaseLabelProvider implements ILabelProvider { - - /** - * Creates a new {@link LocalTerminalLaunchLabelProvider}. - */ - public LocalTerminalLaunchLabelProvider() { - - super(); - } - - /** - * Returns the image for the label of the given element. - * - * @param element the element for which the image was requested - * @return the image, or null if no image could be found - * - * @see ILabelProvider#getImage(Object) - */ - public Image getImage(Object element) { - - if (element instanceof ILaunchConfiguration) { - - return LocalTerminalLaunchUtilities.getImage((ILaunchConfiguration)element); - } - return null; - } - - /** - * Returns the text for the label of the given element. - * - * @param element the element for which to provide the label text - * @return the text string used to label the element, or null if there is no text - * label for the given object - * - * @see ILabelProvider#getText(Object) - */ - public String getText(Object element) { - - if (element instanceof ILaunchConfiguration) { - - return ((ILaunchConfiguration)element).getName(); - } - return String.valueOf(element); - } -} diff --git a/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalLaunchListProvider.java b/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalLaunchListProvider.java deleted file mode 100644 index 33d22e36ba2..00000000000 --- a/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalLaunchListProvider.java +++ /dev/null @@ -1,90 +0,0 @@ -/*************************************************************************************************** - * Copyright (c) 2008, 2010 Mirko Raner. - * 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: - * Mirko Raner - initial implementation for Eclipse Bug 196337 - **************************************************************************************************/ - -package org.eclipse.tm.internal.terminal.local; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.ILaunchConfigurationType; -import org.eclipse.debug.core.ILaunchManager; -import org.eclipse.jface.viewers.IStructuredContentProvider; -import org.eclipse.jface.viewers.Viewer; -import org.eclipse.tm.internal.terminal.provisional.api.Logger; - -/** - * The class {@link LocalTerminalLaunchListProvider} is a {@link IStructuredContentProvider} that - * provides a list of all {@link ILaunchConfiguration}s of the type "External Tools"/"Program". - * Those launch configurations can be used to start a new session in the Terminal View. - * - * @author Mirko Raner - * @version $Revision: 1.2 $ - */ -public class LocalTerminalLaunchListProvider implements IStructuredContentProvider { - - /** - * Creates a new {@link LocalTerminalLaunchListProvider}. - */ - public LocalTerminalLaunchListProvider() { - - super(); - } - - /** - * Returns the matching {@link ILaunchConfiguration}s for the given input element. This content - * provider does not really use the concept of "input" because the input can only be obtained in - * one way (from the {@link ILaunchManager}. - * - * @param input the input element (not checked or used by this method) - * @return the matching {@link ILaunchConfiguration}s - * - * @see IStructuredContentProvider#getElements(Object) - */ - public Object[] getElements(Object input) { - - ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager(); - ILaunchConfigurationType type = LocalTerminalUtilities.TERMINAL_LAUNCH_TYPE; - ILaunchConfiguration[] configurations = null; - try { - - configurations = launchManager.getLaunchConfigurations(type); - } - catch (CoreException couldNotObtainLaunchConfigurations) { - - Logger.logException(couldNotObtainLaunchConfigurations); - } - return configurations; - } - - /** - * Disposes of this {@link LocalTerminalLaunchListProvider}. Currently, there is no additional - * clean-up necessary, and this method is empty. - * - * @see org.eclipse.jface.viewers.IContentProvider#dispose() - */ - public void dispose() { - - // Does nothing... - } - - /** - * Notifies the {@link LocalTerminalLaunchListProvider} that its input has changed. This method - * is currently empty because {@link LocalTerminalLaunchListProvider} is not aware of the - * concept of "input" - * - * @see #getElements(Object) - * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(Viewer, Object, Object) - */ - public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { - - // Does nothing... - } -} diff --git a/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalMessages.java b/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalMessages.java deleted file mode 100644 index 9f1689f4114..00000000000 --- a/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalMessages.java +++ /dev/null @@ -1,124 +0,0 @@ -/*************************************************************************************************** - * Copyright (c) 2008, 2010 Mirko Raner. - * 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: - * Mirko Raner - initial implementation for Eclipse Bug 196337 - **************************************************************************************************/ - -package org.eclipse.tm.internal.terminal.local; - -import org.eclipse.osgi.util.NLS; - -/** - * The class {@link LocalTerminalMessages} provides localization keys to internationalized display - * messages used by the Local Terminal Connector. - * - * @author Mirko Raner - * @version $Revision: 1.4 $ - */ -public class LocalTerminalMessages extends NLS { - - static { - - NLS.initializeMessages(LocalTerminalMessages.class.getName(), LocalTerminalMessages.class); - } - - private LocalTerminalMessages() { - - super(); - } - - /** The title for the launch configuration selection: "Launch configuration:". */ - public static String launchConfiguration; - - /** The label for the "New..." button. */ - public static String labelNew; - - /** The label for the "Edit..." button. */ - public static String labelEdit; - - /** The label for the "Delete" button. */ - public static String labelDelete; - - /** The label for the "Enable terminal echo" check box. */ - public static String enableLocalEcho; - - /** The label for the "Send SIGINT when Ctrl-C is pressed" check box. */ - public static String sendInterruptOnCtrlC; - - /** The line separator option "LF". */ - public static String lineSeparatorLF; - - /** The line separator option "CR". */ - public static String lineSeparatorCR; - - /** The line separator option "CRLF". */ - public static String lineSeparatorCRLF; - - /** The default line separator option. */ - public static String lineSeparatorDefault; - - /** The base name for new launch configurations. */ - public static String newTerminalLaunchName; - - /** The error message to be issued if a launch configuration could not be found. */ - public static String noSuchLaunchConfiguration; - - /** The message displayed while launching a configuration. */ - public static String launchingConfiguration; - - /** The error message displayed when process creation failed. */ - public static String couldNotCreateIProcess; - - /** The error message for a missing executable path. */ - public static String locationNotSpecified; - - /** The error message for a specified but invalid executable path. */ - public static String invalidLocation; - - /** The error message for an invalid working directory location. */ - public static String invalidWorkingDirectory; - - /** The question message for confirming deletion of a launch configuration. */ - public static String questionDeleteLaunchConfiguration; - - /** The question title for confirming deletion of a launch configuration. */ - public static String questionTitleDeleteLaunchConfiguration; - - /** The error message for platforms that don't support ptys. */ - public static String errorNoPTYSupport; - - /** The error message for attempting to directly launch a Terminal launch configuration. */ - public static String errorDirectLaunch; - - /** The error message for attempting to launch a no longer existing launch configuration. */ - public static String errorLaunchConfigurationNoLongerExists; - - /** The error dialog title for failed terminal connections. */ - public static String errorTitleCouldNotConnectToTerminal; - - /** The title string of the warning displayed when terminal launches are still running. */ - public static String warningTitleTerminalsStillRunning; - - /** The warning message displayed when terminal launches are still running. */ - public static String warningMessageTerminalsStillRunning; - - /** The label for the button that quits the workbench anyway. */ - public static String quitWorkbenchAnyway; - - /** The label for the button that vetoes a shutdown of the workbench. */ - public static String doNoQuitWorkbench; - - /** The label for a terminal process that was terminated during workbench shut-down. */ - public static String terminatedProcess; - - /** The name of the launch configuration tab for terminal settings. */ - public static String terminalTabName; - - /** The group label for the terminal settings on the launch configuration page. */ - public static String terminalSettings; -} diff --git a/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalMessages.properties b/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalMessages.properties deleted file mode 100644 index f3238b967ad..00000000000 --- a/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalMessages.properties +++ /dev/null @@ -1,49 +0,0 @@ -#################################################################################################### -# Copyright (c) 2008, 2010 Mirko Raner. -# 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: -# Mirko Raner - initial implementation for Eclipse Bug 196337 -#################################################################################################### - -launchConfiguration=Launch configuration\: -enableLocalEcho=Enable terminal echo -sendInterruptOnCtrlC=Send SIGINT when Ctrl-C is pressed -lineSeparatorDefault=Program uses default line separator - or\: -lineSeparatorCRLF=CRLF -lineSeparatorLF=LF -lineSeparatorCR=CR -labelNew=New... -labelEdit=Edit... -labelDelete=Delete -terminalTabName=Terminal -terminalSettings=Terminal settings\: -newTerminalLaunchName=Terminal ({0}) -noSuchLaunchConfiguration=A launch configuration called ''{0}'' does not exist -launchingConfiguration=Launching {0}... -couldNotCreateIProcess=The IProcess could not be created -locationNotSpecified=Executable location was not specified in configuration ''{0}'' -invalidLocation=Executable does not exist for the external tool named ''{0}'' -invalidWorkingDirectory=The path {0} is not a directory and cannot be used as working directory \ - for ''{1}'' -questionDeleteLaunchConfiguration=Do you wish to delete the selected launch configuration? -questionTitleDeleteLaunchConfiguration=Confirm Launch Configuration Deletion -errorNoPTYSupport=CDT PTY support is not available on your host ({0}.{1}).\n\n\ -The Local Terminal connector has been disabled. -errorDirectLaunch=Terminal launch configurations can only be launched from the Terminal view. \ - Please open the Terminal view and click the view's Settings button to select and launch a local \ - Terminal. -errorLaunchConfigurationNoLongerExists=The launch configuration ''{0}'' that is selected in the \ - Terminal Settings does no longer exist. Please open the Settings dialog to select a valid launch \ - configuration. -errorTitleCouldNotConnectToTerminal=Could not connect to Terminal -warningTitleTerminalsStillRunning=Warning: Terminals with active processes are still running -warningMessageTerminalsStillRunning=The workbench is about to shut down even though one or more \ - terminals with active processes are still running. Unsaved data may be lost if the shutdown \ - proceeds. -quitWorkbenchAnyway=Quit Workbench Anyways -doNoQuitWorkbench=Do Not Quit Workbench -terminatedProcess={0} diff --git a/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalOutputListener.java b/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalOutputListener.java deleted file mode 100644 index 3e9ff6bb1ae..00000000000 --- a/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalOutputListener.java +++ /dev/null @@ -1,91 +0,0 @@ -/*************************************************************************************************** - * Copyright (c) 2008 Mirko Raner. - * 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: - * Mirko Raner - initial implementation for Eclipse Bug 196337 - **************************************************************************************************/ - -package org.eclipse.tm.internal.terminal.local; - -import java.io.PrintStream; - -import org.eclipse.debug.core.IStreamListener; -import org.eclipse.debug.core.model.IStreamMonitor; -import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl; -import org.eclipse.tm.internal.terminal.provisional.api.Logger; - -/** - * The class {@link LocalTerminalOutputListener} is an {@link IStreamListener} that transfers output - * from a program's standard output and standard error streams to an {@link ITerminalControl}. - * It does so by listening for appended text and sending it to the terminal's - * {@link ITerminalControl#getRemoteToTerminalOutputStream()}. The class also performs line - * separator conversions as specified by the {@link ILocalTerminalSettings}. - * - * @author Mirko Raner - * @version $Revision: 1.2 $ - */ -public class LocalTerminalOutputListener implements IStreamListener { - - private PrintStream printStream; - private String lineSeparator; - - /** - * Creates a new {@link LocalTerminalOutputListener}. - * - * @param control the {@link ITerminalControl} to which the received output is forwarded - * @param settings the {@link ILocalTerminalSettings} - */ - public LocalTerminalOutputListener(ITerminalControl control, ILocalTerminalSettings settings) { - - printStream = new PrintStream(control.getRemoteToTerminalOutputStream(), true); - lineSeparator = LocalTerminalUtilities.getLineSeparator(settings); - if (lineSeparator == null) { - - String defaultLS = System.getProperty(LocalTerminalUtilities.LINE_SEPARATOR_PROPERTY); - if (LocalTerminalUtilities.CRLF.equals(defaultLS)) { - - lineSeparator = ILocalTerminalSettings.LINE_SEPARATOR_CRLF; - } - else if (LocalTerminalUtilities.LF.equals(defaultLS)) { - - lineSeparator = ILocalTerminalSettings.LINE_SEPARATOR_LF; - } - else if (LocalTerminalUtilities.CR.equals(defaultLS)) { - - lineSeparator = ILocalTerminalSettings.LINE_SEPARATOR_CR; - } - else { - - Logger.log("Unknown default line separator: " + defaultLS); //$NON-NLS-1$ - } - } - } - - /** - * Processes new output that was appended to the intercepted stream. - * - * @param text the new output - * @param monitor the {@link IStreamMonitor} from which the output was received (this parameter - * is currently not evaluated because each {@link IStreamMonitor} has its own dedicated instance - * of {@link LocalTerminalOutputListener} attached) - */ - public void streamAppended(String text, IStreamMonitor monitor) { - - // The VT100TerminalControl apparently adheres to a strict interpretation of the CR and - // LF control codes, i.e., CR moves the caret to the beginning of the line (but does not - // move down to the next line), and LF moves down to the next line (but not to the - // beginning of the line). Therefore, if the program launched in the terminal does not use - // CRLF as its line terminator the line terminators have to be converted to CRLF before - // being passed on to the terminal control: - // - if (!ILocalTerminalSettings.LINE_SEPARATOR_CRLF.equals(lineSeparator)) { - - text = text.replaceAll(lineSeparator, LocalTerminalUtilities.CRLF); - } - printStream.print(text); - } -} diff --git a/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalOutputStream.java b/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalOutputStream.java deleted file mode 100644 index 3005eddadd8..00000000000 --- a/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalOutputStream.java +++ /dev/null @@ -1,185 +0,0 @@ -/*************************************************************************************************** - * Copyright (c) 2008 Mirko Raner. - * 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: - * Mirko Raner - initial implementation for Eclipse Bug 196337 - **************************************************************************************************/ - -package org.eclipse.tm.internal.terminal.local; - -import java.io.IOException; -import java.io.OutputStream; - -import org.eclipse.debug.core.model.IProcess; -import org.eclipse.debug.core.model.IStreamsProxy; -import org.eclipse.tm.internal.terminal.local.process.LocalTerminalProcess; - -/** - * The class {@link LocalTerminalOutputStream} is an {@link OutputStream} that copies data that is - * typed into the terminal to the standard input of the active process. Data that is written to the - * stream is directly forwarded to the {@link IStreamsProxy} of the process. CRLF line separators - * that are received from the terminal will be automatically converted to the line separator that is - * specified in the {@link ILocalTerminalSettings}. The Terminal Control generally sends CR line - * separators if the local echo is disabled and CRLF if enabled. The reason for this idiosyncrasy - * is not entirely clear right now and the line separator behavior might change in the future. - * - * TODO: research as to whether the CR/CRLF distinction in VT100TerminalControl.TerminalKeyHandler - * (based on the local echo setting) is really necessary - * - * @author Mirko Raner - * @version $Revision: 1.4 $ - */ -public class LocalTerminalOutputStream extends OutputStream { - - private final static String NOTHING = ""; //$NON-NLS-1$ - private final static String CRLF = LocalTerminalUtilities.CRLF; - private final static char CR = '\r'; - private final static char LF = '\n'; - private final static char CTRL_C = '\03'; - private final static int TERMINAL_SENDS_CR = 0; - private final static int TERMINAL_SENDS_CRLF = 1; - private final static int PROGRAM_EXPECTS_LF = 0; - private final static int PROGRAM_EXPECTS_CRLF = 1; - private final static int PROGRAM_EXPECTS_CR = 2; - private final static int NO_CHANGE = 0; - private final static int CHANGE_CR_TO_LF = 1; - private final static int INSERT_LF_AFTER_CR = 2; - private final static int REMOVE_CR = 3; - private final static int REMOVE_LF = 4; - - // CRLF conversion table: - // - // Expected line separator --> | LF | CRLF | CR | - // ------------------------------------+-----------------+--------------------+----------------+ - // Local echo off - control sends CR | change CR to LF | insert LF after CR | no change | - // ------------------------------------+-----------------+--------------------+----------------+ - // Local echo on - control sends CRLF | remove CR | no change | remove LF | - // - private final static int[][] CRLF_REPLACEMENT = { - - {CHANGE_CR_TO_LF, INSERT_LF_AFTER_CR, NO_CHANGE}, - {REMOVE_CR, NO_CHANGE, REMOVE_LF} - }; - - private final boolean sendSIGINTOnCtrlC; - private IStreamsProxy streamsProxy; - private IProcess process; - private int replacement; - - /** - * Creates a new {@link LocalTerminalOutputStream}. - * - * @param process the {@link IProcess} object of the terminal process - * @param settings the {@link ILocalTerminalSettings} (currently only used for the line - * separator settings) - */ - public LocalTerminalOutputStream(IProcess process, ILocalTerminalSettings settings) { - - this.process = process; - streamsProxy = process.getStreamsProxy(); - sendSIGINTOnCtrlC = LocalTerminalUtilities.getCtrlC(settings); - boolean localEcho = LocalTerminalUtilities.getLocalEcho(settings); - int terminalSends = localEcho? TERMINAL_SENDS_CRLF:TERMINAL_SENDS_CR; - int programExpects; - String lineSeparator = LocalTerminalUtilities.getLineSeparator(settings); - if (lineSeparator == null) { - - lineSeparator = System.getProperty(LocalTerminalUtilities.LINE_SEPARATOR_PROPERTY); - if (LocalTerminalUtilities.CR.equals(lineSeparator)) { - - programExpects = PROGRAM_EXPECTS_CR; - } - else if (LocalTerminalUtilities.LF.equals(lineSeparator)) { - - programExpects = PROGRAM_EXPECTS_LF; - } - else { - - programExpects = PROGRAM_EXPECTS_CRLF; - } - } - else if (lineSeparator.equals(ILocalTerminalSettings.LINE_SEPARATOR_LF)) { - - programExpects = PROGRAM_EXPECTS_LF; - } - else if (lineSeparator.equals(ILocalTerminalSettings.LINE_SEPARATOR_CR)) { - - programExpects = PROGRAM_EXPECTS_CR; - } - else { - - programExpects = PROGRAM_EXPECTS_CRLF; - } - replacement = CRLF_REPLACEMENT[terminalSends][programExpects]; - } - - /** - * Writes the specified byte to this output stream. - * - * @param data the byte - * @throws IOException if an I/O error occurs - */ - public void write(int data) throws IOException { - - write(new byte[] {(byte)data}, 0, 1); - } - - /** - * Writes a specified number of bytes from the specified byte array starting at a given offset. - * - * @param data the array containing the data - * @param offset the offset into the array - * @param length the number of bytes to be written - * @throws IOException of an I/O error occurs - */ - public void write(byte[] data, int offset, int length) throws IOException { - - String text = new String(data, offset, length); - // - // TODO: check whether this is correct! new String(byte[], int, int) always uses the default - // encoding! - - if (replacement == CHANGE_CR_TO_LF) { - - text = text.replace(CR, LF); - } - else if (replacement == INSERT_LF_AFTER_CR) { - - text = text.replaceAll(ILocalTerminalSettings.LINE_SEPARATOR_CR, CRLF); - } - else if (replacement == REMOVE_CR) { - - text = text.replaceAll(ILocalTerminalSettings.LINE_SEPARATOR_CR, NOTHING); - } - else if (replacement == REMOVE_LF) { - - text = text.replaceAll(ILocalTerminalSettings.LINE_SEPARATOR_LF, NOTHING); - } - - // Process Ctrl-C in the proper order: - // - int positionOfCtrlC = -1; - while (sendSIGINTOnCtrlC && (positionOfCtrlC = text.indexOf(CTRL_C)) != -1) { - - // Send text up to (and including) the Ctrl-C to the process, then send a SIGINT: - // - streamsProxy.write(text.substring(0, positionOfCtrlC+1)); - if (process instanceof LocalTerminalProcess) { - - ((LocalTerminalProcess)process).interrupt(); - } - - // Remove the part of the text that was already sent: - // - text = text.substring(positionOfCtrlC+1); - } - if (text.length() > 0) { - - streamsProxy.write(text); - } - } -} diff --git a/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalSettings.java b/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalSettings.java deleted file mode 100644 index 6f27d26fba3..00000000000 --- a/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalSettings.java +++ /dev/null @@ -1,109 +0,0 @@ -/*************************************************************************************************** - * Copyright (c) 2008 Mirko Raner 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: - * Mirko Raner - [196337] Adapted from org.eclipse.tm.terminal.ssh/SshSettings - **************************************************************************************************/ - -package org.eclipse.tm.internal.terminal.local; - -import java.lang.reflect.Field; - -import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore; -import org.eclipse.tm.internal.terminal.provisional.api.Logger; - -/** - * The class {@link LocalTerminalSettings} is the default implementation of the - * {@link ILocalTerminalSettings} interface. - * - * @author Mirko Raner - * @version $Revision: 1.3 $ - */ -public class LocalTerminalSettings implements ILocalTerminalSettings { - - private String launchConfiguration; - - /** - * Loads the settings from the given {@link ISettings}. - * This method loads the store contents by means of reflection. This is clearly overkill for - * the few settings supported by this class, but the code is much more reusable. Pretty much - * every implementation of a custom settings store is implemented in the same fashion and - * might be replace by a single centralized implementation. - * - * TODO: check for possibilities to reuse this code! - * - * @param store the {@link ISettings} - * @see ILocalTerminalSettings#load(ISettings) - */ - public void load(ISettingsStore store) { - - Field[] declaredField = getClass().getDeclaredFields(); - int numberOfFields = declaredField.length; - for (int index = 0; index < numberOfFields; index++) { - - Field field = declaredField[index]; - Class type = field.getType(); - Object value = store.get(field.getName()); - if (type.equals(boolean.class)) { - - value = Boolean.valueOf((String)value); - } - // TODO: further conversions need to be added as new settings types are introduced - try { - - field.set(this, value); - } - catch (IllegalAccessException illegalAccess) { - - Logger.logException(illegalAccess); - } - } - } - - /** - * Saves the settings to the specified {@link ISettings}. - * See {@link #load(ISettings)} for further implementation notes. - * - * @param store the {@link ISettings} - * - * @see ILocalTerminalSettings#save(ISettings) - */ - public void save(ISettingsStore store) { - - Field[] declaredField = getClass().getDeclaredFields(); - int numberOfFields = declaredField.length; - for (int index = 0; index < numberOfFields; index++) { - - Field field = declaredField[index]; - try { - - field.setAccessible(true); - store.put(field.getName(), String.valueOf(field.get(this))); - } - catch (IllegalAccessException illegalAccess) { - - Logger.logException(illegalAccess); - } - } - } - - /** - * @see ILocalTerminalSettings#getLaunchConfigurationName() - */ - public String getLaunchConfigurationName() { - - return launchConfiguration; - } - - /** - * @see ILocalTerminalSettings#setLaunchConfigurationName(String) - */ - public void setLaunchConfigurationName(String launchConfiguration) { - - this.launchConfiguration = launchConfiguration; - } -} diff --git a/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalSettingsPage.java b/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalSettingsPage.java deleted file mode 100644 index 997c88f47f2..00000000000 --- a/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalSettingsPage.java +++ /dev/null @@ -1,327 +0,0 @@ -/*************************************************************************************************** - * Copyright (c) 2008, 2013 Mirko Raner 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: - * Mirko Raner - [196337] Adapted from org.eclipse.tm.terminal.ssh/SshSettingsPage - **************************************************************************************************/ - -package org.eclipse.tm.internal.terminal.local; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; -import org.eclipse.debug.core.ILaunchManager; -import org.eclipse.debug.ui.DebugUITools; -import org.eclipse.debug.ui.ILaunchGroup; -import org.eclipse.jface.dialogs.ErrorDialog; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.viewers.ISelectionChangedListener; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jface.viewers.SelectionChangedEvent; -import org.eclipse.jface.viewers.StructuredSelection; -import org.eclipse.jface.viewers.TableViewer; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.events.SelectionListener; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Layout; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.swt.widgets.Table; -import org.eclipse.swt.widgets.Widget; -import org.eclipse.tm.internal.terminal.local.launch.LocalTerminalLaunchUtilities; -import org.eclipse.tm.internal.terminal.local.ui.DependentHeightComposite; -import org.eclipse.tm.internal.terminal.provisional.api.AbstractSettingsPage; -import org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage; -import org.eclipse.tm.internal.terminal.provisional.api.Logger; -import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.IWorkbenchWindow; -import org.eclipse.ui.PlatformUI; - -/** - * The class {@link LocalTerminalSettingsPage} is an implementation {@link ISettingsPage} for - * local program connections. - * - * @author Mirko Raner - * @version $Revision: 1.3 $ - */ -public class LocalTerminalSettingsPage extends AbstractSettingsPage -implements ISelectionChangedListener, SelectionListener { - - private ILocalTerminalSettings settings; - private TableViewer viewer; - private Button buttonEdit; - private Button buttonNew; - private Button buttonDelete; - - /** - * Creates a new {@link LocalTerminalSettingsPage} that reflects the settings of the specified - * {@link ILocalTerminalSettings} object. - * - * @param settings the {@link ILocalTerminalSettings} - */ - public LocalTerminalSettingsPage(ILocalTerminalSettings settings) { - - this.settings = settings; - } - - /** - * Creates the {@link org.eclipse.swt.widgets.Control} for the settings page. - * (NOTE: contrary to the common pattern, this method does not actually return the Control it - * created) - * - * @param parent the parent {@link Composite} into which the control is to be inserted - * - * @see ISettingsPage#createControl(Composite) - */ - public void createControl(Composite parent) { - - ILaunchConfiguration defaultConfiguration; - defaultConfiguration = LocalTerminalLaunchUtilities.createDefaultLaunchConfiguration(); - Composite enclosing = parent.getParent(); - Layout enclosingLayout = enclosing.getLayout(); - int extra = 0; - if (enclosingLayout instanceof GridLayout) { - - extra = -2*((GridLayout)enclosingLayout).marginHeight-2; - } - Composite composite = new DependentHeightComposite(parent, SWT.NONE, enclosing, extra); - // - // TODO: This is a HACK that ensures proper resizing of the settings page inside the - // StackLayout of the PageBook. The following code makes implicit assumptions about - // the internal layout of surrounding widgets. This is something that should be - // properly addressed in the framework (maybe in the PageBook class). - - GridLayout layout = new GridLayout(); - layout.marginWidth = layout.marginHeight = 0; - layout.horizontalSpacing = layout.verticalSpacing = 0; - composite.setLayout(layout); - composite.setLayoutData(new GridData(GridData.FILL_BOTH)); - Label label = new Label(composite, SWT.NONE); - label.setText(LocalTerminalMessages.launchConfiguration); - label.setLayoutData(new GridData()); - - // Create list of available launch configurations: - // - Composite tableAndButtons = new Composite(composite, SWT.NONE); - tableAndButtons.setLayoutData(new GridData(GridData.FILL_BOTH)); - layout = new GridLayout(2, false); - layout.marginWidth = 0; - tableAndButtons.setLayout(layout); - Table table = new Table(tableAndButtons, SWT.BORDER); - viewer = new TableViewer(table); - viewer.setLabelProvider(new LocalTerminalLaunchLabelProvider()); - viewer.setContentProvider(new LocalTerminalLaunchListProvider()); - viewer.setInput(new Object()); - viewer.addSelectionChangedListener(this); - table.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true, 0, 3)); - buttonNew = pushButton(tableAndButtons, LocalTerminalMessages.labelNew, false); - buttonEdit = pushButton(tableAndButtons, LocalTerminalMessages.labelEdit, false); - buttonEdit.setEnabled(settings.getLaunchConfigurationName() != null); - buttonDelete = pushButton(tableAndButtons, LocalTerminalMessages.labelDelete, true); - buttonDelete.setEnabled(settings.getLaunchConfigurationName() != null); - // - // NOTE: echo and line separator settings were moved to the launch configuration! - - // NOTE: loadSettings() is actually NOT called by the framework but needs to be called - // by the settings page itself - // TODO: this should be fixed in the framework; otherwise there is really no point - // in having it be a part of the ISettingsPage interface - // - loadSettings(); - if (defaultConfiguration != null) { - - // If there is only one configuration (the default one), then make sure it gets - // selected: - // - viewer.setSelection(new StructuredSelection(defaultConfiguration), true); - } - } - - /** - * Loads the settings from the internal {@link ILocalTerminalSettings} object. - * This method will update the UI to reflect the current settings. - * - * @see ISettingsPage#loadSettings() - */ - public void loadSettings() { - - String configurationName = settings.getLaunchConfigurationName(); - ILaunchConfiguration configuration; - try { - - configuration = LocalTerminalUtilities.findLaunchConfiguration(configurationName); - } - catch (CoreException couldNotFindLaunchConfiguration) { - - configuration = null; - } - if (settings.getLaunchConfigurationName() != null && configuration != null) { - - viewer.setSelection(new StructuredSelection(configuration), true); - } - } - - /** - * Saves the settings that are currently displayed in the UI to the internal - * {@link ILocalTerminalSettings} object. - * - * @see ISettingsPage#saveSettings() - */ - public void saveSettings() { - - if (viewer != null && !viewer.getSelection().isEmpty()) { - - IStructuredSelection selection = (IStructuredSelection)viewer.getSelection(); - Object element = selection.getFirstElement(); - if (element instanceof ILaunchConfiguration) { - - String launchConfiguration = ((ILaunchConfiguration)element).getName(); - settings.setLaunchConfigurationName(launchConfiguration); - } - } - } - - /** - * Checks if the current settings are valid for starting a terminal session. - * This method will only return true if a launch configuration is selected. - * - * @return true if a launch configuration has been selected, false - * otherwise - */ - public boolean validateSettings() { - - return viewer != null && !viewer.getSelection().isEmpty(); - } - - /** - * Enables or disables the Edit... and Delete buttons depending on whether a launch - * configuration is currently selected in the viewer. - * - * @see ISelectionChangedListener#selectionChanged(SelectionChangedEvent) - */ - public void selectionChanged(SelectionChangedEvent event) { - - buttonEdit.setEnabled(!event.getSelection().isEmpty()); - buttonDelete.setEnabled(!event.getSelection().isEmpty()); - } - - /** - * Handles default button clicks for the Edit... and New.. buttons. This method will simply - * pass on the call to {@link #widgetSelected(SelectionEvent)}. - * - * @param event the {@link SelectionEvent} - * - * @see SelectionListener#widgetDefaultSelected(SelectionEvent) - */ - public void widgetDefaultSelected(SelectionEvent event) { - - widgetSelected(event); - } - - /** - * Handles default button clicks for the Edit... and New.. buttons. - * - * @param event the {@link SelectionEvent} - * - * @see SelectionListener#widgetSelected(SelectionEvent) - */ - public void widgetSelected(SelectionEvent event) { - - ILaunchConfiguration configuration = null; - Widget widget = event.widget; - if (widget == null) { - - return; - } - if (widget.equals(buttonNew)) { - - try { - - ILaunchConfigurationWorkingCopy newLaunch; - newLaunch = LocalTerminalLaunchUtilities.createNewLaunchConfigurationWorkingCopy(); - configuration = newLaunch.doSave(); - } - catch (CoreException couldNotCreateNewLaunchConfiguration) { - - Logger.logException(couldNotCreateNewLaunchConfiguration); - } - } - if (widget.equals(buttonEdit) || configuration != null) { - - ILaunchGroup group; - IStructuredSelection selection = (IStructuredSelection)viewer.getSelection(); - if (configuration == null) { - - configuration = (ILaunchConfiguration)selection.getFirstElement(); - } - group = DebugUITools.getLaunchGroup(configuration, ILaunchManager.RUN_MODE); - String groupID = group.getIdentifier(); - DebugUITools.openLaunchConfigurationDialog(getShell(), configuration, groupID, null); - // - // TODO: handle return value (maybe start terminal right away if "Run" was selected) - // - a return value of Window.CANCEL indicates that "Close" was selected - // - a return value of Window.OK indicates that "Run" was selected - - viewer.refresh(); - viewer.setSelection(new StructuredSelection(configuration), true); - // - // TODO: handle renamed configurations; setSelection(...) will not work if the user - // renamed the configuration in the dialog (apparently, because renaming actually - // creates a different ILaunchConfiguration object, rather than just renaming the - // existing one) - } - if (widget.equals(buttonDelete)) { - - String title = LocalTerminalMessages.questionTitleDeleteLaunchConfiguration; - String question = LocalTerminalMessages.questionDeleteLaunchConfiguration; - if (MessageDialog.openQuestion(getShell(), title, question)) { - - IStructuredSelection selection = (IStructuredSelection)viewer.getSelection(); - configuration = (ILaunchConfiguration)selection.getFirstElement(); - try { - - configuration.delete(); - } - catch (CoreException exception) { - - ErrorDialog.openError(getShell(), null, null, exception.getStatus()); - } - viewer.refresh(); - } - } - } - - static Shell getShell() { - - IWorkbench workbench = PlatformUI.getWorkbench(); - IWorkbenchWindow activeWindow = workbench.getActiveWorkbenchWindow(); - if (activeWindow != null) { - - return activeWindow.getShell(); - } - IWorkbenchWindow[] allWindows = workbench.getWorkbenchWindows(); - return allWindows.length > 0? allWindows[0].getShell():null; - } - - //------------------------------------ PRIVATE SECTION ---------------------------------------// - - private Button pushButton(Composite parent, String label, boolean grabVertical) { - - GridData layoutData; - Button button = new Button(parent, SWT.PUSH); - button.setText(label); - layoutData = new GridData(GridData.VERTICAL_ALIGN_BEGINNING|GridData.HORIZONTAL_ALIGN_FILL); - layoutData.grabExcessVerticalSpace = grabVertical; - button.setLayoutData(layoutData); - button.addSelectionListener(this); - return button; - } -} diff --git a/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalUtilities.java b/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalUtilities.java deleted file mode 100644 index 44802ae61bb..00000000000 --- a/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/LocalTerminalUtilities.java +++ /dev/null @@ -1,158 +0,0 @@ -/*************************************************************************************************** - * Copyright (c) 2008, 2010 Mirko Raner. - * 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: - * Mirko Raner - initial implementation for Eclipse Bug 196337 - **************************************************************************************************/ - -package org.eclipse.tm.internal.terminal.local; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.ILaunchConfigurationType; -import org.eclipse.debug.core.ILaunchManager; -import org.eclipse.osgi.util.NLS; -import org.eclipse.tm.internal.terminal.local.launch.LocalTerminalLaunchDelegate; -import org.eclipse.tm.internal.terminal.local.launch.LocalTerminalLaunchUtilities; -import org.eclipse.tm.internal.terminal.provisional.api.Logger; - -/** - * The class {@link LocalTerminalUtilities} is a collection of commonly used constants and utility - * methods. - * - * @author Mirko Raner - * @version $Revision: 1.2 $ - */ -public class LocalTerminalUtilities { - - private static String NULL = null; - private static String LOCAL_TERMINAL = LocalTerminalLaunchDelegate.LAUNCH_CONFIGURATION_TYPE_ID; - - /** The name of the line separator system property (i.e., "line.separator"). */ - public final static String LINE_SEPARATOR_PROPERTY = "line.separator"; //$NON-NLS-1$ - - /** The line separator CRLF (i.e., "\r\n"). */ - public final static String CRLF = "\r\n"; //$NON-NLS-1$ - - /** The line separator CR (i.e., "\r"). */ - public final static String CR = "\r"; //$NON-NLS-1$ - - /** The line separator LF (i.e., "\n"). */ - public final static String LF = "\n"; //$NON-NLS-1$ - - private LocalTerminalUtilities() { - - super(); - } - - /** The {@link DebugPlugin}'s {@link ILaunchManager} instance. */ - public final static ILaunchManager LAUNCH_MANAGER = DebugPlugin.getDefault().getLaunchManager(); - - /** - * The {@link ILaunchConfigurationType} for "Terminal" launches (in the "External Tools" - * category). - */ - public final static ILaunchConfigurationType TERMINAL_LAUNCH_TYPE = - LAUNCH_MANAGER.getLaunchConfigurationType(LOCAL_TERMINAL); - - /** - * Finds a launch configuration by its name. - * - * @param name the name of the launch configuration - * @return the corresponding {@link ILaunchConfiguration} object or null if the - * configuration could not be found - * @throws CoreException if there was a general problem accessing launch configurations - */ - public static ILaunchConfiguration findLaunchConfiguration(String name) throws CoreException { - - ILaunchConfiguration[] configuration; - ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager(); - configuration = manager.getLaunchConfigurations(LocalTerminalUtilities.TERMINAL_LAUNCH_TYPE); - int numberOfConfigurations = configuration.length; - for (int index = 0; index < numberOfConfigurations; index++) { - - if (configuration[index].getName().equals(name)) { - - return configuration[index]; - } - } - String error = NLS.bind(LocalTerminalMessages.noSuchLaunchConfiguration, name); - throw new CoreException(new Status(IStatus.ERROR, LocalTerminalActivator.PLUGIN_ID, error)); - } - - /** - * Gets the local echo setting that is stored in the launch configuration for the given - * {@link ILocalTerminalSettings}. - * - * @param settings the {@link ILocalTerminalSettings} - * @return true for local echo enabled, false otherwise - */ - public static boolean getLocalEcho(ILocalTerminalSettings settings) { - - return getBooleanSetting(settings, LocalTerminalLaunchUtilities.ATTR_LOCAL_ECHO); - } - - /** - * Gets the Ctrl-C/SIGINT setting that is stored in the launch configuration for the given - * {@link ILocalTerminalSettings}. - * - * @param settings the {@link ILocalTerminalSettings} - * @return true if sending SIGINT for Ctrl-C is enabled, - * false otherwise - */ - public static boolean getCtrlC(ILocalTerminalSettings settings) { - - return getBooleanSetting(settings, LocalTerminalLaunchUtilities.ATTR_CTRL_C); - } - - /** - * Gets the line separator setting that is stored in the launch configuration for the given - * {@link ILocalTerminalSettings}. - * - * @param settings the {@link ILocalTerminalSettings} - * @return {@link ILocalTerminalSettings#LINE_SEPARATOR_LF}, - * {@link ILocalTerminalSettings#LINE_SEPARATOR_CRLF}, - * {@link ILocalTerminalSettings#LINE_SEPARATOR_CR}, or null for the platform's - * default line separator - */ - public static String getLineSeparator(ILocalTerminalSettings settings) { - - String configurationName = settings.getLaunchConfigurationName(); - try { - - String ls; - ILaunchConfiguration configuration = findLaunchConfiguration(configurationName); - ls = configuration.getAttribute(LocalTerminalLaunchUtilities.ATTR_LINE_SEPARATOR, NULL); - return ls; - } - catch (CoreException exception) { - - Logger.logException(exception); - return null; - } - } - - //------------------------------------- PRIVATE SECTION --------------------------------------// - - private static boolean getBooleanSetting(ILocalTerminalSettings settings, String attribute) { - - String configurationName = settings.getLaunchConfigurationName(); - try { - - ILaunchConfiguration configuration = findLaunchConfiguration(configurationName); - return configuration.getAttribute(attribute, false); - } - catch (CoreException exception) { - - Logger.logException(exception); - return false; - } - } -} diff --git a/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/launch/LocalTerminalLaunchDelegate.java b/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/launch/LocalTerminalLaunchDelegate.java deleted file mode 100644 index 999371af27b..00000000000 --- a/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/launch/LocalTerminalLaunchDelegate.java +++ /dev/null @@ -1,288 +0,0 @@ -/*************************************************************************************************** - * Copyright (c) 2008, 2010 Mirko Raner 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: - * Mirko Raner - [196337] Adapted from org.eclipse.ui.externaltools/ProgramLaunchDelegate - **************************************************************************************************/ - -package org.eclipse.tm.internal.terminal.local.launch; - -import java.io.File; -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; - -import org.eclipse.cdt.utils.pty.PTY; -import org.eclipse.cdt.utils.spawner.ProcessFactory; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.ILaunch; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.model.IProcess; -import org.eclipse.debug.core.model.LaunchConfigurationDelegate; -import org.eclipse.debug.ui.CommonTab; -import org.eclipse.osgi.util.NLS; -import org.eclipse.tm.internal.terminal.local.LocalTerminalActivator; -import org.eclipse.tm.internal.terminal.local.LocalTerminalMessages; -import org.eclipse.tm.internal.terminal.local.LocalTerminalUtilities; -import org.eclipse.tm.internal.terminal.local.process.LocalTerminalProcess; -import org.eclipse.tm.internal.terminal.local.process.LocalTerminalProcessFactory; -import org.eclipse.tm.internal.terminal.provisional.api.Logger; -import org.eclipse.ui.PlatformUI; - -/** - * The class {@link LocalTerminalLaunchDelegate} provides a launch configuration delegate for local - * terminal launches. It is based on the ProgramLaunchDelegate class in the - * org.eclipse.ui.externaltools plug-in. In contrast to the original class, - * {@link LocalTerminalLaunchDelegate} creates its low-level {@link Process} object using the CDT - * {@link ProcessFactory}, which allows the process to run with a pseudo-terminal ({@link PTY}). - * - * @author Mirko Raner and others - * @version $Revision: 1.4 $ - */ -public class LocalTerminalLaunchDelegate extends LaunchConfigurationDelegate { - - private final static String EMPTY = ""; //$NON-NLS-1$ - private final static String PLUGIN_ID = LocalTerminalActivator.PLUGIN_ID; - - /** - * The launch configuration type ID for terminal launches. - */ - public final static String LAUNCH_CONFIGURATION_TYPE_ID = PLUGIN_ID + ".launch"; //$NON-NLS-1$ - - private static LocalTerminalStillRunningListener workbenchCloseListener; - - /** - * Creates a new {@link LocalTerminalLaunchDelegate}. - */ - public LocalTerminalLaunchDelegate() { - - super(); - } - - /** - * Launches a new Local Terminal configuration in the specified mode. The launch object has - * already been registered with the launch manager. - * - * @param configuration the {@link ILaunchConfiguration} to launch - * @param mode the mode in which to launch; currently, Local Terminal launches only support the - * mode {@link org.eclipse.debug.core.ILaunchManager#RUN_MODE} - * @param progressMonitor an {@link IProgressMonitor}, or null for no progress - * monitoring - * @param launch the {@link ILaunch} object - * @exception CoreException if launching fails - */ - public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, - IProgressMonitor progressMonitor) throws CoreException { - - String processFactoryID; - processFactoryID = configuration.getAttribute(DebugPlugin.ATTR_PROCESS_FACTORY_ID, EMPTY); - if (!LocalTerminalProcessFactory.ID.equals(processFactoryID)) { - - // This launch was not launched via the terminal connector UI but via the launch dialog; - // the launch needs to be explicitly connected to a terminal (otherwise it will appear - // in the regular console), so launching from the launch dialog or from the launch - // history is not supported right now. - // - String message = LocalTerminalMessages.errorDirectLaunch; - IStatus status = new Status(IStatus.ERROR, LocalTerminalActivator.PLUGIN_ID, message); - throw new CoreException(status); - } - - // Extract all relevant information from the ILaunchConfiguration; the original - // ProgramLaunchDelegate class checks for cancellation again and again after each step, - // which is a somewhat suspect pattern; however, for now, LocalTerminalLaunchDelegate - // handles cancellation in the same way: - // - if (progressMonitor.isCanceled()) { - - return; - } - IPath location = LocalTerminalLaunchUtilities.getLocation(configuration); - if (progressMonitor.isCanceled()) { - - return; - } - IPath workingDirectory = LocalTerminalLaunchUtilities.getWorkingDirectory(configuration); - if (progressMonitor.isCanceled()) { - - return; - } - String[] arguments = LocalTerminalLaunchUtilities.getArguments(configuration); - if (progressMonitor.isCanceled()) { - - return; - } - String[] commandLine = new String[arguments != null? arguments.length+1:1]; - commandLine[0] = location.toOSString(); - if (arguments != null) { - - System.arraycopy(arguments, 0, commandLine, 1, arguments.length); - } - File workingDirectoryAsFile = null; - if (workingDirectory != null) { - - workingDirectoryAsFile = workingDirectory.toFile(); - } - if (progressMonitor.isCanceled()) { - - return; - } - String[] environment = LocalTerminalUtilities.LAUNCH_MANAGER.getEnvironment(configuration); - if (progressMonitor.isCanceled()) { - - return; - } - // - // TODO: check if there is a better way of handling cancellation of terminal launches! - - // Install an IWindowListener that checks for left-over terminal processes when the - // workbench is closed: - // - if (workbenchCloseListener == null) { - - workbenchCloseListener = new LocalTerminalStillRunningListener(); - PlatformUI.getWorkbench().addWorkbenchListener(workbenchCloseListener); - } - - // Create the low-level Process object: - // - Process spawner; - PTY pty = null; - try { - - ProcessFactory factory = ProcessFactory.getFactory(); - if (PTY.isSupported()) { - - pty = new PTY(false); - spawner = factory.exec(commandLine, environment, workingDirectoryAsFile, pty); - } - else { - - spawner = factory.exec(commandLine, environment, workingDirectoryAsFile); - } - } - catch (IOException exception) { - - Status error; - String message = exception.getMessage(); - error = new Status(IStatus.ERROR, LocalTerminalActivator.PLUGIN_ID, message, exception); - throw new CoreException(error); - } - - // Use program name as "process type" attribute: - // - Map processAttributes = new HashMap(); - String programName = location.lastSegment(); - String extension = location.getFileExtension(); - if (extension != null) { - - programName = programName.substring(0, programName.length()-extension.length()-1); - } - processAttributes.put(IProcess.ATTR_PROCESS_TYPE, programName.toLowerCase()); - - // Create the IProcess: - // - IProcess process = null; - if (spawner != null) { - - String[] configurationName = {configuration.getName()}; - String task = NLS.bind(LocalTerminalMessages.launchingConfiguration, configurationName); - progressMonitor.beginTask(task, IProgressMonitor.UNKNOWN); - process = DebugPlugin.newProcess(launch, spawner, commandLine[0], processAttributes); - } - if (spawner == null || process == null) { - - if (spawner != null) { - - spawner.destroy(); - } - String pluginID = LocalTerminalActivator.PLUGIN_ID; - String errorMessage = LocalTerminalMessages.couldNotCreateIProcess; - Status error = new Status(IStatus.ERROR, pluginID, IStatus.ERROR, errorMessage, null); - throw new CoreException(error); - } - if (process instanceof LocalTerminalProcess) { - - ((LocalTerminalProcess)process).setPTY(pty); - } - process.setAttribute(IProcess.ATTR_CMDLINE, generateCommandLine(commandLine)); - - // Wait for process termination if necessary (though probably highly unusual for terminal - // launches); again, the busy waiting pattern was copied from ProgramLaunchDelegate and is - // somewhat suspect: - // - if (!CommonTab.isLaunchInBackground(configuration)) { - - while (!process.isTerminated()) { - - try { - - if (progressMonitor.isCanceled()) { - - process.terminate(); - break; - } - Thread.sleep(50); - } - catch (InterruptedException interrupt) { - - Logger.logException(interrupt); - } - } - } - // - // TODO: find a better replacement for the busy waiting loop - } - - //------------------------------------- PRIVATE SECTION --------------------------------------// - - private String generateCommandLine(String[] commandLine) { - - if (commandLine.length < 1) { - - return EMPTY; - } - StringBuffer buffer = new StringBuffer(); - for (int element = 0; element < commandLine.length; element++) { - - if (element > 0) { - - buffer.append(' '); - } - StringBuffer argument = new StringBuffer(); - char[] characters = commandLine[element].toCharArray(); - boolean argumentContainsSpace = false; - for (int index = 0; index < characters.length; index++) { - - char character = characters[index]; - if (character == '"') { - - argument.append('\\'); - } - else if (character == ' ') { - - argumentContainsSpace = true; - } - argument.append(character); - } - if (argumentContainsSpace) { - - buffer.append('"').append(argument).append('"'); - } - else { - - buffer.append(argument); - } - } - return buffer.toString(); - } -} diff --git a/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/launch/LocalTerminalLaunchUtilities.java b/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/launch/LocalTerminalLaunchUtilities.java deleted file mode 100644 index 79db5cd278f..00000000000 --- a/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/launch/LocalTerminalLaunchUtilities.java +++ /dev/null @@ -1,305 +0,0 @@ -/*************************************************************************************************** - * Copyright (c) 2008, 2010 Mirko Raner 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: - * Mirko Raner - [196337] Adapted from org.eclipse.ui.externaltools/ExternalToolsUtil - * Mirko Raner - [314195] vi editor unusable in tcsh local terminal on Linux RHEL4 - **************************************************************************************************/ - -package org.eclipse.tm.internal.terminal.local.launch; - -import java.io.File; -import java.text.Format; -import java.text.MessageFormat; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Path; -import org.eclipse.core.runtime.Platform; -import org.eclipse.core.runtime.Status; -import org.eclipse.core.variables.IStringVariableManager; -import org.eclipse.core.variables.VariablesPlugin; -import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; -import org.eclipse.debug.core.ILaunchManager; -import org.eclipse.debug.ui.DebugUITools; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.graphics.Image; -import org.eclipse.tm.internal.terminal.local.LocalTerminalActivator; -import org.eclipse.tm.internal.terminal.local.LocalTerminalMessages; -import org.eclipse.tm.internal.terminal.local.LocalTerminalUtilities; -import org.eclipse.tm.internal.terminal.provisional.api.Logger; - -/** - * The class {@link LocalTerminalLaunchUtilities} provides some utility methods that are used by the - * {@link LocalTerminalLaunchDelegate}. The class is based on the ExternalToolsUtil - * class in the org.eclipse.ui.externaltools plug-in. This code had to be duplicated - * because the original class is not part of the public API of its plug-in. - * - * @author Mirko Raner and others - * @version $Revision: 1.4 $ - */ -public class LocalTerminalLaunchUtilities { - - /** The launch configuration attribute for the local echo setting. */ - public final static String ATTR_LOCAL_ECHO = LocalTerminalActivator.PLUGIN_ID + - ".echo"; //$NON-NLS-1$ - - /** The launch configuration attribute for the Ctrl-C/SIGINT setting. */ - public final static String ATTR_CTRL_C = LocalTerminalActivator.PLUGIN_ID + - ".sigint"; //$NON-NLS-1$ - - /** The launch configuration attribute for the line terminator setting. */ - public final static String ATTR_LINE_SEPARATOR = LocalTerminalActivator.PLUGIN_ID + - ".lineseparator"; //$NON-NLS-1$ - - private final static String[] EMPTY = {}; - private final static String STRING = null; - private final static String TERM = "TERM"; //$NON-NLS-1$ - private final static String ANSI = "ansi"; //$NON-NLS-1$ - private final static Map TERM_ANSI = Collections.singletonMap(TERM, ANSI); - - // These constants were copied from IExternalToolConstants to avoid references to internal API: - // - private final static String XT = "org.eclipse.ui.externaltools"; //$NON-NLS-1$; - private final static String ATTR_LOCATION = XT+".ATTR_LOCATION"; //$NON-NLS-1$ - private final static String ATTR_TOOL_ARGUMENTS = XT+".ATTR_TOOL_ARGUMENTS"; //$NON-NLS-1$ - private final static String ATTR_WORKING_DIRECTORY = XT+".ATTR_WORKING_DIRECTORY"; //$NON-NLS-1$ - - private LocalTerminalLaunchUtilities() { - - super(); - } - - /** - * Gets the image that should be used for representing the given launch configuration. - * - * @param configuration the {@link ILaunchConfiguration} - * @return an SWT {@link Image} or null if no suitable image was found - */ - public static Image getImage(ILaunchConfiguration configuration) { - - String identifier; - try { - - identifier = configuration.getType().getIdentifier(); - } - catch (CoreException couldNotDetermineConfigurationType) { - - identifier = null; - Logger.logException(couldNotDetermineConfigurationType); - } - if (identifier != null) { - - return DebugUITools.getImage(identifier); - } - return null; - } - - /** - * Expands and returns the location attribute of the given launch configuration. The location is - * verified to point to an existing file in the local file system. - * - * @param configuration the {@link ILaunchConfiguration} - * @return an absolute path to a file in the local file system - * @throws CoreException if unable to retrieve the associated launch configuration attribute, or - * if unable to resolve any variables, or if the resolved location does not point to an existing - * file in the local file system - */ - public static IPath getLocation(ILaunchConfiguration configuration) throws CoreException { - - Object[] configurationName = {configuration.getName()}; - String location = configuration.getAttribute(ATTR_LOCATION, STRING); - if (location == null) { - - abort(NLS.bind(LocalTerminalMessages.locationNotSpecified, configurationName), null, 0); - } - String expandedLocation = getStringVariableManager().performStringSubstitution(location); - if (expandedLocation == null || expandedLocation.length() == 0) { - - abort(NLS.bind(LocalTerminalMessages.invalidLocation, configurationName), null, 0); - } - File file = new File(expandedLocation); - if (!file.isFile()) { - - abort(NLS.bind(LocalTerminalMessages.invalidLocation, configurationName), null, 0); - } - return new Path(expandedLocation); - } - - /** - * Expands and returns the working directory attribute of the given launch configuration. - * Returns null if a working directory is not specified. If specified, the working - * directory is guaranteed to point to an existing directory in the local file system. - * - * @param configuration the {@link ILaunchConfiguration} - * @return an absolute path to a directory in the local file system, or null if - * no working directory was specified - * @throws CoreException if unable to retrieve the associated launch configuration attribute, - * or if unable to resolve any variables, or if the resolved location does not point to an - * existing directory in the local file system - */ - public static IPath getWorkingDirectory(ILaunchConfiguration configuration) - throws CoreException { - - String location = configuration.getAttribute(ATTR_WORKING_DIRECTORY, STRING); - if (location != null) { - - String expandedLocation; - expandedLocation = getStringVariableManager().performStringSubstitution(location); - if (expandedLocation.length() > 0) { - - File path = new File(expandedLocation); - if (!path.isDirectory()) { - - Object[] detail = {expandedLocation, configuration.getName()}; - abort(NLS.bind(LocalTerminalMessages.invalidWorkingDirectory, detail), null, 0); - } - } - return new Path(expandedLocation); - } - return null; - } - - /** - * Expands and returns the arguments attribute of the given launch configuration. Returns - * null if arguments were not specified. - * - * @param configuration the {@link ILaunchConfiguration} - * @return an array of resolved arguments, or null if no arguments were specified - * @throws CoreException if unable to retrieve the associated launch configuration attribute, - * or if unable to resolve any variables - */ - public static String[] getArguments(ILaunchConfiguration configuration) throws CoreException { - - String arguments = configuration.getAttribute(ATTR_TOOL_ARGUMENTS, STRING); - if (arguments != null) { - - String expanded = getStringVariableManager().performStringSubstitution(arguments); - return parseStringIntoList(expanded); - } - return null; - } - - /** - * Creates an initial default launch configuration for starting a shell if no terminal/program - * launch configurations are defined yet. - * - * @return new {@link ILaunchConfiguration}, or {@code null} if there were already some - * terminal/program launch configurations defined - */ - public static ILaunchConfiguration createDefaultLaunchConfiguration() { - - ILaunchConfiguration[] configs; - ILaunchManager manager = LocalTerminalUtilities.LAUNCH_MANAGER; - try { - - configs = manager.getLaunchConfigurations(LocalTerminalUtilities.TERMINAL_LAUNCH_TYPE); - if (configs == null || configs.length == 0) { - - // Create a default launch configuration only if there aren't any terminal launch - // configurations defined at all: - // - ILaunchConfigurationWorkingCopy workingCopy; - workingCopy = createNewLaunchConfigurationWorkingCopy(); - return workingCopy.doSave(); - } - } - catch (CoreException exception) - { - exception.printStackTrace(); // TODO: implement proper exception handling - } - return null; - } - - /** - * Creates an {@link ILaunchConfigurationWorkingCopy} that uses the default shell as its - * executable and the user's home directory as the working directory. - * - * @return an unsaved {@link ILaunchConfigurationWorkingCopy} - * @throws CoreException if the {@link ILaunchConfigurationWorkingCopy} could not be - * instantiated - * @see #getDefaultShell() - */ - public static ILaunchConfigurationWorkingCopy createNewLaunchConfigurationWorkingCopy() - throws CoreException { - - ILaunchConfigurationWorkingCopy workingCopy; - ILaunchManager manager = LocalTerminalUtilities.LAUNCH_MANAGER; - String userHome = System.getProperty("user.home", "/"); //$NON-NLS-1$//$NON-NLS-2$ - String defaultShell = getDefaultShell().getAbsolutePath(); - String name = defaultShell.substring(defaultShell.lastIndexOf(File.separator) + 1); - Format terminalLaunchName = new MessageFormat(LocalTerminalMessages.newTerminalLaunchName); - name = terminalLaunchName.format(new Object[] {name}); - name = manager.generateLaunchConfigurationName(name); - workingCopy = LocalTerminalUtilities.TERMINAL_LAUNCH_TYPE.newInstance(null, name); - workingCopy.setAttribute(ILaunchManager.ATTR_ENVIRONMENT_VARIABLES, new HashMap(TERM_ANSI)); - workingCopy.setAttribute(ILaunchManager.ATTR_APPEND_ENVIRONMENT_VARIABLES, true); - workingCopy.setAttribute(ATTR_LOCATION, defaultShell); - workingCopy.setAttribute(ATTR_WORKING_DIRECTORY, userHome); - workingCopy.setAttribute(ATTR_LOCAL_ECHO, runningOnWindows()); - return workingCopy; - } - - /** - * Returns the system's default shell. First, this method will read the value of the environment - * variable {@code SHELL}. If that variable is not set, it will default to {@code cmd.exe} on - * Windows systems, and to {@code /bin/sh} on all other systems. - * - * @return a {@link File} pointing to the default shell (the underlying file is not guaranteed - * to exist in the file system) - */ - public static File getDefaultShell() { - - String shell = System.getenv("SHELL"); //$NON-NLS-1$ - if (shell == null) { - - if (runningOnWindows()) { - - shell = "C:\\Windows\\System32\\cmd.exe"; //$NON-NLS-1$ - } - else { - - shell = "/bin/sh"; //$NON-NLS-1$ - } - } - return new File(shell); - } - - //------------------------------------- PRIVATE SECTION --------------------------------------// - - private static boolean runningOnWindows() { - - return Platform.OS_WIN32.equals(Platform.getOS()); - } - - private static IStringVariableManager getStringVariableManager() { - - return VariablesPlugin.getDefault().getStringVariableManager(); - } - - private static String[] parseStringIntoList(String arguments) { - - if (arguments == null || arguments.length() == 0) { - - return EMPTY; - } - return DebugPlugin.parseArguments(arguments); - } - - private static void abort(String text, Throwable exception, int code) throws CoreException { - - Status status; - status = new Status(IStatus.ERROR, LocalTerminalActivator.PLUGIN_ID, code, text, exception); - throw new CoreException(status); - } -} diff --git a/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/launch/LocalTerminalStillRunningListener.java b/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/launch/LocalTerminalStillRunningListener.java deleted file mode 100644 index 17478b61e85..00000000000 --- a/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/launch/LocalTerminalStillRunningListener.java +++ /dev/null @@ -1,127 +0,0 @@ -/*************************************************************************************************** - * Copyright (c) 2008, 2010 Mirko Raner 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: - * Mirko Raner - [196337] Adapted from org.eclipse.ui.externaltools/ProgramLaunchDelegate - **************************************************************************************************/ - -package org.eclipse.tm.internal.terminal.local.launch; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.debug.core.ILaunch; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.ILaunchConfigurationType; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.tm.internal.terminal.local.LocalTerminalActivator; -import org.eclipse.tm.internal.terminal.local.LocalTerminalUtilities; -import org.eclipse.tm.internal.terminal.local.launch.ui.LocalTerminalStillRunningDialog; -import org.eclipse.tm.internal.terminal.provisional.api.Logger; -import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.IWorkbenchListener; -import org.eclipse.ui.IWorkbenchWindow; - -/** - * The class {@link LocalTerminalStillRunningListener} is an {@link IWorkbenchListener} that warns - * the user about any terminal launches that are still running when the workbench closes. The user - * might want to take specific action to deal with such left-over processes. Typically, this - * listener will trigger only on very rare cases because the - * {@link org.eclipse.tm.internal.terminal.provisional.api.ITerminalConnector} implementation will - * terminate left-over launches when the workbench window is closed. However, it is possible that - * a terminal launch does not get automatically terminated, for example, if it was started through - * an External Tools launch rather than through the terminal. - * - * The class {@link LocalTerminalStillRunningListener} is inspired by the - * ProgramLaunchWindowListener class inside ProgramLaunchDelegate in the - * org.eclipse.ui.externaltools plug-in, though it works through a slightly different - * mechanism. - * - * @author Mirko Raner - * @version $Revision: 1.2 $ - */ -public class LocalTerminalStillRunningListener implements IWorkbenchListener { - - /** - * Creates a new {@link LocalTerminalStillRunningListener}. - */ - public LocalTerminalStillRunningListener() { - - super(); - } - - /** - * Gets notified when the workbench is closed and informs the user about any left-over - * terminal launches. - * - * @param workbench the {@link IWorkbench} - * @param forced true if a forced shutdown occurred, false otherwise - * @return true to allow the workbench to proceed with shutdown, false - * to prevent a shutdown (only for non-forced shutdown) - */ - public boolean preShutdown(IWorkbench workbench, boolean forced) { - - if (forced) { - - return true; - } - IPreferenceStore store = LocalTerminalActivator.getDefault().getPreferenceStore(); - if (!store.getBoolean(LocalTerminalActivator.PREF_CONFIRM_TERMINATE_ON_SHUTDOWN)) { - - return true; - } - ILaunchConfigurationType launchType; - String launchTypeID = LocalTerminalLaunchDelegate.LAUNCH_CONFIGURATION_TYPE_ID; - launchType = LocalTerminalUtilities.LAUNCH_MANAGER.getLaunchConfigurationType(launchTypeID); - if (launchType == null) { - - return true; - } - List notTerminated = new ArrayList(); - ILaunch launches[] = LocalTerminalUtilities.LAUNCH_MANAGER.getLaunches(); - ILaunchConfigurationType configurationType; - ILaunchConfiguration configuration; - for (int launch = 0; launch < launches.length; launch++) { - - try { - - configuration = launches[launch].getLaunchConfiguration(); - if (configuration == null) { - - continue; - } - configurationType= configuration.getType(); - } - catch (CoreException exception) { - - Logger.logException(exception); - continue; - } - if (configurationType.equals(launchType) && !launches[launch].isTerminated()) { - - notTerminated.add(launches[launch]); - } - } - if (!notTerminated.isEmpty()) { - - IWorkbenchWindow window = workbench.getActiveWorkbenchWindow(); - ILaunch[] launch = (ILaunch[])notTerminated.toArray(new ILaunch[notTerminated.size()]); - return LocalTerminalStillRunningDialog.openDialog(window.getShell(), launch); - } - return true; - } - - /** - * Not implemented. - * @see IWorkbenchListener#postShutdown(IWorkbench) - */ - public void postShutdown(IWorkbench workbench) { - - // Not implemented - } -} diff --git a/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/launch/ui/LocalTerminalLaunchTabGroup.java b/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/launch/ui/LocalTerminalLaunchTabGroup.java deleted file mode 100644 index 7618816c6c8..00000000000 --- a/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/launch/ui/LocalTerminalLaunchTabGroup.java +++ /dev/null @@ -1,112 +0,0 @@ -/*************************************************************************************************** - * Copyright (c) 2008, 2010 Mirko Raner. - * 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: - * Mirko Raner - initial implementation for Eclipse Bug 196337 - **************************************************************************************************/ - -package org.eclipse.tm.internal.terminal.local.launch.ui; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IConfigurationElement; -import org.eclipse.core.runtime.IExtensionRegistry; -import org.eclipse.core.runtime.Platform; -import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup; -import org.eclipse.debug.ui.CommonTab; -import org.eclipse.debug.ui.EnvironmentTab; -import org.eclipse.debug.ui.IDebugUIConstants; -import org.eclipse.debug.ui.ILaunchConfigurationDialog; -import org.eclipse.debug.ui.ILaunchConfigurationTab; -import org.eclipse.debug.ui.ILaunchConfigurationTabGroup; -import org.eclipse.tm.internal.terminal.provisional.api.Logger; - -/** -* The class {@link LocalTerminalLaunchTabGroup} defines the tabs for the launch configuration -* dialog that is used for terminal-based launches. The tab groups consists of the main tab for -* a standard program launch (lifted from the org.eclipse.ui.externaltools plug-in), the -* custom {@link LocalTerminalSettingsTab}, and the {@link EnvironmentTab} and {@link CommonTab}, -* which can be publicly accessed from the org.eclipse.debug.ui plug-in. -* -* @author Mirko Raner -* @version $Revision: 1.2 $ -**/ -public class LocalTerminalLaunchTabGroup extends AbstractLaunchConfigurationTabGroup { - - private final static String ID = "id"; //$NON-NLS-1$ - private final static String CLASS = "class"; //$NON-NLS-1$ - private final static String PROGRAM_TAB_GROUP = - "org.eclipse.ui.externaltools.launchConfigurationTabGroup.program"; //$NON-NLS-1$ - - /** - * Creates a new {@link LocalTerminalLaunchTabGroup}. - **/ - public LocalTerminalLaunchTabGroup() { - - super(); - } - - /** - * Creates the tabs contained in the local terminal launch configuration dialog for the specified - * launch mode. The tabs control's are not yet created. This is the first method called in the - * life-cycle of a tab group. - * - * @param dialog the launch configuration dialog this tab group is contained in - * @param mode the mode the launch configuration dialog was opened in - * @see AbstractLaunchConfigurationTabGroup#createTabs(ILaunchConfigurationDialog, String) - **/ - public void createTabs(ILaunchConfigurationDialog dialog, String mode) { - - ILaunchConfigurationTab main = getMainTab(dialog, mode); - ILaunchConfigurationTab terminal = new LocalTerminalSettingsTab(); - ILaunchConfigurationTab environment = new EnvironmentTab(); - ILaunchConfigurationTab common = new CommonTab(); - ILaunchConfigurationTab[] tabs = {main, terminal, environment, common}; - setTabs(tabs); - } - - //-------------------------------------- PRIVATE SECTION -------------------------------------// - - private ILaunchConfigurationTab getMainTab(ILaunchConfigurationDialog dialog, String mode) { - - // Find the main tab for the external program launch in the registry (a direct search is - // only possible for extensions that actually declare a unique ID, which most extensions - // don't; the search for the "id" attribute of a configuration element has to be done - // manually): - // - IConfigurationElement[] element; - IExtensionRegistry registry = Platform.getExtensionRegistry(); - final String TAB_GROUPS = IDebugUIConstants.EXTENSION_POINT_LAUNCH_CONFIGURATION_TAB_GROUPS; - element = registry.getConfigurationElementsFor(IDebugUIConstants.PLUGIN_ID, TAB_GROUPS); - int numberOfElements = element.length; - for (int index = 0; index < numberOfElements; index++) { - - if (element[index].getAttribute(ID).equals(PROGRAM_TAB_GROUP)) { - - try { - - ILaunchConfigurationTabGroup tabGroup; - Object executable = element[index].createExecutableExtension(CLASS); - tabGroup = (ILaunchConfigurationTabGroup)executable; - tabGroup.createTabs(dialog, mode); - - // It's not possible to make assumptions about the class name of the program - // main tab (without over-stepping API boundaries), but it's usually the very - // first tab in the group (which is an assumption that actually also over-steps - // API boundaries, but it's the best possible solution, short of copying the - // whole source code): - // - return tabGroup.getTabs()[0]; - } - catch (CoreException exception) { - - Logger.logException(exception); - } - } - } - return null; - } -} diff --git a/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/launch/ui/LocalTerminalSettingsTab.java b/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/launch/ui/LocalTerminalSettingsTab.java deleted file mode 100644 index fd4bcbd9a57..00000000000 --- a/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/launch/ui/LocalTerminalSettingsTab.java +++ /dev/null @@ -1,282 +0,0 @@ -/*************************************************************************************************** - * Copyright (c) 2008, 2010 Mirko Raner. - * 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: - * Mirko Raner - initial implementation for Eclipse Bug 196337 - **************************************************************************************************/ - -package org.eclipse.tm.internal.terminal.local.launch.ui; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; -import org.eclipse.debug.ui.AbstractLaunchConfigurationTab; -import org.eclipse.debug.ui.DebugUITools; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.events.SelectionListener; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.layout.RowLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Group; -import org.eclipse.tm.internal.terminal.local.ILocalTerminalSettings; -import org.eclipse.tm.internal.terminal.local.LocalTerminalMessages; -import org.eclipse.tm.internal.terminal.local.launch.LocalTerminalLaunchDelegate; -import org.eclipse.tm.internal.terminal.local.launch.LocalTerminalLaunchUtilities; -import org.eclipse.tm.internal.terminal.provisional.api.Logger; - -/** - * The class {@link LocalTerminalSettingsTab} provides the UI for custom settings that are specific - * to terminal-based launches. Currently, the tab allows the user to control the local echo settings - * and the line separator string. - * - * @author Mirko Raner - * @version $Revision: 1.2 $ - **/ -public class LocalTerminalSettingsTab extends AbstractLaunchConfigurationTab -implements SelectionListener { - - private final static String NULL = null; - - private Button buttonEcho; - private Button buttonCtrlC; - private Button separatorDefault; - private Button separatorLF; - private Button separatorCRLF; - private Button separatorCR; - - /** - * Creates a new {@link LocalTerminalSettingsTab}. - **/ - public LocalTerminalSettingsTab() { - - super(); - } - - /** - * Creates the top-level control for this launch configuration tab under the given parent - * composite. This method is called once on tab creation. - * - * @param parent the parent {@link Composite} - * @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(Composite) - **/ - public void createControl(Composite parent) { - - Composite container = new Composite(parent, SWT.NONE); - setControl(container); - container.setLayout(new GridLayout()); - Group composite = new Group(container, SWT.NONE); - composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - composite.setText(LocalTerminalMessages.terminalSettings); - composite.setLayout(new GridLayout()); - - // Create echo check box: - // - buttonEcho = button(composite, LocalTerminalMessages.enableLocalEcho, SWT.CHECK); - buttonEcho.setLayoutData(new GridData()); - - // Create Ctrl-C/SIGINT check box: - // - buttonCtrlC = button(composite, LocalTerminalMessages.sendInterruptOnCtrlC, SWT.CHECK); - buttonCtrlC.setLayoutData(new GridData()); - - // Create radio buttons for line separator settings: - // - Composite separator = new Composite(composite, SWT.NONE); - RowLayout rowLayout = new RowLayout(); - rowLayout.wrap = false; - separator.setLayout(rowLayout); - separatorDefault = button(separator, LocalTerminalMessages.lineSeparatorDefault, SWT.RADIO); - separatorLF = button(separator, LocalTerminalMessages.lineSeparatorLF, SWT.RADIO); - separatorCRLF = button(separator, LocalTerminalMessages.lineSeparatorCRLF, SWT.RADIO); - separatorCR = button(separator, LocalTerminalMessages.lineSeparatorCR, SWT.RADIO); - separator.setLayoutData(new GridData()); - } - - /** - * Returns the name of this tab. - * - * @return the name of this tab - * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName() - **/ - public String getName() { - - return LocalTerminalMessages.terminalTabName; - } - - /** - * Returns the image for this tab, or null if none - * - * @return the image for this tab, or null if none - * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getImage() - **/ - public Image getImage() { - - return DebugUITools.getImage(LocalTerminalLaunchDelegate.LAUNCH_CONFIGURATION_TYPE_ID); - } - - /** - * Initializes this tab's controls with values from the given launch configuration. This method - * is called when a configuration is selected to view or edit, after the tab's control has been - * created. - * - * @param configuration the launch configuration - * @see org.eclipse.debug.ui.ILaunchConfigurationTab#initializeFrom(ILaunchConfiguration) - **/ - public void initializeFrom(ILaunchConfiguration configuration) { - - boolean echo; - try { - - echo = configuration.getAttribute(LocalTerminalLaunchUtilities.ATTR_LOCAL_ECHO, false); - } - catch (CoreException exception) { - - Logger.logException(exception); - echo = false; - } - boolean ctrlC; - try { - - ctrlC = configuration.getAttribute(LocalTerminalLaunchUtilities.ATTR_CTRL_C, false); - } - catch (CoreException exception) { - - Logger.logException(exception); - ctrlC = false; - } - String ls; - try { - - ls = configuration.getAttribute(LocalTerminalLaunchUtilities.ATTR_LINE_SEPARATOR, NULL); - } - catch (CoreException exception) { - - Logger.logException(exception); - ls = null; - } - buttonEcho.setSelection(echo); - buttonCtrlC.setSelection(ctrlC); - if (ILocalTerminalSettings.LINE_SEPARATOR_LF.equals(ls)) { - - separatorLF.setSelection(true); - } - else if (ILocalTerminalSettings.LINE_SEPARATOR_LF.equals(ls)) { - - separatorLF.setSelection(true); - } - else if (ILocalTerminalSettings.LINE_SEPARATOR_CRLF.equals(ls)) { - - separatorCRLF.setSelection(true); - } - else if (ILocalTerminalSettings.LINE_SEPARATOR_CR.equals(ls)) { - - separatorCR.setSelection(true); - } - else { - - separatorDefault.setSelection(true); - } - } - - /** - * Copies values from this tab into the given launch configuration. - * - * @param configuration the launch configuration - * @see AbstractLaunchConfigurationTab#performApply(ILaunchConfigurationWorkingCopy) - **/ - public void performApply(ILaunchConfigurationWorkingCopy configuration) { - - boolean echo = buttonEcho.getSelection(); - configuration.setAttribute(LocalTerminalLaunchUtilities.ATTR_LOCAL_ECHO, echo); - boolean ctrlC = buttonCtrlC.getSelection(); - configuration.setAttribute(LocalTerminalLaunchUtilities.ATTR_CTRL_C, ctrlC); - String lineSeparator = null; - if (separatorCRLF.getSelection()) { - - lineSeparator = ILocalTerminalSettings.LINE_SEPARATOR_CRLF; - } - else if (separatorCR.getSelection()) { - - lineSeparator = ILocalTerminalSettings.LINE_SEPARATOR_CR; - } - else if (separatorLF.getSelection()) { - - lineSeparator = ILocalTerminalSettings.LINE_SEPARATOR_LF; - } - configuration.setAttribute(LocalTerminalLaunchUtilities.ATTR_LINE_SEPARATOR, lineSeparator); - } - - /** - * Initializes the given launch configuration with default values for this tab. This method is - * called when a new launch configuration is created such that the configuration can be - * initialized with meaningful values. This method may be called before the tab's control is - * created. - * - * @param configuration the launch configuration - * @see AbstractLaunchConfigurationTab#setDefaults(ILaunchConfigurationWorkingCopy) - **/ - public void setDefaults(ILaunchConfigurationWorkingCopy configuration) { - - configuration.setAttribute(LocalTerminalLaunchUtilities.ATTR_LOCAL_ECHO, false); - configuration.setAttribute(LocalTerminalLaunchUtilities.ATTR_CTRL_C, false); - configuration.setAttribute(LocalTerminalLaunchUtilities.ATTR_LINE_SEPARATOR, NULL); - } - - /** - * Prevents Terminal launch configurations from being started directly from the launch - * configuration dialog. The Run button in the dialog will only be enabled if all tabs - * consider a launch configuration valid. - * - * TODO: previously used launches can still be launched via the launch history - * (see {@code ExternalToolMenuDelegate#fillMenu(Menu)}) - * - * @param configuration the {@link ILaunchConfiguration} - * @return always {@code false} - * @see org.eclipse.debug.ui.ILaunchConfigurationTab#isValid(ILaunchConfiguration) - */ - public boolean isValid(ILaunchConfiguration configuration) { - - return false; - } - - /** - * Handles selection of any of the buttons in the tab. - * - * @param event the {@link SelectionEvent} - * @see SelectionListener#widgetSelected(SelectionEvent) - **/ - public void widgetSelected(SelectionEvent event) { - - setDirty(true); - getLaunchConfigurationDialog().updateButtons(); - } - - /** - * Handles default selection of any of the buttons in the tab. - * - * @param event the {@link SelectionEvent} - * @see SelectionListener#widgetDefaultSelected(SelectionEvent) - **/ - public void widgetDefaultSelected(SelectionEvent event) { - - widgetSelected(event); - } - - //-------------------------------------- PRIVATE SECTION -------------------------------------// - - private Button button(Composite parent, String label, int buttonType) { - - Button button = new Button(parent, buttonType); - button.addSelectionListener(this); - button.setText(label); - return button; - } -} diff --git a/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/launch/ui/LocalTerminalStillRunningDialog.java b/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/launch/ui/LocalTerminalStillRunningDialog.java deleted file mode 100644 index f2b554e2474..00000000000 --- a/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/launch/ui/LocalTerminalStillRunningDialog.java +++ /dev/null @@ -1,298 +0,0 @@ -/*************************************************************************************************** - * Copyright (c) 2008 Mirko Raner. - * 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: - * Mirko Raner - initial implementation for Eclipse Bug 196337 - **************************************************************************************************/ - -package org.eclipse.tm.internal.terminal.local.launch.ui; - -import org.eclipse.debug.core.DebugException; -import org.eclipse.debug.core.ILaunch; -import org.eclipse.debug.core.ILaunchesListener2; -import org.eclipse.debug.ui.DebugUITools; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.SWT; -import org.eclipse.swt.custom.ScrolledComposite; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.events.SelectionListener; -import org.eclipse.swt.graphics.Color; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.graphics.RGB; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.swt.widgets.ToolBar; -import org.eclipse.swt.widgets.ToolItem; -import org.eclipse.tm.internal.terminal.local.LocalTerminalMessages; -import org.eclipse.tm.internal.terminal.local.LocalTerminalUtilities; -import org.eclipse.tm.internal.terminal.local.launch.LocalTerminalLaunchUtilities; -import org.eclipse.tm.internal.terminal.local.process.LocalTerminalProcessRegistry; -import org.eclipse.tm.internal.terminal.provisional.api.Logger; - -/** - * The class {@link LocalTerminalStillRunningDialog} is a dialog that is shown when the workbench is - * about to exit and one or more terminal launches are still running. It gives the user a choice - * between aborting the workbench shut-down, proceeding, or terminating the outstanding launches - * individually. When no more launches are running the dialog will automatically disappear and - * workbench shut-down will proceed. - * - * @author Mirko Raner - * @version $Revision: 1.1 $ - */ -public class LocalTerminalStillRunningDialog extends MessageDialog -implements Runnable, SelectionListener, ILaunchesListener2 { - - private final static String TITLE = LocalTerminalMessages.warningTitleTerminalsStillRunning; - private final static String MESSAGE = LocalTerminalMessages.warningMessageTerminalsStillRunning; - private final static String QUIT_ANYWAY = LocalTerminalMessages.quitWorkbenchAnyway; - private final static String DO_NOT_QUIT = LocalTerminalMessages.doNoQuitWorkbench; - private final static String[] BUTTONS = {QUIT_ANYWAY, DO_NOT_QUIT}; - private final static RGB WHITE = new RGB(255, 255, 255); - private final static int SCROLLABLE_HEIGHT = 100; - - // Image key copied from IInternalDebugUIConstants: - // - private final static String IMG_LCL_TERMINATE = "IMG_LCL_TERMINATE"; //$NON-NLS-1$ - - private ILaunch[] unterminated; - private Composite content; - - private LocalTerminalStillRunningDialog(Shell parentShell, ILaunch[] launches) { - - super(parentShell, TITLE, null, MESSAGE, WARNING, BUTTONS, 0); - setShellStyle(SWT.BORDER|SWT.TITLE|SWT.APPLICATION_MODAL|SWT.RESIZE|SWT.MAX); - unterminated = launches; - } - - /** - * Opens a dialog that lists all terminal launches that have not yet terminated. - * - * @param shell the parent {@link Shell} for the dialog - * @param launches the launches that have not yet terminated - * @return true to allow the workbench to proceed with shutdown, false - * to prevent a shutdown (only for non-forced shutdown) - */ - public static boolean openDialog(Shell shell, ILaunch[] launches) { - - LocalTerminalStillRunningDialog dialog; - dialog = new LocalTerminalStillRunningDialog(shell, launches); - dialog.setBlockOnOpen(true); - try { - - LocalTerminalUtilities.LAUNCH_MANAGER.addLaunchListener(dialog); - return dialog.open() == 0; - } - finally { - - LocalTerminalUtilities.LAUNCH_MANAGER.removeLaunchListener(dialog); - } - } - - /** - * Creates the dialog buttons and sets the focus on the default button. This is done because - * otherwise the focus might land on one of the stop buttons of the unterminated launches, which - * looks somewhat funny. - * - * @param parent the parent {@link Composite} - */ - protected void createButtonsForButtonBar(Composite parent) { - - super.createButtonsForButtonBar(parent); - getButton(1).forceFocus(); - } - - /** - * Creates the custom area of the dialog that shows the list of terminal launches that have not - * yet been terminated. - * - * @param parent the parent {@link Composite} into which the custom area is inserted - * @return the {@link ScrolledComposite} for the custom area - * - * @see MessageDialog#createCustomArea(Composite) - */ - protected Control createCustomArea(Composite parent) { - - ScrolledComposite scrollable = new ScrolledComposite(parent, SWT.BORDER|SWT.V_SCROLL); - GridData gridData = new GridData(GridData.FILL_BOTH); - gridData.heightHint = SCROLLABLE_HEIGHT; - scrollable.setLayoutData(gridData); - scrollable.setExpandHorizontal(true); - scrollable.setExpandVertical(true); - GridLayout gridLayout = new GridLayout(); - gridLayout.marginWidth = gridLayout.marginHeight = gridLayout.verticalSpacing = 0; - content = new Composite(scrollable, SWT.NONE); - content.setLayout(gridLayout); - content.setBackground(new Color(parent.getDisplay(), WHITE)); - scrollable.setContent(content); - for (int index = 0; index < unterminated.length; index++) { - - Composite item = createItem(content, unterminated[index]); - item.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - } - content.pack(); - scrollable.setMinHeight(content.getBounds().height); - return scrollable; - } - - /** - * Handles the {@link SelectionEvent}s that are sent when the user clicks the stop button of a - * launch. The stop button will immediately be disabled to indicate that the stop request is - * being processed. The actual launch termination will be confirmed in an asynchronous fashion - * by the {@link #launchesTerminated(ILaunch[])} method. - * - * @param event the {@link SelectionEvent} - * - * @see #launchesTerminated(ILaunch[]) - */ - public void widgetSelected(SelectionEvent event) { - - ToolItem item = (ToolItem)event.widget; - ILaunch launch = (ILaunch)item.getParent().getParent().getData(); - item.setEnabled(false); - try { - - LocalTerminalProcessRegistry.addProcessBackToFinishedLaunch(launch); - launch.terminate(); - } - catch (DebugException exception) { - - Logger.logException(exception); - } - } - - /** - * Handles default selection events by passing them to {@link #widgetSelected(SelectionEvent)}. - * - * @param event the {@link SelectionEvent} - * - * @see #widgetSelected(SelectionEvent) - * @see SelectionListener#widgetSelected(SelectionEvent) - */ - public void widgetDefaultSelected(SelectionEvent event) { - - widgetSelected(event); - } - - /** - * Removes terminated launches from the list displayed by the dialog and closes the dialog once - * all outstanding launches have been terminated. - * - * @see #launchesTerminated(ILaunch[]) - */ - public void run() { - - boolean allLaunchesTerminated = true; - Control[] child = content.getChildren(); - int numberOfChildren = child.length; - for (int number = 0; number < numberOfChildren; number++) { - - ILaunch launch = (ILaunch)child[number].getData(); - if (launch != null && launch.isTerminated()) { - - child[number].setData(null); - String exitValue; - try { - - exitValue = String.valueOf(launch.getProcesses()[0].getExitValue()); - } - catch (DebugException couldNotGetExitValue) { - - exitValue = '(' + couldNotGetExitValue.getMessage() + ')'; - } - Label label = (Label)((Composite)child[number]).getChildren()[1]; - String process = label.getText(); - process = NLS.bind(LocalTerminalMessages.terminatedProcess, process, exitValue); - label.setText(process); - - // In case the launch terminated by itself (and not because the user pressed the - // stop button) disable the stop button so that no attempt can be made to stop the - // process twice: - // - ((Composite)child[number]).getChildren()[2].setEnabled(false); - } - if (child[number].getData() != null) { - - allLaunchesTerminated = false; - } - } - if (allLaunchesTerminated) { - - setReturnCode(0); - close(); - } - } - - /** - * Removes a recently terminated launch from the list displayed by the dialog. The actual work - * needs to be done in the UI thread and is performed by the {@link #run()} method. - * - * @param terminated a list of terminated launches - * - * @see #run() - */ - public void launchesTerminated(ILaunch[] terminated) { - - Display.getDefault().syncExec(this); - } - - /** - * Not implemented. - * @see ILaunchesListener2#launchesAdded(ILaunch[]) - */ - public void launchesAdded(ILaunch[] launches) { - - // Not implemented... - } - - /** - * Not implemented. - * @see ILaunchesListener2#launchesChanged(ILaunch[]) - */ - public void launchesChanged(ILaunch[] launches) { - - // Not implemented... - } - - /** - * Not implemented. - * @see ILaunchesListener2#launchesRemoved(ILaunch[]) - */ - public void launchesRemoved(ILaunch[] launches) { - - // Not implemented... - } - - //-------------------------------------- PRIVATE SECTION -------------------------------------// - - private Composite createItem(Composite parent, ILaunch launch) { - - Composite item = new Composite(parent, SWT.NULL); - GridLayout gridLayout = new GridLayout(3, false); - item.setData(launch); - item.setLayout(gridLayout); - Image processImage = LocalTerminalLaunchUtilities.getImage(launch.getLaunchConfiguration()); - Label icon = new Label(item, SWT.NULL); - icon.setImage(processImage); - Label label = new Label(item, SWT.NULL); - label.setText(launch.getLaunchConfiguration().getName()); - ToolItem stopButton = new ToolItem(new ToolBar(item, SWT.FLAT), SWT.PUSH); - stopButton.addSelectionListener(this); - Image deleteImage = DebugUITools.getImage(IMG_LCL_TERMINATE); - stopButton.setImage(deleteImage); - GridData gridData = new GridData(GridData.FILL_HORIZONTAL); - gridData.verticalAlignment = GridData.CENTER; - gridData.grabExcessHorizontalSpace = true; - label.setLayoutData(gridData); - return item; - } -} diff --git a/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/process/LocalTerminalProcess.java b/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/process/LocalTerminalProcess.java deleted file mode 100644 index 3b4b6b1c28d..00000000000 --- a/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/process/LocalTerminalProcess.java +++ /dev/null @@ -1,191 +0,0 @@ -/*************************************************************************************************** - * Copyright (c) 2008, 2010 Mirko Raner. - * 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: - * Mirko Raner - initial implementation for Eclipse Bug 196337 - * Mirko Raner - [314607] Launching a terminal also pops up the console view - **************************************************************************************************/ - -package org.eclipse.tm.internal.terminal.local.process; - -import java.util.HashMap; -import java.util.Map; - -import org.eclipse.cdt.utils.pty.PTY; -import org.eclipse.cdt.utils.spawner.Spawner; -import org.eclipse.debug.core.ILaunch; -import org.eclipse.debug.core.model.IProcess; -import org.eclipse.debug.core.model.IStreamsProxy; -import org.eclipse.debug.core.model.RuntimeProcess; - -/** - * The class {@link LocalTerminalProcess} is a customized {@link RuntimeProcess} for use by the - * {@link org.eclipse.tm.internal.terminal.local.LocalTerminalConnector}. It serves the purpose of - * preventing the {@link org.eclipse.debug.internal.ui.DebugUIPlugin DebugUIPlugin}'s - * {@link org.eclipse.debug.internal.ui.views.console.ProcessConsoleManager ProcessConsoleManager} - * from allocating a Console view in addition to the Terminal view that serves as the program's main - * I/O device.

- * Unfortunately, the Process Console Manager determines the need for a Console view by checking the - * {@link IStreamsProxy} of the process for null. If the process has a non-null - * {@link IStreamsProxy} a console will be automatically allocated. This is problematic because - * the Local Terminal Connector requires an {@link IStreamsProxy} but obviously not an additional - * console view. It would have been better if the Process Console Manager would check the - * corresponding attributes in the launch configuration rather than checking the - * {@link IStreamsProxy} of the process. The work-around for now is to remove the underlying - * process from the launch. No console will be allocated for a launch that doesn't have a process - * associated with it. Consequently, a currently running terminal launch will appear in the Debug - * view's list of active launches but the view will not show any child elements (and the element - * cannot be expanded, either). The {@link LocalTerminalProcessRegistry} keeps track of which - * {@link LocalTerminalProcess} is associated with a particular launch. Client code that needs to - * find the process of a launch can obtain it through that registry.

- * However, for a launch to be properly terminated it needs to have at least one process that can - * be terminated. Launches that do not have any processes associated with them are not considered - * terminated and actually terminating them is not possible. To work around this secondary issue, - * the process is added back to its launch just before the launch is terminated. This activity is - * performed by {@link LocalTerminalProcessRegistry#addProcessBackToFinishedLaunch(ILaunch)}. To - * prevent a console allocation during this last step, the {@link #resetStreamsProxy()} method will - * be invoked, which will cause subsequent calls to {@link IProcess#getStreamsProxy()} to return - * null. After the launch is terminated it will appear in the Debug view with the - * terminated process as its child element. The exit value of the terminal process can also be seen - * in that view.

- * {@link #getStreamsProxy()} will also return null during initialization of a - * {@link LocalTerminalProcess} object until after the - * {@link RuntimeProcess#RuntimeProcess(ILaunch, Process, String, Map) super constructor} invocation - * has been completed. This disables a code path that caused a Console view to pop up when the - * {@link org.eclipse.debug.core.model.IStreamMonitor IStreamMonitor} already contained data (like, - * for example, a shell's initial prompt) when the ProcessConsoleManager received an - * {@link org.eclipse.debug.core.ILaunchListener#launchChanged(ILaunch)} notification (which cannot - * be avoided). See https://bugs.eclipse.org/314607 - * for additional details.

- * - * This solution for preventing standard consoles from being opened does certainly not deserve the - * cleanliness award for straightforward coding, but at least it doesn't rely on internal API at - * this point. Ideally, the whole issue should be resolved with some sort of console renderer - * extension point as proposed in bug 242373 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=242373). - * - * @author Mirko Raner - * @version $Revision: 1.2 $ - */ -public final class LocalTerminalProcess extends RuntimeProcess { - - /** - * The process type ID of processes produced by this factory. - */ - public final static String PROCESS_TYPE = "org.eclipse.tm.terminal.localProcess"; //$NON-NLS-1$ - - private boolean enableStreamsProxy; - private boolean resetStreamsProxy; - private PTY pty; - - /** - * Creates a new {@link LocalTerminalProcess}. - * - * @param launch the current {@link ILaunch} - * @param process the underlying low-level {@link Process} - * @param name the process name - * @param attributes additional attributes of the process - */ - protected LocalTerminalProcess(ILaunch launch, Process process, String name, Map attributes) { - - super(launch, process, name, setProcessType(attributes)); - enableStreamsProxy = true; - LocalTerminalProcessRegistry.registerWithLaunch(launch, this); - launch.removeProcess(this); - } - - /** - * Sends a SIGINT signal to the underlying system {@link Process}. This is roughly - * equivalent to the user pressing Ctrl-C. - * - * @return true if the interrupt signal was sent successfully; false - * if the signal was not sent successfully or if no signal was sent because the underlying - * process is not a CDT {@link Spawner} - */ - public boolean interrupt() { - - Process process = getSystemProcess(); - if (process instanceof Spawner) { - - return ((Spawner)process).interrupt() == 0; - } - return false; - } - - /** - * Returns the {@link IStreamsProxy} of the process. - * - * @return the original result of {@link RuntimeProcess#getStreamsProxy()}, or null - * after {@link #resetStreamsProxy()} has been called. - */ - public IStreamsProxy getStreamsProxy() { - - if (resetStreamsProxy || !enableStreamsProxy) { - - return null; - } - return super.getStreamsProxy(); - } - - /** - * Resets the {@link IStreamsProxy} of this process. After calling this method, - * {@link #getStreamsProxy()} will always return null. - */ - protected void resetStreamsProxy() { - - resetStreamsProxy = true; - } - - /** - * Sets the pseudo-terminal associated with this process. - * - * @param pty the {@link PTY} - */ - public void setPTY(PTY pty) { - - this.pty = pty; - } - - /** - * Gets the pseudo-terminal associated with this process. - * - * @return the {@link PTY} - */ - public PTY getPTY() { - - return pty; - } - - /** - * Re-attaches the process to its launch and completes termination of the process. This ensures - * that the launch can properly terminate. - * - * @see RuntimeProcess#terminated() - */ - protected void terminated() { - - LocalTerminalProcessRegistry.addProcessBackToFinishedLaunch(getLaunch()); - super.terminated(); - } - - //------------------------------------- PRIVATE SECTION --------------------------------------// - - private static Map setProcessType(Map attributes) { - - // The process type used to be set by the LocalTerminalProcessFactory. However, if some - // client code managed to instantiate a LocalTerminalProcess directly (instead of going - // through the factory) this would result in IProcess objects with an incorrect process type - // attribute. A better solution is to set the process type attribute at the time when the - // LocalTerminalProcess object is actually created: - // - if (attributes == null) { - - attributes = new HashMap(1); - } - attributes.put(IProcess.ATTR_PROCESS_TYPE, PROCESS_TYPE); - return attributes; - } -} diff --git a/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/process/LocalTerminalProcessFactory.java b/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/process/LocalTerminalProcessFactory.java deleted file mode 100644 index 7932a779ac2..00000000000 --- a/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/process/LocalTerminalProcessFactory.java +++ /dev/null @@ -1,41 +0,0 @@ -/*************************************************************************************************** - * Copyright (c) 2008 Mirko Raner. - * 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: - * Mirko Raner - initial implementation for Eclipse Bug 196337 - **************************************************************************************************/ - -package org.eclipse.tm.internal.terminal.local.process; - -import java.util.Map; - -import org.eclipse.debug.core.ILaunch; -import org.eclipse.debug.core.IProcessFactory; -import org.eclipse.debug.core.model.IProcess; - -/** - * The class {@link LocalTerminalProcessFactory} is an {@link IProcessFactory} that produces - * {@link LocalTerminalProcess} objects. - * - * @author Mirko Raner - * @version $Revision: 1.2 $ - */ -public class LocalTerminalProcessFactory implements IProcessFactory { - - /** - * The ID of this factory (as used in plugin.xml). - */ - public final static String ID = "org.eclipse.tm.terminal.localProcess.factory"; //$NON-NLS-1$ - - /** - * @see IProcessFactory#newProcess(ILaunch, Process, String, Map) - */ - public IProcess newProcess(ILaunch launch, Process process, String label, Map attributes) { - - return new LocalTerminalProcess(launch, process, label, attributes); - } -} diff --git a/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/process/LocalTerminalProcessRegistry.java b/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/process/LocalTerminalProcessRegistry.java deleted file mode 100644 index 7f30d43aef1..00000000000 --- a/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/process/LocalTerminalProcessRegistry.java +++ /dev/null @@ -1,159 +0,0 @@ -/*************************************************************************************************** - * Copyright (c) 2008 Mirko Raner. - * 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: - * Mirko Raner - initial implementation for Eclipse Bug 196337 - **************************************************************************************************/ - -package org.eclipse.tm.internal.terminal.local.process; - -import java.util.IdentityHashMap; -import java.util.Map; - -import org.eclipse.debug.core.ILaunch; -import org.eclipse.debug.core.ILaunchesListener2; -import org.eclipse.tm.internal.terminal.local.LocalTerminalUtilities; - -/** - * The {@link LocalTerminalProcessRegistry} keeps a map between {@link ILaunch} objects and the - * {@link LocalTerminalProcess} objects that were associated with them. To prevent standard consoles - * from being opened, a {@link LocalTerminalProcess} is immediately removed from its {@link ILaunch} - * when the process is created (see {@link LocalTerminalProcess} for details). - * {@link LocalTerminalProcessRegistry} is a singleton (without lazy initialization). - * - * @author mirko - * @version $Revision: 1.1 $ - */ -public class LocalTerminalProcessRegistry implements ILaunchesListener2 { - - private final static LocalTerminalProcessRegistry INSTANCE = new LocalTerminalProcessRegistry(); - - private Map processes; - - private LocalTerminalProcessRegistry() { - - // The ILaunch interface does not make any statements about the suitability of implementing - // objects as hash keys. There might be ILaunch implementations that return a different - // hash code value if the object changes internally. To be safe in those cases, an - // IdentityHashMap is used: - // - processes = new IdentityHashMap(); - } - - /** - * Gets the {@link LocalTerminalProcess} that was originally associated with a given - * {@link ILaunch} object. - * - * @param launch the {@link ILaunch} that was used for creating the process - * @return the corresponding {@link LocalTerminalProcess}, or null if no process - * could be found - */ - public static LocalTerminalProcess getFromLaunch(ILaunch launch) { - - return (LocalTerminalProcess)INSTANCE.processes.get(launch); - } - - /** - * Adds a {@link LocalTerminalProcess} object back to its original {@link ILaunch}. This method - * will also perform a {@link LocalTerminalProcess#resetStreamsProxy()} on the process. - * The {@link #addProcessBackToFinishedLaunch(ILaunch)} method is necessary for properly - * terminating the launch of a terminal application (see {@link LocalTerminalProcess} for - * details). - * - * @param launch the {@link ILaunch} whose original process is to be re-attached - */ - public static void addProcessBackToFinishedLaunch(ILaunch launch) { - - LocalTerminalProcess process = getFromLaunch(launch); - if (process == null) { - - // Maybe the process wasn't actually started in a terminal (can happen when a Terminal - // is launched from the External Tools menu): - // - return; - } - process.resetStreamsProxy(); - if (launch.getProcesses().length == 0) { - - launch.addProcess(process); - } - } - - /** - * Registers a {@link LocalTerminalProcess} with a given {@link ILaunch} so that the process can - * be safely removed from the launch. - * - * @param launch the {@link ILaunch} - * @param process the {@link LocalTerminalProcess} originally associated with that launch - */ - public static void registerWithLaunch(ILaunch launch, LocalTerminalProcess process) { - - synchronized (INSTANCE) { - - if (INSTANCE.processes.isEmpty()) { - - // Start listening to terminated launches as soon as the first launch/process pair - // is registered: - // - LocalTerminalUtilities.LAUNCH_MANAGER.addLaunchListener(INSTANCE); - } - INSTANCE.processes.put(launch, process); - } - } - - /** - * Handles the termination of launches. The {@link LocalTerminalProcessRegistry} acts as a - * {@link ILaunchesListener2} if there are monitored launches outstanding. It will automatically - * de-register itself (as a listener) when the last monitored launch was terminated. - * - * @param terminated the launches that were terminated - */ - public void launchesTerminated(ILaunch[] terminated) { - - synchronized (INSTANCE) { - - int numberOfTerminatedLaunches = terminated.length; - for (int launch = 0; launch < numberOfTerminatedLaunches; launch++) { - - INSTANCE.processes.remove(terminated[launch]); - } - if (INSTANCE.processes.isEmpty()) { - - // If there are no more outstanding launches the listener can be removed again: - // - LocalTerminalUtilities.LAUNCH_MANAGER.removeLaunchListener(INSTANCE); - } - } - } - - /** - * Not implemented. - * @see ILaunchesListener2#launchesAdded(ILaunch[]) - */ - public void launchesAdded(ILaunch[] launches) { - - // Not implemented. - } - - /** - * Not implemented. - * @see ILaunchesListener2#launchesRemoved(ILaunch[]) - */ - public void launchesRemoved(ILaunch[] launches) { - - // Not implemented. - } - - /** - * Not implemented. - * @see ILaunchesListener2#launchesChanged(ILaunch[]) - */ - public void launchesChanged(ILaunch[] launches) { - - // Not implemented. - } -} diff --git a/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/ui/DependentHeightComposite.java b/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/ui/DependentHeightComposite.java deleted file mode 100644 index 7cdaa3e05cf..00000000000 --- a/deprecated/plugins/org.eclipse.tm.terminal.local/src/org/eclipse/tm/internal/terminal/local/ui/DependentHeightComposite.java +++ /dev/null @@ -1,88 +0,0 @@ -/*************************************************************************************************** - * Copyright (c) 2008 Mirko Raner. - * 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: - * Mirko Raner - initial implementation for Eclipse Bug 196337 - **************************************************************************************************/ - -package org.eclipse.tm.internal.terminal.local.ui; - -import org.eclipse.swt.events.ControlEvent; -import org.eclipse.swt.events.ControlListener; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.widgets.Composite; - -/** - * The class {@link DependentHeightComposite} is a special kind of SWT {@link Composite} whose - * height depends on the height of some master {@link Composite} that does not have to be a direct - * parent or child of it. This class was introduced as a work-around for UI resizing problems with - * the Terminal API's PageBook class (which uses a StackLayout). - * - * @author Mirko Raner - * @version $Revision: 1.1 $ - */ -public class DependentHeightComposite extends Composite implements ControlListener { - - private Composite master; - private int preferredHeight = -1; - private int extraHeight; - - /** - * Creates a new {@link DependentHeightComposite}. - * - * @param parent the parent {@link Composite} - * @param style the SWT style - * @param master the master {@link Composite} that determines the height - * @param extra the additional height in pixels (may be negative, to create a smaller height - * than the master {@link Composite}) - */ - public DependentHeightComposite(Composite parent, int style, Composite master, int extra) { - - super(parent, style); - this.master = master; - this.extraHeight = extra; - master.addControlListener(this); - } - - /** - * This method does nothing. - * - * @see ControlListener#controlMoved(ControlEvent) - */ - public void controlMoved(ControlEvent event) { - - // Does nothing... - } - - /** - * Adjusts the {@link DependentHeightComposite} height if the master {@link Composite}'s size - * changed. - * - * @param event the {@link ControlEvent} - */ - public void controlResized(ControlEvent event) { - - setSize(getSize().x, master.getClientArea().height+extraHeight); - preferredHeight = master.getClientArea().height+extraHeight; - master.layout(); - } - - /** - * Computes the preferred size of this {@link DependentHeightComposite}. - * - * @see Composite#computeSize(int, int, boolean) - */ - public Point computeSize(int widthHint, int heightHint, boolean changed) { - - Point size = super.computeSize(widthHint, heightHint, changed); - if (preferredHeight != -1) { - - size.y = preferredHeight; - } - return size; - } -} diff --git a/deprecated/plugins/org.eclipse.tm.terminal.local/tm32.png b/deprecated/plugins/org.eclipse.tm.terminal.local/tm32.png deleted file mode 100644 index 3077b1220dd688632a42e347f90c90cb319835f0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2275 zcmV<92pso`P)Px#32;bRa{vGf6951U69E94oEQKA00(qQO+^RU1q%}g3C{W4d;kClbxA})R9M5U zmtBlqRTam7``mNyow+m9DJ}i5)G6{^3K#>^Vu&CQ#25t%2}(?iH8BDb9!z*JrVsFh z@e3LvhL{Kv6&e(ZZ)if17NZ?PrfJJZm6}reF`b#tow*<9p1t>4%ZGFBbV`tz;J(?} z=bU@*`LFd~|FzcM4#3Q6z#z~l*8!jkB!B_|=m8nf1v2NH=VQkB=5YtO@*N3KF-ROF zR(zp=q-K_upd-L=IU7KIi2->D+y*M8(dwLw{{q61)R6vooD^;e)x0^M!1A=!8p;O?QUo+WFjz`#zY=vf#Y$%xB%% zJ;odRgoJJe&JtltX`T zEF?+dmT&vkw(+f7w|;Hy+O<~zOixcAyzTbe9!Ob?5%rS()xhPzC1$oPbo@~4g~4Dj zB?%`x#%v}SkT^#_;LbU4Wpr_4E~$TC{bk>|?9!oUckFoZhSjTAZ(6FAX0v$)sHGoL zYOU17a^NE897!d?YALOXkP}L@5(h)Ae{Yy6h69Rga3co}&V2XLM_=f!TGf4g-MV#a z@4ox)yS(?^?c2Bi*3?2$yb&#@2YR9F8=>Qgc_4_ADTJWJpol0UhKLn^R72DX15^tm zObbQ;=U~^a*BVbfwRcOq-EITy+`04D?;ksM+MtsHvCQ)vm~Wq27z>%dsya|b(hA*Z z%+L4e<$*kp^m;;`3o#1b3nGfCp(Qw`B^w49uB-;C_02cm{H3c7A3prrFP?bfRWqA2 zvxT(pHPFpwJB`+f=2t7#3VALxNeDsdWuXvS*OT=;Suc?F0(ohGl;Em@s(=-QI%hbH z#5o>(@Ec6e%s1}8|AF77sm)?G2ekSIWI+4OzfON$RU0bGR4dX0M3i1Hl65_;R!+N} z)9vK+a>4sR6eUJQC1M&elf^Lf^>XX2H?U>PCboV1VX|!5*5Tpq4-A`k&~av#KJw#V zhBd3s!?_}^l%>U)VdvDj;x0{7PEF16_PZ@{?=jOC-FJp0^>EHvAQ2qHqOHS~pn zf&6J86s6US8A&*tSE-7SM8!owq*x=EfT|!t`AoN<*9SqwBhe!gPzwwV4KX@8LbX<< zu0ms|!N!dj@Zt*-s3;NzGrb=86`*OK+H|1C;PN_1Bt}7_fEN%UjfGKZ6bMSCUI7cl z*h4~(7;{uSCIuU^1suzqtP8BB4bDHW}f21TQy zLD3kIP^2AEa6V%78jvl5OY9-yiQ)-i1=FWz2|g#ORA{$5?B0E-02k?t)11R5_DvK9 zNE9l|ps~CHk|4p5Xt)TKsH8!mWW{?y>WYdGVy~pXm=|tX#Z5O}&5p-+vVPq#BO`SV z95_aEu8oRfl!Z!_iG34BzrBVKaaBl1D_Art(I6Tc4T%m36)aY8(WnO_srLvW5Pjjf zYGBjG_0;MKKmFP7$$J?GXPc-hq7hRm%X2@y&gNBm-R5x@V?aeoD~_b%u$o~8Dv*eh z27~C(2q6HqoY*ZjAb~AgE+hJ!S6-PQ?`6agFf&91Q$8&PR-*Ff}mVXurq3_k5WrpZpVZb4|R@i6Nk>MPE<>XNxhnb9$cb zS~S3nszjmYd(_+#n0}8h_J3t(EAHE|%NyCd?Ec9~g7?G_5GhjZ9I;UrFsEhzHq30- z)YP7%XG7o^@WC@QJjCeeC}xKD#fGlBdiET2|hKocmGlYQs>;TL}6xnhPg9mFgr_m;vBf5BMuG@@bW)i<}Z~=YAb7~ zT2Wfd_N&<9UH}ZN54x!QSEr_4fB3_yN-=AM5LmNj4Qtn~#mwk*Isgn04bzHk{ylw+ zS6+UN=bm|vOTTwLkfRtPvGf`Y0W;JThZP??D>?_;K1$XpiK~U+IXyj1mSq?ad_YXt zqx(5He}tL#JoQ8KI0xS6{VmRiC@-ikB;0300e$GBJU<%(gBXQov$^Q`d~2R(_P>Cx zti$>NFo+TXhlt=@ike|oHWz1Q=JZzu>}lYksj1hGeq3UwII<8u8^*@iFt&jtar|)S zBOKlJHXCoe27hH0r;hViuI8j3r7<`}({e_J2K{|^-SoG~ci&_0=vP=1jFsVksT6ne96s zxS3BlQZrpR@4Qie^3P3q7gA}LOLR}O4_8I@@@gLG4Gxh^{y7T}5002ovPDHLkV1l5)GaLW_