From 018403c3cc4ee08aa62fc3d930b2e6cb3b8f5893 Mon Sep 17 00:00:00 2001 From: Greg Watson Date: Wed, 6 May 2015 14:28:34 -0400 Subject: [PATCH] Remote terminal has been replaced by the new tm.terminals. Use this instead. Change-Id: I8844f64671872a76b91b9c244516e80db5281566 Signed-off-by: Greg Watson --- .../org.eclipse.remote.terminal/.classpath | 7 - .../org.eclipse.remote.terminal/.cvsignore | 1 - .../org.eclipse.remote.terminal/.gitignore | 1 - bundles/org.eclipse.remote.terminal/.project | 34 - .../.settings/org.eclipse.jdt.core.prefs | 74 -- .../.settings/org.eclipse.jdt.ui.prefs | 3 - .../HelpContexts.xml | 26 - .../META-INF/MANIFEST.MF | 24 - .../TerminalContexts.xml | 19 - .../org.eclipse.remote.terminal/about.html | 29 - bundles/org.eclipse.remote.terminal/about.ini | 27 - .../about.mappings | 6 - .../about.properties | 25 - .../build.properties | 33 - .../org.eclipse.remote.terminal/doc/book.css | 1 - .../doc/html/01_terminalview.html | 46 -- .../doc/html/02_terminal_page.html | 82 -- .../doc/html/03_terminal_settings.html | 101 --- .../doc/html/04_terminal_emulation.html | 64 -- .../doc/html/notice.html | 30 - .../icons/clcl16/command_input_field.gif | Bin 385 -> 0 bytes .../icons/clcl16/connect_co.gif | Bin 139 -> 0 bytes .../icons/clcl16/disconnect_co.gif | Bin 146 -> 0 bytes .../icons/clcl16/lock_co.gif | Bin 626 -> 0 bytes .../icons/clcl16/newterminal.gif | Bin 351 -> 0 bytes .../icons/clcl16/properties_tsk.gif | Bin 118 -> 0 bytes .../icons/cview16/terminal_view.gif | Bin 938 -> 0 bytes .../icons/dlcl16/command_input_field.gif | Bin 239 -> 0 bytes .../icons/dlcl16/connect_co.gif | Bin 874 -> 0 bytes .../icons/dlcl16/disconnect_co.gif | Bin 90 -> 0 bytes .../icons/dlcl16/lock_co.gif | Bin 588 -> 0 bytes .../icons/dlcl16/newterminal.gif | Bin 351 -> 0 bytes .../icons/dlcl16/properties_tsk.gif | Bin 90 -> 0 bytes .../icons/dlcl16/rem_co.gif | Bin 159 -> 0 bytes .../icons/elcl16/command_input_field.gif | Bin 239 -> 0 bytes .../icons/elcl16/connect_co.gif | Bin 890 -> 0 bytes .../icons/elcl16/disconnect_co.gif | Bin 118 -> 0 bytes .../icons/elcl16/lock_co.gif | Bin 626 -> 0 bytes .../icons/elcl16/newterminal.gif | Bin 351 -> 0 bytes .../icons/elcl16/properties_tsk.gif | Bin 118 -> 0 bytes .../icons/elcl16/rem_co.gif | Bin 163 -> 0 bytes .../icons/eview16/terminal_view.gif | Bin 938 -> 0 bytes .../plugin.properties | 13 - .../org.eclipse.remote.terminal/plugin.xml | 63 -- bundles/org.eclipse.remote.terminal/pom.xml | 16 - .../schema/parsers.exsd | 109 --- .../terminal/actions/ActionMessages.java | 43 - .../actions/ActionMessages.properties | 33 - .../actions/ShowTerminalConnectionAction.java | 83 -- .../terminal/actions/TerminalAction.java | 75 -- .../actions/TerminalActionConnect.java | 39 - .../actions/TerminalActionDisconnect.java | 42 - .../actions/TerminalActionNewTerminal.java | 83 -- .../actions/TerminalActionRemove.java | 40 - .../actions/TerminalActionScrollLock.java | 41 - .../TerminalActionSelectionDropDown.java | 106 --- .../actions/TerminalActionSettings.java | 39 - ...TerminalActionToggleCommandInputField.java | 36 - .../terminal/connector/ArgumentParser.java | 367 --------- .../connector/RemoteConnectionManager.java | 183 ----- .../terminal/connector/RemoteConnector.java | 180 ----- .../internal/terminal/messages/Messages.java | 29 - .../terminal/messages/messages.properties | 13 - .../RemoteTerminalPreferenceInitializer.java | 26 - .../RemoteTerminalPreferencePage.java | 39 - .../terminal/settings/RemoteSettings.java | 61 -- .../terminal/settings/RemoteSettingsPage.java | 78 -- .../internal/terminal/view/ITerminalView.java | 55 -- .../view/ITerminalViewConnection.java | 88 -- .../view/ITerminalViewConnectionManager.java | 83 -- .../internal/terminal/view/ImageConsts.java | 52 -- .../internal/terminal/view/PageBook.java | 34 - .../view/SettingStorePrefixDecorator.java | 35 - .../internal/terminal/view/SettingsStore.java | 124 --- .../terminal/view/TerminalSettingsDialog.java | 528 ------------ .../internal/terminal/view/TerminalView.java | 754 ------------------ .../terminal/view/TerminalViewConnection.java | 237 ------ .../view/TerminalViewConnectionManager.java | 195 ----- .../view/TerminalViewControlDecorator.java | 172 ---- .../terminal/view/TerminalViewPlugin.java | 178 ----- .../internal/terminal/view/ViewMessages.java | 51 -- .../terminal/view/ViewMessages.properties | 42 - .../remote/terminal/IRemoteSettings.java | 27 - .../terminal/IRemoteTerminalConstants.java | 12 - .../terminal/IRemoteTerminalParser.java | 37 - bundles/org.eclipse.remote.terminal/tm32.png | Bin 2275 -> 0 bytes bundles/org.eclipse.remote.terminal/toc.xml | 21 - .../.project | 17 - .../build.properties | 13 - .../feature.properties | 22 - .../feature.xml | 35 - .../pom.xml | 47 -- releng/org.eclipse.remote.build/pom.xml | 3 - releng/org.eclipse.remote.repo/category.xml | 6 - 94 files changed, 5338 deletions(-) delete mode 100644 bundles/org.eclipse.remote.terminal/.classpath delete mode 100644 bundles/org.eclipse.remote.terminal/.cvsignore delete mode 100644 bundles/org.eclipse.remote.terminal/.gitignore delete mode 100644 bundles/org.eclipse.remote.terminal/.project delete mode 100644 bundles/org.eclipse.remote.terminal/.settings/org.eclipse.jdt.core.prefs delete mode 100644 bundles/org.eclipse.remote.terminal/.settings/org.eclipse.jdt.ui.prefs delete mode 100644 bundles/org.eclipse.remote.terminal/HelpContexts.xml delete mode 100644 bundles/org.eclipse.remote.terminal/META-INF/MANIFEST.MF delete mode 100644 bundles/org.eclipse.remote.terminal/TerminalContexts.xml delete mode 100644 bundles/org.eclipse.remote.terminal/about.html delete mode 100644 bundles/org.eclipse.remote.terminal/about.ini delete mode 100644 bundles/org.eclipse.remote.terminal/about.mappings delete mode 100644 bundles/org.eclipse.remote.terminal/about.properties delete mode 100644 bundles/org.eclipse.remote.terminal/build.properties delete mode 100644 bundles/org.eclipse.remote.terminal/doc/book.css delete mode 100644 bundles/org.eclipse.remote.terminal/doc/html/01_terminalview.html delete mode 100644 bundles/org.eclipse.remote.terminal/doc/html/02_terminal_page.html delete mode 100644 bundles/org.eclipse.remote.terminal/doc/html/03_terminal_settings.html delete mode 100644 bundles/org.eclipse.remote.terminal/doc/html/04_terminal_emulation.html delete mode 100644 bundles/org.eclipse.remote.terminal/doc/html/notice.html delete mode 100644 bundles/org.eclipse.remote.terminal/icons/clcl16/command_input_field.gif delete mode 100644 bundles/org.eclipse.remote.terminal/icons/clcl16/connect_co.gif delete mode 100644 bundles/org.eclipse.remote.terminal/icons/clcl16/disconnect_co.gif delete mode 100644 bundles/org.eclipse.remote.terminal/icons/clcl16/lock_co.gif delete mode 100644 bundles/org.eclipse.remote.terminal/icons/clcl16/newterminal.gif delete mode 100644 bundles/org.eclipse.remote.terminal/icons/clcl16/properties_tsk.gif delete mode 100644 bundles/org.eclipse.remote.terminal/icons/cview16/terminal_view.gif delete mode 100644 bundles/org.eclipse.remote.terminal/icons/dlcl16/command_input_field.gif delete mode 100644 bundles/org.eclipse.remote.terminal/icons/dlcl16/connect_co.gif delete mode 100644 bundles/org.eclipse.remote.terminal/icons/dlcl16/disconnect_co.gif delete mode 100644 bundles/org.eclipse.remote.terminal/icons/dlcl16/lock_co.gif delete mode 100644 bundles/org.eclipse.remote.terminal/icons/dlcl16/newterminal.gif delete mode 100644 bundles/org.eclipse.remote.terminal/icons/dlcl16/properties_tsk.gif delete mode 100644 bundles/org.eclipse.remote.terminal/icons/dlcl16/rem_co.gif delete mode 100644 bundles/org.eclipse.remote.terminal/icons/elcl16/command_input_field.gif delete mode 100644 bundles/org.eclipse.remote.terminal/icons/elcl16/connect_co.gif delete mode 100644 bundles/org.eclipse.remote.terminal/icons/elcl16/disconnect_co.gif delete mode 100644 bundles/org.eclipse.remote.terminal/icons/elcl16/lock_co.gif delete mode 100644 bundles/org.eclipse.remote.terminal/icons/elcl16/newterminal.gif delete mode 100644 bundles/org.eclipse.remote.terminal/icons/elcl16/properties_tsk.gif delete mode 100644 bundles/org.eclipse.remote.terminal/icons/elcl16/rem_co.gif delete mode 100644 bundles/org.eclipse.remote.terminal/icons/eview16/terminal_view.gif delete mode 100644 bundles/org.eclipse.remote.terminal/plugin.properties delete mode 100644 bundles/org.eclipse.remote.terminal/plugin.xml delete mode 100644 bundles/org.eclipse.remote.terminal/pom.xml delete mode 100644 bundles/org.eclipse.remote.terminal/schema/parsers.exsd delete mode 100644 bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/ActionMessages.java delete mode 100644 bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/ActionMessages.properties delete mode 100644 bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/ShowTerminalConnectionAction.java delete mode 100644 bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/TerminalAction.java delete mode 100644 bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/TerminalActionConnect.java delete mode 100644 bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/TerminalActionDisconnect.java delete mode 100644 bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/TerminalActionNewTerminal.java delete mode 100644 bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/TerminalActionRemove.java delete mode 100644 bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/TerminalActionScrollLock.java delete mode 100644 bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/TerminalActionSelectionDropDown.java delete mode 100644 bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/TerminalActionSettings.java delete mode 100644 bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/TerminalActionToggleCommandInputField.java delete mode 100644 bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/connector/ArgumentParser.java delete mode 100644 bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/connector/RemoteConnectionManager.java delete mode 100644 bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/connector/RemoteConnector.java delete mode 100644 bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/messages/Messages.java delete mode 100644 bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/messages/messages.properties delete mode 100644 bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/preferences/RemoteTerminalPreferenceInitializer.java delete mode 100644 bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/preferences/RemoteTerminalPreferencePage.java delete mode 100644 bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/settings/RemoteSettings.java delete mode 100644 bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/settings/RemoteSettingsPage.java delete mode 100644 bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/ITerminalView.java delete mode 100644 bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/ITerminalViewConnection.java delete mode 100644 bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/ITerminalViewConnectionManager.java delete mode 100644 bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/ImageConsts.java delete mode 100644 bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/PageBook.java delete mode 100644 bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/SettingStorePrefixDecorator.java delete mode 100644 bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/SettingsStore.java delete mode 100644 bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/TerminalSettingsDialog.java delete mode 100644 bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/TerminalView.java delete mode 100644 bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/TerminalViewConnection.java delete mode 100644 bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/TerminalViewConnectionManager.java delete mode 100644 bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/TerminalViewControlDecorator.java delete mode 100644 bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/TerminalViewPlugin.java delete mode 100644 bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/ViewMessages.java delete mode 100644 bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/ViewMessages.properties delete mode 100644 bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/terminal/IRemoteSettings.java delete mode 100644 bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/terminal/IRemoteTerminalConstants.java delete mode 100644 bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/terminal/IRemoteTerminalParser.java delete mode 100644 bundles/org.eclipse.remote.terminal/tm32.png delete mode 100644 bundles/org.eclipse.remote.terminal/toc.xml delete mode 100644 features/org.eclipse.remote.terminal-feature/.project delete mode 100644 features/org.eclipse.remote.terminal-feature/build.properties delete mode 100644 features/org.eclipse.remote.terminal-feature/feature.properties delete mode 100644 features/org.eclipse.remote.terminal-feature/feature.xml delete mode 100644 features/org.eclipse.remote.terminal-feature/pom.xml diff --git a/bundles/org.eclipse.remote.terminal/.classpath b/bundles/org.eclipse.remote.terminal/.classpath deleted file mode 100644 index 098194ca4b7..00000000000 --- a/bundles/org.eclipse.remote.terminal/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/bundles/org.eclipse.remote.terminal/.cvsignore b/bundles/org.eclipse.remote.terminal/.cvsignore deleted file mode 100644 index ba077a4031a..00000000000 --- a/bundles/org.eclipse.remote.terminal/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -bin diff --git a/bundles/org.eclipse.remote.terminal/.gitignore b/bundles/org.eclipse.remote.terminal/.gitignore deleted file mode 100644 index 5e56e040ec0..00000000000 --- a/bundles/org.eclipse.remote.terminal/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/bin diff --git a/bundles/org.eclipse.remote.terminal/.project b/bundles/org.eclipse.remote.terminal/.project deleted file mode 100644 index f92bb2830c6..00000000000 --- a/bundles/org.eclipse.remote.terminal/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - org.eclipse.remote.terminal - - - - - - 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/bundles/org.eclipse.remote.terminal/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.remote.terminal/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index a4b6f7df50e..00000000000 --- a/bundles/org.eclipse.remote.terminal/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,74 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.7 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.doc.comment.support=enabled -org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.autoboxing=warning -org.eclipse.jdt.core.compiler.problem.deprecation=warning -org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled -org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled -org.eclipse.jdt.core.compiler.problem.discouragedReference=warning -org.eclipse.jdt.core.compiler.problem.emptyStatement=warning -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning -org.eclipse.jdt.core.compiler.problem.fieldHiding=warning -org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning -org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning -org.eclipse.jdt.core.compiler.problem.forbiddenReference=error -org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning -org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning -org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning -org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning -org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning -org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected -org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore -org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error -org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore -org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore -org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled -org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public -org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore -org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled -org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public -org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore -org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning -org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning -org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning -org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning -org.eclipse.jdt.core.compiler.problem.nullReference=warning -org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error -org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore -org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning -org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning -org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled -org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning -org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled -org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore -org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning -org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning -org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore -org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning -org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore -org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning -org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled -org.eclipse.jdt.core.compiler.problem.unusedImport=warning -org.eclipse.jdt.core.compiler.problem.unusedLabel=warning -org.eclipse.jdt.core.compiler.problem.unusedLocal=warning -org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled -org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning -org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning -org.eclipse.jdt.core.compiler.source=1.7 diff --git a/bundles/org.eclipse.remote.terminal/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.remote.terminal/.settings/org.eclipse.jdt.ui.prefs deleted file mode 100644 index 9a20fca52a4..00000000000 --- a/bundles/org.eclipse.remote.terminal/.settings/org.eclipse.jdt.ui.prefs +++ /dev/null @@ -1,3 +0,0 @@ -#Mon Jul 31 14:55:17 CEST 2006 -eclipse.preferences.version=1 -internal.default.compliance=user diff --git a/bundles/org.eclipse.remote.terminal/HelpContexts.xml b/bundles/org.eclipse.remote.terminal/HelpContexts.xml deleted file mode 100644 index 5ba920568af..00000000000 --- a/bundles/org.eclipse.remote.terminal/HelpContexts.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - The Terminal View supports direct connections to remote systems via serial or network connections. - - - - - - The Terminal Settings Dialog provides the controls for making terminal connections. - - - - - \ No newline at end of file diff --git a/bundles/org.eclipse.remote.terminal/META-INF/MANIFEST.MF b/bundles/org.eclipse.remote.terminal/META-INF/MANIFEST.MF deleted file mode 100644 index 8a584d9a4a2..00000000000 --- a/bundles/org.eclipse.remote.terminal/META-INF/MANIFEST.MF +++ /dev/null @@ -1,24 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %pluginName -Bundle-SymbolicName: org.eclipse.remote.terminal;singleton:=true -Bundle-Version: 1.0.0.qualifier -Bundle-Activator: org.eclipse.remote.internal.terminal.view.TerminalViewPlugin -Bundle-Localization: plugin -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime, - org.eclipse.tm.terminal, - org.eclipse.remote.core, - org.eclipse.remote.ui, - org.eclipse.ui.forms -Bundle-ActivationPolicy: lazy -Eclipse-LazyStart: true -Bundle-RequiredExecutionEnvironment: JavaSE-1.7 -Bundle-Vendor: %providerName -Export-Package: org.eclipse.remote.internal.terminal.actions;x-internal:=true, - org.eclipse.remote.internal.terminal.connector;x-internal:=true, - org.eclipse.remote.internal.terminal.messages;x-internal:=true, - org.eclipse.remote.internal.terminal.preferences;x-internal:=true, - org.eclipse.remote.internal.terminal.settings;x-internal:=true, - org.eclipse.remote.internal.terminal.view;x-internal:=true, - org.eclipse.remote.terminal diff --git a/bundles/org.eclipse.remote.terminal/TerminalContexts.xml b/bundles/org.eclipse.remote.terminal/TerminalContexts.xml deleted file mode 100644 index 387756f5c68..00000000000 --- a/bundles/org.eclipse.remote.terminal/TerminalContexts.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/bundles/org.eclipse.remote.terminal/about.html b/bundles/org.eclipse.remote.terminal/about.html deleted file mode 100644 index a603d19ab21..00000000000 --- a/bundles/org.eclipse.remote.terminal/about.html +++ /dev/null @@ -1,29 +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.

- - - - \ No newline at end of file diff --git a/bundles/org.eclipse.remote.terminal/about.ini b/bundles/org.eclipse.remote.terminal/about.ini deleted file mode 100644 index 3adc27ab587..00000000000 --- a/bundles/org.eclipse.remote.terminal/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/bundles/org.eclipse.remote.terminal/about.mappings b/bundles/org.eclipse.remote.terminal/about.mappings deleted file mode 100644 index bddaab43109..00000000000 --- a/bundles/org.eclipse.remote.terminal/about.mappings +++ /dev/null @@ -1,6 +0,0 @@ -# about.mappings -# contains fill-ins for about.properties -# java.io.Properties file (ISO 8859-1 with "\" escapes) -# This file does not need to be translated. - -0=@build@ \ No newline at end of file diff --git a/bundles/org.eclipse.remote.terminal/about.properties b/bundles/org.eclipse.remote.terminal/about.properties deleted file mode 100644 index 10075af5412..00000000000 --- a/bundles/org.eclipse.remote.terminal/about.properties +++ /dev/null @@ -1,25 +0,0 @@ -################################################################################ -# Copyright (c) 2006, 2015 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 -################################################################################ -# about.properties -# contains externalized strings for about.ini -# java.io.Properties file (ISO 8859-1 with "\" escapes) -# fill-ins are supplied by about.mappings -# This file should be translated. -# -# Do not translate any values surrounded by {} - -blurb=Target Management Terminal View (Deprecated)\n\ -\n\ -Version: {featureVersion}\n\ -Build id: {0}\n\ -\n\ -(c) Copyright Wind River Systems, Inc. and others 2003, 2014. All rights reserved.\n\ -Visit http://www.eclipse.org/tm diff --git a/bundles/org.eclipse.remote.terminal/build.properties b/bundles/org.eclipse.remote.terminal/build.properties deleted file mode 100644 index 51984c14501..00000000000 --- a/bundles/org.eclipse.remote.terminal/build.properties +++ /dev/null @@ -1,33 +0,0 @@ -################################################################################ -# Copyright (c) 2003, 2015 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 -# -# Initial Contributors: -# The following Wind River employees contributed to the Terminal component -# that contains this file: Chris Thew, Fran Litterio, Stephen Lamb, -# Helmut Haigermoser and Ted Williams. -# -# Contributors: -# Michael Scharf (Wind River) - split into core, view and connector plugins -# Martin Oberhuber (Wind River) - fixed copyright headers and beautified -################################################################################ -source.. = src/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - plugin.xml,\ - icons/,\ - plugin.properties,\ - about.html,\ - about.ini,\ - about.mappings,\ - about.properties,\ - tm32.png,\ - HelpContexts.xml,\ - doc/,\ - toc.xml,\ - TerminalContexts.xml -src.includes = about.html diff --git a/bundles/org.eclipse.remote.terminal/doc/book.css b/bundles/org.eclipse.remote.terminal/doc/book.css deleted file mode 100644 index faa4199fe34..00000000000 --- a/bundles/org.eclipse.remote.terminal/doc/book.css +++ /dev/null @@ -1 +0,0 @@ -@import "../../PRODUCT_PLUGIN/book.css"; diff --git a/bundles/org.eclipse.remote.terminal/doc/html/01_terminalview.html b/bundles/org.eclipse.remote.terminal/doc/html/01_terminalview.html deleted file mode 100644 index c423cbf8be5..00000000000 --- a/bundles/org.eclipse.remote.terminal/doc/html/01_terminalview.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - -Terminal View - - - - -

Terminal View

-
-

-The Terminal view provides a raw serial or network connection to your target board. -This view is useful for monitoring output on a target's serial port or making a telnet -connection to a device. -

-The Terminal view is activated by choosing Window > Show View > Other > Terminal > Terminal. -

- - -Multiple Terminal view instances can be active at the same time, connected -to a number of remote systems or disconnected and just holding their settings -ready for re-connect. - -

-
       | Next >
- - diff --git a/bundles/org.eclipse.remote.terminal/doc/html/02_terminal_page.html b/bundles/org.eclipse.remote.terminal/doc/html/02_terminal_page.html deleted file mode 100644 index 1442ac022db..00000000000 --- a/bundles/org.eclipse.remote.terminal/doc/html/02_terminal_page.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - -Terminal View Quick Reference - - - -

Terminal View Quick Reference

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Button

Description

Connect to selected target.

Disconnect from selected connection.

Open the Terminal Settings dialog. - While connected, only the connection's title can be changed.

Toggle the Command Input field, - for editing complex command lines on dumb terminals.

Toggle Scroll Lock in the current terminal connection.

Select a Terminal connection to show in this view instance. - Only available when multiple connections have been defined in this view.

Open another Terminal connection in the current view, or in a new Terminal view instance.

Remove the currently selected Terminal Connection from this view. - Only available when multiple connections have been defined in this view.

-
-

-

- -
- Each instance of the Terminal view can hold multiple connections, each of which can in - turn be connected to a different remote endpoint - (either serial or network). Of course, the number of serial connections is limited by the - number of serial ports. -
- -

- - - - diff --git a/bundles/org.eclipse.remote.terminal/doc/html/03_terminal_settings.html b/bundles/org.eclipse.remote.terminal/doc/html/03_terminal_settings.html deleted file mode 100644 index 953025ae0db..00000000000 --- a/bundles/org.eclipse.remote.terminal/doc/html/03_terminal_settings.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - -Terminal Settings Dialog - - - -

Terminal Settings Dialog

- -
-Use the Terminal Settings dialog to configure your connection. -
-
-In the Connection Type field choose Serial, SSH or Telnet. -
-
-The View Title field allows giving a name to your Terminal View instance. -
- -

Serial Connection

- -
-If you choose a serial connection, the Settings area has seven options: - Port, Baud Rate, Data Bits, Stop Bits, Parity, Flow Control, - and Timeout. -
- -
-When you have entered your settings, click OK. This initiates your connection.
- -
-Your connection information appears in the header of the Terminal view. -A cursor appears in the view itself. Hit ENTER to get a >NET> -prompt.
- -

-
- - - - - -
-

NOTE:When using the Terminal view on Linux or Solaris, - serial ports ttyS0 and ttyS1 must have appropriate permissions - set in order to connect to them, unless you are running the Workbench as root. -

  
-
- -

-

SSH Connection

- -
-If you choose an SSH connection, the Settings area has six options. -In the Host and Port fields, enter the IP Address and port of the host -you wish to connect to. -The User field specifies the remote user id to use. -The Password field is optional, since SSH can re-use your private keys -as specified on the Eclipse Preferences, General, Network Page. -The Timeout can be changed for very slow networks. The -KeepAlive value specifies an interval in seconds, by which the Terminal -automatically sends a packet to the remote host in order to keep the connection -alive even in case of inactivity. -

When all settings are specified, click -OK. This initiates your connection.

- - -

-

Telnet Connection

- -
-If you choose a Telnet connection, the Settings area has three options. -In the Host field, enter the IP Address of the host you wish to connect to. -In the Port field, select the network port you wish to use. -The Timeout can be changed for very slow networks. Then click -OK. This initiates your connection.
- -
-Your connection information appears in the header of the Terminal view. -A cursor appears in the view itself. Hit ENTER to get a >NET> prompt. -
- -

- - - - diff --git a/bundles/org.eclipse.remote.terminal/doc/html/04_terminal_emulation.html b/bundles/org.eclipse.remote.terminal/doc/html/04_terminal_emulation.html deleted file mode 100644 index 0b987d5e87b..00000000000 --- a/bundles/org.eclipse.remote.terminal/doc/html/04_terminal_emulation.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - -Terminal Emulation - - - -

Terminal Emulation

- -
-The Terminal view is an ANSI-conformant terminal emulator. You can use the -Terminal view to telnet into a remote UNIX host. -
- -
-To do so, set the TERM environment variable on the remote host to ansi. -This enables programs on the remote host, such as vi and Emacs, -to display text properly. -The Terminal view does not currently support other emulation modes, such as VT100. -
- -
-The size of the terminal window as understood by the remote is automatically -adjusted as the size of your Terminal view changes. -The colors and font used by the Terminal can be configured in the -Eclipse Preferences, Appearance section. A separate Terminal Preference -Page allows inverting the terminal colors easily if desired. -
- -

Optional Command Input Field

- -
-The optional Command Input Field can be enabled when sending commands to a dumb -terminal that does not support cursor keys for editing. In such a case, the -Command Input Field provides a full editor that supports cursor navigation, copy -and paste, as well as a history of previous commands that can be accessed by -Ctrl+Space content assist. -
- -
-If more space than the default single editing line is needed for very complex commands, -the Command Input Field can be enlarged by dragging its upper handle up with -the mouse. -
- -

- - - - diff --git a/bundles/org.eclipse.remote.terminal/doc/html/notice.html b/bundles/org.eclipse.remote.terminal/doc/html/notice.html deleted file mode 100644 index 91a8824e7cc..00000000000 --- a/bundles/org.eclipse.remote.terminal/doc/html/notice.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - -Legal Notice - - - -

Legal Notice

-

-The material in this guide is Copyright (c) Wind River Systems, Inc. and others 2004, 2012. -

-

-Terms and conditions regarding the use of this guide. -

- - \ No newline at end of file diff --git a/bundles/org.eclipse.remote.terminal/icons/clcl16/command_input_field.gif b/bundles/org.eclipse.remote.terminal/icons/clcl16/command_input_field.gif deleted file mode 100644 index 9e3a547c145798fa08fb692df015a793213fbd1a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 385 zcmV-{0e=2RNk%w1VGsZi0M!5h^!EGh@%r)f`-qjU_W1ny`uv8PzKoy3y2szCv&G-& z_`%54;_CS2?D^^M`je){nykyBv(Mk?_vY>SZY`|a}j_4xfuZlYv_wT+pp z;p+I}>-gd7_vr8W@%8)n`TXDM_u=dKh|$WarlE(qt$M7agU7XT#Itn2uy(Vk zfB*mgA^8LW002J#EC2ui01yBW000J_z+Xm#&}4qdq%wJ2I+@R~k4bKxePc$9H1`IS$H3||U5)uj`H9-J7aY@tZ diff --git a/bundles/org.eclipse.remote.terminal/icons/clcl16/connect_co.gif b/bundles/org.eclipse.remote.terminal/icons/clcl16/connect_co.gif deleted file mode 100644 index 556b230da5693996a541f64393a5cfb91b4bcd33..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 139 zcmZ?wbhEHb6krfw*v!Dd@SlPEEH^^~gT8_P{FCz!-aVMSH2FUm03|Vj;!hSv1_pKp z9gq~r3Qu)m%S5)Zch7sbWtx2K>xBK@v;FkGS@-1G W&gcrAxidxV#@Wd$qt**DSOWlPf-bNC diff --git a/bundles/org.eclipse.remote.terminal/icons/clcl16/disconnect_co.gif b/bundles/org.eclipse.remote.terminal/icons/clcl16/disconnect_co.gif deleted file mode 100644 index f1d5fb31e51476a24e289e7cf2d083058fb3fa2a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 146 zcmZ?wbhEHb6krfw*v!Ci-#-3+e0>80!+v}F|MBtjf#m%8_kn2t{)PsiFvI`<|A8bN zDE?$&WMJTC&;f~n%wS-#FF5JBdhd-z496C>ib@<2@H=YBn5x*&y^Cj=!u(ec#pJbA lyIR&OHT#;)l?%|2-kM+()~m7jt&Y*$wbNf#?G|LP1^^IEGNAwf diff --git a/bundles/org.eclipse.remote.terminal/icons/clcl16/lock_co.gif b/bundles/org.eclipse.remote.terminal/icons/clcl16/lock_co.gif deleted file mode 100644 index 68fd6cf39cac929152036675cc56c7edaf9217e9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 626 zcmZ?wbhEHb6krfwc*el+=g+^tfB$8aO_rouLfByx#?%&}fyLWD1v0z5d?5PE7 zR`f5Qld)u0*3=25e?Oo8@@(7R_j~_-IP~|^@xPx={{4Jz+a#5*w>thj?Emv*)}Lqd z{ydxi=h=d%56*AwR@~CBd~lw{vQCTROI&x%bh)uN_rvwRn@8H8UYvU8{F;hr;pKHQ z>)Pa3H_IR0Pa$D!M)0=Ky*z@`A!~bBwKs})NlZBCiA&o%?WF#m~ z7}(D@q%}3Sv^Lvxbar($*&6px=(m|*(`0F^Jad+^ov|d3U6Ylu%F<;jM#i$5Moren z+8Z}%Gi}}4WMQJVTTOMJ0<*BNLX&x7KtQ~NgpQ6bAFrrxQ$kQmN>H4hp1PKpn21tZ zl3PS-YO)+gMdQHc12(!2 M&1HruY61+_0K&N{n*aa+ diff --git a/bundles/org.eclipse.remote.terminal/icons/clcl16/newterminal.gif b/bundles/org.eclipse.remote.terminal/icons/clcl16/newterminal.gif deleted file mode 100644 index 80201e0d46944f559b4a73b846886d8c999dc5d1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 351 zcmV-l0igazNk%w1VGsZi0M!5h|NsC0{{a60|Nj600RR60{{R30{{R303;_R5MgMtu z%T%-WN4)<^zW+|Z|4_mIQNjOG!v9mk|5d~Ph|l(7%Ku}_|7FVmXUqR+%>QW3|8UIx zaLoLF&-sPV_iWGqchmoQ)&F_c|9aK`d({4Z*8Ygv{*2oFliB!+-T#Z;|BBlElHB`@ z;QyE6{g&kaoag_Z=>MMM`kv|kq3Zvs@c*yu`nl}&!1@2d`TxiL|H}UV%>Vz-|NsBw z0RR90A^8LW002J#EC2ui01yBW000Jjz@KnP{2`9Tq!8gl5Eam<;>e^56&{o9rrR-n z;O5n{a@lx2Y7_axCK5DUu7;{UJ*O8e7MroGLkbiLEpI6*B^(n06TG|z`pYHf!VrZ z*PVa54W6%gxH@FFeRoLf4R)Jzc;%{xj64N8hjkY$)1H0yPr!Z4xvR~8FKk*a6_}>- Pph=f=WmBVr5Q8-Uq17^g diff --git a/bundles/org.eclipse.remote.terminal/icons/cview16/terminal_view.gif b/bundles/org.eclipse.remote.terminal/icons/cview16/terminal_view.gif deleted file mode 100644 index bbb6a9e153e146f57903aa2b5e0d2bc58cd641c8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 938 zcmZ?wbhEHb6krfw_|Cxa|NsA)GiL(HKmWeGdG{tQEzQ{2n8nEC$+IgA3}@2L{AWn} zZ#?sVS{lO{5MTg;pFe-joXIe2)~xRC?%A_v`}+F+{reXrF$zXQV5o(F;!hSvkehWt z1Sn59aI`Zpa>#gWP&mlIC&%G%V1r^46B`$sK!HM|Yd62LSV6;uMg|TcDTyf>3sO!p zvT!)4L>4xBvq>`gln5|79hzvws<1?00YeLyg({nbSILTlo$QmedMhU+F|q2;J|?;5|=b=70_{LC}2!?U|_HY0P>7m*#H0l diff --git a/bundles/org.eclipse.remote.terminal/icons/dlcl16/command_input_field.gif b/bundles/org.eclipse.remote.terminal/icons/dlcl16/command_input_field.gif deleted file mode 100644 index f538ca707fc7480b4586effcebbb307e1979ae3b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 239 zcmZ?wbhEHb6krfwIKsg2`}dz;zkdJx`Rnk}Q|B&RId$g3@snpifBE+5^Vg4`zARt8 z>C%P9Hse>gdT6M-Cl4_~*}`|Ns9p zU;xFREQ|~ck_h2{l~5|Km=i5pyLr;i3Ob2Z#xiV)yxV|=ihgM~q8`yJoey=qLxRSFfIA-s)E fymhU7Rhj(uX5s>U{Q`A*>>bSPleA1#6d9}maD{N$ diff --git a/bundles/org.eclipse.remote.terminal/icons/dlcl16/connect_co.gif b/bundles/org.eclipse.remote.terminal/icons/dlcl16/connect_co.gif deleted file mode 100644 index ae5e64b9f6f1b090da34d65bd48784886e8e2305..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 874 zcmZ?wbhEHb6krfw_|CwvfB*jZ^XLEn|DRzLjE2C-3jxKSEQ|~cObj|8uY>Z01BW{U zD~F8728DwR?CeT95(x_rwKK_BwPb8iXlP?(Q0cMwkmTGe!|LZ^v2oGK$r|2mF((UE aj!xCHPGXTXQajxtY@6nCa&v+MgEavEOe8}9 diff --git a/bundles/org.eclipse.remote.terminal/icons/dlcl16/disconnect_co.gif b/bundles/org.eclipse.remote.terminal/icons/dlcl16/disconnect_co.gif deleted file mode 100644 index 24a628713dca636bfe498223f8382f189140cf93..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 90 zcmZ?wbhEHb6krfwn8?7efB*jZ^XLEn|DS<@LGdRGBLf2ygAR}llobH7wWsv2Jk7<( s$kioP{n2(-nO*KN;Z~JpouWlvOix;0c{hLlefKNJ?z8-VL>U;Y0qcJs5C8xG diff --git a/bundles/org.eclipse.remote.terminal/icons/dlcl16/lock_co.gif b/bundles/org.eclipse.remote.terminal/icons/dlcl16/lock_co.gif deleted file mode 100644 index b7764789356f9a62aa0b9ad50ff020f4e01e3b5d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 588 zcmZ?wbhEHb6krfwc*el+=g;5YzyJLD_50_~U-ut8zIf^C#x1+H@7%j)?fOrjzkdAm z<=~+s2M!)yzIxM^?R(a3*t~1c{=NGTUbuAS`;VXBzW@08?faLn-`;-s^yS<4KY#yj z+Pr!9uFao6z5Vp@&BqU~uUtB{Va>dqTUVSreem&vYxnP5+P7=n)JdIBAKkon`_l6# zcb+}Ief9F$^JkC0d-Lq&^M~8FZC<}>?%EY|)-0dBdfBX%OJ?lYvg+geSMT4xSigGF zotu|VpEz{w%7uG(ZoC4jesJ&er;mpY9{m6R|G$6#{{H<7WH1ahp!k!8k%7U5K?me; zP@FKZuWWE>YHn$5cIfEr>S}Tj@1M{wJ;9+@Tx`ZnF@14fmZ>g%vt~+(Gczyf6J5PV zlz%<{N{QvmMYeIU3JI;$QB<^MViFeS<~+7i)!trJn~{;3hwIW*2L&5PM>_>uMkYb= z)mKb(tgLiQtRxu)-UwV#mXX(!)iQ9FWS_Fo%-q6MS2Kx2^3j6J%LC+!W*AI#Zsk#Q d;)!8kXprg>R&tr6V3;hpC_v6pl#7MI8US7A;iv!r diff --git a/bundles/org.eclipse.remote.terminal/icons/dlcl16/newterminal.gif b/bundles/org.eclipse.remote.terminal/icons/dlcl16/newterminal.gif deleted file mode 100644 index 80201e0d46944f559b4a73b846886d8c999dc5d1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 351 zcmV-l0igazNk%w1VGsZi0M!5h|NsC0{{a60|Nj600RR60{{R30{{R303;_R5MgMtu z%T%-WN4)<^zW+|Z|4_mIQNjOG!v9mk|5d~Ph|l(7%Ku}_|7FVmXUqR+%>QW3|8UIx zaLoLF&-sPV_iWGqchmoQ)&F_c|9aK`d({4Z*8Ygv{*2oFliB!+-T#Z;|BBlElHB`@ z;QyE6{g&kaoag_Z=>MMM`kv|kq3Zvs@c*yu`nl}&!1@2d`TxiL|H}UV%>Vz-|NsBw z0RR90A^8LW002J#EC2ui01yBW000Jjz@KnP{2`9Tq!8gl5Eam<;>e^56&{o9rrR-n z;O5n{a@lx2Y7_axCK5DUu7;{UJ*O8e7MroGLkbiLEpI6*B^(n06TG|z`pjqWXXeWH$Wh%qo&0|4{v9aI1S diff --git a/bundles/org.eclipse.remote.terminal/icons/dlcl16/rem_co.gif b/bundles/org.eclipse.remote.terminal/icons/dlcl16/rem_co.gif deleted file mode 100644 index 559e462985f439553de36c89f65392eae3e9a44e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 159 zcmZ?wbhEHb6krfw*v!Ci=-|O)$BrF5cyQ02Jv(;n*t~i3x^?STu3Wif$&v*N7X1JJ zp8*vp{$ycfVBliV0SSZ5U|{hHIO(~1uSCNtU5#UEjBbj3ZUQY)yXJ8fa4;1Ld|~WA z@!)sI-4+*(HUmTFi3NKYgjzF96l>i0I}eMb=?0hv=!;iZy|UTOS9Ern3j>2S03Llh A4*&oF diff --git a/bundles/org.eclipse.remote.terminal/icons/elcl16/command_input_field.gif b/bundles/org.eclipse.remote.terminal/icons/elcl16/command_input_field.gif deleted file mode 100644 index f538ca707fc7480b4586effcebbb307e1979ae3b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 239 zcmZ?wbhEHb6krfwIKsg2`}dz;zkdJx`Rnk}Q|B&RId$g3@snpifBE+5^Vg4`zARt8 z>C%P9Hse>gdT6M-Cl4_~*}`|Ns9p zU;xFREQ|~ck_h2{l~5|Km=i5pyLr;i3Ob2Z#xiV)yxV|=ihgM~q8`yJoey=qLxRSFfIA-s)E fymhU7Rhj(uX5s>U{Q`A*>>bSPleA1#6d9}maD{N$ diff --git a/bundles/org.eclipse.remote.terminal/icons/elcl16/connect_co.gif b/bundles/org.eclipse.remote.terminal/icons/elcl16/connect_co.gif deleted file mode 100644 index c0de0d32dd66e4efb5e94661dd3f180de819a25d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 890 zcmZ?wbhEHb6krfw_|CwvfB*jZ^XE4-G{ncpGcYjx|NkFIj)Kt;7$G5`_>+Z^fq|7l z2jpK+o^ap@XW-_L@z|i?$jHvFq@$7W@BkyD6rX^F!y}hAHe)6Mg9L_#7FHRi7cT-A zFfa(}&*GW6ap~#l3jB+n%(#%)*d-IXDQ4w_2gmy4D{r-EOk8+&qC=vVtb_oAH2~_rouLfByx#?%&}fyLWD1v0z5d?5PE7 zR`f5Qld)u0*3=25e?Oo8@@(7R_j~_-IP~|^@xPx={{4Jz+a#5*w>thj?Emv*)}Lqd z{ydxi=h=d%56*AwR@~CBd~lw{vQCTROI&x%bh)uN_rvwRn@8H8UYvU8{F;hr;pKHQ z>)Pa3H_IR0Pa$D!M)0=Ky*z@`A!~bBwKs})NlZBCiA&o%?WF#m~ z7}(D@q%}3Sv^Lvxbar($*&6px=(m|*(`0F^Jad+^ov|d3U6Ylu%F<;jM#i$5Moren z+8Z}%Gi}}4WMQJVTTOMJ0<*BNLX&x7KtQ~NgpQ6bAFrrxQ$kQmN>H4hp1PKpn21tZ zl3PS-YO)+gMdQHc12(!2 M&1HruY61+_0K&N{n*aa+ diff --git a/bundles/org.eclipse.remote.terminal/icons/elcl16/newterminal.gif b/bundles/org.eclipse.remote.terminal/icons/elcl16/newterminal.gif deleted file mode 100644 index 80201e0d46944f559b4a73b846886d8c999dc5d1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 351 zcmV-l0igazNk%w1VGsZi0M!5h|NsC0{{a60|Nj600RR60{{R30{{R303;_R5MgMtu z%T%-WN4)<^zW+|Z|4_mIQNjOG!v9mk|5d~Ph|l(7%Ku}_|7FVmXUqR+%>QW3|8UIx zaLoLF&-sPV_iWGqchmoQ)&F_c|9aK`d({4Z*8Ygv{*2oFliB!+-T#Z;|BBlElHB`@ z;QyE6{g&kaoag_Z=>MMM`kv|kq3Zvs@c*yu`nl}&!1@2d`TxiL|H}UV%>Vz-|NsBw z0RR90A^8LW002J#EC2ui01yBW000Jjz@KnP{2`9Tq!8gl5Eam<;>e^56&{o9rrR-n z;O5n{a@lx2Y7_axCK5DUu7;{UJ*O8e7MroGLkbiLEpI6*B^(n06TG|z`pYHf!VrZ z*PVa54W6%gxH@FFeRoLf4R)Jzc;%{xj64N8hjkY$)1H0yPr!Z4xvR~8FKk*a6_}>- Pph=f=WmBVr5Q8-Uq17^g diff --git a/bundles/org.eclipse.remote.terminal/icons/elcl16/rem_co.gif b/bundles/org.eclipse.remote.terminal/icons/elcl16/rem_co.gif deleted file mode 100644 index 2cd9c544436c47a57f20b348b3fb024bb50701a7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 163 zcmZ?wbhEHb6krfw*v!DNV#SID3l_|nF=N7n2^}3B4Gj$y6%_>q1sNF`2?+`R|Nmz| z1&Tje7#SG27<53wATtBYuHJj2L#xNM)vQ#JRl<>hDKU#-N&yE`p}?0M(Gw4T zcQCOfDoF5h^e6?|s2Q}nBw9^#gWP&mlIC&%G%V1r^46B`$sK!HM|Yd62LSV6;uMg|TcDTyf>3sO!p zvT!)4L>4xBvq>`gln5|79hzvws<1?00YeLyg({nbSILTlo$QmedMhU+F|q2;J|?;5|=b=70_{LC}2!?U|_HY0P>7m*#H0l diff --git a/bundles/org.eclipse.remote.terminal/plugin.properties b/bundles/org.eclipse.remote.terminal/plugin.properties deleted file mode 100644 index fc65aa27893..00000000000 --- a/bundles/org.eclipse.remote.terminal/plugin.properties +++ /dev/null @@ -1,13 +0,0 @@ -########################################################################## -# Copyright (c) 2003, 2015 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 -########################################################################## -pluginName = Remote Terminal View -providerName = Eclipse.org -terminal.views.category.name = Remote Development -terminal.views.view.name = Remote Terminal -connectionName = Remote Services -RemoteTerminalPage.name = Remote Terminal diff --git a/bundles/org.eclipse.remote.terminal/plugin.xml b/bundles/org.eclipse.remote.terminal/plugin.xml deleted file mode 100644 index 5133da32691..00000000000 --- a/bundles/org.eclipse.remote.terminal/plugin.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/bundles/org.eclipse.remote.terminal/pom.xml b/bundles/org.eclipse.remote.terminal/pom.xml deleted file mode 100644 index 1aea2ffad73..00000000000 --- a/bundles/org.eclipse.remote.terminal/pom.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - 4.0.0 - - - org.eclipse.remote - remote-parent - 1.1.1-SNAPSHOT - ../../releng/org.eclipse.remote.build/pom.xml - - - org.eclipse.remote.terminal - 1.0.0-SNAPSHOT - eclipse-plugin - diff --git a/bundles/org.eclipse.remote.terminal/schema/parsers.exsd b/bundles/org.eclipse.remote.terminal/schema/parsers.exsd deleted file mode 100644 index 4fa0ed65b15..00000000000 --- a/bundles/org.eclipse.remote.terminal/schema/parsers.exsd +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - - - Extension point that allows a parser to be added to the terminal view. The parser is intended to process output generated by the remote shell and perform an action based on the content. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Unique identifier for this parser - - - - - - - - - - - - - - - - - - - - - - [Enter the first release in which this extension point appears.] - - - - - - - - - [Enter extension point usage example here.] - - - - - - - - - [Enter API information here.] - - - - - - - - - [Enter information about supplied implementation of this extension point.] - - - - - diff --git a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/ActionMessages.java b/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/ActionMessages.java deleted file mode 100644 index 73d4dd5cd6c..00000000000 --- a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/ActionMessages.java +++ /dev/null @@ -1,43 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2015 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 - * - * Initial Contributors: - * The following Wind River employees contributed to the Terminal component - * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb, - * Helmut Haigermoser and Ted Williams. - * - * Contributors: - * Michael Scharf (Wind River) - split into core, view and connector plugins - * Martin Oberhuber (Wind River) - fixed copyright headers and beautified - * Anna Dushistova (MontaVista) - [227537] moved actions from terminal.view to terminal plugin - * Michael Scharf (Wind River) - [240023] Get rid of the terminal's "Pin" button - *******************************************************************************/ -package org.eclipse.remote.internal.terminal.actions; - -import org.eclipse.osgi.util.NLS; - -public class ActionMessages extends NLS { - - static { - NLS.initializeMessages(ActionMessages.class.getName(), ActionMessages.class); - } - public static String NEW_TERMINAL_CONNECTION; - public static String NEW_TERMINAL_VIEW; - public static String CONNECT; - public static String TOGGLE_COMMAND_INPUT_FIELD; - public static String DISCONNECT; - public static String SETTINGS_ELLIPSE; - public static String SCROLL_LOCK_0; - public static String SCROLL_LOCK_1; - public static String REMOVE; - - public static String ConsoleDropDownAction_0; - public static String ConsoleDropDownAction_1; - - public static String SETTINGS; - -} diff --git a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/ActionMessages.properties b/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/ActionMessages.properties deleted file mode 100644 index 0401f1d8c83..00000000000 --- a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/ActionMessages.properties +++ /dev/null @@ -1,33 +0,0 @@ -############################################################################### -# Copyright (c) 2003, 2015 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 -# -# Initial Contributors: -# The following Wind River employees contributed to the Terminal component -# that contains this file: Chris Thew, Fran Litterio, Stephen Lamb, -# Helmut Haigermoser and Ted Williams. -# -# Contributors: -# Michael Scharf (Wind River) - split into core, view and connector plugins -# Martin Oberhuber (Wind River) - fixed copyright headers and beautified -# Anna Dushistova (MontaVista) - [227537] moved actions from terminal.view to terminal plugin -# Michael Scharf (Wind River) - [172483] switch between connections -# Michael Scharf (Wind River) - [240023] Get rid of the terminal's "Pin" button -############################################################################### -NEW_TERMINAL_CONNECTION = New Terminal Connection in Current View... -NEW_TERMINAL_VIEW = New Terminal View -CONNECT = Connect -DISCONNECT = Disconnect -SETTINGS_ELLIPSE = Settings... -SCROLL_LOCK_0 = Scroll &Lock -SCROLL_LOCK_1 = Scroll Lock -SETTINGS = Settings -TOGGLE_COMMAND_INPUT_FIELD= Toggle Command Input Field -REMOVE = Remove Terminal - -ConsoleDropDownAction_0=Select Connection -ConsoleDropDownAction_1=Display Selected Connections - diff --git a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/ShowTerminalConnectionAction.java b/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/ShowTerminalConnectionAction.java deleted file mode 100644 index fc137380481..00000000000 --- a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/ShowTerminalConnectionAction.java +++ /dev/null @@ -1,83 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2015 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - * Michael Scharf (Wind River) - [172483] Adapted from org.eclipse.ui.console/ShowConsoleAction - *******************************************************************************/ -package org.eclipse.remote.internal.terminal.actions; - -import org.eclipse.jface.action.Action; -import org.eclipse.remote.internal.terminal.view.ITerminalViewConnection; -import org.eclipse.remote.internal.terminal.view.ITerminalViewConnectionManager; - -/** - * Shows a specific connection in the terminal view - */ -public class ShowTerminalConnectionAction extends Action { - - private final ITerminalViewConnection fConnection; - private final ITerminalViewConnectionManager fConnectionManager; - - /** - * Constructs an action to display the given terminal. - * - * @param manager the terminal multi-view in which the given terminal connection is contained - * @param connection the terminal view connection - */ - public ShowTerminalConnectionAction(ITerminalViewConnectionManager manager, ITerminalViewConnection connection) { - super(quoteName(buildName(manager,connection)), AS_RADIO_BUTTON); - fConnection = connection; - fConnectionManager = manager; - setImageDescriptor(connection.getImageDescriptor()); - } - /** - * the tab at the end quotes '@' chars?!? see - * {@link #setText(String)} - * @param name - * @return a quoted sting - */ - private static String quoteName(String name) { - return name+"\t"; //$NON-NLS-1$ - } - /** - * Builds the name. It uses the summary. If the connections have different - * partNames (the names showed in the view title) then this name is prefixed. - * @param m the connection manager - * @param connection the connection for which the name should me extracted - * @return The name to be displayed - */ - private static String buildName(ITerminalViewConnectionManager m,ITerminalViewConnection connection) { - String name = connection.getFullSummary(); - if(!checkIfAllPartNamesTheSame(m)) - name=connection.getPartName()+" - " +name; //$NON-NLS-1$ - return name; - } - /** - * @param m the connection manager - * @return true if the part names of all connections are the same - */ - private static boolean checkIfAllPartNamesTheSame(ITerminalViewConnectionManager m) { - ITerminalViewConnection[] connections = m.getConnections(); - if(connections.length>1) { - String partName=connections[0].getPartName(); - for (int i = 1; i < connections.length; i++) { - if(!partName.equals(connections[i].getPartName())) { - return false; - } - } - - } - return true; - } - /* (non-Javadoc) - * @see org.eclipse.jface.action.IAction#run() - */ - public void run() { - fConnectionManager.setActiveConnection(fConnection); - } -} diff --git a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/TerminalAction.java b/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/TerminalAction.java deleted file mode 100644 index 80a0e65b44f..00000000000 --- a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/TerminalAction.java +++ /dev/null @@ -1,75 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2015 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 - * - * Initial Contributors: - * The following Wind River employees contributed to the Terminal component - * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb, - * Helmut Haigermoser and Ted Williams. - * - * Contributors: - * Michael Scharf (Wind River) - split into core, view and connector plugins - * Martin Oberhuber (Wind River) - fixed copyright headers and beautified - *******************************************************************************/ -package org.eclipse.remote.internal.terminal.actions; - -import org.eclipse.jface.action.Action; -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.jface.resource.ImageRegistry; -import org.eclipse.remote.internal.terminal.view.ITerminalView; -import org.eclipse.remote.internal.terminal.view.TerminalViewPlugin; - -abstract public class TerminalAction extends Action { - protected final ITerminalView fTarget; - public TerminalAction(ITerminalView target, String strId) { - this(target,strId,0); - } - public TerminalAction(ITerminalView target, String strId, int style) { - super("",style); //$NON-NLS-1$ - - fTarget = target; - - setId(strId); - } - abstract public void run(); - protected void setupAction(String strText, String strToolTip, - String strImage, String strEnabledImage, String strDisabledImage, - boolean bEnabled) { - TerminalViewPlugin plugin; - ImageRegistry imageRegistry; - - plugin = TerminalViewPlugin.getDefault(); - imageRegistry = plugin.getImageRegistry(); - setupAction(strText, strToolTip, strImage, strEnabledImage, - strDisabledImage, bEnabled, imageRegistry); - } - protected void setupAction(String strText, String strToolTip, - String strHoverImage, String strEnabledImage, String strDisabledImage, - boolean bEnabled, ImageRegistry imageRegistry) { - setupAction(strText, - strToolTip, - imageRegistry.getDescriptor(strHoverImage), - imageRegistry.getDescriptor(strEnabledImage), - imageRegistry.getDescriptor(strDisabledImage), - bEnabled); - } - protected void setupAction(String strText, String strToolTip, - ImageDescriptor hoverImage, ImageDescriptor enabledImage, ImageDescriptor disabledImage, - boolean bEnabled) { - setText(strText); - setToolTipText(strToolTip); - setEnabled(bEnabled); - if (enabledImage != null) { - setImageDescriptor(enabledImage); - } - if (disabledImage != null) { - setDisabledImageDescriptor(disabledImage); - } - if (hoverImage != null) { - setHoverImageDescriptor(hoverImage); - } - } -} diff --git a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/TerminalActionConnect.java b/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/TerminalActionConnect.java deleted file mode 100644 index 516a2b17109..00000000000 --- a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/TerminalActionConnect.java +++ /dev/null @@ -1,39 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2015 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 - * - * Initial Contributors: - * The following Wind River employees contributed to the Terminal component - * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb, - * Helmut Haigermoser and Ted Williams. - * - * Contributors: - * Michael Scharf (Wind River) - split into core, view and connector plugins - * Martin Oberhuber (Wind River) - fixed copyright headers and beautified - *******************************************************************************/ -package org.eclipse.remote.internal.terminal.actions; - -import org.eclipse.remote.internal.terminal.view.ITerminalView; -import org.eclipse.remote.internal.terminal.view.ImageConsts; - -public class TerminalActionConnect extends TerminalAction -{ - public TerminalActionConnect(ITerminalView target) - { - super(target, - TerminalActionConnect.class.getName()); - - setupAction(ActionMessages.CONNECT, - ActionMessages.CONNECT, - ImageConsts.IMAGE_CLCL_CONNECT, - ImageConsts.IMAGE_ELCL_CONNECT, - ImageConsts.IMAGE_DLCL_CONNECT, - true); - } - public void run() { - fTarget.onTerminalConnect(); - } -} diff --git a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/TerminalActionDisconnect.java b/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/TerminalActionDisconnect.java deleted file mode 100644 index 4fac03c7173..00000000000 --- a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/TerminalActionDisconnect.java +++ /dev/null @@ -1,42 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2015 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 - * - * Initial Contributors: - * The following Wind River employees contributed to the Terminal component - * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb, - * Helmut Haigermoser and Ted Williams. - * - * Contributors: - * Michael Scharf (Wind River) - split into core, view and connector plugins - * Martin Oberhuber (Wind River) - fixed copyright headers and beautified - *******************************************************************************/ -package org.eclipse.remote.internal.terminal.actions; - -import org.eclipse.remote.internal.terminal.view.ITerminalView; -import org.eclipse.remote.internal.terminal.view.ImageConsts; - -public class TerminalActionDisconnect extends TerminalAction -{ - /** - * - */ - public TerminalActionDisconnect(ITerminalView target) - { - super(target, - TerminalActionDisconnect.class.getName()); - - setupAction(ActionMessages.DISCONNECT, - ActionMessages.DISCONNECT, - ImageConsts.IMAGE_CLCL_DISCONNECT, - ImageConsts.IMAGE_ELCL_DISCONNECT, - ImageConsts.IMAGE_DLCL_DISCONNECT, - false); - } - public void run() { - fTarget.onTerminalDisconnect(); - } -} diff --git a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/TerminalActionNewTerminal.java b/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/TerminalActionNewTerminal.java deleted file mode 100644 index c265d1074e8..00000000000 --- a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/TerminalActionNewTerminal.java +++ /dev/null @@ -1,83 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005, 2015 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 - * - * Initial Contributors: - * The following Wind River employees contributed to the Terminal component - * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb, - * Helmut Haigermoser and Ted Williams. - * - * Contributors: - * Michael Scharf (Wind River) - split into core, view and connector plugins - * Martin Oberhuber (Wind River) - fixed copyright headers and beautified - * Michael Scharf (Wind River) - [240023] Get rid of the terminal's "Pin" button -*******************************************************************************/ -package org.eclipse.remote.internal.terminal.actions; - -import org.eclipse.jface.action.Action; -import org.eclipse.jface.action.ActionContributionItem; -import org.eclipse.jface.action.IAction; -import org.eclipse.jface.action.IMenuCreator; -import org.eclipse.remote.internal.terminal.view.ITerminalView; -import org.eclipse.remote.internal.terminal.view.ImageConsts; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Menu; - -/** - * UNDER CONSTRUCTION - * - * @author Fran Litterio - */ -public class TerminalActionNewTerminal extends TerminalAction implements IMenuCreator { - private Menu fMenu; - public TerminalActionNewTerminal(ITerminalView target) - { - super(target, TerminalActionNewTerminal.class.getName()); - - setupAction(ActionMessages.NEW_TERMINAL_CONNECTION, - ActionMessages.NEW_TERMINAL_CONNECTION, - ImageConsts.IMAGE_NEW_TERMINAL, - ImageConsts.IMAGE_NEW_TERMINAL, - ImageConsts.IMAGE_NEW_TERMINAL, - true); - setMenuCreator(this); - } - public void run() { - fTarget.onTerminalNewTerminal(); - } - public void dispose() { - if (fMenu != null) { - fMenu.dispose(); - } - } - public Menu getMenu(Control parent) { - if(fMenu==null) { - fMenu= new Menu(parent); - addActionToMenu(fMenu, - new Action(ActionMessages.NEW_TERMINAL_CONNECTION) { - public void run() { - fTarget.onTerminalNewTerminal(); - } - - }); - addActionToMenu(fMenu, - new Action(ActionMessages.NEW_TERMINAL_VIEW) { - public void run() { - fTarget.onTerminalNewView(); - } - - }); - } - return fMenu; - } - protected void addActionToMenu(Menu parent, IAction action) { - ActionContributionItem item = new ActionContributionItem(action); - item.fill(parent, -1); - } - public Menu getMenu(Menu parent) { - return null; - } -} diff --git a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/TerminalActionRemove.java b/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/TerminalActionRemove.java deleted file mode 100644 index 073c180233d..00000000000 --- a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/TerminalActionRemove.java +++ /dev/null @@ -1,40 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2015 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: - * Michael Scharf (Wind River) - initial API and implementation - *******************************************************************************/ -package org.eclipse.remote.internal.terminal.actions; - -import org.eclipse.remote.internal.terminal.view.ITerminalViewConnectionManager; -import org.eclipse.remote.internal.terminal.view.ImageConsts; -import org.eclipse.remote.internal.terminal.view.ITerminalViewConnectionManager.ITerminalViewConnectionListener; - -public class TerminalActionRemove extends TerminalAction implements ITerminalViewConnectionListener -{ - private final ITerminalViewConnectionManager fConnectionManager; - public TerminalActionRemove(ITerminalViewConnectionManager target) - { - super(null, - TerminalActionRemove.class.getName()); - fConnectionManager=target; - setupAction(ActionMessages.REMOVE, - ActionMessages.REMOVE, - null, - ImageConsts.IMAGE_ELCL_REMOVE, - ImageConsts.IMAGE_DLCL_REMOVE, - true); - fConnectionManager.addListener(this); - connectionsChanged(); - } - public void run() { - fConnectionManager.removeActive(); - } - public void connectionsChanged() { - setEnabled(fConnectionManager.size()>1); - } -} diff --git a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/TerminalActionScrollLock.java b/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/TerminalActionScrollLock.java deleted file mode 100644 index 2950595f2ab..00000000000 --- a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/TerminalActionScrollLock.java +++ /dev/null @@ -1,41 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2015 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 - * - * Initial Contributors: - * The following Wind River employees contributed to the Terminal component - * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb, - * Helmut Haigermoser and Ted Williams. - * - * Contributors: - * Michael Scharf (Wind River) - split into core, view and connector plugins - * Martin Oberhuber (Wind River) - fixed copyright headers and beautified - *******************************************************************************/ -package org.eclipse.remote.internal.terminal.actions; - -import org.eclipse.jface.action.IAction; -import org.eclipse.remote.internal.terminal.view.ITerminalView; -import org.eclipse.remote.internal.terminal.view.ImageConsts; - -public class TerminalActionScrollLock extends TerminalAction -{ - public TerminalActionScrollLock(ITerminalView target) - { - super(target, - TerminalActionScrollLock.class.getName(),IAction.AS_RADIO_BUTTON); - - setupAction(ActionMessages.SCROLL_LOCK_0, - ActionMessages.SCROLL_LOCK_1, - ImageConsts.IMAGE_CLCL_SCROLL_LOCK, - ImageConsts.IMAGE_ELCL_SCROLL_LOCK, - ImageConsts.IMAGE_DLCL_SCROLL_LOCK, - true); - } - public void run() { - fTarget.setScrollLock(!fTarget.isScrollLock()); - setChecked(fTarget.isScrollLock()); - } -} diff --git a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/TerminalActionSelectionDropDown.java b/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/TerminalActionSelectionDropDown.java deleted file mode 100644 index e2276a42a24..00000000000 --- a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/TerminalActionSelectionDropDown.java +++ /dev/null @@ -1,106 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2015 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - * Michael Scharf (Wind River) - [172483] switch between connections - * (Adapted from org.eclipse.ui.internal.console.ConsoleDropDownAction) - *******************************************************************************/ -package org.eclipse.remote.internal.terminal.actions; - - -import org.eclipse.jface.action.Action; -import org.eclipse.jface.action.ActionContributionItem; -import org.eclipse.jface.action.IMenuCreator; -import org.eclipse.remote.internal.terminal.view.ITerminalViewConnection; -import org.eclipse.remote.internal.terminal.view.ITerminalViewConnectionManager; -import org.eclipse.remote.internal.terminal.view.ImageConsts; -import org.eclipse.remote.internal.terminal.view.TerminalViewPlugin; -import org.eclipse.remote.internal.terminal.view.ITerminalViewConnectionManager.ITerminalViewConnectionListener; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Menu; - -/** - * Drop down action in the console to select the console to display. - */ -public class TerminalActionSelectionDropDown extends Action implements IMenuCreator, ITerminalViewConnectionListener { - private ITerminalViewConnectionManager fConnections; - private Menu fMenu; - public TerminalActionSelectionDropDown(ITerminalViewConnectionManager view) { - fConnections= view; - setText(ActionMessages.ConsoleDropDownAction_0); - setToolTipText(ActionMessages.ConsoleDropDownAction_1); - setImageDescriptor(TerminalViewPlugin.getDefault().getImageRegistry().getDescriptor(ImageConsts.IMAGE_TERMINAL_VIEW)); -// PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IConsoleHelpContextIds.CONSOLE_DISPLAY_CONSOLE_ACTION); - setMenuCreator(this); - fConnections.addListener(this); - connectionsChanged(); - } - - /* (non-Javadoc) - * @see org.eclipse.jface.action.IMenuCreator#dispose() - */ - public void dispose() { - if (fMenu != null) { - fMenu.dispose(); - } - fConnections.removeListener(this); - fConnections= null; - } - - /* (non-Javadoc) - * @see org.eclipse.jface.action.IMenuCreator#getMenu(org.eclipse.swt.widgets.Menu) - */ - public Menu getMenu(Menu parent) { - return null; - } - - /* (non-Javadoc) - * @see org.eclipse.jface.action.IMenuCreator#getMenu(org.eclipse.swt.widgets.Control) - */ - public Menu getMenu(Control parent) { - if (fMenu != null) { - fMenu.dispose(); - } - - fMenu= new Menu(parent); - ITerminalViewConnection[] consoles= fConnections.getConnections(); - ITerminalViewConnection active = fConnections.getActiveConnection(); - for (int i = 0; i < consoles.length; i++) { - ITerminalViewConnection console = consoles[i]; - Action action = new ShowTerminalConnectionAction(fConnections, console); - action.setChecked(console.equals(active)); - addActionToMenu(fMenu, action, i + 1); - } - return fMenu; - } - - private void addActionToMenu(Menu parent, Action action, int accelerator) { - if (accelerator < 10) { - StringBuffer label= new StringBuffer(); - //add the numerical accelerator - label.append('&'); - label.append(accelerator); - label.append(' '); - label.append(action.getText()); - action.setText(label.toString()); - } - ActionContributionItem item= new ActionContributionItem(action); - item.fill(parent, -1); - } - - /* (non-Javadoc) - * @see org.eclipse.jface.action.IAction#run() - */ - public void run() { - fConnections.swapConnection(); - } - - public void connectionsChanged() { - setEnabled(fConnections.size() > 1); - } -} diff --git a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/TerminalActionSettings.java b/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/TerminalActionSettings.java deleted file mode 100644 index 7feb9a55a4c..00000000000 --- a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/TerminalActionSettings.java +++ /dev/null @@ -1,39 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2015 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 - * - * Initial Contributors: - * The following Wind River employees contributed to the Terminal component - * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb, - * Helmut Haigermoser and Ted Williams. - * - * Contributors: - * Michael Scharf (Wind River) - split into core, view and connector plugins - * Martin Oberhuber (Wind River) - fixed copyright headers and beautified - *******************************************************************************/ -package org.eclipse.remote.internal.terminal.actions; - -import org.eclipse.remote.internal.terminal.view.ITerminalView; -import org.eclipse.remote.internal.terminal.view.ImageConsts; - -public class TerminalActionSettings extends TerminalAction -{ - public TerminalActionSettings(ITerminalView target) - { - super(target, - TerminalActionSettings.class.getName()); - - setupAction(ActionMessages.SETTINGS_ELLIPSE, - ActionMessages.SETTINGS, - ImageConsts.IMAGE_CLCL_SETTINGS, - ImageConsts.IMAGE_ELCL_SETTINGS, - ImageConsts.IMAGE_DLCL_SETTINGS, - true); - } - public void run() { - fTarget.onTerminalSettings(); - } -} diff --git a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/TerminalActionToggleCommandInputField.java b/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/TerminalActionToggleCommandInputField.java deleted file mode 100644 index 8c8b6076c8a..00000000000 --- a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/actions/TerminalActionToggleCommandInputField.java +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 2015 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: - * Michael Scharf (Wind River) - initial implementation - *******************************************************************************/ -package org.eclipse.remote.internal.terminal.actions; - -import org.eclipse.jface.action.IAction; -import org.eclipse.remote.internal.terminal.view.ITerminalView; -import org.eclipse.remote.internal.terminal.view.ImageConsts; - -public class TerminalActionToggleCommandInputField extends TerminalAction -{ - public TerminalActionToggleCommandInputField(ITerminalView target) - { - super(target, - TerminalActionToggleCommandInputField.class.getName(),IAction.AS_RADIO_BUTTON); - - setupAction(ActionMessages.TOGGLE_COMMAND_INPUT_FIELD, - ActionMessages.TOGGLE_COMMAND_INPUT_FIELD, - ImageConsts.IMAGE_CLCL_COMMAND_INPUT_FIELD, - ImageConsts.IMAGE_ELCL_COMMAND_INPUT_FIELD, - ImageConsts.IMAGE_DLCL_COMMAND_INPUT_FIELD, - true); - setChecked(fTarget.hasCommandInputField()); - } - public void run() { - fTarget.setCommandInputField(!fTarget.hasCommandInputField()); - setChecked(fTarget.hasCommandInputField()); - } -} diff --git a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/connector/ArgumentParser.java b/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/connector/ArgumentParser.java deleted file mode 100644 index fb1ff55e8ec..00000000000 --- a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/connector/ArgumentParser.java +++ /dev/null @@ -1,367 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.remote.internal.terminal.connector; - -import java.text.CharacterIterator; -import java.text.StringCharacterIterator; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Iterator; -import java.util.List; - -/** - * Utilitiy class for managing command line arguments. - * - */ -public class ArgumentParser { - private static List parseCommandline(String commandline) { - ArrayList result = new ArrayList(); - StringCharacterIterator iterator = new StringCharacterIterator(commandline); - - for (iterator.first(); iterator.current() != CharacterIterator.DONE; iterator.next()) { - - // Restart to skip white space - if (Character.isWhitespace(iterator.current())) { - continue; - } - - // Read token - StringBuffer buffer = new StringBuffer(); - token_reader: for (; iterator.current() != CharacterIterator.DONE; iterator.next()) { - char tokenChar = iterator.current(); - - // A white space terminates the token - if (Character.isWhitespace(tokenChar)) { - break token_reader; - } - - // Handle character that composes the token - switch (tokenChar) { - case '"': { - /* - * Read all text within double quotes or until end of - * string. Allows escaping. - */ - iterator.next(); // Skip quote - quoted_reader: while ((iterator.current() != CharacterIterator.DONE) && (iterator.current() != '"')) { - char innerChar = iterator.current(); - switch (innerChar) { - case '\\': - char nextChar = iterator.next(); - switch (nextChar) { - case CharacterIterator.DONE: - break quoted_reader; - case '"': - // Add the character, but remove the escape - buffer.append(nextChar); - iterator.next(); - continue quoted_reader; - default: - // Add the character and keep escape - buffer.append(innerChar); - buffer.append(nextChar); - iterator.next(); - continue quoted_reader; - } - default: - buffer.append(innerChar); - iterator.next(); - continue quoted_reader; - } - } - continue token_reader; - } - case '\'': { - /* - * Read all text within single quotes or until end of - * string. No escaping. - */ - iterator.next(); // Skip the quote - while ((iterator.current() != CharacterIterator.DONE) && (iterator.current() != '\'')) { - buffer.append(iterator.current()); - iterator.next(); - } - continue token_reader; - } - case '\\': { - /* - * Read escaped char. - */ - char nextChar = iterator.next(); - switch (nextChar) { - case CharacterIterator.DONE: - break token_reader; - case '\n': - // Ignore newline. Both lines are concatenated. - continue token_reader; - default: - // Add the character, but remove the escape - buffer.append(nextChar); - continue token_reader; - } - } - default: - /* - * Any other char, add to the buffer. - */ - buffer.append(tokenChar); - continue token_reader; - } - } - result.add(buffer.toString()); - } - - return result; - } - - private final List tokens; - - /** - * Create a command line representation from an array of strings. The first - * element of the list is assumed to be the command, the remaining, the - * arguments. The elements are not parsed not (un)escaped., but taked as the - * are. - * - */ - public ArgumentParser(List tokenList) { - this.tokens = new ArrayList(tokenList); - } - - /** - * Create a command line representation from the string with a shell command - * line. The command line is parsed and split on spaces. Quoted or escaped - * spaces are preserved.. - * - */ - public ArgumentParser(String commandline) { - this.tokens = parseCommandline(commandline); - } - - /** - * Create a command line representation from an array of strings. The first - * element of the array is assumed to be the command, the remaining, the - * arguments. The elements are not parsed not (un)escaped., but taked as the - * are. - * - */ - public ArgumentParser(String tokenArray[]) { - this(Arrays.asList(tokenArray)); - } - - /** - * Create a command line representation from the command and an list of - * parameters. The elements are not parsed not (un)escaped., but taked as - * the are. - * - */ - public ArgumentParser(String command, List parameterList) { - this.tokens = new ArrayList(); - this.tokens.add(command); - this.tokens.addAll(parameterList); - } - - /** - * Create a command line representation from the command and an array of - * parameters. The elements are not parsed not (un)escaped., but taked as - * the are. - * - */ - public ArgumentParser(String command, String parameterArray[]) { - this(command, Arrays.asList(parameterArray)); - } - - private StringBuffer escapeToken(String token, boolean fullEscape) { - StringBuffer buffer = new StringBuffer(); - StringCharacterIterator iter = new StringCharacterIterator(token); - for (char c = iter.first(); c != CharacterIterator.DONE; c = iter.next()) { - if (Character.isWhitespace(c)) { - buffer.append('\\'); - buffer.append(c); - continue; - } - switch (c) { - case '(': - case ')': - case '[': - case ']': - case '{': - case '}': - case '|': - case '\\': - case '*': - case '&': - case '^': - case '%': - case '$': - case '#': - case '@': - case '!': - case '~': - case '`': - case '\'': - case '"': - case ':': - case ';': - case '?': - case '>': - case '<': - case '\n': - if (fullEscape) { - buffer.append('\\'); - } - buffer.append(c); - continue; - case ' ': - buffer.append('\\'); - buffer.append(c); - continue; - default: - buffer.append(c); - continue; - } - } - return buffer; - } - - /** - * Returns the command of the command line, assuming that the first entry is - * always the command. - * - * @return The command or null if the command lines has no command nor - * arguments. - */ - public String getCommand() { - if (this.tokens.size() == 0) { - return null; - } - return this.tokens.get(0); - } - - /** - * Convert all tokens in a full command line that can be executed in a - * shell. - * - * @param fullEscape - * If every special character shall be escaped. If false, only - * white spaces are escaped and the shell will interpret the - * special chars. If true, then all special chars are quoted. - */ - public String getCommandLine(boolean fullEscape) { - StringBuffer buffer = new StringBuffer(); - Iterator iterator = this.tokens.iterator(); - boolean first = true; - while (iterator.hasNext()) { - String token = iterator.next(); - if (!first) { - buffer.append(' '); - } else { - first = false; - } - buffer.append(escapeToken(token, fullEscape)); - } - return buffer.toString(); - } - - /** - * Returns the command of the command line, assuming that the first entry is - * always the command. - * - * @return The command or null if the command lines has no command nor - * arguments. - * @param fullEscape - * If every special character shall be escaped. If false, only - * white spaces are escaped and the shell will interpret the - * special chars. If true, then all special chars are quoted. - */ - public String getEscapedCommand(boolean fullEscape) { - if (this.tokens.size() == 0) { - return null; - } - return escapeToken(this.tokens.get(0), fullEscape).toString(); - } - - /** - * Returns a list of all arguments, assuming that the first entry is the - * command name. - * - * @return The Array or null if the command lines has no command nor - * arguments. - */ - public String[] getParameterArray() { - if (this.tokens.size() == 0) { - return null; - } - return this.tokens.subList(1, this.tokens.size()).toArray(new String[this.tokens.size() - 1]); - } - - /** - * Returns a list of all arguments, assuming that the first entry is the - * command name. - * - * @return The List or null if the command lines has no command nor - * arguments. - */ - public List getParameterList() { - if (this.tokens.size() == 0) { - return null; - } - return new ArrayList(this.tokens.subList(1, this.tokens.size())); - } - - /** - * Returns the total number of entries. - * - * @return total number of entries - */ - public int getSize() { - return this.tokens.size(); - } - - /** - * Returns a List of all entries of the command line. - * - * @return The Array - */ - public String[] getTokenArray() { - return this.tokens.toArray(new String[this.tokens.size()]); - } - - /** - * Returns a List of all entries of the command line. - * - * @return The List - */ - public List getTokenList() { - return new ArrayList(this.tokens); - } - - /** - * Returns a representation of the command line for debug purposes. - */ - @Override - public String toString() { - StringBuffer buffer = new StringBuffer(); - buffer.append("<"); //$NON-NLS-1$ - Iterator iterator = this.tokens.iterator(); - boolean first = true; - while (iterator.hasNext()) { - String token = iterator.next(); - if (!first) { - buffer.append('\n'); - } else { - first = false; - } - buffer.append(token); - } - buffer.append(">"); //$NON-NLS-1$ - return buffer.toString(); - } -} diff --git a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/connector/RemoteConnectionManager.java b/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/connector/RemoteConnectionManager.java deleted file mode 100644 index f466a3e21e8..00000000000 --- a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/connector/RemoteConnectionManager.java +++ /dev/null @@ -1,183 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package org.eclipse.remote.internal.terminal.connector; - -import java.io.IOException; -import java.io.InputStream; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IConfigurationElement; -import org.eclipse.core.runtime.IExtension; -import org.eclipse.core.runtime.IExtensionPoint; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.RegistryFactory; -import org.eclipse.core.runtime.Status; -import org.eclipse.core.runtime.jobs.Job; -import org.eclipse.core.runtime.preferences.IEclipsePreferences; -import org.eclipse.core.runtime.preferences.InstanceScope; -import org.eclipse.osgi.util.NLS; -import org.eclipse.remote.core.IRemoteCommandShellService; -import org.eclipse.remote.core.IRemoteConnection; -import org.eclipse.remote.core.IRemoteConnectionType; -import org.eclipse.remote.core.IRemoteProcess; -import org.eclipse.remote.core.IRemoteProcessBuilder; -import org.eclipse.remote.core.IRemoteProcessService; -import org.eclipse.remote.core.IRemoteProcessTerminalService; -import org.eclipse.remote.core.IRemoteServicesManager; -import org.eclipse.remote.core.exception.RemoteConnectionException; -import org.eclipse.remote.internal.terminal.messages.Messages; -import org.eclipse.remote.internal.terminal.view.TerminalViewPlugin; -import org.eclipse.remote.terminal.IRemoteTerminalConstants; -import org.eclipse.remote.terminal.IRemoteTerminalParser; -import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl; -import org.eclipse.tm.internal.terminal.provisional.api.TerminalState; - -@SuppressWarnings("restriction") -public class RemoteConnectionManager extends Job { - private final static String PARSERS_EXTENSION_POINT = "parsers"; //$NON-NLS-1$ - private final static String PARSER_ELEMENT = "parser"; //$NON-NLS-1$ - private static int fgNo; - - private final ITerminalControl control; - private final RemoteConnector connector; - - private IRemoteProcess remoteProcess; - private IRemoteTerminalParser parser; - - protected RemoteConnectionManager(RemoteConnector conn, ITerminalControl control) { - super("Remote Terminal-" + fgNo++); //$NON-NLS-1$ - this.control = control; - this.connector = conn; - setSystem(true); - loadParserExtension(); - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor) - */ - @Override - protected IStatus run(IProgressMonitor monitor) { - IRemoteConnection remoteConnection = null; - - try { - IRemoteServicesManager svcMgr = TerminalViewPlugin.getService(IRemoteServicesManager.class); - String connTypeId = connector.getSshSettings().getRemoteServices(); - IRemoteConnectionType connType = svcMgr.getConnectionType(connTypeId); - if (connType != null) { - remoteConnection = connType.getConnection(connector.getSshSettings().getConnectionName()); - } - if (remoteConnection == null) { - throw new RemoteConnectionException(NLS.bind(Messages.RemoteConnectionManager_0, connector.getSshSettings() - .getConnectionName())); - } - - if (!remoteConnection.isOpen()) { - remoteConnection.open(monitor); - if (!remoteConnection.isOpen()) { - throw new RemoteConnectionException(NLS.bind(Messages.RemoteConnectionManager_1, connector.getSshSettings() - .getConnectionName())); - } - } - - if (parser != null) { - remoteProcess = parser.initialize(remoteConnection); - } else { - /* - * Check the terminal shell command preference. If the preference is empty and we support a command shell, - * just use that. Otherwise use the preference value if it is set, or fall back to a default if not. - */ - IEclipsePreferences prefs = InstanceScope.INSTANCE.getNode(TerminalViewPlugin.getUniqueIdentifier()); - String terminalShellCommand = prefs.get(IRemoteTerminalConstants.PREF_TERMINAL_SHELL_COMMAND, ""); //$NON-NLS-1$ - if (remoteConnection.hasService(IRemoteCommandShellService.class)) { - IRemoteCommandShellService cmdShellSvc = remoteConnection.getService(IRemoteCommandShellService.class); - remoteProcess = cmdShellSvc.getCommandShell(IRemoteProcessBuilder.ALLOCATE_PTY); - } else { - if ("".equals(terminalShellCommand)) { //$NON-NLS-1$ - terminalShellCommand = "/bin/bash -l"; //$NON-NLS-1$ - } - IRemoteProcessService procSvc = remoteConnection.getService(IRemoteProcessService.class); - IRemoteProcessBuilder processBuilder = procSvc.getProcessBuilder(new ArgumentParser(terminalShellCommand) - .getTokenList()); - remoteProcess = processBuilder.start(IRemoteProcessBuilder.ALLOCATE_PTY); - } - } - - connector.setInputStream(remoteProcess.getInputStream()); - control.setState(TerminalState.CONNECTED); - control.setTerminalTitle(remoteConnection.getName()); - connector.setOutputStream(remoteProcess.getOutputStream()); - - // read data until the connection gets terminated - readData(connector.getInputStream()); - } catch (IOException e) { - return new Status(IStatus.ERROR, TerminalViewPlugin.getUniqueIdentifier(), e.getMessage()); - } catch (RemoteConnectionException e) { - return new Status(IStatus.ERROR, TerminalViewPlugin.getUniqueIdentifier(), e.getMessage()); - } finally { - // make sure the terminal is disconnected when the thread ends - connector.disconnect(); - synchronized (this) { - if (remoteProcess != null && !remoteProcess.isCompleted()) { - remoteProcess.destroy(); - } - } - } - return Status.OK_STATUS; - } - - public void setTerminalSize(int cols, int rows, int width, int height) { - if (remoteProcess != null) { - IRemoteProcessTerminalService termService = remoteProcess.getService(IRemoteProcessTerminalService.class); - if (termService != null) { - termService.setTerminalSize(cols, rows, width, height); - } - } - } - - /** - * Read the data from the connection and display it in the terminal. - * - * @param in - * @throws IOException - */ - private void readData(InputStream in) throws IOException { - byte[] buf = new byte[32 * 1024]; - while (getState() == Job.RUNNING) { - int n = in.read(buf, 0, buf.length); - if (n < 0) { - break; - } - if (n > 0 && (parser == null || parser.parse(buf))) { - control.getRemoteToTerminalOutputStream().write(buf, 0, n); - } - } - } - - private void loadParserExtension() { - IExtensionPoint point = RegistryFactory.getRegistry().getExtensionPoint(TerminalViewPlugin.getUniqueIdentifier(), - PARSERS_EXTENSION_POINT); - if (point != null) { - IExtension[] extensions = point.getExtensions(); - for (IExtension extension : extensions) { - IConfigurationElement[] elements = extension.getConfigurationElements(); - for (IConfigurationElement element : elements) { - if (PARSER_ELEMENT.equals(element.getName())) { - try { - parser = (IRemoteTerminalParser) element.createExecutableExtension("class"); //$NON-NLS-1$ - } catch (CoreException e) { - TerminalViewPlugin.log(e); - } - } - } - } - } - } -} diff --git a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/connector/RemoteConnector.java b/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/connector/RemoteConnector.java deleted file mode 100644 index 64dd98e7fcc..00000000000 --- a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/connector/RemoteConnector.java +++ /dev/null @@ -1,180 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package org.eclipse.remote.internal.terminal.connector; - -import java.io.InputStream; -import java.io.OutputStream; - -import org.eclipse.remote.internal.terminal.settings.RemoteSettings; -import org.eclipse.remote.internal.terminal.settings.RemoteSettingsPage; -import org.eclipse.remote.internal.terminal.view.TerminalViewPlugin; -import org.eclipse.remote.terminal.IRemoteSettings; -import org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage; -import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore; -import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl; -import org.eclipse.tm.internal.terminal.provisional.api.TerminalState; -import org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl; - -@SuppressWarnings("restriction") -public class RemoteConnector extends TerminalConnectorImpl { - private OutputStream fOutputStream; - private InputStream fInputStream; - private RemoteConnectionManager fConnection; - private int fWidth; - private int fHeight; - private final RemoteSettings fSettings; - - public RemoteConnector() { - this(new RemoteSettings()); - } - - public RemoteConnector(RemoteSettings settings) { - fSettings = settings; - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl#connect(org.eclipse.tm.internal.terminal. - * provisional.api.ITerminalControl) - */ - @Override - public void connect(ITerminalControl control) { - super.connect(control); - fControl.setState(TerminalState.CONNECTING); - fConnection = new RemoteConnectionManager(this, control); - fConnection.schedule(); - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl#doDisconnect() - */ - @Override - public synchronized void doDisconnect() { - if (getInputStream() != null) { - try { - getInputStream().close(); - } catch (Exception exception) { - TerminalViewPlugin.log(exception); - } - } - - if (getTerminalToRemoteStream() != null) { - try { - getTerminalToRemoteStream().close(); - } catch (Exception exception) { - TerminalViewPlugin.log(exception); - } - } - - fConnection.cancel(); - } - - public InputStream getInputStream() { - return fInputStream; - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl#getSettingsSummary() - */ - @Override - public String getSettingsSummary() { - return fSettings.getSummary(); - } - - /** - * Return the SSH Settings. - * - * @return the settings for a concrete connection. - * @since org.eclipse.tm.terminal.ssh 2.0 renamed from getTelnetSettings() - */ - public IRemoteSettings getSshSettings() { - return fSettings; - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl#getTerminalToRemoteStream() - */ - @Override - public OutputStream getTerminalToRemoteStream() { - return fOutputStream; - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl#initialize() - */ - @Override - public void initialize() throws Exception { - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl#load(org.eclipse.tm.internal.terminal.provisional - * .api.ISettingsStore) - */ - @Override - public void load(ISettingsStore store) { - fSettings.load(store); - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl#makeSettingsPage() - */ - @Override - public ISettingsPage makeSettingsPage() { - return new RemoteSettingsPage(fSettings); - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl#save(org.eclipse.tm.internal.terminal.provisional - * .api.ISettingsStore) - */ - @Override - public void save(ISettingsStore store) { - fSettings.save(store); - } - - public void setInputStream(InputStream inputStream) { - fInputStream = inputStream; - } - - public void setOutputStream(OutputStream outputStream) { - fOutputStream = outputStream; - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl#setTerminalSize(int, int) - */ - @Override - public void setTerminalSize(int newWidth, int newHeight) { - if (fConnection != null && (newWidth != fWidth || newHeight != fHeight)) { - // avoid excessive communications due to change size requests by caching previous size - fConnection.setTerminalSize(newWidth, newHeight, 8 * newWidth, 8 * newHeight); - fWidth = newWidth; - fHeight = newHeight; - } - } -} diff --git a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/messages/Messages.java b/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/messages/Messages.java deleted file mode 100644 index 45f396faece..00000000000 --- a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/messages/Messages.java +++ /dev/null @@ -1,29 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package org.eclipse.remote.internal.terminal.messages; - -import org.eclipse.osgi.util.NLS; - -public class Messages extends NLS { - private static final String BUNDLE_NAME = "org.eclipse.remote.internal.terminal.messages.messages"; //$NON-NLS-1$ - - public static String RemoteConnectionManager_0; - - public static String RemoteConnectionManager_1; - - public static String RemoteTerminalPreferencePage_0; - - public static String TERMINAL_EXCEPTION; - static { - // initialize resource bundle - NLS.initializeMessages(BUNDLE_NAME, Messages.class); - } - - private Messages() { - } -} diff --git a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/messages/messages.properties b/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/messages/messages.properties deleted file mode 100644 index 0690775e652..00000000000 --- a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/messages/messages.properties +++ /dev/null @@ -1,13 +0,0 @@ -############################################################################### -# Copyright (c) 2015 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 -############################################################################### -RemoteConnectionManager_0=Unable to create connection: {0} -RemoteConnectionManager_1=Unable to to open connection: {0} -RemoteTerminalPreferencePage_0=Initial Shell Command -TERMINAL_EXCEPTION=Remote Terminal Exception diff --git a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/preferences/RemoteTerminalPreferenceInitializer.java b/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/preferences/RemoteTerminalPreferenceInitializer.java deleted file mode 100644 index 400d7b297f1..00000000000 --- a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/preferences/RemoteTerminalPreferenceInitializer.java +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package org.eclipse.remote.internal.terminal.preferences; - -import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer; -import org.eclipse.core.runtime.preferences.DefaultScope; -import org.eclipse.core.runtime.preferences.IEclipsePreferences; -import org.eclipse.remote.internal.terminal.view.TerminalViewPlugin; -import org.eclipse.remote.terminal.IRemoteTerminalConstants; - -public class RemoteTerminalPreferenceInitializer extends AbstractPreferenceInitializer { - - public RemoteTerminalPreferenceInitializer() { - } - - @Override - public void initializeDefaultPreferences() { - IEclipsePreferences defaultPrefs = DefaultScope.INSTANCE.getNode(TerminalViewPlugin.getUniqueIdentifier()); - defaultPrefs.put(IRemoteTerminalConstants.PREF_TERMINAL_SHELL_COMMAND, ""); //$NON-NLS-1$ - } -} diff --git a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/preferences/RemoteTerminalPreferencePage.java b/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/preferences/RemoteTerminalPreferencePage.java deleted file mode 100644 index 6369f025950..00000000000 --- a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/preferences/RemoteTerminalPreferencePage.java +++ /dev/null @@ -1,39 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package org.eclipse.remote.internal.terminal.preferences; - -import org.eclipse.core.runtime.preferences.InstanceScope; -import org.eclipse.jface.preference.FieldEditorPreferencePage; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.preference.StringFieldEditor; -import org.eclipse.remote.internal.terminal.messages.Messages; -import org.eclipse.remote.internal.terminal.view.TerminalViewPlugin; -import org.eclipse.remote.terminal.IRemoteTerminalConstants; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.IWorkbenchPreferencePage; -import org.eclipse.ui.preferences.ScopedPreferenceStore; - -public class RemoteTerminalPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage { - @Override - protected void createFieldEditors() { - Composite parent = getFieldEditorParent(); - addField(new StringFieldEditor(IRemoteTerminalConstants.PREF_TERMINAL_SHELL_COMMAND, - Messages.RemoteTerminalPreferencePage_0, parent)); - } - - @Override - public IPreferenceStore doGetPreferenceStore() { - return new ScopedPreferenceStore(InstanceScope.INSTANCE, TerminalViewPlugin.getUniqueIdentifier()); - } - - @Override - public void init(IWorkbench workbench) { - // Nothing - } -} diff --git a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/settings/RemoteSettings.java b/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/settings/RemoteSettings.java deleted file mode 100644 index b4a471a177b..00000000000 --- a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/settings/RemoteSettings.java +++ /dev/null @@ -1,61 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package org.eclipse.remote.internal.terminal.settings; - -import org.eclipse.remote.terminal.IRemoteSettings; -import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore; - -@SuppressWarnings("restriction") -public class RemoteSettings implements IRemoteSettings { - protected String fRemoteServices; - protected String fConnectionName; - - public RemoteSettings() { - } - - public String getConnectionName() { - return fConnectionName; - } - - public String getRemoteServices() { - return fRemoteServices; - } - - public String getSummary() { - return "Remote:" + getRemoteServices() + '_' + getConnectionName(); //$NON-NLS-1$ - } - - @Override - public String toString() { - return getSummary(); - } - - /** - * Load information into the RemoteSettings object. - */ - public void load(ISettingsStore store) { - fRemoteServices = store.get(REMOTE_SERVICES); - fConnectionName = store.get(CONNECTION_NAME); - } - - /** - * Extract information from the RemoteSettings object. - */ - public void save(ISettingsStore store) { - store.put(REMOTE_SERVICES, fRemoteServices); - store.put(CONNECTION_NAME, fConnectionName); - } - - public void setConnectionName(String name) { - fConnectionName = name; - } - - public void setRemoteServices(String remoteServices) { - fRemoteServices = remoteServices; - } -} diff --git a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/settings/RemoteSettingsPage.java b/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/settings/RemoteSettingsPage.java deleted file mode 100644 index 0b3e9409521..00000000000 --- a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/settings/RemoteSettingsPage.java +++ /dev/null @@ -1,78 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package org.eclipse.remote.internal.terminal.settings; - -import java.util.List; - -import org.eclipse.remote.core.IRemoteCommandShellService; -import org.eclipse.remote.core.IRemoteConnectionType; -import org.eclipse.remote.core.IRemoteProcessService; -import org.eclipse.remote.core.IRemoteServicesManager; -import org.eclipse.remote.internal.ui.RemoteUIPlugin; -import org.eclipse.remote.ui.widgets.RemoteConnectionWidget; -import org.eclipse.swt.SWT; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.tm.internal.terminal.provisional.api.AbstractSettingsPage; - -@SuppressWarnings("restriction") -public class RemoteSettingsPage extends AbstractSettingsPage { - private final RemoteSettings fTerminalSettings; - private RemoteConnectionWidget fRemoteConnectionWidget; - - public RemoteSettingsPage(RemoteSettings settings) { - fTerminalSettings = settings; - } - - @Override - public void saveSettings() { - fTerminalSettings.setRemoteServices(fRemoteConnectionWidget.getConnection().getConnectionType().getId()); - fTerminalSettings.setConnectionName(fRemoteConnectionWidget.getConnection().getName()); - } - - @Override - public void loadSettings() { - if (fTerminalSettings != null) { - fRemoteConnectionWidget.setConnection(fTerminalSettings.getRemoteServices(), fTerminalSettings.getConnectionName()); - } - } - - String get(String value, String def) { - if (value == null || value.length() == 0) { - return def; - } - return value; - } - - @Override - public boolean validateSettings() { - if (fRemoteConnectionWidget.getConnection() == null) { - return false; - } - return true; - } - - @Override - public void createControl(Composite parent) { - Composite composite = new Composite(parent, SWT.NONE); - GridLayout gridLayout = new GridLayout(2, false); - GridData gridData = new GridData(GridData.FILL_HORIZONTAL); - - composite.setLayout(gridLayout); - composite.setLayoutData(gridData); - - IRemoteServicesManager manager = RemoteUIPlugin.getService(IRemoteServicesManager.class); - // TODO remove the remote process service once we get command shell available with ssh and local - @SuppressWarnings("unchecked") - List connTypes = manager.getConnectionTypesSupporting(IRemoteCommandShellService.class, IRemoteProcessService.class); - - fRemoteConnectionWidget = new RemoteConnectionWidget(composite, SWT.NONE, null, 0, connTypes); - loadSettings(); - } -} diff --git a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/ITerminalView.java b/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/ITerminalView.java deleted file mode 100644 index d24ef496df1..00000000000 --- a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/ITerminalView.java +++ /dev/null @@ -1,55 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 2015 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: - * Michael Scharf (Wind River) - initial API and implementation - * Martin Oberhuber (Wind River) - [227537] moved actions from terminal.view to terminal plugin - * Michael Scharf (Wind River) - [172483] switch between connections - * Michael Scharf (Wind River) - [240023] Get rid of the terminal's "Pin" button - * Kris De Volder (VMWare) - [392092] Extend ITerminalView API to allow programmatically opening a UI-less connector - *******************************************************************************/ -package org.eclipse.remote.internal.terminal.view; - -import org.eclipse.tm.internal.terminal.provisional.api.ITerminalConnector; - -public interface ITerminalView { - - /** - * Create a new terminal connection within the view. - */ - void onTerminalNewTerminal(); - - /** - * Programmatically create a new terminal connection within the view. This method - * does the same thing as onTerminalNewTerminal, but instead of popping up a settings - * dialog to allow the user fill in connection details, a connector is provided as - * a parameter. The connector should have all of its details pre-configured so it can - * be opened without requiring user input. - */ - void newTerminal(ITerminalConnector c); - - /** - * Create a new Terminal view. - */ - void onTerminalNewView(); - - void onTerminalConnect(); - - void onTerminalDisconnect(); - - void onTerminalSettings(); - - void onTerminalFontChanged(); - - boolean hasCommandInputField(); - - void setCommandInputField(boolean on); - - boolean isScrollLock(); - - void setScrollLock(boolean b); -} diff --git a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/ITerminalViewConnection.java b/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/ITerminalViewConnection.java deleted file mode 100644 index 1e3327eed6c..00000000000 --- a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/ITerminalViewConnection.java +++ /dev/null @@ -1,88 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2015 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: - * Michael Scharf (Wind River) - initial API and implementation - * Ahmet Alptekin (Tubitak) - [244405] Add a UI Control for setting the Terminal's encoding - *******************************************************************************/ -package org.eclipse.remote.internal.terminal.view; - -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.tm.internal.terminal.control.ITerminalViewControl; -import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore; -import org.eclipse.tm.internal.terminal.provisional.api.TerminalState; - -/** - * Represents a connection. The connection might be connected - * or not. - * - */ -public interface ITerminalViewConnection { - - /** - * @return the summary shown in the status line and - * in the drop down box of the connections - */ - String getFullSummary(); - - /** - * @param name the name of the view - */ - void setPartName(String name); - /** - * @return the name of the view (never null) - */ - String getPartName(); - - /** - * @return an image that represents this connection - */ - ImageDescriptor getImageDescriptor(); - /** - * @return the control of this connection - */ - ITerminalViewControl getCtlTerminal(); - - void saveState(ISettingsStore store); - - void loadState(ISettingsStore store); - - /** - * @return true if the input field is visible - */ - boolean hasCommandInputField(); - /** - * @param on turns the input field on - */ - void setCommandInputField(boolean on); - - /** - * @param state changes of the state (might change the summary) - */ - void setState(TerminalState state); - - /** - * @param title used in the summary. If null the summary - * is created automatically - */ - void setTerminalTitle(String title); - - /** - * TODO: legacy (needed to read the old state) - * @param summary - */ - void setSummary(String summary); - /** - * @param encoding the encoding of this connection - */ - void setEncoding(String encoding); - - /** - * @return the encoding of this connection - */ - String getEncoding(); -} \ No newline at end of file diff --git a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/ITerminalViewConnectionManager.java b/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/ITerminalViewConnectionManager.java deleted file mode 100644 index f84af818ab3..00000000000 --- a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/ITerminalViewConnectionManager.java +++ /dev/null @@ -1,83 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2015 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: - * Michael Scharf (Wind River) - initial API and implementation - *******************************************************************************/ -package org.eclipse.remote.internal.terminal.view; - -import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore; - - -/** - * Supports multiple connections - * - */ -public interface ITerminalViewConnectionManager { - /** - * Notifies any change in the state of the connections: - *
    - *
  • a connection is added or removed - *
  • the active connection has changed - *
- * - */ - interface ITerminalViewConnectionListener { - void connectionsChanged(); - } - /** - * Used to create instances of the ITerminalViewConnection - * when the state is read from the {@link ISettings} - * - */ - interface ITerminalViewConnectionFactory { - ITerminalViewConnection create(); - } - /** - * @return a list of all connections this view can display - */ - ITerminalViewConnection[] getConnections(); - /** - * @return the number of connections - */ - int size(); - /** - * @return th connection the view is showing at the moment - */ - ITerminalViewConnection getActiveConnection(); - - /** - * @param conn make this connection the active connection - */ - void setActiveConnection(ITerminalViewConnection conn); - /** - * If more than two connections are available, remove the active connection - */ - void removeActive(); - - /** - * @param conn adds a new connection - */ - void addConnection(ITerminalViewConnection conn); - - /** - * If there are more than two connections toggle between this and the - * previously shown connection - */ - void swapConnection(); - - void addListener(ITerminalViewConnectionListener listener); - void removeListener(ITerminalViewConnectionListener listener); - - void saveState(ISettingsStore store); - /** - * @param store - * @param factory used to create new {@link ITerminalViewConnection} - */ - void loadState(ISettingsStore store,ITerminalViewConnectionFactory factory); - -} \ No newline at end of file diff --git a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/ImageConsts.java b/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/ImageConsts.java deleted file mode 100644 index 9fd1dceefd0..00000000000 --- a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/ImageConsts.java +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2015 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 - * - * Initial Contributors: - * The following Wind River employees contributed to the Terminal component - * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb, - * Helmut Haigermoser and Ted Williams. - * - * Contributors: - * Michael Scharf (Wind River) - extracted from TerminalConsts - * Martin Oberhuber (Wind River) - fixed copyright headers and beautified - * Anna Dushistova (MontaVista) - [227537] moved actions from terminal.view to terminal plugin - * Michael Scharf (Wind River) - [172483] added some more icons - * Michael Scharf (Wind River) - [240023] Get rid of the terminal's "Pin" button - *******************************************************************************/ -package org.eclipse.remote.internal.terminal.view; - -public interface ImageConsts -{ - public final static String IMAGE_DIR_ROOT = "icons/"; //$NON-NLS-1$ - public final static String IMAGE_DIR_LOCALTOOL = "clcl16/"; // basic colors - size 16x16 //$NON-NLS-1$ - public final static String IMAGE_DIR_DLCL = "dlcl16/"; // disabled - size 16x16 //$NON-NLS-1$ - public final static String IMAGE_DIR_ELCL = "elcl16/"; // enabled - size 16x16 //$NON-NLS-1$ - public final static String IMAGE_DIR_VIEW = "cview16/"; // views //$NON-NLS-1$ - public final static String IMAGE_DIR_EVIEW = "eview16/"; // views //$NON-NLS-1$ - - public static final String IMAGE_NEW_TERMINAL = "TerminalViewNewTerminal"; //$NON-NLS-1$ - public static final String IMAGE_TERMINAL_VIEW = "TerminalView"; //$NON-NLS-1$ - public static final String IMAGE_CLCL_CONNECT = "ImageClclConnect"; //$NON-NLS-1$ - public static final String IMAGE_CLCL_DISCONNECT = "ImageClclDisconnect"; //$NON-NLS-1$ - public static final String IMAGE_CLCL_SETTINGS = "ImageClclSettings"; //$NON-NLS-1$ - public static final String IMAGE_CLCL_SCROLL_LOCK = "ImageClclScrollLock"; //$NON-NLS-1$ - - public static final String IMAGE_DLCL_CONNECT = "ImageDlclConnect"; //$NON-NLS-1$ - public static final String IMAGE_DLCL_DISCONNECT = "ImageDlclDisconnect"; //$NON-NLS-1$ - public static final String IMAGE_DLCL_SETTINGS = "ImageDlclSettings"; //$NON-NLS-1$ - public static final String IMAGE_DLCL_SCROLL_LOCK = "ImageDlclScrollLock"; //$NON-NLS-1$ - public static final String IMAGE_DLCL_REMOVE = "ImageDlclRemove"; //$NON-NLS-1$ - - public static final String IMAGE_ELCL_CONNECT = "ImageElclConnect"; //$NON-NLS-1$ - public static final String IMAGE_ELCL_DISCONNECT = "ImageElclDisconnect"; //$NON-NLS-1$ - public static final String IMAGE_ELCL_SETTINGS = "ImageElclSettings"; //$NON-NLS-1$ - public static final String IMAGE_ELCL_SCROLL_LOCK = "ImageElclScrollLock"; //$NON-NLS-1$ - public static final String IMAGE_ELCL_REMOVE = "ImageElclRemove"; //$NON-NLS-1$ - public static final String IMAGE_CLCL_COMMAND_INPUT_FIELD = "ImageClclCommandInputField";//$NON-NLS-1$ - public static final String IMAGE_ELCL_COMMAND_INPUT_FIELD = "ImageDlclCommandInputField";//$NON-NLS-1$ - public static final String IMAGE_DLCL_COMMAND_INPUT_FIELD = "ImageDlclCommandInputField";//$NON-NLS-1$ - } diff --git a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/PageBook.java b/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/PageBook.java deleted file mode 100644 index e7244808af7..00000000000 --- a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/PageBook.java +++ /dev/null @@ -1,34 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 2015 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: - * Michael Scharf (Wind River) - simplified implementation - *******************************************************************************/ -package org.eclipse.remote.internal.terminal.view; - -import org.eclipse.swt.custom.StackLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; - -/** - * A pagebook is a composite control where only a single control is visible at a - * time. It is similar to a notebook, but without tabs. - * - * @noextend This class is not intended to be subclassed by clients. - */ -public class PageBook extends Composite { - private StackLayout fLayout; - public PageBook(Composite parent, int style) { - super(parent, style); - fLayout= new StackLayout(); - setLayout(fLayout); - } - public void showPage(Control page) { - fLayout.topControl= page; - layout(); - } -} diff --git a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/SettingStorePrefixDecorator.java b/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/SettingStorePrefixDecorator.java deleted file mode 100644 index fc2860c4cc6..00000000000 --- a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/SettingStorePrefixDecorator.java +++ /dev/null @@ -1,35 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 2015 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: - * Michael Scharf (Wind River) - initial API and implementation - *******************************************************************************/ -package org.eclipse.remote.internal.terminal.view; - -import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore; - -public class SettingStorePrefixDecorator implements ISettingsStore { - private final String fPrefix; - private final ISettingsStore fStore; - SettingStorePrefixDecorator(ISettingsStore store,String prefix) { - fPrefix=prefix; - fStore=store; - } - - public String get(String key) { - return fStore.get(fPrefix+key); - } - - public String get(String key, String defaultValue) { - return fStore.get(fPrefix+key,defaultValue); - } - - public void put(String key, String value) { - fStore.put(fPrefix+key,value); - } - -} diff --git a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/SettingsStore.java b/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/SettingsStore.java deleted file mode 100644 index d423789ba51..00000000000 --- a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/SettingsStore.java +++ /dev/null @@ -1,124 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 2015 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: - * Michael Scharf (Wind River) - initial API and implementation - *******************************************************************************/ -package org.eclipse.remote.internal.terminal.view; - -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -import org.eclipse.jface.dialogs.IDialogSettings; -import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore; -import org.eclipse.ui.IMemento; - -/** - * A {@link IDialogSettings} based {@link ISettingsStore}. - * - * Setting Store based on IMemento. IMemento documentations says only alpha numeric - * values may be used as keys. Therefore the implementation converts dots (.) into - * child elements of the memento. - * - * @author Michael Scharf - */ -public class SettingsStore implements ISettingsStore { - - private static final String KEYS = "_keys_"; //$NON-NLS-1$ - final private Map fMap = new HashMap<>(); - - public SettingsStore(IMemento memento) { - if (memento == null) { - return; - } - // load all keys ever used from the memento - String keys = memento.getString(KEYS); - if (keys != null) { - String[] keyNames = keys.split(","); //$NON-NLS-1$ - for (String keyName : keyNames) { - String key = keyName; - if (!KEYS.equals(key)) { - // get the dot separated elements - String[] path = key.split("\\."); //$NON-NLS-1$ - IMemento m = memento; - // iterate over all but the last segment and get the children... - for (int iPath = 0; m != null && iPath + 1 < path.length; iPath++) { - m = m.getChild(path[iPath]); - } - if (m != null) { - // cache the value in the map - fMap.put(key, m.getString(path[path.length - 1])); - } - } - } - } - } - - @Override - public String get(String key) { - return get(key, null); - } - - @Override - public String get(String key, String defaultValue) { - String value = fMap.get(key); - if ((value == null) || (value.equals(""))) { //$NON-NLS-1$ - return defaultValue; - } - - return value; - } - - @Override - public void put(String key, String value) { - if (!key.matches("^[\\w.]+$")) { //$NON-NLS-1$ - throw new IllegalArgumentException("Key '" + key + "' is not alpha numeric or '.'!"); //$NON-NLS-1$ //$NON-NLS-2$ - } - // null values remove the key from the map - if ((value == null) || (value.equals(""))) { //$NON-NLS-1$ - fMap.remove(key); - } else { - fMap.put(key, value); - } - } - - /** - * Save the state into memento. - * - * @param memento - * Memento to save state into. - */ - public void saveState(IMemento memento) { - String[] keyNames = fMap.keySet().toArray(new String[fMap.size()]); - Arrays.sort(keyNames); - StringBuffer buffer = new StringBuffer(); - for (int i = 0; i < keyNames.length; i++) { - String key = keyNames[i]; - String[] path = key.split("\\."); //$NON-NLS-1$ - IMemento m = memento; - // iterate over all but the last segment and get the children... - for (int iPath = 0; iPath + 1 < path.length; iPath++) { - IMemento child = m.getChild(path[iPath]); - // if the child does not exist, create it - if (child == null) { - child = m.createChild(path[iPath]); - } - m = child; - } - // use the last element in path as key of the child memento - m.putString(path[path.length - 1], fMap.get(key)); - // construct the string for the keys - if (i > 0) { - buffer.append(","); //$NON-NLS-1$ - } - buffer.append(key); - } - // save the keys we have used. - memento.putString(KEYS, buffer.toString()); - } -} diff --git a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/TerminalSettingsDialog.java b/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/TerminalSettingsDialog.java deleted file mode 100644 index 84ca59e8fd9..00000000000 --- a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/TerminalSettingsDialog.java +++ /dev/null @@ -1,528 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2015 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 - * - * Initial Contributors: - * The following Wind River employees contributed to the Terminal component - * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb, - * Helmut Haigermoser and Ted Williams. - * - * Contributors: - * Michael Scharf (Wind River) - split into core, view and connector plugins - * Martin Oberhuber (Wind River) - fixed copyright headers and beautified - * Martin Oberhuber (Wind River) - [168197] Replace JFace MessagDialog by SWT MessageBox - * Martin Oberhuber (Wind River) - [168186] Add Terminal User Docs - * Michael Scharf (Wind River) - [196454] Initial connection settings dialog should not be blank - * Michael Scharf (Wind River) - [240023] Get rid of the terminal's "Pin" button - * Martin Oberhuber (Wind River) - [206917] Add validation for Terminal Settings - * Uwe Stieber (Wind River) - [282996] [terminal][api] Add "hidden" attribute to terminal connector extension point - * Ahmet Alptekin (Tubitak) - [244405] Add a UI Control for setting the Terminal's encoding - *******************************************************************************/ -package org.eclipse.remote.internal.terminal.view; - -import java.nio.charset.Charset; -import java.nio.charset.IllegalCharsetNameException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Iterator; -import java.util.List; - -import org.eclipse.jface.dialogs.Dialog; -import org.eclipse.jface.dialogs.IDialogConstants; -import org.eclipse.jface.dialogs.IDialogSettings; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Combo; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Group; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.MessageBox; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.swt.widgets.Text; -import org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage; -import org.eclipse.tm.internal.terminal.provisional.api.ITerminalConnector; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.forms.events.ExpansionEvent; -import org.eclipse.ui.forms.events.IExpansionListener; -import org.eclipse.ui.forms.widgets.ExpandableComposite; - -public class TerminalSettingsDialog extends Dialog { - private Combo fEncodingCombo; - private Combo fCtlConnTypeCombo; - private Text fTerminalTitleText; - private final ITerminalConnector[] fConnectors; - private final ISettingsPage[] fPages; - /** - * Maps the fConnectors index to the fPages index - */ - private final int[] fPageIndex; - private int fNPages; - private int fSelectedConnector; - private PageBook fPageBook; - private IDialogSettings fDialogSettings; - private String fTerminalTitle; - private String fTitle = ViewMessages.TERMINALSETTINGS; - private String fEncoding; - - public TerminalSettingsDialog(Shell shell, ITerminalConnector[] connectors, ITerminalConnector connector) { - super(shell); - fConnectors = getValidConnectors(connectors); - fPages = new ISettingsPage[fConnectors.length]; - fPageIndex = new int[fConnectors.length]; - fSelectedConnector = -1; - for (int i = 0; i < fConnectors.length; i++) { - if (fConnectors[i] == connector) { - fSelectedConnector = i; - } - } - } - - public void setTitle(String title) { - fTitle = title; - } - - /** - * @param connectors - * @return connectors excluding connectors with errors - */ - private ITerminalConnector[] getValidConnectors(ITerminalConnector[] connectors) { - List list = new ArrayList(Arrays.asList(connectors)); - for (Iterator iterator = list.iterator(); iterator.hasNext();) { - ITerminalConnector info = (ITerminalConnector) iterator.next(); - if (info.isInitialized() && info.getInitializationErrorMessage() != null || info.isHidden()) { - iterator.remove(); - } - } - connectors = (ITerminalConnector[]) list.toArray(new ITerminalConnector[list.size()]); - return connectors; - } - - private ISettingsPage getPage(int i) { - if (fPages[i] == null) { - if (fConnectors[i].getInitializationErrorMessage() != null) { - // create a error message - final ITerminalConnector conn = fConnectors[i]; - fPages[i] = new ISettingsPage() { - @Override - public void createControl(Composite parent) { - Label l = new Label(parent, SWT.WRAP); - String error = NLS.bind(ViewMessages.CONNECTOR_NOT_AVAILABLE, conn.getName()); - l.setText(error); - l.setForeground(l.getDisplay().getSystemColor(SWT.COLOR_RED)); - String msg = NLS.bind(ViewMessages.CANNOT_INITIALIZE, conn.getName(), conn.getInitializationErrorMessage()); - // [168197] Replace JFace MessagDialog by SWT MessageBox - // MessageDialog.openError(getShell(), error, msg); - MessageBox mb = new MessageBox(getShell(), SWT.ICON_ERROR | SWT.OK); - mb.setText(error); - mb.setMessage(msg); - mb.open(); - } - - @Override - public void loadSettings() { - } - - @Override - public void saveSettings() { - } - - @Override - public boolean validateSettings() { - return false; - } - - @Override - public void addListener(Listener listener) { - } - - @Override - public void removeListener(Listener listener) { - } - }; - } else { - fPages[i] = fConnectors[i].makeSettingsPage(); - } - // TODO: what happens if an error occurs while - // the control is partly created? - fPages[i].createControl(fPageBook); - fPageIndex[i] = fNPages++; - resize(); - } - return fPages[i]; - - } - - private void resize() { - Point size = getShell().getSize(); - Point newSize = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT, true); - newSize.x = Math.max(newSize.x, size.x); - newSize.y = Math.max(newSize.y, size.y); - if (newSize.x != size.x || newSize.y != size.y) { - setShellSize(newSize); - } else { - fPageBook.getParent().layout(); - } - } - - /** - * Increase the size of this dialog's Shell by the specified amounts. - * Do not increase the size of the Shell beyond the bounds of the Display. - */ - protected void setShellSize(Point size) { - Rectangle bounds = getShell().getMonitor().getClientArea(); - getShell().setSize(Math.min(size.x, bounds.width), Math.min(size.y, bounds.height)); - } - - @Override - protected void okPressed() { - if (!validateSettings()) { - showErrorMessage(ViewMessages.INVALID_SETTINGS); - return; - } - if (!updateValidState()) { - showErrorMessage(ViewMessages.ENCODING_NOT_AVAILABLE); - return; - } - if (fSelectedConnector >= 0) { - getPage(fSelectedConnector).saveSettings(); - } - fTerminalTitle = fTerminalTitleText.getText(); - fEncoding = fEncodingCombo.getText(); - super.okPressed(); - } - - @Override - protected void cancelPressed() { - fSelectedConnector = -1; - super.cancelPressed(); - } - - @Override - public int open() { - setShellStyle(getShellStyle() | SWT.RESIZE); - return super.open(); - } - - @Override - protected void configureShell(Shell newShell) { - super.configureShell(newShell); - - newShell.setText(fTitle); - } - - @Override - protected Control createDialogArea(Composite parent) { - Composite ctlComposite = (Composite) super.createDialogArea(parent); - PlatformUI.getWorkbench().getHelpSystem() - .setHelp(ctlComposite, TerminalViewPlugin.getUniqueIdentifier() + ".terminal_settings"); //$NON-NLS-1$ - - setupPanel(ctlComposite); - setupListeners(); - initFields(); - - ctlComposite.layout(); - return ctlComposite; - } - - @Override - public void create() { - super.create(); - // initialize the OK button after creating the all dialog elements - updateOKButton(); - } - - private void initFields() { - // Load controls - if (fCtlConnTypeCombo != null) { - for (ITerminalConnector fConnector : fConnectors) { - fCtlConnTypeCombo.add(fConnector.getName()); - } - } - int selectedConnector = getInitialConnector(); - if (selectedConnector >= 0) { - if (fCtlConnTypeCombo != null) { - fCtlConnTypeCombo.select(selectedConnector); - } - selectPage(selectedConnector); - } - doLoad(); - setCombo(fEncodingCombo, fEncoding); - } - - /** - * @return the connector to show when the dialog opens - */ - private int getInitialConnector() { - // if there is a selection, use it - if (fSelectedConnector >= 0) { - return fSelectedConnector; - } - // try the telnet connector, because it is the cheapest - for (int i = 0; i < fConnectors.length; i++) { - if ("org.eclipse.remote.terminal.RemoteConnector".equals(fConnectors[i].getId())) { //$NON-NLS-1$ - return i; - } - } - // if no telnet connector available, use the first one in the list - if (fConnectors.length > 0) { - return 0; - } - return -1; - } - - private boolean validateSettings() { - if (fSelectedConnector < 0) { - return true; - } - return getPage(fSelectedConnector).validateSettings(); - } - - private void setupPanel(final Composite parent) { - ExpandableComposite expComp = null; - - if (fConnectors.length > 0) { - // setupConnTypePanel(wndParent); - setupSettingsGroup(parent); - - expComp = new ExpandableComposite(parent, ExpandableComposite.TWISTIE); - expComp.setText("Advanced"); - expComp.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false)); - expComp.setExpanded(false); - expComp.addExpansionListener(new IExpansionListener() { - - @Override - public void expansionStateChanged(ExpansionEvent e) { - for (int i = 0; i < 2; i++) { // sometimes the size compute isn't correct on first try - Point newSize = parent.computeSize(SWT.DEFAULT, SWT.DEFAULT); - Point currentSize = parent.getSize(); - int deltaY = newSize.y - currentSize.y; - Point shellSize = getShell().getSize(); - shellSize.y += deltaY; - getShell().setSize(shellSize); - getShell().layout(true, true); - } - } - - @Override - public void expansionStateChanging(ExpansionEvent e) { - // Ignore - } - }); - } - - if (expComp != null) { - Composite panel = setupSettingsTypePanel(expComp); - expComp.setClient(panel); - } else { - setupSettingsTypePanel(parent); - } - } - - private Composite setupSettingsTypePanel(final Composite parent) { - Group group = new Group(parent, SWT.NONE); - GridLayout gridLayout = new GridLayout(2, false); - group.setLayout(gridLayout); - group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - group.setText(ViewMessages.VIEW_SETTINGS); - - Label label = new Label(group, SWT.NONE); - label.setText(ViewMessages.VIEW_TITLE); - label.setLayoutData(new GridData(GridData.BEGINNING)); - - fTerminalTitleText = new Text(group, SWT.BORDER); - fTerminalTitleText.setText(fTerminalTitle); - fTerminalTitleText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - - Label encodingLabel = new Label(group, SWT.NONE); - encodingLabel.setText(ViewMessages.ENCODING); - encodingLabel.setLayoutData(new GridData(GridData.BEGINNING)); - - fEncodingCombo = new Combo(group, SWT.DROP_DOWN); - fEncodingCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - - return group; - } - - private void setupConnTypePanel(Composite wndParent) { - Group wndGroup; - GridLayout gridLayout; - GridData gridData; - - wndGroup = new Group(wndParent, SWT.NONE); - gridLayout = new GridLayout(1, true); - gridData = new GridData(GridData.FILL_HORIZONTAL); - - wndGroup.setLayout(gridLayout); - wndGroup.setLayoutData(gridData); - wndGroup.setText(ViewMessages.CONNECTIONTYPE + ":"); //$NON-NLS-1$ - - fCtlConnTypeCombo = new Combo(wndGroup, SWT.DROP_DOWN | SWT.READ_ONLY); - gridData = new GridData(GridData.FILL_HORIZONTAL); - gridData.widthHint = 200; - fCtlConnTypeCombo.setLayoutData(gridData); - } - - private void setupSettingsGroup(Composite parent) { - Group group = new Group(parent, SWT.NONE); - group.setText("Select Connection"); //$NON-NLS-1$ - group.setLayout(new GridLayout()); - group.setLayoutData(new GridData(GridData.FILL_BOTH)); - fPageBook = new PageBook(group, SWT.NONE); - fPageBook.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - } - - private void setupListeners() { - if (fCtlConnTypeCombo != null) { - fCtlConnTypeCombo.addSelectionListener(new SelectionAdapter() { - @Override - public void widgetSelected(SelectionEvent event) { - selectPage(fCtlConnTypeCombo.getSelectionIndex()); - } - }); - } - } - - public ITerminalConnector getConnector() { - if (fSelectedConnector >= 0) { - return fConnectors[fSelectedConnector]; - } - return null; - } - - private void selectPage(int index) { - fSelectedConnector = index; - getPage(index); - Control[] pages = fPageBook.getChildren(); - fPageBook.showPage(pages[fPageIndex[fSelectedConnector]]); - pages[fPageIndex[fSelectedConnector]].setFocus(); - updateOKButton(); - - } - - /** - * enables the OK button if the user can create a connection - */ - private void updateOKButton() { - // TODO: allow contributions to enable the OK button - // enable the OK button if we have a valid connection selected - if (getButton(IDialogConstants.OK_ID) != null) { - boolean enable = false; - if (getConnector() != null) { - enable = getConnector().getInitializationErrorMessage() == null; - } - // enable the OK button if no connectors are available - if (!enable && fConnectors.length == 0) { - enable = true; - } - getButton(IDialogConstants.OK_ID).setEnabled(enable); - } - } - - @Override - protected IDialogSettings getDialogBoundsSettings() { - IDialogSettings ds = TerminalViewPlugin.getDefault().getDialogSettings(); - fDialogSettings = ds.getSection(getClass().getName()); - if (fDialogSettings == null) { - fDialogSettings = ds.addNewSection(getClass().getName()); - } - return fDialogSettings; - } - - public void setTerminalTitle(String partName) { - fTerminalTitle = partName; - - } - - public String getTerminalTitle() { - return fTerminalTitle; - } - - private void doLoad() { - if (fEncodingCombo != null) { - List encodings = new ArrayList(); - encodings.add("ISO-8859-1"); //$NON-NLS-1$ - encodings.add("UTF-8"); //$NON-NLS-1$ - // TODO when moving to J2SE-1.5, restore the simpler way getting the default encoding - // String hostEncoding =Charset.defaultCharset().displayName(); - String hostEncoding = new java.io.InputStreamReader(new java.io.ByteArrayInputStream(new byte[0])).getEncoding(); - if (!encodings.contains(hostEncoding)) { - encodings.add(hostEncoding); - } - populateEncodingsCombo(encodings); - - } - } - - private void populateEncodingsCombo(List encodings) { - String[] encodingStrings = new String[encodings.size()]; - encodings.toArray(encodingStrings); - fEncodingCombo.setItems(encodingStrings); - } - - private boolean isEncodingValid() { - return isValidEncoding(fEncodingCombo.getText()); - } - - private boolean isValidEncoding(String enc) { - try { - return Charset.isSupported(enc); - } catch (IllegalCharsetNameException e) { - return false; - } - - } - - private boolean updateValidState() { - boolean isValid = true; - boolean isValidNow = isEncodingValid(); - if (isValidNow != isValid) { - isValid = isValidNow; - } - return isValid; - } - - private void showErrorMessage(String message) { - String strTitle = ViewMessages.TERMINALSETTINGS; - MessageBox mb = new MessageBox(getShell(), SWT.ICON_ERROR | SWT.OK); - mb.setText(strTitle); - mb.setMessage(message); - mb.open(); - return; - } - - private void setCombo(Combo combo, String value) { - if (value == null) { - return; - } - int nIndex = combo.indexOf(value); - if (nIndex == -1) { - if ((combo.getStyle() & SWT.READ_ONLY) == 0) { - combo.add(value); - nIndex = combo.indexOf(value); - } else { - return; - } - } - - combo.select(nIndex); - - } - - public String getEncoding() { - return fEncoding; - } - - public void setEncoding(String fEncoding) { - this.fEncoding = fEncoding; - } -} diff --git a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/TerminalView.java b/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/TerminalView.java deleted file mode 100644 index ab5c6082fd2..00000000000 --- a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/TerminalView.java +++ /dev/null @@ -1,754 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2015 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 - * - * Initial Contributors: - * The following Wind River employees contributed to the Terminal component - * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb, - * Helmut Haigermoser and Ted Williams. - * - * Contributors: - * Michael Scharf (Wind River) - split into core, view and connector plugins - * Martin Oberhuber (Wind River) - fixed copyright headers and beautified - * Martin Oberhuber (Wind River) - [206892] State handling: Only allow connect when CLOSED - * Michael Scharf (Wind River) - [209656] ClassCastException in TerminalView under Eclipse-3.4M3 - * Michael Scharf (Wind River) - [189774] Ctrl+V does not work in the command input field. - * Michael Scharf (Wind River) - [217999] Duplicate context menu entries in Terminal - * Anna Dushistova (MontaVista) - [227537] moved actions from terminal.view to terminal plugin - * Martin Oberhuber (Wind River) - [168186] Add Terminal User Docs - * Michael Scharf (Wind River) - [172483] switch between connections - * Michael Scharf (Wind River) - [240023] Get rid of the terminal's "Pin" button - * Michael Scharf (Wind River) - [196454] Initial connection settings dialog should not be blank - * Michael Scharf (Wind River) - [241096] Secondary terminals in same view do not observe the "invert colors" Preference - * Michael Scharf (Wind River) - [262996] get rid of TerminalState.OPENED - * Martin Oberhuber (Wind River) - [205486] Enable ScrollLock - * Ahmet Alptekin (Tubitak) - [244405] Add a UI Control for setting the Terminal's encoding - * Martin Oberhuber (Wind River) - [378691][api] push Preferences into the Widget - * Kris De Volder (VMWare) - [392092] Extend ITerminalView API to allow programmatically opening a UI-less connector - *******************************************************************************/ -package org.eclipse.remote.internal.terminal.view; - -import java.util.HashSet; -import java.util.Set; - -import org.eclipse.jface.action.Action; -import org.eclipse.jface.action.IMenuListener; -import org.eclipse.jface.action.IMenuManager; -import org.eclipse.jface.action.IToolBarManager; -import org.eclipse.jface.action.MenuManager; -import org.eclipse.jface.action.Separator; -import org.eclipse.jface.resource.JFaceResources; -import org.eclipse.jface.util.IPropertyChangeListener; -import org.eclipse.jface.util.PropertyChangeEvent; -import org.eclipse.jface.window.Window; -import org.eclipse.remote.internal.terminal.actions.TerminalAction; -import org.eclipse.remote.internal.terminal.actions.TerminalActionConnect; -import org.eclipse.remote.internal.terminal.actions.TerminalActionDisconnect; -import org.eclipse.remote.internal.terminal.actions.TerminalActionNewTerminal; -import org.eclipse.remote.internal.terminal.actions.TerminalActionRemove; -import org.eclipse.remote.internal.terminal.actions.TerminalActionScrollLock; -import org.eclipse.remote.internal.terminal.actions.TerminalActionSelectionDropDown; -import org.eclipse.remote.internal.terminal.actions.TerminalActionSettings; -import org.eclipse.remote.internal.terminal.actions.TerminalActionToggleCommandInputField; -import org.eclipse.remote.internal.terminal.view.ITerminalViewConnectionManager.ITerminalViewConnectionFactory; -import org.eclipse.remote.internal.terminal.view.ITerminalViewConnectionManager.ITerminalViewConnectionListener; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.MenuEvent; -import org.eclipse.swt.events.MenuListener; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Menu; -import org.eclipse.tm.internal.terminal.control.ITerminalListener; -import org.eclipse.tm.internal.terminal.control.ITerminalViewControl; -import org.eclipse.tm.internal.terminal.control.TerminalViewControlFactory; -import org.eclipse.tm.internal.terminal.control.actions.TerminalActionClearAll; -import org.eclipse.tm.internal.terminal.control.actions.TerminalActionCopy; -import org.eclipse.tm.internal.terminal.control.actions.TerminalActionCut; -import org.eclipse.tm.internal.terminal.control.actions.TerminalActionPaste; -import org.eclipse.tm.internal.terminal.control.actions.TerminalActionSelectAll; -import org.eclipse.tm.internal.terminal.preferences.ITerminalConstants; -import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore; -import org.eclipse.tm.internal.terminal.provisional.api.ITerminalConnector; -import org.eclipse.tm.internal.terminal.provisional.api.LayeredSettingsStore; -import org.eclipse.tm.internal.terminal.provisional.api.PreferenceSettingStore; -import org.eclipse.tm.internal.terminal.provisional.api.TerminalConnectorExtension; -import org.eclipse.tm.internal.terminal.provisional.api.TerminalState; -import org.eclipse.ui.IMemento; -import org.eclipse.ui.IViewPart; -import org.eclipse.ui.IViewReference; -import org.eclipse.ui.IViewSite; -import org.eclipse.ui.IWorkbenchPage; -import org.eclipse.ui.PartInitException; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.part.ViewPart; - -public class TerminalView extends ViewPart implements ITerminalView, ITerminalViewConnectionListener { - private static final String PREF_CONNECTORS = "Connectors."; //$NON-NLS-1$ - - private static final String STORE_CONNECTION_TYPE = "ConnectionType"; //$NON-NLS-1$ - - private static final String STORE_SETTING_SUMMARY = "SettingSummary"; //$NON-NLS-1$ - - private static final String STORE_TITLE = "Title"; //$NON-NLS-1$ - - public static final String FONT_DEFINITION = ITerminalConstants.FONT_DEFINITION; - - protected ITerminalViewControl fCtlTerminal; - - // TODO (scharf): this decorator is only there to deal wit the common - // actions. Find a better solution. - TerminalViewControlDecorator fCtlDecorator = new TerminalViewControlDecorator(); - - protected TerminalAction fActionTerminalNewTerminal; - - protected TerminalAction fActionTerminalConnect; - - private TerminalAction fActionTerminalScrollLock; - - protected TerminalAction fActionTerminalDisconnect; - - protected TerminalAction fActionTerminalSettings; - - protected TerminalActionCopy fActionEditCopy; - - protected TerminalActionCut fActionEditCut; - - protected TerminalActionPaste fActionEditPaste; - - protected TerminalActionClearAll fActionEditClearAll; - - protected TerminalActionSelectAll fActionEditSelectAll; - - protected TerminalAction fActionToggleCommandInputField; - - protected TerminalPropertyChangeHandler fPropertyChangeHandler; - - protected Action fActionTerminalDropDown; - protected Action fActionTerminalRemove; - - protected boolean fMenuAboutToShow; - - private SettingsStore fStore; - - private final ITerminalViewConnectionManager fMultiConnectionManager = new TerminalViewConnectionManager(); - - private PageBook fPageBook; - - /** - * This listener updates both, the view and the - * ITerminalViewConnection. - * - */ - class TerminalListener implements ITerminalListener { - volatile ITerminalViewConnection fConnection; - - void setConnection(ITerminalViewConnection connection) { - fConnection = connection; - } - - @Override - public void setState(final TerminalState state) { - runInDisplayThread(new Runnable() { - @Override - public void run() { - fConnection.setState(state); - // if the active connection changes, update the view - if (fConnection == fMultiConnectionManager.getActiveConnection()) { - updateStatus(); - } - } - }); - } - - @Override - public void setTerminalTitle(final String title) { - runInDisplayThread(new Runnable() { - @Override - public void run() { - fConnection.setTerminalTitle(title); - // if the active connection changes, update the view - if (fConnection == fMultiConnectionManager.getActiveConnection()) { - updateSummary(); - } - } - }); - } - - /** - * @param runnable - * run in display thread - */ - private void runInDisplayThread(Runnable runnable) { - if (Display.findDisplay(Thread.currentThread()) != null) { - runnable.run(); - } else if (PlatformUI.isWorkbenchRunning()) { - PlatformUI.getWorkbench().getDisplay().syncExec(runnable); - // else should not happen and we ignore it... - } - } - - } - - public TerminalView() { - fMultiConnectionManager.addListener(this); - } - - /** - * @param title - * @return a unique part name - */ - String findUniqueTitle(String title) { - IWorkbenchPage[] pages = getSite().getWorkbenchWindow().getPages(); - String id = getViewSite().getId(); - Set names = new HashSet<>(); - for (IWorkbenchPage page : pages) { - IViewReference[] views = page.getViewReferences(); - for (IViewReference view : views) { - // only look for views with the same ID - if (id.equals(view.getId())) { - String name = view.getTitle(); - if (name != null) { - names.add(view.getPartName()); - } - } - } - } - // find a unique name - int i = 1; - String uniqueTitle = title; - while (true) { - if (!names.contains(uniqueTitle)) { - return uniqueTitle; - } - uniqueTitle = title + " " + i++; //$NON-NLS-1$ - } - } - - /** - * Display a new Terminal view. This method is called when the user clicks the New - * Terminal button in any Terminal view's toolbar. - */ - @Override - public void onTerminalNewTerminal() { - setupControls(); - if (newConnection(ViewMessages.NEW_TERMINAL_CONNECTION) == null) { - fMultiConnectionManager.removeActive(); - } - } - - /** - * Programmatically create a new terminal connection within the view. This method - * does the same thing as onTerminalNewTerminal, but instead of popping up a settings - * dialog to allow the user fill in connection details, a connector is provided as - * a parameter. The connector should have all of its details pre-configured so it can - * be opened without requiring user input. - */ - @Override - public void newTerminal(ITerminalConnector c) { - this.setupControls(); - if (c != null) { - this.setConnector(c); - this.onTerminalConnect(); - } - } - - @Override - public void onTerminalNewView() { - try { - // The second argument to showView() is a unique String identifying the - // secondary view instance. If it ever matches a previously used secondary - // view identifier, then this call will not create a new Terminal view, - // which is undesirable. Therefore, we append the active time in - // milliseconds to the secondary view identifier to ensure it is always - // unique. This code runs only when the user clicks the New Terminal - // button, so there is no risk that this code will run twice in a single - // millisecond. - IViewPart newTerminalView = getSite().getPage().showView("org.eclipse.tm.terminal.view.TerminalView", //$NON-NLS-1$ - "SecondaryTerminal" + System.currentTimeMillis(), //$NON-NLS-1$ - IWorkbenchPage.VIEW_ACTIVATE); - if (newTerminalView instanceof ITerminalView) { - ITerminalConnector c = ((TerminalView) newTerminalView).newConnection(ViewMessages.NEW_TERMINAL_VIEW); - // if there is no connector selected, hide the new view - if (c == null) { - getSite().getPage().hideView(newTerminalView); - } - } - } catch (PartInitException ex) { - TerminalViewPlugin.log(ex); - } - } - - @Override - public void onTerminalConnect() { - // if (isConnected()) - if (fCtlTerminal.getState() != TerminalState.CLOSED) { - return; - } - if (fCtlTerminal.getTerminalConnector() == null) { - setConnector(showSettingsDialog(ViewMessages.TERMINALSETTINGS)); - } - setEncoding(getActiveConnection().getEncoding()); - fCtlTerminal.connectTerminal(); - } - - public void updateStatus() { - updateTerminalConnect(); - updateTerminalDisconnect(); - updateTerminalSettings(); - fActionToggleCommandInputField.setChecked(hasCommandInputField()); - fActionTerminalScrollLock.setChecked(isScrollLock()); - updateSummary(); - } - - public void updateTerminalConnect() { - // boolean bEnabled = ((!isConnecting()) && (!fCtlTerminal.isConnected())); - boolean bEnabled = (fCtlTerminal.getState() == TerminalState.CLOSED); - - fActionTerminalConnect.setEnabled(bEnabled); - } - - private boolean isConnecting() { - return fCtlTerminal.getState() == TerminalState.CONNECTING; - } - - @Override - public void onTerminalDisconnect() { - fCtlTerminal.disconnectTerminal(); - } - - public void updateTerminalDisconnect() { - boolean bEnabled = ((isConnecting()) || (fCtlTerminal.isConnected())); - fActionTerminalDisconnect.setEnabled(bEnabled); - } - - @Override - public void onTerminalSettings() { - newConnection(null); - } - - private ITerminalConnector newConnection(String title) { - ITerminalConnector c = showSettingsDialog(title); - if (c != null) { - setConnector(c); - onTerminalConnect(); - } - return c; - } - - private ITerminalConnector showSettingsDialog(String title) { - // When the settings dialog is opened, load the Terminal settings from the - // persistent settings. - - ITerminalConnector[] connectors = fCtlTerminal.getConnectors(); - if (fCtlTerminal.getState() != TerminalState.CLOSED) { - connectors = new ITerminalConnector[0]; - } - // load the state from the settings - // first load from fStore and then from the preferences. - ITerminalConnector c = loadSettings(new LayeredSettingsStore(fStore, getPreferenceSettingsStore()), connectors); - // if we have no connector show the one from the settings - if (fCtlTerminal.getTerminalConnector() != null) { - c = fCtlTerminal.getTerminalConnector(); - } - TerminalSettingsDialog dlgTerminalSettings = new TerminalSettingsDialog(getViewSite().getShell(), connectors, c); - dlgTerminalSettings.setTerminalTitle(getActiveConnection().getPartName()); - dlgTerminalSettings.setEncoding(getActiveConnection().getEncoding()); - if (title != null) { - dlgTerminalSettings.setTitle(title); - } - - if (dlgTerminalSettings.open() == Window.CANCEL) { - return null; - } - - // When the settings dialog is closed, we persist the Terminal settings. - saveSettings(fStore, dlgTerminalSettings.getConnector()); - // we also save it in the preferences. This will keep the last change - // made to this connector as default... - saveSettings(getPreferenceSettingsStore(), dlgTerminalSettings.getConnector()); - - setViewTitle(dlgTerminalSettings.getTerminalTitle()); - setEncoding(dlgTerminalSettings.getEncoding()); - return dlgTerminalSettings.getConnector(); - } - - private void setEncoding(String encoding) { - getActiveConnection().setEncoding(encoding); - updateSummary(); - } - - private void setConnector(ITerminalConnector connector) { - fCtlTerminal.setConnector(connector); - } - - public void updateTerminalSettings() { - // fActionTerminalSettings.setEnabled((fCtlTerminal.getState()==TerminalState.CLOSED)); - } - - private void setViewTitle(String title) { - setPartName(title); - getActiveConnection().setPartName(title); - } - - private void setViewSummary(String summary) { - setContentDescription(summary); - getViewSite().getActionBars().getStatusLineManager().setMessage(summary); - setTitleToolTip(getPartName() + ": " + summary); //$NON-NLS-1$ - - } - - public void updateSummary() { - setViewSummary(getActiveConnection().getFullSummary()); - } - - @Override - public void onTerminalFontChanged() { - // set the font for all - empty hook for extenders - } - - // ViewPart interface - - @Override - public void createPartControl(Composite wndParent) { - // Bind plugin.xml key bindings to this plugin. Overrides global Control-W key - // sequence. - - fPageBook = new PageBook(wndParent, SWT.NONE); - ISettingsStore s = new SettingStorePrefixDecorator(fStore, "connectionManager"); //$NON-NLS-1$ - fMultiConnectionManager.loadState(s, new ITerminalViewConnectionFactory() { - @Override - public ITerminalViewConnection create() { - return makeViewConnection(); - } - }); - // if there is no connection loaded, create at least one - // needed to read old states from the old terminal - if (fMultiConnectionManager.size() == 0) { - ITerminalViewConnection conn = makeViewConnection(); - fMultiConnectionManager.addConnection(conn); - fMultiConnectionManager.setActiveConnection(conn); - fPageBook.showPage(fCtlTerminal.getRootControl()); - } - setTerminalControl(fMultiConnectionManager.getActiveConnection().getCtlTerminal()); - setViewTitle(findUniqueTitle(ViewMessages.PROP_TITLE)); - setupActions(); - setupLocalToolBars(); - // setup all context menus - ITerminalViewConnection[] conn = fMultiConnectionManager.getConnections(); - for (ITerminalViewConnection element : conn) { - setupContextMenus(element.getCtlTerminal().getControl()); - } - setupListeners(wndParent); - - PlatformUI.getWorkbench().getHelpSystem().setHelp(wndParent, TerminalViewPlugin.getUniqueIdentifier() + ".terminal_page"); //$NON-NLS-1$ - - legacyLoadState(); - legacySetTitle(); - - refresh(); - onTerminalFontChanged(); - - } - - @Override - public void dispose() { - JFaceResources.getFontRegistry().removeListener(fPropertyChangeHandler); - - // dispose all connections - ITerminalViewConnection[] conn = fMultiConnectionManager.getConnections(); - for (ITerminalViewConnection element : conn) { - element.getCtlTerminal().disposeTerminal(); - } - super.dispose(); - } - - /** - * Passing the focus request to the viewer's control. - */ - @Override - public void setFocus() { - fCtlTerminal.setFocus(); - } - - /** - * This method creates the top-level control for the Terminal view. - */ - protected void setupControls() { - ITerminalViewConnection conn = makeViewConnection(); - fMultiConnectionManager.addConnection(conn); - fMultiConnectionManager.setActiveConnection(conn); - setupContextMenus(fCtlTerminal.getControl()); - } - - private ITerminalViewConnection makeViewConnection() { - ITerminalConnector[] connectors = makeConnectors(); - TerminalListener listener = new TerminalListener(); - ITerminalViewControl ctrl = TerminalViewControlFactory.makeControl(listener, fPageBook, connectors, true); - setTerminalControl(ctrl); - ITerminalViewConnection conn = new TerminalViewConnection(fCtlTerminal); - listener.setConnection(conn); - conn.setPartName(getPartName()); - // load from settings - ITerminalConnector connector = loadSettings(fStore, connectors); - // set the connector.... - ctrl.setConnector(connector); - - return conn; - } - - /** - * @param store - * contains the data - * @param connectors - * loads the data from store - * @return null or the currently selected connector - */ - private ITerminalConnector loadSettings(ISettingsStore store, ITerminalConnector[] connectors) { - ITerminalConnector connector = null; - String connectionType = store.get(STORE_CONNECTION_TYPE); - for (ITerminalConnector connector2 : connectors) { - connector2.load(getStore(store, connector2)); - if (connector2.getId().equals(connectionType)) { - connector = connector2; - } - } - return connector; - } - - /** - * @return a list of connectors this view can use - */ - protected ITerminalConnector[] makeConnectors() { - ITerminalConnector[] connectors = TerminalConnectorExtension.makeTerminalConnectors(); - return connectors; - } - - /** - * The preference setting store is used to save the settings that are - * shared between all views. - * - * @return the settings store for the connection based on the preferences. - * - */ - private PreferenceSettingStore getPreferenceSettingsStore() { - return new PreferenceSettingStore(TerminalViewPlugin.getDefault().getPluginPreferences(), PREF_CONNECTORS); - } - - /** - * @param store - * the settings will be saved in this store - * @param connector - * the connector that will be saved. Can be null. - */ - private void saveSettings(ISettingsStore store, ITerminalConnector connector) { - if (connector != null) { - connector.save(getStore(store, connector)); - // the last saved connector becomes the default - store.put(STORE_CONNECTION_TYPE, connector.getId()); - } - - } - - @Override - public void init(IViewSite site, IMemento memento) throws PartInitException { - super.init(site, memento); - fStore = new SettingsStore(memento); - } - - @Override - public void saveState(IMemento memento) { - super.saveState(memento); - fStore.put(STORE_TITLE, getPartName()); - fMultiConnectionManager.saveState(new SettingStorePrefixDecorator(fStore, "connectionManager")); //$NON-NLS-1$ - fStore.saveState(memento); - } - - private ISettingsStore getStore(ISettingsStore store, ITerminalConnector connector) { - return new SettingStorePrefixDecorator(store, connector.getId() + "."); //$NON-NLS-1$ - } - - protected void setupActions() { - fActionTerminalDropDown = new TerminalActionSelectionDropDown(fMultiConnectionManager); - fActionTerminalRemove = new TerminalActionRemove(fMultiConnectionManager); - fActionTerminalNewTerminal = new TerminalActionNewTerminal(this); - fActionTerminalScrollLock = new TerminalActionScrollLock(this); - fActionTerminalConnect = new TerminalActionConnect(this); - fActionTerminalDisconnect = new TerminalActionDisconnect(this); - fActionTerminalSettings = new TerminalActionSettings(this); - fActionEditCopy = new TerminalActionCopy(fCtlDecorator); - fActionEditCut = new TerminalActionCut(fCtlDecorator); - fActionEditPaste = new TerminalActionPaste(fCtlDecorator); - fActionEditClearAll = new TerminalActionClearAll(fCtlDecorator); - fActionEditSelectAll = new TerminalActionSelectAll(fCtlDecorator); - fActionToggleCommandInputField = new TerminalActionToggleCommandInputField(this); - } - - protected void setupLocalToolBars() { - IToolBarManager toolBarMgr = getViewSite().getActionBars().getToolBarManager(); - - toolBarMgr.add(fActionTerminalConnect); - toolBarMgr.add(fActionTerminalDisconnect); - toolBarMgr.add(fActionTerminalSettings); - toolBarMgr.add(fActionToggleCommandInputField); - toolBarMgr.add(fActionTerminalScrollLock); - toolBarMgr.add(new Separator("fixedGroup")); //$NON-NLS-1$ - toolBarMgr.add(fActionTerminalDropDown); - toolBarMgr.add(fActionTerminalNewTerminal); - toolBarMgr.add(fActionTerminalRemove); - } - - protected void setupContextMenus(Control ctlText) { - MenuManager menuMgr; - Menu menu; - TerminalContextMenuHandler contextMenuHandler; - - menuMgr = new MenuManager("#PopupMenu"); //$NON-NLS-1$ - menu = menuMgr.createContextMenu(ctlText); - loadContextMenus(menuMgr); - contextMenuHandler = new TerminalContextMenuHandler(); - - ctlText.setMenu(menu); - menuMgr.addMenuListener(contextMenuHandler); - menu.addMenuListener(contextMenuHandler); - } - - protected void loadContextMenus(IMenuManager menuMgr) { - menuMgr.add(fActionEditCopy); - menuMgr.add(fActionEditPaste); - menuMgr.add(new Separator()); - menuMgr.add(fActionEditClearAll); - menuMgr.add(fActionEditSelectAll); - menuMgr.add(new Separator()); - menuMgr.add(fActionToggleCommandInputField); - menuMgr.add(fActionTerminalScrollLock); - - // Other plug-ins can contribute there actions here - menuMgr.add(new Separator("Additions")); //$NON-NLS-1$ - } - - protected void setupListeners(Composite wndParent) { - fPropertyChangeHandler = new TerminalPropertyChangeHandler(); - JFaceResources.getFontRegistry().addListener(fPropertyChangeHandler); - } - - protected class TerminalContextMenuHandler implements MenuListener, IMenuListener { - @Override - public void menuHidden(MenuEvent event) { - fMenuAboutToShow = false; - fActionEditCopy.updateAction(fMenuAboutToShow); - } - - @Override - public void menuShown(MenuEvent e) { - // - } - - @Override - public void menuAboutToShow(IMenuManager menuMgr) { - fMenuAboutToShow = true; - fActionEditCopy.updateAction(fMenuAboutToShow); - fActionEditCut.updateAction(fMenuAboutToShow); - fActionEditSelectAll.updateAction(fMenuAboutToShow); - fActionEditPaste.updateAction(fMenuAboutToShow); - fActionEditClearAll.updateAction(fMenuAboutToShow); - } - } - - protected class TerminalPropertyChangeHandler implements IPropertyChangeListener { - @Override - public void propertyChange(PropertyChangeEvent event) { - if (event.getProperty().equals(FONT_DEFINITION)) { - onTerminalFontChanged(); - } - } - } - - @Override - public boolean hasCommandInputField() { - return getActiveConnection().hasCommandInputField(); - } - - @Override - public void setCommandInputField(boolean on) { - getActiveConnection().setCommandInputField(on); - } - - @Override - public boolean isScrollLock() { - return fCtlTerminal.isScrollLock(); - } - - @Override - public void setScrollLock(boolean on) { - fCtlTerminal.setScrollLock(on); - } - - private ITerminalViewConnection getActiveConnection() { - return fMultiConnectionManager.getActiveConnection(); - } - - /** - * @param ctrl - * this control becomes the currently used one - */ - private void setTerminalControl(ITerminalViewControl ctrl) { - fCtlTerminal = ctrl; - fCtlDecorator.setViewContoler(ctrl); - } - - @Override - public void connectionsChanged() { - if (getActiveConnection() != null) { - // update the active {@link ITerminalViewControl} - ITerminalViewControl ctrl = getActiveConnection().getCtlTerminal(); - if (fCtlTerminal != ctrl) { - setTerminalControl(ctrl); - refresh(); - } - } - } - - /** - * Show the active {@link ITerminalViewControl} in the view - */ - private void refresh() { - fPageBook.showPage(fCtlTerminal.getRootControl()); - updateStatus(); - setPartName(getActiveConnection().getPartName()); - } - - /** - * TODO REMOVE This code (added 2008-06-11) - * Legacy code to real the old state. Once the state of the - * terminal has been saved this method is not needed anymore. - * Remove this code with eclipse 3.5. - */ - private void legacyLoadState() { - // TODO legacy: load the old title.... - String summary = fStore.get(STORE_SETTING_SUMMARY); - if (summary != null) { - getActiveConnection().setSummary(summary); - fStore.put(STORE_SETTING_SUMMARY, null); - } - } - - /** - * TODO REMOVE This code (added 2008-06-11) - * Legacy code to real the old state. Once the state of the - * terminal has been saved this method is not needed anymore. - * Remove this code with eclipse 3.5. - */ - private void legacySetTitle() { - // restore the title of this view - String title = fStore.get(STORE_TITLE); - if (title != null && title.length() > 0) { - setViewTitle(title); - fStore.put(STORE_TITLE, null); - } - } - -} diff --git a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/TerminalViewConnection.java b/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/TerminalViewConnection.java deleted file mode 100644 index ca1ce1debb5..00000000000 --- a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/TerminalViewConnection.java +++ /dev/null @@ -1,237 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2015 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: - * Michael Scharf (Wind River) - initial API and implementation - * Michael Scharf (Wind River) - [240097] Allow paste with the middle mouse button - * Michael Scharf (Wind River) - [262996] get rid of TerminalState.OPENED - * Anton Leherbauer (Wind River) - [335021] Middle mouse button copy/paste does not work with the terminal - * Ahmet Alptekin (Tubitak) - [244405] Add a UI Control for setting the Terminal's encoding - *******************************************************************************/ -package org.eclipse.remote.internal.terminal.view; - -import java.io.UnsupportedEncodingException; - -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.osgi.util.NLS; -import org.eclipse.swt.dnd.Clipboard; -import org.eclipse.swt.dnd.DND; -import org.eclipse.swt.dnd.TextTransfer; -import org.eclipse.swt.events.MouseAdapter; -import org.eclipse.swt.events.MouseEvent; -import org.eclipse.tm.internal.terminal.control.CommandInputFieldWithHistory; -import org.eclipse.tm.internal.terminal.control.ITerminalViewControl; -import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore; -import org.eclipse.tm.internal.terminal.provisional.api.ITerminalConnector; -import org.eclipse.tm.internal.terminal.provisional.api.Logger; -import org.eclipse.tm.internal.terminal.provisional.api.TerminalState; - -/** - * This class represents one connection. The connection might be - * closed or open. - * - */ -class TerminalViewConnection implements ITerminalViewConnection { - private static final String STORE_SUMMARY = "Summary"; //$NON-NLS-1$ - private static final String STORE_PART_NAME = "PartName"; //$NON-NLS-1$ - private static final String STORE_CONNECTION_TYPE = "ConnectionType"; //$NON-NLS-1$ - private static final String STORE_HAS_COMMAND_INPUT_FIELD = "HasCommandInputField"; //$NON-NLS-1$ - private static final String STORE_COMMAND_INPUT_FIELD_HISTORY = "CommandInputFieldHistory"; //$NON-NLS-1$ - private static final String STORE_ENCODING="Encoding"; //$NON-NLS-1$ - final private ITerminalViewControl fCtlTerminal; - private String fTitle; - private String fSummary; - private String fHistory; - private CommandInputFieldWithHistory fCommandInputField; - private String fPartName; - private String fEncoding; - - public TerminalViewConnection(ITerminalViewControl ctl) { - fCtlTerminal = ctl; - fCtlTerminal.getControl().addMouseListener(new MouseAdapter(){ - public void mouseDown(MouseEvent e) { - // paste when the middle button is clicked - if (e.button == 2) { // middle button - int clipboardType = DND.SELECTION_CLIPBOARD; - Clipboard clipboard = fCtlTerminal.getClipboard(); - if (clipboard.getAvailableTypes(clipboardType).length == 0) - // use normal clipboard if selection clipboard is not available - clipboardType = DND.CLIPBOARD; - String text = (String) clipboard.getContents(TextTransfer.getInstance(), clipboardType); - if (text != null && text.length() > 0) - fCtlTerminal.pasteString(text); - } - } - }); - } - - /* (non-Javadoc) - * @see org.eclipse.remote.internal.terminal.actions.ITerminalViewConnection#getName() - */ - public String getFullSummary() { - // if the title is set, then we return the title, else the summary - if(fTitle==null) - return makeSummary(); - return fTitle; - } - - /* (non-Javadoc) - * @see org.eclipse.remote.internal.terminal.view.ITerminalViewConnection#getImageDescriptor() - */ - public ImageDescriptor getImageDescriptor() { - return TerminalViewPlugin.getDefault().getImageRegistry().getDescriptor(ImageConsts.IMAGE_TERMINAL_VIEW); - } - - public ITerminalViewControl getCtlTerminal() { - return fCtlTerminal; - } - private ISettingsStore getStore(ISettingsStore store,ITerminalConnector connector) { - return new SettingStorePrefixDecorator(store,connector.getId()+"."); //$NON-NLS-1$ - } - public void loadState(ISettingsStore store) { - fPartName=store.get(STORE_PART_NAME); - fSummary=store.get(STORE_SUMMARY); - fHistory=store.get(STORE_COMMAND_INPUT_FIELD_HISTORY); - fEncoding=store.get(STORE_ENCODING); - // load the state of the connection types - ITerminalConnector[] connectors=fCtlTerminal.getConnectors(); - String connectionType=store.get(STORE_CONNECTION_TYPE); - for (int i = 0; i < connectors.length; i++) { - connectors[i].load(getStore(store,connectors[i])); - // if this is active connection type - if(connectors[i].getId().equals(connectionType)) - fCtlTerminal.setConnector(connectors[i]); - } - - if("true".equals(store.get(STORE_HAS_COMMAND_INPUT_FIELD))) //$NON-NLS-1$ - setCommandInputField(true); - } - - public void saveState(ISettingsStore store) { - store.put(STORE_PART_NAME, fPartName); - store.put(STORE_SUMMARY,fSummary); - store.put(STORE_COMMAND_INPUT_FIELD_HISTORY, fHistory); - store.put(STORE_ENCODING, fEncoding); - if(fCommandInputField!=null) - store.put(STORE_COMMAND_INPUT_FIELD_HISTORY, fCommandInputField.getHistory()); - else - store.put(STORE_COMMAND_INPUT_FIELD_HISTORY, fHistory); - store.put(STORE_HAS_COMMAND_INPUT_FIELD,hasCommandInputField()?"true":"false"); //$NON-NLS-1$//$NON-NLS-2$ - ITerminalConnector[] connectors=fCtlTerminal.getConnectors(); - for (int i = 0; i < connectors.length; i++) { - connectors[i].save(getStore(store,connectors[i])); - } - if(fCtlTerminal.getTerminalConnector()!=null) { - store.put(STORE_CONNECTION_TYPE,fCtlTerminal.getTerminalConnector().getId()); - } - } - public boolean hasCommandInputField() { - return fCommandInputField!=null; - } - public void setCommandInputField(boolean on) { - // save the old history - if(fCommandInputField!=null) { - fHistory= fCommandInputField.getHistory(); - fCommandInputField=null; - } - if(on) { - // TODO make history size configurable - fCommandInputField=new CommandInputFieldWithHistory(100); - fCommandInputField.setHistory(fHistory); - } - fCtlTerminal.setCommandInputField(fCommandInputField); - } - - public void setState(TerminalState state) { - // update the title.... - fTitle=null; - } - - public void setTerminalTitle(String title) { - // When parameter 'title' is not null, it is a String containing text to - // display in the view's content description line. This is used by class - // TerminalText when it processes an ANSI OSC escape sequence that commands - // the terminal to display text in its title bar. - fTitle=title; - } - - private String getStateDisplayName(TerminalState state) { - if(state==TerminalState.CONNECTED) { - return ViewMessages.STATE_CONNECTED; - } else if(state==TerminalState.CONNECTING) { - return ViewMessages.STATE_CONNECTING; - } else if(state==TerminalState.CLOSED) { - return ViewMessages.STATE_CLOSED; - } else { - throw new IllegalStateException(state.toString()); - } - } - - private String makeSummary() { - String strTitle = ""; //$NON-NLS-1$ - if(fCtlTerminal.getTerminalConnector()==null){ - strTitle=ViewMessages.NO_CONNECTION_SELECTED; - } else { - // When parameter 'data' is null, we construct a descriptive string to - // display in the content description line. - String strConnected = getStateDisplayName(fCtlTerminal.getState()); - String summary = getSettingsSummary(); - String encoding=getEncoding(); - //TODO Title should use an NLS String and com.ibm.icu.MessageFormat - //In order to make the logic of assembling, and the separators, better adapt to foreign languages - if(summary.length()>0) - summary=summary+" - "; //$NON-NLS-1$ - String name=fCtlTerminal.getTerminalConnector().getName(); - if(name.length()>0) { - name+=": "; //$NON-NLS-1$ - } - if (encoding.length()>0) { - encoding = NLS.bind(ViewMessages.ENCODING_WITH_PARENTHESES, encoding); - //encoding=ViewMessages.ENCODING+" "+"("+encoding+")"; //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ - } - strTitle = name + "("+ summary + strConnected + ")"+" - "+encoding; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - } - return strTitle; - } - /** - * @return the setting summary. If there is no connection, or the connection - * has not been initialized, use the last stored state. - */ - private String getSettingsSummary() { - if(fCtlTerminal.getTerminalConnector().isInitialized()) - fSummary=fCtlTerminal.getSettingsSummary(); - if(fSummary==null) - return ""; //$NON-NLS-1$ - return fSummary; - } - - public void setSummary(String summary) { - fSummary=summary; - } - - public String getPartName() { - return fPartName==null?ViewMessages.PROP_TITLE:fPartName; - } - - public void setPartName(String name) { - fPartName=name; - - } - public String getEncoding() { - return fEncoding==null?fCtlTerminal.getEncoding():fEncoding; - } - - public void setEncoding(String fEncoding) { - try { - fCtlTerminal.setEncoding(fEncoding); - this.fEncoding = fEncoding; - } catch (UnsupportedEncodingException uex) { - Logger.logException(uex); - } - - } -} \ No newline at end of file diff --git a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/TerminalViewConnectionManager.java b/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/TerminalViewConnectionManager.java deleted file mode 100644 index 55797f213aa..00000000000 --- a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/TerminalViewConnectionManager.java +++ /dev/null @@ -1,195 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2015 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: - * Michael Scharf (Wind River) - initial API and implementation - *******************************************************************************/ -package org.eclipse.remote.internal.terminal.view; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore; - -public class TerminalViewConnectionManager implements ITerminalViewConnectionManager { - private static final String STORE_CONNECTION_PREFIX = "connection"; //$NON-NLS-1$ - private static final String STORE_SIZE = "size"; //$NON-NLS-1$ - private static final String STORE_ACTIVE_CONNECTION = "active"; //$NON-NLS-1$ - /** - * The list of {@link ITerminalViewConnection} in the order they were cerated. - * Ordered by creation time - */ - private final List fConnections = new ArrayList<>(); - /** - * The currently displayed connection - */ - private ITerminalViewConnection fActiveConnection; - /** - * The list of {@link ITerminalViewConnection} in the order they - * were made the active connection. The most recently accessed - * connection is at the beginning of the list. - */ - private final List fConnectionHistory = new ArrayList<>(); - /** - * The {@link ITerminalViewConnectionListener} - */ - private final List fListeners = new ArrayList<>(); - - @Override - public ITerminalViewConnection[] getConnections() { - return fConnections.toArray(new ITerminalViewConnection[fConnections.size()]); - } - - @Override - public int size() { // TODO Auto-generated method stub - return fConnections.size(); - } - - @Override - public ITerminalViewConnection getActiveConnection() { - return fActiveConnection; - } - - @Override - public void setActiveConnection(ITerminalViewConnection conn) { - fActiveConnection = conn; - // put the connection at the end of the history list - fConnectionHistory.remove(conn); - fConnectionHistory.add(0, conn); - - fireListeners(); - } - - @Override - public void swapConnection() { - ITerminalViewConnection conn = getPreviousConnection(); - if (conn != null) { - setActiveConnection(conn); - } - } - - /** - * @return the connection that was most recently the active connection or null if there is - * no previous connection - */ - private ITerminalViewConnection getPreviousConnection() { - // find the first connection that is not the active connection in - // the list - for (Object element : fConnectionHistory) { - ITerminalViewConnection conn = (ITerminalViewConnection) element; - if (conn != fActiveConnection) { - return conn; - } - } - return null; - } - - @Override - public void addConnection(ITerminalViewConnection conn) { - fConnections.add(conn); - fireListeners(); - } - - public void removeConnection(ITerminalViewConnection conn) { - fConnections.remove(conn); - fConnectionHistory.remove(conn); - fireListeners(); - } - - @Override - public void addListener(ITerminalViewConnectionListener listener) { - fListeners.add(listener); - } - - @Override - public void removeListener(ITerminalViewConnectionListener listener) { - fListeners.remove(listener); - } - - protected void fireListeners() { - ITerminalViewConnectionListener[] listeners = fListeners.toArray(new ITerminalViewConnectionListener[fListeners.size()]); - for (ITerminalViewConnectionListener listener : listeners) { - listener.connectionsChanged(); - } - } - - @Override - public void saveState(ISettingsStore store) { - store.put(STORE_SIZE, "" + fConnections.size()); //$NON-NLS-1$ - // save all connections - int n = 0; - for (Object element : fConnections) { - ITerminalViewConnection connection = (ITerminalViewConnection) element; - // the name under which we store the connection - String prefix = STORE_CONNECTION_PREFIX + n; - n++; - // remember the active connection by its prefix - if (connection.equals(fActiveConnection)) { - store.put(STORE_ACTIVE_CONNECTION, prefix); - } - connection.saveState(new SettingStorePrefixDecorator(store, prefix)); - } - } - - @Override - public void loadState(ISettingsStore store, ITerminalViewConnectionFactory factory) { - int size = 0; - try { - size = Integer.parseInt(store.get(STORE_SIZE)); - } catch (Exception e) { - // ignore - } - if (size > 0) { - // a slot for the connections - String active = store.get(STORE_ACTIVE_CONNECTION); - int n = 0; - for (int i = 0; i < size; i++) { - // the name under which we stored the connection - String prefix = STORE_CONNECTION_PREFIX + n; - n++; - try { - ITerminalViewConnection connection = factory.create(); - fConnections.add(connection); - fConnectionHistory.add(connection); - if (prefix.equals(active)) { - fActiveConnection = connection; - } - connection.loadState(new SettingStorePrefixDecorator(store, prefix)); - } catch (RuntimeException e) { - // in case something goes wrong, make sure we can read the other - // connections.... - TerminalViewPlugin - .getDefault() - .getLog() - .log(new Status(IStatus.WARNING, TerminalViewPlugin.getDefault().getBundle().getSymbolicName(), 0, e - .getLocalizedMessage(), e)); - } - } - } - } - - @Override - public void removeActive() { - // don't remove the last connection -- we need at least one! - if (fConnections.size() > 1) { - fConnections.remove(fActiveConnection); - fConnectionHistory.remove(fActiveConnection); - - // make sure connection is not null.... - fActiveConnection = getPreviousConnection(); - // if there is no previous connection then make - // the first connection the list the active connection - if (fActiveConnection == null) { - fActiveConnection = fConnections.get(0); - } - - fireListeners(); - } - } -} diff --git a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/TerminalViewControlDecorator.java b/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/TerminalViewControlDecorator.java deleted file mode 100644 index 349e3533079..00000000000 --- a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/TerminalViewControlDecorator.java +++ /dev/null @@ -1,172 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2015 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: - * Michael Scharf (Wind River) - initial API and implementation - * Martin Oberhuber (Wind River) - [265352][api] Allow setting fonts programmatically - *******************************************************************************/ -package org.eclipse.remote.internal.terminal.view; - -import java.io.UnsupportedEncodingException; - -import org.eclipse.swt.dnd.Clipboard; -import org.eclipse.swt.graphics.Font; -import org.eclipse.swt.widgets.Control; -import org.eclipse.tm.internal.terminal.control.ICommandInputField; -import org.eclipse.tm.internal.terminal.control.ITerminalViewControl; -import org.eclipse.tm.internal.terminal.provisional.api.ITerminalConnector; -import org.eclipse.tm.internal.terminal.provisional.api.TerminalState; - -// TODO (scharf): this decorator is only there to deal with the common -// actions. Find a better solution. -public class TerminalViewControlDecorator implements ITerminalViewControl { - ITerminalViewControl fViewContoler; - - public void clearTerminal() { - fViewContoler.clearTerminal(); - } - - public void connectTerminal() { - fViewContoler.connectTerminal(); - } - - public void copy() { - fViewContoler.copy(); - } - - public void disconnectTerminal() { - fViewContoler.disconnectTerminal(); - } - - public void disposeTerminal() { - fViewContoler.disposeTerminal(); - } - - public int getBufferLineLimit() { - return fViewContoler.getBufferLineLimit(); - } - - public Clipboard getClipboard() { - return fViewContoler.getClipboard(); - } - - public ICommandInputField getCommandInputField() { - return fViewContoler.getCommandInputField(); - } - - public ITerminalConnector[] getConnectors() { - return fViewContoler.getConnectors(); - } - - public Control getControl() { - return fViewContoler.getControl(); - } - - public String getEncoding() { - return fViewContoler.getEncoding(); - } - - public Font getFont() { - return fViewContoler.getFont(); - } - - public Control getRootControl() { - return fViewContoler.getRootControl(); - } - - public String getSelection() { - return fViewContoler.getSelection(); - } - - public String getSettingsSummary() { - return fViewContoler.getSettingsSummary(); - } - - public TerminalState getState() { - return fViewContoler.getState(); - } - - public ITerminalConnector getTerminalConnector() { - return fViewContoler.getTerminalConnector(); - } - - public boolean isConnected() { - return fViewContoler.isConnected(); - } - - public boolean isDisposed() { - return fViewContoler.isDisposed(); - } - - public boolean isEmpty() { - return fViewContoler.isEmpty(); - } - - public boolean isScrollLock() { - return fViewContoler.isScrollLock(); - } - - public void paste() { - fViewContoler.paste(); - } - - public boolean pasteString(String string) { - return fViewContoler.pasteString(string); - } - - public void selectAll() { - fViewContoler.selectAll(); - } - - public void sendKey(char arg0) { - fViewContoler.sendKey(arg0); - } - - public void setBufferLineLimit(int bufferLineLimit) { - fViewContoler.setBufferLineLimit(bufferLineLimit); - } - - public void setCommandInputField(ICommandInputField inputField) { - fViewContoler.setCommandInputField(inputField); - } - - public void setConnector(ITerminalConnector connector) { - fViewContoler.setConnector(connector); - } - - public void setEncoding(String encoding) throws UnsupportedEncodingException { - fViewContoler.setEncoding(encoding); - } - - public void setFocus() { - fViewContoler.setFocus(); - } - - public void setFont(Font font) { - fViewContoler.setFont(font); - } - - public void setFont(String fontName) { - fViewContoler.setFont(fontName); - } - - public void setInvertedColors(boolean invert) { - fViewContoler.setInvertedColors(invert); - } - - public void setScrollLock(boolean on) { - fViewContoler.setScrollLock(on); - } - - public ITerminalViewControl getViewContoler() { - return fViewContoler; - } - - public void setViewContoler(ITerminalViewControl viewContoler) { - fViewContoler = viewContoler; - } -} diff --git a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/TerminalViewPlugin.java b/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/TerminalViewPlugin.java deleted file mode 100644 index a229a5bd62a..00000000000 --- a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/TerminalViewPlugin.java +++ /dev/null @@ -1,178 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2015 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 - * - * Initial Contributors: - * The following Wind River employees contributed to the Terminal component - * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb, - * Helmut Haigermoser and Ted Williams. - * - * Contributors: - * Michael Scharf (Wind River) - split into core, view and connector plugins - * Martin Oberhuber (Wind River) - fixed copyright headers and beautified - * Anna Dushistova (MontaVista) - [227537] moved actions from terminal.view to terminal plugin - * Martin Oberhuber (Wind River) - [168186] Add Terminal User Docs - * Michael Scharf (Wind River) - [172483] switch between connections - * Michael Scharf (Wind River) - [240023] Get rid of the terminal's "Pin" button - *******************************************************************************/ -package org.eclipse.remote.internal.terminal.view; - -import java.net.MalformedURLException; -import java.net.URL; -import java.util.HashMap; -import java.util.Map.Entry; - -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.jface.resource.ImageRegistry; -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.osgi.framework.BundleContext; -import org.osgi.framework.ServiceReference; - -public class TerminalViewPlugin extends AbstractUIPlugin { - protected static TerminalViewPlugin fDefault; - - public static final String PLUGIN_ID = "org.eclipse.remote.terminal"; //$NON-NLS-1$ - - /** - * Generate a unique identifier - * - * @return unique identifier string - */ - public static String getUniqueIdentifier() { - if (getDefault() == null) { - // If the default instance is not yet initialized, - // return a static identifier. This identifier must - // match the plugin id defined in plugin.xml - return PLUGIN_ID; - } - return getDefault().getBundle().getSymbolicName(); - } - - /** - * The constructor. - */ - public TerminalViewPlugin() { - fDefault = this; - } - - @Override - protected void initializeImageRegistry(ImageRegistry imageRegistry) { - HashMap map = new HashMap<>(); - - try { - // Local toolbars - map.put(ImageConsts.IMAGE_NEW_TERMINAL, "newterminal.gif"); //$NON-NLS-1$ - map.put(ImageConsts.IMAGE_CLCL_CONNECT, "connect_co.gif"); //$NON-NLS-1$ - map.put(ImageConsts.IMAGE_CLCL_DISCONNECT, "disconnect_co.gif"); //$NON-NLS-1$ - map.put(ImageConsts.IMAGE_CLCL_SETTINGS, "properties_tsk.gif"); //$NON-NLS-1$ - map.put(ImageConsts.IMAGE_CLCL_COMMAND_INPUT_FIELD, "command_input_field.gif"); //$NON-NLS-1$ - map.put(ImageConsts.IMAGE_CLCL_SCROLL_LOCK, "lock_co.gif"); //$NON-NLS-1$ - - loadImageRegistry(imageRegistry, ImageConsts.IMAGE_DIR_LOCALTOOL, map); - - map.clear(); - - // Enabled local toolbars - map.put(ImageConsts.IMAGE_NEW_TERMINAL, "newterminal.gif"); //$NON-NLS-1$ - map.put(ImageConsts.IMAGE_ELCL_CONNECT, "connect_co.gif"); //$NON-NLS-1$ - map.put(ImageConsts.IMAGE_ELCL_DISCONNECT, "disconnect_co.gif"); //$NON-NLS-1$ - map.put(ImageConsts.IMAGE_ELCL_SETTINGS, "properties_tsk.gif"); //$NON-NLS-1$ - map.put(ImageConsts.IMAGE_ELCL_COMMAND_INPUT_FIELD, "command_input_field.gif"); //$NON-NLS-1$ - map.put(ImageConsts.IMAGE_ELCL_SCROLL_LOCK, "lock_co.gif"); //$NON-NLS-1$ - map.put(ImageConsts.IMAGE_ELCL_REMOVE, "rem_co.gif"); //$NON-NLS-1$ - - loadImageRegistry(imageRegistry, ImageConsts.IMAGE_DIR_ELCL, map); - - map.clear(); - - // Disabled local toolbars - map.put(ImageConsts.IMAGE_NEW_TERMINAL, "newterminal.gif"); //$NON-NLS-1$ - map.put(ImageConsts.IMAGE_DLCL_CONNECT, "connect_co.gif"); //$NON-NLS-1$ - map.put(ImageConsts.IMAGE_DLCL_DISCONNECT, "disconnect_co.gif"); //$NON-NLS-1$ - map.put(ImageConsts.IMAGE_DLCL_SETTINGS, "properties_tsk.gif"); //$NON-NLS-1$ - map.put(ImageConsts.IMAGE_DLCL_COMMAND_INPUT_FIELD, "command_input_field.gif"); //$NON-NLS-1$ - map.put(ImageConsts.IMAGE_DLCL_SCROLL_LOCK, "lock_co.gif"); //$NON-NLS-1$ - map.put(ImageConsts.IMAGE_DLCL_REMOVE, "rem_co.gif"); //$NON-NLS-1$ - - loadImageRegistry(imageRegistry, ImageConsts.IMAGE_DIR_DLCL, map); - - map.clear(); - - map.put(ImageConsts.IMAGE_TERMINAL_VIEW, "terminal_view.gif"); //$NON-NLS-1$ - - loadImageRegistry(imageRegistry, ImageConsts.IMAGE_DIR_EVIEW, map); - - map.clear(); - - } catch (MalformedURLException malformedURLException) { - malformedURLException.printStackTrace(); - } - } - - /** - * Returns the shared instance. - */ - public static TerminalViewPlugin getDefault() { - return fDefault; - } - - protected void loadImageRegistry(ImageRegistry imageRegistry, String strDir, HashMap map) - throws MalformedURLException { - ImageDescriptor imageDescriptor; - - for (Entry entry : map.entrySet()) { - URL url = TerminalViewPlugin.getDefault().getBundle().getEntry(ImageConsts.IMAGE_DIR_ROOT + strDir + entry.getValue()); - imageDescriptor = ImageDescriptor.createFromURL(url); - imageRegistry.put(entry.getKey(), imageDescriptor); - } - } - - /** - * Create log entry from an IStatus - * - * @param status - * status to log - */ - public static void log(IStatus status) { - getDefault().getLog().log(status); - } - - /** - * Create log entry from a string - * - * @param msg - * message to log - */ - public static void log(String msg) { - log(new Status(IStatus.ERROR, getUniqueIdentifier(), IStatus.ERROR, msg, null)); - } - - /** - * Create log entry from a Throwable - * - * @param e - * throwable to log - */ - public static void log(Throwable e) { - log(new Status(IStatus.ERROR, getUniqueIdentifier(), IStatus.ERROR, e.getMessage(), e)); - } - - /** - * Return the OSGi service with the given service interface. - * - * @param service - * service interface - * @return the specified service or null if it's not registered - */ - public static T getService(Class service) { - final BundleContext context = fDefault.getBundle().getBundleContext(); - final ServiceReference ref = context.getServiceReference(service); - return ref != null ? context.getService(ref) : null; - } - -} diff --git a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/ViewMessages.java b/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/ViewMessages.java deleted file mode 100644 index 48f0776111f..00000000000 --- a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/ViewMessages.java +++ /dev/null @@ -1,51 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2003, 2015 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 - * - * Initial Contributors: - * The following Wind River employees contributed to the Terminal component - * that contains this file: Chris Thew, Fran Litterio, Stephen Lamb, - * Helmut Haigermoser and Ted Williams. - * - * Contributors: - * Michael Scharf (Wind River) - split into core, view and connector plugins - * Martin Oberhuber (Wind River) - fixed copyright headers and beautified - * Michael Scharf (Wind River) - [240023] Get rid of the terminal's "Pin" button - * Martin Oberhuber (Wind River) - [206917] Add validation for Terminal Settings - * Martin Oberhuber (Wind River) - [262996] get rid of TerminalState.OPENED - * Ahmet Alptekin (Tubitak) - [244405] Add a UI Control for setting the Terminal's encoding - * Martin Oberhuber (Wind River) - [378691][api] push Preferences into the Widget - *******************************************************************************/ -package org.eclipse.remote.internal.terminal.view; - -import org.eclipse.osgi.util.NLS; - -public class ViewMessages extends NLS { - static { - NLS.initializeMessages(ViewMessages.class.getName(), ViewMessages.class); - } - public static String NO_CONNECTION_SELECTED; - public static String PROP_TITLE; - public static String SETTINGS; - - public static String TERMINALSETTINGS; - public static String NEW_TERMINAL_CONNECTION; - public static String NEW_TERMINAL_VIEW; - public static String CONNECTIONTYPE; - public static String VIEW_TITLE; - public static String VIEW_SETTINGS; - public static String INVALID_SETTINGS; - public static String ENCODING; - public static String ENCODING_WITH_PARENTHESES; - - public static String STATE_CONNECTED; - public static String STATE_CONNECTING; - public static String STATE_CLOSED; - - public static String CANNOT_INITIALIZE; - public static String CONNECTOR_NOT_AVAILABLE; - public static String ENCODING_NOT_AVAILABLE; -} diff --git a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/ViewMessages.properties b/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/ViewMessages.properties deleted file mode 100644 index 3d356ab2683..00000000000 --- a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/internal/terminal/view/ViewMessages.properties +++ /dev/null @@ -1,42 +0,0 @@ -############################################################################### -# Copyright (c) 2003, 2015 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 -# -# Initial Contributors: -# The following Wind River employees contributed to the Terminal component -# that contains this file: Chris Thew, Fran Litterio, Stephen Lamb, -# Helmut Haigermoser and Ted Williams. -# -# Contributors: -# Michael Scharf (Wind River) - split into core, view and connector plugins -# Martin Oberhuber (Wind River) - fixed copyright headers and beautified -# Michael Scharf (Wind River) - [240023] Get rid of the terminal's "Pin" button -# Martin Oberhuber (Wind River) - [206917] Add validation for Terminal Settings -# Martin Oberhuber (Wind River) - [262996] get rid of TerminalState.OPENED -# Ahmet Alptekin (Tubitak) - [244405] Add a UI Control for setting the Terminal's encoding -# Martin Oberhuber (Wind River) - [378691][api] push Preferences into the Widget -############################################################################### -NO_CONNECTION_SELECTED = No Connection Selected -PROP_TITLE = Terminal -SETTINGS = Settings - -TERMINALSETTINGS = Terminal Settings -NEW_TERMINAL_CONNECTION = New Terminal Connection -NEW_TERMINAL_VIEW = New Terminal View -CONNECTIONTYPE = Connection Type -VIEW_TITLE = View Title: -VIEW_SETTINGS = View Settings: -INVALID_SETTINGS = The specified settings are invalid, please review or cancel. -ENCODING = Encoding: -ENCODING_WITH_PARENTHESES = Encoding: ({0}) - -STATE_CONNECTED = CONNECTED -STATE_CONNECTING = CONNECTING... -STATE_CLOSED = CLOSED - -CANNOT_INITIALIZE = Cannot initialize {0}:\n{1} -CONNECTOR_NOT_AVAILABLE = Connector {0} is not available! -ENCODING_NOT_AVAILABLE = Encoding is not available! \ No newline at end of file diff --git a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/terminal/IRemoteSettings.java b/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/terminal/IRemoteSettings.java deleted file mode 100644 index 791c50e6f77..00000000000 --- a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/terminal/IRemoteSettings.java +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package org.eclipse.remote.terminal; - -public interface IRemoteSettings { - public static final String CONNECTION_NAME = "ConnectionName"; //$NON-NLS-1$ - public static final String REMOTE_SERVICES = "RemoteServices"; //$NON-NLS-1$ - - /** - * Get the host name or IP address of remote system to connect. - * - * @return host name or IP address of the remote system. - */ - String getRemoteServices(); - - /** - * Get the login name for connecting to the remote system. - * - * @return remote login name - */ - String getConnectionName(); -} diff --git a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/terminal/IRemoteTerminalConstants.java b/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/terminal/IRemoteTerminalConstants.java deleted file mode 100644 index af738f15c70..00000000000 --- a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/terminal/IRemoteTerminalConstants.java +++ /dev/null @@ -1,12 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package org.eclipse.remote.terminal; - -public interface IRemoteTerminalConstants { - public static final String PREF_TERMINAL_SHELL_COMMAND = "TERMINAL_SHELL_COMMAND"; //$NON-NLS-1$ -} diff --git a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/terminal/IRemoteTerminalParser.java b/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/terminal/IRemoteTerminalParser.java deleted file mode 100644 index fc986ea18e1..00000000000 --- a/bundles/org.eclipse.remote.terminal/src/org/eclipse/remote/terminal/IRemoteTerminalParser.java +++ /dev/null @@ -1,37 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package org.eclipse.remote.terminal; - -import java.io.IOException; - -import org.eclipse.remote.core.IRemoteConnection; -import org.eclipse.remote.core.IRemoteProcess; - -public interface IRemoteTerminalParser { - /** - * Initialize the remote shell. This method will be called after the connection has been initialized. Implementors can assume - * that the connection is open when this is called. - * - * @param connection - * terminal shell connection - * @return IRemoteProcess a remote process corresponding to the remote shell - * @throws IOException - * if the remote shell fails to start for some reason - */ - IRemoteProcess initialize(IRemoteConnection connection) throws IOException; - - /** - * Parse the input stream. This method will be called with a buffer of characters read from the input stream. If the method - * returns true, the characters will be displayed in the terminal view, otherwise they will be ignored. - * - * @param buf - * buffer containing characters from the terminal input stream - * @return true if the characters should be displayed in the terminal - */ - boolean parse(byte[] buf); -} diff --git a/bundles/org.eclipse.remote.terminal/tm32.png b/bundles/org.eclipse.remote.terminal/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_ diff --git a/bundles/org.eclipse.remote.terminal/toc.xml b/bundles/org.eclipse.remote.terminal/toc.xml deleted file mode 100644 index 4409655e2b2..00000000000 --- a/bundles/org.eclipse.remote.terminal/toc.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/features/org.eclipse.remote.terminal-feature/.project b/features/org.eclipse.remote.terminal-feature/.project deleted file mode 100644 index cbd97e563c8..00000000000 --- a/features/org.eclipse.remote.terminal-feature/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - org.eclipse.remote.terminal-feature - - - - - - org.eclipse.pde.FeatureBuilder - - - - - - org.eclipse.pde.FeatureNature - - diff --git a/features/org.eclipse.remote.terminal-feature/build.properties b/features/org.eclipse.remote.terminal-feature/build.properties deleted file mode 100644 index 400f7fd68ee..00000000000 --- a/features/org.eclipse.remote.terminal-feature/build.properties +++ /dev/null @@ -1,13 +0,0 @@ -################################################################################ -# Copyright (c) 2006, 2015 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: -# Michael Scharf (Wind River) - 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/features/org.eclipse.remote.terminal-feature/feature.properties b/features/org.eclipse.remote.terminal-feature/feature.properties deleted file mode 100644 index e5a742a7e81..00000000000 --- a/features/org.eclipse.remote.terminal-feature/feature.properties +++ /dev/null @@ -1,22 +0,0 @@ -# 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=Remote Terminal View - -# "providerName" property - name of the company that provides the feature -providerName=Eclipse.org - -# "description" property - description of the feature -description=A Terminal widget customized to use the Remote Services API. - -# "copyright" property - text of the "Feature Update Copyright" -copyright=\ -Copyright (c) 2013 IBM Corporation.\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\n diff --git a/features/org.eclipse.remote.terminal-feature/feature.xml b/features/org.eclipse.remote.terminal-feature/feature.xml deleted file mode 100644 index 8e72163d6f6..00000000000 --- a/features/org.eclipse.remote.terminal-feature/feature.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - %description - - - - %copyright - - - - %license - - - - - - - - - - - diff --git a/features/org.eclipse.remote.terminal-feature/pom.xml b/features/org.eclipse.remote.terminal-feature/pom.xml deleted file mode 100644 index 2cbef977aa5..00000000000 --- a/features/org.eclipse.remote.terminal-feature/pom.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - 4.0.0 - - org.eclipse.remote - remote-parent - 1.1.1-SNAPSHOT - ../../releng/org.eclipse.remote.build/pom.xml - - - - - - org.eclipse.tycho.extras - tycho-source-feature-plugin - - - source-feature - package - - source-feature - - - - - - org.eclipse.tycho - tycho-p2-plugin - ${tycho-version} - - - attached-p2-metadata - package - - p2-metadata - - - - - - - - org.eclipse.remote.terminal - 1.0.0.qualifier - eclipse-feature - diff --git a/releng/org.eclipse.remote.build/pom.xml b/releng/org.eclipse.remote.build/pom.xml index af114b94f71..ec514aab205 100644 --- a/releng/org.eclipse.remote.build/pom.xml +++ b/releng/org.eclipse.remote.build/pom.xml @@ -50,9 +50,6 @@ ../../bundles/org.eclipse.remote.ui ../../features/org.eclipse.remote-feature ../../releng/org.eclipse.remote.repo - ../../bundles/org.eclipse.remote.console ../../features/org.eclipse.remote.console-feature diff --git a/releng/org.eclipse.remote.repo/category.xml b/releng/org.eclipse.remote.repo/category.xml index 5bda418eda8..e0568a6cc2b 100644 --- a/releng/org.eclipse.remote.repo/category.xml +++ b/releng/org.eclipse.remote.repo/category.xml @@ -12,12 +12,6 @@ -