Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'terminal')
-rw-r--r--terminal/org.eclipse.tm.terminal-feature/.project17
-rw-r--r--terminal/org.eclipse.tm.terminal-feature/build.properties14
-rw-r--r--terminal/org.eclipse.tm.terminal-feature/epl-v10.html256
-rw-r--r--terminal/org.eclipse.tm.terminal-feature/feature.properties142
-rw-r--r--terminal/org.eclipse.tm.terminal-feature/feature.xml37
-rw-r--r--terminal/org.eclipse.tm.terminal-feature/license.html79
-rw-r--r--terminal/org.eclipse.tm.terminal-feature/sourceTemplateFeature/epl-v10.html256
-rw-r--r--terminal/org.eclipse.tm.terminal-feature/sourceTemplateFeature/feature.properties141
-rw-r--r--terminal/org.eclipse.tm.terminal-feature/sourceTemplateFeature/license.html79
-rw-r--r--terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/about.html33
-rw-r--r--terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/about.ini27
-rw-r--r--terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/about.mappings6
-rw-r--r--terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/about.properties25
-rw-r--r--terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/build.properties12
-rw-r--r--terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/dsdp32.pngbin2275 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/plugin.properties12
-rw-r--r--terminal/org.eclipse.tm.terminal.sdk-feature/.project17
-rw-r--r--terminal/org.eclipse.tm.terminal.sdk-feature/build.properties20
-rw-r--r--terminal/org.eclipse.tm.terminal.sdk-feature/eclipse_update_120.jpgbin21695 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.sdk-feature/epl-v10.html256
-rw-r--r--terminal/org.eclipse.tm.terminal.sdk-feature/feature.properties142
-rw-r--r--terminal/org.eclipse.tm.terminal.sdk-feature/feature.xml81
-rw-r--r--terminal/org.eclipse.tm.terminal.sdk-feature/license.html79
-rw-r--r--terminal/org.eclipse.tm.terminal.serial-feature/.project17
-rw-r--r--terminal/org.eclipse.tm.terminal.serial-feature/build.properties14
-rw-r--r--terminal/org.eclipse.tm.terminal.serial-feature/epl-v10.html256
-rw-r--r--terminal/org.eclipse.tm.terminal.serial-feature/feature.properties141
-rw-r--r--terminal/org.eclipse.tm.terminal.serial-feature/feature.xml38
-rw-r--r--terminal/org.eclipse.tm.terminal.serial-feature/license.html79
-rw-r--r--terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplateFeature/epl-v10.html256
-rw-r--r--terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplateFeature/feature.properties141
-rw-r--r--terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplateFeature/license.html79
-rw-r--r--terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/about.html33
-rw-r--r--terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/about.ini27
-rw-r--r--terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/about.mappings6
-rw-r--r--terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/about.properties25
-rw-r--r--terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/build.properties12
-rw-r--r--terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/dsdp32.pngbin2275 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/plugin.properties12
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/.classpath11
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/.cvsignore1
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/.project34
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/.settings/org.eclipse.jdt.core.prefs71
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/META-INF/MANIFEST.MF18
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/README.txt64
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/about.html28
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/about.ini27
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/about.mappings6
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/about.properties25
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/build.properties27
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/dsdp32.pngbin2275 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/plugin.properties19
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/plugin.xml21
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/Activator.java65
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/ISerialSettings.java28
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialConnectWorker.java212
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialConnector.java230
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialMessages.java44
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialMessages.properties49
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialPortHandler.java113
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialProperties.java163
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialSettings.java193
-rw-r--r--terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialSettingsPage.java162
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh-feature/.project17
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh-feature/build.properties14
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh-feature/epl-v10.html256
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh-feature/feature.properties141
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh-feature/feature.xml50
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh-feature/license.html79
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplateFeature/epl-v10.html256
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplateFeature/feature.properties141
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplateFeature/license.html79
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/about.html33
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/about.ini27
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/about.mappings6
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/about.properties25
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/build.properties12
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/dsdp32.pngbin2275 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/plugin.properties12
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/.classpath7
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/.cvsignore1
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/.project34
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/.settings/org.eclipse.jdt.core.prefs71
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/META-INF/MANIFEST.MF17
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/about.html28
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/about.ini27
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/about.mappings6
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/about.properties25
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/build.properties20
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/dsdp32.pngbin2275 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/plugin.properties13
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/plugin.xml22
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/Activator.java94
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/ISshConstants.java26
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/ISshSettings.java78
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/KeyboardInteractiveDialog.java185
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshConnection.java364
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshConnector.java121
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshMessages.java97
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshMessages.properties53
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshSettings.java119
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshSettingsPage.java118
-rw-r--r--terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/UserValidationDialog.java277
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet-feature/.project17
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet-feature/build.properties14
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet-feature/epl-v10.html256
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet-feature/feature.properties141
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet-feature/feature.xml37
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet-feature/license.html79
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplateFeature/epl-v10.html256
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplateFeature/feature.properties141
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplateFeature/license.html79
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/about.html33
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/about.ini27
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/about.mappings6
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/about.properties25
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/build.properties12
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/dsdp32.pngbin2275 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/plugin.properties12
-rw-r--r--terminal/org.eclipse.tm.terminal.test-feature/.project17
-rw-r--r--terminal/org.eclipse.tm.terminal.test-feature/build.properties19
-rw-r--r--terminal/org.eclipse.tm.terminal.test-feature/epl-v10.html256
-rw-r--r--terminal/org.eclipse.tm.terminal.test-feature/feature.properties141
-rw-r--r--terminal/org.eclipse.tm.terminal.test-feature/feature.xml46
-rw-r--r--terminal/org.eclipse.tm.terminal.test-feature/license.html79
-rw-r--r--terminal/org.eclipse.tm.terminal.test-feature/rootfiles/epl-v10.html256
-rw-r--r--terminal/org.eclipse.tm.terminal.test-feature/rootfiles/notice.html79
-rw-r--r--terminal/org.eclipse.tm.terminal.test-feature/sourceTemplatePlugin/about.html33
-rw-r--r--terminal/org.eclipse.tm.terminal.test-feature/sourceTemplatePlugin/build.properties12
-rw-r--r--terminal/org.eclipse.tm.terminal.test-feature/sourceTemplatePlugin/plugin.properties12
-rw-r--r--terminal/org.eclipse.tm.terminal.test/.classpath7
-rw-r--r--terminal/org.eclipse.tm.terminal.test/.cvsignore1
-rw-r--r--terminal/org.eclipse.tm.terminal.test/.project28
-rw-r--r--terminal/org.eclipse.tm.terminal.test/.settings/org.eclipse.jdt.core.prefs83
-rw-r--r--terminal/org.eclipse.tm.terminal.test/META-INF/MANIFEST.MF22
-rw-r--r--terminal/org.eclipse.tm.terminal.test/about.html28
-rw-r--r--terminal/org.eclipse.tm.terminal.test/about.ini27
-rw-r--r--terminal/org.eclipse.tm.terminal.test/about.mappings6
-rw-r--r--terminal/org.eclipse.tm.terminal.test/about.properties25
-rw-r--r--terminal/org.eclipse.tm.terminal.test/build.properties28
-rw-r--r--terminal/org.eclipse.tm.terminal.test/dsdp32.pngbin2275 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.test/plugin.properties17
-rw-r--r--terminal/org.eclipse.tm.terminal.test/plugin.xml23
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/connector/TerminalConnectorFactoryTest.java270
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/connector/TerminalConnectorPluginTest.java62
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/connector/TerminalConnectorTest.java237
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/connector/TerminalToRemoteInjectionOutputStreamTest.java175
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/emulator/AllTests.java36
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/emulator/VT100EmulatorBackendTest.java1237
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/AbstractITerminalTextDataTest.java817
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/AllTests.java45
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/SnapshotChangesTest.java679
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/SynchronizedTerminalTextDataTest.java20
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataFastScrollTest.java20
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataFastScrollTestMaxHeigth.java20
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataPerformanceTest.java224
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataSnapshotTest.java1344
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataSnapshotWindowTest.java191
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataStoreTest.java20
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataTest.java20
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataWindowTest.java481
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextTestHelper.java108
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/speedtest/SpeedTestConnection.java116
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/speedtest/SpeedTestConnector.java104
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/speedtest/SpeedTestSettings.java62
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/speedtest/SpeedTestSettingsPage.java68
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/terminalcanvas/Main.java36
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/terminalcanvas/Snippet48.java110
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/terminalcanvas/TerminalTextCanvas.java103
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/terminalcanvas/VirtualCanvas.java333
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/AbstractLineOrientedDataSource.java42
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/DataReader.java87
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/FastDataSource.java35
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/FileDataSource.java72
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/IDataSource.java21
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/IStatus.java15
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/LineCountingDataSource.java43
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/RandomDataSource.java49
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/TerminalTextUITest.java253
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/VT100DataSource.java127
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/textcanvas/PipedInputStreamPerformanceTest.java32
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/textcanvas/PipedStreamTest.java113
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/terminal/model/AllTests.java37
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/terminal/model/StyleColorTest.java36
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/terminal/model/StyleTest.java116
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/terminal/test/AutomatedPluginTests.java32
-rw-r--r--terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/terminal/test/AutomatedTests.java42
-rw-r--r--terminal/org.eclipse.tm.terminal.test/teamConfig/Terminal All Unit Tests.launch16
-rw-r--r--terminal/org.eclipse.tm.terminal.test/teamConfig/Terminal Plugin Tests.launch39
-rw-r--r--terminal/org.eclipse.tm.terminal.test/test.xml101
-rw-r--r--terminal/org.eclipse.tm.terminal.view-feature/.project17
-rw-r--r--terminal/org.eclipse.tm.terminal.view-feature/build.properties14
-rw-r--r--terminal/org.eclipse.tm.terminal.view-feature/epl-v10.html256
-rw-r--r--terminal/org.eclipse.tm.terminal.view-feature/feature.properties141
-rw-r--r--terminal/org.eclipse.tm.terminal.view-feature/feature.xml49
-rw-r--r--terminal/org.eclipse.tm.terminal.view-feature/license.html79
-rw-r--r--terminal/org.eclipse.tm.terminal.view-feature/sourceTemplateFeature/epl-v10.html256
-rw-r--r--terminal/org.eclipse.tm.terminal.view-feature/sourceTemplateFeature/feature.properties141
-rw-r--r--terminal/org.eclipse.tm.terminal.view-feature/sourceTemplateFeature/license.html79
-rw-r--r--terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/about.html33
-rw-r--r--terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/about.ini27
-rw-r--r--terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/about.mappings6
-rw-r--r--terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/about.properties25
-rw-r--r--terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/build.properties12
-rw-r--r--terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/dsdp32.pngbin2275 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/plugin.properties12
-rw-r--r--terminal/org.eclipse.tm.terminal.view/.classpath7
-rw-r--r--terminal/org.eclipse.tm.terminal.view/.cvsignore1
-rw-r--r--terminal/org.eclipse.tm.terminal.view/.project34
-rw-r--r--terminal/org.eclipse.tm.terminal.view/.settings/org.eclipse.jdt.core.prefs71
-rw-r--r--terminal/org.eclipse.tm.terminal.view/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--terminal/org.eclipse.tm.terminal.view/HelpContexts.xml26
-rw-r--r--terminal/org.eclipse.tm.terminal.view/META-INF/MANIFEST.MF16
-rw-r--r--terminal/org.eclipse.tm.terminal.view/TerminalContexts.xml19
-rw-r--r--terminal/org.eclipse.tm.terminal.view/about.html28
-rw-r--r--terminal/org.eclipse.tm.terminal.view/about.ini27
-rw-r--r--terminal/org.eclipse.tm.terminal.view/about.mappings6
-rw-r--r--terminal/org.eclipse.tm.terminal.view/about.properties25
-rw-r--r--terminal/org.eclipse.tm.terminal.view/build.properties33
-rw-r--r--terminal/org.eclipse.tm.terminal.view/doc/book.css1
-rw-r--r--terminal/org.eclipse.tm.terminal.view/doc/html/01_terminalview.html46
-rw-r--r--terminal/org.eclipse.tm.terminal.view/doc/html/02_terminal_page.html78
-rw-r--r--terminal/org.eclipse.tm.terminal.view/doc/html/03_terminal_settings.html101
-rw-r--r--terminal/org.eclipse.tm.terminal.view/doc/html/04_terminal_emulation.html64
-rw-r--r--terminal/org.eclipse.tm.terminal.view/doc/html/notice.html30
-rw-r--r--terminal/org.eclipse.tm.terminal.view/dsdp32.pngbin2275 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.view/icons/clcl16/command_input_field.gifbin385 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.view/icons/clcl16/connect_co.gifbin139 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.view/icons/clcl16/disconnect_co.gifbin146 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.view/icons/clcl16/lock_co.gifbin626 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.view/icons/clcl16/newterminal.gifbin351 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.view/icons/clcl16/properties_tsk.gifbin118 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.view/icons/cview16/terminal_view.gifbin938 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.view/icons/dlcl16/command_input_field.gifbin239 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.view/icons/dlcl16/connect_co.gifbin874 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.view/icons/dlcl16/disconnect_co.gifbin90 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.view/icons/dlcl16/lock_co.gifbin588 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.view/icons/dlcl16/newterminal.gifbin351 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.view/icons/dlcl16/properties_tsk.gifbin90 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.view/icons/dlcl16/rem_co.gifbin159 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.view/icons/elcl16/command_input_field.gifbin239 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.view/icons/elcl16/connect_co.gifbin890 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.view/icons/elcl16/disconnect_co.gifbin118 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.view/icons/elcl16/lock_co.gifbin626 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.view/icons/elcl16/newterminal.gifbin351 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.view/icons/elcl16/properties_tsk.gifbin118 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.view/icons/elcl16/rem_co.gifbin163 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.view/icons/eview16/terminal_view.gifbin938 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal.view/plugin.properties22
-rw-r--r--terminal/org.eclipse.tm.terminal.view/plugin.xml81
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/ActionMessages.java43
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/ActionMessages.properties33
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/ShowTerminalConnectionAction.java83
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalAction.java75
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionConnect.java39
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionDisconnect.java42
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionNewTerminal.java83
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionRemove.java40
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionScrollLock.java41
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionSelectionDropDown.java106
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionSettings.java39
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionToggleCommandInputField.java36
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ITerminalView.java34
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ITerminalViewConnection.java78
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ITerminalViewConnectionManager.java83
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ImageConsts.java52
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/PageBook.java34
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/SettingStorePrefixDecorator.java35
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/SettingsStore.java111
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalPreferenceInitializer.java31
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalPreferencePage.java90
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalSettingsDlg.java334
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalView.java722
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalViewConnection.java203
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalViewConnectionManager.java181
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalViewControlDecorator.java167
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalViewPlugin.java152
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ViewMessages.java52
-rw-r--r--terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ViewMessages.properties42
-rw-r--r--terminal/org.eclipse.tm.terminal.view/toc.xml21
-rw-r--r--terminal/org.eclipse.tm.terminal/.classpath7
-rw-r--r--terminal/org.eclipse.tm.terminal/.cvsignore1
-rw-r--r--terminal/org.eclipse.tm.terminal/.options8
-rw-r--r--terminal/org.eclipse.tm.terminal/.project34
-rw-r--r--terminal/org.eclipse.tm.terminal/.settings/org.eclipse.jdt.core.prefs75
-rw-r--r--terminal/org.eclipse.tm.terminal/HelpContexts.xml18
-rw-r--r--terminal/org.eclipse.tm.terminal/META-INF/MANIFEST.MF34
-rw-r--r--terminal/org.eclipse.tm.terminal/README.txt17
-rw-r--r--terminal/org.eclipse.tm.terminal/about.html28
-rw-r--r--terminal/org.eclipse.tm.terminal/about.ini27
-rw-r--r--terminal/org.eclipse.tm.terminal/about.mappings6
-rw-r--r--terminal/org.eclipse.tm.terminal/about.properties25
-rw-r--r--terminal/org.eclipse.tm.terminal/build.properties40
-rw-r--r--terminal/org.eclipse.tm.terminal/dsdp32.pngbin2275 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal/icons/clcl16/clear_co.gifbin595 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal/icons/dlcl16/clear_co.gifbin364 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal/icons/elcl16/clear_co.gifbin595 -> 0 bytes
-rw-r--r--terminal/org.eclipse.tm.terminal/plugin.properties28
-rw-r--r--terminal/org.eclipse.tm.terminal/plugin.xml109
-rw-r--r--terminal/org.eclipse.tm.terminal/schema/terminalConnectors.exsd111
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/connector/TerminalConnector.java223
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/connector/TerminalToRemoteInjectionOutputStream.java163
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/CommandInputFieldWithHistory.java308
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/ICommandInputField.java35
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/ITerminalListener.java33
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/ITerminalViewControl.java108
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/TerminalViewControlFactory.java22
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/AbstractTerminalAction.java101
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/ActionMessages.java34
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/ActionMessages.properties25
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/ImageConsts.java31
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/TerminalActionClearAll.java53
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/TerminalActionCopy.java65
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/TerminalActionCut.java54
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/TerminalActionPaste.java63
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/TerminalActionSelectAll.java50
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/impl/ITerminalControlForText.java34
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/impl/TerminalInputStream.java334
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/impl/TerminalMessages.java26
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/impl/TerminalMessages.properties24
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/impl/TerminalPlugin.java84
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/IVT100EmulatorBackend.java172
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/LoggingOutputStream.java48
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/VT100BackendTraceDecorator.java144
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/VT100Emulator.java1167
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/VT100EmulatorBackend.java407
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/VT100TerminalControl.java1022
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/ISnapshotChanges.java90
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/SnapshotChanges.java391
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/SynchronizedTerminalTextData.java100
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/TerminalTextData.java265
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataFastScroll.java250
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataSnapshot.java299
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataStore.java333
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataWindow.java198
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/ISettingsPage.java51
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/ISettingsStore.java45
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/ITerminalConnector.java154
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/ITerminalControl.java118
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/LayeredSettingsStore.java62
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/Logger.java198
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/PreferenceSettingStore.java59
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/TerminalConnectorExtension.java98
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/TerminalState.java52
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/provider/TerminalConnectorImpl.java161
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/AbstractTextCanvasModel.java347
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/GridCanvas.java197
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/ILinelRenderer.java24
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/ITextCanvasModel.java84
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/ITextCanvasModelListener.java24
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/PipedInputStream.java309
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/PollingTextCanvasModel.java35
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/StyleMap.java245
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/TextCanvas.java343
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/TextLineRenderer.java163
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/VirtualCanvas.java345
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/model/ITerminalTextData.java154
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/model/ITerminalTextDataReadOnly.java76
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/model/ITerminalTextDataSnapshot.java226
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/model/LineSegment.java35
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/model/Style.java154
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/model/StyleColor.java54
-rw-r--r--terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/model/TerminalTextDataFactory.java20
-rw-r--r--terminal/readme.txt4
365 files changed, 0 insertions, 34167 deletions
diff --git a/terminal/org.eclipse.tm.terminal-feature/.project b/terminal/org.eclipse.tm.terminal-feature/.project
deleted file mode 100644
index c93208eb4..000000000
--- a/terminal/org.eclipse.tm.terminal-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.terminal-feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/terminal/org.eclipse.tm.terminal-feature/build.properties b/terminal/org.eclipse.tm.terminal-feature/build.properties
deleted file mode 100644
index 6c1e50644..000000000
--- a/terminal/org.eclipse.tm.terminal-feature/build.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-################################################################################
-# Copyright (c) 2006 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
-################################################################################
-bin.includes = feature.xml,\
- epl-v10.html,\
- feature.properties,\
- license.html
diff --git a/terminal/org.eclipse.tm.terminal-feature/epl-v10.html b/terminal/org.eclipse.tm.terminal-feature/epl-v10.html
deleted file mode 100644
index 9321f4082..000000000
--- a/terminal/org.eclipse.tm.terminal-feature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">where such changes and/or additions to the Program
-originate from and are distributed by that particular Contributor. A
-Contribution 'originates' from a Contributor if it was added to the
-Program by such Contributor itself or anyone acting on such
-Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in
-conjunction with the Program under their own license agreement, and (ii)
-are not derivative works of the Program.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" mean patent claims licensable by a
-Contributor which are necessarily infringed by the use or sale of its
-Contribution alone or when combined with the Program.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to reproduce, prepare derivative works
-of, publicly display, publicly perform, distribute and sublicense the
-Contribution of such Contributor, if any, and such derivative works, in
-source code and object code form.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free patent license under Licensed Patents to make, use, sell,
-offer to sell, import and otherwise transfer the Contribution of such
-Contributor, if any, in source code and object code form. This patent
-license shall apply to the combination of the Contribution and the
-Program if, at the time the Contribution is added by the Contributor,
-such addition of the Contribution causes such combination to be covered
-by the Licensed Patents. The patent license shall not apply to any other
-combinations which include the Contribution. No hardware per se is
-licensed hereunder.</p>
-
-<p class="list">c) Recipient understands that although each Contributor
-grants the licenses to its Contributions set forth herein, no assurances
-are provided by any Contributor that the Program does not infringe the
-patent or other intellectual property rights of any other entity. Each
-Contributor disclaims any liability to Recipient for claims brought by
-any other entity based on infringement of intellectual property rights
-or otherwise. As a condition to exercising the rights and licenses
-granted hereunder, each Recipient hereby assumes sole responsibility to
-secure any other intellectual property rights needed, if any. For
-example, if a third party patent license is required to allow Recipient
-to distribute the Program, it is Recipient's responsibility to acquire
-that license before distributing the Program.</p>
-
-<p class="list">d) Each Contributor represents that to its knowledge it
-has sufficient copyright rights in its Contribution, if any, to grant
-the copyright license set forth in this Agreement.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">i) effectively disclaims on behalf of all Contributors
-all warranties and conditions, express and implied, including warranties
-or conditions of title and non-infringement, and implied warranties or
-conditions of merchantability and fitness for a particular purpose;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">iv) states that source code for the Program is available
-from such Contributor, and informs licensees how to obtain it in a
-reasonable manner on or through a medium customarily used for software
-exchange.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>Each Contributor must identify itself as the originator of its
-Contribution, if any, in a manner that reasonably allows subsequent
-Recipients to identify the originator of the Contribution.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>Commercial distributors of software may accept certain
-responsibilities with respect to end users, business partners and the
-like. While this license is intended to facilitate the commercial use of
-the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create
-potential liability for other Contributors. Therefore, if a Contributor
-includes the Program in a commercial product offering, such Contributor
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-arising from claims, lawsuits and other legal actions brought by a third
-party against the Indemnified Contributor to the extent caused by the
-acts or omissions of such Commercial Contributor in connection with its
-distribution of the Program in a commercial product offering. The
-obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In
-order to qualify, an Indemnified Contributor must: a) promptly notify
-the Commercial Contributor in writing of such claim, and b) allow the
-Commercial Contributor to control, and cooperate with the Commercial
-Contributor in, the defense and any related settlement negotiations. The
-Indemnified Contributor may participate in any such claim at its own
-expense.</p>
-
-<p>For example, a Contributor might include the Program in a commercial
-product offering, Product X. That Contributor is then a Commercial
-Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance
-claims and warranties are such Commercial Contributor's responsibility
-alone. Under this section, the Commercial Contributor would have to
-defend claims against the other Contributors related to those
-performance claims and warranties, and if a court requires any other
-Contributor to pay any damages as a result, the Commercial Contributor
-must pay those damages.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
-OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
-ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
-OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and
-distributing the Program and assumes all risks associated with its
-exercise of rights under this Agreement , including but not limited to
-the risks and costs of program errors, compliance with applicable laws,
-damage to or loss of data, programs or equipment, and unavailability or
-interruption of operations.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
-NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
-WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
-DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
-HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>If any provision of this Agreement is invalid or unenforceable under
-applicable law, it shall not affect the validity or enforceability of
-the remainder of the terms of this Agreement, and without further action
-by the parties hereto, such provision shall be reformed to the minimum
-extent necessary to make such provision valid and enforceable.</p>
-
-<p>If Recipient institutes patent litigation against any entity
-(including a cross-claim or counterclaim in a lawsuit) alleging that the
-Program itself (excluding combinations of the Program with other
-software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the
-date such litigation is filed.</p>
-
-<p>All Recipient's rights under this Agreement shall terminate if it
-fails to comply with any of the material terms or conditions of this
-Agreement and does not cure such failure in a reasonable period of time
-after becoming aware of such noncompliance. If all Recipient's rights
-under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive.</p>
-
-<p>Everyone is permitted to copy and distribute copies of this
-Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The
-Agreement Steward reserves the right to publish new versions (including
-revisions) of this Agreement from time to time. No one other than the
-Agreement Steward has the right to modify this Agreement. The Eclipse
-Foundation is the initial Agreement Steward. The Eclipse Foundation may
-assign the responsibility to serve as the Agreement Steward to a
-suitable separate entity. Each new version of the Agreement will be
-given a distinguishing version number. The Program (including
-Contributions) may always be distributed subject to the version of the
-Agreement under which it was received. In addition, after a new version
-of the Agreement is published, Contributor may elect to distribute the
-Program (including its Contributions) under the new version. Except as
-expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
-rights or licenses to the intellectual property of any Contributor under
-this Agreement, whether expressly, by implication, estoppel or
-otherwise. All rights in the Program not expressly granted under this
-Agreement are reserved.</p>
-
-<p>This Agreement is governed by the laws of the State of New York and
-the intellectual property laws of the United States of America. No party
-to this Agreement will bring a legal action under this Agreement more
-than one year after the cause of action arose. Each party waives its
-rights to a jury trial in any resulting litigation.</p>
-
-</body></html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal-feature/feature.properties b/terminal/org.eclipse.tm.terminal-feature/feature.properties
deleted file mode 100644
index 6f950b435..000000000
--- a/terminal/org.eclipse.tm.terminal-feature/feature.properties
+++ /dev/null
@@ -1,142 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 Wind River Systems, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Martin Oberhuber (Wind River) - initial API and implementation
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=Target Management Terminal Widget
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management Updates
-
-# "description" property - description of the feature
-description=An ANSI (vt102) compatible Terminal widget \
-with RCP-only dependencies.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2003, 2009 Wind River Systems, Inc. and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/terminal/org.eclipse.tm.terminal-feature/feature.xml b/terminal/org.eclipse.tm.terminal-feature/feature.xml
deleted file mode 100644
index bdfd78be8..000000000
--- a/terminal/org.eclipse.tm.terminal-feature/feature.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?> <!-- Copyright (c) 2006, 2009 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 - initial API and implementation Uwe Stieber (Wind River) - [282996] [terminal][api] Add "hidden" attribute to terminal connector extension point -->
-<feature
- id="org.eclipse.tm.terminal"
- label="%featureName"
- version="3.0.1.qualifier"
- provider-name="%providerName">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- <discovery label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- </url>
-
- <requires>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.ui"/>
- </requires>
-
- <plugin
- id="org.eclipse.tm.terminal"
- download-size="56"
- install-size="56"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/terminal/org.eclipse.tm.terminal-feature/license.html b/terminal/org.eclipse.tm.terminal-feature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/terminal/org.eclipse.tm.terminal-feature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/terminal/org.eclipse.tm.terminal-feature/sourceTemplateFeature/epl-v10.html b/terminal/org.eclipse.tm.terminal-feature/sourceTemplateFeature/epl-v10.html
deleted file mode 100644
index 9321f4082..000000000
--- a/terminal/org.eclipse.tm.terminal-feature/sourceTemplateFeature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">where such changes and/or additions to the Program
-originate from and are distributed by that particular Contributor. A
-Contribution 'originates' from a Contributor if it was added to the
-Program by such Contributor itself or anyone acting on such
-Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in
-conjunction with the Program under their own license agreement, and (ii)
-are not derivative works of the Program.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" mean patent claims licensable by a
-Contributor which are necessarily infringed by the use or sale of its
-Contribution alone or when combined with the Program.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to reproduce, prepare derivative works
-of, publicly display, publicly perform, distribute and sublicense the
-Contribution of such Contributor, if any, and such derivative works, in
-source code and object code form.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free patent license under Licensed Patents to make, use, sell,
-offer to sell, import and otherwise transfer the Contribution of such
-Contributor, if any, in source code and object code form. This patent
-license shall apply to the combination of the Contribution and the
-Program if, at the time the Contribution is added by the Contributor,
-such addition of the Contribution causes such combination to be covered
-by the Licensed Patents. The patent license shall not apply to any other
-combinations which include the Contribution. No hardware per se is
-licensed hereunder.</p>
-
-<p class="list">c) Recipient understands that although each Contributor
-grants the licenses to its Contributions set forth herein, no assurances
-are provided by any Contributor that the Program does not infringe the
-patent or other intellectual property rights of any other entity. Each
-Contributor disclaims any liability to Recipient for claims brought by
-any other entity based on infringement of intellectual property rights
-or otherwise. As a condition to exercising the rights and licenses
-granted hereunder, each Recipient hereby assumes sole responsibility to
-secure any other intellectual property rights needed, if any. For
-example, if a third party patent license is required to allow Recipient
-to distribute the Program, it is Recipient's responsibility to acquire
-that license before distributing the Program.</p>
-
-<p class="list">d) Each Contributor represents that to its knowledge it
-has sufficient copyright rights in its Contribution, if any, to grant
-the copyright license set forth in this Agreement.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">i) effectively disclaims on behalf of all Contributors
-all warranties and conditions, express and implied, including warranties
-or conditions of title and non-infringement, and implied warranties or
-conditions of merchantability and fitness for a particular purpose;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">iv) states that source code for the Program is available
-from such Contributor, and informs licensees how to obtain it in a
-reasonable manner on or through a medium customarily used for software
-exchange.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>Each Contributor must identify itself as the originator of its
-Contribution, if any, in a manner that reasonably allows subsequent
-Recipients to identify the originator of the Contribution.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>Commercial distributors of software may accept certain
-responsibilities with respect to end users, business partners and the
-like. While this license is intended to facilitate the commercial use of
-the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create
-potential liability for other Contributors. Therefore, if a Contributor
-includes the Program in a commercial product offering, such Contributor
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-arising from claims, lawsuits and other legal actions brought by a third
-party against the Indemnified Contributor to the extent caused by the
-acts or omissions of such Commercial Contributor in connection with its
-distribution of the Program in a commercial product offering. The
-obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In
-order to qualify, an Indemnified Contributor must: a) promptly notify
-the Commercial Contributor in writing of such claim, and b) allow the
-Commercial Contributor to control, and cooperate with the Commercial
-Contributor in, the defense and any related settlement negotiations. The
-Indemnified Contributor may participate in any such claim at its own
-expense.</p>
-
-<p>For example, a Contributor might include the Program in a commercial
-product offering, Product X. That Contributor is then a Commercial
-Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance
-claims and warranties are such Commercial Contributor's responsibility
-alone. Under this section, the Commercial Contributor would have to
-defend claims against the other Contributors related to those
-performance claims and warranties, and if a court requires any other
-Contributor to pay any damages as a result, the Commercial Contributor
-must pay those damages.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
-OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
-ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
-OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and
-distributing the Program and assumes all risks associated with its
-exercise of rights under this Agreement , including but not limited to
-the risks and costs of program errors, compliance with applicable laws,
-damage to or loss of data, programs or equipment, and unavailability or
-interruption of operations.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
-NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
-WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
-DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
-HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>If any provision of this Agreement is invalid or unenforceable under
-applicable law, it shall not affect the validity or enforceability of
-the remainder of the terms of this Agreement, and without further action
-by the parties hereto, such provision shall be reformed to the minimum
-extent necessary to make such provision valid and enforceable.</p>
-
-<p>If Recipient institutes patent litigation against any entity
-(including a cross-claim or counterclaim in a lawsuit) alleging that the
-Program itself (excluding combinations of the Program with other
-software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the
-date such litigation is filed.</p>
-
-<p>All Recipient's rights under this Agreement shall terminate if it
-fails to comply with any of the material terms or conditions of this
-Agreement and does not cure such failure in a reasonable period of time
-after becoming aware of such noncompliance. If all Recipient's rights
-under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive.</p>
-
-<p>Everyone is permitted to copy and distribute copies of this
-Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The
-Agreement Steward reserves the right to publish new versions (including
-revisions) of this Agreement from time to time. No one other than the
-Agreement Steward has the right to modify this Agreement. The Eclipse
-Foundation is the initial Agreement Steward. The Eclipse Foundation may
-assign the responsibility to serve as the Agreement Steward to a
-suitable separate entity. Each new version of the Agreement will be
-given a distinguishing version number. The Program (including
-Contributions) may always be distributed subject to the version of the
-Agreement under which it was received. In addition, after a new version
-of the Agreement is published, Contributor may elect to distribute the
-Program (including its Contributions) under the new version. Except as
-expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
-rights or licenses to the intellectual property of any Contributor under
-this Agreement, whether expressly, by implication, estoppel or
-otherwise. All rights in the Program not expressly granted under this
-Agreement are reserved.</p>
-
-<p>This Agreement is governed by the laws of the State of New York and
-the intellectual property laws of the United States of America. No party
-to this Agreement will bring a legal action under this Agreement more
-than one year after the cause of action arose. Each party waives its
-rights to a jury trial in any resulting litigation.</p>
-
-</body></html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal-feature/sourceTemplateFeature/feature.properties b/terminal/org.eclipse.tm.terminal-feature/sourceTemplateFeature/feature.properties
deleted file mode 100644
index b5545ef25..000000000
--- a/terminal/org.eclipse.tm.terminal-feature/sourceTemplateFeature/feature.properties
+++ /dev/null
@@ -1,141 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 Wind River Systems, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Martin Oberhuber (Wind River) - initial API and implementation
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=Target Management Terminal Widget Source
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management Updates
-
-# "description" property - description of the feature
-description=An ANSI (vt102) compatible Terminal widget.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2003, 2009 Wind River Systems, Inc. and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/terminal/org.eclipse.tm.terminal-feature/sourceTemplateFeature/license.html b/terminal/org.eclipse.tm.terminal-feature/sourceTemplateFeature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/terminal/org.eclipse.tm.terminal-feature/sourceTemplateFeature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/about.html b/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/about.html
deleted file mode 100644
index e7b57cfff..000000000
--- a/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/about.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2007</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-<h3>Source Code</h3>
-<p>This plug-in contains source code zip files (&quot;Source Zips&quot;) that correspond to binary content in other plug-ins. These Source Zips may be distributed under different license
-agreements and/or notices. Details about these license agreements and notices are contained in &quot;about.html&quot; files (&quot;Abouts&quot;) located in sub-directories in the
-src/ directory of this plug-in. Such Abouts govern your use of the Source Zips in that directory, not the EPL.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/about.ini b/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/about.ini
deleted file mode 100644
index fbbb9f83d..000000000
--- a/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/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=dsdp32.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/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/about.mappings b/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/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/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/about.properties b/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/about.properties
deleted file mode 100644
index d309a5158..000000000
--- a/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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 Widget Source\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Wind River Systems, Inc. and others 2003, 2009. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm
diff --git a/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/build.properties b/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/build.properties
deleted file mode 100644
index 7ef3fa39c..000000000
--- a/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 Wind River Systems, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-bin.includes = about.html, about.ini, about.mappings, about.properties, dsdp32.png, plugin.properties, plugin.xml, src/, META-INF/
-sourcePlugin = true
diff --git a/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/dsdp32.png b/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/dsdp32.png
deleted file mode 100644
index 3077b1220..000000000
--- a/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/dsdp32.png
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/plugin.properties b/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/plugin.properties
deleted file mode 100644
index a98d3f1b5..000000000
--- a/terminal/org.eclipse.tm.terminal-feature/sourceTemplatePlugin/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 Wind River Systems, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-pluginName=Target Management Terminal Widget Source
-providerName=Eclipse.org - DSDP
diff --git a/terminal/org.eclipse.tm.terminal.sdk-feature/.project b/terminal/org.eclipse.tm.terminal.sdk-feature/.project
deleted file mode 100644
index 92158332e..000000000
--- a/terminal/org.eclipse.tm.terminal.sdk-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.terminal.sdk-feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/terminal/org.eclipse.tm.terminal.sdk-feature/build.properties b/terminal/org.eclipse.tm.terminal.sdk-feature/build.properties
deleted file mode 100644
index 89790a04e..000000000
--- a/terminal/org.eclipse.tm.terminal.sdk-feature/build.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2007 Wind River Systems, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Martin Oberhuber (Wind River) - initial API and implementation
-################################################################################
-bin.includes = feature.xml,\
- epl-v10.html,\
- feature.properties,\
- license.html,\
- eclipse_update_120.jpg
-generate.plugin@org.eclipse.tm.terminal.source=org.eclipse.tm.terminal
-generate.plugin@org.eclipse.tm.terminal.serial.source=org.eclipse.tm.terminal.serial
-generate.plugin@org.eclipse.tm.terminal.ssh.source=org.eclipse.tm.terminal.ssh
-generate.plugin@org.eclipse.tm.terminal.telnet.source=org.eclipse.tm.terminal.telnet
-generate.plugin@org.eclipse.tm.terminal.view.source=org.eclipse.tm.terminal.view
diff --git a/terminal/org.eclipse.tm.terminal.sdk-feature/eclipse_update_120.jpg b/terminal/org.eclipse.tm.terminal.sdk-feature/eclipse_update_120.jpg
deleted file mode 100644
index bfdf708ad..000000000
--- a/terminal/org.eclipse.tm.terminal.sdk-feature/eclipse_update_120.jpg
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.sdk-feature/epl-v10.html b/terminal/org.eclipse.tm.terminal.sdk-feature/epl-v10.html
deleted file mode 100644
index 9321f4082..000000000
--- a/terminal/org.eclipse.tm.terminal.sdk-feature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">where such changes and/or additions to the Program
-originate from and are distributed by that particular Contributor. A
-Contribution 'originates' from a Contributor if it was added to the
-Program by such Contributor itself or anyone acting on such
-Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in
-conjunction with the Program under their own license agreement, and (ii)
-are not derivative works of the Program.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" mean patent claims licensable by a
-Contributor which are necessarily infringed by the use or sale of its
-Contribution alone or when combined with the Program.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to reproduce, prepare derivative works
-of, publicly display, publicly perform, distribute and sublicense the
-Contribution of such Contributor, if any, and such derivative works, in
-source code and object code form.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free patent license under Licensed Patents to make, use, sell,
-offer to sell, import and otherwise transfer the Contribution of such
-Contributor, if any, in source code and object code form. This patent
-license shall apply to the combination of the Contribution and the
-Program if, at the time the Contribution is added by the Contributor,
-such addition of the Contribution causes such combination to be covered
-by the Licensed Patents. The patent license shall not apply to any other
-combinations which include the Contribution. No hardware per se is
-licensed hereunder.</p>
-
-<p class="list">c) Recipient understands that although each Contributor
-grants the licenses to its Contributions set forth herein, no assurances
-are provided by any Contributor that the Program does not infringe the
-patent or other intellectual property rights of any other entity. Each
-Contributor disclaims any liability to Recipient for claims brought by
-any other entity based on infringement of intellectual property rights
-or otherwise. As a condition to exercising the rights and licenses
-granted hereunder, each Recipient hereby assumes sole responsibility to
-secure any other intellectual property rights needed, if any. For
-example, if a third party patent license is required to allow Recipient
-to distribute the Program, it is Recipient's responsibility to acquire
-that license before distributing the Program.</p>
-
-<p class="list">d) Each Contributor represents that to its knowledge it
-has sufficient copyright rights in its Contribution, if any, to grant
-the copyright license set forth in this Agreement.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">i) effectively disclaims on behalf of all Contributors
-all warranties and conditions, express and implied, including warranties
-or conditions of title and non-infringement, and implied warranties or
-conditions of merchantability and fitness for a particular purpose;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">iv) states that source code for the Program is available
-from such Contributor, and informs licensees how to obtain it in a
-reasonable manner on or through a medium customarily used for software
-exchange.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>Each Contributor must identify itself as the originator of its
-Contribution, if any, in a manner that reasonably allows subsequent
-Recipients to identify the originator of the Contribution.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>Commercial distributors of software may accept certain
-responsibilities with respect to end users, business partners and the
-like. While this license is intended to facilitate the commercial use of
-the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create
-potential liability for other Contributors. Therefore, if a Contributor
-includes the Program in a commercial product offering, such Contributor
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-arising from claims, lawsuits and other legal actions brought by a third
-party against the Indemnified Contributor to the extent caused by the
-acts or omissions of such Commercial Contributor in connection with its
-distribution of the Program in a commercial product offering. The
-obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In
-order to qualify, an Indemnified Contributor must: a) promptly notify
-the Commercial Contributor in writing of such claim, and b) allow the
-Commercial Contributor to control, and cooperate with the Commercial
-Contributor in, the defense and any related settlement negotiations. The
-Indemnified Contributor may participate in any such claim at its own
-expense.</p>
-
-<p>For example, a Contributor might include the Program in a commercial
-product offering, Product X. That Contributor is then a Commercial
-Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance
-claims and warranties are such Commercial Contributor's responsibility
-alone. Under this section, the Commercial Contributor would have to
-defend claims against the other Contributors related to those
-performance claims and warranties, and if a court requires any other
-Contributor to pay any damages as a result, the Commercial Contributor
-must pay those damages.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
-OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
-ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
-OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and
-distributing the Program and assumes all risks associated with its
-exercise of rights under this Agreement , including but not limited to
-the risks and costs of program errors, compliance with applicable laws,
-damage to or loss of data, programs or equipment, and unavailability or
-interruption of operations.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
-NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
-WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
-DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
-HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>If any provision of this Agreement is invalid or unenforceable under
-applicable law, it shall not affect the validity or enforceability of
-the remainder of the terms of this Agreement, and without further action
-by the parties hereto, such provision shall be reformed to the minimum
-extent necessary to make such provision valid and enforceable.</p>
-
-<p>If Recipient institutes patent litigation against any entity
-(including a cross-claim or counterclaim in a lawsuit) alleging that the
-Program itself (excluding combinations of the Program with other
-software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the
-date such litigation is filed.</p>
-
-<p>All Recipient's rights under this Agreement shall terminate if it
-fails to comply with any of the material terms or conditions of this
-Agreement and does not cure such failure in a reasonable period of time
-after becoming aware of such noncompliance. If all Recipient's rights
-under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive.</p>
-
-<p>Everyone is permitted to copy and distribute copies of this
-Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The
-Agreement Steward reserves the right to publish new versions (including
-revisions) of this Agreement from time to time. No one other than the
-Agreement Steward has the right to modify this Agreement. The Eclipse
-Foundation is the initial Agreement Steward. The Eclipse Foundation may
-assign the responsibility to serve as the Agreement Steward to a
-suitable separate entity. Each new version of the Agreement will be
-given a distinguishing version number. The Program (including
-Contributions) may always be distributed subject to the version of the
-Agreement under which it was received. In addition, after a new version
-of the Agreement is published, Contributor may elect to distribute the
-Program (including its Contributions) under the new version. Except as
-expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
-rights or licenses to the intellectual property of any Contributor under
-this Agreement, whether expressly, by implication, estoppel or
-otherwise. All rights in the Program not expressly granted under this
-Agreement are reserved.</p>
-
-<p>This Agreement is governed by the laws of the State of New York and
-the intellectual property laws of the United States of America. No party
-to this Agreement will bring a legal action under this Agreement more
-than one year after the cause of action arose. Each party waives its
-rights to a jury trial in any resulting litigation.</p>
-
-</body></html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.sdk-feature/feature.properties b/terminal/org.eclipse.tm.terminal.sdk-feature/feature.properties
deleted file mode 100644
index 467e9854f..000000000
--- a/terminal/org.eclipse.tm.terminal.sdk-feature/feature.properties
+++ /dev/null
@@ -1,142 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 Wind River Systems, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Martin Oberhuber (Wind River) - initial API and implementation
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=Target Management Terminal
-
-# "description" property - description of the feature
-description=An ANSI (vt102) compatible Terminal including \
-plug-ins for Serial, SSH and Telnet connections. Includes Source Code.
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management Updates
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2003, 2009 Wind River Systems, Inc. and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/terminal/org.eclipse.tm.terminal.sdk-feature/feature.xml b/terminal/org.eclipse.tm.terminal.sdk-feature/feature.xml
deleted file mode 100644
index 7aa2b7c3a..000000000
--- a/terminal/org.eclipse.tm.terminal.sdk-feature/feature.xml
+++ /dev/null
@@ -1,81 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?> <!-- Copyright (c) 2006, 2009 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 - initial API and implementation Uwe Stieber (Wind River) - [282996] [terminal][api] Add "hidden" attribute to terminal connector extension point -->
-<feature
- id="org.eclipse.tm.terminal.sdk"
- label="%featureName"
- version="3.0.1.qualifier"
- provider-name="%providerName"
- image="eclipse_update_120.jpg">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- <discovery label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- </url>
-
- <includes
- id="org.eclipse.tm.terminal"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.tm.terminal.serial"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.tm.terminal.ssh"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.tm.terminal.telnet"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.tm.terminal.view"
- version="0.0.0"/>
-
- <plugin
- id="org.eclipse.tm.terminal.source"
- download-size="103"
- install-size="107"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.tm.terminal.serial.source"
- download-size="117"
- install-size="122"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.tm.terminal.ssh.source"
- download-size="133"
- install-size="139"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.tm.terminal.telnet.source"
- download-size="155"
- install-size="163"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.tm.terminal.view.source"
- download-size="182"
- install-size="191"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/terminal/org.eclipse.tm.terminal.sdk-feature/license.html b/terminal/org.eclipse.tm.terminal.sdk-feature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/terminal/org.eclipse.tm.terminal.sdk-feature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/terminal/org.eclipse.tm.terminal.serial-feature/.project b/terminal/org.eclipse.tm.terminal.serial-feature/.project
deleted file mode 100644
index 44409931f..000000000
--- a/terminal/org.eclipse.tm.terminal.serial-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.terminal.serial-feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/terminal/org.eclipse.tm.terminal.serial-feature/build.properties b/terminal/org.eclipse.tm.terminal.serial-feature/build.properties
deleted file mode 100644
index 6c1e50644..000000000
--- a/terminal/org.eclipse.tm.terminal.serial-feature/build.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-################################################################################
-# Copyright (c) 2006 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
-################################################################################
-bin.includes = feature.xml,\
- epl-v10.html,\
- feature.properties,\
- license.html
diff --git a/terminal/org.eclipse.tm.terminal.serial-feature/epl-v10.html b/terminal/org.eclipse.tm.terminal.serial-feature/epl-v10.html
deleted file mode 100644
index 9321f4082..000000000
--- a/terminal/org.eclipse.tm.terminal.serial-feature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">where such changes and/or additions to the Program
-originate from and are distributed by that particular Contributor. A
-Contribution 'originates' from a Contributor if it was added to the
-Program by such Contributor itself or anyone acting on such
-Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in
-conjunction with the Program under their own license agreement, and (ii)
-are not derivative works of the Program.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" mean patent claims licensable by a
-Contributor which are necessarily infringed by the use or sale of its
-Contribution alone or when combined with the Program.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to reproduce, prepare derivative works
-of, publicly display, publicly perform, distribute and sublicense the
-Contribution of such Contributor, if any, and such derivative works, in
-source code and object code form.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free patent license under Licensed Patents to make, use, sell,
-offer to sell, import and otherwise transfer the Contribution of such
-Contributor, if any, in source code and object code form. This patent
-license shall apply to the combination of the Contribution and the
-Program if, at the time the Contribution is added by the Contributor,
-such addition of the Contribution causes such combination to be covered
-by the Licensed Patents. The patent license shall not apply to any other
-combinations which include the Contribution. No hardware per se is
-licensed hereunder.</p>
-
-<p class="list">c) Recipient understands that although each Contributor
-grants the licenses to its Contributions set forth herein, no assurances
-are provided by any Contributor that the Program does not infringe the
-patent or other intellectual property rights of any other entity. Each
-Contributor disclaims any liability to Recipient for claims brought by
-any other entity based on infringement of intellectual property rights
-or otherwise. As a condition to exercising the rights and licenses
-granted hereunder, each Recipient hereby assumes sole responsibility to
-secure any other intellectual property rights needed, if any. For
-example, if a third party patent license is required to allow Recipient
-to distribute the Program, it is Recipient's responsibility to acquire
-that license before distributing the Program.</p>
-
-<p class="list">d) Each Contributor represents that to its knowledge it
-has sufficient copyright rights in its Contribution, if any, to grant
-the copyright license set forth in this Agreement.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">i) effectively disclaims on behalf of all Contributors
-all warranties and conditions, express and implied, including warranties
-or conditions of title and non-infringement, and implied warranties or
-conditions of merchantability and fitness for a particular purpose;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">iv) states that source code for the Program is available
-from such Contributor, and informs licensees how to obtain it in a
-reasonable manner on or through a medium customarily used for software
-exchange.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>Each Contributor must identify itself as the originator of its
-Contribution, if any, in a manner that reasonably allows subsequent
-Recipients to identify the originator of the Contribution.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>Commercial distributors of software may accept certain
-responsibilities with respect to end users, business partners and the
-like. While this license is intended to facilitate the commercial use of
-the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create
-potential liability for other Contributors. Therefore, if a Contributor
-includes the Program in a commercial product offering, such Contributor
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-arising from claims, lawsuits and other legal actions brought by a third
-party against the Indemnified Contributor to the extent caused by the
-acts or omissions of such Commercial Contributor in connection with its
-distribution of the Program in a commercial product offering. The
-obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In
-order to qualify, an Indemnified Contributor must: a) promptly notify
-the Commercial Contributor in writing of such claim, and b) allow the
-Commercial Contributor to control, and cooperate with the Commercial
-Contributor in, the defense and any related settlement negotiations. The
-Indemnified Contributor may participate in any such claim at its own
-expense.</p>
-
-<p>For example, a Contributor might include the Program in a commercial
-product offering, Product X. That Contributor is then a Commercial
-Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance
-claims and warranties are such Commercial Contributor's responsibility
-alone. Under this section, the Commercial Contributor would have to
-defend claims against the other Contributors related to those
-performance claims and warranties, and if a court requires any other
-Contributor to pay any damages as a result, the Commercial Contributor
-must pay those damages.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
-OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
-ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
-OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and
-distributing the Program and assumes all risks associated with its
-exercise of rights under this Agreement , including but not limited to
-the risks and costs of program errors, compliance with applicable laws,
-damage to or loss of data, programs or equipment, and unavailability or
-interruption of operations.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
-NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
-WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
-DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
-HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>If any provision of this Agreement is invalid or unenforceable under
-applicable law, it shall not affect the validity or enforceability of
-the remainder of the terms of this Agreement, and without further action
-by the parties hereto, such provision shall be reformed to the minimum
-extent necessary to make such provision valid and enforceable.</p>
-
-<p>If Recipient institutes patent litigation against any entity
-(including a cross-claim or counterclaim in a lawsuit) alleging that the
-Program itself (excluding combinations of the Program with other
-software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the
-date such litigation is filed.</p>
-
-<p>All Recipient's rights under this Agreement shall terminate if it
-fails to comply with any of the material terms or conditions of this
-Agreement and does not cure such failure in a reasonable period of time
-after becoming aware of such noncompliance. If all Recipient's rights
-under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive.</p>
-
-<p>Everyone is permitted to copy and distribute copies of this
-Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The
-Agreement Steward reserves the right to publish new versions (including
-revisions) of this Agreement from time to time. No one other than the
-Agreement Steward has the right to modify this Agreement. The Eclipse
-Foundation is the initial Agreement Steward. The Eclipse Foundation may
-assign the responsibility to serve as the Agreement Steward to a
-suitable separate entity. Each new version of the Agreement will be
-given a distinguishing version number. The Program (including
-Contributions) may always be distributed subject to the version of the
-Agreement under which it was received. In addition, after a new version
-of the Agreement is published, Contributor may elect to distribute the
-Program (including its Contributions) under the new version. Except as
-expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
-rights or licenses to the intellectual property of any Contributor under
-this Agreement, whether expressly, by implication, estoppel or
-otherwise. All rights in the Program not expressly granted under this
-Agreement are reserved.</p>
-
-<p>This Agreement is governed by the laws of the State of New York and
-the intellectual property laws of the United States of America. No party
-to this Agreement will bring a legal action under this Agreement more
-than one year after the cause of action arose. Each party waives its
-rights to a jury trial in any resulting litigation.</p>
-
-</body></html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.serial-feature/feature.properties b/terminal/org.eclipse.tm.terminal.serial-feature/feature.properties
deleted file mode 100644
index c59e11bf1..000000000
--- a/terminal/org.eclipse.tm.terminal.serial-feature/feature.properties
+++ /dev/null
@@ -1,141 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 Wind River Systems, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Martin Oberhuber (Wind River) - initial API and implementation
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=Target Management Terminal Serial Connector
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management Updates
-
-# "description" property - description of the feature
-description=A serial line connector for the Terminal using RXTX API
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2003, 2009 Wind River Systems, Inc. and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/terminal/org.eclipse.tm.terminal.serial-feature/feature.xml b/terminal/org.eclipse.tm.terminal.serial-feature/feature.xml
deleted file mode 100644
index 9f7902fc1..000000000
--- a/terminal/org.eclipse.tm.terminal.serial-feature/feature.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?> <!-- Copyright (c) 2006, 2009 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 - initial API and implementation -->
-<feature
- id="org.eclipse.tm.terminal.serial"
- label="%featureName"
- version="2.0.100.qualifier"
- provider-name="%providerName">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- <discovery label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- </url>
-
- <requires>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.tm.terminal" version="3.0.0" match="equivalent"/>
- </requires>
-
- <plugin
- id="org.eclipse.tm.terminal.serial"
- download-size="19"
- install-size="19"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/terminal/org.eclipse.tm.terminal.serial-feature/license.html b/terminal/org.eclipse.tm.terminal.serial-feature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/terminal/org.eclipse.tm.terminal.serial-feature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplateFeature/epl-v10.html b/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplateFeature/epl-v10.html
deleted file mode 100644
index 9321f4082..000000000
--- a/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplateFeature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">where such changes and/or additions to the Program
-originate from and are distributed by that particular Contributor. A
-Contribution 'originates' from a Contributor if it was added to the
-Program by such Contributor itself or anyone acting on such
-Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in
-conjunction with the Program under their own license agreement, and (ii)
-are not derivative works of the Program.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" mean patent claims licensable by a
-Contributor which are necessarily infringed by the use or sale of its
-Contribution alone or when combined with the Program.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to reproduce, prepare derivative works
-of, publicly display, publicly perform, distribute and sublicense the
-Contribution of such Contributor, if any, and such derivative works, in
-source code and object code form.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free patent license under Licensed Patents to make, use, sell,
-offer to sell, import and otherwise transfer the Contribution of such
-Contributor, if any, in source code and object code form. This patent
-license shall apply to the combination of the Contribution and the
-Program if, at the time the Contribution is added by the Contributor,
-such addition of the Contribution causes such combination to be covered
-by the Licensed Patents. The patent license shall not apply to any other
-combinations which include the Contribution. No hardware per se is
-licensed hereunder.</p>
-
-<p class="list">c) Recipient understands that although each Contributor
-grants the licenses to its Contributions set forth herein, no assurances
-are provided by any Contributor that the Program does not infringe the
-patent or other intellectual property rights of any other entity. Each
-Contributor disclaims any liability to Recipient for claims brought by
-any other entity based on infringement of intellectual property rights
-or otherwise. As a condition to exercising the rights and licenses
-granted hereunder, each Recipient hereby assumes sole responsibility to
-secure any other intellectual property rights needed, if any. For
-example, if a third party patent license is required to allow Recipient
-to distribute the Program, it is Recipient's responsibility to acquire
-that license before distributing the Program.</p>
-
-<p class="list">d) Each Contributor represents that to its knowledge it
-has sufficient copyright rights in its Contribution, if any, to grant
-the copyright license set forth in this Agreement.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">i) effectively disclaims on behalf of all Contributors
-all warranties and conditions, express and implied, including warranties
-or conditions of title and non-infringement, and implied warranties or
-conditions of merchantability and fitness for a particular purpose;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">iv) states that source code for the Program is available
-from such Contributor, and informs licensees how to obtain it in a
-reasonable manner on or through a medium customarily used for software
-exchange.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>Each Contributor must identify itself as the originator of its
-Contribution, if any, in a manner that reasonably allows subsequent
-Recipients to identify the originator of the Contribution.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>Commercial distributors of software may accept certain
-responsibilities with respect to end users, business partners and the
-like. While this license is intended to facilitate the commercial use of
-the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create
-potential liability for other Contributors. Therefore, if a Contributor
-includes the Program in a commercial product offering, such Contributor
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-arising from claims, lawsuits and other legal actions brought by a third
-party against the Indemnified Contributor to the extent caused by the
-acts or omissions of such Commercial Contributor in connection with its
-distribution of the Program in a commercial product offering. The
-obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In
-order to qualify, an Indemnified Contributor must: a) promptly notify
-the Commercial Contributor in writing of such claim, and b) allow the
-Commercial Contributor to control, and cooperate with the Commercial
-Contributor in, the defense and any related settlement negotiations. The
-Indemnified Contributor may participate in any such claim at its own
-expense.</p>
-
-<p>For example, a Contributor might include the Program in a commercial
-product offering, Product X. That Contributor is then a Commercial
-Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance
-claims and warranties are such Commercial Contributor's responsibility
-alone. Under this section, the Commercial Contributor would have to
-defend claims against the other Contributors related to those
-performance claims and warranties, and if a court requires any other
-Contributor to pay any damages as a result, the Commercial Contributor
-must pay those damages.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
-OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
-ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
-OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and
-distributing the Program and assumes all risks associated with its
-exercise of rights under this Agreement , including but not limited to
-the risks and costs of program errors, compliance with applicable laws,
-damage to or loss of data, programs or equipment, and unavailability or
-interruption of operations.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
-NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
-WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
-DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
-HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>If any provision of this Agreement is invalid or unenforceable under
-applicable law, it shall not affect the validity or enforceability of
-the remainder of the terms of this Agreement, and without further action
-by the parties hereto, such provision shall be reformed to the minimum
-extent necessary to make such provision valid and enforceable.</p>
-
-<p>If Recipient institutes patent litigation against any entity
-(including a cross-claim or counterclaim in a lawsuit) alleging that the
-Program itself (excluding combinations of the Program with other
-software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the
-date such litigation is filed.</p>
-
-<p>All Recipient's rights under this Agreement shall terminate if it
-fails to comply with any of the material terms or conditions of this
-Agreement and does not cure such failure in a reasonable period of time
-after becoming aware of such noncompliance. If all Recipient's rights
-under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive.</p>
-
-<p>Everyone is permitted to copy and distribute copies of this
-Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The
-Agreement Steward reserves the right to publish new versions (including
-revisions) of this Agreement from time to time. No one other than the
-Agreement Steward has the right to modify this Agreement. The Eclipse
-Foundation is the initial Agreement Steward. The Eclipse Foundation may
-assign the responsibility to serve as the Agreement Steward to a
-suitable separate entity. Each new version of the Agreement will be
-given a distinguishing version number. The Program (including
-Contributions) may always be distributed subject to the version of the
-Agreement under which it was received. In addition, after a new version
-of the Agreement is published, Contributor may elect to distribute the
-Program (including its Contributions) under the new version. Except as
-expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
-rights or licenses to the intellectual property of any Contributor under
-this Agreement, whether expressly, by implication, estoppel or
-otherwise. All rights in the Program not expressly granted under this
-Agreement are reserved.</p>
-
-<p>This Agreement is governed by the laws of the State of New York and
-the intellectual property laws of the United States of America. No party
-to this Agreement will bring a legal action under this Agreement more
-than one year after the cause of action arose. Each party waives its
-rights to a jury trial in any resulting litigation.</p>
-
-</body></html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplateFeature/feature.properties b/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplateFeature/feature.properties
deleted file mode 100644
index 9e108fe70..000000000
--- a/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplateFeature/feature.properties
+++ /dev/null
@@ -1,141 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 Wind River Systems, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Martin Oberhuber (Wind River) - initial API and implementation
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=Target Management Terminal Serial Connector Source
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management Updates
-
-# "description" property - description of the feature
-description=A serial line connector for the Terminal using RXTX API
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2003, 2009 Wind River Systems, Inc. and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplateFeature/license.html b/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplateFeature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplateFeature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/about.html b/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/about.html
deleted file mode 100644
index e7b57cfff..000000000
--- a/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/about.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2007</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-<h3>Source Code</h3>
-<p>This plug-in contains source code zip files (&quot;Source Zips&quot;) that correspond to binary content in other plug-ins. These Source Zips may be distributed under different license
-agreements and/or notices. Details about these license agreements and notices are contained in &quot;about.html&quot; files (&quot;Abouts&quot;) located in sub-directories in the
-src/ directory of this plug-in. Such Abouts govern your use of the Source Zips in that directory, not the EPL.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/about.ini b/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/about.ini
deleted file mode 100644
index fbbb9f83d..000000000
--- a/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/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=dsdp32.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/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/about.mappings b/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/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/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/about.properties b/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/about.properties
deleted file mode 100644
index c6566a212..000000000
--- a/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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 Serial Connector Source\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Wind River Systems, Inc. and others 2003, 2009. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm
diff --git a/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/build.properties b/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/build.properties
deleted file mode 100644
index 7ef3fa39c..000000000
--- a/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 Wind River Systems, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-bin.includes = about.html, about.ini, about.mappings, about.properties, dsdp32.png, plugin.properties, plugin.xml, src/, META-INF/
-sourcePlugin = true
diff --git a/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/dsdp32.png b/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/dsdp32.png
deleted file mode 100644
index 3077b1220..000000000
--- a/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/dsdp32.png
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/plugin.properties b/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/plugin.properties
deleted file mode 100644
index f104744aa..000000000
--- a/terminal/org.eclipse.tm.terminal.serial-feature/sourceTemplatePlugin/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 Wind River Systems, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-pluginName=Target Management Terminal Serial Connector Source
-providerName=Eclipse.org - DSDP
diff --git a/terminal/org.eclipse.tm.terminal.serial/.classpath b/terminal/org.eclipse.tm.terminal.serial/.classpath
deleted file mode 100644
index b978e78e1..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/.classpath
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4">
- <accessrules>
- <accessrule kind="accessible" pattern="gnu/io/**"/>
- </accessrules>
- </classpathentry>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/terminal/org.eclipse.tm.terminal.serial/.cvsignore b/terminal/org.eclipse.tm.terminal.serial/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/terminal/org.eclipse.tm.terminal.serial/.project b/terminal/org.eclipse.tm.terminal.serial/.project
deleted file mode 100644
index a06d0caec..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.terminal.serial</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/terminal/org.eclipse.tm.terminal.serial/.settings/org.eclipse.jdt.core.prefs b/terminal/org.eclipse.tm.terminal.serial/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 381fc6eb0..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-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=warning
-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.3
diff --git a/terminal/org.eclipse.tm.terminal.serial/META-INF/MANIFEST.MF b/terminal/org.eclipse.tm.terminal.serial/META-INF/MANIFEST.MF
deleted file mode 100644
index da92ee74f..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,18 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.terminal.serial;singleton:=true
-Bundle-Version: 2.0.100.qualifier
-Bundle-Localization: plugin
-Import-Package: gnu.io;resolution:=optional
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.tm.terminal;bundle-version="[3.0.0,3.1.0)"
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Eclipse-BuddyPolicy: ext
-Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-Bundle-ClassPath: .
-Bundle-Activator: org.eclipse.tm.internal.terminal.serial.Activator
-Export-Package: org.eclipse.tm.internal.terminal.serial;x-internal:=true
diff --git a/terminal/org.eclipse.tm.terminal.serial/README.txt b/terminal/org.eclipse.tm.terminal.serial/README.txt
deleted file mode 100644
index 188bc8f49..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/README.txt
+++ /dev/null
@@ -1,64 +0,0 @@
-Important note:
----------------
-This README is for terminal.serial version 1.0.0 and later, corresponding
-to RSE downloads after 2.0M4. Instructions for previous versions (using
-Sun javacomm / javax.comm package instead of gnu.io) are still available from
-http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.serial/README.txt?root=DSDP_Project&view=markup&pathrev=R1_0_1
-
-
-Prerequisites:
---------------
-In order to compile and run this plugin, RXTX has to be installed.
-There are two options: Either installing RXTX as an Eclipse plugin,
-or installing RXTX as a JVM extension. For installation as plugin,
-you can download a ZIP archive or use the Update Manager; if an
-Eclipse plugin is not available for your Platform, you'll need
-to install RXTX into the JVM (option B, below).
-
-In either case, once RXTX is installed, you'll need to quit and
-re-start Eclipse PDE in order to recompute the classpath.
-
-
-Option A.1: Installation as an Eclipse Plugin via Update Manager:
------------------------------------------------------------------
-* In Eclipse, choose Help > Software Updates...
- - Add New Remote Site:
- Name = RXTX
- URL = http://rxtx.qbang.org/eclipse/
- - Finish, select proper version, Install All
-
-
-Option A.2: Installation as an Eclipse Plugin via Download:
------------------------------------------------------------
-* Download RXTX SDK or Runtime ZIP from
- http://rxtx.qbang.org/eclipse/downloads/
- and extract it into your Eclipse installation. The download
- link mentioned also has a README with version and licensing
- information.
-
-
-Option B: Installation as a JVM Extension:
-------------------------------------------
-* Get RXTX binaries from
- ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip
-* Copy RXTXcomm.jar into $JRE/lib/ext
-* Copy the native libs for your Platform (*.so, *.jnilib, *.dll)
- into the respective native lib folder of your RSE
-* More installation instructions are at
- http://rxtx.qbang.org/wiki/index.php/Main_Page
-* More downloads for other platforms (currently about 30)
- are available from the "ToyBox" link on
- http://users.frii.com/jarvi/rxtx/download.html
-
-
-For help, contact the RXTX mailing list available via the
-RXTX website at http://www.rxtx.org or see the notes on
-https://bugs.eclipse.org/bugs/show_bug.cgi?id=175336
-
-
-Changelog:
-----------
-2.0.1 - Revised Update Site text to comply with P2 in Eclipse 3.4
-1.0.1 - Added options for installing RXTX as an Eclipse Plugin
-0.9.100 - switched from Sun javax.comm to rxtx gnu.io for serial support
-0.9.0 - first version \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.serial/about.html b/terminal/org.eclipse.tm.terminal.serial/about.html
deleted file mode 100644
index d4cc693f9..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2007</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.serial/about.ini b/terminal/org.eclipse.tm.terminal.serial/about.ini
deleted file mode 100644
index fbbb9f83d..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/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=dsdp32.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/terminal/org.eclipse.tm.terminal.serial/about.mappings b/terminal/org.eclipse.tm.terminal.serial/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/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/terminal/org.eclipse.tm.terminal.serial/about.properties b/terminal/org.eclipse.tm.terminal.serial/about.properties
deleted file mode 100644
index cff34a190..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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 Serial Connector\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Wind River Systems, Inc. and others 2003, 2009. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm
diff --git a/terminal/org.eclipse.tm.terminal.serial/build.properties b/terminal/org.eclipse.tm.terminal.serial/build.properties
deleted file mode 100644
index 04e032215..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/build.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2009 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,\
- plugin.properties,\
- README.txt,\
- about.html,about.ini,about.mappings,about.properties,\
- dsdp32.png
-src.includes = README.txt,\
- about.html
diff --git a/terminal/org.eclipse.tm.terminal.serial/dsdp32.png b/terminal/org.eclipse.tm.terminal.serial/dsdp32.png
deleted file mode 100644
index 3077b1220..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/dsdp32.png
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.serial/plugin.properties b/terminal/org.eclipse.tm.terminal.serial/plugin.properties
deleted file mode 100644
index 7d1e22823..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/plugin.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2009 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
-###############################################################################
-pluginName = Target Management Terminal Serial Connector
-providerName = Eclipse.org - DSDP
-serialConnection = Serial \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.serial/plugin.xml b/terminal/org.eclipse.tm.terminal.serial/plugin.xml
deleted file mode 100644
index 9fe07138d..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/plugin.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<!--
-# Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Michael Scharf (Wind River) - initial API and implementation
-# Martin Oberhuber (Wind River) - fixed copyright headers and beautified
--->
-<plugin>
- <extension
- point="org.eclipse.tm.terminal.terminalConnectors">
- <connector name="%serialConnection"
- id="org.eclipse.tm.internal.terminal.serial.SerialConnector"
- class="org.eclipse.tm.internal.terminal.serial.SerialConnector"/>
- </extension>
-</plugin>
diff --git a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/Activator.java b/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/Activator.java
deleted file mode 100644
index 2fb604714..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/Activator.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.serial;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.tm.terminal.serial"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- String prop = System.getProperty("gnu.io.rxtx.NoVersionOutput"); //$NON-NLS-1$
- if (prop==null) {
- System.setProperty("gnu.io.rxtx.NoVersionOutput", "true"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/ISerialSettings.java b/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/ISerialSettings.java
deleted file mode 100644
index 5fc3a0290..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/ISerialSettings.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.serial;
-
-import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
-
-public interface ISerialSettings {
-
- String getSerialPort();
- int getBaudRate();
- int getDataBits();
- int getStopBits();
- int getParity();
- int getFlowControl();
- int getTimeout();
- String getSummary();
- void load(ISettingsStore store);
- void save(ISettingsStore store);
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialConnectWorker.java b/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialConnectWorker.java
deleted file mode 100644
index 673f1111e..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialConnectWorker.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2009 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 TerminalControl
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- * Martin Oberhuber (Wind River) - [207158] improve error message when port not available
- * Martin Oberhuber (Wind River) - [208029] COM port not released after quick disconnect/reconnect
- * Martin Oberhuber (Wind River) - [206884] Update Terminal Ownership ID to "org.eclipse.tm.terminal.serial"
- * Martin Oberhuber (Wind River) - [221184] Redesign Serial Terminal Ownership Handling
- * Michael Scharf (Wind River) - [262996] get rid of TerminalState.OPENED
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.serial;
-
-import gnu.io.CommPortIdentifier;
-import gnu.io.NoSuchPortException;
-import gnu.io.PortInUseException;
-import gnu.io.SerialPort;
-
-import java.util.Arrays;
-import java.util.Enumeration;
-
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.MessageBox;
-import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl;
-import org.eclipse.tm.internal.terminal.provisional.api.Logger;
-import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
-
-public class SerialConnectWorker extends Thread {
- private final ITerminalControl fControl;
- private final SerialConnector fConn;
-
- /**
- * UNDER CONSTRUCTION
- * @param conn TODO
- * @param control TODO
- */
- public SerialConnectWorker(SerialConnector conn, ITerminalControl control) {
- super();
- fControl = control;
- fConn = conn;
- }
-
- /**
- * Adds the named port to the name of known ports to rxtx
- * @param name
- */
- void addPort(String name) {
- // Rxtx either takes the connection from the properties OR using
- // the port scan.
- // Unfortunately, setting gnu.io.rxtx.SerialPorts only temporarily does not
- // work, because rxtx closes connections that are unknown.
- // The only solution I could come up with: add the known connections
- // to the gnu.io.rxtx.SerialPorts property....
- final String GNU_IO_RXTX_SERIAL_PORTS = "gnu.io.rxtx.SerialPorts"; //$NON-NLS-1$
- String sep = System.getProperty("path.separator", ":"); //$NON-NLS-1$//$NON-NLS-2$
- // get the existing names
- String names = System.getProperty(GNU_IO_RXTX_SERIAL_PORTS);
- if (names == null) {
- StringBuffer buffer=new StringBuffer();
- boolean sepNeeded=false;
- // When we add a port to this property, rxtx forgets the
- // ports it finds by scanning the system.
-
- // iterate over the known ports and add them to the property
- Enumeration portIdEnum= CommPortIdentifier.getPortIdentifiers();
- while (portIdEnum.hasMoreElements()) {
- CommPortIdentifier identifier = (CommPortIdentifier) portIdEnum.nextElement();
- if (identifier.getPortType() == CommPortIdentifier.PORT_SERIAL) {
- if(sepNeeded)
- buffer.append(sep);
- else
- sepNeeded=true;
- buffer.append(identifier.getName());
- }
- }
- // append our new port
- if(sepNeeded)
- buffer.append(sep);
- buffer.append(name);
-
- System.setProperty(GNU_IO_RXTX_SERIAL_PORTS,buffer.toString());
- } else if (!Arrays.asList(names.split(sep)).contains(name)) {
- // the list does not contain the name, therefore we add it
- // since there is at least one name in the list, we append it
- System.setProperty(GNU_IO_RXTX_SERIAL_PORTS, names + sep + name);
- } else {
- // nothing to do -- should never happen...
- return;
- }
- // Reinitialize the ports because we have changed the list of known ports
- CommPortIdentifier.getPortIdentifiers();
- }
-
- /**
- * Return the ID that this connector uses for RXTX Comm Ownership Handling.
- *
- * Note that this was changed in Terminal 2.0 as per
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=206884 - previous versions
- * of the serial terminal connector used a different string,
- * "org.eclipse.tm.internal.terminal.serial".
- *
- * @since org.eclipse.tm.terminal.serial 2.0
- * @return ownership ID, "org.eclipse.tm.terminal.serial"
- */
- public static final String getOwnershipId() {
- return "org.eclipse.tm.terminal.serial"; //$NON-NLS-1$
- }
-
- public void run() {
- String portName=null;
- final String strID = getOwnershipId();
- SerialPort serialPort = null;
- try {
- ISerialSettings s=fConn.getSerialSettings();
- portName=s.getSerialPort();
- try {
- fConn.setSerialPortIdentifier(CommPortIdentifier.getPortIdentifier(portName));
- } catch (NoSuchPortException e) {
- // let's try
- addPort(portName);
- fConn.setSerialPortIdentifier(CommPortIdentifier.getPortIdentifier(portName));
- }
- fConn.setSerialPortHandler(new SerialPortHandler(fConn,fControl));
- fConn.setSerialPortIdentifier(CommPortIdentifier.getPortIdentifier(portName));
-
- //Bug 221184: Warn about serial port already in use
- String currentOwner = fConn.getSerialPortIdentifier().getCurrentOwner();
- if (strID.equals(currentOwner)) {
- currentOwner = SerialMessages.ANOTHER_TERMINAL;
- }
- final int[] answer = { SWT.YES };
- final String fPortName = portName;
- final String fCurrentOwner = currentOwner;
- if (currentOwner != null) {
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- MessageBox mb = new MessageBox(fControl.getShell(), SWT.ICON_QUESTION | SWT.YES | SWT.NO);
- mb.setText(SerialMessages.PROP_TITLE);
- mb.setMessage(NLS.bind(SerialMessages.PORT_IN_USE, fPortName, fCurrentOwner));
- answer[0] = mb.open();
- }
- });
- }
-
- if (answer[0] != SWT.YES) {
- // don't try to steal the port
- fControl.setState(TerminalState.CLOSED);
- fConn.setSerialPortHandler(null);
- return;
- } else {
- // Try to steal the port -- may throw PortInUseException
- int timeoutInMs = s.getTimeout() * 1000;
- serialPort = (SerialPort) fConn.getSerialPortIdentifier().open(strID, timeoutInMs);
- serialPort.setSerialPortParams(s.getBaudRate(), s.getDataBits(), s.getStopBits(), s.getParity());
- serialPort.setFlowControlMode(s.getFlowControl());
- serialPort.addEventListener(fConn.getSerialPortHandler());
- serialPort.notifyOnDataAvailable(true);
- fConn.getSerialPortIdentifier().addPortOwnershipListener(fConn.getSerialPortHandler());
- fConn.setSerialPort(serialPort);
- if (fCurrentOwner != null) {
- fControl.displayTextInTerminal(NLS.bind(SerialMessages.PORT_STOLEN, fPortName, fCurrentOwner));
-
- }
- fControl.setState(TerminalState.CONNECTED);
- }
-
- } catch (PortInUseException portInUseException) {
- fControl.setState(TerminalState.CLOSED);
- String theOwner = portInUseException.currentOwner;
- if (strID.equals(theOwner)) {
- theOwner = SerialMessages.ANOTHER_TERMINAL;
- }
- fControl.displayTextInTerminal(NLS.bind(SerialMessages.PORT_NOT_STOLEN, portName, theOwner));
- } catch (NoSuchPortException e) {
- fControl.setState(TerminalState.CLOSED);
- String msg=e.getMessage();
- if(msg==null)
- msg=portName;
- fControl.displayTextInTerminal(NLS.bind(SerialMessages.NO_SUCH_PORT, msg));
-
- } catch (Exception exception) {
- Logger.logException(exception);
- if (serialPort!=null) {
- //Event listener is removed as part of close(),
- //but exceptions need to be caught to ensure that close() really succeeds
- try {
- serialPort.removeEventListener();
- Thread.sleep(50); //allow a little time for RXTX Native to catch up - makes stuff more stable
- } catch(Exception e) {
- Logger.logException(e);
- }
- serialPort.close();
- fConn.getSerialPortIdentifier().removePortOwnershipListener(fConn.getSerialPortHandler());
- }
- fControl.setState(TerminalState.CLOSED);
- } finally {
- fConn.doneConnect();
- }
- }
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialConnector.java b/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialConnector.java
deleted file mode 100644
index 9d4314990..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialConnector.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * 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 TerminalControl
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- * Martin Oberhuber (Wind River) - [206892] Don't connect if already connecting
- * Martin Oberhuber (Wind River) - [208029] COM port not released after quick disconnect/reconnect
- * Martin Oberhuber (Wind River) - [225853][api] Provide more default functionality in TerminalConnectorImpl
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.serial;
-
-import gnu.io.CommPortIdentifier;
-import gnu.io.SerialPort;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage;
-import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
-import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl;
-import org.eclipse.tm.internal.terminal.provisional.api.Logger;
-import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
-import org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl;
-
-public class SerialConnector extends TerminalConnectorImpl {
- private OutputStream fOutputStream;
- private InputStream fInputStream;
- private SerialPort fSerialPort;
- private CommPortIdentifier fSerialPortIdentifier;
- private SerialPortHandler fTerminalSerialPortHandler;
- private SerialSettings fSettings;
- private SerialConnectWorker fConnectWorker = null;
- private volatile boolean fDisconnectGoingOn = false;
-
- public SerialConnector() {
- }
- public SerialConnector(SerialSettings settings) {
- fSettings=settings;
- }
- public void initialize() throws Exception {
- try {
- fSettings=new SerialSettings();
- } catch (NoClassDefFoundError e) {
- // tell the user how to install the library
- throw new CoreException(new Status(IStatus.WARNING,Activator.PLUGIN_ID,0, SerialMessages.ERROR_LIBRARY_NOT_INSTALLED,e));
- }
- }
- public void connect(ITerminalControl control) {
- super.connect(control);
- synchronized(this) {
- if (fConnectWorker!=null || fDisconnectGoingOn) {
- //avoid multiple background connect/disconnect threads at the same time
- return;
- }
- fConnectWorker = new SerialConnectWorker(this, control);
- }
- fControl.setState(TerminalState.CONNECTING);
- fConnectWorker.start();
- }
- /**
- * Indicate that the connectWorker is finished.
- */
- void doneConnect() {
- synchronized(this) {
- fConnectWorker = null;
- }
- }
- public void doDisconnect() {
- synchronized(this) {
- //avoid multiple background connect/disconnect threads at the same time
- if (fConnectWorker!=null) {
- fConnectWorker.interrupt();
- return;
- } else if (fDisconnectGoingOn) {
- return;
- }
- fDisconnectGoingOn = true;
- }
-
- // Fix for SPR 112422. When output is being received from the serial port, the
- // below call to removePortOwnershipListener() attempts to lock the serial port
- // object, but that object is already locked by another Terminal view thread
- // waiting for the SWT display thread to process a syncExec() call. Since this
- // method is called on the display thread, the display thread is waiting to
- // lock the serial port object and the thread holding the serial port object
- // lock is waiting for the display thread to process a syncExec() call, so the
- // two threads end up deadlocked, which hangs the Workbench GUI.
- //
- // The solution is to spawn a short-lived worker thread that calls
- // removePortOwnershipListener(), thus preventing the display thread from
- // deadlocking with the other Terminal view thread.
-
- new Thread("Terminal View Serial Port Disconnect Worker") //$NON-NLS-1$
- {
- public void run() {
- try {
- if (getSerialPortIdentifier() != null) {
- try {
- getSerialPortIdentifier()
- .removePortOwnershipListener(getSerialPortHandler());
- } catch(Exception e) {
- Logger.logException(e);
- }
- }
-
- if (getSerialPort() != null) {
- //Event listener is removed as part of close(),
- //but exceptions need to be caught to ensure that close() really succeeds
- try {
- getSerialPort().removeEventListener();
- Thread.sleep(50); //allow a little time for RXTX Native to catch up - makes stuff more stable
- } catch(Exception e) {
- Logger.logException(e);
- }
- Logger.log("Calling close() on serial port ..."); //$NON-NLS-1$
- getSerialPort().close();
- }
-
- if (getInputStream() != null) {
- try {
- getInputStream().close();
- } catch (Exception exception) {
- Logger.logException(exception);
- }
- }
-
- if (getTerminalToRemoteStream() != null) {
- try {
- getTerminalToRemoteStream().close();
- } catch (Exception exception) {
- Logger.logException(exception);
- }
- }
-
- setSerialPortIdentifier(null);
- cleanSerialPort();
- setSerialPortHandler(null);
- } catch(Exception e) {
- Logger.logException(e);
- } finally {
- fDisconnectGoingOn = false;
- }
- }
-
- }.start();
- }
- public InputStream getInputStream() {
- return fInputStream;
- }
- public OutputStream getTerminalToRemoteStream() {
- return fOutputStream;
- }
- private void setInputStream(InputStream inputStream) {
- fInputStream = inputStream;
- }
- private void setOutputStream(OutputStream outputStream) {
- fOutputStream = outputStream;
- }
- public void setTerminalSize(int newWidth, int newHeight) {
- // TODO
- }
- protected SerialPort getSerialPort() {
- return fSerialPort;
- }
-
- /**
- * sets the socket to null
- */
- void cleanSerialPort() {
- fSerialPort=null;
- setInputStream(null);
- setOutputStream(null);
- }
-
- protected void setSerialPort(SerialPort serialPort) throws IOException {
- cleanSerialPort();
- if(serialPort!=null) {
- fSerialPort = serialPort;
- setOutputStream(serialPort.getOutputStream());
- setInputStream(serialPort.getInputStream());
- }
- }
- protected CommPortIdentifier getSerialPortIdentifier() {
- return fSerialPortIdentifier;
- }
- protected void setSerialPortIdentifier(CommPortIdentifier serialPortIdentifier) {
- //System.out.println("setSerialPortId: "+Thread.currentThread().getName()+ " - "+serialPortIdentifier + " - "+System.currentTimeMillis());
- fSerialPortIdentifier = serialPortIdentifier;
- }
- void setSerialPortHandler(SerialPortHandler serialPortHandler) {
- fTerminalSerialPortHandler=serialPortHandler;
- }
- SerialPortHandler getSerialPortHandler() {
- return fTerminalSerialPortHandler;
- }
- /**
- * Return the Serial Settings.
- *
- * @return the settings for a concrete connection.
- */
- public ISerialSettings getSerialSettings() {
- return fSettings;
- }
- public ISettingsPage makeSettingsPage() {
- return new SerialSettingsPage(fSettings);
- }
- public String getSettingsSummary() {
- return fSettings.getSummary();
- }
- public void load(ISettingsStore store) {
- fSettings.load(store);
- }
- public void save(ISettingsStore store) {
- fSettings.save(store);
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialMessages.java b/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialMessages.java
deleted file mode 100644
index 001c6f8be..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialMessages.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * 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) - [221184] Redesign Serial Terminal Ownership Handling
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.serial;
-
-import org.eclipse.osgi.util.NLS;
-public class SerialMessages extends NLS {
- static {
- NLS.initializeMessages(SerialMessages.class.getName(), SerialMessages.class);
- }
- public static String PROP_TITLE;
- public static String PORT;
- public static String BAUDRATE;
- public static String DATABITS;
- public static String STOPBITS;
- public static String PARITY;
- public static String FLOWCONTROL;
- public static String TIMEOUT;
-
- public static String ERROR_LIBRARY_NOT_INSTALLED;
-
- public static String PORT_IN_USE;
- public static String ANOTHER_TERMINAL;
- public static String PORT_STOLEN;
- public static String PORT_NOT_STOLEN;
- public static String NO_SUCH_PORT;
-
- public static String OWNERSHIP_GRANTED;
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialMessages.properties b/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialMessages.properties
deleted file mode 100644
index e12c88fe3..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialMessages.properties
+++ /dev/null
@@ -1,49 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2008 Wind River Systems, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# 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) - [221184] Redesign Serial Terminal Ownership Handling
-###############################################################################
-PROP_TITLE = Terminal
-PORT = Port
-BAUDRATE = Baud Rate
-DATABITS = Data Bits
-STOPBITS = Stop Bits
-PARITY = Parity
-FLOWCONTROL = Flow Control
-TIMEOUT = Timeout (sec)
-ERROR_LIBRARY_NOT_INSTALLED = The RXTX library has not been installed properly! \n\
-\n\
-Installation:\n\
--------------\n\
-* Either (a) Use Help > Software Updates, Add Site and install from:\n\
-\ \ \ http://rxtx.qbang.org/eclipse/\n\
-* Or (b) Download and install RXTX for Eclipse from:\n\
-\ \ \ http://rxtx.qbang.org/eclipse/downloads/\n\
-\n\
-For other Platforms, more info and help see\n\
-\ \ \ http://www.rxtx.org/\n\
-\ \ \ https://bugs.eclipse.org/bugs/show_bug.cgi?id=175336#c6\n\
-\n\
-This message is also available in your Error Log for Copy & Paste.
-
-# Port Ownership Handling
-PORT_IN_USE = Serial port \''{0}\'' is currently in use by {1}\!\nDo you want to try and steal the port?
-ANOTHER_TERMINAL = another Terminal View
-PORT_STOLEN = Port \''{0}\'' successfully obtained from {1}\r\n
-PORT_NOT_STOLEN = Connection Error!\r\n \''{0}\'' is already in use by {1}.\r\n
-NO_SUCH_PORT = No such port: \''{0}\''\r\n
-
-OWNERSHIP_GRANTED = Connection canceled due to ownership request from {0}.\r\n \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialPortHandler.java b/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialPortHandler.java
deleted file mode 100644
index 7778b896e..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialPortHandler.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * 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 TerminalControl
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- * Martin Oberhuber (Wind River) - [168197] Replace JFace MessagDialog by SWT MessageBox
- * Martin Oberhuber (Wind River) - [221184] Redesign Serial Terminal Ownership Handling
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.serial;
-
-import gnu.io.CommPortOwnershipListener;
-import gnu.io.SerialPortEvent;
-import gnu.io.SerialPortEventListener;
-
-import java.io.IOException;
-
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl;
-import org.eclipse.tm.internal.terminal.provisional.api.Logger;
-
-/**
- * UNDER CONSTRUCTION
- */
-public class SerialPortHandler implements
- SerialPortEventListener, CommPortOwnershipListener {
-
- private final ITerminalControl fControl;
- private final SerialConnector fConn;
- protected byte[] bytes = new byte[2048];
-
- /**
- * UNDER CONSTRUCTION
- * @param control TODO
- */
- public SerialPortHandler(SerialConnector conn,ITerminalControl control) {
- super();
- fControl = control;
- fConn=conn;
- }
-
- // Message handlers
-
- /**
- * UNDER CONSTRUCTION
- */
- public void onSerialDataAvailable(Object data) {
- try {
- while (fConn.getInputStream() != null && fConn.getInputStream().available() > 0) {
- int nBytes = fConn.getInputStream().read(bytes);
- fControl.getRemoteToTerminalOutputStream().write(bytes, 0, nBytes);
- }
- } catch (IOException ex) {
- fControl.displayTextInTerminal(ex.getMessage());
- } catch (Exception exception) {
- Logger.logException(exception);
- }
- }
-
- public void onSerialOwnershipRequested(Object data) {
- //Bug 221184: We immediately release the port on any ownership request
- try {
- throw new Exception();
- } catch (Exception e) {
- StackTraceElement[] elems = e.getStackTrace();
- final String requester = elems[elems.length - 4].getClassName();
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- fConn.disconnect();
- String req = requester;
- String myPackage = this.getClass().getPackage().getName();
- if (req.startsWith(myPackage)) {
- req = SerialMessages.ANOTHER_TERMINAL;
- }
- fControl.displayTextInTerminal(NLS.bind(SerialMessages.OWNERSHIP_GRANTED, req));
- }
- });
- fConn.disconnect();
- }
- }
-
- // SerialPortEventListener interface
- public void serialEvent(SerialPortEvent event) {
- switch (event.getEventType()) {
- case SerialPortEvent.DATA_AVAILABLE:
- onSerialDataAvailable(null);
- break;
- }
- }
-
- // CommPortOwnershipListener interface
-
- /**
- * UNDER CONSTRUCTION
- */
- public void ownershipChange(int nType) {
- switch (nType) {
- case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED:
- onSerialOwnershipRequested(null);
- break;
- }
- }
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialProperties.java b/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialProperties.java
deleted file mode 100644
index 8be28ba67..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialProperties.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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 TerminalProperties
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.serial;
-
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.List;
-import java.util.Vector;
-
-import gnu.io.CommPortIdentifier;
-
-public class SerialProperties {
- protected List fSerialPortTable;
- protected List fBaudRateTable;
- protected List fDataBitsTable;
- protected List fStopBitsTable;
- protected List fParityTable;
- protected List fFlowControlTable;
- protected String fDefaultConnType;
- protected String fDefaultSerialPort;
- protected String fDefaultBaudRate;
- protected String fDefaultDataBits;
- protected String fDefaultStopBits;
- protected String fDefaultParity;
- protected String fDefaultFlowControl;
-
- public SerialProperties() {
- setupProperties();
- }
- public List getSerialPortTable() {
- return fSerialPortTable;
- }
-
- public List getBaudRateTable() {
- return fBaudRateTable;
- }
-
- public List getDataBitsTable() {
- return fDataBitsTable;
- }
-
- public List getStopBitsTable() {
- return fStopBitsTable;
- }
-
- public List getParityTable() {
- return fParityTable;
- }
-
- public List getFlowControlTable() {
- return fFlowControlTable;
- }
- public String getDefaultConnType() {
- return fDefaultConnType;
- }
-
- public String getDefaultSerialPort() {
- return fDefaultSerialPort;
- }
-
- public String getDefaultBaudRate() {
- return fDefaultBaudRate;
- }
-
- public String getDefaultDataBits() {
- return fDefaultDataBits;
- }
-
- public String getDefaultStopBits() {
- return fDefaultStopBits;
- }
-
- public String getDefaultParity() {
- return fDefaultParity;
- }
-
- public String getDefaultFlowControl() {
- return fDefaultFlowControl;
- }
- public String getDefaultTimeout() {
- return "5"; //$NON-NLS-1$
- }
- protected void setupProperties() {
- fSerialPortTable = new Vector();
- fBaudRateTable = new Vector();
- fDataBitsTable = new Vector();
- fStopBitsTable = new Vector();
- fParityTable = new Vector();
- fFlowControlTable = new Vector();
- fDefaultConnType = ""; //$NON-NLS-1$
- fDefaultSerialPort = ""; //$NON-NLS-1$
- fDefaultBaudRate = ""; //$NON-NLS-1$
- fDefaultDataBits = ""; //$NON-NLS-1$
- fDefaultStopBits = ""; //$NON-NLS-1$
- fDefaultParity = ""; //$NON-NLS-1$
- fDefaultFlowControl = ""; //$NON-NLS-1$
-
- fBaudRateTable.add("300"); //$NON-NLS-1$
- fBaudRateTable.add("1200"); //$NON-NLS-1$
- fBaudRateTable.add("2400"); //$NON-NLS-1$
- fBaudRateTable.add("4800"); //$NON-NLS-1$
- fBaudRateTable.add("9600"); //$NON-NLS-1$
- fBaudRateTable.add("19200"); //$NON-NLS-1$
- fBaudRateTable.add("38400"); //$NON-NLS-1$
- fBaudRateTable.add("57600"); //$NON-NLS-1$
- fBaudRateTable.add("115200"); //$NON-NLS-1$
-
- fDataBitsTable.add("5"); //$NON-NLS-1$
- fDataBitsTable.add("6"); //$NON-NLS-1$
- fDataBitsTable.add("7"); //$NON-NLS-1$
- fDataBitsTable.add("8"); //$NON-NLS-1$
-
- fStopBitsTable.add("1"); //$NON-NLS-1$
- fStopBitsTable.add("1_5"); //$NON-NLS-1$
- fStopBitsTable.add("2"); //$NON-NLS-1$
-
- fParityTable.add("None"); //$NON-NLS-1$
- fParityTable.add("Even"); //$NON-NLS-1$
- fParityTable.add("Odd"); //$NON-NLS-1$
- fParityTable.add("Mark"); //$NON-NLS-1$
- fParityTable.add("Space"); //$NON-NLS-1$
-
- fFlowControlTable.add("None"); //$NON-NLS-1$
- fFlowControlTable.add("RTS/CTS"); //$NON-NLS-1$
- fFlowControlTable.add("Xon/Xoff"); //$NON-NLS-1$
-
- fDefaultBaudRate = (String) fBaudRateTable.get(4);
- fDefaultDataBits = (String) fDataBitsTable.get(3);
- fDefaultStopBits = (String) fStopBitsTable.get(0);
- fDefaultParity = (String) fParityTable.get(0);
- fDefaultFlowControl = (String) fFlowControlTable.get(0);
-
- Enumeration portIdEnum= CommPortIdentifier.getPortIdentifiers();
- while (portIdEnum.hasMoreElements()) {
- CommPortIdentifier identifier = (CommPortIdentifier) portIdEnum.nextElement();
- String strName = identifier.getName();
- int nPortType = identifier.getPortType();
-
- if (nPortType == CommPortIdentifier.PORT_SERIAL)
- fSerialPortTable.add(strName);
- }
-
- Collections.sort(fSerialPortTable);
-
- if (!fSerialPortTable.isEmpty()) {
- fDefaultSerialPort = (String) fSerialPortTable.get(0);
- }
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialSettings.java b/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialSettings.java
deleted file mode 100644
index 7980b7afe..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialSettings.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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 TerminalSettings
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.serial;
-
-import gnu.io.SerialPort;
-
-import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
-
-public class SerialSettings implements ISerialSettings {
- protected String fSerialPort;
- protected String fBaudRate;
- protected String fDataBits;
- protected String fStopBits;
- protected String fParity;
- protected String fFlowControl;
- protected String fTimeout;
- final private SerialProperties fProperties=new SerialProperties();
-
- public String getSerialPort() {
- return fSerialPort;
- }
-
- public void setSerialPort(String strSerialPort) {
- fSerialPort = strSerialPort;
- }
-
- public String getBaudRateString() {
- return fBaudRate;
- }
-
- public int getBaudRate() {
- int nBaudRate;
-
- try {
- nBaudRate = Integer.parseInt(fBaudRate);
- } catch (NumberFormatException numberFormatException) {
- nBaudRate = 9600;
- }
-
- return nBaudRate;
- }
-
- public void setBaudRate(String strBaudRate) {
- fBaudRate = strBaudRate;
- }
-
- public String getDataBitsString() {
- return fDataBits;
- }
-
- public int getDataBits() {
- if (fDataBits.equals("5")) { //$NON-NLS-1$
- return SerialPort.DATABITS_5;
- } else if (fDataBits.equals("6")) { //$NON-NLS-1$
- return SerialPort.DATABITS_6;
- } else if (fDataBits.equals("7")) { //$NON-NLS-1$
- return SerialPort.DATABITS_7;
- } else {
- return SerialPort.DATABITS_8;
- }
- }
-
- public void setDataBits(String strDataBits) {
- fDataBits = strDataBits;
- }
-
- public String getStopBitsString() {
- return fStopBits;
- }
-
- public int getStopBits() {
- if (fStopBits.equals("1_5")) { //$NON-NLS-1$
- return SerialPort.STOPBITS_1_5;
- } else if (fStopBits.equals("2")) { //$NON-NLS-1$
- return SerialPort.STOPBITS_2;
- } else { // 1
- return SerialPort.STOPBITS_1;
- }
- }
-
- public void setStopBits(String strStopBits) {
- fStopBits = strStopBits;
- }
-
- public String getParityString() {
- return fParity;
- }
-
- public int getParity() {
- if (fParity.equals("Even")) //$NON-NLS-1$
- {
- return SerialPort.PARITY_EVEN;
- } else if (fParity.equals("Odd")) //$NON-NLS-1$
- {
- return SerialPort.PARITY_ODD;
- } else if (fParity.equals("Mark")) //$NON-NLS-1$
- {
- return SerialPort.PARITY_MARK;
- } else if (fParity.equals("Space")) //$NON-NLS-1$
- {
- return SerialPort.PARITY_SPACE;
- } else // None
- {
- return SerialPort.PARITY_NONE;
- }
- }
-
- public void setParity(String strParity) {
- fParity = strParity;
- }
-
- public String getFlowControlString() {
- return fFlowControl;
- }
-
- public int getFlowControl() {
- if (fFlowControl.equals("RTS/CTS")) //$NON-NLS-1$
- {
- return SerialPort.FLOWCONTROL_RTSCTS_IN;
- } else if (fFlowControl.equals("Xon/Xoff")) //$NON-NLS-1$
- {
- return SerialPort.FLOWCONTROL_XONXOFF_IN;
- } else // None
- {
- return SerialPort.FLOWCONTROL_NONE;
- }
- }
-
- public void setFlowControl(String strFlow) {
- fFlowControl = strFlow;
- }
-
- public String getSummary() {
- return getSerialPort() + ", " + //$NON-NLS-1$
- getBaudRateString() + ", " + //$NON-NLS-1$
- getDataBitsString() + ", " + //$NON-NLS-1$
- getStopBitsString() + ", " + //$NON-NLS-1$
- getParityString() + ", " + //$NON-NLS-1$
- getFlowControlString();
- }
-
- public void load(ISettingsStore store) {
- fSerialPort = store.get("SerialPort", fProperties.getDefaultSerialPort());//$NON-NLS-1$
- fBaudRate = store.get("BaudRate", fProperties.getDefaultBaudRate());//$NON-NLS-1$
- fDataBits = store.get("DataBits", fProperties.getDefaultDataBits());//$NON-NLS-1$
- fStopBits = store.get("StopBits", fProperties.getDefaultStopBits());//$NON-NLS-1$
- fParity = store.get("Parity", fProperties.getDefaultParity());//$NON-NLS-1$
- fFlowControl = store.get("FlowControl", fProperties.getDefaultFlowControl());//$NON-NLS-1$
- fTimeout = store.get("Timeout",fProperties.getDefaultTimeout()); //$NON-NLS-1$
- }
-
- public void save(ISettingsStore store) {
- store.put("SerialPort", fSerialPort); //$NON-NLS-1$
- store.put("BaudRate", fBaudRate); //$NON-NLS-1$
- store.put("DataBits", fDataBits); //$NON-NLS-1$
- store.put("StopBits", fStopBits); //$NON-NLS-1$
- store.put("Parity", fParity); //$NON-NLS-1$
- store.put("FlowControl", fFlowControl); //$NON-NLS-1$
- }
-
- public SerialProperties getProperties() {
- return fProperties;
- }
-
- public int getTimeout() {
- try {
- return Integer.parseInt(fTimeout);
- } catch (NumberFormatException numberFormatException) {
- return 10;
- }
- }
- public String getTimeoutString() {
- return fTimeout;
- }
-
- public void setTimeout(String timeout) {
- fTimeout = timeout;
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialSettingsPage.java b/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialSettingsPage.java
deleted file mode 100644
index c896ed508..000000000
--- a/terminal/org.eclipse.tm.terminal.serial/src/org/eclipse/tm/internal/terminal/serial/SerialSettingsPage.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * 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 TerminalSettingsDlg
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- * Martin Oberhuber (Wind River) - [206917] Add validation for Terminal Settings
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.serial;
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.swt.SWT;
-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.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage;
-
-public class SerialSettingsPage implements ISettingsPage {
- private Combo fSerialPortCombo;
- private Combo fBaudRateCombo;
- private Combo fDataBitsCombo;
- private Combo fStopBitsCombo;
- private Combo fParityCombo;
- private Combo fFlowControlCombo;
- private Text fTimeout;
- private final SerialSettings fTerminalSettings;
-
- public SerialSettingsPage(SerialSettings settings) {
- fTerminalSettings=settings;
- }
- public void saveSettings() {
- fTerminalSettings.setSerialPort(getComboValue(fSerialPortCombo));
- fTerminalSettings.setBaudRate(getComboValue(fBaudRateCombo));
- fTerminalSettings.setDataBits(getComboValue(fDataBitsCombo));
- fTerminalSettings.setStopBits(getComboValue(fStopBitsCombo));
- fTerminalSettings.setParity(getComboValue(fParityCombo));
- fTerminalSettings.setFlowControl(getComboValue(fFlowControlCombo));
- fTerminalSettings.setTimeout(fTimeout.getText());
- }
- public void loadSettings() {
- // Load controls
- SerialProperties properties = fTerminalSettings.getProperties();
- List list;
-
- list = properties.getSerialPortTable();
- loadCombo(fSerialPortCombo, list);
-
- list = properties.getBaudRateTable();
- loadCombo(fBaudRateCombo, list);
-
- list = properties.getDataBitsTable();
- loadCombo(fDataBitsCombo, list);
-
- list = properties.getStopBitsTable();
- loadCombo(fStopBitsCombo, list);
-
- list = properties.getParityTable();
- loadCombo(fParityCombo, list);
-
- list = properties.getFlowControlTable();
- loadCombo(fFlowControlCombo, list);
-
- setCombo(fSerialPortCombo,fTerminalSettings.getSerialPort());
- setCombo(fBaudRateCombo,fTerminalSettings.getBaudRateString());
- setCombo(fDataBitsCombo,fTerminalSettings.getDataBitsString());
- setCombo(fStopBitsCombo,fTerminalSettings.getStopBitsString());
- setCombo(fParityCombo,fTerminalSettings.getParityString());
- setCombo(fFlowControlCombo,fTerminalSettings.getFlowControlString());
- fTimeout.setText(fTerminalSettings.getTimeoutString());
- }
- 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);
-
- }
- private String getComboValue(Combo combo) {
- int nIndex = combo.getSelectionIndex();
- if (nIndex == -1) {
- if((combo.getStyle() & SWT.READ_ONLY)!=0)
- return ""; //$NON-NLS-1$
- return combo.getText();
- }
-
- return combo.getItem(nIndex);
-
- }
- public boolean validateSettings() {
- try {
- int p = Integer.parseInt(fTimeout.getText().trim());
- if (p < 0) {
- return false;
- }
- } catch (Exception e) {
- return false;
- }
- return true;
- }
- public void createControl(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout gridLayout = new GridLayout(2, false);
-
- composite.setLayout(gridLayout);
- composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- fSerialPortCombo=addLabeledCombo(composite, SerialMessages.PORT + ":",false); //$NON-NLS-1$
- fBaudRateCombo=addLabeledCombo(composite, SerialMessages.BAUDRATE + ":"); //$NON-NLS-1$
- fDataBitsCombo=addLabeledCombo(composite, SerialMessages.DATABITS + ":"); //$NON-NLS-1$
- fStopBitsCombo=addLabeledCombo(composite, SerialMessages.STOPBITS + ":"); //$NON-NLS-1$
- fParityCombo=addLabeledCombo(composite, SerialMessages.PARITY + ":"); //$NON-NLS-1$
- fFlowControlCombo=addLabeledCombo(composite, SerialMessages.FLOWCONTROL + ":"); //$NON-NLS-1$
-
- new Label(composite, SWT.RIGHT).setText(SerialMessages.TIMEOUT + ":"); //$NON-NLS-1$
- fTimeout = new Text(composite, SWT.BORDER);
- fTimeout.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- loadSettings();
- }
-
- private Combo addLabeledCombo(Composite composite, String label) {
- return addLabeledCombo(composite, label, true);
- }
- private Combo addLabeledCombo(Composite composite, String label,boolean readonly) {
- new Label(composite, SWT.RIGHT).setText(label);
- int flags=SWT.DROP_DOWN;
- if(readonly)
- flags|=SWT.READ_ONLY;
- Combo combo = new Combo(composite, flags);
- combo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- return combo;
- }
-
- private void loadCombo(Combo ctlCombo, List table) {
- for (Iterator iter = table.iterator(); iter.hasNext();) {
- String label = (String) iter.next();
- ctlCombo.add(label);
- }
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.ssh-feature/.project b/terminal/org.eclipse.tm.terminal.ssh-feature/.project
deleted file mode 100644
index b9b4f4daa..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.terminal.ssh-feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/terminal/org.eclipse.tm.terminal.ssh-feature/build.properties b/terminal/org.eclipse.tm.terminal.ssh-feature/build.properties
deleted file mode 100644
index ba0e080a9..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh-feature/build.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################################################################
-# Copyright (c) 2006 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
-###############################################################################
-bin.includes = feature.xml,\
- epl-v10.html,\
- feature.properties,\
- license.html
diff --git a/terminal/org.eclipse.tm.terminal.ssh-feature/epl-v10.html b/terminal/org.eclipse.tm.terminal.ssh-feature/epl-v10.html
deleted file mode 100644
index 9321f4082..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh-feature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">where such changes and/or additions to the Program
-originate from and are distributed by that particular Contributor. A
-Contribution 'originates' from a Contributor if it was added to the
-Program by such Contributor itself or anyone acting on such
-Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in
-conjunction with the Program under their own license agreement, and (ii)
-are not derivative works of the Program.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" mean patent claims licensable by a
-Contributor which are necessarily infringed by the use or sale of its
-Contribution alone or when combined with the Program.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to reproduce, prepare derivative works
-of, publicly display, publicly perform, distribute and sublicense the
-Contribution of such Contributor, if any, and such derivative works, in
-source code and object code form.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free patent license under Licensed Patents to make, use, sell,
-offer to sell, import and otherwise transfer the Contribution of such
-Contributor, if any, in source code and object code form. This patent
-license shall apply to the combination of the Contribution and the
-Program if, at the time the Contribution is added by the Contributor,
-such addition of the Contribution causes such combination to be covered
-by the Licensed Patents. The patent license shall not apply to any other
-combinations which include the Contribution. No hardware per se is
-licensed hereunder.</p>
-
-<p class="list">c) Recipient understands that although each Contributor
-grants the licenses to its Contributions set forth herein, no assurances
-are provided by any Contributor that the Program does not infringe the
-patent or other intellectual property rights of any other entity. Each
-Contributor disclaims any liability to Recipient for claims brought by
-any other entity based on infringement of intellectual property rights
-or otherwise. As a condition to exercising the rights and licenses
-granted hereunder, each Recipient hereby assumes sole responsibility to
-secure any other intellectual property rights needed, if any. For
-example, if a third party patent license is required to allow Recipient
-to distribute the Program, it is Recipient's responsibility to acquire
-that license before distributing the Program.</p>
-
-<p class="list">d) Each Contributor represents that to its knowledge it
-has sufficient copyright rights in its Contribution, if any, to grant
-the copyright license set forth in this Agreement.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">i) effectively disclaims on behalf of all Contributors
-all warranties and conditions, express and implied, including warranties
-or conditions of title and non-infringement, and implied warranties or
-conditions of merchantability and fitness for a particular purpose;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">iv) states that source code for the Program is available
-from such Contributor, and informs licensees how to obtain it in a
-reasonable manner on or through a medium customarily used for software
-exchange.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>Each Contributor must identify itself as the originator of its
-Contribution, if any, in a manner that reasonably allows subsequent
-Recipients to identify the originator of the Contribution.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>Commercial distributors of software may accept certain
-responsibilities with respect to end users, business partners and the
-like. While this license is intended to facilitate the commercial use of
-the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create
-potential liability for other Contributors. Therefore, if a Contributor
-includes the Program in a commercial product offering, such Contributor
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-arising from claims, lawsuits and other legal actions brought by a third
-party against the Indemnified Contributor to the extent caused by the
-acts or omissions of such Commercial Contributor in connection with its
-distribution of the Program in a commercial product offering. The
-obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In
-order to qualify, an Indemnified Contributor must: a) promptly notify
-the Commercial Contributor in writing of such claim, and b) allow the
-Commercial Contributor to control, and cooperate with the Commercial
-Contributor in, the defense and any related settlement negotiations. The
-Indemnified Contributor may participate in any such claim at its own
-expense.</p>
-
-<p>For example, a Contributor might include the Program in a commercial
-product offering, Product X. That Contributor is then a Commercial
-Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance
-claims and warranties are such Commercial Contributor's responsibility
-alone. Under this section, the Commercial Contributor would have to
-defend claims against the other Contributors related to those
-performance claims and warranties, and if a court requires any other
-Contributor to pay any damages as a result, the Commercial Contributor
-must pay those damages.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
-OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
-ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
-OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and
-distributing the Program and assumes all risks associated with its
-exercise of rights under this Agreement , including but not limited to
-the risks and costs of program errors, compliance with applicable laws,
-damage to or loss of data, programs or equipment, and unavailability or
-interruption of operations.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
-NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
-WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
-DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
-HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>If any provision of this Agreement is invalid or unenforceable under
-applicable law, it shall not affect the validity or enforceability of
-the remainder of the terms of this Agreement, and without further action
-by the parties hereto, such provision shall be reformed to the minimum
-extent necessary to make such provision valid and enforceable.</p>
-
-<p>If Recipient institutes patent litigation against any entity
-(including a cross-claim or counterclaim in a lawsuit) alleging that the
-Program itself (excluding combinations of the Program with other
-software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the
-date such litigation is filed.</p>
-
-<p>All Recipient's rights under this Agreement shall terminate if it
-fails to comply with any of the material terms or conditions of this
-Agreement and does not cure such failure in a reasonable period of time
-after becoming aware of such noncompliance. If all Recipient's rights
-under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive.</p>
-
-<p>Everyone is permitted to copy and distribute copies of this
-Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The
-Agreement Steward reserves the right to publish new versions (including
-revisions) of this Agreement from time to time. No one other than the
-Agreement Steward has the right to modify this Agreement. The Eclipse
-Foundation is the initial Agreement Steward. The Eclipse Foundation may
-assign the responsibility to serve as the Agreement Steward to a
-suitable separate entity. Each new version of the Agreement will be
-given a distinguishing version number. The Program (including
-Contributions) may always be distributed subject to the version of the
-Agreement under which it was received. In addition, after a new version
-of the Agreement is published, Contributor may elect to distribute the
-Program (including its Contributions) under the new version. Except as
-expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
-rights or licenses to the intellectual property of any Contributor under
-this Agreement, whether expressly, by implication, estoppel or
-otherwise. All rights in the Program not expressly granted under this
-Agreement are reserved.</p>
-
-<p>This Agreement is governed by the laws of the State of New York and
-the intellectual property laws of the United States of America. No party
-to this Agreement will bring a legal action under this Agreement more
-than one year after the cause of action arose. Each party waives its
-rights to a jury trial in any resulting litigation.</p>
-
-</body></html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.ssh-feature/feature.properties b/terminal/org.eclipse.tm.terminal.ssh-feature/feature.properties
deleted file mode 100644
index ef63e8978..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh-feature/feature.properties
+++ /dev/null
@@ -1,141 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 Wind River Systems, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Martin Oberhuber (Wind River) - initial API and implementation
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=Target Management Terminal SSH Connector
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management Updates
-
-# "description" property - description of the feature
-description=An SSH connector implementation for the Terminal.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2000, 2009 Wind River Systems, Inc. and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/terminal/org.eclipse.tm.terminal.ssh-feature/feature.xml b/terminal/org.eclipse.tm.terminal.ssh-feature/feature.xml
deleted file mode 100644
index eeea67e4c..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh-feature/feature.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?> <!--
- Copyright (c) 2005, 2009 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
-
- Contributors:
- IBM Corporation - initial API and implementation
- -->
-
-<feature
- id="org.eclipse.tm.terminal.ssh"
- label="%featureName"
- version="2.0.100.qualifier"
- provider-name="%providerName">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- <discovery label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- </url>
-
- <requires>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.tm.terminal" version="3.0.0" match="equivalent"/>
- <import plugin="org.eclipse.jsch.core" version="1.0.0" match="compatible"/>
- <import plugin="com.jcraft.jsch" version="0.1.31" match="compatible"/>
- </requires>
-
- <plugin
- id="org.eclipse.tm.terminal.ssh"
- download-size="13"
- install-size="13"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/terminal/org.eclipse.tm.terminal.ssh-feature/license.html b/terminal/org.eclipse.tm.terminal.ssh-feature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh-feature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplateFeature/epl-v10.html b/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplateFeature/epl-v10.html
deleted file mode 100644
index 9321f4082..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplateFeature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">where such changes and/or additions to the Program
-originate from and are distributed by that particular Contributor. A
-Contribution 'originates' from a Contributor if it was added to the
-Program by such Contributor itself or anyone acting on such
-Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in
-conjunction with the Program under their own license agreement, and (ii)
-are not derivative works of the Program.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" mean patent claims licensable by a
-Contributor which are necessarily infringed by the use or sale of its
-Contribution alone or when combined with the Program.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to reproduce, prepare derivative works
-of, publicly display, publicly perform, distribute and sublicense the
-Contribution of such Contributor, if any, and such derivative works, in
-source code and object code form.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free patent license under Licensed Patents to make, use, sell,
-offer to sell, import and otherwise transfer the Contribution of such
-Contributor, if any, in source code and object code form. This patent
-license shall apply to the combination of the Contribution and the
-Program if, at the time the Contribution is added by the Contributor,
-such addition of the Contribution causes such combination to be covered
-by the Licensed Patents. The patent license shall not apply to any other
-combinations which include the Contribution. No hardware per se is
-licensed hereunder.</p>
-
-<p class="list">c) Recipient understands that although each Contributor
-grants the licenses to its Contributions set forth herein, no assurances
-are provided by any Contributor that the Program does not infringe the
-patent or other intellectual property rights of any other entity. Each
-Contributor disclaims any liability to Recipient for claims brought by
-any other entity based on infringement of intellectual property rights
-or otherwise. As a condition to exercising the rights and licenses
-granted hereunder, each Recipient hereby assumes sole responsibility to
-secure any other intellectual property rights needed, if any. For
-example, if a third party patent license is required to allow Recipient
-to distribute the Program, it is Recipient's responsibility to acquire
-that license before distributing the Program.</p>
-
-<p class="list">d) Each Contributor represents that to its knowledge it
-has sufficient copyright rights in its Contribution, if any, to grant
-the copyright license set forth in this Agreement.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">i) effectively disclaims on behalf of all Contributors
-all warranties and conditions, express and implied, including warranties
-or conditions of title and non-infringement, and implied warranties or
-conditions of merchantability and fitness for a particular purpose;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">iv) states that source code for the Program is available
-from such Contributor, and informs licensees how to obtain it in a
-reasonable manner on or through a medium customarily used for software
-exchange.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>Each Contributor must identify itself as the originator of its
-Contribution, if any, in a manner that reasonably allows subsequent
-Recipients to identify the originator of the Contribution.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>Commercial distributors of software may accept certain
-responsibilities with respect to end users, business partners and the
-like. While this license is intended to facilitate the commercial use of
-the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create
-potential liability for other Contributors. Therefore, if a Contributor
-includes the Program in a commercial product offering, such Contributor
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-arising from claims, lawsuits and other legal actions brought by a third
-party against the Indemnified Contributor to the extent caused by the
-acts or omissions of such Commercial Contributor in connection with its
-distribution of the Program in a commercial product offering. The
-obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In
-order to qualify, an Indemnified Contributor must: a) promptly notify
-the Commercial Contributor in writing of such claim, and b) allow the
-Commercial Contributor to control, and cooperate with the Commercial
-Contributor in, the defense and any related settlement negotiations. The
-Indemnified Contributor may participate in any such claim at its own
-expense.</p>
-
-<p>For example, a Contributor might include the Program in a commercial
-product offering, Product X. That Contributor is then a Commercial
-Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance
-claims and warranties are such Commercial Contributor's responsibility
-alone. Under this section, the Commercial Contributor would have to
-defend claims against the other Contributors related to those
-performance claims and warranties, and if a court requires any other
-Contributor to pay any damages as a result, the Commercial Contributor
-must pay those damages.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
-OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
-ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
-OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and
-distributing the Program and assumes all risks associated with its
-exercise of rights under this Agreement , including but not limited to
-the risks and costs of program errors, compliance with applicable laws,
-damage to or loss of data, programs or equipment, and unavailability or
-interruption of operations.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
-NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
-WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
-DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
-HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>If any provision of this Agreement is invalid or unenforceable under
-applicable law, it shall not affect the validity or enforceability of
-the remainder of the terms of this Agreement, and without further action
-by the parties hereto, such provision shall be reformed to the minimum
-extent necessary to make such provision valid and enforceable.</p>
-
-<p>If Recipient institutes patent litigation against any entity
-(including a cross-claim or counterclaim in a lawsuit) alleging that the
-Program itself (excluding combinations of the Program with other
-software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the
-date such litigation is filed.</p>
-
-<p>All Recipient's rights under this Agreement shall terminate if it
-fails to comply with any of the material terms or conditions of this
-Agreement and does not cure such failure in a reasonable period of time
-after becoming aware of such noncompliance. If all Recipient's rights
-under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive.</p>
-
-<p>Everyone is permitted to copy and distribute copies of this
-Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The
-Agreement Steward reserves the right to publish new versions (including
-revisions) of this Agreement from time to time. No one other than the
-Agreement Steward has the right to modify this Agreement. The Eclipse
-Foundation is the initial Agreement Steward. The Eclipse Foundation may
-assign the responsibility to serve as the Agreement Steward to a
-suitable separate entity. Each new version of the Agreement will be
-given a distinguishing version number. The Program (including
-Contributions) may always be distributed subject to the version of the
-Agreement under which it was received. In addition, after a new version
-of the Agreement is published, Contributor may elect to distribute the
-Program (including its Contributions) under the new version. Except as
-expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
-rights or licenses to the intellectual property of any Contributor under
-this Agreement, whether expressly, by implication, estoppel or
-otherwise. All rights in the Program not expressly granted under this
-Agreement are reserved.</p>
-
-<p>This Agreement is governed by the laws of the State of New York and
-the intellectual property laws of the United States of America. No party
-to this Agreement will bring a legal action under this Agreement more
-than one year after the cause of action arose. Each party waives its
-rights to a jury trial in any resulting litigation.</p>
-
-</body></html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplateFeature/feature.properties b/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplateFeature/feature.properties
deleted file mode 100644
index 11ec4bab6..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplateFeature/feature.properties
+++ /dev/null
@@ -1,141 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 Wind River Systems, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Martin Oberhuber (Wind River) - initial API and implementation
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=Target Management Terminal SSH Connector Source
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management Updates
-
-# "description" property - description of the feature
-description=An SSH connector implementation for the Terminal.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2000, 2009 Wind River Systems, Inc. and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplateFeature/license.html b/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplateFeature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplateFeature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/about.html b/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/about.html
deleted file mode 100644
index e7b57cfff..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/about.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2007</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-<h3>Source Code</h3>
-<p>This plug-in contains source code zip files (&quot;Source Zips&quot;) that correspond to binary content in other plug-ins. These Source Zips may be distributed under different license
-agreements and/or notices. Details about these license agreements and notices are contained in &quot;about.html&quot; files (&quot;Abouts&quot;) located in sub-directories in the
-src/ directory of this plug-in. Such Abouts govern your use of the Source Zips in that directory, not the EPL.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/about.ini b/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/about.ini
deleted file mode 100644
index fbbb9f83d..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/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=dsdp32.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/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/about.mappings b/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/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/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/about.properties b/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/about.properties
deleted file mode 100644
index 5854f2d18..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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 SSH Connector Source\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Wind River Systems, Inc. and others 2000, 2009. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm
diff --git a/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/build.properties b/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/build.properties
deleted file mode 100644
index 7ef3fa39c..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 Wind River Systems, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-bin.includes = about.html, about.ini, about.mappings, about.properties, dsdp32.png, plugin.properties, plugin.xml, src/, META-INF/
-sourcePlugin = true
diff --git a/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/dsdp32.png b/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/dsdp32.png
deleted file mode 100644
index 3077b1220..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/dsdp32.png
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/plugin.properties b/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/plugin.properties
deleted file mode 100644
index 2e5e7e961..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh-feature/sourceTemplatePlugin/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 Wind River Systems, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-pluginName=Target Management Terminal SSH Connector Source
-providerName=Eclipse.org - DSDP
diff --git a/terminal/org.eclipse.tm.terminal.ssh/.classpath b/terminal/org.eclipse.tm.terminal.ssh/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/terminal/org.eclipse.tm.terminal.ssh/.cvsignore b/terminal/org.eclipse.tm.terminal.ssh/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/terminal/org.eclipse.tm.terminal.ssh/.project b/terminal/org.eclipse.tm.terminal.ssh/.project
deleted file mode 100644
index f5d184b60..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.terminal.ssh</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/terminal/org.eclipse.tm.terminal.ssh/.settings/org.eclipse.jdt.core.prefs b/terminal/org.eclipse.tm.terminal.ssh/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 381fc6eb0..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-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=warning
-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.3
diff --git a/terminal/org.eclipse.tm.terminal.ssh/.settings/org.eclipse.jdt.ui.prefs b/terminal/org.eclipse.tm.terminal.ssh/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 0b831f584..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Thu Dec 07 03:43:08 CET 2006
-eclipse.preferences.version=1
-internal.default.compliance=user
diff --git a/terminal/org.eclipse.tm.terminal.ssh/META-INF/MANIFEST.MF b/terminal/org.eclipse.tm.terminal.ssh/META-INF/MANIFEST.MF
deleted file mode 100644
index ac99ae314..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,17 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.terminal.ssh;singleton:=true
-Bundle-Version: 2.0.100.qualifier
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.tm.terminal;bundle-version="[3.0.0,3.1.0)",
- com.jcraft.jsch;bundle-version="[0.1.31,1.0.0)",
- org.eclipse.jsch.core;bundle-version="[1.0.0,2.0.0)"
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-Export-Package: org.eclipse.tm.internal.terminal.ssh;x-internal:=true
-Bundle-Activator: org.eclipse.tm.internal.terminal.ssh.Activator
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
diff --git a/terminal/org.eclipse.tm.terminal.ssh/about.html b/terminal/org.eclipse.tm.terminal.ssh/about.html
deleted file mode 100644
index d4cc693f9..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2007</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.ssh/about.ini b/terminal/org.eclipse.tm.terminal.ssh/about.ini
deleted file mode 100644
index fbbb9f83d..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/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=dsdp32.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/terminal/org.eclipse.tm.terminal.ssh/about.mappings b/terminal/org.eclipse.tm.terminal.ssh/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/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/terminal/org.eclipse.tm.terminal.ssh/about.properties b/terminal/org.eclipse.tm.terminal.ssh/about.properties
deleted file mode 100644
index b4eb8f46c..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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 SSH Connector\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Wind River Systems, Inc. and others 2000, 2009. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm
diff --git a/terminal/org.eclipse.tm.terminal.ssh/build.properties b/terminal/org.eclipse.tm.terminal.ssh/build.properties
deleted file mode 100644
index cf1dcd3d2..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/build.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 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) - fixed copyright headers and beautified
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- plugin.properties,\
- about.html,about.ini,about.mappings,about.properties,\
- dsdp32.png
-src.includes = about.html
diff --git a/terminal/org.eclipse.tm.terminal.ssh/dsdp32.png b/terminal/org.eclipse.tm.terminal.ssh/dsdp32.png
deleted file mode 100644
index 3077b1220..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/dsdp32.png
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.ssh/plugin.properties b/terminal/org.eclipse.tm.terminal.ssh/plugin.properties
deleted file mode 100644
index 251b02faf..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 Wind River Systems, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Martin Oberhuber (Wind River) - initial API and implementation
-###############################################################################
-pluginName = Target Management Terminal SSH Connector
-providerName = Eclipse.org - DSDP
-sshConnection = SSH \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.ssh/plugin.xml b/terminal/org.eclipse.tm.terminal.ssh/plugin.xml
deleted file mode 100644
index f6f2a6f5b..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/plugin.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<!--
-# Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Michael Scharf (Wind River) - initial API and implementation
-# Martin Oberhuber (Wind River) - fixed copyright headers and beautified
--->
-<plugin>
- <extension
- point="org.eclipse.tm.terminal.terminalConnectors">
- <connector name="%sshConnection"
- id="org.eclipse.tm.internal.terminal.ssh.SshConnector"
- class="org.eclipse.tm.internal.terminal.ssh.SshConnector"/>
- </extension>
-
-</plugin>
diff --git a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/Activator.java b/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/Activator.java
deleted file mode 100644
index 09dbc26c6..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/Activator.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Martin Oberhuber (Wind River) - initial API and implementation
- * Martin Oberhuber (Wind River) - [175686] Adapted to new IJSchService API
- * - copied code from org.eclipse.team.cvs.ssh2/CVSSSH2Plugin (Copyright IBM)
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.ssh;
-
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jsch.core.IJSchService;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-import org.osgi.util.tracker.ServiceTracker;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends Plugin {
-
- public static final String PLUGIN_ID = "org.eclipse.tm.terminal.ssh"; //$NON-NLS-1$
- private static Activator plugin;
-
- // ServiceTracker for IJschService
- private ServiceTracker tracker;
-
- /**
- * The constructor
- */
- public Activator() {
- super();
- plugin = this;
- }
-
- //---------------------------------------------------------------------------
- //<copied code from org.eclipse.team.cvs.ssh2/CVSSSH2Plugin (Copyright IBM)>
- //---------------------------------------------------------------------------
-
- public void start(BundleContext context) throws Exception {
- super.start(context);
- tracker = new ServiceTracker(getBundle().getBundleContext(), IJSchService.class.getName(), null);
- tracker.open();
- }
-
- public void stop(BundleContext context) throws Exception {
- try {
- SshConnection.shutdown();
- tracker.close();
- } finally {
- plugin = null;
- super.stop(context);
- }
- }
-
- /**
- * Returns an instance of IJSchService from the OSGi Registry.
- * @return An instance of IJSchService, or <code>null</code> if no
- * IJschService service is available.
- */
- public IJSchService getJSchService() {
- return (IJSchService)tracker.getService();
- }
-
- //---------------------------------------------------------------------------
- //</copied code from org.eclipse.team.cvs.ssh2/CVSSSH2Plugin (Copyright IBM)>
- //---------------------------------------------------------------------------
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path.
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/ISshConstants.java b/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/ISshConstants.java
deleted file mode 100644
index 0638da25c..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/ISshConstants.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 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
- * Martin Oberhuber (Wind River) - extracted from various team.cvs plugins
- * Martin Oberhuber (Wind River) - [175686] Adapted to new IJSchService API
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.ssh;
-
-
-/**
- * Defines the constants used by the terminal.ssh Plugin
- */
-public interface ISshConstants {
-
- // These are from cvs.ui.IHelpContextIds
- public static final String CVSUIPREFIX = "org.eclipse.team.cvs.ui."; //$NON-NLS-1$
- public static final String HELP_USER_VALIDATION_DIALOG = CVSUIPREFIX + "user_validation_dialog_context"; //$NON-NLS-1$
- public static final String HELP_KEYBOARD_INTERACTIVE_DIALOG = CVSUIPREFIX + "keyboard_interactive_dialog_context"; //$NON-NLS-1$
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/ISshSettings.java b/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/ISshSettings.java
deleted file mode 100644
index 4c389be56..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/ISshSettings.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Michael Scharf (Wind River) - initial API and implementation
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- * Johnson Ma (Wind River) - [218880] Add UI setting for ssh keepalives
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.ssh;
-
-import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
-
-public interface ISshSettings {
- /**
- * Get the host name or IP address of remote system to connect.
- * @return host name or IP address of the remote system.
- */
- String getHost();
-
- /**
- * Get the login name for connecting to the remote system.
- * @return remote login name
- */
- String getUser();
-
- /**
- * Get the password for connecting to the remote system.
- * May be empty if connecting via SSH public key authentication
- * (with or without passphrase).
- * @return password to use
- */
- String getPassword();
-
- /**
- * Get the timeout (in seconds) after which the SSH connection is assumed dead.
- * @return timeout (in seconds) for the SSH connection.
- */
- int getTimeout();
-
- /**
- * Get the keepalive interval (in seconds).
- * After this time of inactivity, the SSH connector will send a message to the
- * remote system in order to avoid timeouts on the remote. A maximum of 6
- * keepalive messages will be sent if enabled. When set to 0, the keepalive
- * feature is disabled.
- * @return interval (in seconds) for keepalive messages.
- */
- int getKeepalive();
-
- /**
- * Get the TCP/IP port on the remote system to use.
- * @return TCP/IP port on the remote system to use.
- */
- int getPort();
-
- /**
- * Return a human-readable String summarizing all relevant connection data.
- * This String can be displayed in the Terminal caption, for instance.
- * @return a human-readable String summarizing relevant connection data.
- */
- String getSummary();
-
- /**
- * Load connection data from a settings store.
- * @param store the settings store to access.
- */
- void load(ISettingsStore store);
-
- /**
- * Store connection data into a settings store.
- * @param store the settings store to access.
- */
- void save(ISettingsStore store);
-}
diff --git a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/KeyboardInteractiveDialog.java b/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/KeyboardInteractiveDialog.java
deleted file mode 100644
index 4b64189af..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/KeyboardInteractiveDialog.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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:
- * Atsuhiko Yamanaka, JCraft,Inc. - initial API and implementation.
- * IBM Corporation - ongoing maintenance
- * Martin Oberhuber (Wind River) - copied and adapted from team.cvs.ui
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.ssh;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.TrayDialog;
-import org.eclipse.jface.window.Window;
-import org.eclipse.osgi.util.NLS;
-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.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * A dialog for keyboad-interactive authentication for the ssh2 connection.
- */
-public class KeyboardInteractiveDialog extends TrayDialog {
- // widgets
- private Text[] texts;
-
- protected String domain;
- protected String destination;
- protected String name;
- protected String instruction;
- protected String lang;
- protected String[] prompt;
- protected boolean[] echo;
- private String message;
- private String[] result;
-
- /**
- * Creates a nwe KeyboardInteractiveDialog.
- *
- * @param parentShell the parent shell
- * @param connectionId an id for the connection
- * @param destination the location
- * @param name the name
- * @param instruction the instruction
- * @param prompt the titles for textfields
- * @param echo '*' should be used or not
- */
- public KeyboardInteractiveDialog(Shell parentShell,
- String connectionId,
- String destination,
- String name,
- String instruction,
- String[] prompt,
- boolean[] echo){
- super(parentShell);
- this.domain=connectionId;
- this.destination=destination;
- this.name=name;
- this.instruction=instruction;
- this.prompt=prompt;
- this.echo=echo;
- this.message=NLS.bind(SshMessages.KeyboardInteractiveDialog_message, new String[] { destination+(name!=null && name.length()>0 ? ": "+name : "") }); //NON-NLS-1$ //$NON-NLS-1$ //$NON-NLS-2$
- }
- /**
- * @see Window#configureShell
- */
- protected void configureShell(Shell newShell) {
- super.configureShell(newShell);
- newShell.setText(message);
- }
- /**
- * @see Window#create
- */
- public void create() {
- super.create();
- if(texts.length>0){
- texts[0].setFocus();
- }
- }
- /**
- * @see Dialog#createDialogArea
- */
- protected Control createDialogArea(Composite parent) {
- Composite main=new Composite(parent, SWT.NONE);
- GridLayout layout=new GridLayout();
- layout.numColumns=3;
- main.setLayout(layout);
- main.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- // set F1 help
- PlatformUI.getWorkbench().getHelpSystem().setHelp(main, ISshConstants.HELP_KEYBOARD_INTERACTIVE_DIALOG);
-
- if (message!=null) {
- Label messageLabel=new Label(main, SWT.WRAP);
- messageLabel.setText(message);
- GridData data=new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan=3;
- messageLabel.setLayoutData(data);
- }
- if(domain!=null){
- Label label = new Label(main, SWT.WRAP);
- label.setText(NLS.bind(SshMessages.KeyboardInteractiveDialog_labelConnection, new String[] { domain }));
- GridData data=new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan=3;
- label.setLayoutData(data);
- }
- if (instruction!=null && instruction.length()>0) {
- Label messageLabel=new Label(main, SWT.WRAP);
- messageLabel.setText(instruction);
- GridData data=new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan=3;
- messageLabel.setLayoutData(data);
- }
- createPasswordFields(main);
- return main;
- }
- /**
- * Creates the widgets that represent the entry area.
- *
- * @param parent the parent of the widgets
- */
- protected void createPasswordFields(Composite parent) {
- texts=new Text[prompt.length];
-
- for(int i=0; i<prompt.length; i++){
- new Label(parent, SWT.NONE).setText(prompt[i]);
- texts[i]=new Text(parent, SWT.BORDER);
- GridData data=new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint=convertHorizontalDLUsToPixels(IDialogConstants.ENTRY_FIELD_WIDTH);
- texts[i].setLayoutData(data);
-
- if(!echo[i]){
- texts[i].setEchoChar('*');
- }
- new Label(parent, SWT.NONE);
- }
-
- }
- /**
- * Returns the entered values, or null
- * if the user cancelled.
- *
- * @return the entered values
- */
- public String[] getResult() {
- return result;
- }
- /**
- * Notifies that the ok button of this dialog has been pressed.
- * <p>
- * The default implementation of this framework method sets
- * this dialog's return code to <code>Window.OK</code>
- * and closes the dialog. Subclasses may override.
- * </p>
- */
- protected void okPressed() {
- result=new String[prompt.length];
- for(int i=0; i<texts.length; i++){
- result[i]=texts[i].getText();
- }
- super.okPressed();
- }
- /**
- * Notifies that the cancel button of this dialog has been pressed.
- * <p>
- * The default implementation of this framework method sets
- * this dialog's return code to <code>Window.CANCEL</code>
- * and closes the dialog. Subclasses may override.
- * </p>
- */
- protected void cancelPressed() {
- result=null;
- super.cancelPressed();
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshConnection.java b/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshConnection.java
deleted file mode 100644
index 38d9608cb..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshConnection.java
+++ /dev/null
@@ -1,364 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Michael Scharf (Wind River) - initial API and implementation
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- * Martin Oberhuber (Wind River) - [175686] Adapted to new IJSchService API
- * - copied code from org.eclipse.team.cvs.ssh2/JSchSession (Copyright IBM)
- * Martin Oberhuber (Wind River) - [198790] make SSH createSession() protected
- * Mikhail Kalugin <fourdman@xored.com> - [201864] Fix Terminal SSH keyboard interactive authentication
- * Martin Oberhuber (Wind River) - [155026] Add keepalives for SSH connection
- * Johnson Ma (Wind River) - [218880] Add UI setting for ssh keepalives
- * Martin Oberhuber (Wind River) - [225792] Rename SshConnector.getTelnetSettings() to getSshSettings()
- * Martin Oberhuber (Wind River) - [168197] Replace JFace MessagDialog by SWT MessageBox
- * Martin Oberhuber (Wind River) - [205674][ssh] Terminal remains "connecting" when authentication is cancelled
- * Michael Scharf (Wind River) - 240420: [terminal][ssh]Channel is not closed when the connection is closed with the close button
- * Martin Oberhuber (Wind River) - [206919] Improve SSH Terminal Error Reporting
- * Andrei Sobolev (Xored) - [250456] Ssh banner message causes IllegalArgumentException popup
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.ssh;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InterruptedIOException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.jface.window.Window;
-import org.eclipse.jsch.core.IJSchService;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.MessageBox;
-import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl;
-import org.eclipse.tm.internal.terminal.provisional.api.Logger;
-import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
-
-import com.jcraft.jsch.ChannelShell;
-import com.jcraft.jsch.JSchException;
-import com.jcraft.jsch.Session;
-import com.jcraft.jsch.UIKeyboardInteractive;
-import com.jcraft.jsch.UserInfo;
-
-class SshConnection extends Thread {
- private static int fgNo;
- private final ITerminalControl fControl;
- private final SshConnector fConn;
- private Session fSession;
- private boolean fDisconnectHasBeenCalled;
- protected SshConnection(SshConnector conn,ITerminalControl control) {
- super("SshConnection-"+fgNo++); //$NON-NLS-1$
- fControl = control;
- fConn = conn;
- fControl.setState(TerminalState.CONNECTING);
- }
-
- //----------------------------------------------------------------------
- // <copied code from org.eclipse.team.cvs.ssh2/JSchSession (Copyright IBM)>
- //----------------------------------------------------------------------
-
- /**
- * Create a Jsch session.
- * Subclasses can override in order to replace the UserInfo wrapper
- * (for non-interactive usage, for instance), or in order to change
- * the Jsch config (for instance, in order to switch off strict
- * host key checking or in order to add specific ciphers).
- */
- protected Session createSession(String username, String password, String hostname, int port, UserInfo wrapperUI, IProgressMonitor monitor) throws JSchException {
- IJSchService service = Activator.getDefault().getJSchService();
- if (service == null)
- return null;
- Session session = service.createSession(hostname, port, username);
- //session.setTimeout(getSshTimeoutInMillis());
- session.setTimeout(0); //never time out on the session
- session.setServerAliveCountMax(6); //give up after 6 tries (remote will be dead after 30 min)
- if (password != null)
- session.setPassword(password);
- session.setUserInfo(wrapperUI);
- return session;
- }
-
- static void shutdown() {
- //TODO: Store all Jsch sessions in a pool and disconnect them on shutdown
- }
-
- //----------------------------------------------------------------------
- // </copied code from org.eclipse.team.cvs.ssh2/JSchSession (Copyright IBM)>
- //----------------------------------------------------------------------
-
- public void run() {
- boolean connectSucceeded = false;
- String host = ""; //$NON-NLS-1$
- int port = 22;
- try {
- int nTimeout = fConn.getSshSettings().getTimeout() * 1000;
- int nKeepalive = fConn.getSshSettings().getKeepalive() * 1000;
- host = fConn.getSshSettings().getHost();
- String user = fConn.getSshSettings().getUser();
- String password = fConn.getSshSettings().getPassword();
- port = fConn.getSshSettings().getPort();
-
- ////Giving a connectionId could be the index into a local
- ////Store where passwords are stored
- //String connectionId = host;
- //if (port!=22) {
- // connectionId += ':' + port;
- //}
- //UserInfo ui=new MyUserInfo(connectionId, user, password);
- UserInfo ui=new MyUserInfo(null, user, password);
-
- Session session = createSession(user, password, host, port,
- ui, new NullProgressMonitor());
- synchronized (this) {
- fSession = session;
- }
-
- //java.util.Hashtable config=new java.util.Hashtable();
- //config.put("StrictHostKeyChecking", "no");
- //session.setConfig(config);
- //ui.aboutToConnect();
- if (nKeepalive > 0) {
- session.setServerAliveInterval(nKeepalive); //default is 5 minutes
- }
- // dont try to connect if disconnect has been requested already
- synchronized (this) {
- if (fDisconnectHasBeenCalled)
- return;
- }
-
- session.connect(nTimeout); // making connection with timeout.
- // if we got disconnected, do not continue
- if(!isSessionConnected())
- return;
- ChannelShell channel=(ChannelShell) session.openChannel("shell"); //$NON-NLS-1$
- channel.setPtyType("ansi"); //$NON-NLS-1$
- channel.connect();
-
- // maybe the terminal was disconnected while we were connecting
- if (isSessionConnected() && channel.isConnected()) {
- connectSucceeded = true;
- fConn.setInputStream(channel.getInputStream());
- fConn.setOutputStream(channel.getOutputStream());
- fConn.setChannel(channel);
- fControl.setState(TerminalState.CONNECTED);
- try {
- // read data until the connection gets terminated
- readDataForever(fConn.getInputStream());
- } catch (InterruptedIOException e) {
- // we got interrupted: we are done...
- }
- }
- } catch (Exception e) {
- Throwable cause = e;
- while (cause.getCause() != null) {
- cause = cause.getCause();
- }
- String origMsg = cause.getMessage();
- String msg = SshMessages.getMessageFor(cause);
- if ((cause instanceof JSchException) && origMsg != null && origMsg.startsWith("Auth")) { //$NON-NLS-1$
- if (origMsg.indexOf("cancel") >= 0) { //$NON-NLS-1$
- msg = SshMessages.SSH_AUTH_CANCEL;
- } else if (origMsg.indexOf("fail") >= 0) { //$NON-NLS-1$
- msg = SshMessages.SSH_AUTH_FAIL;
- }
- }
- if (!connectSucceeded) {
- String hostPort = host;
- if (port != 22) {
- hostPort = hostPort + ':' + port;
- }
- msg = NLS.bind(SshMessages.ERROR_CONNECTING, hostPort, msg);
- }
- connectFailed(msg, msg);
- } finally {
- // make sure the terminal is disconnected when the thread ends
- try {
- disconnect();
- } finally {
- // when reading is done, we set the state to closed
- fControl.setState(TerminalState.CLOSED);
- }
- }
- }
-
- private synchronized boolean isSessionConnected() {
- return !fDisconnectHasBeenCalled && fSession != null && fSession.isConnected();
- }
-
- /**
- * disconnect the ssh session
- */
- void disconnect() {
- interrupt();
- synchronized (this) {
- fDisconnectHasBeenCalled=true;
- if(fSession!=null) {
- try {
- fSession.disconnect();
- } catch (Exception e) {
- // Ignore NPE due to bug in JSch if disconnecting
- // while not yet authenticated
- }
- fSession=null;
- }
- }
- }
- /**
- * Read the data from the ssh connection and display it in the terminal.
- * @param in
- * @throws IOException
- */
- private void readDataForever(InputStream in) throws IOException {
- // read the data
- byte bytes[]=new byte[32*1024];
- int n;
- // read until the thread gets interrupted....
- while( (n=in.read(bytes))!=-1) {
- fControl.getRemoteToTerminalOutputStream().write(bytes,0,n);
- }
- }
-
- protected static Display getStandardDisplay() {
- Display display = Display.getCurrent();
- if( display==null ) {
- display = Display.getDefault();
- }
- return display;
- }
-
- private class MyUserInfo implements UserInfo, UIKeyboardInteractive {
- private final String fConnectionId;
- private final String fUser;
- private String fPassword;
- private String fPassphrase;
- private int fAttemptCount;
-
- public MyUserInfo(String connectionId, String user, String password) {
- fConnectionId = connectionId;
- fUser = user;
- fPassword = password;
- }
- public String getPassword() {
- return fPassword;
- }
- public boolean promptYesNo(final String str) {
- //need to switch to UI thread for prompting
- final boolean[] retval = new boolean[1];
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- // [168197] Replace JFace MessagDialog by SWT MessageBox
- //retval[0] = MessageDialog.openQuestion(null, SshMessages.WARNING, str);
- if (isSessionConnected()) {
- MessageBox mb = new MessageBox(fControl.getShell(), SWT.ICON_QUESTION | SWT.YES | SWT.NO);
- mb.setText(SshMessages.WARNING);
- mb.setMessage(str);
- retval[0] = (mb.open() == SWT.YES);
- } else {
- retval[0] = false;
- }
- }
- });
- return retval[0];
- }
- private String promptSecret(final String message) {
- final String[] retval = new String[1];
- getStandardDisplay().syncExec(new Runnable() {
- public void run() {
- if (isSessionConnected()) {
- UserValidationDialog uvd = new UserValidationDialog(null, fConnectionId, fUser, message);
- uvd.setUsernameMutable(false);
- if (uvd.open() == Window.OK) {
- retval[0] = uvd.getPassword();
- } else {
- retval[0] = null;
- }
- } else {
- retval[0] = null;
- }
- }
- });
- return retval[0];
- }
- public String getPassphrase() {
- return fPassphrase;
- }
- public boolean promptPassphrase(String message) {
- fPassphrase = promptSecret(message);
- return (fPassphrase!=null);
- }
- public boolean promptPassword(final String message) {
- String _password = promptSecret(message);
- if (_password!=null) {
- fPassword=_password;
- return true;
- }
- return false;
- }
- public void showMessage(final String message) {
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- // [168197] Replace JFace MessagDialog by SWT MessageBox
- // MessageDialog.openInformation(null, SshMessages.INFO, message);
- if (isSessionConnected()) {
- MessageBox mb = new MessageBox(fControl.getShell(), SWT.ICON_INFORMATION | SWT.OK);
- mb.setText(SshMessages.INFO);
- mb.setMessage(message);
- mb.open();
- }
- }
- });
- }
- public String[] promptKeyboardInteractive(final String destination,
- final String name, final String instruction,
- final String[] prompt, final boolean[] echo)
- {
- if (prompt.length == 0) {
- // No need to prompt, just return an empty String array
- return new String[0];
- }
- try{
- if (fAttemptCount == 0 && fPassword != null && prompt.length == 1 && prompt[0].trim().equalsIgnoreCase("password:")) { //$NON-NLS-1$
- // Return the provided password the first time but always prompt on subsequent tries
- fAttemptCount++;
- return new String[] { fPassword };
- }
- final String[][] finResult = new String[1][];
- getStandardDisplay().syncExec(new Runnable() {
- public void run() {
- if (isSessionConnected()) {
- KeyboardInteractiveDialog dialog = new KeyboardInteractiveDialog(null, fConnectionId, destination, name, instruction, prompt, echo);
- dialog.open();
- finResult[0] = dialog.getResult();
- } else {
- finResult[0] = null; // indicate cancel to JSch
- }
- }
- });
- String[] result=finResult[0];
- if (result == null)
- return null; // cancelled
- if (result.length == 1 && prompt.length == 1 && prompt[0].trim().equalsIgnoreCase("password:")) { //$NON-NLS-1$
- fPassword = result[0];
- }
- fAttemptCount++;
- return result;
- }
- catch(OperationCanceledException e){
- return null;
- }
- }
- }
-
- private void connectFailed(String terminalText, String msg) {
- Logger.log(terminalText);
- fControl.displayTextInTerminal(terminalText);
- // fControl.setMsg(msg);
- }
-
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshConnector.java b/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshConnector.java
deleted file mode 100644
index 0ebfb5968..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshConnector.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Michael Scharf (Wind River) - initial API and implementation
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- * Martin Oberhuber (Wind River) - [225792] Rename SshConnector.getTelnetSettings() to getSshSettings()
- * Martin Oberhuber (Wind River) - [225853][api] Provide more default functionality in TerminalConnectorImpl
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.ssh;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage;
-import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
-import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl;
-import org.eclipse.tm.internal.terminal.provisional.api.Logger;
-import org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl;
-
-import com.jcraft.jsch.ChannelShell;
-import com.jcraft.jsch.JSch;
-
-public class SshConnector extends TerminalConnectorImpl {
- private OutputStream fOutputStream;
- private InputStream fInputStream;
- private JSch fJsch;
- private ChannelShell fChannel;
- private SshConnection fConnection;
- private final SshSettings fSettings;
- private int fWidth;
- private int fHeight;
- public SshConnector() {
- this(new SshSettings());
- }
- public SshConnector(SshSettings settings) {
- fSettings=settings;
- }
- public void initialize() throws Exception {
- fJsch=new JSch();
- }
- public void connect(ITerminalControl control) {
- super.connect(control);
- fConnection = new SshConnection(this,control);
- fConnection.start();
- }
- synchronized public void doDisconnect() {
- fConnection.disconnect();
- if (getInputStream() != null) {
- try {
- getInputStream().close();
- } catch (Exception exception) {
- Logger.logException(exception);
- }
- }
-
- if (getTerminalToRemoteStream() != null) {
- try {
- getTerminalToRemoteStream().close();
- } catch (Exception exception) {
- Logger.logException(exception);
- }
- }
- }
- public void setTerminalSize(int newWidth, int newHeight) {
- if(fChannel!=null && (newWidth!=fWidth || newHeight!=fHeight)) {
- //avoid excessive communications due to change size requests by caching previous size
- fChannel.setPtySize(newWidth, newHeight, 8*newWidth, 8*newHeight);
- fWidth=newWidth;
- fHeight=newHeight;
- }
- }
- public InputStream getInputStream() {
- return fInputStream;
- }
- public OutputStream getTerminalToRemoteStream() {
- return fOutputStream;
- }
- void setInputStream(InputStream inputStream) {
- fInputStream = inputStream;
- }
- void setOutputStream(OutputStream outputStream) {
- fOutputStream = outputStream;
- }
- /**
- * Return the SSH Settings.
- *
- * @return the settings for a concrete connection.
- * @since org.eclipse.tm.terminal.ssh 2.0 renamed from getTelnetSettings()
- */
- public ISshSettings getSshSettings() {
- return fSettings;
- }
- public ISettingsPage makeSettingsPage() {
- return new SshSettingsPage(fSettings);
- }
- public String getSettingsSummary() {
- return fSettings.getSummary();
- }
- public void load(ISettingsStore store) {
- fSettings.load(store);
- }
- public void save(ISettingsStore store) {
- fSettings.save(store);
- }
- protected JSch getJsch() {
- return fJsch;
- }
- ChannelShell getChannel() {
- return fChannel;
- }
- void setChannel(ChannelShell channel) {
- fChannel = channel;
- fWidth=-1;
- fHeight=-1;
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshMessages.java b/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshMessages.java
deleted file mode 100644
index 85a1a0fd1..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshMessages.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Michael Scharf (Wind River) - initial API and implementation
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- * Johnson Ma (Wind River) - [218880] Add UI setting for ssh keepalives
- * Martin Oberhuber (Wind River) - [206919] Improve SSH Terminal Error Reporting (Adopting code from org.eclipse.team.cvs.core)
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.ssh;
-
-import java.lang.reflect.Field;
-
-import org.eclipse.osgi.util.NLS;
-
-public class SshMessages extends NLS {
- static {
- NLS.initializeMessages(SshMessages.class.getName(), SshMessages.class);
- }
- public static String USER;
- public static String HOST;
- public static String PORT;
- public static String PASSWORD;
- public static String TIMEOUT;
- public static String KEEPALIVE;
- public static String KEEPALIVE_Tooltip;
- public static String WARNING;
- public static String INFO;
-
- //These are from org.eclipse.team.cvs.ui.CVSUIMessages
- public static String UserValidationDialog_required;
- public static String UserValidationDialog_labelUser;
- public static String UserValidationDialog_labelPassword;
- public static String UserValidationDialog_password;
- public static String UserValidationDialog_user;
- public static String UserValidationDialog_5;
- public static String UserValidationDialog_6;
- public static String UserValidationDialog_7;
-
- public static String KeyboardInteractiveDialog_message;
- public static String KeyboardInteractiveDialog_labelConnection;
-
- public static String ERROR_CONNECTING;
- public static String TerminalCommunicationException_io;
- public static String SSH_AUTH_CANCEL;
- public static String SSH_AUTH_FAIL;
- public static String com_jcraft_jsch_JSchException;
- public static String java_io_IOException;
- public static String java_io_EOFException;
- public static String java_io_InterruptedIOException;
- public static String java_net_UnknownHostException;
- public static String java_net_ConnectException;
- public static String java_net_SocketException;
- public static String java_net_NoRouteToHostException;
-
- // <Copied from org.eclipse.team.cvs.core / CVSCommunicationException (c) IBM 2000, 2007>
-
- public static String getMessageFor(Throwable throwable) {
- String message = getMessage(getMessageKey(throwable));
- if (message == null) {
- message = NLS.bind(SshMessages.TerminalCommunicationException_io, (new Object[] { throwable.toString() }));
- } else {
- message = NLS.bind(message, (new Object[] { throwable.getMessage() }));
- }
- return message;
- }
-
- private static String getMessageKey(Throwable t) {
- String name = t.getClass().getName();
- name = name.replace('.', '_');
- return name;
- }
-
- // </Copied from org.eclipse.team.cvs.core / CVSCommunicationException>
- // <Copied from org.eclipse.team.cvs.core / Policy (c) IBM 2000, 2005>
-
- public static String getMessage(String key) {
- try {
- Field f = SshMessages.class.getDeclaredField(key);
- Object o = f.get(null);
- if (o instanceof String)
- return (String) o;
- } catch (SecurityException e) {
- } catch (NoSuchFieldException e) {
- } catch (IllegalArgumentException e) {
- } catch (IllegalAccessException e) {
- }
- return null;
- }
-
- // </Copied from org.eclipse.team.cvs.core / Policy>
-
- }
diff --git a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshMessages.properties b/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshMessages.properties
deleted file mode 100644
index c28524f46..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshMessages.properties
+++ /dev/null
@@ -1,53 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2008 Wind River Systems, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Michael Scharf (Wind River) - initial API and implementation
-# Martin Oberhuber (Wind River) - fixed copyright headers and beautified
-# Johnson Ma (Wind River) - [218880] Add UI setting for ssh keepalives
-# Martin Oberhuber (Wind River) - [206919] Improve SSH Terminal Error Reporting (Adopting code from org.eclipse.team.cvs.core)
-###############################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-
-HOST = Host
-USER = User
-PORT = Port
-PASSWORD = Password
-TIMEOUT = Timeout (sec)
-KEEPALIVE = KeepAlive (sec)
-KEEPALIVE_Tooltip=Interval for sending keepalive messages in case of inactivity. Enter 0 to disable keepalives.
-WARNING = Warning
-INFO = Info
-
-#These are from cvs.ui/messages.properties
-UserValidationDialog_required=Password Required
-UserValidationDialog_labelUser={0}
-UserValidationDialog_labelPassword={1}
-UserValidationDialog_password=&Password:
-UserValidationDialog_user=&User name:
-UserValidationDialog_5=Connection:
-UserValidationDialog_6=&Save password
-UserValidationDialog_7=Saved passwords are stored on your computer in a file that is difficult, but not impossible, for an intruder to read.
-
-KeyboardInteractiveDialog_message=Keyboard Interactive authentication for {0}
-KeyboardInteractiveDialog_labelConnection=Enter values for the following connection: {0}
-
-#<Copied> from org.eclipse.team.cvs.core/messages.properties (c) IBM 2000, 2007
-ERROR_CONNECTING=Error connecting {0} : {1}
-TerminalCommunicationException_io=Communication error: {0}
-SSH_AUTH_CANCEL=SSH Authentication cancelled.
-SSH_AUTH_FAIL=SSH Authentication failed.
-com_jcraft_jsch_JSchException=SSH client error: {0}
-java_io_IOException=I/O exception occurred: {0}
-java_io_EOFException=End of file encountered: {0}
-java_io_InterruptedIOException=I/O has been interrupted.
-java_net_UnknownHostException=Cannot locate host: {0}
-java_net_ConnectException=Cannot connect to host: {0}
-java_net_SocketException=Socket Exception: {0}
-java_net_NoRouteToHostException={0}
-#</Copied> from org.eclipse.team.cvs.core
diff --git a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshSettings.java b/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshSettings.java
deleted file mode 100644
index 3aa995368..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshSettings.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Michael Scharf (Wind River) - initial API and implementation
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- * Mikhail Kalugin <fourdman@xored.com> - [201867] Improve Terminal SSH connection summary string
- * Johnson Ma (Wind River) - [218880] Add UI setting for ssh keepalives
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.ssh;
-
-import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
-
-public class SshSettings implements ISshSettings {
- protected String fHost;
- protected String fUser;
- protected String fPassword;
- protected String fPort;
- protected String fTimeout;
- protected String fKeepalive;
- public String getHost() {
- return fHost;
- }
-
- public void setHost(String strHost) {
- fHost = strHost;
- }
-
- public String getSummary() {
- String settings = getUser()+'@'+getHost();
- if(getPort()!=22) {
- settings += ':' + getPort();
- }
- return settings;
- }
-
- public void load(ISettingsStore store) {
- fHost = store.get("Host");//$NON-NLS-1$
- fUser = store.get("User");//$NON-NLS-1$
- fPort = store.get("Port");//$NON-NLS-1$
- fTimeout = store.get("Timeout");//$NON-NLS-1$
- fKeepalive = store.get("Keepalive");//$NON-NLS-1$
- }
-
-
- public void save(ISettingsStore store) {
- store.put("Host", fHost);//$NON-NLS-1$
- store.put("User", fUser);//$NON-NLS-1$
- store.put("Port", fPort);//$NON-NLS-1$
- store.put("Timeout", fTimeout);//$NON-NLS-1$
- store.put("Keepalive", fKeepalive);//$NON-NLS-1$
- }
-
-
- public int getTimeout() {
- try {
- return Integer.parseInt(fTimeout);
- } catch (NumberFormatException numberFormatException) {
- return 10;
- }
- }
- public String getTimeoutString() {
- return fTimeout;
- }
-
- public void setTimeout(String timeout) {
- fTimeout = timeout;
- }
-
- public int getKeepalive() {
- try {
- return Integer.parseInt(fKeepalive);
- } catch (NumberFormatException numberFormatException) {
- return 300;
- }
- }
- public String getKeepaliveString() {
- return fKeepalive;
- }
-
- public void setKeepalive(String keepalive) {
- fKeepalive = keepalive;
- }
-
- public String getUser() {
- return fUser;
- }
-
- public void setUser(String user) {
- fUser = user;
- }
- public int getPort() {
- try {
- return Integer.parseInt(fPort);
- } catch (NumberFormatException numberFormatException) {
- return 22;
- }
- }
-
- public String getPortString() {
- return fPort;
- }
-
- public void setPort(String port) {
- fPort = port;
- }
-
- public String getPassword() {
- return fPassword;
- }
-
- public void setPassword(String password) {
- fPassword = password;
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshSettingsPage.java b/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshSettingsPage.java
deleted file mode 100644
index bf21bc467..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/SshSettingsPage.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Michael Scharf (Wind River) - initial API and implementation
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- * Johnson Ma (Wind River) - [218880] Add UI setting for ssh keepalives
- * Martin Oberhuber (Wind River) - [206917] Add validation for Terminal Settings
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.ssh;
-
-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.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage;
-
-public class SshSettingsPage implements ISettingsPage {
- private Text fHostText;
- private Text fUser;
- private Text fTimeout;
- private Text fKeepalive;
- private final SshSettings fTerminalSettings;
- private Text fPort;
- private Text fPassword;
-
- public SshSettingsPage(SshSettings settings) {
- fTerminalSettings=settings;
- }
- public void saveSettings() {
- fTerminalSettings.setHost(fHostText.getText());
- fTerminalSettings.setUser(fUser.getText());
- fTerminalSettings.setPassword(fPassword.getText());
- fTerminalSettings.setPort(fPort.getText());
- fTerminalSettings.setTimeout(fTimeout.getText());
- fTerminalSettings.setKeepalive(fKeepalive.getText());
- }
-
- public void loadSettings() {
- if(fTerminalSettings!=null) {
- fHostText.setText(get(fTerminalSettings.getHost(),""));//$NON-NLS-1$
- fTimeout.setText(get(fTerminalSettings.getTimeoutString(),"0"));//$NON-NLS-1$
- fKeepalive.setText(get(fTerminalSettings.getKeepaliveString(),"300"));//$NON-NLS-1$
- fUser.setText(get(fTerminalSettings.getUser(),""));//$NON-NLS-1$
- fPort.setText(get(fTerminalSettings.getPortString(),"22"));//$NON-NLS-1$
- fPassword.setText(get(fTerminalSettings.getPassword(),""));//$NON-NLS-1$
- }
- }
- String get(String value, String def) {
- if(value==null || value.length()==0)
- return def;
- return value;
- }
- public boolean validateSettings() {
- if (fHostText.getText().trim().length() == 0) {
- return false;
- }
- if (fUser.getText().trim().length() == 0) {
- return false;
- }
- try {
- int p = Integer.parseInt(fPort.getText().trim());
- if (p <= 0 || p > 65535) {
- return false;
- }
- p = Integer.parseInt(fTimeout.getText().trim());
- if (p < 0) {
- return false;
- }
- p = Integer.parseInt(fKeepalive.getText().trim());
- if (p < 0) {
- return false;
- }
- } catch (Exception e) {
- return false;
- }
- return true;
- }
- public void createControl(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout gridLayout = new GridLayout(2, false);
- GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
-
- composite.setLayout(gridLayout);
- composite.setLayoutData(gridData);
-
- fHostText = createTextField(composite, SshMessages.HOST);
- fUser = createTextField(composite, SshMessages.USER);
- fPassword = createTextField(composite, SshMessages.PASSWORD,SWT.PASSWORD);
- fTimeout = createTextField(composite, SshMessages.TIMEOUT);
- fKeepalive = createTextField(composite, SshMessages.KEEPALIVE);
- fKeepalive.setToolTipText(SshMessages.KEEPALIVE_Tooltip);
- fPort = createTextField(composite, SshMessages.PORT);
- loadSettings();
- }
- private Text createTextField(Composite composite, String labelTxt, int textOptions) {
- GridData gridData;
- // Add label
- Label ctlLabel = new Label(composite, SWT.RIGHT);
- ctlLabel.setText(labelTxt + ":"); //$NON-NLS-1$
-
- // Add control
- gridData = new GridData(GridData.FILL_HORIZONTAL);
- Text text= new Text(composite, SWT.BORDER | textOptions);
- text.setLayoutData(gridData);
- return text;
- }
- private Text createTextField(Composite composite, String labelTxt) {
- return createTextField(composite, labelTxt, 0);
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/UserValidationDialog.java b/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/UserValidationDialog.java
deleted file mode 100644
index c7c05c040..000000000
--- a/terminal/org.eclipse.tm.terminal.ssh/src/org/eclipse/tm/internal/terminal/ssh/UserValidationDialog.java
+++ /dev/null
@@ -1,277 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Martin Oberhuber (Wind River) - copied from org.eclipse.team.cvs.ui
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.ssh;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.TrayDialog;
-import org.eclipse.jface.window.Window;
-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.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * A dialog for prompting for a username and password
- */
-public class UserValidationDialog extends TrayDialog {
- // widgets
- protected Text usernameField;
- protected Text passwordField;
- protected Button allowCachingButton;
-
- protected String domain;
- protected String defaultUsername;
- protected String password = null;
- protected boolean allowCaching = false;
- protected Image keyLockImage;
-
- // whether or not the username can be changed
- protected boolean isUsernameMutable = true;
- protected String username = null;
- protected String message = null;
-
- /**
- * Creates a new UserValidationDialog.
- *
- * @param parentShell the parent shell
- * @param location the location
- * @param defaultName the default user name
- * @param message a mesage to display to the user
- */
- public UserValidationDialog(Shell parentShell, String location, String defaultName, String message) {
- super(parentShell);
- setShellStyle(getShellStyle() | SWT.RESIZE);
- this.defaultUsername = defaultName;
- this.domain = location;
- this.message = message;
- }
- /**
- * @see Window#configureShell
- */
- protected void configureShell(Shell newShell) {
- super.configureShell(newShell);
- newShell.setText(SshMessages.UserValidationDialog_required);
- // set F1 help
- PlatformUI.getWorkbench().getHelpSystem().setHelp(newShell, ISshConstants.HELP_USER_VALIDATION_DIALOG);
- }
- /**
- * @see Window#create
- */
- public void create() {
- super.create();
- // add some default values
- usernameField.setText(defaultUsername);
-
- if (isUsernameMutable) {
- // give focus to username field
- usernameField.selectAll();
- usernameField.setFocus();
- } else {
- usernameField.setEditable(false);
- passwordField.setFocus();
- }
- }
-
- /**
- * @see Dialog#createDialogArea
- */
- protected Control createDialogArea(Composite parent) {
- Composite top = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
-
- top.setLayout(layout);
- top.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- Composite imageComposite = new Composite(top, SWT.NONE);
- layout = new GridLayout();
- imageComposite.setLayout(layout);
- imageComposite.setLayoutData(new GridData(GridData.FILL_VERTICAL));
-
- Composite main = new Composite(top, SWT.NONE);
- layout = new GridLayout();
- layout.numColumns = 3;
- main.setLayout(layout);
- main.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- Label imageLabel = new Label(imageComposite, SWT.NONE);
- //keyLockImage = TeamImages.getImageDescriptor(ITeamUIImages.IMG_KEY_LOCK).createImage();
- //imageLabel.setImage(keyLockImage);
- GridData data = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
- imageLabel.setLayoutData(data);
-
- if (message != null) {
- Label messageLabel = new Label(main, SWT.WRAP);
- messageLabel.setText(message);
- data = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
- data.horizontalSpan = 3;
- data.widthHint = 300;
- messageLabel.setLayoutData(data);
- }
- if (domain != null) {
- Label d = new Label(main, SWT.WRAP);
- d.setText(SshMessages.UserValidationDialog_5);
- data = new GridData();
- d.setLayoutData(data);
- Label label = new Label(main, SWT.WRAP);
- if (isUsernameMutable) {
- label.setText(NLS.bind(SshMessages.UserValidationDialog_labelUser, new String[] { domain }));
- } else {
- label.setText(NLS.bind(SshMessages.UserValidationDialog_labelPassword, (new Object[]{defaultUsername, domain})));
- }
- data = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
- data.horizontalSpan = 2;
- data.widthHint = 300;
- label.setLayoutData(data);
- }
- createUsernameFields(main);
- createPasswordFields(main);
-
- if(domain != null) {
- allowCachingButton = new Button(main, SWT.CHECK);
- allowCachingButton.setText(SshMessages.UserValidationDialog_6);
- data = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
- data.horizontalSpan = 3;
- allowCachingButton.setLayoutData(data);
- allowCachingButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- allowCaching = allowCachingButton.getSelection();
- }
- });
- Composite warningComposite = new Composite(main, SWT.NONE);
- layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginHeight = 0;
- layout.marginHeight = 0;
- warningComposite.setLayout(layout);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 3;
- warningComposite.setLayoutData(data);
- Label warningLabel = new Label(warningComposite, SWT.NONE);
- warningLabel.setImage(getImage(DLG_IMG_MESSAGE_WARNING));
- warningLabel.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.HORIZONTAL_ALIGN_BEGINNING));
- Label warningText = new Label(warningComposite, SWT.WRAP);
- warningText.setText(SshMessages.UserValidationDialog_7);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = 300;
- warningText.setLayoutData(data);
- }
-
- Dialog.applyDialogFont(parent);
-
- return main;
- }
-
- /**
- * Creates the three widgets that represent the password entry area.
- *
- * @param parent the parent of the widgets
- */
- protected void createPasswordFields(Composite parent) {
- new Label(parent, SWT.NONE).setText(SshMessages.UserValidationDialog_password);
-
- passwordField = new Text(parent, SWT.BORDER | SWT.PASSWORD);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.ENTRY_FIELD_WIDTH);
- passwordField.setLayoutData(data);
- }
- /**
- * Creates the three widgets that represent the user name entry area.
- *
- * @param parent the parent of the widgets
- */
- protected void createUsernameFields(Composite parent) {
- new Label(parent, SWT.NONE).setText(SshMessages.UserValidationDialog_user);
-
- usernameField = new Text(parent, SWT.BORDER);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.ENTRY_FIELD_WIDTH);
- usernameField.setLayoutData(data);
- }
-
- /**
- * Returns the password entered by the user, or null
- * if the user cancelled.
- *
- * @return the entered password
- */
- public String getPassword() {
- return password;
- }
-
- /**
- * Returns the username entered by the user, or null
- * if the user cancelled.
- *
- * @return the entered username
- */
- public String getUsername() {
- return username;
- }
-
- /**
- * Returns <code>true</code> if the save password checkbox was selected.
- * @return <code>true</code> if the save password checkbox was selected and <code>false</code>
- * otherwise.
- */
- public boolean getAllowCaching() {
- return allowCaching;
- }
-
- /**
- * Notifies that the ok button of this dialog has been pressed.
- * <p>
- * The default implementation of this framework method sets
- * this dialog's return code to <code>Window.OK</code>
- * and closes the dialog. Subclasses may override.
- * </p>
- */
- protected void okPressed() {
- password = passwordField.getText();
- username = usernameField.getText();
-
- super.okPressed();
- }
- /**
- * Sets whether or not the username field should be mutable.
- * This method must be called before create(), otherwise it
- * will be ignored.
- *
- * @param value whether the username is mutable
- */
- public void setUsernameMutable(boolean value) {
- isUsernameMutable = value;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#close()
- */
- public boolean close() {
- if(keyLockImage != null) {
- keyLockImage.dispose();
- }
- return super.close();
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.telnet-feature/.project b/terminal/org.eclipse.tm.terminal.telnet-feature/.project
deleted file mode 100644
index c78da8d1f..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.terminal.telnet-feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/terminal/org.eclipse.tm.terminal.telnet-feature/build.properties b/terminal/org.eclipse.tm.terminal.telnet-feature/build.properties
deleted file mode 100644
index f3dfb1541..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet-feature/build.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Michael Scharf (Wind River) - initial API and implementation
-################################################################################
-bin.includes = feature.xml,\
- epl-v10.html,\
- feature.properties,\
- license.html
diff --git a/terminal/org.eclipse.tm.terminal.telnet-feature/epl-v10.html b/terminal/org.eclipse.tm.terminal.telnet-feature/epl-v10.html
deleted file mode 100644
index 9321f4082..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet-feature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">where such changes and/or additions to the Program
-originate from and are distributed by that particular Contributor. A
-Contribution 'originates' from a Contributor if it was added to the
-Program by such Contributor itself or anyone acting on such
-Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in
-conjunction with the Program under their own license agreement, and (ii)
-are not derivative works of the Program.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" mean patent claims licensable by a
-Contributor which are necessarily infringed by the use or sale of its
-Contribution alone or when combined with the Program.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to reproduce, prepare derivative works
-of, publicly display, publicly perform, distribute and sublicense the
-Contribution of such Contributor, if any, and such derivative works, in
-source code and object code form.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free patent license under Licensed Patents to make, use, sell,
-offer to sell, import and otherwise transfer the Contribution of such
-Contributor, if any, in source code and object code form. This patent
-license shall apply to the combination of the Contribution and the
-Program if, at the time the Contribution is added by the Contributor,
-such addition of the Contribution causes such combination to be covered
-by the Licensed Patents. The patent license shall not apply to any other
-combinations which include the Contribution. No hardware per se is
-licensed hereunder.</p>
-
-<p class="list">c) Recipient understands that although each Contributor
-grants the licenses to its Contributions set forth herein, no assurances
-are provided by any Contributor that the Program does not infringe the
-patent or other intellectual property rights of any other entity. Each
-Contributor disclaims any liability to Recipient for claims brought by
-any other entity based on infringement of intellectual property rights
-or otherwise. As a condition to exercising the rights and licenses
-granted hereunder, each Recipient hereby assumes sole responsibility to
-secure any other intellectual property rights needed, if any. For
-example, if a third party patent license is required to allow Recipient
-to distribute the Program, it is Recipient's responsibility to acquire
-that license before distributing the Program.</p>
-
-<p class="list">d) Each Contributor represents that to its knowledge it
-has sufficient copyright rights in its Contribution, if any, to grant
-the copyright license set forth in this Agreement.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">i) effectively disclaims on behalf of all Contributors
-all warranties and conditions, express and implied, including warranties
-or conditions of title and non-infringement, and implied warranties or
-conditions of merchantability and fitness for a particular purpose;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">iv) states that source code for the Program is available
-from such Contributor, and informs licensees how to obtain it in a
-reasonable manner on or through a medium customarily used for software
-exchange.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>Each Contributor must identify itself as the originator of its
-Contribution, if any, in a manner that reasonably allows subsequent
-Recipients to identify the originator of the Contribution.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>Commercial distributors of software may accept certain
-responsibilities with respect to end users, business partners and the
-like. While this license is intended to facilitate the commercial use of
-the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create
-potential liability for other Contributors. Therefore, if a Contributor
-includes the Program in a commercial product offering, such Contributor
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-arising from claims, lawsuits and other legal actions brought by a third
-party against the Indemnified Contributor to the extent caused by the
-acts or omissions of such Commercial Contributor in connection with its
-distribution of the Program in a commercial product offering. The
-obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In
-order to qualify, an Indemnified Contributor must: a) promptly notify
-the Commercial Contributor in writing of such claim, and b) allow the
-Commercial Contributor to control, and cooperate with the Commercial
-Contributor in, the defense and any related settlement negotiations. The
-Indemnified Contributor may participate in any such claim at its own
-expense.</p>
-
-<p>For example, a Contributor might include the Program in a commercial
-product offering, Product X. That Contributor is then a Commercial
-Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance
-claims and warranties are such Commercial Contributor's responsibility
-alone. Under this section, the Commercial Contributor would have to
-defend claims against the other Contributors related to those
-performance claims and warranties, and if a court requires any other
-Contributor to pay any damages as a result, the Commercial Contributor
-must pay those damages.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
-OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
-ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
-OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and
-distributing the Program and assumes all risks associated with its
-exercise of rights under this Agreement , including but not limited to
-the risks and costs of program errors, compliance with applicable laws,
-damage to or loss of data, programs or equipment, and unavailability or
-interruption of operations.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
-NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
-WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
-DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
-HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>If any provision of this Agreement is invalid or unenforceable under
-applicable law, it shall not affect the validity or enforceability of
-the remainder of the terms of this Agreement, and without further action
-by the parties hereto, such provision shall be reformed to the minimum
-extent necessary to make such provision valid and enforceable.</p>
-
-<p>If Recipient institutes patent litigation against any entity
-(including a cross-claim or counterclaim in a lawsuit) alleging that the
-Program itself (excluding combinations of the Program with other
-software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the
-date such litigation is filed.</p>
-
-<p>All Recipient's rights under this Agreement shall terminate if it
-fails to comply with any of the material terms or conditions of this
-Agreement and does not cure such failure in a reasonable period of time
-after becoming aware of such noncompliance. If all Recipient's rights
-under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive.</p>
-
-<p>Everyone is permitted to copy and distribute copies of this
-Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The
-Agreement Steward reserves the right to publish new versions (including
-revisions) of this Agreement from time to time. No one other than the
-Agreement Steward has the right to modify this Agreement. The Eclipse
-Foundation is the initial Agreement Steward. The Eclipse Foundation may
-assign the responsibility to serve as the Agreement Steward to a
-suitable separate entity. Each new version of the Agreement will be
-given a distinguishing version number. The Program (including
-Contributions) may always be distributed subject to the version of the
-Agreement under which it was received. In addition, after a new version
-of the Agreement is published, Contributor may elect to distribute the
-Program (including its Contributions) under the new version. Except as
-expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
-rights or licenses to the intellectual property of any Contributor under
-this Agreement, whether expressly, by implication, estoppel or
-otherwise. All rights in the Program not expressly granted under this
-Agreement are reserved.</p>
-
-<p>This Agreement is governed by the laws of the State of New York and
-the intellectual property laws of the United States of America. No party
-to this Agreement will bring a legal action under this Agreement more
-than one year after the cause of action arose. Each party waives its
-rights to a jury trial in any resulting litigation.</p>
-
-</body></html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.telnet-feature/feature.properties b/terminal/org.eclipse.tm.terminal.telnet-feature/feature.properties
deleted file mode 100644
index a69e34e5e..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet-feature/feature.properties
+++ /dev/null
@@ -1,141 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 Wind River Systems, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Martin Oberhuber (Wind River) - initial API and implementation
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=Target Management Terminal Telnet Connector
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management Updates
-
-# "description" property - description of the feature
-description=A Telnet connector implementation for the Terminal.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2003, 2009 Wind River Systems, Inc. and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/terminal/org.eclipse.tm.terminal.telnet-feature/feature.xml b/terminal/org.eclipse.tm.terminal.telnet-feature/feature.xml
deleted file mode 100644
index 3df4148f4..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet-feature/feature.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?> <!-- Copyright (c) 2007, 2009 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 - initial API and implementation --> <feature
- id="org.eclipse.tm.terminal.telnet"
- label="%featureName"
- version="2.0.101.qualifier"
- provider-name="%providerName">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- <discovery label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- </url>
-
- <requires>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.tm.terminal" version="3.0.0" match="equivalent"/>
- </requires>
-
- <plugin
- id="org.eclipse.tm.terminal.telnet"
- download-size="19"
- install-size="35"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/terminal/org.eclipse.tm.terminal.telnet-feature/license.html b/terminal/org.eclipse.tm.terminal.telnet-feature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet-feature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplateFeature/epl-v10.html b/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplateFeature/epl-v10.html
deleted file mode 100644
index 9321f4082..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplateFeature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">where such changes and/or additions to the Program
-originate from and are distributed by that particular Contributor. A
-Contribution 'originates' from a Contributor if it was added to the
-Program by such Contributor itself or anyone acting on such
-Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in
-conjunction with the Program under their own license agreement, and (ii)
-are not derivative works of the Program.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" mean patent claims licensable by a
-Contributor which are necessarily infringed by the use or sale of its
-Contribution alone or when combined with the Program.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to reproduce, prepare derivative works
-of, publicly display, publicly perform, distribute and sublicense the
-Contribution of such Contributor, if any, and such derivative works, in
-source code and object code form.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free patent license under Licensed Patents to make, use, sell,
-offer to sell, import and otherwise transfer the Contribution of such
-Contributor, if any, in source code and object code form. This patent
-license shall apply to the combination of the Contribution and the
-Program if, at the time the Contribution is added by the Contributor,
-such addition of the Contribution causes such combination to be covered
-by the Licensed Patents. The patent license shall not apply to any other
-combinations which include the Contribution. No hardware per se is
-licensed hereunder.</p>
-
-<p class="list">c) Recipient understands that although each Contributor
-grants the licenses to its Contributions set forth herein, no assurances
-are provided by any Contributor that the Program does not infringe the
-patent or other intellectual property rights of any other entity. Each
-Contributor disclaims any liability to Recipient for claims brought by
-any other entity based on infringement of intellectual property rights
-or otherwise. As a condition to exercising the rights and licenses
-granted hereunder, each Recipient hereby assumes sole responsibility to
-secure any other intellectual property rights needed, if any. For
-example, if a third party patent license is required to allow Recipient
-to distribute the Program, it is Recipient's responsibility to acquire
-that license before distributing the Program.</p>
-
-<p class="list">d) Each Contributor represents that to its knowledge it
-has sufficient copyright rights in its Contribution, if any, to grant
-the copyright license set forth in this Agreement.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">i) effectively disclaims on behalf of all Contributors
-all warranties and conditions, express and implied, including warranties
-or conditions of title and non-infringement, and implied warranties or
-conditions of merchantability and fitness for a particular purpose;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">iv) states that source code for the Program is available
-from such Contributor, and informs licensees how to obtain it in a
-reasonable manner on or through a medium customarily used for software
-exchange.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>Each Contributor must identify itself as the originator of its
-Contribution, if any, in a manner that reasonably allows subsequent
-Recipients to identify the originator of the Contribution.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>Commercial distributors of software may accept certain
-responsibilities with respect to end users, business partners and the
-like. While this license is intended to facilitate the commercial use of
-the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create
-potential liability for other Contributors. Therefore, if a Contributor
-includes the Program in a commercial product offering, such Contributor
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-arising from claims, lawsuits and other legal actions brought by a third
-party against the Indemnified Contributor to the extent caused by the
-acts or omissions of such Commercial Contributor in connection with its
-distribution of the Program in a commercial product offering. The
-obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In
-order to qualify, an Indemnified Contributor must: a) promptly notify
-the Commercial Contributor in writing of such claim, and b) allow the
-Commercial Contributor to control, and cooperate with the Commercial
-Contributor in, the defense and any related settlement negotiations. The
-Indemnified Contributor may participate in any such claim at its own
-expense.</p>
-
-<p>For example, a Contributor might include the Program in a commercial
-product offering, Product X. That Contributor is then a Commercial
-Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance
-claims and warranties are such Commercial Contributor's responsibility
-alone. Under this section, the Commercial Contributor would have to
-defend claims against the other Contributors related to those
-performance claims and warranties, and if a court requires any other
-Contributor to pay any damages as a result, the Commercial Contributor
-must pay those damages.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
-OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
-ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
-OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and
-distributing the Program and assumes all risks associated with its
-exercise of rights under this Agreement , including but not limited to
-the risks and costs of program errors, compliance with applicable laws,
-damage to or loss of data, programs or equipment, and unavailability or
-interruption of operations.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
-NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
-WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
-DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
-HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>If any provision of this Agreement is invalid or unenforceable under
-applicable law, it shall not affect the validity or enforceability of
-the remainder of the terms of this Agreement, and without further action
-by the parties hereto, such provision shall be reformed to the minimum
-extent necessary to make such provision valid and enforceable.</p>
-
-<p>If Recipient institutes patent litigation against any entity
-(including a cross-claim or counterclaim in a lawsuit) alleging that the
-Program itself (excluding combinations of the Program with other
-software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the
-date such litigation is filed.</p>
-
-<p>All Recipient's rights under this Agreement shall terminate if it
-fails to comply with any of the material terms or conditions of this
-Agreement and does not cure such failure in a reasonable period of time
-after becoming aware of such noncompliance. If all Recipient's rights
-under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive.</p>
-
-<p>Everyone is permitted to copy and distribute copies of this
-Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The
-Agreement Steward reserves the right to publish new versions (including
-revisions) of this Agreement from time to time. No one other than the
-Agreement Steward has the right to modify this Agreement. The Eclipse
-Foundation is the initial Agreement Steward. The Eclipse Foundation may
-assign the responsibility to serve as the Agreement Steward to a
-suitable separate entity. Each new version of the Agreement will be
-given a distinguishing version number. The Program (including
-Contributions) may always be distributed subject to the version of the
-Agreement under which it was received. In addition, after a new version
-of the Agreement is published, Contributor may elect to distribute the
-Program (including its Contributions) under the new version. Except as
-expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
-rights or licenses to the intellectual property of any Contributor under
-this Agreement, whether expressly, by implication, estoppel or
-otherwise. All rights in the Program not expressly granted under this
-Agreement are reserved.</p>
-
-<p>This Agreement is governed by the laws of the State of New York and
-the intellectual property laws of the United States of America. No party
-to this Agreement will bring a legal action under this Agreement more
-than one year after the cause of action arose. Each party waives its
-rights to a jury trial in any resulting litigation.</p>
-
-</body></html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplateFeature/feature.properties b/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplateFeature/feature.properties
deleted file mode 100644
index c20c9c045..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplateFeature/feature.properties
+++ /dev/null
@@ -1,141 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 Wind River Systems, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Martin Oberhuber (Wind River) - initial API and implementation
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=Target Management Terminal Telnet Connector Source
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management Updates
-
-# "description" property - description of the feature
-description=A Telnet connector implementation for the Terminal.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2003, 2009 Wind River Systems, Inc. and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplateFeature/license.html b/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplateFeature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplateFeature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/about.html b/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/about.html
deleted file mode 100644
index e7b57cfff..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/about.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2007</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-<h3>Source Code</h3>
-<p>This plug-in contains source code zip files (&quot;Source Zips&quot;) that correspond to binary content in other plug-ins. These Source Zips may be distributed under different license
-agreements and/or notices. Details about these license agreements and notices are contained in &quot;about.html&quot; files (&quot;Abouts&quot;) located in sub-directories in the
-src/ directory of this plug-in. Such Abouts govern your use of the Source Zips in that directory, not the EPL.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/about.ini b/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/about.ini
deleted file mode 100644
index fbbb9f83d..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/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=dsdp32.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/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/about.mappings b/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/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/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/about.properties b/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/about.properties
deleted file mode 100644
index e33b8bcca..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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 Telnet Connector Source\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Wind River Systems, Inc. and others 2003, 2009. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm
diff --git a/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/build.properties b/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/build.properties
deleted file mode 100644
index 7ef3fa39c..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 Wind River Systems, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-bin.includes = about.html, about.ini, about.mappings, about.properties, dsdp32.png, plugin.properties, plugin.xml, src/, META-INF/
-sourcePlugin = true
diff --git a/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/dsdp32.png b/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/dsdp32.png
deleted file mode 100644
index 3077b1220..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/dsdp32.png
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/plugin.properties b/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/plugin.properties
deleted file mode 100644
index 43d853d8c..000000000
--- a/terminal/org.eclipse.tm.terminal.telnet-feature/sourceTemplatePlugin/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 Wind River Systems, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-pluginName=Target Management Terminal Telnet Connector Source
-providerName=Eclipse.org - DSDP
diff --git a/terminal/org.eclipse.tm.terminal.test-feature/.project b/terminal/org.eclipse.tm.terminal.test-feature/.project
deleted file mode 100644
index e5464802a..000000000
--- a/terminal/org.eclipse.tm.terminal.test-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.terminal.test-feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/terminal/org.eclipse.tm.terminal.test-feature/build.properties b/terminal/org.eclipse.tm.terminal.test-feature/build.properties
deleted file mode 100644
index 1d1df4013..000000000
--- a/terminal/org.eclipse.tm.terminal.test-feature/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2008 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-# Martin Oberhuber (Wind River) - Adding source plugin for tests
-###############################################################################
-bin.includes = feature.xml,\
- feature.properties,\
- epl-v10.html,\
- license.html
-src.includes = epl-v10.html,\
- license.html
-root=rootfiles
-generate.plugin@org.eclipse.tm.terminal.test.source=org.eclipse.tm.terminal.test
diff --git a/terminal/org.eclipse.tm.terminal.test-feature/epl-v10.html b/terminal/org.eclipse.tm.terminal.test-feature/epl-v10.html
deleted file mode 100644
index 9321f4082..000000000
--- a/terminal/org.eclipse.tm.terminal.test-feature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">where such changes and/or additions to the Program
-originate from and are distributed by that particular Contributor. A
-Contribution 'originates' from a Contributor if it was added to the
-Program by such Contributor itself or anyone acting on such
-Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in
-conjunction with the Program under their own license agreement, and (ii)
-are not derivative works of the Program.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" mean patent claims licensable by a
-Contributor which are necessarily infringed by the use or sale of its
-Contribution alone or when combined with the Program.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to reproduce, prepare derivative works
-of, publicly display, publicly perform, distribute and sublicense the
-Contribution of such Contributor, if any, and such derivative works, in
-source code and object code form.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free patent license under Licensed Patents to make, use, sell,
-offer to sell, import and otherwise transfer the Contribution of such
-Contributor, if any, in source code and object code form. This patent
-license shall apply to the combination of the Contribution and the
-Program if, at the time the Contribution is added by the Contributor,
-such addition of the Contribution causes such combination to be covered
-by the Licensed Patents. The patent license shall not apply to any other
-combinations which include the Contribution. No hardware per se is
-licensed hereunder.</p>
-
-<p class="list">c) Recipient understands that although each Contributor
-grants the licenses to its Contributions set forth herein, no assurances
-are provided by any Contributor that the Program does not infringe the
-patent or other intellectual property rights of any other entity. Each
-Contributor disclaims any liability to Recipient for claims brought by
-any other entity based on infringement of intellectual property rights
-or otherwise. As a condition to exercising the rights and licenses
-granted hereunder, each Recipient hereby assumes sole responsibility to
-secure any other intellectual property rights needed, if any. For
-example, if a third party patent license is required to allow Recipient
-to distribute the Program, it is Recipient's responsibility to acquire
-that license before distributing the Program.</p>
-
-<p class="list">d) Each Contributor represents that to its knowledge it
-has sufficient copyright rights in its Contribution, if any, to grant
-the copyright license set forth in this Agreement.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">i) effectively disclaims on behalf of all Contributors
-all warranties and conditions, express and implied, including warranties
-or conditions of title and non-infringement, and implied warranties or
-conditions of merchantability and fitness for a particular purpose;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">iv) states that source code for the Program is available
-from such Contributor, and informs licensees how to obtain it in a
-reasonable manner on or through a medium customarily used for software
-exchange.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>Each Contributor must identify itself as the originator of its
-Contribution, if any, in a manner that reasonably allows subsequent
-Recipients to identify the originator of the Contribution.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>Commercial distributors of software may accept certain
-responsibilities with respect to end users, business partners and the
-like. While this license is intended to facilitate the commercial use of
-the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create
-potential liability for other Contributors. Therefore, if a Contributor
-includes the Program in a commercial product offering, such Contributor
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-arising from claims, lawsuits and other legal actions brought by a third
-party against the Indemnified Contributor to the extent caused by the
-acts or omissions of such Commercial Contributor in connection with its
-distribution of the Program in a commercial product offering. The
-obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In
-order to qualify, an Indemnified Contributor must: a) promptly notify
-the Commercial Contributor in writing of such claim, and b) allow the
-Commercial Contributor to control, and cooperate with the Commercial
-Contributor in, the defense and any related settlement negotiations. The
-Indemnified Contributor may participate in any such claim at its own
-expense.</p>
-
-<p>For example, a Contributor might include the Program in a commercial
-product offering, Product X. That Contributor is then a Commercial
-Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance
-claims and warranties are such Commercial Contributor's responsibility
-alone. Under this section, the Commercial Contributor would have to
-defend claims against the other Contributors related to those
-performance claims and warranties, and if a court requires any other
-Contributor to pay any damages as a result, the Commercial Contributor
-must pay those damages.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
-OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
-ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
-OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and
-distributing the Program and assumes all risks associated with its
-exercise of rights under this Agreement , including but not limited to
-the risks and costs of program errors, compliance with applicable laws,
-damage to or loss of data, programs or equipment, and unavailability or
-interruption of operations.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
-NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
-WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
-DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
-HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>If any provision of this Agreement is invalid or unenforceable under
-applicable law, it shall not affect the validity or enforceability of
-the remainder of the terms of this Agreement, and without further action
-by the parties hereto, such provision shall be reformed to the minimum
-extent necessary to make such provision valid and enforceable.</p>
-
-<p>If Recipient institutes patent litigation against any entity
-(including a cross-claim or counterclaim in a lawsuit) alleging that the
-Program itself (excluding combinations of the Program with other
-software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the
-date such litigation is filed.</p>
-
-<p>All Recipient's rights under this Agreement shall terminate if it
-fails to comply with any of the material terms or conditions of this
-Agreement and does not cure such failure in a reasonable period of time
-after becoming aware of such noncompliance. If all Recipient's rights
-under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive.</p>
-
-<p>Everyone is permitted to copy and distribute copies of this
-Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The
-Agreement Steward reserves the right to publish new versions (including
-revisions) of this Agreement from time to time. No one other than the
-Agreement Steward has the right to modify this Agreement. The Eclipse
-Foundation is the initial Agreement Steward. The Eclipse Foundation may
-assign the responsibility to serve as the Agreement Steward to a
-suitable separate entity. Each new version of the Agreement will be
-given a distinguishing version number. The Program (including
-Contributions) may always be distributed subject to the version of the
-Agreement under which it was received. In addition, after a new version
-of the Agreement is published, Contributor may elect to distribute the
-Program (including its Contributions) under the new version. Except as
-expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
-rights or licenses to the intellectual property of any Contributor under
-this Agreement, whether expressly, by implication, estoppel or
-otherwise. All rights in the Program not expressly granted under this
-Agreement are reserved.</p>
-
-<p>This Agreement is governed by the laws of the State of New York and
-the intellectual property laws of the United States of America. No party
-to this Agreement will bring a legal action under this Agreement more
-than one year after the cause of action arose. Each party waives its
-rights to a jury trial in any resulting litigation.</p>
-
-</body></html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.test-feature/feature.properties b/terminal/org.eclipse.tm.terminal.test-feature/feature.properties
deleted file mode 100644
index aff961def..000000000
--- a/terminal/org.eclipse.tm.terminal.test-feature/feature.properties
+++ /dev/null
@@ -1,141 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 Wind River Systems, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Martin Oberhuber (Wind River) - initial API and implementation
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=Target Management Terminal Unit Tests
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management Updates
-
-# "description" property - description of the feature
-description=TM Terminal Unit Tests. Includes Source.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2007, 2009 Wind River Systems, Inc. and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/terminal/org.eclipse.tm.terminal.test-feature/feature.xml b/terminal/org.eclipse.tm.terminal.test-feature/feature.xml
deleted file mode 100644
index 781d47732..000000000
--- a/terminal/org.eclipse.tm.terminal.test-feature/feature.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?> <!-- Copyright (c) 2008, 2009 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 - initial API and implementation --> <feature
- id="org.eclipse.tm.terminal.test"
- label="%featureName"
- version="2.0.100.qualifier"
- provider-name="%providerName">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- <discovery label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- </url>
-
- <requires>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.tm.terminal" version="3.0.0" match="equivalent"/>
- <import plugin="org.junit" version="3.8.1" match="compatible"/>
- <import plugin="org.apache.ant"/>
- </requires>
-
- <plugin
- id="org.eclipse.tm.terminal.test"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.tm.terminal.test.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/terminal/org.eclipse.tm.terminal.test-feature/license.html b/terminal/org.eclipse.tm.terminal.test-feature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/terminal/org.eclipse.tm.terminal.test-feature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/terminal/org.eclipse.tm.terminal.test-feature/rootfiles/epl-v10.html b/terminal/org.eclipse.tm.terminal.test-feature/rootfiles/epl-v10.html
deleted file mode 100644
index 9321f4082..000000000
--- a/terminal/org.eclipse.tm.terminal.test-feature/rootfiles/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">where such changes and/or additions to the Program
-originate from and are distributed by that particular Contributor. A
-Contribution 'originates' from a Contributor if it was added to the
-Program by such Contributor itself or anyone acting on such
-Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in
-conjunction with the Program under their own license agreement, and (ii)
-are not derivative works of the Program.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" mean patent claims licensable by a
-Contributor which are necessarily infringed by the use or sale of its
-Contribution alone or when combined with the Program.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to reproduce, prepare derivative works
-of, publicly display, publicly perform, distribute and sublicense the
-Contribution of such Contributor, if any, and such derivative works, in
-source code and object code form.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free patent license under Licensed Patents to make, use, sell,
-offer to sell, import and otherwise transfer the Contribution of such
-Contributor, if any, in source code and object code form. This patent
-license shall apply to the combination of the Contribution and the
-Program if, at the time the Contribution is added by the Contributor,
-such addition of the Contribution causes such combination to be covered
-by the Licensed Patents. The patent license shall not apply to any other
-combinations which include the Contribution. No hardware per se is
-licensed hereunder.</p>
-
-<p class="list">c) Recipient understands that although each Contributor
-grants the licenses to its Contributions set forth herein, no assurances
-are provided by any Contributor that the Program does not infringe the
-patent or other intellectual property rights of any other entity. Each
-Contributor disclaims any liability to Recipient for claims brought by
-any other entity based on infringement of intellectual property rights
-or otherwise. As a condition to exercising the rights and licenses
-granted hereunder, each Recipient hereby assumes sole responsibility to
-secure any other intellectual property rights needed, if any. For
-example, if a third party patent license is required to allow Recipient
-to distribute the Program, it is Recipient's responsibility to acquire
-that license before distributing the Program.</p>
-
-<p class="list">d) Each Contributor represents that to its knowledge it
-has sufficient copyright rights in its Contribution, if any, to grant
-the copyright license set forth in this Agreement.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">i) effectively disclaims on behalf of all Contributors
-all warranties and conditions, express and implied, including warranties
-or conditions of title and non-infringement, and implied warranties or
-conditions of merchantability and fitness for a particular purpose;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">iv) states that source code for the Program is available
-from such Contributor, and informs licensees how to obtain it in a
-reasonable manner on or through a medium customarily used for software
-exchange.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>Each Contributor must identify itself as the originator of its
-Contribution, if any, in a manner that reasonably allows subsequent
-Recipients to identify the originator of the Contribution.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>Commercial distributors of software may accept certain
-responsibilities with respect to end users, business partners and the
-like. While this license is intended to facilitate the commercial use of
-the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create
-potential liability for other Contributors. Therefore, if a Contributor
-includes the Program in a commercial product offering, such Contributor
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-arising from claims, lawsuits and other legal actions brought by a third
-party against the Indemnified Contributor to the extent caused by the
-acts or omissions of such Commercial Contributor in connection with its
-distribution of the Program in a commercial product offering. The
-obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In
-order to qualify, an Indemnified Contributor must: a) promptly notify
-the Commercial Contributor in writing of such claim, and b) allow the
-Commercial Contributor to control, and cooperate with the Commercial
-Contributor in, the defense and any related settlement negotiations. The
-Indemnified Contributor may participate in any such claim at its own
-expense.</p>
-
-<p>For example, a Contributor might include the Program in a commercial
-product offering, Product X. That Contributor is then a Commercial
-Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance
-claims and warranties are such Commercial Contributor's responsibility
-alone. Under this section, the Commercial Contributor would have to
-defend claims against the other Contributors related to those
-performance claims and warranties, and if a court requires any other
-Contributor to pay any damages as a result, the Commercial Contributor
-must pay those damages.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
-OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
-ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
-OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and
-distributing the Program and assumes all risks associated with its
-exercise of rights under this Agreement , including but not limited to
-the risks and costs of program errors, compliance with applicable laws,
-damage to or loss of data, programs or equipment, and unavailability or
-interruption of operations.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
-NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
-WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
-DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
-HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>If any provision of this Agreement is invalid or unenforceable under
-applicable law, it shall not affect the validity or enforceability of
-the remainder of the terms of this Agreement, and without further action
-by the parties hereto, such provision shall be reformed to the minimum
-extent necessary to make such provision valid and enforceable.</p>
-
-<p>If Recipient institutes patent litigation against any entity
-(including a cross-claim or counterclaim in a lawsuit) alleging that the
-Program itself (excluding combinations of the Program with other
-software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the
-date such litigation is filed.</p>
-
-<p>All Recipient's rights under this Agreement shall terminate if it
-fails to comply with any of the material terms or conditions of this
-Agreement and does not cure such failure in a reasonable period of time
-after becoming aware of such noncompliance. If all Recipient's rights
-under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive.</p>
-
-<p>Everyone is permitted to copy and distribute copies of this
-Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The
-Agreement Steward reserves the right to publish new versions (including
-revisions) of this Agreement from time to time. No one other than the
-Agreement Steward has the right to modify this Agreement. The Eclipse
-Foundation is the initial Agreement Steward. The Eclipse Foundation may
-assign the responsibility to serve as the Agreement Steward to a
-suitable separate entity. Each new version of the Agreement will be
-given a distinguishing version number. The Program (including
-Contributions) may always be distributed subject to the version of the
-Agreement under which it was received. In addition, after a new version
-of the Agreement is published, Contributor may elect to distribute the
-Program (including its Contributions) under the new version. Except as
-expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
-rights or licenses to the intellectual property of any Contributor under
-this Agreement, whether expressly, by implication, estoppel or
-otherwise. All rights in the Program not expressly granted under this
-Agreement are reserved.</p>
-
-<p>This Agreement is governed by the laws of the State of New York and
-the intellectual property laws of the United States of America. No party
-to this Agreement will bring a legal action under this Agreement more
-than one year after the cause of action arose. Each party waives its
-rights to a jury trial in any resulting litigation.</p>
-
-</body></html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.test-feature/rootfiles/notice.html b/terminal/org.eclipse.tm.terminal.test-feature/rootfiles/notice.html
deleted file mode 100644
index a9b560f44..000000000
--- a/terminal/org.eclipse.tm.terminal.test-feature/rootfiles/notice.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/terminal/org.eclipse.tm.terminal.test-feature/sourceTemplatePlugin/about.html b/terminal/org.eclipse.tm.terminal.test-feature/sourceTemplatePlugin/about.html
deleted file mode 100644
index e7b57cfff..000000000
--- a/terminal/org.eclipse.tm.terminal.test-feature/sourceTemplatePlugin/about.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2007</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-<h3>Source Code</h3>
-<p>This plug-in contains source code zip files (&quot;Source Zips&quot;) that correspond to binary content in other plug-ins. These Source Zips may be distributed under different license
-agreements and/or notices. Details about these license agreements and notices are contained in &quot;about.html&quot; files (&quot;Abouts&quot;) located in sub-directories in the
-src/ directory of this plug-in. Such Abouts govern your use of the Source Zips in that directory, not the EPL.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.test-feature/sourceTemplatePlugin/build.properties b/terminal/org.eclipse.tm.terminal.test-feature/sourceTemplatePlugin/build.properties
deleted file mode 100644
index 52b7dcea9..000000000
--- a/terminal/org.eclipse.tm.terminal.test-feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-bin.includes = about.html, plugin.properties, plugin.xml, src/, META-INF/
-sourcePlugin = true
diff --git a/terminal/org.eclipse.tm.terminal.test-feature/sourceTemplatePlugin/plugin.properties b/terminal/org.eclipse.tm.terminal.test-feature/sourceTemplatePlugin/plugin.properties
deleted file mode 100644
index 3955f58c1..000000000
--- a/terminal/org.eclipse.tm.terminal.test-feature/sourceTemplatePlugin/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 Wind River Systems, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-pluginName=Target Management Terminal Unit Tests Source
-providerName=Eclipse.org - DSDP
diff --git a/terminal/org.eclipse.tm.terminal.test/.classpath b/terminal/org.eclipse.tm.terminal.test/.classpath
deleted file mode 100644
index 7cdeb7319..000000000
--- a/terminal/org.eclipse.tm.terminal.test/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/CDC-1.1%Foundation-1.1"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/terminal/org.eclipse.tm.terminal.test/.cvsignore b/terminal/org.eclipse.tm.terminal.test/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/terminal/org.eclipse.tm.terminal.test/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/terminal/org.eclipse.tm.terminal.test/.project b/terminal/org.eclipse.tm.terminal.test/.project
deleted file mode 100644
index 492f603b4..000000000
--- a/terminal/org.eclipse.tm.terminal.test/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.terminal.test</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/terminal/org.eclipse.tm.terminal.test/.settings/org.eclipse.jdt.core.prefs b/terminal/org.eclipse.tm.terminal.test/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index ac884dbd2..000000000
--- a/terminal/org.eclipse.tm.terminal.test/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,83 +0,0 @@
-#Fri Apr 11 20:49:09 CEST 2008
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-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=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=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=no_tag
-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=ignore
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-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.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.4
diff --git a/terminal/org.eclipse.tm.terminal.test/META-INF/MANIFEST.MF b/terminal/org.eclipse.tm.terminal.test/META-INF/MANIFEST.MF
deleted file mode 100644
index 25e38ba28..000000000
--- a/terminal/org.eclipse.tm.terminal.test/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,22 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.terminal.test;singleton:=true
-Bundle-Version: 2.0.101.qualifier
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.junit,
- org.eclipse.tm.terminal;bundle-version="[3.0.1,3.1.0)",
- org.eclipse.core.runtime,
- org.eclipse.ui
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
-Export-Package: org.eclipse.tm.internal.terminal.connector;x-internal:=true,
- org.eclipse.tm.internal.terminal.emulator;x-internal:=true,
- org.eclipse.tm.internal.terminal.model;x-internal:=true,
- org.eclipse.tm.internal.terminal.speedtest;x-internal:=true,
- org.eclipse.tm.internal.terminal.test.terminalcanvas;x-internal:=true,
- org.eclipse.tm.internal.terminal.test.ui;x-internal:=true,
- org.eclipse.tm.internal.terminal.textcanvas;x-internal:=true,
- org.eclipse.tm.terminal.model,
- org.eclipse.tm.terminal.test
diff --git a/terminal/org.eclipse.tm.terminal.test/about.html b/terminal/org.eclipse.tm.terminal.test/about.html
deleted file mode 100644
index d4cc693f9..000000000
--- a/terminal/org.eclipse.tm.terminal.test/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2007</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.test/about.ini b/terminal/org.eclipse.tm.terminal.test/about.ini
deleted file mode 100644
index fbbb9f83d..000000000
--- a/terminal/org.eclipse.tm.terminal.test/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=dsdp32.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/terminal/org.eclipse.tm.terminal.test/about.mappings b/terminal/org.eclipse.tm.terminal.test/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/terminal/org.eclipse.tm.terminal.test/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/terminal/org.eclipse.tm.terminal.test/about.properties b/terminal/org.eclipse.tm.terminal.test/about.properties
deleted file mode 100644
index 360731b9e..000000000
--- a/terminal/org.eclipse.tm.terminal.test/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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:
-# IBM Corporation - 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=TM Terminal Unit Tests\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Wind River Systems, Inc. and others 2007, 2009. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm
diff --git a/terminal/org.eclipse.tm.terminal.test/build.properties b/terminal/org.eclipse.tm.terminal.test/build.properties
deleted file mode 100644
index b31722e0c..000000000
--- a/terminal/org.eclipse.tm.terminal.test/build.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.properties,\
- plugin.xml,\
- about.properties,\
- about.mappings,\
- about.ini,\
- dsdp32.png,\
- test.xml,\
- about.html
-javacSource=1.4
-javacTarget=1.4
-src.includes = .settings/,\
- build.properties,\
- teamConfig/,\
- about.html
diff --git a/terminal/org.eclipse.tm.terminal.test/dsdp32.png b/terminal/org.eclipse.tm.terminal.test/dsdp32.png
deleted file mode 100644
index 3077b1220..000000000
--- a/terminal/org.eclipse.tm.terminal.test/dsdp32.png
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.test/plugin.properties b/terminal/org.eclipse.tm.terminal.test/plugin.properties
deleted file mode 100644
index 5c9a30b72..000000000
--- a/terminal/org.eclipse.tm.terminal.test/plugin.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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) - initial API and implementation
-###############################################################################
-pluginName = Target Management Terminal Tests
-providerName = Eclipse.org - DSDP
diff --git a/terminal/org.eclipse.tm.terminal.test/plugin.xml b/terminal/org.eclipse.tm.terminal.test/plugin.xml
deleted file mode 100644
index b70f3319b..000000000
--- a/terminal/org.eclipse.tm.terminal.test/plugin.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<!--
-# Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Michael Scharf (Wind River) - initial API and implementation
-# Martin Oberhuber (Wind River) - fixed copyright headers and beautified
-# Uwe Stieber (Wind River) - [282996] [terminal][api] Add "hidden" attribute to terminal connector extension point
--->
-<plugin>
- <extension
- point="org.eclipse.tm.terminal.terminalConnectors">
- <connector
- class="org.eclipse.tm.internal.terminal.speedtest.SpeedTestConnector"
- id="org.eclipse.tm.internal.terminal.speedtest.SpeedTestConnector"
- name="Speed Test"/>
- </extension>
-</plugin>
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/connector/TerminalConnectorFactoryTest.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/connector/TerminalConnectorFactoryTest.java
deleted file mode 100644
index 105b43e55..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/connector/TerminalConnectorFactoryTest.java
+++ /dev/null
@@ -1,270 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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) - [225853][api] Provide more default functionality in TerminalConnectorImpl
- * Martin Oberhuber (Wind River) - [204796] Terminal should allow setting the encoding to use
- * Uwe Stieber (Wind River) - [282996] [terminal][api] Add "hidden" attribute to terminal connector extension point
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.connector;
-
-import java.io.OutputStream;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-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;
-
-public class TerminalConnectorFactoryTest extends TestCase {
- public class SettingsMock implements ISettingsStore {
-
- public String get(String key) {
- return null;
- }
-
- public String get(String key, String defaultValue) {
- return null;
- }
-
- public void put(String key, String value) {
- }
-
- }
- public static class TerminalControlMock implements ITerminalControl {
-
- public void setEncoding(String encoding) {
- }
-
- public String getEncoding() {
- return "ISO-8859-1"; //$NON-NLS-1$
- }
-
- public void displayTextInTerminal(String text) {
- }
-
- public OutputStream getRemoteToTerminalOutputStream() {
- return null;
- }
-
- public Shell getShell() {
- return null;
- }
-
- public TerminalState getState() {
- return null;
- }
-
- public void setMsg(String msg) {
- }
-
- public void setState(TerminalState state) {
- }
-
- public void setTerminalTitle(String title) {
- }
-
- }
- static class ConnectorMock extends TerminalConnectorImpl {
-
- public boolean fEcho;
- public int fWidth;
- public int fHeight;
- public ITerminalControl fControl;
- public ISettingsStore fSaveStore;
- public ISettingsStore fLoadStore;
- public boolean fDisconnect;
-
- public boolean isLocalEcho() {
- return fEcho;
- }
- public void setTerminalSize(int newWidth, int newHeight) {
- fWidth=newWidth;
- fHeight=newHeight;
- }
- public void connect(ITerminalControl control) {
- super.connect(control);
- fControl = control;
- }
- public void doDisconnect() {
- fDisconnect=true;
- }
-
- public OutputStream getTerminalToRemoteStream() {
- return null;
- }
-
- public String getSettingsSummary() {
- return "Summary";
- }
-
- public void load(ISettingsStore store) {
- fLoadStore=store;
- }
-
- public ISettingsPage makeSettingsPage() {
- return new ISettingsPage(){
- public void createControl(Composite parent) {
- }
- public void loadSettings() {
- }
- public void saveSettings() {
- }
- public boolean validateSettings() {
- return false;
- }};
- }
-
- public void save(ISettingsStore store) {
- fSaveStore=store;
- }
- }
- protected TerminalConnector makeTerminalConnector() {
- return makeTerminalConnector(new ConnectorMock());
- }
-
- protected TerminalConnector makeTerminalConnector(final TerminalConnectorImpl mock) {
- TerminalConnector c=new TerminalConnector(new TerminalConnector.Factory(){
- public TerminalConnectorImpl makeConnector() throws Exception {
- return mock;
- }
- },"xID","xName", false);
- return c;
- }
-
- public void testGetInitializationErrorMessage() {
- TerminalConnector c=makeTerminalConnector();
- c.connect(new TerminalControlMock());
- assertNull(c.getInitializationErrorMessage());
-
- c=makeTerminalConnector(new ConnectorMock(){
- public void initialize() throws Exception {
- throw new Exception("FAILED");
- }});
- c.connect(new TerminalControlMock());
- assertEquals("FAILED",c.getInitializationErrorMessage());
-
- }
-
- public void testGetIdAndName() {
- TerminalConnector c=makeTerminalConnector();
- assertEquals("xID", c.getId());
- assertEquals("xName", c.getName());
- }
-
- public void testIsInitialized() {
- TerminalConnector c=makeTerminalConnector();
- assertFalse(c.isInitialized());
- c.getId();
- assertFalse(c.isInitialized());
- c.getName();
- assertFalse(c.isInitialized());
- c.getSettingsSummary();
- assertFalse(c.isInitialized());
- c.setTerminalSize(10,10);
- assertFalse(c.isInitialized());
- c.load(null);
- assertFalse(c.isInitialized());
- c.save(null);
- assertFalse(c.isInitialized());
- if (!Platform.isRunning()) return;
- c.getAdapter(ConnectorMock.class);
- assertFalse(c.isInitialized());
- }
-
- public void testConnect() {
- TerminalConnector c=makeTerminalConnector();
- assertFalse(c.isInitialized());
- c.connect(new TerminalControlMock());
- assertTrue(c.isInitialized());
-
- }
-
- public void testDisconnect() {
- ConnectorMock mock=new ConnectorMock();
- TerminalConnector c = makeTerminalConnector(mock);
- TerminalControlMock control=new TerminalControlMock();
- c.connect(control);
- c.disconnect();
- assertTrue(mock.fDisconnect);
- }
-
- public void testGetTerminalToRemoteStream() {
- ConnectorMock mock=new ConnectorMock();
- TerminalConnector c = makeTerminalConnector(mock);
- TerminalControlMock control=new TerminalControlMock();
- c.connect(control);
- assertSame(mock.fControl,control);
- }
- public void testGetSettingsSummary() {
- TerminalConnector c=makeTerminalConnector();
- assertEquals("Not Initialized", c.getSettingsSummary());
- c.connect(new TerminalControlMock());
- assertEquals("Summary", c.getSettingsSummary());
- }
-
- public void testIsLocalEcho() {
- ConnectorMock mock=new ConnectorMock();
- TerminalConnector c = makeTerminalConnector(mock);
- assertFalse(c.isLocalEcho());
- mock.fEcho=true;
- assertTrue(c.isLocalEcho());
- }
-
- public void testLoad() {
- ConnectorMock mock=new ConnectorMock();
- TerminalConnector c = makeTerminalConnector(mock);
- ISettingsStore s=new SettingsMock();
- c.load(s);
- // the load is called after the connect...
- assertNull(mock.fLoadStore);
- c.connect(new TerminalControlMock());
- assertSame(s,mock.fLoadStore);
- }
-
- public void testSave() {
- ConnectorMock mock=new ConnectorMock();
- TerminalConnector c = makeTerminalConnector(mock);
- ISettingsStore s=new SettingsMock();
- c.save(s);
- assertNull(mock.fSaveStore);
- c.connect(new TerminalControlMock());
- c.save(s);
- assertSame(s,mock.fSaveStore);
- }
-
- public void testMakeSettingsPage() {
- ConnectorMock mock=new ConnectorMock();
- TerminalConnector c = makeTerminalConnector(mock);
- assertNotNull(c.makeSettingsPage());
- }
-
- public void testSetTerminalSize() {
- ConnectorMock mock=new ConnectorMock();
- TerminalConnector c = makeTerminalConnector(mock);
- c.setTerminalSize(100, 200);
-
- }
-
- public void testGetAdapter() {
- if (!Platform.isRunning()) return;
- ConnectorMock mock=new ConnectorMock();
- TerminalConnector c = makeTerminalConnector(mock);
- assertNull(c.getAdapter(ConnectorMock.class));
- // the load is called after the connect...
- c.connect(new TerminalControlMock());
-
- assertSame(mock, c.getAdapter(ConnectorMock.class));
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/connector/TerminalConnectorPluginTest.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/connector/TerminalConnectorPluginTest.java
deleted file mode 100644
index 799bd2bc1..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/connector/TerminalConnectorPluginTest.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Martin Oberhuber (Wind River) - initial API and implementation
- * Uwe Stieber (Wind River) - [282996] [terminal][api] Add "hidden" attribute to terminal connector extension point
- *******************************************************************************/
-
-package org.eclipse.tm.internal.terminal.connector;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.tm.internal.terminal.connector.TerminalConnectorTest.ConnectorMock;
-import org.eclipse.tm.internal.terminal.connector.TerminalConnectorTest.SimpleFactory;
-import org.eclipse.tm.internal.terminal.connector.TerminalConnectorTest.TerminalControlMock;
-
-/**
- * Testcase for TerminalConnector that must run as a JUnit plug-in test.
- */
-public class TerminalConnectorPluginTest extends TestCase {
-
- public void testIsInitialized() {
- if (!Platform.isRunning())
- return;
- TerminalConnector c = new TerminalConnector(new SimpleFactory(new ConnectorMock()), "xID", "xName", false);
- assertFalse(c.isInitialized());
- c.getId();
- assertFalse(c.isInitialized());
- c.getName();
- assertFalse(c.isInitialized());
- c.isHidden();
- assertFalse(c.isInitialized());
- c.getSettingsSummary();
- assertFalse(c.isInitialized());
- c.setTerminalSize(10, 10);
- assertFalse(c.isInitialized());
- c.load(null);
- assertFalse(c.isInitialized());
- c.save(null);
- assertFalse(c.isInitialized());
- c.getAdapter(ConnectorMock.class);
- assertFalse(c.isInitialized());
- }
-
- public void testGetAdapter() {
- if (!Platform.isRunning())
- return;
- ConnectorMock mock = new ConnectorMock();
- TerminalConnector c = new TerminalConnector(new SimpleFactory(mock), "xID", "xName", false);
- assertNull(c.getAdapter(ConnectorMock.class));
- // the load is called after the connect...
- c.connect(new TerminalControlMock());
-
- assertSame(mock, c.getAdapter(ConnectorMock.class));
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/connector/TerminalConnectorTest.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/connector/TerminalConnectorTest.java
deleted file mode 100644
index 93d555572..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/connector/TerminalConnectorTest.java
+++ /dev/null
@@ -1,237 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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) - [225853][api] Provide more default functionality in TerminalConnectorImpl
- * Martin Oberhuber (Wind River) - [204796] Terminal should allow setting the encoding to use
- * Uwe Stieber (Wind River) - [282996] [terminal][api] Add "hidden" attribute to terminal connector extension point
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.connector;
-
-import java.io.OutputStream;
-
-import junit.framework.TestCase;
-
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tm.internal.terminal.connector.TerminalConnector.Factory;
-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;
-
-public class TerminalConnectorTest extends TestCase {
- public class SettingsMock implements ISettingsStore {
-
- public String get(String key) {
- return null;
- }
-
- public String get(String key, String defaultValue) {
- return null;
- }
-
- public void put(String key, String value) {
- }
-
- }
- public static class TerminalControlMock implements ITerminalControl {
-
- public void setEncoding(String encoding) {
- }
-
- public String getEncoding() {
- return "ISO-8859-1"; //$NON-NLS-1$
- }
-
- public void displayTextInTerminal(String text) {
- }
-
- public OutputStream getRemoteToTerminalOutputStream() {
- return null;
- }
-
- public Shell getShell() {
- return null;
- }
-
- public TerminalState getState() {
- return null;
- }
-
- public void setMsg(String msg) {
- }
-
- public void setState(TerminalState state) {
- }
-
- public void setTerminalTitle(String title) {
- }
-
- }
- static class ConnectorMock extends TerminalConnectorImpl {
-
- public boolean fEcho;
- public int fWidth;
- public int fHeight;
- public ITerminalControl fControl;
- public ISettingsStore fSaveStore;
- public ISettingsStore fLoadStore;
- public boolean fDisconnect;
-
- public boolean isLocalEcho() {
- return fEcho;
- }
- public void setTerminalSize(int newWidth, int newHeight) {
- fWidth=newWidth;
- fHeight=newHeight;
- }
- public void connect(ITerminalControl control) {
- super.connect(control);
- fControl = control;
- }
- public void doDisconnect() {
- fDisconnect=true;
- }
-
- public OutputStream getTerminalToRemoteStream() {
- return null;
- }
-
- public String getSettingsSummary() {
- return "Summary";
- }
-
- public void load(ISettingsStore store) {
- fLoadStore=store;
- }
-
- public ISettingsPage makeSettingsPage() {
- return new ISettingsPage(){
- public void createControl(Composite parent) {
- }
- public void loadSettings() {
- }
- public void saveSettings() {
- }
- public boolean validateSettings() {
- return false;
- }};
- }
-
- public void save(ISettingsStore store) {
- fSaveStore=store;
- }
- }
- static class SimpleFactory implements Factory {
- final TerminalConnectorImpl fConnector;
- public SimpleFactory(TerminalConnectorImpl connector) {
- fConnector = connector;
- }
- public TerminalConnectorImpl makeConnector() throws Exception {
- // TODO Auto-generated method stub
- return fConnector;
- }
- }
- public void testGetInitializationErrorMessage() {
- TerminalConnector c=new TerminalConnector(new SimpleFactory(new ConnectorMock()),"xID","xName", false);
- c.connect(new TerminalControlMock());
- assertNull(c.getInitializationErrorMessage());
-
- c=new TerminalConnector(new SimpleFactory(new ConnectorMock(){
- public void initialize() throws Exception {
- throw new Exception("FAILED");
- }}),"xID","xName", false);
- c.connect(new TerminalControlMock());
- assertEquals("FAILED",c.getInitializationErrorMessage());
-
- }
-
- public void testGetIdAndName() {
- TerminalConnector c=new TerminalConnector(new SimpleFactory(new ConnectorMock()),"xID","xName", false);
- assertEquals("xID", c.getId());
- assertEquals("xName", c.getName());
- }
-
- public void testConnect() {
- TerminalConnector c=new TerminalConnector(new SimpleFactory(new ConnectorMock()),"xID","xName", false);
- assertFalse(c.isInitialized());
- c.connect(new TerminalControlMock());
- assertTrue(c.isInitialized());
-
- }
-
- public void testDisconnect() {
- ConnectorMock mock=new ConnectorMock();
- TerminalConnector c=new TerminalConnector(new SimpleFactory(mock),"xID","xName", false);
- TerminalControlMock control=new TerminalControlMock();
- c.connect(control);
- c.disconnect();
- assertTrue(mock.fDisconnect);
- }
-
- public void testGetTerminalToRemoteStream() {
- ConnectorMock mock=new ConnectorMock();
- TerminalConnector c=new TerminalConnector(new SimpleFactory(mock),"xID","xName", false);
- TerminalControlMock control=new TerminalControlMock();
- c.connect(control);
- assertSame(mock.fControl,control);
- }
-
- public void testGetSettingsSummary() {
- TerminalConnector c=new TerminalConnector(new SimpleFactory(new ConnectorMock()),"xID","xName", false);
- assertEquals("Not Initialized", c.getSettingsSummary());
- c.connect(new TerminalControlMock());
- assertEquals("Summary", c.getSettingsSummary());
- }
-
- public void testIsLocalEcho() {
- ConnectorMock mock=new ConnectorMock();
- TerminalConnector c=new TerminalConnector(new SimpleFactory(mock),"xID","xName", false);
- assertFalse(c.isLocalEcho());
- mock.fEcho=true;
- assertTrue(c.isLocalEcho());
- }
-
- public void testLoad() {
- ConnectorMock mock=new ConnectorMock();
- TerminalConnector c=new TerminalConnector(new SimpleFactory(mock),"xID","xName", false);
- ISettingsStore s=new SettingsMock();
- c.load(s);
- // the load is called after the connect...
- assertNull(mock.fLoadStore);
- c.connect(new TerminalControlMock());
- assertSame(s,mock.fLoadStore);
- }
-
- public void testSave() {
- ConnectorMock mock=new ConnectorMock();
- TerminalConnector c=new TerminalConnector(new SimpleFactory(mock),"xID","xName", false);
- ISettingsStore s=new SettingsMock();
- c.save(s);
- assertNull(mock.fSaveStore);
- c.connect(new TerminalControlMock());
- c.save(s);
- assertSame(s,mock.fSaveStore);
- }
-
- public void testMakeSettingsPage() {
- ConnectorMock mock=new ConnectorMock();
- TerminalConnector c=new TerminalConnector(new SimpleFactory(mock),"xID","xName", false);
- assertNotNull(c.makeSettingsPage());
- }
-
- public void testSetTerminalSize() {
- ConnectorMock mock=new ConnectorMock();
- TerminalConnector c=new TerminalConnector(new SimpleFactory(mock),"xID","xName", false);
- c.setTerminalSize(100, 200);
-
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/connector/TerminalToRemoteInjectionOutputStreamTest.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/connector/TerminalToRemoteInjectionOutputStreamTest.java
deleted file mode 100644
index eb5ea8417..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/connector/TerminalToRemoteInjectionOutputStreamTest.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Michael Scharf (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.connector;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.UnsupportedEncodingException;
-
-import junit.framework.TestCase;
-
-public class TerminalToRemoteInjectionOutputStreamTest extends TestCase {
- final static String ENCODING="UTF-8";
- /**
- * This class escapes strings coming on the original
- * terminal..
- *
- */
- class CleverInterceptor extends TerminalToRemoteInjectionOutputStream.Interceptor {
-
- public void close() throws IOException {
- }
- public void write(int b) throws IOException {
- fOriginal.write('[');
- fOriginal.write(b);
- fOriginal.write(']');
- }
- public void write(byte[] b, int off, int len) throws IOException {
- fOriginal.write('[');
- fOriginal.write(b,off,len);
- fOriginal.write(']');
- }
-
- }
- class NullInterceptor extends TerminalToRemoteInjectionOutputStream.Interceptor {
- }
- public void testClose() throws UnsupportedEncodingException, IOException {
- ByteArrayOutputStream bs=new ByteArrayOutputStream();
- TerminalToRemoteInjectionOutputStream s= new TerminalToRemoteInjectionOutputStream(bs);
- s.write("begin:".getBytes(ENCODING));
- assertEquals("begin:", new String(bs.toByteArray(),ENCODING));
- OutputStream os1=s.grabOutput();
- os1.write('x');
- s.write('A');
- os1.write('y');
- s.write('B');
- os1.close();
-
- s.write('-');
- OutputStream os=s.grabOutput();
- // make sure the closed output does not inject anything
- try {
- os1.write('k');
- fail("...");
- } catch (Exception e) {
- }
- os.write('X');
- s.write('a');
- os.write('Y');
- // make sure the closed output does not inject anything
- try {
- os1.write('l');
- fail("...");
- } catch (Exception e) {
- }
- s.write('b');
- os.close();
- assertEquals("begin:xyAB-XYab", new String(bs.toByteArray(),ENCODING));
- }
-
- public void testFlush() {
- }
-
- public void testWriteInt() throws UnsupportedEncodingException, IOException {
- ByteArrayOutputStream bs=new ByteArrayOutputStream();
- TerminalToRemoteInjectionOutputStream s= new TerminalToRemoteInjectionOutputStream(bs);
- s.write("begin:".getBytes(ENCODING));
- assertEquals("begin:", new String(bs.toByteArray(),ENCODING));
- OutputStream os=s.grabOutput();
- os.write('x');
- s.write('A');
- os.write('y');
- s.write('B');
- s.close();
- assertEquals("begin:xyAB", new String(bs.toByteArray(),ENCODING));
-
- }
-
- public void testWriteByteArray() {
- }
-
- public void testWriteByteArrayIntInt() {
- }
- public void testGrabOutput() throws UnsupportedEncodingException, IOException {
- ByteArrayOutputStream bs=new ByteArrayOutputStream();
- TerminalToRemoteInjectionOutputStream s= new TerminalToRemoteInjectionOutputStream(bs);
- s.write("begin:".getBytes(ENCODING));
- assertEquals("begin:", new String(bs.toByteArray(),ENCODING));
- OutputStream os1=s.grabOutput();
- OutputStream os2;
- try {
- os2=s.grabOutput();
- fail("should fail until the foirst output is closed");
- } catch (IOException e) {
- }
- os1.close();
- os2=s.grabOutput();
- assertEquals("begin:", new String(bs.toByteArray(),ENCODING));
- os2.write("Test".getBytes(ENCODING));
- assertEquals("begin:Test", new String(bs.toByteArray(),ENCODING));
- s.write(" west".getBytes(ENCODING));
- assertEquals("begin:Test", new String(bs.toByteArray(),ENCODING));
- os2.write(" the".getBytes(ENCODING));
- assertEquals("begin:Test the", new String(bs.toByteArray(),ENCODING));
- os2.close();
- assertEquals("begin:Test the west", new String(bs.toByteArray(),ENCODING));
- s.write('!');
- assertEquals("begin:Test the west!", new String(bs.toByteArray(),ENCODING));
-
- }
- public void testGrabOutputWithCleverInterceptor() throws UnsupportedEncodingException, IOException {
- ByteArrayOutputStream bs=new ByteArrayOutputStream();
- TerminalToRemoteInjectionOutputStream s= new TerminalToRemoteInjectionOutputStream(bs);
- s.write("begin:".getBytes(ENCODING));
- assertEquals("begin:", new String(bs.toByteArray(),ENCODING));
- // the injector escapes the output coming from the main stream
- OutputStream os=s.grabOutput(new CleverInterceptor());
- assertEquals("begin:", new String(bs.toByteArray(),ENCODING));
- os.write("Test".getBytes(ENCODING));
- assertEquals("begin:Test", new String(bs.toByteArray(),ENCODING));
- s.write(" west".getBytes(ENCODING));
- assertEquals("begin:Test[ west]", new String(bs.toByteArray(),ENCODING));
- os.write(" the".getBytes(ENCODING));
- assertEquals("begin:Test[ west] the", new String(bs.toByteArray(),ENCODING));
- s.write('x');
- assertEquals("begin:Test[ west] the[x]", new String(bs.toByteArray(),ENCODING));
- os.close();
- assertEquals("begin:Test[ west] the[x]", new String(bs.toByteArray(),ENCODING));
- s.write('!');
- assertEquals("begin:Test[ west] the[x]!", new String(bs.toByteArray(),ENCODING));
-
- }
- public void testGrabOutputWithNullInterceptor() throws UnsupportedEncodingException, IOException {
- ByteArrayOutputStream bs=new ByteArrayOutputStream();
- TerminalToRemoteInjectionOutputStream s= new TerminalToRemoteInjectionOutputStream(bs);
- s.write("begin:".getBytes(ENCODING));
- assertEquals("begin:", new String(bs.toByteArray(),ENCODING));
- // bytes written to the main stream are ignored while the injector
- // is active
- OutputStream os=s.grabOutput(new NullInterceptor());
- assertEquals("begin:", new String(bs.toByteArray(),ENCODING));
- os.write("Test".getBytes(ENCODING));
- assertEquals("begin:Test", new String(bs.toByteArray(),ENCODING));
- s.write(" west".getBytes(ENCODING));
- assertEquals("begin:Test", new String(bs.toByteArray(),ENCODING));
- os.write(" the".getBytes(ENCODING));
- assertEquals("begin:Test the", new String(bs.toByteArray(),ENCODING));
- s.write('x');
- assertEquals("begin:Test the", new String(bs.toByteArray(),ENCODING));
- os.close();
- assertEquals("begin:Test the", new String(bs.toByteArray(),ENCODING));
- s.write('!');
- assertEquals("begin:Test the!", new String(bs.toByteArray(),ENCODING));
-
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/emulator/AllTests.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/emulator/AllTests.java
deleted file mode 100644
index 9817ae968..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/emulator/AllTests.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Martin Oberhuber (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.emulator;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-/**
- * Terminal emulator test cases.
- * Runs in emulator package to allow access to default visible items.
- */
-public class AllTests extends TestCase {
- public AllTests() {
- super(null);
- }
-
- public AllTests(String name) {
- super(name);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite(AllTests.class.getName());
- suite.addTestSuite(VT100EmulatorBackendTest.class);
- return suite;
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/emulator/VT100EmulatorBackendTest.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/emulator/VT100EmulatorBackendTest.java
deleted file mode 100644
index 9e711db97..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/emulator/VT100EmulatorBackendTest.java
+++ /dev/null
@@ -1,1237 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Michael Scharf (Wind River) - initial API and implementation
- * Martin Oberhuber (Wind River) - [168197] Fix Terminal for CDC-1.1/Foundation-1.1
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.emulator;
-
-import junit.framework.TestCase;
-
-import org.eclipse.tm.internal.terminal.model.TerminalTextDataStore;
-import org.eclipse.tm.internal.terminal.model.TerminalTextTestHelper;
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-import org.eclipse.tm.terminal.model.ITerminalTextDataReadOnly;
-import org.eclipse.tm.terminal.model.Style;
-
-public class VT100EmulatorBackendTest extends TestCase {
-
- protected IVT100EmulatorBackend makeBakend(ITerminalTextData term) {
- return new VT100EmulatorBackend(term);
- }
-
- protected ITerminalTextData makeITerminalTextData() {
- return new TerminalTextDataStore();
- }
-
- protected String toSimple(ITerminalTextData term) {
- return TerminalTextTestHelper.toSimple(term);
- }
- protected String toMultiLineText(ITerminalTextDataReadOnly term) {
- return TerminalTextTestHelper.toMultiLineText(term);
- }
-
- protected void fill(ITerminalTextData term, String s) {
- TerminalTextTestHelper.fill(term,s);
- }
-
- protected void fillSimple(ITerminalTextData term, String s) {
- TerminalTextTestHelper.fillSimple(term, s);
- }
-
-
- /**
- * Used for multi line text
- * @param expected
- * @param actual
- */
- protected void assertEqualsTerm(String expected,String actual) {
- assertEquals(expected.replace(' ', '.'), actual.replace('\000', '.'));
- }
- /**
- * Used for simple text
- * @param expected
- * @param actual
- */
- protected void assertEqualsSimple(String expected,String actual) {
- assertEquals(-1,actual.indexOf('\n'));
- assertEquals(expected, actual);
- }
- public void testClearAll() {
- ITerminalTextData term=makeITerminalTextData();
- IVT100EmulatorBackend vt100=makeBakend(term);
- vt100.setDimensions(3, 4);
- fill(term, "0000\n" +
- "1111\n" +
- "2222\n" +
- "3333\n" +
- "4444\n" +
- "5555");
- vt100.clearAll();
- assertEqualsTerm(
- " \n" +
- " \n" +
- " ",toMultiLineText(term));
- }
- public void testSetDimensions() {
- ITerminalTextData term=makeITerminalTextData();
- IVT100EmulatorBackend vt100=makeBakend(term);
- String s = "0000\n" +
- "1111\n" +
- "2222\n" +
- "3333\n" +
- "4444\n" +
- "5555";
- fill(term, s);
- vt100.setDimensions(3, 4);
- assertEquals(3,vt100.getLines());
- assertEquals(4,vt100.getColumns());
- assertEqualsTerm(s,toMultiLineText(term));
-
- vt100.setCursor(0, 2);
- vt100.setDimensions(2, 4);
- assertEquals(0, vt100.getCursorLine());
- assertEquals(2, vt100.getCursorColumn());
-
- vt100.setCursor(0, 2);
- vt100.setDimensions(5, 4);
- assertEquals(3, vt100.getCursorLine());
- assertEquals(2, vt100.getCursorColumn());
-
- assertEqualsTerm(s,toMultiLineText(term));
-
- vt100.setCursor(0, 3);
- vt100.setDimensions(5, 2);
- assertEquals(0, vt100.getCursorLine());
- assertEquals(1, vt100.getCursorColumn());
- }
-
- public void testToAbsoluteLine() {
- ITerminalTextData term=makeITerminalTextData();
- VT100EmulatorBackend vt100=new VT100EmulatorBackend(term);
- vt100.setDimensions(2, 3);
- assertEquals(vt100.toAbsoluteLine(0),0);
- // TODO
- term=makeITerminalTextData();
- vt100=new VT100EmulatorBackend(term);
- vt100.setDimensions(1, 10);
- assertEquals(vt100.toAbsoluteLine(0),0);
- }
-
- public void testInsertCharacters() {
- ITerminalTextData term=makeITerminalTextData();
- IVT100EmulatorBackend vt100=makeBakend(term);
- vt100.setDimensions(3, 4);
- String s =
- "aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- "1234\n" +
- "4567\n" +
- "9012";
- fill(term, s);
- vt100.setCursor(0, 0);
- vt100.insertCharacters(1);
- assertEqualsTerm("aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- " 123\n" +
- "4567\n" +
- "9012",toMultiLineText(term));
-
- fill(term, s);
- vt100.setCursor(1, 1);
- vt100.insertCharacters(1);
- assertEqualsTerm("aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- "1234\n" +
- "4 56\n" +
- "9012",toMultiLineText(term));
-
- fill(term, s);
- vt100.setCursor(1, 1);
- vt100.insertCharacters(2);
- assertEqualsTerm("aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- "1234\n" +
- "4 5\n" +
- "9012",toMultiLineText(term));
-
- vt100.setDimensions(1, 10);
- fill(term, "0123456789");
- vt100.setCursor(0, 0);
- vt100.insertCharacters(10);
- assertEqualsTerm(" ",toMultiLineText(term));
-
- vt100.setDimensions(1, 10);
- fill(term, "0123456789");
- vt100.setCursor(0, 0);
- vt100.insertCharacters(14);
- assertEqualsTerm(" ",toMultiLineText(term));
-
- vt100.setDimensions(1, 10);
- fill(term, "0123456789");
- vt100.setCursor(0, 3);
- vt100.insertCharacters(14);
- assertEqualsTerm("012 ",toMultiLineText(term));
-
- vt100.setDimensions(1, 10);
- fill(term, "0123456789");
- vt100.setCursor(0, 3);
- vt100.insertCharacters(0);
- assertEqualsTerm("0123456789",toMultiLineText(term));
-
- vt100.setDimensions(1, 10);
- fill(term, "0123456789");
- vt100.setCursor(0, 3);
- vt100.insertCharacters(2);
- assertEqualsTerm("012 34567",toMultiLineText(term));
- }
-
- public void testEraseToEndOfScreen() {
- ITerminalTextData term=makeITerminalTextData();
- IVT100EmulatorBackend vt100=makeBakend(term);
- vt100.setDimensions(3, 4);
- String s =
- "aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- "0123\n" +
- "4567\n" +
- "8901";
- fill(term, s);
- vt100.setCursor(0, 0);
- vt100.eraseToEndOfScreen();
- assertEquals(0,vt100.getCursorLine());
- assertEquals(0,vt100.getCursorColumn());
- assertEqualsTerm("aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- " \n" +
- " \n" +
- " ",toMultiLineText(term));
-
- fill(term, s);
- vt100.setCursor(1, 0);
- vt100.eraseToEndOfScreen();
- assertEquals(1,vt100.getCursorLine());
- assertEquals(0,vt100.getCursorColumn());
- assertEqualsTerm("aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- "0123\n" +
- " \n" +
- " ",toMultiLineText(term));
-
- fill(term, s);
- vt100.setCursor(1, 1);
- vt100.eraseToEndOfScreen();
- assertEquals(1,vt100.getCursorLine());
- assertEquals(1,vt100.getCursorColumn());
- assertEqualsTerm("aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- "0123\n" +
- "4 \n" +
- " ",toMultiLineText(term));
-
- fill(term, s);
- vt100.setCursor(1, 4);
- assertEquals(1,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
- vt100.eraseToEndOfScreen();
- assertEquals(1,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
- assertEqualsTerm("aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- "0123\n" +
- "456.\n" +
- " ",toMultiLineText(term));
-
-
- fill(term, s);
- vt100.setCursor(1, 5);
- vt100.eraseToEndOfScreen();
- assertEquals(1,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
- assertEqualsTerm("aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- "0123\n" +
- "456.\n" +
- " ",toMultiLineText(term));
-
- fill(term, s);
- vt100.setCursor(2, 3);
- vt100.eraseToEndOfScreen();
- assertEquals(2,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
- assertEqualsTerm("aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- "0123\n" +
- "4567\n" +
- "890 ",toMultiLineText(term));
-
- fill(term, s);
- vt100.setCursor(2, 5);
- vt100.eraseToEndOfScreen();
- assertEquals(2,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
- assertEqualsTerm("aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- "0123\n" +
- "4567\n" +
- "890.",toMultiLineText(term));
- }
-
- public void testEraseToCursor() {
- ITerminalTextData term=makeITerminalTextData();
- IVT100EmulatorBackend vt100=makeBakend(term);
- vt100.setDimensions(3, 4);
- String s =
- "aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- "0123\n" +
- "4567\n" +
- "8901";
- fill(term, s);
- vt100.setCursor(0, 0);
- vt100.eraseToCursor();
- assertEquals(0,vt100.getCursorLine());
- assertEquals(0,vt100.getCursorColumn());
- assertEqualsTerm("aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- " 123\n" +
- "4567\n" +
- "8901",toMultiLineText(term));
-
- fill(term, s);
- vt100.setCursor(1, 0);
- vt100.eraseToCursor();
- assertEquals(1,vt100.getCursorLine());
- assertEquals(0,vt100.getCursorColumn());
- assertEqualsTerm("aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- " \n" +
- " 567\n" +
- "8901",toMultiLineText(term));
-
- fill(term, s);
- vt100.setCursor(1, 1);
- vt100.eraseToCursor();
- assertEquals(1,vt100.getCursorLine());
- assertEquals(1,vt100.getCursorColumn());
- assertEqualsTerm("aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- " \n" +
- " 67\n" +
- "8901",toMultiLineText(term));
-
- fill(term, s);
- vt100.setCursor(1, 4);
- vt100.eraseToCursor();
- assertEquals(1,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
- assertEqualsTerm("aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- " \n" +
- " \n" +
- "8901",toMultiLineText(term));
-
-
- fill(term, s);
- vt100.setCursor(1, 5);
- vt100.eraseToCursor();
- assertEquals(1,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
- assertEqualsTerm("aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- " \n" +
- " \n" +
- "8901",toMultiLineText(term));
-
- fill(term, s);
- vt100.setCursor(2, 3);
- vt100.eraseToCursor();
- assertEquals(2,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
- assertEqualsTerm("aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- " \n" +
- " \n" +
- " ",toMultiLineText(term));
-
- fill(term, s);
- vt100.setCursor(2, 5);
- vt100.eraseToCursor();
- assertEquals(2,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
- assertEqualsTerm("aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- " \n" +
- " \n" +
- " ",toMultiLineText(term));
- }
-
- public void testEraseAll() {
- ITerminalTextData term=makeITerminalTextData();
- IVT100EmulatorBackend vt100=makeBakend(term);
- vt100.setDimensions(3, 4);
- fill(term, "0000\n" +
- "1111\n" +
- "2222\n" +
- "3333\n" +
- "4444\n" +
- "5555");
- vt100.eraseAll();
- assertEqualsTerm("0000\n" +
- "1111\n" +
- "2222\n" +
- " \n" +
- " \n" +
- " ",toMultiLineText(term));
- }
-
- public void testEraseLine() {
- String s =
- "abcde\n" +
- "fghij\n" +
- "klmno\n" +
- "pqrst\n" +
- "uvwxy\n" +
- "zABCD\n" +
- "EFGHI";
-
- ITerminalTextData term=makeITerminalTextData();
- IVT100EmulatorBackend vt100=makeBakend(term);
-
- vt100.setDimensions(3, 5);
- fill(term, s);
- vt100.setCursor(0, 3);
- vt100.eraseLine();
- assertEquals(0,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
- assertEqualsTerm("abcde\n" +
- "fghij\n" +
- "klmno\n" +
- "pqrst\n" +
- " \n" +
- "zABCD\n" +
- "EFGHI", toMultiLineText(term));
-
-
- vt100.setDimensions(3, 5);
- fill(term, s);
- vt100.setCursor(2, 3);
- vt100.eraseLine();
- assertEquals(2,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
- assertEqualsTerm("abcde\n" +
- "fghij\n" +
- "klmno\n" +
- "pqrst\n" +
- "uvwxy\n" +
- "zABCD\n" +
- " ", toMultiLineText(term));
- }
-
- public void testEraseLineToEnd() {
- String s =
- "abcde\n" +
- "fghij\n" +
- "klmno\n" +
- "pqrst\n" +
- "uvwxy\n" +
- "zABCD\n" +
- "EFGHI";
-
- ITerminalTextData term=makeITerminalTextData();
- IVT100EmulatorBackend vt100=makeBakend(term);
-
- vt100.setDimensions(3, 5);
- fill(term, s);
- vt100.setCursor(0, 3);
- vt100.eraseLineToEnd();
- assertEquals(0,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
- assertEqualsTerm("abcde\n" +
- "fghij\n" +
- "klmno\n" +
- "pqrst\n" +
- "uvw \n" +
- "zABCD\n" +
- "EFGHI", toMultiLineText(term));
-
- vt100.setDimensions(3, 5);
- fill(term, s);
- vt100.setCursor(0, 0);
- vt100.eraseLineToEnd();
- assertEquals(0,vt100.getCursorLine());
- assertEquals(0,vt100.getCursorColumn());
- assertEqualsTerm("abcde\n" +
- "fghij\n" +
- "klmno\n" +
- "pqrst\n" +
- " \n" +
- "zABCD\n" +
- "EFGHI", toMultiLineText(term));
-
-
- vt100.setDimensions(3, 5);
- fill(term, s);
- vt100.setCursor(2, 3);
- vt100.eraseLineToEnd();
- assertEquals(2,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
- assertEqualsTerm("abcde\n" +
- "fghij\n" +
- "klmno\n" +
- "pqrst\n" +
- "uvwxy\n" +
- "zABCD\n" +
- "EFG ", toMultiLineText(term));
- vt100.setDimensions(3, 5);
- fill(term, s);
-
- vt100.setCursor(2, 4);
- vt100.eraseLineToEnd();
- assertEquals(2,vt100.getCursorLine());
- assertEquals(4,vt100.getCursorColumn());
- assertEqualsTerm("abcde\n" +
- "fghij\n" +
- "klmno\n" +
- "pqrst\n" +
- "uvwxy\n" +
- "zABCD\n" +
- "EFGH ", toMultiLineText(term));
-
- vt100.setCursor(2, 5);
- vt100.eraseLineToEnd();
- assertEquals(2,vt100.getCursorLine());
- assertEquals(4,vt100.getCursorColumn());
- assertEqualsTerm("abcde\n" +
- "fghij\n" +
- "klmno\n" +
- "pqrst\n" +
- "uvwxy\n" +
- "zABCD\n" +
- "EFGH ", toMultiLineText(term));
-
- }
-
- public void testEraseLineToCursor() {
- String s =
- "abcde\n" +
- "fghij\n" +
- "klmno\n" +
- "pqrst\n" +
- "uvwxy\n" +
- "zABCD\n" +
- "EFGHI";
-
- ITerminalTextData term=makeITerminalTextData();
- IVT100EmulatorBackend vt100=makeBakend(term);
-
- vt100.setDimensions(3, 5);
- fill(term, s);
- vt100.setCursor(0, 3);
- vt100.eraseLineToCursor();
- assertEquals(0,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
- assertEqualsTerm("abcde\n" +
- "fghij\n" +
- "klmno\n" +
- "pqrst\n" +
- " y\n" +
- "zABCD\n" +
- "EFGHI", toMultiLineText(term));
-
- vt100.setDimensions(3, 5);
- fill(term, s);
- vt100.setCursor(0, 0);
- vt100.eraseLineToCursor();
- assertEquals(0,vt100.getCursorLine());
- assertEquals(0,vt100.getCursorColumn());
- assertEqualsTerm("abcde\n" +
- "fghij\n" +
- "klmno\n" +
- "pqrst\n" +
- " vwxy\n" +
- "zABCD\n" +
- "EFGHI", toMultiLineText(term));
-
-
- vt100.setDimensions(3, 5);
- fill(term, s);
- vt100.setCursor(2, 3);
- vt100.eraseLineToCursor();
- assertEquals(2,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
- assertEqualsTerm("abcde\n" +
- "fghij\n" +
- "klmno\n" +
- "pqrst\n" +
- "uvwxy\n" +
- "zABCD\n" +
- " I", toMultiLineText(term));
- vt100.setDimensions(3, 5);
- fill(term, s);
-
- vt100.setCursor(2, 4);
- vt100.eraseLineToCursor();
- assertEquals(2,vt100.getCursorLine());
- assertEquals(4,vt100.getCursorColumn());
- assertEqualsTerm("abcde\n" +
- "fghij\n" +
- "klmno\n" +
- "pqrst\n" +
- "uvwxy\n" +
- "zABCD\n" +
- " ", toMultiLineText(term));
-
- vt100.setCursor(2, 5);
- vt100.eraseLineToCursor();
- assertEquals(2,vt100.getCursorLine());
- assertEquals(4,vt100.getCursorColumn());
- assertEqualsTerm("abcde\n" +
- "fghij\n" +
- "klmno\n" +
- "pqrst\n" +
- "uvwxy\n" +
- "zABCD\n" +
- " ", toMultiLineText(term));
-
- }
-
- public void testInsertLines() {
- ITerminalTextData term=makeITerminalTextData();
- IVT100EmulatorBackend vt100=makeBakend(term);
- String s = "0000\n" +
- "1111\n" +
- "2222\n" +
- "3333\n" +
- "4444\n" +
- "5555";
- vt100.setDimensions(3, 4);
- fill(term, s);
- vt100.setCursor(0, 0);
- vt100.insertLines(1);
- assertEqualsTerm(
- "0000\n" +
- "1111\n" +
- "2222\n" +
- " \n" +
- "3333\n" +
- "4444", toMultiLineText(term));
-
- fill(term, s);
- vt100.setCursor(1, 0);
- vt100.insertLines(1);
- assertEqualsTerm(
- "0000\n" +
- "1111\n" +
- "2222\n" +
- "3333\n" +
- " \n" +
- "4444", toMultiLineText(term));
-
- fill(term, s);
- vt100.setCursor(1, 0);
- vt100.insertLines(2);
- assertEqualsTerm(
- "0000\n" +
- "1111\n" +
- "2222\n" +
- "3333\n" +
- " \n" +
- " ", toMultiLineText(term));
-
- fill(term, s);
- vt100.setCursor(1, 3);
- vt100.insertLines(2);
- assertEqualsTerm(
- "0000\n" +
- "1111\n" +
- "2222\n" +
- "3333\n" +
- " \n" +
- " ", toMultiLineText(term));
-
-
- vt100.setDimensions(6, 4);
- fill(term, s);
- vt100.setCursor(1, 3);
- vt100.insertLines(2);
- assertEqualsTerm(
- "0000\n" +
- " \n" +
- " \n" +
- "1111\n" +
- "2222\n" +
- "3333", toMultiLineText(term));
-
-
- vt100.setDimensions(6, 4);
- fill(term, s);
- vt100.setCursor(1, 3);
- vt100.insertLines(7);
- assertEqualsTerm(
- "0000\n" +
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- " ", toMultiLineText(term));
-
- vt100.setDimensions(6, 4);
- fill(term, s);
- vt100.setCursor(0, 0);
- vt100.insertLines(7);
- assertEqualsTerm(
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- " ", toMultiLineText(term));
-
- vt100.setDimensions(6, 4);
- fill(term, s);
- vt100.setCursor(0, 0);
- vt100.insertLines(5);
- assertEqualsTerm(
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- "0000", toMultiLineText(term));
- }
-
- public void testDeleteCharacters() {
- ITerminalTextData term=makeITerminalTextData();
- IVT100EmulatorBackend vt100=makeBakend(term);
- vt100.setDimensions(3, 4);
- String s =
- "aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- "1234\n" +
- "4567\n" +
- "9012";
- fill(term, s);
- vt100.setCursor(0, 0);
- vt100.deleteCharacters(1);
- assertEqualsTerm("aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- "234 \n" +
- "4567\n" +
- "9012",toMultiLineText(term));
-
- fill(term, s);
- vt100.setCursor(1, 1);
- vt100.deleteCharacters(1);
- assertEqualsTerm("aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- "1234\n" +
- "467 \n" +
- "9012",toMultiLineText(term));
-
- fill(term, s);
- vt100.setCursor(1, 1);
- vt100.deleteCharacters(2);
- assertEqualsTerm("aaaa\n" +
- "bbbb\n" +
- "cccc\n" +
- "dddd\n" +
- "eeee\n" +
- "ffff\n" +
- "1234\n" +
- "47 \n" +
- "9012",toMultiLineText(term));
-
- vt100.setDimensions(1, 10);
- fill(term, "0123456789");
- vt100.setCursor(0, 0);
- vt100.deleteCharacters(10);
- assertEqualsTerm(" ",toMultiLineText(term));
-
- vt100.setDimensions(1, 10);
- fill(term, "0123456789");
- vt100.setCursor(0, 0);
- vt100.deleteCharacters(14);
- assertEqualsTerm(" ",toMultiLineText(term));
-
- vt100.setDimensions(1, 10);
- fill(term, "0123456789");
- vt100.setCursor(0, 3);
- vt100.deleteCharacters(0);
- assertEqualsTerm("0123456789",toMultiLineText(term));
-
- vt100.setDimensions(1, 10);
- fill(term, "0123456789");
- vt100.setCursor(0, 3);
- vt100.deleteCharacters(2);
- assertEqualsTerm("01256789 ",toMultiLineText(term));
-
- vt100.setDimensions(1, 10);
- fill(term, "0123456789");
- vt100.setCursor(0, 3);
- vt100.deleteCharacters(14);
- assertEqualsTerm("012 ",toMultiLineText(term));
-
- }
-
- public void testDeleteLines() {
- ITerminalTextData term=makeITerminalTextData();
- IVT100EmulatorBackend vt100=makeBakend(term);
- String s = "0000\n" +
- "1111\n" +
- "2222\n" +
- "3333\n" +
- "4444\n" +
- "5555";
- vt100.setDimensions(3, 4);
- fill(term, s);
- vt100.setCursor(0, 0);
- vt100.deleteLines(1);
- assertEqualsTerm(
- "0000\n" +
- "1111\n" +
- "2222\n" +
- "4444\n" +
- "5555\n" +
- " ", toMultiLineText(term));
-
- fill(term, s);
- vt100.setCursor(1, 0);
- vt100.deleteLines(1);
- assertEqualsTerm(
- "0000\n" +
- "1111\n" +
- "2222\n" +
- "3333\n" +
- "5555\n" +
- " ", toMultiLineText(term));
-
- fill(term, s);
- vt100.setCursor(1, 0);
- vt100.deleteLines(2);
- assertEqualsTerm(
- "0000\n" +
- "1111\n" +
- "2222\n" +
- "3333\n" +
- " \n" +
- " ", toMultiLineText(term));
-
- fill(term, s);
- vt100.setCursor(1, 3);
- vt100.deleteLines(2);
- assertEqualsTerm(
- "0000\n" +
- "1111\n" +
- "2222\n" +
- "3333\n" +
- " \n" +
- " ", toMultiLineText(term));
-
-
- vt100.setDimensions(6, 4);
- fill(term, s);
- vt100.setCursor(1, 3);
- vt100.deleteLines(2);
- assertEqualsTerm(
- "0000\n" +
- "3333\n" +
- "4444\n" +
- "5555\n" +
- " \n" +
- " ", toMultiLineText(term));
-
-
- vt100.setDimensions(6, 4);
- fill(term, s);
- vt100.setCursor(1, 3);
- vt100.deleteLines(7);
- assertEqualsTerm(
- "0000\n" +
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- " ", toMultiLineText(term));
-
- vt100.setDimensions(6, 4);
- fill(term, s);
- vt100.setCursor(0, 0);
- vt100.deleteLines(7);
- assertEqualsTerm(
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- " ", toMultiLineText(term));
-
- vt100.setDimensions(6, 4);
- fill(term, s);
- vt100.setCursor(0, 0);
- vt100.deleteLines(5);
- assertEqualsTerm(
- "5555\n" +
- " \n" +
- " \n" +
- " \n" +
- " \n" +
- " ", toMultiLineText(term));
- }
-
- public void testGetDefaultStyle() {
- ITerminalTextData term=makeITerminalTextData();
- IVT100EmulatorBackend vt100=makeBakend(term);
- Style style=Style.getStyle("white", "black");
- vt100.setDefaultStyle(style);
- assertSame(style, vt100.getDefaultStyle());
- Style style2=style.setBold(true);
- vt100.setDefaultStyle(style2);
- assertSame(style2, vt100.getDefaultStyle());
- }
-
- public void testGetStyle() {
- ITerminalTextData term=makeITerminalTextData();
- IVT100EmulatorBackend vt100=makeBakend(term);
- Style style=Style.getStyle("white", "black");
- vt100.setStyle(style);
- assertSame(style, vt100.getStyle());
- Style style2=style.setBold(true);
- vt100.setStyle(style2);
- assertSame(style2, vt100.getStyle());
- }
-
- public void testAppendString() {
- ITerminalTextData term=makeITerminalTextData();
- IVT100EmulatorBackend vt100=makeBakend(term);
- term.setMaxHeight(6);
- vt100.setDimensions(3, 4);
- vt100.setCursor(0, 0);
- assertEqualsTerm(
- " \n" +
- " \n" +
- " ", toMultiLineText(term));
- vt100.appendString("012");
- assertEqualsTerm(
- "012 \n" +
- " \n" +
- " ", toMultiLineText(term));
- assertEquals(0,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
- vt100.appendString("3");
- assertEqualsTerm(
- "0123\n" +
- " \n" +
- " ", toMultiLineText(term));
- assertEquals(1,vt100.getCursorLine());
- assertEquals(0,vt100.getCursorColumn());
-
- vt100.appendString("567890");
- assertEqualsTerm(
- "0123\n" +
- "5678\n" +
- "90 ", toMultiLineText(term));
- assertEquals(2,vt100.getCursorLine());
- assertEquals(2,vt100.getCursorColumn());
-
-
- vt100.appendString("a");
- assertEqualsTerm(
- "0123\n" +
- "5678\n" +
- "90a ", toMultiLineText(term));
- assertEquals(2,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
-
- vt100.appendString("b");
- assertEqualsTerm(
- "0123\n" +
- "5678\n" +
- "90ab\n" +
- " ", toMultiLineText(term));
- assertEquals(2,vt100.getCursorLine());
- assertEquals(0,vt100.getCursorColumn());
-
- vt100.appendString("cd");
- assertEqualsTerm(
- "0123\n" +
- "5678\n" +
- "90ab\n" +
- "cd ", toMultiLineText(term));
- assertEquals(2,vt100.getCursorLine());
- assertEquals(2,vt100.getCursorColumn());
-
- vt100.appendString("efgh");
- assertEqualsTerm(
- "0123\n" +
- "5678\n" +
- "90ab\n" +
- "cdef\n" +
- "gh ", toMultiLineText(term));
- assertEquals(2,vt100.getCursorLine());
- assertEquals(2,vt100.getCursorColumn());
-
- vt100.appendString("ijklmnopqrstuvwx");
- assertEqualsTerm(
- "cdef\n" +
- "ghij\n" +
- "klmn\n" +
- "opqr\n" +
- "stuv\n" +
- "wx ", toMultiLineText(term));
- assertEquals(2,vt100.getCursorLine());
- assertEquals(2,vt100.getCursorColumn());
-
- vt100.setCursor(1, 1);
- vt100.appendString("123");
- assertEqualsTerm(
- "cdef\n" +
- "ghij\n" +
- "klmn\n" +
- "opqr\n" +
- "s123\n" +
- "wx ", toMultiLineText(term));
- assertEquals(2,vt100.getCursorLine());
- assertEquals(0,vt100.getCursorColumn());
-
- vt100.setCursor(1, 1);
- vt100.appendString("ABCDEFGHIJKL");
- assertEqualsTerm(
- "klmn\n" +
- "opqr\n" +
- "sABC\n" +
- "DEFG\n" +
- "HIJK\n" +
- "L ", toMultiLineText(term));
- assertEquals(2,vt100.getCursorLine());
- assertEquals(1,vt100.getCursorColumn());
-
- }
-
- public void testProcessNewline() {
- ITerminalTextData term=makeITerminalTextData();
- IVT100EmulatorBackend vt100=makeBakend(term);
- String s = "0000\n" +
- "1111\n" +
- "2222\n" +
- "3333\n" +
- "4444\n" +
- "5555";
- term.setMaxHeight(6);
- vt100.setDimensions(3, 4);
- vt100.setCursor(0, 0);
- fill(term,s);
- assertEquals(0,vt100.getCursorLine());
- assertEquals(0,vt100.getCursorColumn());
- vt100.processNewline();
- assertEqualsTerm(s, toMultiLineText(term));
- assertEquals(1,vt100.getCursorLine());
- assertEquals(0,vt100.getCursorColumn());
- vt100.setCursorColumn(3);
- vt100.processNewline();
- assertEqualsTerm(s, toMultiLineText(term));
- assertEquals(2,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
-
- vt100.processNewline();
- assertEqualsTerm(
- "1111\n" +
- "2222\n" +
- "3333\n" +
- "4444\n" +
- "5555\n" +
- " ", toMultiLineText(term));
- assertEquals(2,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
-
-
- vt100.processNewline();
- assertEqualsTerm(
- "2222\n" +
- "3333\n" +
- "4444\n" +
- "5555\n" +
- " \n" +
- " ", toMultiLineText(term));
- assertEquals(2,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
- }
-
- public void testSetCursorLine() {
- ITerminalTextData term=makeITerminalTextData();
- IVT100EmulatorBackend vt100=makeBakend(term);
- term.setMaxHeight(6);
- vt100.setDimensions(3, 4);
- // the cursor still at the beginning....
- assertEquals(0,vt100.getCursorLine());
- assertEquals(0,vt100.getCursorColumn());
- vt100.setCursor(0, 2);
- vt100.setCursorLine(1);
- assertEquals(1,vt100.getCursorLine());
- assertEquals(2,vt100.getCursorColumn());
- vt100.setCursor(0, -2);
- vt100.setCursorLine(-1);
- assertEquals(0,vt100.getCursorLine());
- assertEquals(0,vt100.getCursorColumn());
- vt100.setCursor(0, 10);
- vt100.setCursorLine(10);
- assertEquals(2,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
- }
- public void testSetCursorAndSetDimensions() {
- ITerminalTextData term=makeITerminalTextData();
- IVT100EmulatorBackend vt100=makeBakend(term);
- term.setMaxHeight(10);
- vt100.setDimensions(3, 4);
- // the cursor still at the beginning....
- assertEquals(0,vt100.getCursorLine());
- assertEquals(0,vt100.getCursorColumn());
- vt100.setDimensions(6, 4);
- assertEquals(0,vt100.getCursorLine());
- assertEquals(0,vt100.getCursorColumn());
- vt100.setCursor(2, 3);
- vt100.setDimensions(8, 4);
- assertEquals(2,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
- }
-
- public void testSetCursorColumn() {
- ITerminalTextData term=makeITerminalTextData();
- IVT100EmulatorBackend vt100=makeBakend(term);
- term.setMaxHeight(6);
- vt100.setDimensions(3, 4);
- assertEquals(0,vt100.getCursorLine());
- assertEquals(0,vt100.getCursorColumn());
- vt100.setCursor(1, 0);
- vt100.setCursorColumn(2);
- assertEquals(1,vt100.getCursorLine());
- assertEquals(2,vt100.getCursorColumn());
- vt100.setCursor(-1, -2);
- vt100.setCursorColumn(-2);
- assertEquals(0,vt100.getCursorLine());
- assertEquals(0,vt100.getCursorColumn());
- vt100.setCursor(10, 0);
- vt100.setCursorColumn(10);
- assertEquals(2,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
- }
-
- public void testSetCursor() {
- ITerminalTextData term=makeITerminalTextData();
- IVT100EmulatorBackend vt100=makeBakend(term);
- term.setMaxHeight(6);
- vt100.setDimensions(3, 4);
- assertEquals(0,vt100.getCursorLine());
- assertEquals(0,vt100.getCursorColumn());
- vt100.setCursor(0, 0);
- assertEquals(0,vt100.getCursorLine());
- assertEquals(0,vt100.getCursorColumn());
- vt100.setCursor(1, 2);
- assertEquals(1,vt100.getCursorLine());
- assertEquals(2,vt100.getCursorColumn());
- vt100.setCursor(-1, -2);
- assertEquals(0,vt100.getCursorLine());
- assertEquals(0,vt100.getCursorColumn());
- vt100.setCursor(10, 10);
- assertEquals(2,vt100.getCursorLine());
- assertEquals(3,vt100.getCursorColumn());
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/AbstractITerminalTextDataTest.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/AbstractITerminalTextDataTest.java
deleted file mode 100644
index 493547a54..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/AbstractITerminalTextDataTest.java
+++ /dev/null
@@ -1,817 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tm.internal.terminal.model;
-import junit.framework.TestCase;
-
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-import org.eclipse.tm.terminal.model.ITerminalTextDataReadOnly;
-import org.eclipse.tm.terminal.model.LineSegment;
-import org.eclipse.tm.terminal.model.Style;
-import org.eclipse.tm.terminal.model.StyleColor;
-
-abstract public class AbstractITerminalTextDataTest extends TestCase {
- abstract protected ITerminalTextData makeITerminalTextData();
-
- protected void setUp() throws Exception {
- try {
- assert false;
- throw new Error("No Assertions! Run this code with assertions enabled! (vmargs: -ea)");
- } catch(AssertionError e) {
- // OK, assertions are enabled!
- }
- super.setUp();
- }
- protected String toSimple(ITerminalTextData term) {
- return TerminalTextTestHelper.toSimple(term);
- }
- protected String toMultiLineText(ITerminalTextDataReadOnly term) {
- return TerminalTextTestHelper.toMultiLineText(term);
- }
-
- protected void fill(ITerminalTextData term, String s) {
- TerminalTextTestHelper.fill(term,s);
- }
-
- protected void fill(ITerminalTextData term, int i, int j, String s) {
- TerminalTextTestHelper.fill(term,i,j,s);
- }
-
- protected void fillSimple(ITerminalTextData term, String s) {
- TerminalTextTestHelper.fillSimple(term, s);
- }
-
-
- /**
- * Used for multi line text
- * @param expected
- * @param actual
- */
- protected void assertEqualsTerm(String expected,String actual) {
- assertEquals(expected, actual);
- }
- /**
- * Used for simple text
- * @param expected
- * @param actual
- */
- protected void assertEqualsSimple(String expected,String actual) {
- assertEquals(-1,actual.indexOf('\n'));
- assertEquals(expected, actual);
- }
- public void testGetWidth() {
- ITerminalTextData term=makeITerminalTextData();
- assertEquals(0, term.getWidth());
- term.setDimensions(term.getHeight(), 10);
- assertEquals(10, term.getWidth());
- term.setDimensions(term.getHeight(), 0);
- assertEquals(0, term.getWidth());
- }
-
- public void testAddLine() {
- String s=
- "111\n" +
- "222\n" +
- "333\n" +
- "444\n" +
- "555";
- ITerminalTextData term=makeITerminalTextData();
- fill(term, s);
- term.setMaxHeight(5);
- term.addLine();
- assertEqualsTerm(
- "222\n" +
- "333\n" +
- "444\n" +
- "555\n" +
- "\000\000\000", toMultiLineText(term));
- }
- public void testCleanLine() {
- String s=
- "111\n" +
- "222\n" +
- "333\n" +
- "444\n" +
- "555";
- ITerminalTextData term=makeITerminalTextData();
- fill(term, s);
- term.cleanLine(0);
- assertEqualsTerm(
- "\000\000\000\n" +
- "222\n" +
- "333\n" +
- "444\n" +
- "555", toMultiLineText(term));
-
- fill(term, s);
- term.cleanLine(4);
- assertEqualsTerm(
- "111\n" +
- "222\n" +
- "333\n" +
- "444\n" +
- "\000\000\000", toMultiLineText(term));
- }
-
- public void testMaxSize() {
- String s=
- "111\n" +
- "222\n" +
- "333\n" +
- "444\n" +
- "555";
- ITerminalTextData term=makeITerminalTextData();
- term.setMaxHeight(8);
- fill(term, s);
- assertEquals(5, term.getHeight());
- assertEquals(8, term.getMaxHeight());
- term.addLine();
- assertEquals(6, term.getHeight());
- assertEqualsTerm(
- "111\n" +
- "222\n" +
- "333\n" +
- "444\n" +
- "555\n" +
- "\000\000\000", toMultiLineText(term));
- term.addLine();
- assertEquals(7, term.getHeight());
- assertEqualsTerm(
- "111\n" +
- "222\n" +
- "333\n" +
- "444\n" +
- "555\n" +
- "\000\000\000\n" +
- "\000\000\000", toMultiLineText(term));
- term.addLine();
- assertEquals(8, term.getHeight());
- assertEqualsTerm(
- "111\n" +
- "222\n" +
- "333\n" +
- "444\n" +
- "555\n" +
- "\000\000\000\n" +
- "\000\000\000\n" +
- "\000\000\000", toMultiLineText(term));
- term.addLine();
- assertEquals(8, term.getHeight());
- assertEqualsTerm(
- "222\n" +
- "333\n" +
- "444\n" +
- "555\n" +
- "\000\000\000\n" +
- "\000\000\000\n" +
- "\000\000\000\n" +
- "\000\000\000", toMultiLineText(term));
- term.addLine();
- assertEquals(8, term.getHeight());
- assertEqualsTerm(
- "333\n" +
- "444\n" +
- "555\n" +
- "\000\000\000\n" +
- "\000\000\000\n" +
- "\000\000\000\n" +
- "\000\000\000\n" +
- "\000\000\000", toMultiLineText(term));
- }
- public void testGetHeight() {
- ITerminalTextData term=makeITerminalTextData();
- assertEquals(0, term.getHeight());
- term.setDimensions(10, term.getWidth());
- assertEquals(10, term.getHeight());
- term.setDimensions(0, term.getWidth());
- assertEquals(0, term.getHeight());
- }
-
- public void testSetDimensions() {
- ITerminalTextData term=makeITerminalTextData();
- assertEquals(0, term.getHeight());
- term.setDimensions(10, 5);
- assertEquals(5, term.getWidth());
- assertEquals(10, term.getHeight());
- term.setDimensions(5, 10);
- assertEquals(10, term.getWidth());
- assertEquals(5, term.getHeight());
- term.setDimensions(15, 0);
- assertEquals(0, term.getWidth());
- assertEquals(15, term.getHeight());
- term.setDimensions(0, 12);
- assertEquals(12, term.getWidth());
- assertEquals(0, term.getHeight());
- term.setDimensions(0, 0);
- assertEquals(0, term.getWidth());
- assertEquals(0, term.getHeight());
- }
- public void testResize() {
- ITerminalTextData term=makeITerminalTextData();
- term.setDimensions(3, 5);
- String s="12345\n" +
- "abcde\n" +
- "ABCDE";
- fill(term,0,0,s);
- assertEqualsTerm(s, toMultiLineText(term));
- term.setDimensions(3, 4);
- assertEqualsTerm(
- "1234\n" +
- "abcd\n" +
- "ABCD", toMultiLineText(term));
- // the columns should be restored
- term.setDimensions(3, 5);
- assertEqualsTerm(
- "12345\n" +
- "abcde\n" +
- "ABCDE", toMultiLineText(term));
- term.setDimensions(3, 6);
- assertEqualsTerm(
- "12345\000\n" +
- "abcde\000\n" +
- "ABCDE\000", toMultiLineText(term));
- term.setChar(0, 5, 'x', null);
- term.setChar(1, 5, 'y', null);
- term.setChar(2, 5, 'z', null);
- assertEqualsTerm(
- "12345x\n" +
- "abcdey\n" +
- "ABCDEz", toMultiLineText(term));
- term.setDimensions(2, 4);
- assertEqualsTerm(
- "1234\n" +
- "abcd", toMultiLineText(term));
- }
-
- public void testResizeFailure() {
- ITerminalTextData term=makeITerminalTextData();
- term.setDimensions(3, 5);
- String s="12345\n" +
- "abcde\n" +
- "ABCDE";
- fill(term,0,0,s);
- assertEqualsTerm(s, toMultiLineText(term));
- try {
- term.setDimensions(-3, 4);
- fail();
- } catch (RuntimeException e) {
- // OK
- }
-// assertEquals(5, term.getWidth());
-// assertEquals(3, term.getHeight());
-// assertEquals(s, toSimpleText(term));
- }
-
- public void testGetLineSegments() {
- Style s1=getDefaultStyle();
- Style s2=s1.setBold(true);
- Style s3=s1.setUnderline(true);
- ITerminalTextData term=makeITerminalTextData();
- term.setDimensions(8, 8);
- LineSegment[] segments;
-
- term.setChars(0, 0,"0123".toCharArray(), s1);
- term.setChars(0, 4,"abcd".toCharArray(), null);
- segments=term.getLineSegments(0, 0, term.getWidth());
- assertEquals(2, segments.length);
- assertSegment(0, "0123", s1, segments[0]);
- assertSegment(4, "abcd", null, segments[1]);
-
-
- segments=term.getLineSegments(0, 4, term.getWidth()-4);
- assertEquals(1, segments.length);
- assertSegment(4, "abcd", null, segments[0]);
-
- segments=term.getLineSegments(0, 3, 2);
- assertEquals(2, segments.length);
- assertSegment(3, "3", s1, segments[0]);
- assertSegment(4, "a", null, segments[1]);
-
- segments=term.getLineSegments(0, 7, 1);
- assertEquals(1, segments.length);
- assertSegment(7, "d", null, segments[0]);
-
- segments=term.getLineSegments(0, 0, 1);
- assertEquals(1, segments.length);
- assertSegment(0, "0", s1, segments[0]);
-
- // line 1
- term.setChars(1, 0,"x".toCharArray(), s1);
- term.setChars(1, 1,"y".toCharArray(), s2);
- term.setChars(1, 2,"z".toCharArray(), s3);
-
- segments=term.getLineSegments(1, 0, term.getWidth());
- assertEquals(4, segments.length);
- assertSegment(0, "x", s1, segments[0]);
- assertSegment(1, "y", s2, segments[1]);
- assertSegment(2, "z", s3, segments[2]);
- assertSegment(3, "\000\000\000\000\000", null, segments[3]);
-
- // line 2
- term.setChars(2, 4,"klm".toCharArray(), s1);
- segments=term.getLineSegments(2, 0, term.getWidth());
- assertEquals(3, segments.length);
- assertSegment(0, "\000\000\000\000", null, segments[0]);
- assertSegment(4, "klm", s1, segments[1]);
- assertSegment(7, "\000", null, segments[2]);
-
- // line 3
- segments=term.getLineSegments(3, 0, term.getWidth());
- assertEquals(1, segments.length);
- assertSegment(0, "\000\000\000\000\000\000\000\000", null, segments[0]);
-
- }
- public void testGetLineSegmentsNull() {
- ITerminalTextData term=makeITerminalTextData();
- term.setDimensions(8, 8);
- LineSegment[] segments=term.getLineSegments(0, 0, term.getWidth());
- assertEquals(1, segments.length);
- }
- public void testGetLineSegmentsOutOfBounds() {
- ITerminalTextData term=makeITerminalTextData();
- term.setDimensions(1, 8);
- term.setChars(0,0,"xx".toCharArray(),null);
- LineSegment[] segments=term.getLineSegments(0, 5, 2);
- assertEquals(1, segments.length);
-
-
- }
- void assertSegment(int col,String text, Style style,LineSegment segment) {
- assertEquals(col, segment.getColumn());
- assertEqualsTerm(text, segment.getText());
- assertEquals(style, segment.getStyle());
-
- }
- public void testGetChar() {
- String s="12345\n" +
- "abcde\n" +
- "ABCDE";
- ITerminalTextData term=makeITerminalTextData();
- fill(term, s);
- assertEquals('1', term.getChar(0,0));
- assertEquals('2', term.getChar(0,1));
- assertEquals('3', term.getChar(0,2));
- assertEquals('4', term.getChar(0,3));
- assertEquals('5', term.getChar(0,4));
- assertEquals('a', term.getChar(1,0));
- assertEquals('b', term.getChar(1,1));
- assertEquals('c', term.getChar(1,2));
- assertEquals('d', term.getChar(1,3));
- assertEquals('e', term.getChar(1,4));
- assertEquals('A', term.getChar(2,0));
- assertEquals('B', term.getChar(2,1));
- assertEquals('C', term.getChar(2,2));
- assertEquals('D', term.getChar(2,3));
- assertEquals('E', term.getChar(2,4));
- try {
- term.getChar(0,-1);
- fail();
- } catch (RuntimeException e) {
- }
- try {
- term.getChar(-1,-1);
- fail();
- } catch (RuntimeException e) {
- }
- try {
- term.getChar(-1,0);
- fail();
- } catch (RuntimeException e) {
- }
- try {
- term.getChar(0,5);
- fail();
- } catch (RuntimeException e) {
- }
- try {
- term.getChar(3,5);
- fail();
- } catch (RuntimeException e) {
- }
- try {
- term.getChar(3,0);
- fail();
- } catch (RuntimeException e) {
- }
- }
-
- public void testGetStyle() {
- ITerminalTextData term=makeITerminalTextData();
- Style style=getDefaultStyle();
- term.setDimensions(6, 3);
- for (int line = 0; line < term.getHeight(); line++) {
- for (int column = 0; column < term.getWidth(); column++) {
- char c=(char)('a'+column+line);
- term.setChar(line, column, c, style.setForground(StyleColor.getStyleColor(""+c)));
- }
- }
- for (int line = 0; line < term.getHeight(); line++) {
- for (int column = 0; column < term.getWidth(); column++) {
- char c=(char)('a'+column+line);
- assertSame(style.setForground(StyleColor.getStyleColor(""+c)), term.getStyle(line, column));
- }
- }
-
- }
-
- protected Style getDefaultStyle() {
- return Style.getStyle(StyleColor.getStyleColor("fg"), StyleColor.getStyleColor("bg"), false, false, false, false);
- }
-
- public void testSetChar() {
- ITerminalTextData term=makeITerminalTextData();
- term.setDimensions(6, 3);
- for (int line = 0; line < term.getHeight(); line++) {
- for (int column = 0; column < term.getWidth(); column++) {
- term.setChar(line, column, (char)('a'+column+line), null);
- }
- }
- for (int line = 0; line < term.getHeight(); line++) {
- for (int column = 0; column < term.getWidth(); column++) {
- char c=(char)('a'+column+line);
- assertEquals(c, term.getChar(line,column));
- }
- }
- assertEqualsTerm(
- "abc\n"
- + "bcd\n"
- + "cde\n"
- + "def\n"
- + "efg\n"
- + "fgh", toMultiLineText(term));
- }
- public void testSetChars() {
- ITerminalTextData term=makeITerminalTextData();
- term.setDimensions(6, 3);
- for (int line = 0; line < term.getHeight(); line++) {
- char[] chars=new char[term.getWidth()];
- for (int column = 0; column < term.getWidth(); column++) {
- chars[column]=(char)('a'+column+line);
- }
- term.setChars(line, 0, chars, null);
- }
- for (int line = 0; line < term.getHeight(); line++) {
- for (int column = 0; column < term.getWidth(); column++) {
- char c=(char)('a'+column+line);
- assertEquals(c, term.getChar(line,column));
- }
- }
- assertEqualsTerm(
- "abc\n"
- + "bcd\n"
- + "cde\n"
- + "def\n"
- + "efg\n"
- + "fgh", toMultiLineText(term));
-
- term.setChars(3, 1, new char[]{'1','2'}, null);
- assertEqualsTerm(
- "abc\n"
- + "bcd\n"
- + "cde\n"
- + "d12\n"
- + "efg\n"
- + "fgh", toMultiLineText(term));
- try {
- // check if we cannot exceed the range
- term.setChars(4, 1, new char[]{'1','2','3','4','5'}, null);
- fail();
- } catch (RuntimeException e) {}
-
- }
- public void testSetCharsLen() {
- ITerminalTextData term=makeITerminalTextData();
- String s= "ZYXWVU\n"
- + "abcdef\n"
- + "ABCDEF";
- fill(term, s);
- char[] chars=new char[]{'1','2','3','4','5','6','7','8'};
- term.setChars(1, 0, chars, 0, 6,null);
- assertEqualsTerm(
- "ZYXWVU\n"
- + "123456\n"
- + "ABCDEF", toMultiLineText(term));
-
- fill(term, s);
- term.setChars(1, 0, chars, 0, 5, null);
- assertEqualsTerm("ZYXWVU\n"
- + "12345f\n"
- + "ABCDEF", toMultiLineText(term));
-
- fill(term, s);
- term.setChars(1, 0, chars, 1, 5, null);
- assertEqualsTerm("ZYXWVU\n"
- + "23456f\n"
- + "ABCDEF", toMultiLineText(term));
-
- fill(term, s);
- term.setChars(1, 1, chars, 1, 4, null);
- assertEqualsTerm("ZYXWVU\n"
- + "a2345f\n"
- + "ABCDEF", toMultiLineText(term));
-
-
-
- fill(term, s);
- term.setChars(1, 2, chars, 3, 4, null);
- assertEqualsTerm("ZYXWVU\n"
- + "ab4567\n"
- + "ABCDEF", toMultiLineText(term));
-
- fill(term, s);
- try {
- term.setChars(1, 0, chars, 7, 10, null);
- fail();
- } catch (RuntimeException e) {}
- fill(term, s);
- try {
- term.setChars(1, -1, chars, 0, 2, null);
- fail();
- } catch (RuntimeException e) {}
- try {
- term.setChars(-1, 1, chars, 0, 2, null);
- fail();
- } catch (RuntimeException e) {}
- try {
- term.setChars(1, 10, chars, 0, 2, null);
- fail();
- } catch (RuntimeException e) {}
- try {
- term.setChars(10, 1, chars, 0, 2, null);
- fail();
- } catch (RuntimeException e) {}
-// assertEquals(s, toSimpleText(term));
- }
- public void testSetCopyInto() {
- ITerminalTextData term=makeITerminalTextData();
- term.setDimensions(3, 5);
- String s="12345\n" +
- "abcde\n" +
- "ABCDE";
- fill(term,0,0,s);
- ITerminalTextData termCopy=makeITerminalTextData();
- termCopy.copy(term);
- assertEqualsTerm(s, toMultiLineText(termCopy));
- assertEqualsTerm(s, toMultiLineText(term));
-
- termCopy.setChar(1, 1, 'X', null);
- assertEqualsTerm(s, toMultiLineText(term));
- term.setDimensions(2, 4);
- assertEquals(5, termCopy.getWidth());
- assertEquals(3, termCopy.getHeight());
-
- assertEqualsTerm("12345\n" +
- "aXcde\n" +
- "ABCDE", toMultiLineText(termCopy));
-
- assertEquals(4, term.getWidth());
- assertEquals(2, term.getHeight());
- }
- public void testSetCopyLines() {
- ITerminalTextData term=makeITerminalTextData();
- String s="012345";
- fillSimple(term, s);
- ITerminalTextData termCopy=makeITerminalTextData();
- String sCopy="abcde";
- fillSimple(termCopy, sCopy);
- termCopy.copyRange(term,0,0,0);
- assertEqualsSimple(s, toSimple(term));
- assertEqualsSimple(sCopy, toSimple(termCopy));
-
- fillSimple(termCopy, sCopy);
- termCopy.copyRange(term,0,0,5);
- assertEqualsSimple(s, toSimple(term));
- assertEqualsSimple("01234", toSimple(termCopy));
-
- fillSimple(termCopy, sCopy);
- termCopy.copyRange(term,0,0,2);
- assertEqualsSimple(s, toSimple(term));
- assertEqualsSimple("01cde", toSimple(termCopy));
-
- fillSimple(termCopy, sCopy);
- termCopy.copyRange(term,0,1,2);
- assertEqualsSimple(s, toSimple(term));
- assertEqualsSimple("a01de", toSimple(termCopy));
-
- fillSimple(termCopy, sCopy);
- termCopy.copyRange(term,1,1,2);
- assertEqualsSimple(s, toSimple(term));
- assertEqualsSimple("a12de", toSimple(termCopy));
-
- fillSimple(termCopy, sCopy);
- termCopy.copyRange(term,1,1,4);
- assertEqualsSimple(s, toSimple(term));
- assertEqualsSimple("a1234", toSimple(termCopy));
-
- fillSimple(termCopy, sCopy);
- termCopy.copyRange(term,2,1,4);
- assertEqualsSimple(s, toSimple(term));
- assertEqualsSimple("a2345", toSimple(termCopy));
-
- try {
- fillSimple(termCopy, sCopy);
- termCopy.copyRange(term,1,1,5);
- fail();
- } catch (RuntimeException e) {}
- try {
- fillSimple(termCopy, sCopy);
- termCopy.copyRange(term,0,0,6);
- fail();
- } catch (RuntimeException e) {}
- try {
- fillSimple(termCopy, sCopy);
- termCopy.copyRange(term,7,0,1);
- fail();
- } catch (RuntimeException e) {}
- try {
- fillSimple(termCopy, sCopy);
- termCopy.copyRange(term,0,7,1);
- fail();
- } catch (RuntimeException e) {}
- }
- public void testCopyLine() {
- ITerminalTextData term=makeITerminalTextData();
- String s=
- "111\n" +
- "222\n" +
- "333\n" +
- "444\n" +
- "555";
- fill(term, s);
- ITerminalTextData dest=makeITerminalTextData();
- String sCopy=
- "aaa\n" +
- "bbb\n" +
- "ccc\n" +
- "ddd\n" +
- "eee";
- fill(dest, sCopy);
- copySelective(dest,term,0,0,new boolean []{true,true,false,false,true});
- assertEqualsTerm(s, toMultiLineText(term));
- assertEqualsTerm(
- "111\n" +
- "222\n" +
- "ccc\n" +
- "ddd\n" +
- "555", toMultiLineText(dest));
-
- fill(dest, sCopy);
- copySelective(dest,term,0,0,new boolean []{true,true,true,true,true});
- assertEqualsTerm(s, toMultiLineText(term));
- assertEqualsTerm(s, toMultiLineText(dest));
-
- fill(dest, sCopy);
- copySelective(dest,term,0,0,new boolean []{false,false,false,false,false});
- assertEqualsTerm(s, toMultiLineText(term));
- assertEqualsTerm(sCopy, toMultiLineText(dest));
- }
- protected void copySelective(ITerminalTextData dest, ITerminalTextData source, int sourceStartLine, int destStartLine, boolean[] linesToCopy) {
- for (int i = 0; i < linesToCopy.length; i++) {
- if(linesToCopy[i]) {
- dest.copyLine(source, i+sourceStartLine, i+destStartLine);
- }
- }
- }
-
- public void testCopyLineWithOffset() {
- ITerminalTextData term=makeITerminalTextData();
- String s=
- "111\n" +
- "222\n" +
- "333\n" +
- "444\n" +
- "555";
- fill(term, s);
- ITerminalTextData dest=makeITerminalTextData();
- String sCopy=
- "aaa\n" +
- "bbb\n" +
- "ccc\n" +
- "ddd\n" +
- "eee";
- fill(dest, sCopy);
- copySelective(dest,term,1,0,new boolean []{true,false,false,true});
- assertEqualsTerm(s, toMultiLineText(term));
- assertEqualsTerm(
- "222\n" +
- "bbb\n" +
- "ccc\n" +
- "555\n" +
- "eee", toMultiLineText(dest));
-
- fill(dest, sCopy);
- copySelective(dest,term,2,0,new boolean []{true,true});
- assertEqualsTerm(s, toMultiLineText(term));
- assertEqualsTerm(
- "333\n" +
- "444\n" +
- "ccc\n" +
- "ddd\n" +
- "eee", toMultiLineText(dest));
-
- fill(dest, sCopy);
- copySelective(dest,term,0,0,new boolean []{true,true,true,true,true});
- assertEqualsTerm(s, toMultiLineText(term));
- assertEqualsTerm(s, toMultiLineText(dest));
-
- fill(dest, sCopy);
- copySelective(dest,term,0,0,new boolean []{false,false,false,false,false});
- assertEqualsTerm(s, toMultiLineText(term));
- assertEqualsTerm(sCopy, toMultiLineText(dest));
- }
- public void testScrollNoop() {
- scrollTest(0,0,0, "012345","012345");
- scrollTest(0,1,0, "012345","012345");
- scrollTest(0,6,0, "012345","012345");
- }
- public void testScrollAll() {
- scrollTest(0,6,1, "012345"," 01234");
- scrollTest(0,6,-1, "012345","12345 ");
- scrollTest(0,6,2, "012345"," 0123");
- scrollTest(0,6,-2, "012345","2345 ");
- }
- public void testScrollNegative() {
- scrollTest(0,2,-1,"012345","1 2345");
- scrollTest(0,1,-1,"012345"," 12345");
- scrollTest(0,6,-1,"012345","12345 ");
- scrollTest(0,6,-6,"012345"," ");
- scrollTest(0,6,-7,"012345"," ");
- scrollTest(0,6,-8,"012345"," ");
- scrollTest(0,6,-2,"012345","2345 ");
- scrollTest(1,1,-1,"012345","0 2345");
- scrollTest(1,1,-1,"012345","0 2345");
- scrollTest(1,2,-1,"012345","02 345");
- scrollTest(5,1,-1,"012345","01234 ");
- scrollTest(5,1,-1,"012345","01234 ");
- }
- public void testScrollNegative2() {
- scrollTest(0,2,-1," 23 "," 23 ");
- scrollTest(0,1,-1," 23 "," 23 ");
- scrollTest(0,6,-1," 23 "," 23 ");
- scrollTest(0,6,-6," 23 "," ");
- scrollTest(0,6,-7," 23 "," ");
- scrollTest(0,6,-8," 23 "," ");
- scrollTest(0,6,-2," 23 ","23 ");
- scrollTest(1,1,-1," 23 "," 23 ");
- scrollTest(1,2,-1," 23 "," 2 3 ");
- scrollTest(5,1,-1," 23 "," 23 ");
- scrollTest(5,1,-1," 23 "," 23 ");
- }
- public void testScrollNegative3() {
- scrollTest(1,5,-7,"012345","0 ");
- }
- public void testScrollPositive2() {
- scrollTest(2,8,20, "0123456789", "01 ");
- }
- public void testScrollPositive() {
- scrollTest(0,2,1, "012345", " 02345");
- scrollTest(0,2,2, "012345", " 2345");
- scrollTest(2,4,2, "012345", "01 23");
- scrollTest(2,4,2, "0123456", "01 236");
- scrollTest(0,7,6, "0123456", " 0");
- scrollTest(0,7,8, "0123456", " ");
- scrollTest(0,7,9, "0123456", " ");
- scrollTest(2,4,2, "0123456", "01 236");
- scrollTest(2,5,3, "0123456789", "01 23789");
- scrollTest(2,7,3, "0123456789", "01 23459");
- scrollTest(2,8,3, "0123456789", "01 23456");
- scrollTest(2,8,5, "0123456789", "01 234");
- scrollTest(2,8,9, "0123456789", "01 ");
- scrollTest(0,10,9,"0123456789", " 0");
- scrollTest(0,6,6, "012345", " ");
- }
- public void testScrollFail() {
- try {
- scrollTest(5,2,-1,"012345","012345");
- fail();
- } catch (RuntimeException e) {
- }
- try {
- scrollTest(0,7,1,"012345"," ");
- fail();
- } catch (RuntimeException e) {
- }
- }
- /**
- * Makes a simple shift test
- * @param line scroll start
- * @param n number of lines to be scrolled
- * @param shift amount of lines to be shifted
- * @param start the original data
- * @param result the expected result
- */
- void scrollTest(int line,int n, int shift, String start,String result) {
- ITerminalTextData term=makeITerminalTextData();
- fillSimple(term,start);
- term.scroll(line, n, shift);
- assertEqualsSimple(result, toSimple(term));
-
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/AllTests.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/AllTests.java
deleted file mode 100644
index f0101879f..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/AllTests.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Martin Oberhuber (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.model;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-/**
- * Internal Terminal Model test cases.
- * Runs in internal model package to allow access to default visible items.
- */
-public class AllTests extends TestCase {
- public AllTests() {
- super(null);
- }
-
- public AllTests(String name) {
- super(name);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite(AllTests.class.getName());
- suite.addTestSuite(SnapshotChangesTest.class);
- suite.addTestSuite(SynchronizedTerminalTextDataTest.class);
- suite.addTestSuite(TerminalTextDataFastScrollTest.class);
- suite.addTestSuite(TerminalTextDataFastScrollTestMaxHeigth.class);
- suite.addTestSuite(TerminalTextDataPerformanceTest.class);
- suite.addTestSuite(TerminalTextDataSnapshotTest.class);
- suite.addTestSuite(TerminalTextDataSnapshotWindowTest.class);
- suite.addTestSuite(TerminalTextDataStoreTest.class);
- suite.addTestSuite(TerminalTextDataTest.class);
- suite.addTestSuite(TerminalTextDataWindowTest.class);
- return suite;
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/SnapshotChangesTest.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/SnapshotChangesTest.java
deleted file mode 100644
index 464f0d711..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/SnapshotChangesTest.java
+++ /dev/null
@@ -1,679 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Michael Scharf (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.model;
-
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-
-import junit.framework.TestCase;
-
-public class SnapshotChangesTest extends TestCase {
- /**
- * @param change
- * @param expected a string of 0 and 1 (1 means changed)
- */
- void assertChangedLines(ISnapshotChanges change, String expected) {
- StringBuffer buffer=new StringBuffer();
- for (int line = 0; line < expected.length(); line++) {
- if(change.hasLineChanged(line))
- buffer.append('1');
- else
- buffer.append('0');
- }
- assertEquals(expected, buffer.toString());
- }
-
- public void testSnapshotChanges() {
- SnapshotChanges changes=new SnapshotChanges(1);
- assertEquals(0, changes.getInterestWindowStartLine());
- assertEquals(0, changes.getInterestWindowSize());
- }
- public void testSnapshotChangesWithWindow() {
- SnapshotChanges changes=new SnapshotChanges(2,5);
- assertEquals(2, changes.getInterestWindowStartLine());
- assertEquals(5, changes.getInterestWindowSize());
- }
-
- public void testIsInInterestWindowIntInt() {
- SnapshotChanges changes=new SnapshotChanges(2,5);
- assertFalse(changes.isInInterestWindow(0, 1));
- assertFalse(changes.isInInterestWindow(0, 2));
- assertTrue(changes.isInInterestWindow(0, 3));
- assertTrue(changes.isInInterestWindow(0, 4));
- assertTrue(changes.isInInterestWindow(0, 5));
- assertTrue(changes.isInInterestWindow(0, 6));
- assertTrue(changes.isInInterestWindow(0, 10));
- assertTrue(changes.isInInterestWindow(2, 5));
- assertTrue(changes.isInInterestWindow(6, 0));
- assertTrue(changes.isInInterestWindow(6, 1));
- assertTrue(changes.isInInterestWindow(6, 10));
- assertFalse(changes.isInInterestWindow(7, 0));
- assertFalse(changes.isInInterestWindow(7, 1));
- assertFalse(changes.isInInterestWindow(8, 10));
- }
- public void testIsInInterestWindowIntIntNoWindow() {
- SnapshotChanges changes=new SnapshotChanges(3);
- for (int i = 0; i < 5; i++) {
- for (int j = 0; j < 5; j++) {
- assertTrue(changes.isInInterestWindow(i,j));
- }
- }
- }
-
- public void testIsInInterestWindowInt() {
- SnapshotChanges changes=new SnapshotChanges(3,1);
- assertFalse(changes.isInInterestWindow(0));
- assertFalse(changes.isInInterestWindow(1));
- assertFalse(changes.isInInterestWindow(2));
- assertTrue(changes.isInInterestWindow(3));
- assertFalse(changes.isInInterestWindow(4));
- assertFalse(changes.isInInterestWindow(5));
- }
-
- public void testIsInInterestWindowIntNoWindow() {
- SnapshotChanges changes=new SnapshotChanges(3);
- for (int i = 0; i < 10; i++) {
- assertTrue(changes.isInInterestWindow(i));
- }
- }
-
- public void testFitLineToWindow() {
- SnapshotChanges changes=new SnapshotChanges(2,5);
- assertEquals(2, changes.fitLineToWindow(0));
- assertEquals(2, changes.fitLineToWindow(1));
- assertEquals(2, changes.fitLineToWindow(2));
- assertEquals(3, changes.fitLineToWindow(3));
-
- assertTrue(changes.isInInterestWindow(4));
- assertEquals(4, changes.fitLineToWindow(4));
-
- assertTrue(changes.isInInterestWindow(5));
- assertEquals(5, changes.fitLineToWindow(5));
-
- assertTrue(changes.isInInterestWindow(6));
- assertEquals(6, changes.fitLineToWindow(6));
-
- assertFalse(changes.isInInterestWindow(7));
- // value undefined!
- assertEquals(7, changes.fitLineToWindow(7));
-
- assertFalse(changes.isInInterestWindow(8));
- // value undefined!
- assertEquals(8, changes.fitLineToWindow(8));
- }
-
- public void testFitLineToWindowNoWindow() {
- SnapshotChanges changes=new SnapshotChanges(5);
- assertEquals(0, changes.fitLineToWindow(0));
- assertEquals(1, changes.fitLineToWindow(1));
- assertEquals(2, changes.fitLineToWindow(2));
- assertEquals(3, changes.fitLineToWindow(3));
- assertEquals(4, changes.fitLineToWindow(4));
- assertEquals(5, changes.fitLineToWindow(5));
- assertEquals(6, changes.fitLineToWindow(6));
- assertEquals(7, changes.fitLineToWindow(7));
- }
- public void testFitSizeToWindow() {
- SnapshotChanges changes=new SnapshotChanges(2,3);
- assertFalse(changes.isInInterestWindow(0, 1));
- assertFalse(changes.isInInterestWindow(0, 2));
- assertTrue(changes.isInInterestWindow(0, 3));
- assertEquals(1, changes.fitSizeToWindow(0,3));
- assertEquals(2, changes.fitSizeToWindow(0,4));
- assertEquals(3, changes.fitSizeToWindow(0,5));
- assertEquals(3, changes.fitSizeToWindow(0,6));
- assertEquals(3, changes.fitSizeToWindow(0,7));
- assertEquals(3, changes.fitSizeToWindow(0,8));
- assertEquals(3, changes.fitSizeToWindow(0,9));
- assertEquals(3, changes.fitSizeToWindow(1,9));
- assertEquals(3, changes.fitSizeToWindow(2,9));
- assertEquals(3, changes.fitSizeToWindow(2,3));
- assertEquals(2, changes.fitSizeToWindow(2,2));
- assertEquals(1, changes.fitSizeToWindow(2,1));
- assertEquals(2, changes.fitSizeToWindow(3,9));
- assertEquals(2, changes.fitSizeToWindow(3,2));
- assertEquals(1, changes.fitSizeToWindow(3,1));
- assertEquals(2, changes.fitSizeToWindow(3,2));
- assertEquals(2, changes.fitSizeToWindow(3,3));
- assertEquals(1, changes.fitSizeToWindow(4,1));
- assertEquals(1, changes.fitSizeToWindow(4,2));
- assertFalse(changes.isInInterestWindow(5, 1));
-
- }
- public void testFitSizeToWindowNoWindow() {
- SnapshotChanges changes=new SnapshotChanges(3);
- assertEquals(1, changes.fitSizeToWindow(0,1));
- assertEquals(2, changes.fitSizeToWindow(0,2));
- assertEquals(3, changes.fitSizeToWindow(0,3));
- assertEquals(4, changes.fitSizeToWindow(0,4));
- assertEquals(5, changes.fitSizeToWindow(0,5));
-
- assertEquals(5, changes.fitSizeToWindow(1,5));
- assertEquals(3, changes.fitSizeToWindow(2,3));
- assertEquals(2, changes.fitSizeToWindow(1,2));
- assertEquals(10, changes.fitSizeToWindow(5,10));
- }
-
- public void testMarkLineChanged() {
- SnapshotChanges changes=new SnapshotChanges(2,3);
- assertFalse(changes.hasChanged());
- changes.markLineChanged(0);
- assertFalse(changes.hasChanged());
- changes.markLineChanged(1);
- assertFalse(changes.hasChanged());
- changes.markLineChanged(2);
- assertTrue(changes.hasChanged());
-
- changes=new SnapshotChanges(2,3);
- assertFalse(changes.hasChanged());
- changes.markLineChanged(3);
- assertTrue(changes.hasChanged());
-
- assertLineChange(false,2,3,0);
- assertLineChange(false,2,3,1);
- assertLineChange(true,2,3,2);
- assertLineChange(true,2,3,3);
- assertLineChange(true,2,3,4);
- assertLineChange(false,2,3,5);
- assertLineChange(false,2,3,6);
-
- assertLineChange(true,2,4,5);
- }
- void assertLineChange(boolean expected, int windowStart, int windowSize, int changedLine) {
- SnapshotChanges changes=new SnapshotChanges(windowStart,windowSize);
- assertFalse(changes.hasChanged());
- changes.markLineChanged(changedLine);
- if(expected) {
- assertEquals(changedLine, changes.getFirstChangedLine());
- assertEquals(changedLine, changes.getLastChangedLine());
- } else {
- assertEquals(Integer.MAX_VALUE, changes.getFirstChangedLine());
- assertEquals(-1, changes.getLastChangedLine());
-
- }
- assertEquals(expected,changes.hasChanged());
- for (int i = 0; i < windowStart+windowSize+5; i++) {
- boolean e= i==changedLine && i>=windowStart && i<windowStart+windowSize;
- assertEquals(e, changes.hasLineChanged(i));
- }
-
- }
- public void testMarkLinesChanged() {
- SnapshotChanges changes=new SnapshotChanges(2,3);
- assertFalse(changes.hasChanged());
- assertEquals(Integer.MAX_VALUE, changes.getFirstChangedLine());
- assertEquals(-1, changes.getLastChangedLine());
- changes.markLinesChanged(0, 1);
- assertChangedLines(changes, "00000000000");
- assertFalse(changes.hasChanged());
- assertEquals(Integer.MAX_VALUE, changes.getFirstChangedLine());
- assertEquals(-1, changes.getLastChangedLine());
- changes.markLinesChanged(0, 2);
- assertChangedLines(changes, "00000000000");
- assertFalse(changes.hasChanged());
- assertEquals(Integer.MAX_VALUE, changes.getFirstChangedLine());
- assertEquals(-1, changes.getLastChangedLine());
- changes.markLinesChanged(0, 3);
- assertEquals(2, changes.getFirstChangedLine());
- assertEquals(2, changes.getLastChangedLine());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "00100000000");
-
- changes=new SnapshotChanges(2,3);
- changes.markLinesChanged(1, 3);
- assertTrue(changes.hasChanged());
- assertEquals(2, changes.getFirstChangedLine());
- assertEquals(3, changes.getLastChangedLine());
- assertChangedLines(changes, "00110000000");
-
- changes=new SnapshotChanges(2,3);
- changes.markLinesChanged(1, 4);
- assertEquals(2, changes.getFirstChangedLine());
- assertEquals(4, changes.getLastChangedLine());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "00111000000");
-
- changes=new SnapshotChanges(2,3);
- changes.markLinesChanged(1, 4);
- assertEquals(2, changes.getFirstChangedLine());
- assertEquals(4, changes.getLastChangedLine());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "00111000000");
-
- changes=new SnapshotChanges(2,3);
- changes.markLinesChanged(2, 4);
- assertEquals(2, changes.getFirstChangedLine());
- assertEquals(4, changes.getLastChangedLine());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "00111000000");
-
-
- changes=new SnapshotChanges(2,3);
- changes.markLinesChanged(3, 4);
- assertEquals(3, changes.getFirstChangedLine());
- assertEquals(4, changes.getLastChangedLine());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "00011000000");
-
- changes=new SnapshotChanges(2,3);
- changes.markLinesChanged(3, 1);
- assertEquals(3, changes.getFirstChangedLine());
- assertEquals(3, changes.getLastChangedLine());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "00010000000");
-
- changes=new SnapshotChanges(2,3);
- changes.markLinesChanged(4, 1);
- assertEquals(4, changes.getFirstChangedLine());
- assertEquals(4, changes.getLastChangedLine());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "00001000000");
-
- changes=new SnapshotChanges(2,3);
- changes.markLinesChanged(5, 1);
- assertEquals(Integer.MAX_VALUE, changes.getFirstChangedLine());
- assertEquals(-1, changes.getLastChangedLine());
- assertFalse(changes.hasChanged());
- assertChangedLines(changes, "00000000000");
- }
- public void testMarkLinesChangedNoWindow() {
- SnapshotChanges changes=new SnapshotChanges(10);
- assertFalse(changes.hasChanged());
- assertEquals(Integer.MAX_VALUE, changes.getFirstChangedLine());
- assertEquals(-1, changes.getLastChangedLine());
-
- changes.markLinesChanged(0, 1);
- assertTrue(changes.hasChanged());
- assertEquals(0, changes.getFirstChangedLine());
- assertEquals(0, changes.getLastChangedLine());
- assertChangedLines(changes, "1000000000");
-
- changes=new SnapshotChanges(10);
- changes.markLinesChanged(0, 5);
- assertTrue(changes.hasChanged());
- assertEquals(0, changes.getFirstChangedLine());
- assertEquals(4, changes.getLastChangedLine());
- assertChangedLines(changes, "1111100000");
-
- changes=new SnapshotChanges(3);
- changes.markLinesChanged(1, 6);
- assertTrue(changes.hasChanged());
- assertEquals(1, changes.getFirstChangedLine());
- assertEquals(6, changes.getLastChangedLine());
- assertChangedLines(changes, "011");
-
-
- changes=new SnapshotChanges(10);
- changes.markLinesChanged(5, 6);
- assertTrue(changes.hasChanged());
- assertEquals(5, changes.getFirstChangedLine());
- assertEquals(10, changes.getLastChangedLine());
- assertChangedLines(changes, "0000011111");
-
- }
-
- public void testHasChanged() {
- SnapshotChanges changes=new SnapshotChanges(0);
- assertFalse(changes.hasChanged());
- changes=new SnapshotChanges(1);
- assertFalse(changes.hasChanged());
- changes=new SnapshotChanges(1,9);
- assertFalse(changes.hasChanged());
- }
-
- public void testSetAllChanged() {
- SnapshotChanges changes;
- changes=new SnapshotChanges(2,3);
- changes.setAllChanged(10);
- assertEquals(2, changes.getFirstChangedLine());
- assertEquals(4, changes.getLastChangedLine());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "00111000000");
-
- changes=new SnapshotChanges(2,3);
- changes.setAllChanged(3);
- assertEquals(2, changes.getFirstChangedLine());
- assertEquals(2, changes.getLastChangedLine());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "00111000000");
-
- changes=new SnapshotChanges(2,3);
- changes.setAllChanged(4);
- assertEquals(2, changes.getFirstChangedLine());
- assertEquals(3, changes.getLastChangedLine());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "00111000000");
-
- changes=new SnapshotChanges(2,3);
- changes.setAllChanged(5);
- assertEquals(2, changes.getFirstChangedLine());
- assertEquals(4, changes.getLastChangedLine());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "00111000000");
-
- changes=new SnapshotChanges(2,3);
- changes.setAllChanged(6);
- assertEquals(2, changes.getFirstChangedLine());
- assertEquals(4, changes.getLastChangedLine());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "00111000000");
- }
- public void testSetAllChangedNoWindow() {
- SnapshotChanges changes;
- changes=new SnapshotChanges(5);
- changes.setAllChanged(10);
- assertEquals(0, changes.getFirstChangedLine());
- assertEquals(9, changes.getLastChangedLine());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "1111111111");
-
- changes=new SnapshotChanges(5);
- changes.setAllChanged(3);
- assertEquals(0, changes.getFirstChangedLine());
- assertEquals(2, changes.getLastChangedLine());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "1111111111");
-
- }
-
- public void testConvertScrollingIntoChanges() {
- SnapshotChanges changes;
- changes=new SnapshotChanges(2,3);
- changes.scroll(0, 4, -1);
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "000100");
- changes.convertScrollingIntoChanges();
- assertEquals(2, changes.getFirstChangedLine());
- assertEquals(3, changes.getLastChangedLine());
- assertEquals(0, changes.getScrollWindowStartLine());
- assertEquals(0, changes.getScrollWindowSize());
- assertEquals(0, changes.getScrollWindowShift());
- assertChangedLines(changes, "001100");
- }
-
- public void testConvertScrollingIntoChangesNoWindow() {
- SnapshotChanges changes;
- changes=new SnapshotChanges(7);
- changes.scroll(0, 4, -1);
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "000100");
- changes.convertScrollingIntoChanges();
- assertEquals(0, changes.getFirstChangedLine());
- assertEquals(3, changes.getLastChangedLine());
- assertEquals(0, changes.getScrollWindowStartLine());
- assertEquals(0, changes.getScrollWindowSize());
- assertEquals(0, changes.getScrollWindowShift());
- assertChangedLines(changes, "111100");
- }
- public void testScrollNoWindow() {
- SnapshotChanges changes;
- changes=new SnapshotChanges(7);
- changes.scroll(0, 3, -2);
- assertEquals(1, changes.getFirstChangedLine());
- assertEquals(2, changes.getLastChangedLine());
- assertEquals(0, changes.getScrollWindowStartLine());
- assertEquals(3, changes.getScrollWindowSize());
- assertEquals(-2, changes.getScrollWindowShift());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "0110000");
-
- changes=new SnapshotChanges(7);
- changes.scroll(0, 3, -1);
- changes.scroll(0, 3, -1);
- assertEquals(1, changes.getFirstChangedLine());
- assertEquals(2, changes.getLastChangedLine());
- assertEquals(0, changes.getScrollWindowStartLine());
- assertEquals(3, changes.getScrollWindowSize());
- assertEquals(-2, changes.getScrollWindowShift());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "0110000");
-
- changes=new SnapshotChanges(7);
- changes.scroll(0, 7, -1);
- changes.scroll(0, 7, -1);
- assertEquals(5, changes.getFirstChangedLine());
- assertEquals(6, changes.getLastChangedLine());
- assertEquals(0, changes.getScrollWindowStartLine());
- assertEquals(7, changes.getScrollWindowSize());
- assertEquals(-2, changes.getScrollWindowShift());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "0000011");
-
- // positive scrolls cannot be optimized at the moment
- changes=new SnapshotChanges(7);
- changes.scroll(0, 7, 1);
- changes.scroll(0, 7, 1);
- assertEquals(0, changes.getFirstChangedLine());
- assertEquals(6, changes.getLastChangedLine());
- assertEquals(0, changes.getScrollWindowStartLine());
- assertEquals(0, changes.getScrollWindowSize());
- assertEquals(0, changes.getScrollWindowShift());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "1111111");
-
- }
- public void testScroll() {
- SnapshotChanges changes;
- changes=new SnapshotChanges(2,3);
- changes.scroll(0, 7, -1);
- assertEquals(4, changes.getFirstChangedLine());
- assertEquals(4, changes.getLastChangedLine());
- assertEquals(2, changes.getScrollWindowStartLine());
- assertEquals(3, changes.getScrollWindowSize());
- assertEquals(-1, changes.getScrollWindowShift());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "0000100000");
-
- changes=new SnapshotChanges(2,3);
- changes.scroll(0, 7, -2);
- assertEquals(3, changes.getFirstChangedLine());
- assertEquals(4, changes.getLastChangedLine());
- assertEquals(2, changes.getScrollWindowStartLine());
- assertEquals(3, changes.getScrollWindowSize());
- assertEquals(-2, changes.getScrollWindowShift());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "0001100000");
- }
- public void testScrollNergative() {
- SnapshotChanges changes;
- changes=new SnapshotChanges(2,3);
- changes.scroll(0, 7, -1);
- changes.scroll(0, 7, -1);
- assertEquals(3, changes.getFirstChangedLine());
- assertEquals(4, changes.getLastChangedLine());
- assertEquals(2, changes.getScrollWindowStartLine());
- assertEquals(3, changes.getScrollWindowSize());
- assertEquals(-2, changes.getScrollWindowShift());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "0001100000");
-
- }
- public void testScrollPositive() {
- SnapshotChanges changes;
- changes=new SnapshotChanges(2,3);
- changes.scroll(0, 7, 1);
- changes.scroll(0, 7, 1);
- assertEquals(2, changes.getFirstChangedLine());
- assertEquals(4, changes.getLastChangedLine());
- assertEquals(0, changes.getScrollWindowStartLine());
- assertEquals(0, changes.getScrollWindowSize());
- assertEquals(0, changes.getScrollWindowShift());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "0011100000");
-
- changes=new SnapshotChanges(2,3);
- changes.scroll(0, 3, 1);
- changes.scroll(0, 3, 1);
- assertEquals(2, changes.getFirstChangedLine());
- assertEquals(2, changes.getLastChangedLine());
- assertEquals(0, changes.getScrollWindowStartLine());
- assertEquals(0, changes.getScrollWindowSize());
- assertEquals(0, changes.getScrollWindowShift());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "0010000000");
-
- changes=new SnapshotChanges(2,3);
- changes.scroll(0, 4, 1);
- changes.scroll(0, 4, 1);
- assertEquals(2, changes.getFirstChangedLine());
- assertEquals(3, changes.getLastChangedLine());
- assertEquals(0, changes.getScrollWindowStartLine());
- assertEquals(0, changes.getScrollWindowSize());
- assertEquals(0, changes.getScrollWindowShift());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "0011000000");
-
- changes=new SnapshotChanges(2,3);
- changes.scroll(0, 5, 1);
- changes.scroll(0, 5, 1);
- assertEquals(2, changes.getFirstChangedLine());
- assertEquals(4, changes.getLastChangedLine());
- assertEquals(0, changes.getScrollWindowStartLine());
- assertEquals(0, changes.getScrollWindowSize());
- assertEquals(0, changes.getScrollWindowShift());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "0011100000");
-
- changes=new SnapshotChanges(2,3);
- changes.scroll(3, 5, 1);
- changes.scroll(3, 5, 1);
- assertEquals(3, changes.getFirstChangedLine());
- assertEquals(4, changes.getLastChangedLine());
- assertEquals(0, changes.getScrollWindowStartLine());
- assertEquals(0, changes.getScrollWindowSize());
- assertEquals(0, changes.getScrollWindowShift());
- assertTrue(changes.hasChanged());
- assertChangedLines(changes, "0001100000");
- }
-
- public void testCopyChangedLines() {
- SnapshotChanges changes;
- changes=new SnapshotChanges(2,3);
- changes.markLineChanged(3);
- ITerminalTextData source=new TerminalTextDataStore();
- TerminalTextTestHelper.fillSimple(source, "01234567890");
- ITerminalTextData dest=new TerminalTextDataStore();
- TerminalTextTestHelper.fillSimple(dest, "abcdefghijk");
-
- changes.copyChangedLines(dest, source);
- assertEquals("abc3efghijk",TerminalTextTestHelper.toSimple(dest));
-
- changes=new SnapshotChanges(2,3);
- changes.setAllChanged(7);
- source=new TerminalTextDataStore();
- TerminalTextTestHelper.fillSimple(source, "01234567890");
- dest=new TerminalTextDataStore();
- TerminalTextTestHelper.fillSimple(dest, "abcdefghijk");
-
- changes.copyChangedLines(dest, source);
- assertEquals("ab234fghijk",TerminalTextTestHelper.toSimple(dest));
-
- changes=new SnapshotChanges(2,3);
- changes.scroll(0,7,-1);
- source=new TerminalTextDataStore();
- TerminalTextTestHelper.fillSimple(source, "01234567890");
- dest=new TerminalTextDataStore();
- TerminalTextTestHelper.fillSimple(dest, "abcdefghijk");
- // only one line has changed! The other lines are scrolled!
- assertChangedLines(changes,"00001000");
- changes.copyChangedLines(dest, source);
- assertEquals("abcd4fghijk",TerminalTextTestHelper.toSimple(dest));
- }
- public void testCopyChangedLinesWithSmallSource() {
- SnapshotChanges changes;
- changes=new SnapshotChanges(2,3);
- changes.markLineChanged(3);
- ITerminalTextData source=new TerminalTextDataStore();
- source.setDimensions(2, 2);
- TerminalTextDataWindow dest=new TerminalTextDataWindow();
- dest.setWindow(2, 2);
- changes.copyChangedLines(dest, source);
- }
- public void testCopyChangedLinesWithSmallSource1() {
- SnapshotChanges changes;
- changes=new SnapshotChanges(2,3);
- changes.markLineChanged(3);
- ITerminalTextData source=new TerminalTextDataStore();
- TerminalTextTestHelper.fillSimple(source, "01");
- ITerminalTextData dest=new TerminalTextDataStore();
- changes.copyChangedLines(dest, source);
- }
-
- public void testSetInterestWindowSize() {
- SnapshotChanges changes;
- changes=new SnapshotChanges(2,3);
- // move the window
- changes.setInterestWindow(3, 3);
- // only one line has changed! The other lines are scrolled!
- assertEquals(3, changes.getScrollWindowStartLine());
- assertEquals(3, changes.getScrollWindowSize());
- assertEquals(-1, changes.getScrollWindowShift());
-
- assertChangedLines(changes,"0000010");
- changes.convertScrollingIntoChanges();
- assertChangedLines(changes,"0001110");
-
- changes=new SnapshotChanges(2,3);
- // move the window
- changes.setInterestWindow(3, 4);
- // only one line has changed! The other lines are scrolled!
- assertEquals(3, changes.getScrollWindowStartLine());
- assertEquals(3, changes.getScrollWindowSize());
- assertEquals(-1, changes.getScrollWindowShift());
-
- assertChangedLines(changes,"0000011");
- changes.convertScrollingIntoChanges();
- assertChangedLines(changes,"0001111");
-
-
- changes=new SnapshotChanges(2,3);
- // move the window
- changes.setInterestWindow(6, 3);
- // cannot scroll
- assertEquals(0, changes.getScrollWindowStartLine());
- assertEquals(0, changes.getScrollWindowSize());
- assertEquals(0, changes.getScrollWindowShift());
- assertChangedLines(changes,"000000111000");
-
- changes=new SnapshotChanges(2,3);
- // expand the window
- changes.setInterestWindow(2, 5);
- // cannot scroll
- assertEquals(0, changes.getScrollWindowStartLine());
- assertEquals(0, changes.getScrollWindowSize());
- assertEquals(0, changes.getScrollWindowShift());
-
- assertChangedLines(changes,"0000011000");
- }
- public void testSetInterestWindowSize2() {
- SnapshotChanges changes;
- changes=new SnapshotChanges(2,3);
- // move the window
- changes.setInterestWindow(1, 3);
- assertChangedLines(changes,"0111000");
-
- changes=new SnapshotChanges(2,3);
- // move the window
- changes.setInterestWindow(1, 4);
- assertChangedLines(changes,"01111000");
-
-
- changes=new SnapshotChanges(2,3);
- // expand the window
- changes.setInterestWindow(6, 3);
- assertChangedLines(changes,"000000111000");
-
- changes=new SnapshotChanges(2,3);
- // expand the window
- changes.setInterestWindow(1, 2);
- assertChangedLines(changes,"0110000");
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/SynchronizedTerminalTextDataTest.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/SynchronizedTerminalTextDataTest.java
deleted file mode 100644
index 9b07bc7a2..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/SynchronizedTerminalTextDataTest.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tm.internal.terminal.model;
-
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-
-public class SynchronizedTerminalTextDataTest extends AbstractITerminalTextDataTest {
- protected ITerminalTextData makeITerminalTextData() {
- return new SynchronizedTerminalTextData(new TerminalTextData());
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataFastScrollTest.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataFastScrollTest.java
deleted file mode 100644
index 7379e5410..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataFastScrollTest.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tm.internal.terminal.model;
-
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-
-public class TerminalTextDataFastScrollTest extends AbstractITerminalTextDataTest {
- protected ITerminalTextData makeITerminalTextData() {
- return new TerminalTextDataFastScroll(3);
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataFastScrollTestMaxHeigth.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataFastScrollTestMaxHeigth.java
deleted file mode 100644
index f0cf227a7..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataFastScrollTestMaxHeigth.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tm.internal.terminal.model;
-
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-
-public class TerminalTextDataFastScrollTestMaxHeigth extends AbstractITerminalTextDataTest {
- protected ITerminalTextData makeITerminalTextData() {
- return new TerminalTextDataFastScroll(1);
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataPerformanceTest.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataPerformanceTest.java
deleted file mode 100644
index e010e77ab..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataPerformanceTest.java
+++ /dev/null
@@ -1,224 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tm.internal.terminal.model;
-
-import junit.framework.TestCase;
-
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-import org.eclipse.tm.terminal.model.ITerminalTextDataSnapshot;
-import org.eclipse.tm.terminal.model.Style;
-import org.eclipse.tm.terminal.model.StyleColor;
-
-public class TerminalTextDataPerformanceTest extends TestCase {
- long TIME=100;
- private void initPerformance(ITerminalTextData term) {
- term.setDimensions(300,200);
- }
- public void testPerformance0() {
- ITerminalTextData term=new TerminalTextData();
- method0(term,"0 ");
- }
- public void testPerformance0a() {
- ITerminalTextData term=new TerminalTextData();
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- method0(term,"0a");
- snapshot.updateSnapshot(true);
- }
- public void testPerformance0b() {
- ITerminalTextData term=new TerminalTextData();
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- N=0;
- snapshot.addListener(new ITerminalTextDataSnapshot.SnapshotOutOfDateListener(){
- public void snapshotOutOfDate(ITerminalTextDataSnapshot snapshot) {
- N++;
- }});
- method0(term,"0b");
- snapshot.updateSnapshot(true);
- }
- private void method0(ITerminalTextData term, String label) {
- Style style=Style.getStyle(StyleColor.getStyleColor("fg"), StyleColor.getStyleColor("bg"), false, false, false, false);
- initPerformance(term);
- String s="This is a test string";
- long n=0;
- long t0=System.currentTimeMillis();
- for (int i = 0; i < 10000000; i++) {
- char c=s.charAt(i%s.length());
- for (int line = 0; line < term.getHeight(); line++) {
- for (int column = 0; column < term.getWidth(); column++) {
- term.setChar(line, column, c, style);
- n++;
- }
- }
- if(System.currentTimeMillis()-t0>TIME) {
- System.out.println(label+" "+(n*1000)/(System.currentTimeMillis()-t0)+" setChar()/sec "+ N);
- break;
- }
- }
- }
- public void testPerformance1() {
- ITerminalTextData term=new TerminalTextData();
- method1(term, "1 ");
- }
- public void testPerformance1a() {
- ITerminalTextData term=new TerminalTextData();
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- method1(term, "1a");
- snapshot.updateSnapshot(true);
- }
- public void testPerformance1b() {
- ITerminalTextData term=new TerminalTextData();
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- N=0;
- snapshot.addListener(new ITerminalTextDataSnapshot.SnapshotOutOfDateListener(){
- public void snapshotOutOfDate(ITerminalTextDataSnapshot snapshot) {
- N++;
- }});
- method1(term, "1b");
- snapshot.updateSnapshot(true);
- }
- private void method1(ITerminalTextData term, String label) {
- Style style=Style.getStyle(StyleColor.getStyleColor("fg"), StyleColor.getStyleColor("bg"), false, false, false, false);
- initPerformance(term);
- String s="This is a test string";
- long n=0;
- long t0=System.currentTimeMillis();
- char[] chars=new char[term.getWidth()];
- for (int i = 0; i < 10000000; i++) {
- for (int j = 0; j < chars.length; j++) {
- chars[j]=s.charAt((i+j)%s.length());
- }
- for (int line = 0; line < term.getHeight(); line++) {
- term.setChars(line, 0, chars, style);
- n+=chars.length;
- }
- if(System.currentTimeMillis()-t0>TIME) {
- System.out.println(label+" "+(n*1000)/(System.currentTimeMillis()-t0)+" setChars()/sec "+ N);
- break;
- }
- }
- }
- public void testPerformance2() {
- TerminalTextData term=new TerminalTextData();
- Style style=Style.getStyle(StyleColor.getStyleColor("fg"), StyleColor.getStyleColor("bg"), false, false, false, false);
- initPerformance(term);
- TerminalTextData copy=new TerminalTextData();
- copy.copy(term);
-
- String s="This is a test string";
- long n=0;
- long t0=System.currentTimeMillis();
- char[] chars=new char[term.getWidth()];
- for (int i = 0; i < 10000000; i++) {
- for (int j = 0; j < chars.length; j++) {
- chars[j]=s.charAt((i+j)%s.length());
- }
- for (int line = 0; line < term.getHeight(); line++) {
- term.setChars(line, 0, chars, 0,1,style);
- copy.copy(term);
- n+=1;
- if(System.currentTimeMillis()-t0>TIME) {
- System.out.println((n*1000)/(System.currentTimeMillis()-t0)+" copy()/sec");
- return;
- }
- }
- }
- }
- public void testPerformance2a() {
- TerminalTextData term=new TerminalTextData();
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- Style style=Style.getStyle(StyleColor.getStyleColor("fg"), StyleColor.getStyleColor("bg"), false, false, false, false);
- initPerformance(term);
- TerminalTextData copy=new TerminalTextData();
- copy.copy(term);
-
- String s="This is a test string";
- long n=0;
- long t0=System.currentTimeMillis();
- char[] chars=new char[term.getWidth()];
- for (int i = 0; i < 10000000; i++) {
- for (int j = 0; j < chars.length; j++) {
- chars[j]=s.charAt((i+j)%s.length());
- }
- for (int line = 0; line < term.getHeight(); line++) {
- term.setChars(line, 0, chars, 0,1,style);
- copy.copy(term);
- n+=1;
- if(System.currentTimeMillis()-t0>TIME) {
- System.out.println((n*1000)/(System.currentTimeMillis()-t0)+" copy()/sec");
- return;
- }
- }
- }
- snapshot.updateSnapshot(true);
- }
- int N=0;
- public void testPerformance2b() {
- TerminalTextData term=new TerminalTextData();
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- N=0;
- snapshot.addListener(new ITerminalTextDataSnapshot.SnapshotOutOfDateListener(){
- public void snapshotOutOfDate(ITerminalTextDataSnapshot snapshot) {
- N++;
- }});
- Style style=Style.getStyle(StyleColor.getStyleColor("fg"), StyleColor.getStyleColor("bg"), false, false, false, false);
- initPerformance(term);
- TerminalTextData copy=new TerminalTextData();
- copy.copy(term);
-
- String s="This is a test string";
- long n=0;
- long t0=System.currentTimeMillis();
- char[] chars=new char[term.getWidth()];
- for (int i = 0; i < 10000000; i++) {
- for (int j = 0; j < chars.length; j++) {
- chars[j]=s.charAt((i+j)%s.length());
- }
- for (int line = 0; line < term.getHeight(); line++) {
- term.setChars(line, 0, chars, 0,1,style);
- copy.copy(term);
- n+=1;
- if(System.currentTimeMillis()-t0>TIME) {
- System.out.println((n*1000)/(System.currentTimeMillis()-t0)+" copy()/sec "+n);
- return;
- }
- }
- }
- snapshot.updateSnapshot(true);
- }
- public void testPerformance3() {
- TerminalTextData term=new TerminalTextData();
- Style style=Style.getStyle(StyleColor.getStyleColor("fg"), StyleColor.getStyleColor("bg"), false, false, false, false);
- initPerformance(term);
- TerminalTextData copy=new TerminalTextData();
- copy.copy(term);
- String s="This is a test string";
- long n=0;
- long t0=System.currentTimeMillis();
- char[] chars=new char[term.getWidth()];
- for (int i = 0; i < 10000000; i++) {
- boolean[] linesToCopy=new boolean[term.getHeight()];
- for (int j = 0; j < chars.length; j++) {
- chars[j]=s.charAt((i+j)%s.length());
- }
- for (int line = 0; line < term.getHeight(); line++) {
- term.setChars(line, 0, chars, 0,1,style);
- linesToCopy[line]=true;
- copy.copyLine(term,0,0);
- linesToCopy[line]=false;
- n+=1;
- if(System.currentTimeMillis()-t0>TIME) {
- System.out.println((n*1000)/(System.currentTimeMillis()-t0)+" copy()/sec");
- return;
- }
- }
- }
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataSnapshotTest.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataSnapshotTest.java
deleted file mode 100644
index d6e68ef4e..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataSnapshotTest.java
+++ /dev/null
@@ -1,1344 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tm.internal.terminal.model;
-
-import junit.framework.TestCase;
-
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-import org.eclipse.tm.terminal.model.ITerminalTextDataReadOnly;
-import org.eclipse.tm.terminal.model.ITerminalTextDataSnapshot;
-import org.eclipse.tm.terminal.model.Style;
-import org.eclipse.tm.terminal.model.StyleColor;
-
-public class TerminalTextDataSnapshotTest extends TestCase {
- String toMultiLineText(ITerminalTextDataReadOnly term) {
- return TerminalTextTestHelper.toMultiLineText(term);
- }
-
- protected ITerminalTextData makeITerminalTextData() {
- return new TerminalTextData();
- }
-
-
- public void testTerminalTextDataSnapshot() {
- ITerminalTextData term=makeITerminalTextData();
- String s="12345\n" +
- "abcde\n" +
- "ABCDE\n" +
- "vwxzy\n" +
- "VWXYZ";
- TerminalTextTestHelper.fill(term,s);
-
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- snapshot.updateSnapshot(false);
-
- assertEquals(toMultiLineText(term), toMultiLineText(snapshot));
-
- // new snapshots are fully changed
- assertEquals(0,snapshot.getFirstChangedLine());
- assertEquals(term.getHeight()-1,snapshot.getLastChangedLine());
- for (int line = 0; line <= snapshot.getLastChangedLine(); line++) {
- assertTrue(snapshot.hasLineChanged(line));
- }
- // nothing has scrolled
- assertEquals(0, snapshot.getScrollWindowSize());
- }
-
- public void testDetach() {
- ITerminalTextData term=makeITerminalTextData();
- String s="12345\n" +
- "abcde\n" +
- "ABCDE\n" +
- "vwxzy\n" +
- "VWXYZ";
- TerminalTextTestHelper.fill(term,s);
-
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- snapshot.updateSnapshot(false);
-
- assertEquals(toMultiLineText(term),toMultiLineText(snapshot));
- snapshot.detach();
- // after detach changes to the term has no effect
- term.setChar(0, 0, '?', null);
- assertEquals(s, toMultiLineText(snapshot));
- term.setDimensions(2, 2);
- assertEquals(s, toMultiLineText(snapshot));
- }
- public void testIsOutOfDate() {
- ITerminalTextData term=makeITerminalTextData();
- String s="12345\n" +
- "abcde\n" +
- "ABCDE\n" +
- "vwxzy\n" +
- "VWXYZ";
- TerminalTextTestHelper.fill(term,s);
-
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- assertTrue(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
-
- assertFalse(snapshot.isOutOfDate());
-
- // make a change and expect it to be changed
- term.setChar(0, 0, '?', null);
- assertTrue(snapshot.isOutOfDate());
-
- snapshot.updateSnapshot(false);
- assertFalse(snapshot.isOutOfDate());
-
- // make a change and expect it to be changed
- term.setChars(1, 1, new char[]{'?','!','.'},null);
- assertTrue(snapshot.isOutOfDate());
-
- snapshot.updateSnapshot(false);
- assertFalse(snapshot.isOutOfDate());
-
- // scroll
- term.scroll(1, 2, -1);
- assertTrue(snapshot.isOutOfDate());
-
- snapshot.updateSnapshot(false);
- assertFalse(snapshot.isOutOfDate());
-
- // scroll
- term.scroll(1, 2, 1);
- assertTrue(snapshot.isOutOfDate());
-
- snapshot.updateSnapshot(false);
- assertFalse(snapshot.isOutOfDate());
-
- // scroll
- term.scroll(1, 2, -1);
- assertTrue(snapshot.isOutOfDate());
-
- snapshot.updateSnapshot(true);
- assertFalse(snapshot.isOutOfDate());
-
- // scroll
- term.scroll(1, 2, 1);
- assertTrue(snapshot.isOutOfDate());
-
- snapshot.updateSnapshot(true);
- assertFalse(snapshot.isOutOfDate());
-
- // setDimensions
- term.setDimensions(2, 2);
- assertTrue(snapshot.isOutOfDate());
-
- snapshot.updateSnapshot(false);
- assertFalse(snapshot.isOutOfDate());
-
- // setDimensions
- term.setDimensions(20, 20);
- assertTrue(snapshot.isOutOfDate());
-
- snapshot.updateSnapshot(false);
- assertFalse(snapshot.isOutOfDate());
-
- }
- ITerminalTextDataSnapshot snapshot(String text, ITerminalTextData term) {
- TerminalTextTestHelper.fill(term,text);
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- snapshot.updateSnapshot(false);
-
- return snapshot;
-
- }
- public void testUpdateSnapshot() {
- ITerminalTextData term=makeITerminalTextData();
- String s="12345\n" +
- "abcde\n" +
- "ABCDE\n" +
- "vwxzy\n" +
- "VWXYZ";
- TerminalTextTestHelper.fill(term,s);
- String termString=toMultiLineText(term);
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- snapshot.updateSnapshot(false);
-
- assertEquals(termString,toMultiLineText(snapshot));
-
- // make changes and assert that the snapshot has not changed
- // then update the snapshot and expect it to be the
- // same as the changed terminal
-
- // make a change
- term.setChar(0, 0, '?', null);
- assertEquals(termString,toMultiLineText(snapshot));
-
- snapshot.updateSnapshot(false);
- termString=toMultiLineText(term);
- assertEquals(termString,toMultiLineText(snapshot));
-
- // make a change
- term.setChars(1, 1, new char[]{'?','!','.'},null);
- assertEquals(termString,toMultiLineText(snapshot));
-
- snapshot.updateSnapshot(false);
- termString=toMultiLineText(term);
- assertEquals(termString,toMultiLineText(snapshot));
-
- // scroll
- term.scroll(1, 2, -1);
- assertEquals(termString,toMultiLineText(snapshot));
-
- snapshot.updateSnapshot(false);
- termString=toMultiLineText(term);
- assertEquals(termString,toMultiLineText(snapshot));
-
- // scroll
- term.scroll(1, 2, 1);
- assertEquals(termString,toMultiLineText(snapshot));
-
- snapshot.updateSnapshot(false);
- termString=toMultiLineText(term);
- assertEquals(termString,toMultiLineText(snapshot));
-
- // scroll
- term.scroll(1, 2, -1);
- assertEquals(termString,toMultiLineText(snapshot));
-
- snapshot.updateSnapshot(true);
- termString=toMultiLineText(term);
- assertEquals(termString,toMultiLineText(snapshot));
-
- // scroll
- term.scroll(1, 2, 1);
- assertEquals(termString,toMultiLineText(snapshot));
-
- snapshot.updateSnapshot(true);
- termString=toMultiLineText(term);
- assertEquals(termString,toMultiLineText(snapshot));
-
- // set dimensions
- term.setDimensions(2, 2);
- assertEquals(termString,toMultiLineText(snapshot));
-
- snapshot.updateSnapshot(false);
- termString=toMultiLineText(term);
- assertEquals(termString,toMultiLineText(snapshot));
-
- // set dimensions
- term.setDimensions(20, 20);
- assertEquals(termString,toMultiLineText(snapshot));
-
- snapshot.updateSnapshot(false);
- termString=toMultiLineText(term);
- assertEquals(termString,toMultiLineText(snapshot));
- }
-
- public void testMaxSize() {
- String s=
- "111\n" +
- "222\n" +
- "333\n" +
- "444\n" +
- "555";
- ITerminalTextData term=makeITerminalTextData();
- term.setMaxHeight(8);
- TerminalTextTestHelper.fill(term, s);
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- snapshot.updateSnapshot(false);
-
- term.addLine();
- assertTrue(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- assertEquals(toMultiLineText(term), toMultiLineText(snapshot));
-
- term.addLine();
- assertTrue(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- assertEquals(toMultiLineText(term), toMultiLineText(snapshot));
-
- term.addLine();
- assertTrue(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- assertEquals(toMultiLineText(term), toMultiLineText(snapshot));
-
- term.addLine();
- assertTrue(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- assertEquals(toMultiLineText(term), toMultiLineText(snapshot));
-
- term.addLine();
- assertTrue(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- assertEquals(toMultiLineText(term), toMultiLineText(snapshot));
-
- }
-
-
- public void testGetChar() {
- ITerminalTextData term=makeITerminalTextData();
- String s="12345\n" +
- "abcde\n" +
- "ABCDE\n" +
- "vwxzy\n" +
- "VWXYZ";
- TerminalTextTestHelper.fill(term,s);
- ITerminalTextData termUnchanged=makeITerminalTextData();
- TerminalTextTestHelper.fill(termUnchanged,s);
-
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- snapshot.updateSnapshot(false);
-
- for (int line = 0; line < snapshot.getHeight(); line++) {
- for (int column = 0; column < snapshot.getWidth(); column++) {
- assertEquals(term.getChar(line, column),snapshot.getChar(line, column));
- }
- }
- // make a change
- term.setChar(0, 0, '?', null);
- // check against unchanged data
- for (int line = 0; line < snapshot.getHeight(); line++) {
- for (int column = 0; column < snapshot.getWidth(); column++) {
- assertEquals(termUnchanged.getChar(line, column),snapshot.getChar(line, column));
- }
- }
- // update and compare against the terminal
- snapshot.updateSnapshot(true);
- for (int line = 0; line < snapshot.getHeight(); line++) {
- for (int column = 0; column < snapshot.getWidth(); column++) {
- assertEquals(term.getChar(line, column),snapshot.getChar(line, column));
- }
- }
-
- }
-
- public void testGetHeight() {
- ITerminalTextData term=makeITerminalTextData();
- String s="12345\n" +
- "abcde\n" +
- "ABCDE\n" +
- "vwxzy\n" +
- "VWXYZ";
- TerminalTextTestHelper.fill(term,s);
-
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- snapshot.updateSnapshot(false);
-
- int expectedHeight=term.getHeight();
- assertEquals(expectedHeight, snapshot.getHeight());
- term.setDimensions(term.getHeight()-1, term.getWidth());
- assertEquals(expectedHeight, snapshot.getHeight());
-
- //
- snapshot.updateSnapshot(false);
- expectedHeight=term.getHeight();
- assertEquals(expectedHeight, snapshot.getHeight());
- term.setDimensions(term.getHeight()-1, term.getWidth());
- assertEquals(expectedHeight, snapshot.getHeight());
- }
-//
-// public void testGetLineSegments() {
-// fail("Not yet implemented");
-// }
-//
- public void testGetStyle() {
- ITerminalTextData term=makeITerminalTextData();
- Style style=Style.getStyle(StyleColor.getStyleColor("fg"), StyleColor.getStyleColor("bg"), false, false, false, false);
- term.setDimensions(6, 3);
- for (int line = 0; line < term.getHeight(); line++) {
- for (int column = 0; column < term.getWidth(); column++) {
- char c=(char)('a'+column+line);
- term.setChar(line, column, c, style.setForground(StyleColor.getStyleColor(""+c)));
- }
- }
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- snapshot.updateSnapshot(false);
-
-
- for (int line = 0; line < term.getHeight(); line++) {
- for (int column = 0; column < term.getWidth(); column++) {
- char c=(char)('a'+column+line);
- assertSame(style.setForground(StyleColor.getStyleColor(""+c)), snapshot.getStyle(line, column));
- }
- }
-
- }
-
- public void testGetWidth() {
- ITerminalTextData term=makeITerminalTextData();
- String s="12345\n" +
- "abcde\n" +
- "ABCDE\n" +
- "vwxzy\n" +
- "VWXYZ";
- TerminalTextTestHelper.fill(term,s);
-
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- snapshot.updateSnapshot(false);
-
- int expectedWidth=term.getWidth();
- assertEquals(expectedWidth, snapshot.getWidth());
- term.setDimensions(term.getHeight(), term.getWidth()-1);
- assertEquals(expectedWidth, snapshot.getWidth());
-
- //
- snapshot.updateSnapshot(false);
- expectedWidth=term.getWidth();
- assertEquals(expectedWidth, snapshot.getWidth());
- term.setDimensions(term.getHeight(), term.getWidth()-1);
- assertEquals(expectedWidth, snapshot.getWidth());
- }
-
- public void testGetFirstChangedLine() {
- ITerminalTextData term=makeITerminalTextData();
- String s="12345\n" +
- "abcde\n" +
- "ABCDE\n" +
- "vwxzy\n" +
- "VWXYZ";
- ITerminalTextDataSnapshot snapshot=snapshot(s,term);
-
-
- assertEquals(0, snapshot.getFirstChangedLine());
-
- // if nothing has changed the first changed line i height
- snapshot.updateSnapshot(false);
- assertEquals(Integer.MAX_VALUE, snapshot.getFirstChangedLine());
-
- snapshot=snapshot(s,term);
- term.setChar(0, 0, 'x', null);
- snapshot.updateSnapshot(false);
- assertEquals(0, snapshot.getFirstChangedLine());
-
- snapshot=snapshot(s,term);
- term.setChar(3, 0, 'x', null);
- term.setChar(4, 0, 'x', null);
- snapshot.updateSnapshot(false);
- assertEquals(3, snapshot.getFirstChangedLine());
-
- snapshot=snapshot(s,term);
- term.scroll(0, 1, -1);
- snapshot.updateSnapshot(false);
- assertEquals(0, snapshot.getFirstChangedLine());
-
- snapshot=snapshot(s,term);
- term.scroll(2, 2, -1);
- snapshot.updateSnapshot(false);
- assertEquals(2, snapshot.getFirstChangedLine());
-
- // when scrolling the end of the region 'has changed'
- snapshot=snapshot(s,term);
- term.scroll(2, 2, -1);
- snapshot.updateSnapshot(true);
- assertEquals(3, snapshot.getFirstChangedLine());
-
- // when scrolling the end of the region 'has changed'
- snapshot=snapshot(s,term);
- term.scroll(2, 2, -1);
- term.setChar(1, 0, 'x', null);
- snapshot.updateSnapshot(true);
- assertEquals(1, snapshot.getFirstChangedLine());
-
- }
- public void testGetLastChangedLine() {
- ITerminalTextData term=makeITerminalTextData();
- String s="12345\n" +
- "abcde\n" +
- "ABCDE\n" +
- "vwxzy\n" +
- "VWXYZ";
- ITerminalTextDataSnapshot snapshot=snapshot(s,term);
-
-
- assertEquals(4, snapshot.getLastChangedLine());
-
- // if nothing has changed the first changed line i height
- snapshot.updateSnapshot(false);
- assertEquals(-1, snapshot.getLastChangedLine());
-
- snapshot=snapshot(s,term);
- term.setChar(0, 0, 'x', null);
- snapshot.updateSnapshot(false);
- assertEquals(0, snapshot.getLastChangedLine());
-
- snapshot=snapshot(s,term);
- term.cleanLine(1);
- snapshot.updateSnapshot(false);
- assertEquals(1, snapshot.getLastChangedLine());
-
- snapshot=snapshot(s,term);
- term.setChar(3, 0, 'x', null);
- term.setChar(4, 0, 'x', null);
- snapshot.updateSnapshot(false);
- assertEquals(4, snapshot.getLastChangedLine());
-
- snapshot=snapshot(s,term);
- term.scroll(0, 1, -1);
- snapshot.updateSnapshot(false);
- assertEquals(0, snapshot.getLastChangedLine());
-
- snapshot=snapshot(s,term);
- term.scroll(2, 2, -1);
- snapshot.updateSnapshot(false);
- assertEquals(3, snapshot.getLastChangedLine());
-
- // when scrolling the end of the region 'has changed'
- snapshot=snapshot(s,term);
- term.scroll(2, 2, -1);
- snapshot.updateSnapshot(true);
- assertEquals(3, snapshot.getLastChangedLine());
-
- // when scrolling the end of the region 'has changed'
- snapshot=snapshot(s,term);
- term.scroll(2, 2, -1);
- term.setChar(1, 0, 'x', null);
- snapshot.updateSnapshot(true);
- assertEquals(3, snapshot.getLastChangedLine());
-
- }
- /**
- * @param snapshot
- * @param expected a string of 0 and 1 (1 means changed)
- */
- void assertChangedLines(ITerminalTextDataSnapshot snapshot, String expected) {
- assertEquals(expected.length(),snapshot.getHeight());
- StringBuffer buffer=new StringBuffer();
- for (int line = 0; line < expected.length(); line++) {
- if(snapshot.hasLineChanged(line))
- buffer.append('1');
- else
- buffer.append('0');
- }
- assertEquals(expected, buffer.toString());
- }
- public void testHasLineChangedScroll() {
- ITerminalTextData term=makeITerminalTextData();
- String s="00\n" +
- "11\n" +
- "22\n" +
- "33\n" +
- "44\n" +
- "55\n" +
- "66\n" +
- "77\n" +
- "88\n" +
- "99";
- ITerminalTextDataSnapshot snapshot=snapshot(s,term);
-
- term.scroll(2,3,-1);
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "0000100000");
-
- snapshot=snapshot(s,term);
- term.scroll(2,3,-2);
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "0001100000");
-
- snapshot=snapshot(s,term);
- term.scroll(2,4,-1);
- term.scroll(2,4,-1);
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "0000110000");
-
- term.scroll(2,3,1);
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "0011100000");
-
- snapshot=snapshot(s,term);
- term.scroll(2,3,2);
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "0011100000");
-
- snapshot=snapshot(s,term);
- term.scroll(2,4,1);
- term.scroll(2,4,1);
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "0011110000");
-
-
- snapshot=snapshot(s,term);
- term.scroll(2,3,-1);
- snapshot.updateSnapshot(false);
- assertChangedLines(snapshot, "0011100000");
-
- snapshot=snapshot(s,term);
- term.scroll(2,3,-2);
- snapshot.updateSnapshot(false);
- assertChangedLines(snapshot, "0011100000");
-
- snapshot=snapshot(s,term);
- term.scroll(2,4,-1);
- term.scroll(2,4,-1);
- snapshot.updateSnapshot(false);
- assertChangedLines(snapshot, "0011110000");
- }
- public void testMultiScrollWithDifferentSizes() {
- ITerminalTextData term=makeITerminalTextData();
- String s="00\n" +
- "11\n" +
- "22\n" +
- "33\n" +
- "44\n" +
- "55\n" +
- "66\n" +
- "77\n" +
- "88\n" +
- "99";
- ITerminalTextDataSnapshot snapshot;
-
- snapshot=snapshot(s,term);
- term.scroll(2,6,-1);
- term.scroll(2,5,-1);
- snapshot.updateSnapshot(false);
- assertChangedLines(snapshot, "0011111100");
- assertEquals(2, snapshot.getFirstChangedLine());
- assertEquals(7, snapshot.getLastChangedLine());
- assertEquals(0, snapshot.getScrollWindowSize());
- assertEquals(0, snapshot.getScrollWindowStartLine());
- assertEquals(0, snapshot.getScrollWindowShift());
-
- // scrolls with different ranges cause no scroll
- // optimization
- snapshot=snapshot(s,term);
- term.scroll(2,6,-1);
- term.scroll(2,5,-1);
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "0011111100");
- assertEquals(2, snapshot.getFirstChangedLine());
- assertEquals(7, snapshot.getLastChangedLine());
- assertEquals(0, snapshot.getScrollWindowShift());
- assertEquals(0, snapshot.getScrollWindowSize());
- assertEquals(0, snapshot.getScrollWindowStartLine());
- }
- public void testHasLineChanged() {
- ITerminalTextData term=makeITerminalTextData();
- String s="000000\n" +
- "111111\n" +
- "222222\n" +
- "333333\n" +
- "444444\n" +
- "555555\n" +
- "666666\n" +
- "777777\n" +
- "888888\n" +
- "999999";
- ITerminalTextDataSnapshot snapshot;
-
- snapshot=snapshot(s,term);
- term.scroll(2,3,-1);
- term.setChar(7, 0, '.', null);
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "0000100100");
-
- snapshot=snapshot(s,term);
- term.scroll(2,3,-2);
- term.setChar(9, 0, '.', null);
- term.setChars(0, 0, new char[]{'.','!'}, null);
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "1001100001");
-
- snapshot=snapshot(s,term);
- term.scroll(2,4,-1);
- term.scroll(2,4,-1);
- term.setChars(2, 2, new char[]{'.','!','*'},1,1, null);
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "0010110000");
-
- snapshot=snapshot(s,term);
- term.scroll(2,7,-1);
- term.setChar(5, 2, '.', null);
- term.scroll(2,7,-2);
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "0001001110");
-
-
- snapshot=snapshot(s,term);
- term.scroll(2,7,-1);
- term.setChar(5, 2, '.', null);
- term.scroll(2,7,-2);
- snapshot.updateSnapshot(false);
- assertChangedLines(snapshot, "0011111110");
-
- }
-
- public void testScroll() {
- ITerminalTextData term=makeITerminalTextData();
- String s="00\n" +
- "11\n" +
- "22\n" +
- "33\n" +
- "44\n" +
- "55\n" +
- "66\n" +
- "77\n" +
- "88\n" +
- "99";
- ITerminalTextDataSnapshot snapshot=snapshot(s,term);
-
- term.scroll(2,3,-1);
- snapshot.updateSnapshot(true);
- assertEquals(2, snapshot.getScrollWindowStartLine());
- assertEquals(3, snapshot.getScrollWindowSize());
- assertEquals(-1, snapshot.getScrollWindowShift());
- assertEquals(4, snapshot.getFirstChangedLine());
- assertEquals(4, snapshot.getLastChangedLine());
-
- term.scroll(2,3,-2);
- snapshot.updateSnapshot(true);
- assertEquals(2, snapshot.getScrollWindowStartLine());
- assertEquals(3, snapshot.getScrollWindowSize());
- assertEquals(-2, snapshot.getScrollWindowShift());
- assertEquals(3, snapshot.getFirstChangedLine());
- assertEquals(4, snapshot.getLastChangedLine());
-
- term.scroll(2,4,-1);
- term.scroll(2,4,-1);
- snapshot.updateSnapshot(true);
- assertEquals(2, snapshot.getScrollWindowStartLine());
- assertEquals(4, snapshot.getScrollWindowSize());
- assertEquals(-2, snapshot.getScrollWindowShift());
- assertEquals(4, snapshot.getFirstChangedLine());
- assertEquals(5, snapshot.getLastChangedLine());
-
-
- snapshot=snapshot(s,term);
- term.scroll(2,3,-1);
- snapshot.updateSnapshot(false);
- assertEquals(0, snapshot.getScrollWindowStartLine());
- assertEquals(0, snapshot.getScrollWindowSize());
- assertEquals(0, snapshot.getScrollWindowShift());
- assertEquals(2, snapshot.getFirstChangedLine());
- assertEquals(4, snapshot.getLastChangedLine());
-
- }
- public void testDisjointScroll() {
- ITerminalTextData term=makeITerminalTextData();
- String s="000000\n" +
- "111111\n" +
- "222222\n" +
- "333333\n" +
- "444444\n" +
- "555555\n" +
- "666666\n" +
- "777777\n" +
- "888888\n" +
- "999999";
- ITerminalTextDataSnapshot snapshot;
-
- snapshot=snapshot(s,term);
- term.scroll(0,2,-1);
- term.scroll(4,2,-1);
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "1100110000");
- assertEquals(0, snapshot.getScrollWindowStartLine());
- assertEquals(0, snapshot.getScrollWindowSize());
- assertEquals(0, snapshot.getScrollWindowShift());
-
- snapshot=snapshot(s,term);
- term.scroll(0,3,-1);
- term.scroll(2,2,-2);
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "1111000000");
- assertEquals(0, snapshot.getScrollWindowStartLine());
- assertEquals(0, snapshot.getScrollWindowSize());
- assertEquals(0, snapshot.getScrollWindowShift());
-
- snapshot=snapshot(s,term);
- term.scroll(0,3,-1);
- term.scroll(2,2,-2);
- term.scroll(0,3,-1);
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "1111000000");
- assertEquals(0, snapshot.getScrollWindowStartLine());
- assertEquals(0, snapshot.getScrollWindowSize());
- assertEquals(0, snapshot.getScrollWindowShift());
-
- snapshot=snapshot(s,term);
- term.scroll(0,3,-1);
- term.scroll(2,2,-2);
- term.scroll(0,3,-10);
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "1111000000");
- assertEquals(0, snapshot.getScrollWindowStartLine());
- assertEquals(0, snapshot.getScrollWindowSize());
- assertEquals(0, snapshot.getScrollWindowShift());
-
- snapshot=snapshot(s,term);
- term.scroll(1,3,-1);
- term.scroll(1,3,1);
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "0111000000");
- assertEquals(0, snapshot.getScrollWindowStartLine());
- assertEquals(0, snapshot.getScrollWindowSize());
- assertEquals(0, snapshot.getScrollWindowShift());
- }
- public void testResize() {
- ITerminalTextData term=makeITerminalTextData();
- String s="000000\n" +
- "111111\n" +
- "222222\n" +
- "333333";
- ITerminalTextDataSnapshot snapshot;
-
- snapshot=snapshot(s,term);
- term.setDimensions(term.getHeight(), term.getWidth()+1);
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "1111");
- assertEquals(0, snapshot.getFirstChangedLine());
- assertEquals(3, snapshot.getLastChangedLine());
- assertEquals(0, snapshot.getScrollWindowStartLine());
- assertEquals(0, snapshot.getScrollWindowSize());
- assertEquals(0, snapshot.getScrollWindowShift());
-
- snapshot=snapshot(s,term);
- term.setDimensions(term.getHeight()+1, term.getWidth());
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "11111");
- assertEquals(0, snapshot.getFirstChangedLine());
- assertEquals(4, snapshot.getLastChangedLine());
- assertEquals(0, snapshot.getScrollWindowStartLine());
- assertEquals(0, snapshot.getScrollWindowSize());
- assertEquals(0, snapshot.getScrollWindowShift());
-
- snapshot=snapshot(s,term);
- term.setDimensions(term.getHeight()-1, term.getWidth());
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "111");
- assertEquals(0, snapshot.getFirstChangedLine());
- assertEquals(2, snapshot.getLastChangedLine());
- assertEquals(0, snapshot.getScrollWindowStartLine());
- assertEquals(0, snapshot.getScrollWindowSize());
- assertEquals(0, snapshot.getScrollWindowShift());
-
- snapshot=snapshot(s,term);
- term.setDimensions(0, 0);
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "");
- assertEquals(0, snapshot.getFirstChangedLine());
- assertEquals(-1, snapshot.getLastChangedLine());
- assertEquals(0, snapshot.getScrollWindowStartLine());
- assertEquals(0, snapshot.getScrollWindowSize());
- assertEquals(0, snapshot.getScrollWindowShift());
-
- }
- public void testResizeAfterScroll() {
- ITerminalTextData term=makeITerminalTextData();
- String s="000000\n" +
- "111111\n" +
- "222222\n" +
- "333333\n" +
- "444444\n" +
- "555555\n" +
- "666666\n" +
- "777777\n" +
- "888888\n" +
- "999999";
- ITerminalTextDataSnapshot snapshot;
-
- snapshot=snapshot(s,term);
- term.scroll(1,2,-1);
- term.setDimensions(5, 4);
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "11111");
- assertEquals(0, snapshot.getScrollWindowStartLine());
- assertEquals(0, snapshot.getScrollWindowSize());
- assertEquals(0, snapshot.getScrollWindowShift());
-
- snapshot=snapshot(s,term);
- term.scroll(1,2,-1);
- term.setDimensions(7, 2);
- term.scroll(4,2,-1);
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "1111111");
- assertEquals(0, snapshot.getScrollWindowStartLine());
- assertEquals(0, snapshot.getScrollWindowSize());
- assertEquals(0, snapshot.getScrollWindowShift());
- snapshot=snapshot(s,term);
-
- term.scroll(1,2,-1);
- term.setDimensions(term.getHeight(),term.getWidth()+1);
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "1111111111");
- assertEquals(0, snapshot.getScrollWindowStartLine());
- assertEquals(0, snapshot.getScrollWindowSize());
- assertEquals(0, snapshot.getScrollWindowShift());
- }
- public void testScrollAfterResize() {
- ITerminalTextData term=makeITerminalTextData();
- String s="000000\n" +
- "111111\n" +
- "222222\n" +
- "333333\n" +
- "444444\n" +
- "555555\n" +
- "666666\n" +
- "777777\n" +
- "888888\n" +
- "999999";
- ITerminalTextDataSnapshot snapshot;
-
- snapshot=snapshot(s,term);
- term.setDimensions(14, 6);
- term.scroll(0,14,-1);
- snapshot.updateSnapshot(true);
- assertChangedLines(snapshot, "11111111111111");
- assertEquals(0, snapshot.getScrollWindowStartLine());
- assertEquals(0, snapshot.getScrollWindowSize());
- assertEquals(0, snapshot.getScrollWindowShift());
- }
- private final class SnapshotListener implements ITerminalTextDataSnapshot.SnapshotOutOfDateListener {
- int N;
- public void snapshotOutOfDate(ITerminalTextDataSnapshot snapshot) {
- N++;
- }
- public void reset() {
- N=0;
- }
- }
-
- public void testAddListener() {
- ITerminalTextData term=makeITerminalTextData();
- String s="12345\n" +
- "abcde\n" +
- "ABCDE\n" +
- "vwxzy\n" +
- "VWXYZ";
- TerminalTextTestHelper.fill(term,s);
-
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- snapshot.updateSnapshot(false);
-
- SnapshotListener listener=new SnapshotListener();
- snapshot.addListener(listener);
- assertEquals(0, listener.N);
-
- // make a change and expect it to be changed
- term.setChar(0, 0, '?', null);
- assertEquals(1, listener.N);
- term.setChar(1, 1, '?', null);
- assertEquals(1, listener.N);
-
- snapshot.updateSnapshot(false);
- assertEquals(1, listener.N);
- listener.reset();
-
- // make a change and expect it to be changed
- term.setChars(1, 1, new char[]{'?','!','.'},null);
- assertEquals(1, listener.N);
- term.setChars(2, 1, new char[]{'?','!','.'},null);
- assertEquals(1, listener.N);
-
- snapshot.updateSnapshot(false);
- assertEquals(1, listener.N);
- listener.reset();
-
- // scroll
- term.scroll(1, 2, -1);
- assertEquals(1, listener.N);
- term.scroll(1, 2, -1);
- assertEquals(1, listener.N);
-
- snapshot.updateSnapshot(false);
- assertEquals(1, listener.N);
- listener.reset();
-
- // scroll
- term.scroll(1, 2, 1);
- assertEquals(1, listener.N);
- term.scroll(1, 2, 1);
- assertEquals(1, listener.N);
-
- snapshot.updateSnapshot(false);
- assertEquals(1, listener.N);
- listener.reset();
-
- // scroll
- term.scroll(1, 2, -1);
- assertEquals(1, listener.N);
- term.scroll(1, 2, -1);
- assertEquals(1, listener.N);
-
- snapshot.updateSnapshot(false);
- assertEquals(1, listener.N);
- listener.reset();
-
- // scroll
- term.scroll(1, 2, 1);
- assertEquals(1, listener.N);
-
- snapshot.updateSnapshot(false);
- assertEquals(1, listener.N);
- listener.reset();
-
- // setDimensions
- term.setDimensions(2, 2);
- assertEquals(1, listener.N);
-
- snapshot.updateSnapshot(false);
- assertEquals(1, listener.N);
- listener.reset();
-
- // setDimensions
- term.setDimensions(20, 20);
- assertEquals(1, listener.N);
-
- snapshot.updateSnapshot(false);
- assertFalse(snapshot.isOutOfDate());
- }
-
- public void testRemoveListener() {
- ITerminalTextData term=makeITerminalTextData();
- String s="12345\n" +
- "abcde\n" +
- "ABCDE\n" +
- "vwxzy\n" +
- "VWXYZ";
- TerminalTextTestHelper.fill(term,s);
-
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- snapshot.updateSnapshot(false);
-
- SnapshotListener listener1=new SnapshotListener();
- SnapshotListener listener2=new SnapshotListener();
- SnapshotListener listener3=new SnapshotListener();
- snapshot.addListener(listener1);
- snapshot.addListener(listener2);
- snapshot.addListener(listener3);
- assertEquals(0, listener1.N);
-
- // make a change and expect it to be changed
- term.setChar(0, 0, '?', null);
- assertEquals(1, listener1.N);
- assertEquals(1, listener2.N);
- assertEquals(1, listener3.N);
- term.setChar(1, 1, '?', null);
- assertEquals(1, listener1.N);
- assertEquals(1, listener2.N);
- assertEquals(1, listener3.N);
-
- snapshot.updateSnapshot(false);
- assertEquals(1, listener1.N);
- assertEquals(1, listener2.N);
- assertEquals(1, listener3.N);
- listener1.reset();
- listener2.reset();
- listener3.reset();
-
- // make a change and expect it to be changed
- term.setChars(1, 1, new char[]{'?','!','.'},null);
- assertEquals(1, listener1.N);
- assertEquals(1, listener2.N);
- assertEquals(1, listener3.N);
- term.setChars(2, 1, new char[]{'?','!','.'},null);
- assertEquals(1, listener1.N);
- assertEquals(1, listener2.N);
- assertEquals(1, listener3.N);
-
-
- snapshot.updateSnapshot(false);
- assertEquals(1, listener1.N);
- assertEquals(1, listener2.N);
- assertEquals(1, listener3.N);
-
- listener1.reset();
- listener2.reset();
- listener3.reset();
-
- snapshot.removeListener(listener2);
-
- // scroll
- term.scroll(1, 2, -1);
- assertEquals(1, listener1.N);
- assertEquals(0, listener2.N);
- assertEquals(1, listener3.N);
-
- term.scroll(1, 2, -1);
- assertEquals(1, listener1.N);
- assertEquals(0, listener2.N);
- assertEquals(1, listener3.N);
-
-
- snapshot.updateSnapshot(false);
- assertEquals(1, listener1.N);
- assertEquals(0, listener2.N);
- assertEquals(1, listener3.N);
-
- snapshot.addListener(listener2);
- listener1.reset();
- listener2.reset();
- listener3.reset();
-
-
- snapshot.removeListener(listener3);
- // scroll
- term.scroll(1, 2, 1);
- assertEquals(1, listener1.N);
- assertEquals(1, listener2.N);
- assertEquals(0, listener3.N);
-
- term.scroll(1, 2, 1);
- assertEquals(1, listener1.N);
- assertEquals(1, listener2.N);
- assertEquals(0, listener3.N);
-
-
- snapshot.updateSnapshot(false);
- assertEquals(1, listener1.N);
- assertEquals(1, listener2.N);
- assertEquals(0, listener3.N);
-
- snapshot.addListener(listener3);
- listener1.reset();
- listener2.reset();
- listener3.reset();
-
- // add listener multiple times
- snapshot.addListener(listener3);
-
- // scroll
- term.scroll(1, 2, -1);
- assertEquals(1, listener1.N);
- assertEquals(1, listener2.N);
- assertEquals(2, listener3.N);
-
- term.scroll(1, 2, -1);
- assertEquals(1, listener1.N);
- assertEquals(1, listener2.N);
- assertEquals(2, listener3.N);
-
-
- snapshot.updateSnapshot(false);
- assertEquals(1, listener1.N);
- assertEquals(1, listener2.N);
- assertEquals(2, listener3.N);
-
- listener1.reset();
- listener2.reset();
- listener3.reset();
- // remove the duplicate listener
- snapshot.removeListener(listener3);
-
-
- // scroll
- term.scroll(1, 2, 1);
- assertEquals(1, listener1.N);
- assertEquals(1, listener2.N);
- assertEquals(1, listener3.N);
-
-
- snapshot.updateSnapshot(false);
- assertEquals(1, listener1.N);
- assertEquals(1, listener2.N);
- assertEquals(1, listener3.N);
-
- listener1.reset();
- listener2.reset();
- listener3.reset();
-
-
- // setDimensions
- term.setDimensions(2, 2);
- assertEquals(1, listener1.N);
- assertEquals(1, listener2.N);
- assertEquals(1, listener3.N);
-
-
- snapshot.updateSnapshot(false);
- assertEquals(1, listener1.N);
- assertEquals(1, listener2.N);
- assertEquals(1, listener3.N);
-
- listener1.reset();
- listener2.reset();
- listener3.reset();
-
-
- // setDimensions
- term.setDimensions(20, 20);
- assertEquals(1, listener1.N);
- assertEquals(1, listener2.N);
- assertEquals(1, listener3.N);
-
-
- snapshot.updateSnapshot(false);
- assertFalse(snapshot.isOutOfDate());
- }
- public void testWindowOfInterest() {
- ITerminalTextData term=makeITerminalTextData();
- TerminalTextTestHelper.fillSimple(term,"0123456789");
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- snapshot.updateSnapshot(false);
- snapshot.setInterestWindow(7, 4);
- snapshot.setInterestWindow(9, 4);
- snapshot.updateSnapshot(false);
- }
- public void testWindowOfInterest2() {
- ITerminalTextData term=makeITerminalTextData();
- TerminalTextTestHelper.fillSimple(term,"0123456789");
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- snapshot.updateSnapshot(false);
- term.scroll(7, 3,-1);
- snapshot.setInterestWindow(9, 4);
- snapshot.updateSnapshot(false);
- }
- public void testAddLine() {
- ITerminalTextData term=makeITerminalTextData();
- TerminalTextTestHelper.fillSimple(term,"0123456789");
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- term.setMaxHeight(20);
- snapshot.updateSnapshot(false);
- assertEquals(10,term.getHeight());
- assertEquals(20,term.getMaxHeight());
- assertFalse(snapshot.isOutOfDate());
- term.addLine();
- assertTrue(snapshot.isOutOfDate());
- assertEquals(11,term.getHeight());
- assertEquals(10,snapshot.getHeight());
- snapshot.updateSnapshot(false);
- assertEquals(11,term.getHeight());
- assertEquals(11,snapshot.getHeight());
- assertEquals(20,term.getMaxHeight());
-
- term.addLine();
- term.addLine();
- assertEquals(11,snapshot.getHeight());
- assertEquals(13,term.getHeight());
- assertTrue(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- assertEquals(13,snapshot.getHeight());
- assertEquals(13,term.getHeight());
- assertEquals(20,term.getMaxHeight());
- }
- public void testHasDimensionsChanged() {
- ITerminalTextData term=makeITerminalTextData();
- TerminalTextTestHelper.fillSimple(term,"0123456789");
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- term.setMaxHeight(20);
- snapshot.setInterestWindow(3, 4);
- snapshot.updateSnapshot(false);
- assertEquals(10,term.getHeight());
- assertEquals(20,term.getMaxHeight());
- assertFalse(snapshot.isOutOfDate());
- term.addLine();
- assertTrue(snapshot.isOutOfDate());
- assertEquals(11,term.getHeight());
- assertEquals(10,snapshot.getHeight());
- snapshot.updateSnapshot(false);
- assertTrue(snapshot.hasDimensionsChanged());
- assertEquals(11,term.getHeight());
- assertEquals(11,snapshot.getHeight());
- assertEquals(20,term.getMaxHeight());
-
- term.addLine();
- term.addLine();
- assertEquals(11,snapshot.getHeight());
- assertEquals(13,term.getHeight());
- assertTrue(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- assertTrue(snapshot.hasDimensionsChanged());
- assertEquals(13,snapshot.getHeight());
- assertEquals(13,term.getHeight());
- assertEquals(20,term.getMaxHeight());
- }
- public void testCursor() {
- ITerminalTextData term=makeITerminalTextData();
- TerminalTextTestHelper.fillSimple(term,"0123456789");
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- term.setMaxHeight(20);
- snapshot.setInterestWindow(3, 4);
- snapshot.updateSnapshot(false);
- term.setCursorLine(2);
- term.setCursorColumn(1);
- snapshot.updateSnapshot(false);
- assertEquals(2, snapshot.getCursorLine());
- assertEquals(1, snapshot.getCursorColumn());
- term.setCursorLine(3);
- term.setCursorColumn(2);
- snapshot.updateSnapshot(false);
- assertEquals(3, snapshot.getCursorLine());
- assertEquals(2, snapshot.getCursorColumn());
- }
- public void testCursor2() {
- ITerminalTextData term=makeITerminalTextData();
- TerminalTextTestHelper.fillSimple(term,"0123456789");
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- term.setMaxHeight(20);
- snapshot.setInterestWindow(3, 4);
- snapshot.updateSnapshot(false);
- term.setCursorLine(2);
- assertTrue(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- term.setCursorColumn(1);
- assertTrue(snapshot.isOutOfDate());
- }
- public void testHasTerminalChanged() {
- ITerminalTextData term=makeITerminalTextData();
- String s="12345\n" +
- "abcde\n" +
- "ABCDE\n" +
- "vwxzy\n" +
- "VWXYZ";
- TerminalTextTestHelper.fill(term,s);
-
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- assertTrue(snapshot.hasTerminalChanged());
- snapshot.updateSnapshot(false);
-
- assertTrue(snapshot.hasTerminalChanged());
-
- // make a change and expect it to be changed
- term.setChar(0, 0, '?', null);
- snapshot.updateSnapshot(false);
- assertTrue(snapshot.hasTerminalChanged());
-
- // make a change and expect it to be changed
- term.setChars(1, 1, new char[]{'?','!','.'},null);
- snapshot.updateSnapshot(false);
- assertTrue(snapshot.hasTerminalChanged());
-
- // scroll
- term.scroll(1, 2, -1);
- snapshot.updateSnapshot(false);
- assertTrue(snapshot.hasTerminalChanged());
-
- // scroll
- term.scroll(1, 2, 1);
- snapshot.updateSnapshot(false);
- assertTrue(snapshot.hasTerminalChanged());
-
- // scroll
- term.scroll(1, 2, -1);
- snapshot.updateSnapshot(true);
- assertTrue(snapshot.hasTerminalChanged());
-
- // scroll
- term.scroll(1, 2, 1);
- snapshot.updateSnapshot(true);
- assertTrue(snapshot.hasTerminalChanged());
-
- // setDimensions
- term.setDimensions(2, 2);
- snapshot.updateSnapshot(false);
- assertTrue(snapshot.hasTerminalChanged());
-
- // setDimensions
- term.setDimensions(20, 20);
- snapshot.updateSnapshot(false);
- assertTrue(snapshot.hasTerminalChanged());
-
- snapshot.updateSnapshot(false);
- assertFalse(snapshot.hasTerminalChanged());
-
- // window of interest changes should NOT set hasTerminalChanged
- snapshot.updateSnapshot(false);
- snapshot.setInterestWindow(7, 4);
-
- assertFalse(snapshot.hasTerminalChanged());
- }
- public void testGetTerminalTextData() {
- ITerminalTextData term=makeITerminalTextData();
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- assertSame(term, snapshot.getTerminalTextData());
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataSnapshotWindowTest.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataSnapshotWindowTest.java
deleted file mode 100644
index 7ce515cc1..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataSnapshotWindowTest.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tm.internal.terminal.model;
-
-import junit.framework.TestCase;
-
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-import org.eclipse.tm.terminal.model.ITerminalTextDataReadOnly;
-import org.eclipse.tm.terminal.model.ITerminalTextDataSnapshot;
-
-public class TerminalTextDataSnapshotWindowTest extends TestCase {
- String toMultiLineText(ITerminalTextDataReadOnly term) {
- return TerminalTextTestHelper.toMultiLineText(term);
- }
- String toSimpleText(ITerminalTextDataReadOnly term) {
- return TerminalTextTestHelper.toSimple(term);
- }
-
- protected ITerminalTextData makeITerminalTextData() {
- return new TerminalTextData();
- }
- ITerminalTextDataSnapshot snapshotSimple(String text, ITerminalTextData term) {
- TerminalTextTestHelper.fillSimple(term,text);
- ITerminalTextDataSnapshot snapshot=term.makeSnapshot();
- return snapshot;
-
- }
- /**
- * @param snapshot
- * @param expected a string of 0 and 1 (1 means changed)
- */
- void assertChangedLines(ITerminalTextDataSnapshot snapshot, String expected) {
- assertEquals(expected.length(),snapshot.getHeight());
- StringBuffer buffer=new StringBuffer();
- for (int line = 0; line < expected.length(); line++) {
- if(snapshot.hasLineChanged(line))
- buffer.append('1');
- else
- buffer.append('0');
- }
- assertEquals(expected, buffer.toString());
- }
-
- public void testSetInterestWindow() {
- ITerminalTextData term=makeITerminalTextData();
- ITerminalTextDataSnapshot snapshot=snapshotSimple("0123456789",term);
- assertEquals(0, snapshot.getInterestWindowStartLine());
- assertEquals(-1, snapshot.getInterestWindowSize());
- snapshot.setInterestWindow(2, 3);
- assertEquals(2, snapshot.getInterestWindowStartLine());
- assertEquals(3, snapshot.getInterestWindowSize());
- snapshot.updateSnapshot(false);
- assertChangedLines(snapshot,"0011100000");
- }
- public void testSetChar() {
- ITerminalTextData term=makeITerminalTextData();
- ITerminalTextDataSnapshot snapshot=snapshotSimple("0123456789",term);
- snapshot.setInterestWindow(2, 3);
- snapshot.updateSnapshot(false);
- assertEquals(" 234 ", toSimpleText(snapshot));
-
- term.setChar(0, 0, 'x', null);
- assertFalse(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- assertChangedLines(snapshot,"0000000000");
-
- term.setChar(1, 0, 'x', null);
- assertFalse(snapshot.isOutOfDate());
-
- term.setChar(2, 0, 'x', null);
- assertTrue(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- assertChangedLines(snapshot,"0010000000");
-
- term.setChar(3, 0, 'x', null);
- assertTrue(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- assertChangedLines(snapshot,"0001000000");
-
- term.setChar(4, 0, 'x', null);
- assertTrue(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- assertChangedLines(snapshot,"0000100000");
-
- term.setChar(5, 0, 'x', null);
- assertFalse(snapshot.isOutOfDate());
-
- term.setChar(6, 0, 'x', null);
- assertFalse(snapshot.isOutOfDate());
-
- for (int i = 0; i < 9; i++) {
- term.setChar(i, 0, (char)('a'+i), null);
- }
- assertTrue(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- assertChangedLines(snapshot,"0011100000");
- }
-
- public void testSetChars() {
- ITerminalTextData term=makeITerminalTextData();
- ITerminalTextDataSnapshot snapshot=snapshotSimple("0123456789",term);
- snapshot.setInterestWindow(2, 3);
- snapshot.updateSnapshot(false);
- assertEquals(" 234 ", toSimpleText(snapshot));
-
- term.setChars(0, 0, "x".toCharArray(), null);
- assertFalse(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- assertChangedLines(snapshot,"0000000000");
-
- term.setChars(1, 0, "x".toCharArray(), null);
- assertFalse(snapshot.isOutOfDate());
-
- term.setChars(2, 0, "x".toCharArray(), null);
- assertTrue(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- assertChangedLines(snapshot,"0010000000");
-
- term.setChars(3, 0, "x".toCharArray(), null);
- assertTrue(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- assertChangedLines(snapshot,"0001000000");
-
- term.setChars(4, 0, "x".toCharArray(), null);
- assertTrue(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- assertChangedLines(snapshot,"0000100000");
-
- term.setChars(5, 0, "x".toCharArray(), null);
- assertFalse(snapshot.isOutOfDate());
-
- term.setChars(6, 0, "x".toCharArray(), null);
- assertFalse(snapshot.isOutOfDate());
- for (int i = 0; i < 9; i++) {
- term.setChars(i, 0, (i+"").toCharArray(), null);
- }
- assertTrue(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- assertChangedLines(snapshot,"0011100000");
- }
- public void testSetChars2() {
- ITerminalTextData term=makeITerminalTextData();
- ITerminalTextDataSnapshot snapshot=snapshotSimple("0123456789",term);
- snapshot.setInterestWindow(2, 3);
- snapshot.updateSnapshot(false);
- assertEquals(" 234 ", toSimpleText(snapshot));
-
- term.setChars(0, 0, "abcdef".toCharArray(),2,1, null);
- assertFalse(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- assertChangedLines(snapshot,"0000000000");
-
- term.setChars(1, 0, "abcdef".toCharArray(),2 ,1, null);
- assertFalse(snapshot.isOutOfDate());
-
- term.setChars(2, 0, "abcdef".toCharArray(),2 ,1, null);
- assertTrue(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- assertChangedLines(snapshot,"0010000000");
-
- term.setChars(3, 0, "abcdef".toCharArray(),2 ,1, null);
- assertTrue(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- assertChangedLines(snapshot,"0001000000");
-
- term.setChars(4, 0, "abcdef".toCharArray(),2 ,1, null);
- assertTrue(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- assertChangedLines(snapshot,"0000100000");
-
- term.setChars(5, 0, "abcdef".toCharArray(),2 ,1, null);
- assertFalse(snapshot.isOutOfDate());
-
- term.setChars(6, 0, "abcdef".toCharArray(),2 ,1, null);
- assertFalse(snapshot.isOutOfDate());
- for (int i = 0; i < 9; i++) {
- term.setChars(i, 0, ("ab"+i+"def").toCharArray(),2 ,1, null);
- }
- assertTrue(snapshot.isOutOfDate());
- snapshot.updateSnapshot(false);
- assertChangedLines(snapshot,"0011100000");
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataStoreTest.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataStoreTest.java
deleted file mode 100644
index 743d17792..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataStoreTest.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tm.internal.terminal.model;
-
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-
-public class TerminalTextDataStoreTest extends AbstractITerminalTextDataTest {
- protected ITerminalTextData makeITerminalTextData() {
- return new TerminalTextDataStore();
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataTest.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataTest.java
deleted file mode 100644
index 457e18d42..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataTest.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tm.internal.terminal.model;
-
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-
-public class TerminalTextDataTest extends AbstractITerminalTextDataTest {
- protected ITerminalTextData makeITerminalTextData() {
- return new TerminalTextData();
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataWindowTest.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataWindowTest.java
deleted file mode 100644
index 5e739176c..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataWindowTest.java
+++ /dev/null
@@ -1,481 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Michael Scharf (Wind River) - initial API and implementation
- * Martin Oberhuber (Wind River) - [168197] Fix Terminal for CDC-1.1/Foundation-1.1
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.model;
-
-import java.util.ArrayList;
-
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-import org.eclipse.tm.terminal.model.LineSegment;
-import org.eclipse.tm.terminal.model.Style;
-import org.eclipse.tm.terminal.model.StyleColor;
-
-public class TerminalTextDataWindowTest extends AbstractITerminalTextDataTest {
- int fOffset;
- int fSize;
- public TerminalTextDataWindowTest() {
- fOffset=2;
- fSize=2;
- }
- protected ITerminalTextData makeITerminalTextData() {
- TerminalTextDataWindow term=new TerminalTextDataWindow();
- term.setWindow(fOffset,fSize);
- return term;
- }
- /**
- * Used for multi line text
- * @param expected
- * @param actual
- */
- protected void assertEqualsTerm(String expected,String actual) {
- assertEquals(stripMultiLine(expected), stripMultiLine(actual));
- }
- private String stripMultiLine(String s) {
- StringBuffer b=new StringBuffer();
- // String[] lines=s.split("\n");
- // <J2ME CDC-1.1 Foundation-1.1 variant>
- ArrayList l = new ArrayList();
- int j = 0;
- for (int k = 0; k < s.length(); k++) {
- if (s.charAt(k) == '\n') {
- l.add(s.substring(j, k));
- j = k;
- }
- }
- j = l.size() - 1;
- while (j >= 0 && "".equals(l.get(j))) {
- j--;
- }
- String[] lines = new String[j + 1];
- while (j >= 0) {
- lines[j] = (String) l.get(j);
- j--;
- }
- // </J2ME CDC-1.1 Foundation-1.1 variant>
- for (int i = 0; i < lines.length; i++) {
- if(i>0)
- b.append("\n"); //$NON-NLS-1$
- if(i>=fOffset && i<fOffset+fSize)
- b.append(lines[i]);
- else
- b.append(new String(new char[lines[i].length()]));
- }
- return b.toString();
- }
- /**
- * Used for simple text
- * @param expected
- * @param actual
- */
- protected void assertEqualsSimple(String expected,String actual) {
- assertEquals(stripSimple(expected), stripSimple(actual));
- }
- String stripSimple(String s) {
- StringBuffer b=new StringBuffer();
- for (int i = 0; i < s.length(); i++) {
- if(i>=fOffset && i<fOffset+fSize)
- b.append(s.charAt(i));
- else
- b.append(' ');
- }
- return b.toString();
- }
- public void testAddLine() {
- String s=
- "111\n" +
- "222\n" +
- "333\n" +
- "444\n" +
- "555";
- ITerminalTextData term=makeITerminalTextData();
- fill(term, s);
- term.addLine();
- assertEqualsTerm(
- "222\n" +
- "333\n" +
- "444\n" +
- "\0\0\0\n" +
- "\000\000\000", toMultiLineText(term));
- }
-
- public void testMaxSize() {
- String s=
- "111\n" +
- "222\n" +
- "333\n" +
- "444\n" +
- "555";
- ITerminalTextData term=makeITerminalTextData();
- term.setMaxHeight(8);
- fill(term, s);
- assertEquals(5, term.getHeight());
- assertEquals(8, term.getMaxHeight());
- term.addLine();
- assertEquals(6, term.getHeight());
- assertEqualsTerm(
- "111\n" +
- "222\n" +
- "333\n" +
- "444\n" +
- "555\n" +
- "\000\000\000", toMultiLineText(term));
- term.addLine();
- assertEquals(7, term.getHeight());
- assertEqualsTerm(
- "111\n" +
- "222\n" +
- "333\n" +
- "444\n" +
- "555\n" +
- "\000\000\000\n" +
- "\000\000\000", toMultiLineText(term));
- term.addLine();
- assertEquals(8, term.getHeight());
- assertEqualsTerm(
- "111\n" +
- "222\n" +
- "333\n" +
- "444\n" +
- "555\n" +
- "\000\000\000\n" +
- "\000\000\000\n" +
- "\000\000\000", toMultiLineText(term));
- term.addLine();
- assertEquals(8, term.getHeight());
- assertEqualsTerm(
- "222\n" +
- "333\n" +
- "444\n" +
- "\000\000\000\n" +
- "\000\000\000\n" +
- "\000\000\000\n" +
- "\000\000\000\n" +
- "\000\000\000", toMultiLineText(term));
- }
-
- public void testGetLineSegments() {
- Style s1=getDefaultStyle();
- Style s2=s1.setBold(true);
- Style s3=s1.setUnderline(true);
- ITerminalTextData term=makeITerminalTextData();
- term.setDimensions(8, 8);
- LineSegment[] segments;
-
- term.setChars(2, 0,"0123".toCharArray(), s1);
- term.setChars(2, 4,"abcd".toCharArray(), null);
- segments=term.getLineSegments(2, 0, term.getWidth());
- assertEquals(2, segments.length);
- assertSegment(0, "0123", s1, segments[0]);
- assertSegment(4, "abcd", null, segments[1]);
-
-
- segments=term.getLineSegments(2, 4, term.getWidth()-4);
- assertEquals(1, segments.length);
- assertSegment(4, "abcd", null, segments[0]);
-
- segments=term.getLineSegments(2, 3, 2);
- assertEquals(2, segments.length);
- assertSegment(3, "3", s1, segments[0]);
- assertSegment(4, "a", null, segments[1]);
-
- segments=term.getLineSegments(2, 7, 1);
- assertEquals(1, segments.length);
- assertSegment(7, "d", null, segments[0]);
-
- segments=term.getLineSegments(2, 0, 1);
- assertEquals(1, segments.length);
- assertSegment(0, "0", s1, segments[0]);
-
- // line 1
- term.setChars(1, 0,"x".toCharArray(), s1);
- term.setChars(1, 1,"y".toCharArray(), s2);
- term.setChars(1, 2,"z".toCharArray(), s3);
-
- segments=term.getLineSegments(1, 0, term.getWidth());
- assertEquals(1, segments.length);
- assertSegment(0, "\000\000\000\000\000\000\000\000", null, segments[0]);
-
- // line 3
- segments=term.getLineSegments(3, 0, term.getWidth());
- assertEquals(1, segments.length);
- assertSegment(0, "\000\000\000\000\000\000\000\000", null, segments[0]);
-
- }
- public void testGetChar() {
- String s="12345\n" +
- "abcde\n" +
- "ABCDE";
- ITerminalTextData term=makeITerminalTextData();
- fill(term, s);
- assertEquals('\000', term.getChar(0,0));
- assertEquals('\000', term.getChar(0,1));
- assertEquals('\000', term.getChar(0,2));
- assertEquals('\000', term.getChar(0,3));
- assertEquals('\000', term.getChar(0,4));
- assertEquals('\000', term.getChar(1,0));
- assertEquals('\000', term.getChar(1,1));
- assertEquals('\000', term.getChar(1,2));
- assertEquals('\000', term.getChar(1,3));
- assertEquals('\000', term.getChar(1,4));
- assertEquals('A', term.getChar(2,0));
- assertEquals('B', term.getChar(2,1));
- assertEquals('C', term.getChar(2,2));
- assertEquals('D', term.getChar(2,3));
- assertEquals('E', term.getChar(2,4));
- }
- public void testGetStyle() {
- ITerminalTextData term=makeITerminalTextData();
- Style style=getDefaultStyle();
- term.setDimensions(6, 3);
- for (int line = 0; line < term.getHeight(); line++) {
- for (int column = 0; column < term.getWidth(); column++) {
- char c=(char)('a'+column+line);
- term.setChar(line, column, c, style.setForground(StyleColor.getStyleColor(""+c)));
- }
- }
- for (int line = 0; line < term.getHeight(); line++) {
- for (int column = 0; column < term.getWidth(); column++) {
- char c=(char)('a'+column+line);
- Style s=null;
- if(line>=fOffset&&line<fOffset+fSize)
- s=style.setForground(StyleColor.getStyleColor(""+c));
- assertSame(s, term.getStyle(line, column));
- }
- }
-
- }
- public void testSetChar() {
- ITerminalTextData term=makeITerminalTextData();
- term.setDimensions(6, 3);
- for (int line = 0; line < term.getHeight(); line++) {
- for (int column = 0; column < term.getWidth(); column++) {
- term.setChar(line, column, (char)('a'+column+line), null);
- }
- }
- for (int line = 0; line < term.getHeight(); line++) {
- for (int column = 0; column < term.getWidth(); column++) {
- char c=0;
- if(line>=fOffset&&line<fOffset+fSize)
- c=(char)('a'+column+line);
- assertEquals(c, term.getChar(line,column));
- }
- }
- assertEqualsTerm(
- "abc\n"
- + "bcd\n"
- + "cde\n"
- + "def\n"
- + "efg\n"
- + "fgh", toMultiLineText(term));
- }
-
- public void testSetChars() {
- ITerminalTextData term=makeITerminalTextData();
- term.setDimensions(6, 3);
- for (int line = 0; line < term.getHeight(); line++) {
- char[] chars=new char[term.getWidth()];
- for (int column = 0; column < term.getWidth(); column++) {
- chars[column]=(char)('a'+column+line);
- }
- term.setChars(line, 0, chars, null);
- }
- for (int line = 0; line < term.getHeight(); line++) {
- for (int column = 0; column < term.getWidth(); column++) {
- char c=0;
- if(line>=fOffset&&line<fOffset+fSize)
- c=(char)('a'+column+line);
- assertEquals(c, term.getChar(line,column));
- }
- }
- assertEqualsTerm(
- "abc\n"
- + "bcd\n"
- + "cde\n"
- + "def\n"
- + "efg\n"
- + "fgh", toMultiLineText(term));
-
- term.setChars(3, 1, new char[]{'1','2'}, null);
- assertEqualsTerm(
- "abc\n"
- + "bcd\n"
- + "cde\n"
- + "d12\n"
- + "efg\n"
- + "fgh", toMultiLineText(term));
- // check if chars are correctly chopped
- term.setChars(4, 1, new char[]{'1','2','3','4','5'}, null);
- assertEqualsTerm(
- "abc\n"
- + "bcd\n"
- + "cde\n"
- + "d12\n"
- + "e12\n"
- + "fgh", toMultiLineText(term));
-
- }
- public void testSetCharsLen() {
- ITerminalTextData term=makeITerminalTextData();
- String s= "ZYXWVU\n"
- + "abcdef\n"
- + "ABCDEF";
- fill(term, s);
- char[] chars=new char[]{'1','2','3','4','5','6','7','8'};
- term.setChars(1, 0, chars, 0, 6,null);
- assertEqualsTerm(
- "ZYXWVU\n"
- + "123456\n"
- + "ABCDEF", toMultiLineText(term));
-
- fill(term, s);
- term.setChars(1, 0, chars, 0, 5, null);
- assertEqualsTerm("ZYXWVU\n"
- + "12345f\n"
- + "ABCDEF", toMultiLineText(term));
-
- fill(term, s);
- term.setChars(1, 0, chars, 1, 5, null);
- assertEqualsTerm("ZYXWVU\n"
- + "23456f\n"
- + "ABCDEF", toMultiLineText(term));
-
- fill(term, s);
- term.setChars(1, 1, chars, 1, 4, null);
- assertEqualsTerm("ZYXWVU\n"
- + "a2345f\n"
- + "ABCDEF", toMultiLineText(term));
-
-
-
- fill(term, s);
- term.setChars(1, 2, chars, 3, 4, null);
- assertEqualsTerm("ZYXWVU\n"
- + "ab4567\n"
- + "ABCDEF", toMultiLineText(term));
-
- fill(term, s);
- }
- public void testSetCopyLines() {
- ITerminalTextData term=new TerminalTextDataStore();
- String s="012345";
- fillSimple(term, s);
- ITerminalTextData termCopy=makeITerminalTextData();
- String sCopy="abcde";
- fillSimple(termCopy, sCopy);
- termCopy.copyRange(term,0,0,0);
- assertEqualsSimple(s, toSimple(term));
- assertEqualsSimple(sCopy, toSimple(termCopy));
-
- fillSimple(termCopy, sCopy);
- termCopy.copyRange(term,0,0,5);
- assertEqualsSimple(s, toSimple(term));
- assertEqualsSimple("01234", toSimple(termCopy));
-
- fillSimple(termCopy, sCopy);
- termCopy.copyRange(term,0,0,2);
- assertEqualsSimple(s, toSimple(term));
- assertEqualsSimple("01cde", toSimple(termCopy));
-
- fillSimple(termCopy, sCopy);
- termCopy.copyRange(term,0,1,2);
- assertEqualsSimple(s, toSimple(term));
- assertEqualsSimple("a01de", toSimple(termCopy));
-
- fillSimple(termCopy, sCopy);
- termCopy.copyRange(term,1,1,2);
- assertEqualsSimple(s, toSimple(term));
- assertEqualsSimple("a12de", toSimple(termCopy));
-
- fillSimple(termCopy, sCopy);
- termCopy.copyRange(term,1,1,4);
- assertEqualsSimple(s, toSimple(term));
- assertEqualsSimple("a1234", toSimple(termCopy));
-
- fillSimple(termCopy, sCopy);
- termCopy.copyRange(term,2,1,4);
- assertEqualsSimple(s, toSimple(term));
- assertEqualsSimple("a2345", toSimple(termCopy));
- }
- public void testScrollNegative() {
- scrollTest(0,2,-1," 23 "," 23 ");
- scrollTest(0,1,-1," 23 "," 23 ");
- scrollTest(0,6,-1," 23 "," 3 ");
- scrollTest(0,6,-6," 23 "," ");
- scrollTest(0,6,-7," 23 "," ");
- scrollTest(0,6,-8," 23 "," ");
- scrollTest(0,6,-2," 23 "," ");
- scrollTest(1,1,-1," 23 "," 23 ");
- scrollTest(1,2,-1," 23 "," 3 ");
- scrollTest(5,1,-1," 23 "," 23 ");
- scrollTest(5,1,-1," 23 "," 23 ");
- }
- public void testScrollAll() {
- scrollTest(0,6,1, " 2345"," 2 ");
- scrollTest(0,6,-1, " 2345"," 3 ");
- scrollTest(0,6,2, " 2345"," ");
- scrollTest(0,6,-2, " 2345"," ");
- }
- public void testCopyLineWithOffset() {
- ITerminalTextData term=makeITerminalTextData();
- String s=
- "111\n" +
- "222\n" +
- "333\n" +
- "444\n" +
- "555";
- fill(term, s);
- ITerminalTextData dest=makeITerminalTextData();
- String sCopy=
- "aaa\n" +
- "bbb\n" +
- "ccc\n" +
- "ddd\n" +
- "eee";
- fill(dest, sCopy);
- copySelective(dest,term,1,0,new boolean []{true,false,false,true});
- assertEqualsTerm(s, toMultiLineText(term));
- assertEqualsTerm(
- "222\n" +
- "bbb\n" +
- "ccc\n" +
- "\00\00\00\n" +
- "eee", toMultiLineText(dest));
-
- fill(dest, sCopy);
- copySelective(dest,term,2,0,new boolean []{true,true});
- assertEqualsTerm(s, toMultiLineText(term));
- assertEqualsTerm(
- "333\n" +
- "444\n" +
- "ccc\n" +
- "ddd\n" +
- "eee", toMultiLineText(dest));
-
- fill(dest, sCopy);
- copySelective(dest,term,0,0,new boolean []{true,true,true,true,true});
- assertEqualsTerm(s, toMultiLineText(term));
- assertEqualsTerm(s, toMultiLineText(dest));
-
- fill(dest, sCopy);
- copySelective(dest,term,0,0,new boolean []{false,false,false,false,false});
- assertEqualsTerm(s, toMultiLineText(term));
- assertEqualsTerm(sCopy, toMultiLineText(dest));
- }
- public void testCopy() {
- ITerminalTextData term=makeITerminalTextData();
- term.setDimensions(3, 1);
- ITerminalTextData data=new TerminalTextData();
- fillSimple(data,"abcd");
- term.copy(data);
-
-
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextTestHelper.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextTestHelper.java
deleted file mode 100644
index 95a91f9b3..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/model/TerminalTextTestHelper.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Michael Scharf (Wind River) - initial API and implementation
- * Martin Oberhuber (Wind River) - [168197] Fix Terminal for CDC-1.1/Foundation-1.1
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.model;
-
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-import org.eclipse.tm.terminal.model.ITerminalTextDataReadOnly;
-import org.eclipse.tm.terminal.model.Style;
-import org.eclipse.tm.terminal.model.StyleColor;
-
-public class TerminalTextTestHelper {
- static public String toSimple(ITerminalTextDataReadOnly term) {
- return toSimple(toMultiLineText(term));
- }
- static public String toMultiLineText(ITerminalTextDataReadOnly term) {
- StringBuffer buff=new StringBuffer();
- int width=term.getWidth();
- for (int line = 0; line < term.getHeight(); line++) {
- if(line>0)
- buff.append("\n"); //$NON-NLS-1$
- for (int column = 0; column < width; column++) {
- buff.append(term.getChar(line, column));
- }
- }
- return buff.toString();
- }
- static public String toSimple(String str) {
- //return str.replaceAll("\000", " ").replaceAll("\n", "");
- // <J2ME CDC-1.1 Foundation-1.1 variant>
- StringBuffer buf = new StringBuffer(str.length());
- for (int i = 0; i < str.length(); i++) {
- char c = str.charAt(i);
- switch (c) {
- case '\000':
- buf.append(' ');
- break;
- case '\n':
- break;
- default:
- buf.append(c);
- break;
- }
- }
- return buf.toString();
- // </J2ME CDC-1.1 Foundation-1.1 variant>
- }
- /**
- * @param term
- * @param s each character is one line
- */
- static public void fillSimple(ITerminalTextData term, String s) {
- Style style=Style.getStyle(StyleColor.getStyleColor("fg"), StyleColor.getStyleColor("bg"), false, false, false, false);
- term.setDimensions(s.length(), 1);
- for (int i = 0; i < s.length(); i++) {
- char c=s.charAt(i);
- term.setChar(i, 0, c, style.setForground(StyleColor.getStyleColor(""+c)));
- }
- }
- /**
- * @param term
- * @param s lines separated by \n. The terminal will automatically
- * resized to fit the text.
- */
- static public void fill(ITerminalTextData term, String s) {
- int width=0;
- int len=0;
- int height=0;
- for (int i = 0; i < s.length(); i++) {
- char c=s.charAt(i);
- if(c=='\n') {
- width=Math.max(width,len);
- len=0;
- } else {
- if(len==0)
- height++;
- len++;
- }
- }
- width=Math.max(width,len);
- term.setDimensions(height, width);
- fill(term,0,0,s);
- }
-
- static public void fill(ITerminalTextData term, int column, int line, String s) {
- int xx=column;
- int yy=line;
- Style style=Style.getStyle(StyleColor.getStyleColor("fg"), StyleColor.getStyleColor("bg"), false, false, false, false);
- for (int i = 0; i < s.length(); i++) {
- char c=s.charAt(i);
- if(c=='\n') {
- yy++;
- xx=column;
- } else {
- term.setChar(yy, xx, c, style.setForground(StyleColor.getStyleColor(""+c)));
- xx++;
- }
- }
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/speedtest/SpeedTestConnection.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/speedtest/SpeedTestConnection.java
deleted file mode 100644
index 115435b0f..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/speedtest/SpeedTestConnection.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tm.internal.terminal.speedtest;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl;
-import org.eclipse.tm.internal.terminal.provisional.api.Logger;
-import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
-
-public class SpeedTestConnection extends Thread {
- private static int fgNo;
- private final ITerminalControl fControl;
- private final InputStream fInputStream;
- private final SpeedTestSettings fSettings;
- protected SpeedTestConnection(InputStream inputStream, SpeedTestSettings settings,ITerminalControl control) {
- super("SpeedTestConnection-"+fgNo++);
- fControl = control;
- fInputStream=inputStream;
- fSettings=settings;
- }
- public void run() {
- fControl.setState(TerminalState.CONNECTED);
-
- try {
- readDataForever(fInputStream,fControl.getRemoteToTerminalOutputStream());
- } catch (IOException e) {
- connectFailed(e.getMessage(),e.getMessage());
- }
- // when reading is done, we set the state to closed
- fControl.setState(TerminalState.CLOSED);
- }
- private void connectFailed(String terminalText, String msg) {
- Logger.log(terminalText);
- fControl.displayTextInTerminal(terminalText);
- fControl.setState(TerminalState.CLOSED);
- fControl.setMsg(msg);
- }
- /**
- * Read the data from the input file and display it in the terminal.
- * @param in
- * @throws IOException
- */
- private void readDataForever(InputStream in, OutputStream os) throws IOException {
- long N=0;
- long T=0;
- long tDisplay=0;
- int NCalls=0;
- int bufferSize=fSettings.getBufferSize();
- int throttle=fSettings.getThrottle();
- // read the data
- BufferedReader reader = new BufferedReader(new InputStreamReader(in));
- // read until the thread gets interrupted....
- String info="";
- int n=0;
- byte[] crnl="\r\n".getBytes("UTF-8");
- long t0=System.currentTimeMillis();
- String line=null;
- do {
- line=reader.readLine();
-
- // read some bytes
- if(line!=null) {
- os.write(line.getBytes("UTF-8"));
- os.write(crnl);
- n+=line.length();
- }
- // process at least this number of characters to update the UI
- if(line==null || n>bufferSize) {
- if(throttle>0)
- sleep(throttle);
- // we assume we get ASCII UTF8 bytes
- long t=System.currentTimeMillis();
- T+=t-t0;
- N+=n;
- NCalls++;
- if(t-tDisplay>1000 && T>0) {
- long rate=(1000*N)/T;
- info=rate+" byte/s = "+rate*8+" baud "+"bytes/call="+N/NCalls;
- info=rate+" byte/s with buffer size "+fSettings.getBufferSize();
- setTitle(info);
- tDisplay=System.currentTimeMillis();
- }
- n=0;
- t0=System.currentTimeMillis();
- }
- } while(line!=null);
- }
- private void sleep(int ms) {
- try {
- Thread.sleep(ms);
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- }
- }
- private void setTitle(final String title) {
- Display.getDefault().asyncExec(new Runnable(){
- public void run() {
- fControl.setTerminalTitle(title);
- }});
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/speedtest/SpeedTestConnector.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/speedtest/SpeedTestConnector.java
deleted file mode 100644
index 88e9b5a5d..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/speedtest/SpeedTestConnector.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Michael Scharf (Wind River) - initial API and implementation
- * Martin Oberhuber (Wind River) - [225853][api] Provide more default functionality in TerminalConnectorImpl
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.speedtest;
-
-import java.io.BufferedInputStream;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage;
-import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
-import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl;
-import org.eclipse.tm.internal.terminal.provisional.api.Logger;
-import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
-import org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl;
-
-public class SpeedTestConnector extends TerminalConnectorImpl {
- final SpeedTestSettings fSettings=new SpeedTestSettings();
- InputStream fInputStream;
- OutputStream fOutputStream;
- SpeedTestConnection fConnection;
- public SpeedTestConnector() {
- }
- synchronized public void connect(ITerminalControl control) {
- super.connect(control);
- fControl.setState(TerminalState.CONNECTING);
- String file=fSettings.getInputFile();
- try {
- fInputStream=new BufferedInputStream(new FileInputStream(file));
- } catch (FileNotFoundException e) {
- disconnect();
- fControl.setMsg(file+": "+e.getLocalizedMessage());
- return;
- }
- fOutputStream=System.out;
- fControl.setTerminalTitle(fSettings.getInputFile());
- fConnection=new SpeedTestConnection(fInputStream,fSettings,fControl);
- fConnection.start();
- }
-
- synchronized public void doDisconnect() {
- if(fConnection!=null){
- fConnection.interrupt();
- fConnection=null;
- }
- if (fInputStream != null) {
- try {
- fInputStream.close();
- } catch (Exception exception) {
- Logger.logException(exception);
- }
- }
- fInputStream=null;
- if (fOutputStream != null) {
- try {
- fOutputStream.close();
- } catch (Exception exception) {
- Logger.logException(exception);
- }
- }
- fOutputStream=null;
- }
- synchronized public InputStream getInputStream() {
- return fInputStream;
- }
-
- synchronized public OutputStream getTerminalToRemoteStream() {
- return fOutputStream;
- }
-
- public String getSettingsSummary() {
- return fSettings.getInputFile();
- }
-
- public void initialize() {
- //throw new RuntimeException("XXX problems\nSpeedTest\nXXX!");
- }
-
- public void load(ISettingsStore store) {
- fSettings.load(store);
- }
-
- public ISettingsPage makeSettingsPage() {
- return new SpeedTestSettingsPage(fSettings);
- }
-
- public void save(ISettingsStore store) {
- fSettings.save(store);
- }
-
- public void setTerminalSize(int newWidth, int newHeight) {
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/speedtest/SpeedTestSettings.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/speedtest/SpeedTestSettings.java
deleted file mode 100644
index 84f94226c..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/speedtest/SpeedTestSettings.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tm.internal.terminal.speedtest;
-
-
-import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
-
-public class SpeedTestSettings {
- String fInputFile="";
- String fBufferSize="";
- String fThrottle;
- String getInputFile() {
- return fInputFile;
- }
- public String getBufferSizeString() {
- return getBufferSize()+"";
- }
- public void setBufferSizeString(String bufferSize) {
- fBufferSize = bufferSize;
- }
- public int getBufferSize() {
- try {
- return Integer.parseInt(fBufferSize);
- } catch(RuntimeException e) {
- return 1024;
- }
- }
- void setInputFile(String testFile) {
- fInputFile = testFile;
- }
- public void load(ISettingsStore store) {
- fInputFile=store.get("inputFile");
- fBufferSize=store.get("bufferSize");
- fThrottle=store.get("throttle");
- }
- public void save(ISettingsStore store) {
- store.put("inputFile", fInputFile);
- store.put("bufferSize", fBufferSize);
- store.put("throttle", fThrottle);
- }
- public String getThrottleString() {
- return fThrottle;
- }
- public int getThrottle() {
- try {
- return Integer.parseInt(fThrottle);
- } catch(RuntimeException e) {
- return 0;
- }
- }
- public void setThrottleString(String throttle) {
- fThrottle = throttle;
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/speedtest/SpeedTestSettingsPage.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/speedtest/SpeedTestSettingsPage.java
deleted file mode 100644
index 1f0c5a234..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/speedtest/SpeedTestSettingsPage.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tm.internal.terminal.speedtest;
-
-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.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage;
-
-public class SpeedTestSettingsPage implements ISettingsPage {
- final SpeedTestSettings fSettings;
- Text fInputFile;
- Text fBufferSize;
- private Text fThrottle;
- SpeedTestSettingsPage(SpeedTestSettings settings) {
- fSettings=settings;
- }
- public void createControl(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout gridLayout = new GridLayout(2, false);
-
- composite.setLayout(gridLayout);
- composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- fInputFile=createTextField(composite, "Input File:");//$NON-NLS-1$
- fBufferSize=createTextField(composite, "Buffer Size:");//$NON-NLS-1$
- fThrottle=createTextField(composite, "Throttle:");//$NON-NLS-1$
- loadSettings();
- }
- private Text createTextField(Composite composite, String label) {
- new Label(composite, SWT.RIGHT).setText(label);
- Text text = new Text(composite, SWT.BORDER);
- text.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- return text;
- }
-
- public void loadSettings() {
- setText(fInputFile, fSettings.getInputFile());
- setText(fBufferSize, fSettings.getBufferSizeString());
- setText(fThrottle, fSettings.getThrottleString());
- }
- private void setText(Text text, String value) {
- if(value==null)
- value="";
- text.setText(value);
- }
-
- public void saveSettings() {
- fSettings.setInputFile(fInputFile.getText());
- fSettings.setBufferSizeString(fBufferSize.getText());
- fSettings.setThrottleString(fThrottle.getText());
- }
-
- public boolean validateSettings() {
- return true;
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/terminalcanvas/Main.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/terminalcanvas/Main.java
deleted file mode 100644
index 6dde5a8bf..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/terminalcanvas/Main.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tm.internal.terminal.test.terminalcanvas;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
-public class Main {
-
- /**
- * @param args
- */
- public static void main(String[] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- shell.setLayout(new FillLayout());
- new TerminalTextCanvas(shell,SWT.NONE);
- shell.setSize (200, 150);
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/terminalcanvas/Snippet48.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/terminalcanvas/Snippet48.java
deleted file mode 100644
index 604d8b58b..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/terminalcanvas/Snippet48.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Michael Scharf (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.test.terminalcanvas;
-
-
-/*
- * Canvas example snippet: scroll an image (flicker free, no double buffering)
- *
- * For a list of all SWT example snippets see
- * http://www.eclipse.org/swt/snippets/
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet48 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- shell.setLayout(new FillLayout());
- Image originalImage = null;
- FileDialog dialog = new FileDialog (shell, SWT.OPEN);
- dialog.setText ("Open an image file or cancel");
- String string = dialog.open ();
- if (string != null) {
- originalImage = new Image (display, string);
- }
- final Image image = originalImage;
- final Point origin = new Point (0, 0);
- final Canvas canvas = new Canvas (shell, SWT.NO_BACKGROUND |
- SWT.NO_REDRAW_RESIZE | SWT.V_SCROLL | SWT.H_SCROLL);
- final ScrollBar hBar = canvas.getHorizontalBar ();
- hBar.addListener (SWT.Selection, new Listener () {
- public void handleEvent (Event e) {
- int hSelection = hBar.getSelection ();
- int destX = -hSelection - origin.x;
- Rectangle rect = image.getBounds ();
- canvas.scroll (destX, 0, 0, 0, rect.width, rect.height, false);
- origin.x = -hSelection;
- }
- });
- final ScrollBar vBar = canvas.getVerticalBar ();
- vBar.addListener (SWT.Selection, new Listener () {
- public void handleEvent (Event e) {
- int vSelection = vBar.getSelection ();
- int destY = -vSelection - origin.y;
- Rectangle rect = image.getBounds ();
- canvas.scroll (0, destY, 0, 0, rect.width, rect.height, false);
- origin.y = -vSelection;
- }
- });
- canvas.addListener (SWT.Resize, new Listener () {
- public void handleEvent (Event e) {
- Rectangle rect = image.getBounds ();
- Rectangle client = canvas.getClientArea ();
- hBar.setMaximum (rect.width);
- vBar.setMaximum (rect.height);
- hBar.setThumb (Math.min (rect.width, client.width));
- vBar.setThumb (Math.min (rect.height, client.height));
- int hPage = rect.width - client.width;
- int vPage = rect.height - client.height;
- int hSelection = hBar.getSelection ();
- int vSelection = vBar.getSelection ();
- if (hSelection >= hPage) {
- if (hPage <= 0) hSelection = 0;
- origin.x = -hSelection;
- }
- if (vSelection >= vPage) {
- if (vPage <= 0) vSelection = 0;
- origin.y = -vSelection;
- }
- canvas.redraw ();
- }
- });
- canvas.addListener (SWT.Paint, new Listener () {
- public void handleEvent (Event e) {
- GC gc = e.gc;
- gc.drawImage (image, origin.x, origin.y);
- Rectangle rect = image.getBounds ();
- Rectangle client = canvas.getClientArea ();
- int marginWidth = client.width - rect.width;
- if (marginWidth > 0) {
- gc.fillRectangle (rect.width, 0, marginWidth, client.height);
- }
- int marginHeight = client.height - rect.height;
- if (marginHeight > 0) {
- gc.fillRectangle (0, rect.height, client.width, marginHeight);
- }
- }
- });
- shell.setSize (200, 150);
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- originalImage.dispose();
- display.dispose ();
-}
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/terminalcanvas/TerminalTextCanvas.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/terminalcanvas/TerminalTextCanvas.java
deleted file mode 100644
index 8996bb966..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/terminalcanvas/TerminalTextCanvas.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tm.internal.terminal.test.terminalcanvas;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.widgets.Canvas;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.ScrollBar;
-
-public class TerminalTextCanvas extends Canvas {
- Image image;
- Point origin = new Point (0, 0);
- public TerminalTextCanvas(Composite parent, int style) {
- super(parent, SWT.NO_BACKGROUND |
- SWT.NO_REDRAW_RESIZE | SWT.V_SCROLL | SWT.H_SCROLL| style);
- loadImage(parent);
-
- final ScrollBar hBar = getHorizontalBar ();
- hBar.addListener (SWT.Selection, new Listener () {
- public void handleEvent (Event e) {
- int hSelection = hBar.getSelection ();
- int destX = -hSelection - origin.x;
- Rectangle rect = image.getBounds ();
- scroll (destX, 0, 0, 0, rect.width, rect.height, false);
- origin.x = -hSelection;
- }
- });
- final ScrollBar vBar = getVerticalBar ();
- vBar.addListener (SWT.Selection, new Listener () {
- public void handleEvent (Event e) {
- int vSelection = vBar.getSelection ();
- int destY = -vSelection - origin.y;
- Rectangle rect = image.getBounds ();
- scroll (0, destY, 0, 0, rect.width, rect.height, false);
- origin.y = -vSelection;
- }
- });
- addListener (SWT.Resize, new Listener () {
- public void handleEvent (Event e) {
- Rectangle rect = image.getBounds ();
- Rectangle client = getClientArea ();
- hBar.setMaximum (rect.width);
- vBar.setMaximum (rect.height);
- hBar.setThumb (Math.min (rect.width, client.width));
- vBar.setThumb (Math.min (rect.height, client.height));
- int hPage = rect.width - client.width;
- int vPage = rect.height - client.height;
- int hSelection = hBar.getSelection ();
- int vSelection = vBar.getSelection ();
- if (hSelection >= hPage) {
- if (hPage <= 0) hSelection = 0;
- origin.x = -hSelection;
- }
- if (vSelection >= vPage) {
- if (vPage <= 0) vSelection = 0;
- origin.y = -vSelection;
- }
- redraw ();
- }
- });
- addListener (SWT.Paint, new Listener () {
- public void handleEvent (Event e) {
- GC gc = e.gc;
- System.out.println(gc.getClipping()+" "+origin);
- gc.drawImage (image, origin.x, origin.y);
- Rectangle rect = image.getBounds ();
- Rectangle client = getClientArea ();
- int marginWidth = client.width - rect.width;
- if (marginWidth > 0) {
- gc.fillRectangle (rect.width, 0, marginWidth, client.height);
- }
- int marginHeight = client.height - rect.height;
- if (marginHeight > 0) {
- gc.fillRectangle (0, rect.height, client.width, marginHeight);
- }
- }
- });
- }
- private void loadImage(Composite parent) {
- FileDialog dialog = new FileDialog (parent.getShell(), SWT.OPEN);
- dialog.setText ("Open an image file or cancel");
- String string = dialog.open ();
- if (string != null) {
- image = new Image (getDisplay(), string);
- }
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/terminalcanvas/VirtualCanvas.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/terminalcanvas/VirtualCanvas.java
deleted file mode 100644
index 414622254..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/terminalcanvas/VirtualCanvas.java
+++ /dev/null
@@ -1,333 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tm.internal.terminal.test.terminalcanvas;
-
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.widgets.Canvas;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.ScrollBar;
-
-/**
- * A <code>Canvas</code> showing a virtual object.
- * Virtual: the extent of the total canvas.
- * Screen: the visible client area in the screen.
- */
-public abstract class VirtualCanvas extends Canvas {
-
- private Rectangle fVirtualBounds = new Rectangle(0,0,0,0);
- private Rectangle fClientArea;
- private GC fPaintGC=null;
- public VirtualCanvas(Composite parent, int style) {
- super(parent, style|SWT.NO_BACKGROUND|SWT.NO_REDRAW_RESIZE);
- fPaintGC= new GC(this);
- addListener(SWT.Paint, new Listener() {
- public void handleEvent(Event event) {
- paint(event.gc);
- }
- });
- addListener(SWT.Resize, new Listener() {
- public void handleEvent(Event event) {
- fClientArea=getClientArea();
- updateViewRectangle();
- }
- });
- getVerticalBar().addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- scrollY((ScrollBar)e.widget);
- postScrollEventHandling(e);
-
- }
-
- });
- getHorizontalBar().addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- scrollX((ScrollBar)e.widget);
- postScrollEventHandling(e);
-
- }
- });
- addDisposeListener(new DisposeListener(){
- public void widgetDisposed(DisposeEvent e) {
- if(fPaintGC!=null){
- fPaintGC.dispose();
- fPaintGC=null;
- }
- }
-
- });
- }
- public void setAutoSelect(boolean on) {
- }
- public boolean hasAutoSelect() {
- return false;
- }
- public void doAutoSelect() {
- }
-
- /** HACK: run an event loop if the scrollbar is dragged...*/
- private void postScrollEventHandling(Event e) {
- if(true&&e.detail==SWT.DRAG) {
- // TODO check if this is always ok???
- // used to process runnables while scrolling
- // This fixes the update problems when scrolling!
- // see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=47582#5
- // TODO investigate:
- // The alternative is to call redraw on the new visible area
- // redraw(expose.x, expose.y, expose.width, expose.height, true);
-
- while (!getDisplay().isDisposed() && getDisplay().readAndDispatch()) {
- // do nothing here...
- }
- }
- }
-
- protected void scrollX(ScrollBar hBar) {
- int hSelection = hBar.getSelection ();
- int destX = -hSelection - fVirtualBounds.x;
- fVirtualBounds.x = -hSelection;
- scrollSmart(destX, 0);
- updateViewRectangle();
- }
- protected void scrollXDelta(int delta) {
- getHorizontalBar().setSelection(-fVirtualBounds.x+delta);
- scrollX(getHorizontalBar());
- }
-
- protected void scrollY(ScrollBar vBar) {
- int vSelection = vBar.getSelection ();
- int destY = -vSelection - fVirtualBounds.y;
- fVirtualBounds.y = -vSelection;
- scrollSmart(0,destY);
- updateViewRectangle();
-
- }
- protected void scrollYDelta(int delta) {
- getVerticalBar().setSelection(-fVirtualBounds.y+delta);
- scrollY(getVerticalBar());
- }
-
-
- private void scrollSmart(int deltaX, int deltaY) {
- Rectangle rect = getBounds();
- scroll (deltaX, deltaY, 0, 0, rect.width, rect.height, false);
- }
-
- protected void revealRect(Rectangle rect) {
- Rectangle visibleRect=getScreenRectInVirtualSpace();
- // scroll the X part
- int deltaX=0;
- if(rect.x<visibleRect.x) {
- deltaX=rect.x-visibleRect.x;
- } else if(visibleRect.x+visibleRect.width<rect.x+rect.width){
- deltaX=(rect.x+rect.width)-(visibleRect.x+visibleRect.width);
- }
- if(deltaX!=0) {
- getHorizontalBar().setSelection(-fVirtualBounds.x+deltaX);
- scrollX(getHorizontalBar());
- }
-
- // scroll the Y part
- int deltaY=0;
- if(rect.y<visibleRect.y){
- deltaY=rect.y-visibleRect.y;
- } else if(visibleRect.y+visibleRect.height<rect.y+rect.height){
- deltaY=(rect.y+rect.height)-(visibleRect.y+visibleRect.height);
-
- }
- if(deltaY!=0) {
- getVerticalBar().setSelection(-fVirtualBounds.y+deltaY);
- scrollY(getVerticalBar());
- }
- }
-
- protected void repaint(Rectangle r) {
- if (fPaintGC!=null) {
- if(inClipping(r,fClientArea)) {
- fPaintGC.setClipping(r);
- paint(fPaintGC);
- }
- }
- }
-
- /**
- * @param gc
- */
- abstract protected void paint(GC gc);
- protected Color getBackgroundColor() {
- return getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND);
- }
- protected void paintUnoccupiedSpace(GC gc, Rectangle clipping) {
- int width=fVirtualBounds.width;
- int height=fVirtualBounds.height;
- int marginWidth = (clipping.x+clipping.width) - width;
- int marginHeight = (clipping.y+clipping.height) - height;
- if(marginWidth>0||marginHeight>0){
- Color bg=getBackground();
- gc.setBackground(getBackgroundColor());
- if (marginWidth > 0) {
- gc.fillRectangle (width, clipping.y, marginWidth, clipping.height);
- }
- if (marginHeight > 0) {
- gc.fillRectangle (clipping.x, height, clipping.width, marginHeight);
- }
- gc.setBackground(bg);
- }
- }
- /**
- * @private
- */
- protected boolean inClipping(Rectangle clipping, Rectangle r) {
- // TODO check if this is OK in all cases (the <=!)
- //
- if(r.x+r.width<=clipping.x)
- return false;
- if(clipping.x+clipping.width<=r.x)
- return false;
- if(r.y+r.height<=clipping.y)
- return false;
- if(clipping.y+clipping.height<=r.y)
- return false;
-
- return true;
- }
- /**
- * @return the screen rect in virtual space (starting with (0,0))
- * of the visible screen. (x,y>=0)
- */
- protected Rectangle getScreenRectInVirtualSpace() {
- return new Rectangle(fClientArea.x-fVirtualBounds.x,fClientArea.y-fVirtualBounds.y,fClientArea.width,fClientArea.height);
- }
- /**
- * @return the rect in virtual space (starting with (0,0))
- * of the visible screen. (x,y>=0)
- */
- protected Rectangle getRectInVirtualSpace(Rectangle r) {
- return new Rectangle(r.x-fVirtualBounds.x,r.y-fVirtualBounds.y,r.width,r.height);
- }
-
- /**
- * Sets the extend of the virtual dieplay ares
- * @param width
- * @param height
- */
- protected void setVirtualExtend(int width, int height) {
- fVirtualBounds.width=width;
- fVirtualBounds.height=height;
- updateScrollbars();
- updateViewRectangle();
- }
- /**
- * sets the scrolling origin. Also sets the scrollbars.
- * Does NOT redraw!
- * Use negative values (move the virtual origin to the top left
- * to see something in the screen (which is located at (0,0))
- * @param x
- * @param y
- */
- protected void setVirtualOrigin(int x, int y) {
- fVirtualBounds.x=x;
- fVirtualBounds.y=y;
- getHorizontalBar().setSelection(x);
- getVerticalBar().setSelection(y);
- updateViewRectangle();
- }
-
- /**
- * @param x
- * @return the virtual coordinate in scree space
- */
- protected int virtualXtoScreen(int x) {
- return x+fVirtualBounds.x;
- }
- protected int virtualYtoScreen(int y) {
- return y+fVirtualBounds.y;
- }
- protected int screenXtoVirtual(int x) {
- return x-fVirtualBounds.x;
- }
- protected int screenYtoVirtual(int y) {
- return y-fVirtualBounds.y;
- }
- /** called when the viewed part is changing */
- private Rectangle fViewRectangle=new Rectangle(0,0,0,0);
- void updateViewRectangle() {
- if(
- fViewRectangle.x==-fVirtualBounds.x
- && fViewRectangle.y==-fVirtualBounds.y
- && fViewRectangle.width==fClientArea.width
- && fViewRectangle.height==fClientArea.height
- )
- return;
- fViewRectangle.x=-fVirtualBounds.x;
- fViewRectangle.y=-fVirtualBounds.y;
- fViewRectangle.width=fClientArea.width;
- fViewRectangle.height=fClientArea.height;
- viewRectangleChanged(fViewRectangle.x,fViewRectangle.y,fViewRectangle.width,fViewRectangle.height);
- }
- protected Rectangle getViewRectangle() {
- return fViewRectangle;
- }
- /**
- * Called when the viewed part has changed.
- * Override when you need this information....
- * Is only called if the values change!
- * @param x visible in virtual space
- * @param y visible in virtual space
- * @param width
- * @param height
- */
- protected void viewRectangleChanged(int x, int y, int width, int height) {
-// System.out.println(x+" "+y+" "+width+" "+height);
- }
- /**
- * @private
- */
- private void updateScrollbars() {
- Point size= getSize();
- Rectangle clientArea= getClientArea();
-
- ScrollBar horizontal= getHorizontalBar();
- if (fVirtualBounds.width <= clientArea.width) {
- // TODO IMPORTANT in ScrollBar.setVisible comment out the line
- // that checks 'isvisible' and returns (at the beginning)
- horizontal.setVisible(false);
- horizontal.setSelection(0);
- } else {
- horizontal.setPageIncrement(clientArea.width - horizontal.getIncrement());
- int max= fVirtualBounds.width + (size.x - clientArea.width);
- horizontal.setMaximum(max);
- horizontal.setThumb(size.x > max ? max : size.x);
- horizontal.setVisible(true);
- }
-
- ScrollBar vertical= getVerticalBar();
- if (fVirtualBounds.height <= clientArea.height) {
- vertical.setVisible(false);
- vertical.setSelection(0);
- } else {
- vertical.setPageIncrement(clientArea.height - vertical.getIncrement());
- int max= fVirtualBounds.height + (size.y - clientArea.height);
- vertical.setMaximum(max);
- vertical.setThumb(size.y > max ? max : size.y);
- vertical.setVisible(true);
- }
- }
-}
-
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/AbstractLineOrientedDataSource.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/AbstractLineOrientedDataSource.java
deleted file mode 100644
index f0c297511..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/AbstractLineOrientedDataSource.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tm.internal.terminal.test.ui;
-
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-import org.eclipse.tm.terminal.model.Style;
-
-/**
- * Adds line by line
- *
- */
-abstract class AbstractLineOrientedDataSource implements IDataSource {
- abstract public char[] dataSource();
- abstract public Style getStyle();
-
- abstract public void next();
-
- public int step(ITerminalTextData terminal) {
- next();
- char[] chars=dataSource();
- Style style= getStyle();
- int len;
- // keep the synchronized block short!
- synchronized (terminal) {
- terminal.addLine();
- len=Math.min(terminal.getWidth(),chars.length);
- int line=terminal.getHeight()-1;
- terminal.setChars(line, 0, chars, 0, len, style);
- terminal.setCursorLine(line);
- terminal.setCursorColumn(len-1);
- }
- return len;
- }
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/DataReader.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/DataReader.java
deleted file mode 100644
index 6d017f0bd..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/DataReader.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tm.internal.terminal.test.ui;
-
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-
-class DataReader implements Runnable {
- final Thread fThread;
- final IDataSource fDataSource;
- final ITerminalTextData fTerminal;
- volatile boolean fStart;
- volatile boolean fStop;
- volatile int fThrottleTime;
- final IStatus fStatus;
- final String fName;
- DataReader(String name, ITerminalTextData terminal, IDataSource dataSource, IStatus status) {
- fStatus=status;
- fName=name;
- fTerminal=terminal;
- fDataSource=dataSource;
- fThread=new Thread(this,name);
- fThread.setDaemon(true);
- fThread.start();
- }
- public void run() {
- long t0=System.currentTimeMillis()-1;
- long c=0;
- int lines=0;
- while(!Thread.interrupted()) {
- while(!fStart || fStop) {
- sleep(1);
- }
- if(fThrottleTime>0)
- sleep(fThrottleTime);
- // synchronize because we have to be sure the size does not change while
- // we add lines
- int len=fDataSource.step(fTerminal);
- // keep the synchronized block short!
- c+=len;
- lines++;
- if((fThrottleTime>0 || (lines%100==0))&&(System.currentTimeMillis()-t0)>1000) {
- long t=System.currentTimeMillis()-t0;
- final String s=(c*1000)/(t*1024)+"kb/s " + (lines*1000)/t+"lines/sec "+(c*1000*8)/t+" bits/s ";
- fStatus.setStatus(s);
- lines=0;
- t0=System.currentTimeMillis();
- c=0;
- }
- }
- }
- public int getThrottleTime() {
- return fThrottleTime;
- }
- public void setThrottleTime(int throttleTime) {
- fThrottleTime = throttleTime;
- }
- private void sleep(int ms) {
- try {
- Thread.sleep(ms);
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- }
- }
- public boolean isStart() {
- return fStart;
- }
- public void setStart(boolean start) {
- fStart = start;
- }
- public String getName() {
- return fName;
- }
- public boolean isStop() {
- return fStop;
- }
- public void setStop(boolean stop) {
- fStop = stop;
- }
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/FastDataSource.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/FastDataSource.java
deleted file mode 100644
index 2ffb33edb..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/FastDataSource.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tm.internal.terminal.test.ui;
-
-import org.eclipse.tm.terminal.model.Style;
-
-final class FastDataSource extends AbstractLineOrientedDataSource {
- char lines[][]=new char[][]{
- "123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 ".toCharArray(),
- "abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi ".toCharArray(),
- };
-
-
- int pos;
-
- public char[] dataSource() {
- return lines[pos%lines.length];
- }
-
- public Style getStyle() {
- return null;
- }
-
- public void next() {
- pos++;
- }
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/FileDataSource.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/FileDataSource.java
deleted file mode 100644
index 075393981..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/FileDataSource.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tm.internal.terminal.test.ui;
-
-import java.io.BufferedReader;
-import java.io.FileReader;
-import java.io.IOException;
-
-import org.eclipse.tm.terminal.model.Style;
-import org.eclipse.tm.terminal.model.StyleColor;
-
-/**
- * Reads the file in an infinite loop.
- * Makes lines containing 'x' bold.
- *
- */
-final class FileDataSource extends AbstractLineOrientedDataSource {
- private final String fFile;
-
- BufferedReader reader;
-
- String line;
-
- Style style;
-
- Style styleNormal=Style.getStyle(StyleColor.getStyleColor("black"),StyleColor.getStyleColor("white"));
-
- Style styleBold=styleNormal.setBold(true);
-
- FileDataSource(String file) {
- fFile = file;
- }
-
- public char[] dataSource() {
- return line.toCharArray();
- }
-
- public Style getStyle() {
- return style;
- }
-
- public void next() {
- try {
- if(reader==null)
- reader = new BufferedReader(new FileReader(fFile));
- line=reader.readLine();
- if(line==null) {
- reader.close();
- reader=null;
- // reopen the file
- next();
- return;
- }
- if(line.lastIndexOf('x')>0)
- style=styleBold;
- else
- style=styleNormal;
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
-
- }
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/IDataSource.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/IDataSource.java
deleted file mode 100644
index 938916d80..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/IDataSource.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tm.internal.terminal.test.ui;
-
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-
-interface IDataSource {
- /**
- * @param terminal
- * @return number of characters changed
- */
- int step(ITerminalTextData terminal);
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/IStatus.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/IStatus.java
deleted file mode 100644
index d060e779f..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/IStatus.java
+++ /dev/null
@@ -1,15 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tm.internal.terminal.test.ui;
-
-public interface IStatus {
- void setStatus(String message);
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/LineCountingDataSource.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/LineCountingDataSource.java
deleted file mode 100644
index 7a3dc3598..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/LineCountingDataSource.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tm.internal.terminal.test.ui;
-
-import org.eclipse.tm.terminal.model.Style;
-import org.eclipse.tm.terminal.model.StyleColor;
-
-final class LineCountingDataSource extends AbstractLineOrientedDataSource {
- Style styleNormal=Style.getStyle(StyleColor.getStyleColor("black"),StyleColor.getStyleColor("red"));
-
- Style styles[]=new Style[] {
- styleNormal,
- styleNormal.setBold(true),
- styleNormal.setForground("blue"),
- styleNormal.setForground("yellow"),
- styleNormal.setBold(true).setUnderline(true),
- styleNormal.setReverse(true),
- styleNormal.setReverse(true).setBold(true),
- styleNormal.setReverse(true).setUnderline(true)
- };
-
- int pos;
-
- public char[] dataSource() {
- return (pos+" 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789").toCharArray();
- }
-
- public Style getStyle() {
- return styles[pos%styles.length];
- }
-
- public void next() {
- pos++;
- }
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/RandomDataSource.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/RandomDataSource.java
deleted file mode 100644
index ee002861b..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/RandomDataSource.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tm.internal.terminal.test.ui;
-
-import java.util.Random;
-
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-import org.eclipse.tm.terminal.model.Style;
-import org.eclipse.tm.terminal.model.StyleColor;
-
-public class RandomDataSource implements IDataSource {
- Random fRandom=new Random();
- Style styleNormal=Style.getStyle(StyleColor.getStyleColor("black"),StyleColor.getStyleColor("green"));
- Style styles[]=new Style[] {
- styleNormal,
- styleNormal.setBold(true),
- styleNormal.setForground("red"),
- styleNormal.setForground("yellow"),
- styleNormal.setBold(true).setUnderline(true),
- styleNormal.setReverse(true),
- styleNormal.setReverse(true).setBold(true),
- styleNormal.setReverse(true).setUnderline(true)
- };
-
- public int step(ITerminalTextData terminal) {
- int N=fRandom.nextInt(1000);
- int h=terminal.getHeight();
- int w=terminal.getWidth();
- synchronized (terminal) {
- for (int i = 0; i < N; i++) {
- int line=fRandom.nextInt(h);
- int col=fRandom.nextInt(w);
- char c=(char)('A'+fRandom.nextInt('z'-'A'));
- Style style=styles[fRandom.nextInt(styles.length)];
- terminal.setChar(line, col, c, style);
- }
- }
- return N;
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/TerminalTextUITest.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/TerminalTextUITest.java
deleted file mode 100644
index 7d9bdf91a..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/TerminalTextUITest.java
+++ /dev/null
@@ -1,253 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tm.internal.terminal.test.ui;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.layout.RowData;
-import org.eclipse.swt.layout.RowLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.tm.internal.terminal.textcanvas.ITextCanvasModel;
-import org.eclipse.tm.internal.terminal.textcanvas.PollingTextCanvasModel;
-import org.eclipse.tm.internal.terminal.textcanvas.TextCanvas;
-import org.eclipse.tm.internal.terminal.textcanvas.TextLineRenderer;
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-import org.eclipse.tm.terminal.model.ITerminalTextDataSnapshot;
-import org.eclipse.tm.terminal.model.TerminalTextDataFactory;
-
-/**
- * adjust columns when table gets resized....
- *
- */
-public class TerminalTextUITest {
- static TextCanvas fgTextCanvas;
- static ITextCanvasModel fgModel;
- static ITerminalTextData fTerminalModel;
- static Label fStatusLabel;
- static volatile int fHeight;
- static volatile int fWidth;
- static DataReader fDataReader;
- static List fDataReaders=new ArrayList();
- private static Text heightText;
- static class Status implements IStatus {
- public void setStatus(final String s) {
- if(!fStatusLabel.isDisposed())
- Display.getDefault().asyncExec(new Runnable(){
- public void run() {
- if(!fStatusLabel.isDisposed())
- fStatusLabel.setText(s);
- }});
- }
-
- }
- public static void main(String[] args) {
- Display display = new Display();
- Shell shell = new Shell(display);
- shell.setLayout(new GridLayout());
- Composite composite=new Composite(shell, SWT.NONE);
- composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- RowLayout layout = new RowLayout(SWT.HORIZONTAL);
- layout.wrap = true;
- layout.fill = false;
- fTerminalModel=TerminalTextDataFactory.makeTerminalTextData();
- fHeight=24;
- fWidth=80;
- fTerminalModel.setDimensions(fHeight, fWidth);
- fTerminalModel.setMaxHeight(fHeight);
- ITerminalTextDataSnapshot snapshot=fTerminalModel.makeSnapshot();
- // TODO how to get the initial size correctly!
- snapshot.updateSnapshot(false);
- fgModel=new PollingTextCanvasModel(snapshot);
- fgTextCanvas=new TextCanvas(shell,fgModel, SWT.NONE,new TextLineRenderer(fgTextCanvas,fgModel));
- fgTextCanvas.setLayoutData(new GridData(GridData.FILL_BOTH));
-
-
- composite.setLayout(layout);
- addAutorevealCursorButton(composite);
- Text maxHeightText = addMaxHeightInput(composite);
- addHeightInput(composite, maxHeightText);
- addWidthText(composite);
- Text throttleText = addThrottleText(composite);
-
- IStatus status=new Status();
- DataReader reader=new DataReader("Line Count",fTerminalModel,new LineCountingDataSource(),status);
- addDataReader(composite, reader);
- reader=new DataReader("Fast",fTerminalModel,new FastDataSource(),status);
- addDataReader(composite, reader);
- reader=new DataReader("Random",fTerminalModel,new RandomDataSource(),status);
- addDataReader(composite, reader);
- for (int i = 0; i < args.length; i++) {
- File file=new File(args[i]);
- reader=new DataReader(file.getName(),fTerminalModel,new VT100DataSource(args[i]),status);
- addDataReader(composite, reader);
- }
- addStopAllButton(composite, reader);
-
- fStatusLabel=new Label(shell,SWT.NONE);
- fStatusLabel.setLayoutData(new GridData(250,15));
- throttleText.setText("100");
- setThrottleForAll(100);
-
- if(args.length==0)
- addLabel(composite, "[Files can be added via commandline]");
- shell.setSize(600,300);
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- display.dispose();
- }
- private static Text addMaxHeightInput(Composite composite) {
- addLabel(composite, "maxHeight:");
- final Text maxHeightText=new Text(composite,SWT.BORDER);
- setLayoutData(maxHeightText,30);
- maxHeightText.addModifyListener(new ModifyListener(){
- public void modifyText(ModifyEvent e) {
- synchronized (fTerminalModel) {
- int height=textToInt(maxHeightText);
- if(height<1)
- return;
- if(fTerminalModel.getHeight()>height) {
- fTerminalModel.scroll(0, fTerminalModel.getHeight(), height-fTerminalModel.getHeight());
- fTerminalModel.setDimensions(height,fTerminalModel.getWidth());
- heightText.setText(height+"");
- }
- fTerminalModel.setMaxHeight(height);
- }
- }
- });
- maxHeightText.setText(fHeight+"");
- return maxHeightText;
- }
- private static void addHeightInput(Composite composite, final Text maxHeightText) {
- addLabel(composite,"heigth:");
- heightText=new Text(composite,SWT.BORDER);
- setLayoutData(heightText,30);
- heightText.addModifyListener(new ModifyListener(){
- public void modifyText(ModifyEvent e) {
- synchronized (fTerminalModel) {
- int height=textToInt(heightText);
- if(height<1)
- return;
- maxHeightText.setText(""+height);
- fTerminalModel.setDimensions(height,fTerminalModel.getWidth());
- fTerminalModel.setMaxHeight(height);
- }
- }
- });
- heightText.setText(fHeight+"");
- }
- private static Text addWidthText(Composite composite) {
- addLabel(composite,"width:");
- final Text widthText=new Text(composite,SWT.BORDER);
- setLayoutData(widthText,30);
- widthText.addModifyListener(new ModifyListener(){
- public void modifyText(ModifyEvent e) {
- synchronized (fTerminalModel) {
- int width=textToInt(widthText);
- if(width>1)
- fTerminalModel.setDimensions(fTerminalModel.getHeight(), width);
- }
- }
- });
- widthText.setText(fWidth+"");
- return widthText;
- }
- private static Text addThrottleText(Composite composite) {
- addLabel(composite,"throttle:");
- final Text throttleText=new Text(composite,SWT.BORDER);
- setLayoutData(throttleText,30);
- throttleText.addModifyListener(new ModifyListener(){
- public void modifyText(ModifyEvent e) {
- synchronized (fTerminalModel) {
- int throttle=textToInt(throttleText);
- setThrottleForAll(throttle);
- }
- }});
- return throttleText;
- }
- private static void addStopAllButton(Composite composite, DataReader reader) {
- final Button stopAllButton=new Button(composite,SWT.CHECK);
- stopAllButton.setText("Stop ALL");
- stopAllButton.addSelectionListener(new SelectionAdapter(){
-
- public void widgetSelected(SelectionEvent e) {
- boolean stop=stopAllButton.getSelection();
- for (Iterator iterator = fDataReaders.iterator(); iterator.hasNext();) {
- DataReader reader = (DataReader) iterator.next();
- reader.setStop(stop);
-
- }}});
- stopAllButton.setSelection(reader.isStart());
- }
- private static void addAutorevealCursorButton(Composite composite) {
- final Button button=new Button(composite,SWT.CHECK);
- button.setText("ScrollLock");
- button.addSelectionListener(new SelectionAdapter(){
- public void widgetSelected(SelectionEvent e) {
- boolean scrollLock=button.getSelection();
- fgTextCanvas.setScrollLock(scrollLock);
- }
- });
- button.setSelection(fgTextCanvas.isScrollLock());
- }
- private static void addLabel(Composite composite,String message) {
- Label label;
- label=new Label(composite, SWT.NONE);
- label.setText(message);
- }
- private static void addDataReader(Composite composite, final DataReader reader) {
- fDataReaders.add(reader);
- final Button button=new Button(composite,SWT.CHECK);
- button.setText(reader.getName());
- button.addSelectionListener(new SelectionAdapter(){
-
- public void widgetSelected(SelectionEvent e) {
- reader.setStart(button.getSelection());
- }});
- button.setSelection(reader.isStart());
-
- }
- static private void setThrottleForAll(int throttle) {
- for (Iterator iterator = fDataReaders.iterator(); iterator.hasNext();) {
- DataReader reader = (DataReader) iterator.next();
- reader.setThrottleTime(throttle);
- }
- }
- static void setLayoutData(Control c,int width) {
- c.setLayoutData(new RowData(width,-1));
- }
- static int textToInt(Text text) {
- try {
- return Integer.valueOf(text.getText()).intValue();
- } catch (Exception ex) {
- return 0;
- }
- }
-}
-
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/VT100DataSource.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/VT100DataSource.java
deleted file mode 100644
index 69e66b8af..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/test/ui/VT100DataSource.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Michael Scharf (Wind River) - initial API and implementation
- * Martin Oberhuber (Wind River) - [204796] Terminal should allow setting the encoding to use
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.test.ui;
-
-import java.io.ByteArrayOutputStream;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.Reader;
-import java.io.UnsupportedEncodingException;
-
-import org.eclipse.tm.internal.terminal.control.impl.ITerminalControlForText;
-import org.eclipse.tm.internal.terminal.emulator.VT100Emulator;
-import org.eclipse.tm.internal.terminal.provisional.api.ITerminalConnector;
-import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-
-/**
- * Reads the file in an infinite loop.
- * Makes lines containing 'x' bold.
- *
- */
-final class VT100DataSource implements IDataSource {
- VT100Emulator fEmulator;
- volatile int fAvailable;
- volatile int fRead;
- private final String fFile;
-
- VT100DataSource(String file) {
- fFile=file;
- }
- class InfiniteFileInputStream extends InputStream {
- public InfiniteFileInputStream() {
- try {
- fInputStream=new FileInputStream(fFile);
- } catch (FileNotFoundException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- public int available() throws IOException {
- return fAvailable;
- }
- private InputStream fInputStream;
- public int read() throws IOException {
- throw new IOException();
- }
- public int read(byte[] b, int off, int len) throws IOException {
- while(fAvailable==0) {
- try {
- Thread.sleep(1);
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- }
- }
- len=fAvailable;
- int n=fInputStream.read(b, off, len);
- if(n<=0) {
- fInputStream.close();
- fInputStream=new FileInputStream(fFile);
- n=fInputStream.read(b, off, len);
- }
- fAvailable-=n;
- return n;
- }
-
- }
- void init(ITerminalTextData terminal) {
- final Reader reader;
- try {
- reader = new InputStreamReader(new InfiniteFileInputStream(), "ISO-8859-1"); //$NON-NLS-1$
- } catch (UnsupportedEncodingException e) {
- throw new RuntimeException(e);
- }
- fEmulator=new VT100Emulator(terminal,new ITerminalControlForText() {
-
- public void disconnectTerminal() {
- // TODO Auto-generated method stub
-
- }
-
- public OutputStream getOutputStream() {
- return new ByteArrayOutputStream();
- }
-
- public TerminalState getState() {
- return TerminalState.CONNECTED;
- }
-
- public ITerminalConnector getTerminalConnector() {
- return null;
- }
-
- public void setState(TerminalState state) {
- }
-
- public void setTerminalTitle(String title) {
- }
- }, reader);
- }
- public int step(ITerminalTextData terminal) {
- synchronized(terminal) {
- if(fEmulator==null) {
- init(terminal);
-// fEmulator.setDimensions(48, 132);
- fEmulator.setDimensions(24, 80);
- fEmulator.setCrAfterNewLine(true);
-
- }
- fAvailable=80;
- fEmulator.processText();
- }
- return 80;
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/textcanvas/PipedInputStreamPerformanceTest.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/textcanvas/PipedInputStreamPerformanceTest.java
deleted file mode 100644
index dd105f603..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/textcanvas/PipedInputStreamPerformanceTest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tm.internal.terminal.textcanvas;
-
-import java.io.OutputStream;
-
-public class PipedInputStreamPerformanceTest {
-
- /**
- * @param args
- * @throws InterruptedException
- */
- public static void main(String[] args) throws InterruptedException {
- runPerformanceTest();
- runPerformanceTest();
- }
-
- private static void runPerformanceTest() throws InterruptedException {
- PipedInputStream in=new PipedInputStream(1024);
- OutputStream out=in.getOutputStream();
- PipedStreamTest.runPipe("",in, out,100);
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/textcanvas/PipedStreamTest.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/textcanvas/PipedStreamTest.java
deleted file mode 100644
index 11e7ecfeb..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/internal/terminal/textcanvas/PipedStreamTest.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Michael Scharf (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.textcanvas;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-
-class PipedStreamTest {
- static class ReadThread extends Thread implements Runnable {
-
- InputStream pi = null;
-
- OutputStream po = null;
-
- ReadThread(String process, InputStream pi, OutputStream po) {
- this.pi = pi;
- this.po = po;
- setDaemon(true);
- }
-
- public void run() {
- byte[] buffer = new byte[2048];
- int bytes_read;
- try {
- for (;;) {
- bytes_read = pi.read(buffer);
- if (bytes_read == -1) {
- po.close();
- pi.close();
- return;
- }
- po.write(buffer, 0, bytes_read);
- }
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- }
- static class FakeInputStream extends InputStream {
- int N;
- FakeInputStream(int n) {
- N=n;
- }
- public int read(byte[] b, int off, int len) throws IOException {
- if(N==0)
- return -1;
- int n=Math.min(len,N);
- for (int i = off; i < off+n; i++) {
- b[i]='x';
- }
- N-=n;
- return n;
- }
- public int read() throws IOException {
- throw new UnsupportedOperationException();
- }
- /*
- * available has to be implemented!
- */
- public int available() throws IOException {
- return N;
- }
- }
- static class FakeOutputStream extends OutputStream {
- long N;
- public void write(int b) throws IOException {
- throw new UnsupportedOperationException();
- }
- public void write(byte[] b, int off, int len) throws IOException {
- N+=len;
- }
- }
- public static void main(String[] args) throws IOException, InterruptedException {
- while(true) {
- runSunTest();
- runMyTest();
- }
- }
- private static void runSunTest() throws IOException, InterruptedException {
- java.io.PipedInputStream in = new java.io.PipedInputStream();
- OutputStream out = new java.io.PipedOutputStream(in);
- runPipe("Sun ",in, out,10);
- }
- private static void runMyTest() throws IOException, InterruptedException {
- PipedInputStream in=new PipedInputStream(4*1024);
- OutputStream out=in.getOutputStream();
- runPipe("My ",in, out,99);
- }
- public static void runPipe(String what,InputStream writeIn, OutputStream readOut,int N) throws InterruptedException {
- FakeInputStream in=new FakeInputStream(N*1000*1000);
- FakeOutputStream out=new FakeOutputStream();
- ReadThread rt = new ReadThread("reader", in , readOut);
- ReadThread wt = new ReadThread("writer", writeIn, out);
- long t0=System.currentTimeMillis();
- rt.start();
- wt.start();
- wt.join();
- long t=System.currentTimeMillis();
- long n=out.N;
- System.out.println(what+n + " byte in " +(t-t0)+" ms -> "+(1000*n)/((t-t0+1)*1024)+" kb/sec");
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/terminal/model/AllTests.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/terminal/model/AllTests.java
deleted file mode 100644
index 257c92a3a..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/terminal/model/AllTests.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Martin Oberhuber (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.terminal.model;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-/**
- * Public Terminal Model test cases.
- * Runs in internal model package to allow access to default visible items.
- */
-public class AllTests extends TestCase {
- public AllTests() {
- super(null);
- }
-
- public AllTests(String name) {
- super(name);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite(AllTests.class.getName());
- suite.addTestSuite(StyleColorTest.class);
- suite.addTestSuite(StyleTest.class);
- return suite;
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/terminal/model/StyleColorTest.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/terminal/model/StyleColorTest.java
deleted file mode 100644
index e641c74d7..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/terminal/model/StyleColorTest.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tm.terminal.model;
-
-import junit.framework.TestCase;
-
-public class StyleColorTest extends TestCase {
-
-
- public void testEqualsObject() {
- assertEquals(StyleColor.getStyleColor("foo"),StyleColor.getStyleColor("foo"));
- assertFalse(StyleColor.getStyleColor("foox").equals(StyleColor.getStyleColor("foo")));
- }
-
- public void testSameObject() {
- assertSame(StyleColor.getStyleColor("foo"),StyleColor.getStyleColor("foo"));
- assertNotSame(StyleColor.getStyleColor("foox"),StyleColor.getStyleColor("foo"));
- }
-
- public void testToString() {
- assertEquals("xxx", StyleColor.getStyleColor("xxx").toString());
- }
-
- public void testGetName() {
- assertEquals("xxx", StyleColor.getStyleColor("xxx").getName());
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/terminal/model/StyleTest.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/terminal/model/StyleTest.java
deleted file mode 100644
index 9f0cd7517..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/terminal/model/StyleTest.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tm.terminal.model;
-
-import junit.framework.TestCase;
-
-public class StyleTest extends TestCase {
- final StyleColor c1=StyleColor.getStyleColor("c1");
- final StyleColor c2=StyleColor.getStyleColor("c2");
- final StyleColor c3=StyleColor.getStyleColor("c3");
-
- public void testGetStyle() {
- Style s1=Style.getStyle(c1, c2, true, false, true, false);
- Style s2=Style.getStyle(c1, c2, true, false, true, false);
- assertEquals(s1,s2);
- assertSame(s1,s2);
- s1=s1.setBlink(!s1.isBlink());
- assertNotSame(s1,s2);
- assertFalse(s1.equals(s2));
- s1=s1.setBlink(!s1.isBlink());
- assertSame(s1,s2);
- }
-
- public void testSetForground() {
- Style s1=Style.getStyle(c1, c2, true, false, true, false);
- Style s2=s1;
- s2=s1.setForground(c3);
- assertNotSame(s1,s2);
- assertFalse(s1.equals(s2));
- assertSame(s2.getForground(), c3);
- assertSame(s1.getForground(), c1);
- assertSame(s1.getBackground(), c2);
- assertSame(s2.getBackground(), c2);
- s2=s2.setForground(c1);
- assertSame(s1, s2);
- }
-
- public void testSetBackground() {
- Style s1=Style.getStyle(c1, c2, true, false, true, false);
- Style s2=s1;
- s2=s1.setBackground(c3);
- assertNotSame(s1,s2);
- assertFalse(s1.equals(s2));
- assertSame(s2.getForground(), c1);
- assertSame(s1.getForground(), c1);
- assertSame(s1.getBackground(), c2);
- assertSame(s2.getBackground(), c3);
- s2=s2.setBackground(c2);
- assertSame(s1, s2);
- }
-
- public void testSetBold() {
- Style s1=getDefaultStyle();
- Style s2=s1;
- assertSame(s1,s2);
- assertFalse(s2.isBold());
- s2=s2.setBold(true);
- assertNotSame(s1,s2);
- assertTrue(s2.isBold());
- s2=s2.setBold(false);
- assertSame(s1,s2);
- assertFalse(s2.isBold());
- }
-
- public void testSetBlink() {
- Style s1=getDefaultStyle();
- Style s2=s1;
- assertSame(s1,s2);
- assertFalse(s2.isBlink());
- s2=s2.setBlink(true);
- assertNotSame(s1,s2);
- assertTrue(s2.isBlink());
- s2=s2.setBlink(false);
- assertSame(s1,s2);
- assertFalse(s2.isBlink());
- }
-
- public void testSetUnderline() {
- Style s1=getDefaultStyle();
- Style s2=s1;
- assertSame(s1,s2);
- assertFalse(s2.isUnderline());
- s2=s2.setUnderline(true);
- assertNotSame(s1,s2);
- assertTrue(s2.isUnderline());
- s2=s2.setUnderline(false);
- assertSame(s1,s2);
- assertFalse(s2.isUnderline());
- }
-
- public void testSetReverse() {
- Style s1=getDefaultStyle();
- Style s2=s1;
- assertSame(s1,s2);
- assertFalse(s2.isReverse());
- s2=s2.setReverse(true);
- assertNotSame(s1,s2);
- assertTrue(s2.isReverse());
- s2=s2.setReverse(false);
- assertSame(s1,s2);
- assertFalse(s2.isReverse());
- }
-
- private Style getDefaultStyle() {
- return Style.getStyle(c1, c2, false, false, false, false);
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/terminal/test/AutomatedPluginTests.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/terminal/test/AutomatedPluginTests.java
deleted file mode 100644
index 4921b764f..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/terminal/test/AutomatedPluginTests.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Martin Oberhuber (Wind River) - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tm.terminal.test;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-/**
- * Master Test Suite to run all Terminal plug-in tests.
- */
-public class AutomatedPluginTests extends TestCase {
- /**
- * Call each AllTests class from each of the test packages.
- */
- public static Test suite() {
- TestSuite suite = new TestSuite(AutomatedPluginTests.class.getName());
- suite.addTestSuite(org.eclipse.tm.internal.terminal.connector.TerminalConnectorPluginTest.class);
- suite.addTestSuite(org.eclipse.tm.internal.terminal.connector.TerminalConnectorFactoryTest.class);
- return suite;
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/terminal/test/AutomatedTests.java b/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/terminal/test/AutomatedTests.java
deleted file mode 100644
index 5b8ca6bb9..000000000
--- a/terminal/org.eclipse.tm.terminal.test/src/org/eclipse/tm/terminal/test/AutomatedTests.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Martin Oberhuber (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.terminal.test;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-/**
- * Master test suite to run all terminal unit tests.
- */
-public class AutomatedTests extends TestCase {
-
- public static final String PI_TERMINAL_TESTS = "org.eclipse.tm.terminal.test"; //$NON-NLS-1$
-
- public AutomatedTests() {
- super(null);
- }
-
- public AutomatedTests(String name) {
- super(name);
- }
-
- /**
- * Call each AllTests class from each of the test packages.
- */
- public static Test suite() {
- TestSuite suite = new TestSuite(AutomatedTests.class.getName());
- suite.addTest(org.eclipse.tm.internal.terminal.emulator.AllTests.suite());
- suite.addTest(org.eclipse.tm.internal.terminal.model.AllTests.suite());
- suite.addTest(org.eclipse.tm.terminal.model.AllTests.suite());
- return suite;
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.test/teamConfig/Terminal All Unit Tests.launch b/terminal/org.eclipse.tm.terminal.test/teamConfig/Terminal All Unit Tests.launch
deleted file mode 100644
index fd2e3ebb9..000000000
--- a/terminal/org.eclipse.tm.terminal.test/teamConfig/Terminal All Unit Tests.launch
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.tm.terminal.test/src"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="2"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value="=org.eclipse.tm.terminal.test/src"/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value=""/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.tm.terminal.test"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-ea"/>
-</launchConfiguration>
diff --git a/terminal/org.eclipse.tm.terminal.test/teamConfig/Terminal Plugin Tests.launch b/terminal/org.eclipse.tm.terminal.test/teamConfig/Terminal Plugin Tests.launch
deleted file mode 100644
index 5def47264..000000000
--- a/terminal/org.eclipse.tm.terminal.test/teamConfig/Terminal Plugin Tests.launch
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
-<booleanAttribute key="append.args" value="true"/>
-<booleanAttribute key="askclear" value="false"/>
-<booleanAttribute key="automaticAdd" value="true"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="true"/>
-<booleanAttribute key="clearws" value="true"/>
-<booleanAttribute key="clearwslog" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
-<booleanAttribute key="default" value="true"/>
-<booleanAttribute key="includeOptional" value="true"/>
-<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.tm.terminal.test/src/org/eclipse/tm/terminal/test/AutomatedPluginTests.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
-<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.tm.terminal.test.AutomatedPluginTests"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl}"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.tm.terminal.test"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-ea"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useDefaultConfig" value="true"/>
-<booleanAttribute key="useDefaultConfigArea" value="false"/>
-<booleanAttribute key="useProduct" value="true"/>
-</launchConfiguration>
diff --git a/terminal/org.eclipse.tm.terminal.test/test.xml b/terminal/org.eclipse.tm.terminal.test/test.xml
deleted file mode 100644
index d1e88b42c..000000000
--- a/terminal/org.eclipse.tm.terminal.test/test.xml
+++ /dev/null
@@ -1,101 +0,0 @@
-<?xml version="1.0"?>
- <!--
- Copyright (c) 2006, 2009 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 - initial API and implementation
- -->
-
-<!--
-Run post build tests.
-Not yet complete.
-Needs to be updated and tested for org.eclipse.tm.terminal
--->
-
-<project name="testsuite" default="run" basedir=".">
- <!-- The property ${eclipse-home} should be passed into this script -->
- <!-- Set a meaningful default value for when it is not. -->
- <property name="eclipse-home" value="${basedir}/../../"/>
-
- <!-- sets the properties eclipse-home, and library-file -->
- <property name="plugin-name" value="org.eclipse.tm.terminal.test"/>
- <property name="library-file" value="${eclipse-home}/plugins/org.eclipse.test/library.xml"/>
-
- <!-- This target holds all initialization code that needs to be done for -->
- <!-- all tests that are to be run. Initialization for individual tests -->
- <!-- should be done within the body of the suite target. -->
- <target name="init">
- <tstamp/>
- <delete>
- <fileset dir="${eclipse-home}" includes="org.eclipse.tm.terminal.test.*.xml"/>
- </delete>
- </target>
-
- <!-- This target defines the tests that need to be run. -->
- <target name="suite">
- <property name="location" value="${eclipse-home}/terminal_test_workspace"/>
- <delete dir="${location}" quiet="true"/>
- <ant target="core-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="data-dir" value="${location}"/>
- <property name="plugin-name" value="${plugin-name}"/>
- <property name="classname" value="org.eclipse.tm.terminal.test.AutomatedTests"/>
- <property name="extraVMargs" value="-ea"/>
- </ant>
-
- <!-- UI Tests: Commented out until access to default visible methods works
- <ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="data-dir" value="${session-folder}"/>
- <property name="plugin-name" value="${plugin-name}"/>
- <property name="classname"
- value="org.eclipse.ui.tests.api.SessionRestoreTest"/>
- </ant>
- -->
-
- <!--
- <property name="sniff-folder"
- value="${eclipse-home}/ui_sniff_folder"/>
- <delete dir="${sniff-folder}" quiet="true"/>
- <ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="data-dir" value="${sniff-folder}"/>
- <property name="plugin-name" value="${plugin-name}"/>
- <property name="classname"
- value="org.eclipse.ui.tests.UiTestSuite"/>
-
- </ant>
-
- <property name="jface-sniff-folder"
- value="${eclipse-home}/jface_sniff_folder"/>
- <delete dir="${jface-sniff-folder}" quiet="true"/>
- <ant target="core-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="data-dir" value="${jface-sniff-folder}"/>
- <property name="plugin-name" value="${plugin-name}"/>
- <property name="classname"
- value="org.eclipse.jface.tests.viewers.AllTests"/>
- </ant>
- -->
-
- </target>
-
- <!-- This target holds code to cleanup the testing environment after the tests -->
- <!-- have been run. You can use this to delete temporary files that are created. -->
- <target name="cleanup">
- </target>
-
- <!-- This target runs the test suite. Any actions that need to happen after all -->
- <!-- the tests have been run should go here. -->
- <target name="run" depends="init,suite,cleanup">
- <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
- <property name="includes" value="org.eclipse.rse.*.xml"/>
- <property name="output-file" value="${plugin-name}.xml"/>
- </ant>
- </target>
-
- <!-- This target runs the performance test suites. -->
- <target name="performance">
- </target>
-
-</project>
diff --git a/terminal/org.eclipse.tm.terminal.view-feature/.project b/terminal/org.eclipse.tm.terminal.view-feature/.project
deleted file mode 100644
index 57ff3d8e6..000000000
--- a/terminal/org.eclipse.tm.terminal.view-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.terminal.view-feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/terminal/org.eclipse.tm.terminal.view-feature/build.properties b/terminal/org.eclipse.tm.terminal.view-feature/build.properties
deleted file mode 100644
index 6c1e50644..000000000
--- a/terminal/org.eclipse.tm.terminal.view-feature/build.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-################################################################################
-# Copyright (c) 2006 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
-################################################################################
-bin.includes = feature.xml,\
- epl-v10.html,\
- feature.properties,\
- license.html
diff --git a/terminal/org.eclipse.tm.terminal.view-feature/epl-v10.html b/terminal/org.eclipse.tm.terminal.view-feature/epl-v10.html
deleted file mode 100644
index 9321f4082..000000000
--- a/terminal/org.eclipse.tm.terminal.view-feature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">where such changes and/or additions to the Program
-originate from and are distributed by that particular Contributor. A
-Contribution 'originates' from a Contributor if it was added to the
-Program by such Contributor itself or anyone acting on such
-Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in
-conjunction with the Program under their own license agreement, and (ii)
-are not derivative works of the Program.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" mean patent claims licensable by a
-Contributor which are necessarily infringed by the use or sale of its
-Contribution alone or when combined with the Program.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to reproduce, prepare derivative works
-of, publicly display, publicly perform, distribute and sublicense the
-Contribution of such Contributor, if any, and such derivative works, in
-source code and object code form.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free patent license under Licensed Patents to make, use, sell,
-offer to sell, import and otherwise transfer the Contribution of such
-Contributor, if any, in source code and object code form. This patent
-license shall apply to the combination of the Contribution and the
-Program if, at the time the Contribution is added by the Contributor,
-such addition of the Contribution causes such combination to be covered
-by the Licensed Patents. The patent license shall not apply to any other
-combinations which include the Contribution. No hardware per se is
-licensed hereunder.</p>
-
-<p class="list">c) Recipient understands that although each Contributor
-grants the licenses to its Contributions set forth herein, no assurances
-are provided by any Contributor that the Program does not infringe the
-patent or other intellectual property rights of any other entity. Each
-Contributor disclaims any liability to Recipient for claims brought by
-any other entity based on infringement of intellectual property rights
-or otherwise. As a condition to exercising the rights and licenses
-granted hereunder, each Recipient hereby assumes sole responsibility to
-secure any other intellectual property rights needed, if any. For
-example, if a third party patent license is required to allow Recipient
-to distribute the Program, it is Recipient's responsibility to acquire
-that license before distributing the Program.</p>
-
-<p class="list">d) Each Contributor represents that to its knowledge it
-has sufficient copyright rights in its Contribution, if any, to grant
-the copyright license set forth in this Agreement.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">i) effectively disclaims on behalf of all Contributors
-all warranties and conditions, express and implied, including warranties
-or conditions of title and non-infringement, and implied warranties or
-conditions of merchantability and fitness for a particular purpose;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">iv) states that source code for the Program is available
-from such Contributor, and informs licensees how to obtain it in a
-reasonable manner on or through a medium customarily used for software
-exchange.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>Each Contributor must identify itself as the originator of its
-Contribution, if any, in a manner that reasonably allows subsequent
-Recipients to identify the originator of the Contribution.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>Commercial distributors of software may accept certain
-responsibilities with respect to end users, business partners and the
-like. While this license is intended to facilitate the commercial use of
-the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create
-potential liability for other Contributors. Therefore, if a Contributor
-includes the Program in a commercial product offering, such Contributor
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-arising from claims, lawsuits and other legal actions brought by a third
-party against the Indemnified Contributor to the extent caused by the
-acts or omissions of such Commercial Contributor in connection with its
-distribution of the Program in a commercial product offering. The
-obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In
-order to qualify, an Indemnified Contributor must: a) promptly notify
-the Commercial Contributor in writing of such claim, and b) allow the
-Commercial Contributor to control, and cooperate with the Commercial
-Contributor in, the defense and any related settlement negotiations. The
-Indemnified Contributor may participate in any such claim at its own
-expense.</p>
-
-<p>For example, a Contributor might include the Program in a commercial
-product offering, Product X. That Contributor is then a Commercial
-Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance
-claims and warranties are such Commercial Contributor's responsibility
-alone. Under this section, the Commercial Contributor would have to
-defend claims against the other Contributors related to those
-performance claims and warranties, and if a court requires any other
-Contributor to pay any damages as a result, the Commercial Contributor
-must pay those damages.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
-OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
-ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
-OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and
-distributing the Program and assumes all risks associated with its
-exercise of rights under this Agreement , including but not limited to
-the risks and costs of program errors, compliance with applicable laws,
-damage to or loss of data, programs or equipment, and unavailability or
-interruption of operations.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
-NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
-WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
-DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
-HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>If any provision of this Agreement is invalid or unenforceable under
-applicable law, it shall not affect the validity or enforceability of
-the remainder of the terms of this Agreement, and without further action
-by the parties hereto, such provision shall be reformed to the minimum
-extent necessary to make such provision valid and enforceable.</p>
-
-<p>If Recipient institutes patent litigation against any entity
-(including a cross-claim or counterclaim in a lawsuit) alleging that the
-Program itself (excluding combinations of the Program with other
-software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the
-date such litigation is filed.</p>
-
-<p>All Recipient's rights under this Agreement shall terminate if it
-fails to comply with any of the material terms or conditions of this
-Agreement and does not cure such failure in a reasonable period of time
-after becoming aware of such noncompliance. If all Recipient's rights
-under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive.</p>
-
-<p>Everyone is permitted to copy and distribute copies of this
-Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The
-Agreement Steward reserves the right to publish new versions (including
-revisions) of this Agreement from time to time. No one other than the
-Agreement Steward has the right to modify this Agreement. The Eclipse
-Foundation is the initial Agreement Steward. The Eclipse Foundation may
-assign the responsibility to serve as the Agreement Steward to a
-suitable separate entity. Each new version of the Agreement will be
-given a distinguishing version number. The Program (including
-Contributions) may always be distributed subject to the version of the
-Agreement under which it was received. In addition, after a new version
-of the Agreement is published, Contributor may elect to distribute the
-Program (including its Contributions) under the new version. Except as
-expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
-rights or licenses to the intellectual property of any Contributor under
-this Agreement, whether expressly, by implication, estoppel or
-otherwise. All rights in the Program not expressly granted under this
-Agreement are reserved.</p>
-
-<p>This Agreement is governed by the laws of the State of New York and
-the intellectual property laws of the United States of America. No party
-to this Agreement will bring a legal action under this Agreement more
-than one year after the cause of action arose. Each party waives its
-rights to a jury trial in any resulting litigation.</p>
-
-</body></html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.view-feature/feature.properties b/terminal/org.eclipse.tm.terminal.view-feature/feature.properties
deleted file mode 100644
index 4306c3308..000000000
--- a/terminal/org.eclipse.tm.terminal.view-feature/feature.properties
+++ /dev/null
@@ -1,141 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 Wind River Systems, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Martin Oberhuber (Wind River) - initial API and implementation
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=Target Management Terminal View
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management Updates
-
-# "description" property - description of the feature
-description=An Eclipse Workbench standalone view for the Terminal widget.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2003, 2009 Wind River Systems, Inc. and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/terminal/org.eclipse.tm.terminal.view-feature/feature.xml b/terminal/org.eclipse.tm.terminal.view-feature/feature.xml
deleted file mode 100644
index cee185162..000000000
--- a/terminal/org.eclipse.tm.terminal.view-feature/feature.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (c) 2006, 2009 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 - initial API and implementation
- Uwe Stieber (Wind River) - [282996] [terminal][api] Add "hidden" attribute to terminal connector extension point
- -->
-<feature
- id="org.eclipse.tm.terminal.view"
- label="%featureName"
- version="2.0.101.qualifier"
- provider-name="%providerName">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- <discovery label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
- </url>
-
- <requires>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.tm.terminal" version="3.0.1" match="equivalent"/>
- </requires>
-
- <plugin
- id="org.eclipse.tm.terminal.view"
- download-size="48"
- install-size="48"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/terminal/org.eclipse.tm.terminal.view-feature/license.html b/terminal/org.eclipse.tm.terminal.view-feature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/terminal/org.eclipse.tm.terminal.view-feature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplateFeature/epl-v10.html b/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplateFeature/epl-v10.html
deleted file mode 100644
index 9321f4082..000000000
--- a/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplateFeature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">where such changes and/or additions to the Program
-originate from and are distributed by that particular Contributor. A
-Contribution 'originates' from a Contributor if it was added to the
-Program by such Contributor itself or anyone acting on such
-Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in
-conjunction with the Program under their own license agreement, and (ii)
-are not derivative works of the Program.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" mean patent claims licensable by a
-Contributor which are necessarily infringed by the use or sale of its
-Contribution alone or when combined with the Program.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to reproduce, prepare derivative works
-of, publicly display, publicly perform, distribute and sublicense the
-Contribution of such Contributor, if any, and such derivative works, in
-source code and object code form.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free patent license under Licensed Patents to make, use, sell,
-offer to sell, import and otherwise transfer the Contribution of such
-Contributor, if any, in source code and object code form. This patent
-license shall apply to the combination of the Contribution and the
-Program if, at the time the Contribution is added by the Contributor,
-such addition of the Contribution causes such combination to be covered
-by the Licensed Patents. The patent license shall not apply to any other
-combinations which include the Contribution. No hardware per se is
-licensed hereunder.</p>
-
-<p class="list">c) Recipient understands that although each Contributor
-grants the licenses to its Contributions set forth herein, no assurances
-are provided by any Contributor that the Program does not infringe the
-patent or other intellectual property rights of any other entity. Each
-Contributor disclaims any liability to Recipient for claims brought by
-any other entity based on infringement of intellectual property rights
-or otherwise. As a condition to exercising the rights and licenses
-granted hereunder, each Recipient hereby assumes sole responsibility to
-secure any other intellectual property rights needed, if any. For
-example, if a third party patent license is required to allow Recipient
-to distribute the Program, it is Recipient's responsibility to acquire
-that license before distributing the Program.</p>
-
-<p class="list">d) Each Contributor represents that to its knowledge it
-has sufficient copyright rights in its Contribution, if any, to grant
-the copyright license set forth in this Agreement.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">i) effectively disclaims on behalf of all Contributors
-all warranties and conditions, express and implied, including warranties
-or conditions of title and non-infringement, and implied warranties or
-conditions of merchantability and fitness for a particular purpose;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">iv) states that source code for the Program is available
-from such Contributor, and informs licensees how to obtain it in a
-reasonable manner on or through a medium customarily used for software
-exchange.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>Each Contributor must identify itself as the originator of its
-Contribution, if any, in a manner that reasonably allows subsequent
-Recipients to identify the originator of the Contribution.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>Commercial distributors of software may accept certain
-responsibilities with respect to end users, business partners and the
-like. While this license is intended to facilitate the commercial use of
-the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create
-potential liability for other Contributors. Therefore, if a Contributor
-includes the Program in a commercial product offering, such Contributor
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-arising from claims, lawsuits and other legal actions brought by a third
-party against the Indemnified Contributor to the extent caused by the
-acts or omissions of such Commercial Contributor in connection with its
-distribution of the Program in a commercial product offering. The
-obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In
-order to qualify, an Indemnified Contributor must: a) promptly notify
-the Commercial Contributor in writing of such claim, and b) allow the
-Commercial Contributor to control, and cooperate with the Commercial
-Contributor in, the defense and any related settlement negotiations. The
-Indemnified Contributor may participate in any such claim at its own
-expense.</p>
-
-<p>For example, a Contributor might include the Program in a commercial
-product offering, Product X. That Contributor is then a Commercial
-Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance
-claims and warranties are such Commercial Contributor's responsibility
-alone. Under this section, the Commercial Contributor would have to
-defend claims against the other Contributors related to those
-performance claims and warranties, and if a court requires any other
-Contributor to pay any damages as a result, the Commercial Contributor
-must pay those damages.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
-OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
-ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
-OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and
-distributing the Program and assumes all risks associated with its
-exercise of rights under this Agreement , including but not limited to
-the risks and costs of program errors, compliance with applicable laws,
-damage to or loss of data, programs or equipment, and unavailability or
-interruption of operations.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
-NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
-WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
-DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
-HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>If any provision of this Agreement is invalid or unenforceable under
-applicable law, it shall not affect the validity or enforceability of
-the remainder of the terms of this Agreement, and without further action
-by the parties hereto, such provision shall be reformed to the minimum
-extent necessary to make such provision valid and enforceable.</p>
-
-<p>If Recipient institutes patent litigation against any entity
-(including a cross-claim or counterclaim in a lawsuit) alleging that the
-Program itself (excluding combinations of the Program with other
-software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the
-date such litigation is filed.</p>
-
-<p>All Recipient's rights under this Agreement shall terminate if it
-fails to comply with any of the material terms or conditions of this
-Agreement and does not cure such failure in a reasonable period of time
-after becoming aware of such noncompliance. If all Recipient's rights
-under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive.</p>
-
-<p>Everyone is permitted to copy and distribute copies of this
-Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The
-Agreement Steward reserves the right to publish new versions (including
-revisions) of this Agreement from time to time. No one other than the
-Agreement Steward has the right to modify this Agreement. The Eclipse
-Foundation is the initial Agreement Steward. The Eclipse Foundation may
-assign the responsibility to serve as the Agreement Steward to a
-suitable separate entity. Each new version of the Agreement will be
-given a distinguishing version number. The Program (including
-Contributions) may always be distributed subject to the version of the
-Agreement under which it was received. In addition, after a new version
-of the Agreement is published, Contributor may elect to distribute the
-Program (including its Contributions) under the new version. Except as
-expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
-rights or licenses to the intellectual property of any Contributor under
-this Agreement, whether expressly, by implication, estoppel or
-otherwise. All rights in the Program not expressly granted under this
-Agreement are reserved.</p>
-
-<p>This Agreement is governed by the laws of the State of New York and
-the intellectual property laws of the United States of America. No party
-to this Agreement will bring a legal action under this Agreement more
-than one year after the cause of action arose. Each party waives its
-rights to a jury trial in any resulting litigation.</p>
-
-</body></html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplateFeature/feature.properties b/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplateFeature/feature.properties
deleted file mode 100644
index 092106af3..000000000
--- a/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplateFeature/feature.properties
+++ /dev/null
@@ -1,141 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 Wind River Systems, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Martin Oberhuber (Wind River) - initial API and implementation
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=Target Management Terminal View Source
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org - DSDP
-
-# "tmUpdateSiteName" property - label for the update site
-tmUpdateSiteName=Target Management Updates
-
-# "description" property - description of the feature
-description=An Eclipse Workbench standalone view for the Terminal widget.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2003, 2009 Wind River Systems, Inc. and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplateFeature/license.html b/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplateFeature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplateFeature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/about.html b/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/about.html
deleted file mode 100644
index e7b57cfff..000000000
--- a/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/about.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2007</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-<h3>Source Code</h3>
-<p>This plug-in contains source code zip files (&quot;Source Zips&quot;) that correspond to binary content in other plug-ins. These Source Zips may be distributed under different license
-agreements and/or notices. Details about these license agreements and notices are contained in &quot;about.html&quot; files (&quot;Abouts&quot;) located in sub-directories in the
-src/ directory of this plug-in. Such Abouts govern your use of the Source Zips in that directory, not the EPL.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/about.ini b/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/about.ini
deleted file mode 100644
index fbbb9f83d..000000000
--- a/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/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=dsdp32.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/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/about.mappings b/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/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/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/about.properties b/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/about.properties
deleted file mode 100644
index eafd81605..000000000
--- a/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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 Source\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Wind River Systems, Inc. and others 2003, 2009. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm
diff --git a/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/build.properties b/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/build.properties
deleted file mode 100644
index 7ef3fa39c..000000000
--- a/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/build.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 Wind River Systems, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-bin.includes = about.html, about.ini, about.mappings, about.properties, dsdp32.png, plugin.properties, plugin.xml, src/, META-INF/
-sourcePlugin = true
diff --git a/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/dsdp32.png b/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/dsdp32.png
deleted file mode 100644
index 3077b1220..000000000
--- a/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/dsdp32.png
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/plugin.properties b/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/plugin.properties
deleted file mode 100644
index 577524679..000000000
--- a/terminal/org.eclipse.tm.terminal.view-feature/sourceTemplatePlugin/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 Wind River Systems, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Martin Oberhuber - initial API and implementation
-################################################################################
-pluginName=Target Management Terminal View Source
-providerName=Eclipse.org - DSDP
diff --git a/terminal/org.eclipse.tm.terminal.view/.classpath b/terminal/org.eclipse.tm.terminal.view/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/terminal/org.eclipse.tm.terminal.view/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/terminal/org.eclipse.tm.terminal.view/.cvsignore b/terminal/org.eclipse.tm.terminal.view/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/terminal/org.eclipse.tm.terminal.view/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/terminal/org.eclipse.tm.terminal.view/.project b/terminal/org.eclipse.tm.terminal.view/.project
deleted file mode 100644
index b54e2fe95..000000000
--- a/terminal/org.eclipse.tm.terminal.view/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.terminal.view</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/terminal/org.eclipse.tm.terminal.view/.settings/org.eclipse.jdt.core.prefs b/terminal/org.eclipse.tm.terminal.view/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 381fc6eb0..000000000
--- a/terminal/org.eclipse.tm.terminal.view/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,71 +0,0 @@
-#Fri Mar 28 14:14:24 CET 2008
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-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=warning
-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.3
diff --git a/terminal/org.eclipse.tm.terminal.view/.settings/org.eclipse.jdt.ui.prefs b/terminal/org.eclipse.tm.terminal.view/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 9a20fca52..000000000
--- a/terminal/org.eclipse.tm.terminal.view/.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/terminal/org.eclipse.tm.terminal.view/HelpContexts.xml b/terminal/org.eclipse.tm.terminal.view/HelpContexts.xml
deleted file mode 100644
index 5ba920568..000000000
--- a/terminal/org.eclipse.tm.terminal.view/HelpContexts.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.contexts"?>
-<!--
-Copyright (c) 2008 Wind River Systems, Inc.
-All rights reserved. This program and the accompanying materials
-are made available under the terms of the Eclipse Public License v1.0
-which accompanies this distribution, and is available at
-http://www.eclipse.org/legal/epl-v10.html
-
-Contributors:
-Martin Oberhuber (Wind River) - initial API and implementation
--->
-<contexts>
- <context id="terminal_page">
- <description>The Terminal View supports direct connections to remote systems via serial or network connections.
- </description>
- <topic label="Terminal View" href="doc/html/01_terminalview.html" />
- <topic label="Terminal Emulation" href="doc/html/04_terminal_emulation.html" />
- </context>
- <context id="terminal_settings">
- <description>The Terminal Settings Dialog provides the controls for making terminal connections.
- </description>
- <topic label="Terminal Settings Dialog" href="doc/html/03_terminal_settings.html#terminal_settings"/>
- <topic label="Terminal View Quick Reference" href="doc/html/02_terminal_page.html#terminal_page"/>
- </context>
-</contexts> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.view/META-INF/MANIFEST.MF b/terminal/org.eclipse.tm.terminal.view/META-INF/MANIFEST.MF
deleted file mode 100644
index 85ac5a348..000000000
--- a/terminal/org.eclipse.tm.terminal.view/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,16 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.terminal.view;singleton:=true
-Bundle-Version: 2.0.101.qualifier
-Bundle-Activator: org.eclipse.tm.internal.terminal.view.TerminalViewPlugin
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.tm.terminal;bundle-version="[3.0.1,3.1.0)"
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-Bundle-Vendor: %providerName
-Export-Package: org.eclipse.tm.internal.terminal.actions;x-internal:=true,
- org.eclipse.tm.internal.terminal.view;x-internal:=true
diff --git a/terminal/org.eclipse.tm.terminal.view/TerminalContexts.xml b/terminal/org.eclipse.tm.terminal.view/TerminalContexts.xml
deleted file mode 100644
index 387756f5c..000000000
--- a/terminal/org.eclipse.tm.terminal.view/TerminalContexts.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.contexts"?>
-<!--
-Copyright (c) 2008 Wind River Systems, Inc.
-All rights reserved. This program and the accompanying materials
-are made available under the terms of the Eclipse Public License v1.0
-which accompanies this distribution, and is available at
-http://www.eclipse.org/legal/epl-v10.html
-
-Contributors:
-Martin Oberhuber (Wind River) - initial API and implementation
--->
-<contexts>
- <context id="terminal_view">
- <topic label="Terminal View" href="doc/html/01_terminalview.html" />
- <topic label="Terminal Emulation" href="doc/html/04_terminal_emulation.html" />
- <topic label="Terminal View Quick Reference" href="doc/html/02_terminal_page.html#terminal_page"/>
- </context>
-</contexts> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.view/about.html b/terminal/org.eclipse.tm.terminal.view/about.html
deleted file mode 100644
index d4cc693f9..000000000
--- a/terminal/org.eclipse.tm.terminal.view/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2007</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.view/about.ini b/terminal/org.eclipse.tm.terminal.view/about.ini
deleted file mode 100644
index fbbb9f83d..000000000
--- a/terminal/org.eclipse.tm.terminal.view/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=dsdp32.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/terminal/org.eclipse.tm.terminal.view/about.mappings b/terminal/org.eclipse.tm.terminal.view/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/terminal/org.eclipse.tm.terminal.view/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/terminal/org.eclipse.tm.terminal.view/about.properties b/terminal/org.eclipse.tm.terminal.view/about.properties
deleted file mode 100644
index 9e7f3eb66..000000000
--- a/terminal/org.eclipse.tm.terminal.view/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Wind River Systems, Inc. and others 2003, 2009. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm
diff --git a/terminal/org.eclipse.tm.terminal.view/build.properties b/terminal/org.eclipse.tm.terminal.view/build.properties
deleted file mode 100644
index 4d42cd2a2..000000000
--- a/terminal/org.eclipse.tm.terminal.view/build.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-################################################################################
-# Copyright (c) 2003, 2009 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,\
- dsdp32.png,\
- HelpContexts.xml,\
- doc/,\
- toc.xml,\
- TerminalContexts.xml
-src.includes = about.html
diff --git a/terminal/org.eclipse.tm.terminal.view/doc/book.css b/terminal/org.eclipse.tm.terminal.view/doc/book.css
deleted file mode 100644
index faa4199fe..000000000
--- a/terminal/org.eclipse.tm.terminal.view/doc/book.css
+++ /dev/null
@@ -1 +0,0 @@
-@import "../../PRODUCT_PLUGIN/book.css";
diff --git a/terminal/org.eclipse.tm.terminal.view/doc/html/01_terminalview.html b/terminal/org.eclipse.tm.terminal.view/doc/html/01_terminalview.html
deleted file mode 100644
index c423cbf8b..000000000
--- a/terminal/org.eclipse.tm.terminal.view/doc/html/01_terminalview.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<meta http-equiv="Content-Style-Type" content="text/css" />
-<meta name="copyright" content="Copyright (c) 2004, 2008 Wind River Systems, Inc. and others. This page is made available under license. For full details see the LEGAL notice in the documentation book that contains this page." />
-<link rel="stylesheet" type="text/css" href="../book.css" />
-<title>Terminal View</title>
-</head>
-<!--
-Copyright (c) 2004, 2008 Wind River Systems, Inc. and others.
-All rights reserved. This program and the accompanying materials
-are made available under the terms of the Eclipse Public License v1.0
-which accompanies this distribution, and is available at
-http://www.eclipse.org/legal/epl-v10.html
-
-Contributors:
-Martin Oberhuber (Wind River) - initial API and implementation
--->
-<body id="terminalview"><a name="terminalview"><!-- --></a>
-
-<h1 class="topictitle1">Terminal View</h1>
-<div class="p">
-<p>
-The <b>Terminal</b> 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.
-</p><p>
-The Terminal view is activated by choosing <b>Window &gt; Show View &gt; Other &gt; Terminal &gt; Terminal</b>.
-</p></div>
-<ul>
- <li><a href="02_terminal_page.html">Terminal View Quick Reference</a></li>
- <li><a href="03_terminal_settings.html">Terminal Settings Dialog</a></li>
- <li><a href="04_terminal_emulation.html">Terminal Emulation</a></li>
- <li><a href="notice.html">Legal Notice</a></li>
-</ul>
-
-Multiple <b>Terminal</b> 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.
-
-<p></p>
-<div class="p">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| <a href="02_terminal_page.html">Next &gt;</a></div>
- </body>
-</html>
diff --git a/terminal/org.eclipse.tm.terminal.view/doc/html/02_terminal_page.html b/terminal/org.eclipse.tm.terminal.view/doc/html/02_terminal_page.html
deleted file mode 100644
index 62847cefc..000000000
--- a/terminal/org.eclipse.tm.terminal.view/doc/html/02_terminal_page.html
+++ /dev/null
@@ -1,78 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<meta http-equiv="Content-Style-Type" content="text/css" />
-<meta name="copyright" content="Copyright (c) 2004, 2008 Wind River Systems, Inc. and others. This page is made available under license. For full details see the LEGAL notice in the documentation book that contains this page." />
-<link rel="stylesheet" type="text/css" href="../book.css" />
-<title>Terminal View Quick Reference</title>
-</head>
-<!--
-Copyright (c) 2004, 2008 Wind River Systems, Inc. and others.
-All rights reserved. This program and the accompanying materials
-are made available under the terms of the Eclipse Public License v1.0
-which accompanies this distribution, and is available at
-http://www.eclipse.org/legal/epl-v10.html
-
-Contributors:
-Martin Oberhuber (Wind River) - initial API and implementation
--->
-<body><a name="terminal_page"><!-- --></a>
-<h2 class="topictitle2">Terminal View Quick Reference</h2>
-<div align="left">
-<table border="0" cellspacing="6">
- <caption></caption>
- <tr align="left" valign="top">
- <td><p><b>Button</b></p></td>
- <td><p><b>Description</b></p></td>
- </tr>
- <tr align="left" valign="top">
- <td><p><img src="../../icons/clcl16/newterminal.gif" border="0" hspace="0" vspace="0"/></p></td>
- <td><p>Open another Terminal connection in the current view, or in a new <b>Terminal</b> view instance.</p></td>
- </tr>
- <tr align="left" valign="top">
- <td><p><img src="../../icons/clcl16/connect_co.gif" border="0" hspace="0" vspace="0"/></p></td>
- <td><p>Connect to selected port.</p></td>
- </tr>
- <tr align="left" valign="top">
- <td><p><img src="../../icons/clcl16/disconnect_co.gif" border="0" hspace="0" vspace="0"/></p></td>
- <td><p>Disconnect from selected port.</p></td>
- </tr>
- <tr align="left" valign="top">
- <td><p><img src="../../icons/clcl16/properties_tsk.gif" border="0" hspace="0" vspace="0"/></p></td>
- <td><p>Open the <a href="03_terminal_settings.html"><b>Terminal Settings</b></a> dialog.
- While connected, only the connection's title can be changed.</p></td>
- </tr>
- <tr align="left" valign="top">
- <td><p><img src="../../icons/clcl16/command_input_field.gif" border="0" hspace="0" vspace="0"/></p></td>
- <td><p>Toggle the <a href="04_terminal_emulation.html"><b>Command Input</b></a> field,
- for editing complex command lines on dumb terminals.</p></td>
- </tr>
- <tr align="left" valign="top">
- <td><p><img src="../../icons/cview16/terminal_view.gif" border="0" hspace="0" vspace="0"/></p></td>
- <td><p>Select a Terminal connection to show in this view instance.
- Only available when multiple connections have been defined in this view.</p></td>
- </tr>
- <tr align="left" valign="top">
- <td><p><img src="../../icons/dlcl16/rem_co.gif" border="0" hspace="0" vspace="0"/></p></td>
- <td><p>Remove the currently selected Terminal Connection from this view.
- Only available when multiple connections have been defined in this view.</p></td>
- </tr>
-</table>
-</div>
-<p>
-</p>
-
-<table class="steptable"><tr><td>
- Each instance of the <b>Terminal</b> 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.
-</td></tr></table>
-
-<p></p>
-<div class="p"><a href="01_terminalview.html">&lt; Prev</a> | <a href="03_terminal_settings.html">Next &gt;</a></div>
-
-</body>
-</html>
diff --git a/terminal/org.eclipse.tm.terminal.view/doc/html/03_terminal_settings.html b/terminal/org.eclipse.tm.terminal.view/doc/html/03_terminal_settings.html
deleted file mode 100644
index 953025ae0..000000000
--- a/terminal/org.eclipse.tm.terminal.view/doc/html/03_terminal_settings.html
+++ /dev/null
@@ -1,101 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<meta http-equiv="Content-Style-Type" content="text/css" />
-<meta name="copyright" content="Copyright (c) 2004, 2008 Wind River Systems, Inc. and others. This page is made available under license. For full details see the LEGAL notice in the documentation book that contains this page." />
-<link rel="stylesheet" type="text/css" href="../book.css" />
-<title>Terminal Settings Dialog</title>
-</head>
-<!--
-Copyright (c) 2004, 2008 Wind River Systems, Inc. and others.
-All rights reserved. This program and the accompanying materials
-are made available under the terms of the Eclipse Public License v1.0
-which accompanies this distribution, and is available at
-http://www.eclipse.org/legal/epl-v10.html
-
-Contributors:
-Martin Oberhuber (Wind River) - initial API and implementation
--->
-<body><a name="terminal_settings"><!-- --></a>
-<h2 class="topictitle2">Terminal Settings Dialog</h2>
-
-<table class="steptable"><tr><td class="S_step_text">
-Use the <b>Terminal Settings</b> dialog to configure your connection.
-</td></tr></table>
-<table class="steptable"><tr><td class="S_step_text">
-In the <b>Connection Type</b> field choose <b>Serial</b>, <b>SSH</b> or <b>Telnet</b>.
-</td></tr></table>
-<table class="steptable"><tr><td class="S_step_text">
-The <b>View Title</b> field allows giving a name to your <b>Terminal</b> View instance.
-</td></tr></table>
-
-<h4>Serial Connection</h4>
-
-<table class="steptable"><tr><td class="S_step_text">
-If you choose a serial connection, the <b>Settings</b> area has seven options:
- <b>Port</b>, <b>Baud Rate</b>, <b>Data Bits</b>, <b>Stop Bits</b>, <b>Parity</b>, <b>Flow Control</b>,
- and <b>Timeout</b>.
-</td></tr></table>
-
-<table class="steptable"><tr><td class="S_step_text">
-When you have entered your settings, click <b>OK</b>. This initiates your connection.</td></tr></table>
-
-<table class="steptable"><tr><td class="S_step_text">
-Your connection information appears in the header of the <b>Terminal</b> view.
-A cursor appears in the view itself. Hit <b>ENTER</b> to get a <b>&gt;NET&gt;</b>
-prompt.</td></tr></table>
-
-<p></p>
-<div align="left">
-<table class="N1_note" border="0" cellpadding="0" cellspacing="6">
- <caption></caption>
- <tr align="left" valign="top"><td></td><td class="N1_note_content">
- <p><b>NOTE:</b>When using the <b>Terminal</b> view on Linux or Solaris,
- serial ports <b>ttyS0</b> and <b>ttyS1</b> must have appropriate permissions
- set in order to connect to them, unless you are running the Workbench as root.
- </p></td></tr>
- <tr align="left" valign="top"><td>&#160;</td><td>&#160;</td>
- </tr>
-</table>
-</div>
-
-<p></p>
-<h4>SSH Connection</h4>
-
-<table class="steptable"><tr><td class="S_step_text">
-If you choose an SSH connection, the <b>Settings</b> area has six options.
-In the <b>Host</b> and <b>Port</b> fields, enter the IP Address and port of the host
-you wish to connect to.
-The <b>User</b> field specifies the remote user id to use.
-The <b>Password</b> field is optional, since SSH can re-use your private keys
-as specified on the Eclipse Preferences, General, Network Page.
-The <b>Timeout</b> can be changed for very slow networks. The
-<b>KeepAlive</b> 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.
-<p>When all settings are specified, click
-<b>OK</b>. This initiates your connection.</p></td></tr></table>
-
-
-<p></p>
-<h4>Telnet Connection</h4>
-
-<table class="steptable"><tr><td class="S_step_text">
-If you choose a Telnet connection, the <b>Settings</b> area has three options.
-In the <b>Host</b> field, enter the IP Address of the host you wish to connect to.
-In the <b>Port</b> field, select the network port you wish to use.
-The <b>Timeout</b> can be changed for very slow networks. Then click
-<b>OK</b>. This initiates your connection.</td></tr></table>
-
-<table class="steptable"><tr><td class="S_step_text">
-Your connection information appears in the header of the <b>Terminal</b> view.
-A cursor appears in the view itself. Hit <b>ENTER</b> to get a <b>&gt;NET&gt; </b>prompt.
-</td></tr></table>
-
-<p></p>
-<div class="p"><a href="02_terminal_page.html">&lt; Prev</a> | <a href="04_terminal_emulation.html">Next &gt;</a></div>
-
- </body>
-</html>
diff --git a/terminal/org.eclipse.tm.terminal.view/doc/html/04_terminal_emulation.html b/terminal/org.eclipse.tm.terminal.view/doc/html/04_terminal_emulation.html
deleted file mode 100644
index 0b987d5e8..000000000
--- a/terminal/org.eclipse.tm.terminal.view/doc/html/04_terminal_emulation.html
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<meta http-equiv="Content-Style-Type" content="text/css" />
-<meta name="copyright" content="Copyright (c) 2004, 2008 Wind River Systems, Inc. and others. This page is made available under license. For full details see the LEGAL notice in the documentation book that contains this page." />
-<link rel="stylesheet" type="text/css" href="../book.css" />
-<title>Terminal Emulation</title>
-</head>
-<!--
-Copyright (c) 2004, 2008 Wind River Systems, Inc. and others.
-All rights reserved. This program and the accompanying materials
-are made available under the terms of the Eclipse Public License v1.0
-which accompanies this distribution, and is available at
-http://www.eclipse.org/legal/epl-v10.html
-
-Contributors:
-Martin Oberhuber (Wind River) - initial API and implementation
--->
-<body><a name="terminal_emulation"><!-- --></a>
-<h2 class="topictitle2">Terminal Emulation</h2>
-
-<table class="steptable"><tr><td class="S_step_text">
-The <b>Terminal</b> view is an ANSI-conformant terminal emulator. You can use the
-<b>Terminal</b> view to telnet into a remote UNIX host.
-</td></tr></table>
-
-<table class="steptable"><tr><td class="S_step_text">
-To do so, set the <b>TERM</b> environment variable on the remote host to <b>ansi</b>.
-This enables programs on the remote host, such as <b>vi</b> and <b>Emacs</b>,
-to display text properly.
-The <b>Terminal</b> view does not currently support other emulation modes, such as VT100.
-</td></tr></table>
-
-<table class="steptable"><tr><td class="S_step_text">
-The <b>size</b> of the terminal window as understood by the remote is automatically
-adjusted as the size of your <b>Terminal</b> view changes.
-The <b>colors</b> and <b>font</b> used by the Terminal can be configured in the
-Eclipse Preferences, Appearance section. A separate <b>Terminal</b> Preference
-Page allows inverting the terminal colors easily if desired.
-</td></tr></table>
-
-<h4>Optional Command Input Field</h4>
-
-<table class="steptable"><tr><td class="S_step_text">
-The optional <b>Command Input Field</b> can be enabled when sending commands to a dumb
-terminal that does not support cursor keys for editing. In such a case, the <b>
-Command Input Field</b> provides a full editor that supports cursor navigation, copy
-and paste, as well as a history of previous commands that can be accessed by
-<b>Ctrl+Space</b> content assist.
-</td></tr></table>
-
-<table class="steptable"><tr><td class="S_step_text">
-If more space than the default single editing line is needed for very complex commands,
-the <b>Command Input Field</b> can be enlarged by dragging its upper handle up with
-the mouse.
-</td></tr></table>
-
-<p></p>
-<div class="p"><a href="03_terminal_settings.html">&lt; Prev</a> | </div>
-
- </body>
-</html>
diff --git a/terminal/org.eclipse.tm.terminal.view/doc/html/notice.html b/terminal/org.eclipse.tm.terminal.view/doc/html/notice.html
deleted file mode 100644
index ce5f8a404..000000000
--- a/terminal/org.eclipse.tm.terminal.view/doc/html/notice.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<meta http-equiv="Content-Style-Type" content="text/css" />
-<meta name="copyright" content="Copyright (c) 2004, 2008 Wind River Systems, Inc. and others. This page is made available under license. For full details see the LEGAL notice in the documentation book that contains this page." />
-<link rel="stylesheet" type="text/css" href="../book.css" />
-<title>Legal Notice</title>
-</head>
-<!--
-Copyright (c) 2004, 2008 Wind River Systems, Inc. and others.
-All rights reserved. This program and the accompanying materials
-are made available under the terms of the Eclipse Public License v1.0
-which accompanies this distribution, and is available at
-http://www.eclipse.org/legal/epl-v10.html
-
-Contributors:
-Martin Oberhuber (Wind River) - initial API and implementation
--->
-<body><a name="terminal_legal"><!-- --></a>
-<h2 class="topictitle2">Legal Notice</h2>
-<p>
-The material in this guide is Copyright (c) Wind River Systems, Inc. and others 2004, 2008.
-</p>
-<p>
-<a href="../../about.html">Terms and conditions regarding the use of this guide.</a>
-</p>
-</body>
-</html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.view/dsdp32.png b/terminal/org.eclipse.tm.terminal.view/dsdp32.png
deleted file mode 100644
index 3077b1220..000000000
--- a/terminal/org.eclipse.tm.terminal.view/dsdp32.png
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.view/icons/clcl16/command_input_field.gif b/terminal/org.eclipse.tm.terminal.view/icons/clcl16/command_input_field.gif
deleted file mode 100644
index 9e3a547c1..000000000
--- a/terminal/org.eclipse.tm.terminal.view/icons/clcl16/command_input_field.gif
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.view/icons/clcl16/connect_co.gif b/terminal/org.eclipse.tm.terminal.view/icons/clcl16/connect_co.gif
deleted file mode 100644
index 556b230da..000000000
--- a/terminal/org.eclipse.tm.terminal.view/icons/clcl16/connect_co.gif
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.view/icons/clcl16/disconnect_co.gif b/terminal/org.eclipse.tm.terminal.view/icons/clcl16/disconnect_co.gif
deleted file mode 100644
index f1d5fb31e..000000000
--- a/terminal/org.eclipse.tm.terminal.view/icons/clcl16/disconnect_co.gif
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.view/icons/clcl16/lock_co.gif b/terminal/org.eclipse.tm.terminal.view/icons/clcl16/lock_co.gif
deleted file mode 100644
index 68fd6cf39..000000000
--- a/terminal/org.eclipse.tm.terminal.view/icons/clcl16/lock_co.gif
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.view/icons/clcl16/newterminal.gif b/terminal/org.eclipse.tm.terminal.view/icons/clcl16/newterminal.gif
deleted file mode 100644
index 80201e0d4..000000000
--- a/terminal/org.eclipse.tm.terminal.view/icons/clcl16/newterminal.gif
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.view/icons/clcl16/properties_tsk.gif b/terminal/org.eclipse.tm.terminal.view/icons/clcl16/properties_tsk.gif
deleted file mode 100644
index 41b5adbd5..000000000
--- a/terminal/org.eclipse.tm.terminal.view/icons/clcl16/properties_tsk.gif
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.view/icons/cview16/terminal_view.gif b/terminal/org.eclipse.tm.terminal.view/icons/cview16/terminal_view.gif
deleted file mode 100644
index bbb6a9e15..000000000
--- a/terminal/org.eclipse.tm.terminal.view/icons/cview16/terminal_view.gif
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.view/icons/dlcl16/command_input_field.gif b/terminal/org.eclipse.tm.terminal.view/icons/dlcl16/command_input_field.gif
deleted file mode 100644
index f538ca707..000000000
--- a/terminal/org.eclipse.tm.terminal.view/icons/dlcl16/command_input_field.gif
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.view/icons/dlcl16/connect_co.gif b/terminal/org.eclipse.tm.terminal.view/icons/dlcl16/connect_co.gif
deleted file mode 100644
index ae5e64b9f..000000000
--- a/terminal/org.eclipse.tm.terminal.view/icons/dlcl16/connect_co.gif
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.view/icons/dlcl16/disconnect_co.gif b/terminal/org.eclipse.tm.terminal.view/icons/dlcl16/disconnect_co.gif
deleted file mode 100644
index 24a628713..000000000
--- a/terminal/org.eclipse.tm.terminal.view/icons/dlcl16/disconnect_co.gif
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.view/icons/dlcl16/lock_co.gif b/terminal/org.eclipse.tm.terminal.view/icons/dlcl16/lock_co.gif
deleted file mode 100644
index b77647893..000000000
--- a/terminal/org.eclipse.tm.terminal.view/icons/dlcl16/lock_co.gif
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.view/icons/dlcl16/newterminal.gif b/terminal/org.eclipse.tm.terminal.view/icons/dlcl16/newterminal.gif
deleted file mode 100644
index 80201e0d4..000000000
--- a/terminal/org.eclipse.tm.terminal.view/icons/dlcl16/newterminal.gif
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.view/icons/dlcl16/properties_tsk.gif b/terminal/org.eclipse.tm.terminal.view/icons/dlcl16/properties_tsk.gif
deleted file mode 100644
index c307524a7..000000000
--- a/terminal/org.eclipse.tm.terminal.view/icons/dlcl16/properties_tsk.gif
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.view/icons/dlcl16/rem_co.gif b/terminal/org.eclipse.tm.terminal.view/icons/dlcl16/rem_co.gif
deleted file mode 100644
index 559e46298..000000000
--- a/terminal/org.eclipse.tm.terminal.view/icons/dlcl16/rem_co.gif
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.view/icons/elcl16/command_input_field.gif b/terminal/org.eclipse.tm.terminal.view/icons/elcl16/command_input_field.gif
deleted file mode 100644
index f538ca707..000000000
--- a/terminal/org.eclipse.tm.terminal.view/icons/elcl16/command_input_field.gif
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.view/icons/elcl16/connect_co.gif b/terminal/org.eclipse.tm.terminal.view/icons/elcl16/connect_co.gif
deleted file mode 100644
index c0de0d32d..000000000
--- a/terminal/org.eclipse.tm.terminal.view/icons/elcl16/connect_co.gif
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.view/icons/elcl16/disconnect_co.gif b/terminal/org.eclipse.tm.terminal.view/icons/elcl16/disconnect_co.gif
deleted file mode 100644
index ef5bfa8ad..000000000
--- a/terminal/org.eclipse.tm.terminal.view/icons/elcl16/disconnect_co.gif
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.view/icons/elcl16/lock_co.gif b/terminal/org.eclipse.tm.terminal.view/icons/elcl16/lock_co.gif
deleted file mode 100644
index 68fd6cf39..000000000
--- a/terminal/org.eclipse.tm.terminal.view/icons/elcl16/lock_co.gif
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.view/icons/elcl16/newterminal.gif b/terminal/org.eclipse.tm.terminal.view/icons/elcl16/newterminal.gif
deleted file mode 100644
index 80201e0d4..000000000
--- a/terminal/org.eclipse.tm.terminal.view/icons/elcl16/newterminal.gif
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.view/icons/elcl16/properties_tsk.gif b/terminal/org.eclipse.tm.terminal.view/icons/elcl16/properties_tsk.gif
deleted file mode 100644
index 41b5adbd5..000000000
--- a/terminal/org.eclipse.tm.terminal.view/icons/elcl16/properties_tsk.gif
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.view/icons/elcl16/rem_co.gif b/terminal/org.eclipse.tm.terminal.view/icons/elcl16/rem_co.gif
deleted file mode 100644
index 2cd9c5444..000000000
--- a/terminal/org.eclipse.tm.terminal.view/icons/elcl16/rem_co.gif
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.view/icons/eview16/terminal_view.gif b/terminal/org.eclipse.tm.terminal.view/icons/eview16/terminal_view.gif
deleted file mode 100644
index bbb6a9e15..000000000
--- a/terminal/org.eclipse.tm.terminal.view/icons/eview16/terminal_view.gif
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal.view/plugin.properties b/terminal/org.eclipse.tm.terminal.view/plugin.properties
deleted file mode 100644
index cdcfdbfc2..000000000
--- a/terminal/org.eclipse.tm.terminal.view/plugin.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-##########################################################################
-# Copyright (c) 2003, 2009 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
-##########################################################################
-pluginName = Target Management Terminal View
-providerName = Eclipse.org - DSDP
-terminal.views.category.name = Terminal
-terminal.views.view.name = Terminal
-terminal.views.view.font.description = The font for the terminal console.
-terminal.views.view.font.label = Terminal Console Font
diff --git a/terminal/org.eclipse.tm.terminal.view/plugin.xml b/terminal/org.eclipse.tm.terminal.view/plugin.xml
deleted file mode 100644
index dbb050174..000000000
--- a/terminal/org.eclipse.tm.terminal.view/plugin.xml
+++ /dev/null
@@ -1,81 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<!--
-# Copyright (c) 2003, 2008 Wind River Systems, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# 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
--->
-<plugin>
- <extension
- point="org.eclipse.ui.views">
- <category
- name="%terminal.views.category.name"
- id="Terminal">
- </category>
- <view
- allowMultiple="true"
- class="org.eclipse.tm.internal.terminal.view.TerminalView"
- icon="icons/cview16/terminal_view.gif"
- category="Terminal"
- name="%terminal.views.view.name"
- id="org.eclipse.tm.terminal.view.TerminalView">
- </view>
- </extension>
- <extension
- point="org.eclipse.ui.perspectiveExtensions">
- <perspectiveExtension
- targetID="Terminal">
- <viewShortcut id="org.eclipse.tm.terminal.view.TerminalView"/>
- <view id="org.eclipse.tm.terminal.view.TerminalView"
- relationship="stack">
- </view>
- </perspectiveExtension>
- </extension>
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- name="%terminal.views.view.name"
- class="org.eclipse.tm.internal.terminal.view.TerminalPreferencePage"
- id="org.eclipse.tm.terminal.TerminalPreferencePage">
- </page>
- </extension>
-
- <extension
- point="org.eclipse.ui.fontDefinitions">
- <fontDefinition
- label="%terminal.views.view.font.label"
- defaultsTo="org.eclipse.jface.textfont"
- id="terminal.views.view.font.definition">
- <description>
- %terminal.views.view.font.description
- </description>
- </fontDefinition>
- </extension>
- <extension
- point="org.eclipse.core.runtime.preferences">
- <initializer class="org.eclipse.tm.internal.terminal.view.TerminalPreferenceInitializer"/>
- </extension>
-
- <!-- ============================================ -->
- <!-- Define Help Context -->
- <!-- ============================================ -->
- <extension point="org.eclipse.help.contexts">
- <contexts file="HelpContexts.xml"/>
- <contexts file="TerminalContexts.xml" plugin="org.eclipse.tm.terminal"/>
- </extension>
- <extension point="org.eclipse.help.toc">
- <toc file="toc.xml"/>
- </extension>
-
- </plugin>
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/ActionMessages.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/ActionMessages.java
deleted file mode 100644
index d4334bddc..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/ActionMessages.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * 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.tm.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/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/ActionMessages.properties b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/ActionMessages.properties
deleted file mode 100644
index d28936dd0..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/ActionMessages.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2008 Wind River Systems, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# 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/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/ShowTerminalConnectionAction.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/ShowTerminalConnectionAction.java
deleted file mode 100644
index cf4565617..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/ShowTerminalConnectionAction.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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.tm.internal.terminal.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.tm.internal.terminal.view.ITerminalViewConnection;
-import org.eclipse.tm.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/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalAction.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalAction.java
deleted file mode 100644
index 13b896fdb..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalAction.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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.tm.internal.terminal.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.tm.internal.terminal.view.ITerminalView;
-import org.eclipse.tm.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/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionConnect.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionConnect.java
deleted file mode 100644
index 30901d6fa..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionConnect.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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.tm.internal.terminal.actions;
-
-import org.eclipse.tm.internal.terminal.view.ITerminalView;
-import org.eclipse.tm.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/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionDisconnect.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionDisconnect.java
deleted file mode 100644
index ff0292f90..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionDisconnect.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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.tm.internal.terminal.actions;
-
-import org.eclipse.tm.internal.terminal.view.ITerminalView;
-import org.eclipse.tm.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/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionNewTerminal.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionNewTerminal.java
deleted file mode 100644
index 9e4586462..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionNewTerminal.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 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.tm.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.swt.widgets.Control;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.tm.internal.terminal.view.ITerminalView;
-import org.eclipse.tm.internal.terminal.view.ImageConsts;
-
-/**
- * UNDER CONSTRUCTION
- *
- * @author Fran Litterio <francis.litterio@windriver.com>
- */
-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/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionRemove.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionRemove.java
deleted file mode 100644
index a3d6e3659..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionRemove.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Michael Scharf (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.actions;
-
-import org.eclipse.tm.internal.terminal.view.ITerminalViewConnectionManager;
-import org.eclipse.tm.internal.terminal.view.ImageConsts;
-import org.eclipse.tm.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/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionScrollLock.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionScrollLock.java
deleted file mode 100644
index 39d023cf4..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionScrollLock.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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.tm.internal.terminal.actions;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.tm.internal.terminal.view.ITerminalView;
-import org.eclipse.tm.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/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionSelectionDropDown.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionSelectionDropDown.java
deleted file mode 100644
index b5af7b6de..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionSelectionDropDown.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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.tm.internal.terminal.actions;
-
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.ActionContributionItem;
-import org.eclipse.jface.action.IMenuCreator;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.tm.internal.terminal.view.ITerminalViewConnection;
-import org.eclipse.tm.internal.terminal.view.ITerminalViewConnectionManager;
-import org.eclipse.tm.internal.terminal.view.ImageConsts;
-import org.eclipse.tm.internal.terminal.view.TerminalViewPlugin;
-import org.eclipse.tm.internal.terminal.view.ITerminalViewConnectionManager.ITerminalViewConnectionListener;
-
-/**
- * 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/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionSettings.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionSettings.java
deleted file mode 100644
index 9436abbb1..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionSettings.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 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.tm.internal.terminal.actions;
-
-import org.eclipse.tm.internal.terminal.view.ITerminalView;
-import org.eclipse.tm.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/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionToggleCommandInputField.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionToggleCommandInputField.java
deleted file mode 100644
index 17a29b17d..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/actions/TerminalActionToggleCommandInputField.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tm.internal.terminal.actions;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.tm.internal.terminal.view.ITerminalView;
-import org.eclipse.tm.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/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ITerminalView.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ITerminalView.java
deleted file mode 100644
index 7fa9d2029..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ITerminalView.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * 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
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.view;
-
-public interface ITerminalView {
-
- /**
- * Create a new terminal connection within the view.
- */
- void onTerminalNewTerminal();
- /**
- * 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/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ITerminalViewConnection.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ITerminalViewConnection.java
deleted file mode 100644
index cc1423a8a..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ITerminalViewConnection.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Michael Scharf (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.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);
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ITerminalViewConnectionManager.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ITerminalViewConnectionManager.java
deleted file mode 100644
index 12348480d..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ITerminalViewConnectionManager.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Michael Scharf (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.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:
- * <ul>
- * <li> a connection is added or removed
- * <li> the active connection has changed
- * </ul>
- *
- */
- interface ITerminalViewConnectionListener {
- void connectionsChanged();
- }
- /**
- * Used to create instances of the ITerminalViewConnection
- * when the state is read from the {@link ISettingsStore}
- *
- */
- 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/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ImageConsts.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ImageConsts.java
deleted file mode 100644
index 41cc51f16..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ImageConsts.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * 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.tm.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/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/PageBook.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/PageBook.java
deleted file mode 100644
index 6b6532364..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/PageBook.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Michael Scharf (Wind River) - simplified implementation
- *******************************************************************************/
-package org.eclipse.tm.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/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/SettingStorePrefixDecorator.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/SettingStorePrefixDecorator.java
deleted file mode 100644
index 0d7ccfad4..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/SettingStorePrefixDecorator.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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.tm.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/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/SettingsStore.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/SettingsStore.java
deleted file mode 100644
index f74f4a24b..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/SettingsStore.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Michael Scharf (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.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
- */
-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 (int i = 0; i < keyNames.length; i++) {
- String key=keyNames[i];
- 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]));
- }
- }
- }
- }
- }
-
- public String get(String key) {
- return get(key,null);
- }
- public String get(String key, String defaultValue) {
- String value = (String) fMap.get(key);
- if ((value == null) || (value.equals(""))) //$NON-NLS-1$
- return defaultValue;
-
- return value;
- }
-
- 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=(String[]) 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], (String) 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/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalPreferenceInitializer.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalPreferenceInitializer.java
deleted file mode 100644
index b1f721e63..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalPreferenceInitializer.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.view;
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-
-public class TerminalPreferenceInitializer extends AbstractPreferenceInitializer {
-
- public TerminalPreferenceInitializer() {
- }
-
- public void initializeDefaultPreferences() {
- Preferences store = TerminalViewPlugin.getDefault().getPluginPreferences();
- store.setDefault(TerminalPreferencePage.PREF_LIMITOUTPUT, TerminalPreferencePage.DEFAULT_LIMITOUTPUT);
- store.setDefault(TerminalPreferencePage.PREF_INVERT_COLORS, TerminalPreferencePage.DEFAULT_INVERT_COLORS);
- store.setDefault(TerminalPreferencePage.PREF_BUFFERLINES, TerminalPreferencePage.DEFAULT_BUFFERLINES);
- store.setDefault(TerminalPreferencePage.PREF_TIMEOUT_SERIAL, TerminalPreferencePage.DEFAULT_TIMEOUT_SERIAL);
- store.setDefault(TerminalPreferencePage.PREF_TIMEOUT_NETWORK, TerminalPreferencePage.DEFAULT_TIMEOUT_NETWORK);
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalPreferencePage.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalPreferencePage.java
deleted file mode 100644
index c8e142bd2..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalPreferencePage.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 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.tm.internal.terminal.view;
-
-import org.eclipse.jface.preference.BooleanFieldEditor;
-import org.eclipse.jface.preference.FieldEditorPreferencePage;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.IntegerFieldEditor;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-
-public class TerminalPreferencePage extends FieldEditorPreferencePage implements
- IWorkbenchPreferencePage {
- public static final String PREF_LIMITOUTPUT = "TerminalPrefLimitOutput"; //$NON-NLS-1$
- public static final String PREF_BUFFERLINES = "TerminalPrefBufferLines"; //$NON-NLS-1$
- public static final String PREF_TIMEOUT_SERIAL = "TerminalPrefTimeoutSerial"; //$NON-NLS-1$
- public static final String PREF_TIMEOUT_NETWORK = "TerminalPrefTimeoutNetwork"; //$NON-NLS-1$
- public static final String PREF_INVERT_COLORS = "TerminalPrefInvertColors"; //$NON-NLS-1$
- public static final boolean DEFAULT_LIMITOUTPUT = true;
- public static final int DEFAULT_BUFFERLINES = 1000;
- public static final int DEFAULT_TIMEOUT_SERIAL = 5;
- public static final int DEFAULT_TIMEOUT_NETWORK = 5;
- public static final boolean DEFAULT_INVERT_COLORS = false;
-
-
- protected BooleanFieldEditor fInvertColors;
-
- protected IntegerFieldEditor fEditorBufferSize;
-
- protected IntegerFieldEditor fEditorSerialTimeout;
-
- protected IntegerFieldEditor fEditorNetworkTimeout;
- public TerminalPreferencePage() {
- super(GRID);
- }
- protected void createFieldEditors() {
- setupPage();
- }
- public void init(IWorkbench workbench) {
- // do nothing
- }
- protected void setupPage() {
- setupData();
- setupEditors();
- }
- protected void setupData() {
- TerminalViewPlugin plugin;
- IPreferenceStore preferenceStore;
-
- plugin = TerminalViewPlugin.getDefault();
- preferenceStore = plugin.getPreferenceStore();
- setPreferenceStore(preferenceStore);
- }
- protected void setupEditors() {
- fInvertColors = new BooleanFieldEditor(
- PREF_INVERT_COLORS, ViewMessages.INVERT_COLORS,
- getFieldEditorParent());
- fEditorBufferSize = new IntegerFieldEditor(PREF_BUFFERLINES,
- ViewMessages.BUFFERLINES, getFieldEditorParent());
- fEditorSerialTimeout = new IntegerFieldEditor(
- PREF_TIMEOUT_SERIAL, ViewMessages.SERIALTIMEOUT,
- getFieldEditorParent());
- fEditorNetworkTimeout = new IntegerFieldEditor(
- PREF_TIMEOUT_NETWORK, ViewMessages.NETWORKTIMEOUT,
- getFieldEditorParent());
-
- fEditorBufferSize.setValidRange(0, Integer.MAX_VALUE);
- fEditorSerialTimeout.setValidRange(0, Integer.MAX_VALUE);
- fEditorNetworkTimeout.setValidRange(0, Integer.MAX_VALUE);
-
- addField(fInvertColors);
- addField(fEditorBufferSize);
- addField(fEditorSerialTimeout);
- addField(fEditorNetworkTimeout);
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalSettingsDlg.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalSettingsDlg.java
deleted file mode 100644
index b934cea50..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalSettingsDlg.java
+++ /dev/null
@@ -1,334 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2009 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
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.view;
-
-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;
-
-class TerminalSettingsDlg extends Dialog {
- 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;
-
- public TerminalSettingsDlg(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;
- }
- 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(){
- 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();
- }
- public void loadSettings() {}
- public void saveSettings() {}
- public boolean validateSettings() {return false;}
- };
- } 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];
-
- }
- 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 <code>Shell</code> 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));
- }
-
- protected void okPressed() {
- if (!validateSettings()) {
- String strTitle = ViewMessages.TERMINALSETTINGS;
- MessageBox mb = new MessageBox(getShell(), SWT.ICON_ERROR | SWT.OK);
- mb.setText(strTitle);
- mb.setMessage(ViewMessages.INVALID_SETTINGS);
- mb.open();
- return;
- }
- if(fSelectedConnector>=0) {
- getPage(fSelectedConnector).saveSettings();
- }
- fTerminalTitle=fTerminalTitleText.getText();
- super.okPressed();
- }
- protected void cancelPressed() {
- fSelectedConnector=-1;
- super.cancelPressed();
- }
- public int open() {
- setShellStyle(getShellStyle() | SWT.RESIZE);
- return super.open();
- }
- protected void configureShell(Shell newShell) {
- super.configureShell(newShell);
-
- newShell.setText(fTitle);
- }
- protected Control createDialogArea(Composite parent) {
- Composite ctlComposite = (Composite) super.createDialogArea(parent);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(ctlComposite, TerminalViewPlugin.HELPPREFIX + "terminal_settings"); //$NON-NLS-1$
-
- setupPanel(ctlComposite);
- setupListeners();
- initFields();
-
- return ctlComposite;
- }
- public void create() {
- super.create();
- // initialize the OK button after creating the all dialog elements
- updateOKButton();
- }
- private void initFields() {
- // Load controls
- for (int i = 0; i < fConnectors.length; i++) {
- fCtlConnTypeCombo.add(fConnectors[i].getName());
- }
- int selectedConnector=getInitialConnector();
- if(selectedConnector>=0) {
- fCtlConnTypeCombo.select(selectedConnector);
- selectPage(selectedConnector);
- }
- }
- /**
- * @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.tm.internal.terminal.telnet.TelnetConnector".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(Composite wndParent) {
- setupSettingsTypePanel(wndParent);
- if(fConnectors.length>0) {
- setupConnTypePanel(wndParent);
- setupSettingsGroup(wndParent);
- }
- }
- private void setupSettingsTypePanel(Composite wndParent) {
- Group wndGroup;
- GridLayout gridLayout;
-
- wndGroup = new Group(wndParent, SWT.NONE);
- gridLayout = new GridLayout(2, false);
- wndGroup.setLayout(gridLayout);
- wndGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- wndGroup.setText(ViewMessages.VIEW_SETTINGS);
-
-
- Label label=new Label(wndGroup,SWT.NONE);
- label.setText(ViewMessages.VIEW_TITLE);
- label.setLayoutData(new GridData(GridData.BEGINNING));
-
- fTerminalTitleText = new Text(wndGroup, SWT.BORDER);
- fTerminalTitleText.setText(fTerminalTitle);
- fTerminalTitleText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- }
- 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(ViewMessages.SETTINGS + ":"); //$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)
- return;
- fCtlConnTypeCombo.addSelectionListener(new SelectionAdapter() {
- 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]]);
- 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);
- }
- }
- 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;
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalView.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalView.java
deleted file mode 100644
index 0ab125ae1..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalView.java
+++ /dev/null
@@ -1,722 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2009 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
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.view;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.runtime.Preferences;
-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.swt.SWT;
-import org.eclipse.swt.events.MenuEvent;
-import org.eclipse.swt.events.MenuListener;
-import org.eclipse.swt.graphics.Font;
-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.actions.TerminalAction;
-import org.eclipse.tm.internal.terminal.actions.TerminalActionConnect;
-import org.eclipse.tm.internal.terminal.actions.TerminalActionDisconnect;
-import org.eclipse.tm.internal.terminal.actions.TerminalActionNewTerminal;
-import org.eclipse.tm.internal.terminal.actions.TerminalActionRemove;
-import org.eclipse.tm.internal.terminal.actions.TerminalActionSelectionDropDown;
-import org.eclipse.tm.internal.terminal.actions.TerminalActionSettings;
-import org.eclipse.tm.internal.terminal.actions.TerminalActionToggleCommandInputField;
-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.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.Logger;
-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.tm.internal.terminal.view.ITerminalViewConnectionManager.ITerminalViewConnectionFactory;
-import org.eclipse.tm.internal.terminal.view.ITerminalViewConnectionManager.ITerminalViewConnectionListener;
-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 = "terminal.views.view.font.definition"; //$NON-NLS-1$
-
- 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();
- /**
- * Listens to changes in the preferences
- */
- private final IPropertyChangeListener fPreferenceListener=new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- if(event.getProperty().equals(TerminalPreferencePage.PREF_LIMITOUTPUT)
- || event.getProperty().equals(TerminalPreferencePage.PREF_BUFFERLINES)
- || event.getProperty().equals(TerminalPreferencePage.PREF_INVERT_COLORS)) {
- updatePreferences();
- }
- }
- };
-
- 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;
- }
- public void setState(final TerminalState state) {
- runInDisplayThread(new Runnable() {
- public void run() {
- fConnection.setState(state);
- // if the active connection changes, update the view
- if(fConnection==fMultiConnectionManager.getActiveConnection()) {
- updateStatus();
- }
- }
- });
- }
- public void setTerminalTitle(final String title) {
- runInDisplayThread(new Runnable() {
- 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() {
- Logger
- .log("==============================================================="); //$NON-NLS-1$
- 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 (int i = 0; i < pages.length; i++) {
- IViewReference[] views = pages[i].getViewReferences();
- for (int j = 0; j < views.length; j++) {
- IViewReference view = views[j];
- // 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$
- }
- }
- /**
- * Update the text limits from the preferences
- */
- private void updatePreferences() {
- Preferences preferences = TerminalViewPlugin.getDefault().getPluginPreferences();
-// boolean limitOutput = preferences.getBoolean(TerminalPreferencePage.PREF_LIMITOUTPUT);
-// if(!limitOutput)
-// bufferLineLimit=-1;
- int bufferLineLimit = preferences.getInt(TerminalPreferencePage.PREF_BUFFERLINES);
- boolean invert=preferences.getBoolean(TerminalPreferencePage.PREF_INVERT_COLORS);
- // update the preferences for all controls
- ITerminalViewConnection[] conn=fMultiConnectionManager.getConnections();
- for (int i = 0; i < conn.length; i++) {
- conn[i].getCtlTerminal().setBufferLineLimit(bufferLineLimit);
- conn[i].getCtlTerminal().setInvertedColors(invert);
- }
- }
- /**
- * Display a new Terminal view. This method is called when the user clicks the New
- * Terminal button in any Terminal view's toolbar.
- */
- public void onTerminalNewTerminal() {
- Logger.log("creating new Terminal instance."); //$NON-NLS-1$
- setupControls();
- if(newConnection(ViewMessages.NEW_TERMINAL_CONNECTION)==null) {
- fMultiConnectionManager.removeActive();
- }
- }
-
- 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) {
- Logger.logException(ex);
- }
- }
-
-
- public void onTerminalConnect() {
- //if (isConnected())
- if (fCtlTerminal.getState()!=TerminalState.CLOSED)
- return;
- if(fCtlTerminal.getTerminalConnector()==null)
- setConnector(showSettingsDialog(ViewMessages.TERMINALSETTINGS));
- fCtlTerminal.connectTerminal();
- }
-
- public void updateStatus() {
- updateTerminalConnect();
- updateTerminalDisconnect();
- updateTerminalSettings();
- fActionToggleCommandInputField.setChecked(hasCommandInputField());
- 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;
- }
-
- public void onTerminalDisconnect() {
- fCtlTerminal.disconnectTerminal();
- }
-
- public void updateTerminalDisconnect() {
- boolean bEnabled = ((isConnecting()) || (fCtlTerminal.isConnected()));
- fActionTerminalDisconnect.setEnabled(bEnabled);
- }
-
- 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();
- TerminalSettingsDlg dlgTerminalSettings = new TerminalSettingsDlg(getViewSite().getShell(),connectors,c);
- dlgTerminalSettings.setTerminalTitle(getActiveConnection().getPartName());
- if(title!=null)
- dlgTerminalSettings.setTitle(title);
- Logger.log("opening Settings dialog."); //$NON-NLS-1$
-
- if (dlgTerminalSettings.open() == Window.CANCEL) {
- Logger.log("Settings dialog cancelled."); //$NON-NLS-1$
- return null;
- }
-
- Logger.log("Settings dialog OK'ed."); //$NON-NLS-1$
-
- // 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());
- return dlgTerminalSettings.getConnector();
- }
-
- 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());
- }
-
- public void onTerminalFontChanged() {
- // set the font for all
- Font font=JFaceResources.getFont(FONT_DEFINITION);
- ITerminalViewConnection[] conn=fMultiConnectionManager.getConnections();
- for (int i = 0; i < conn.length; i++) {
- conn[i].getCtlTerminal().setFont(font);
- }
- }
-
- // ViewPart interface
-
- 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() {
- 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 (int i = 0; i < conn.length; i++) {
- setupContextMenus(conn[i].getCtlTerminal().getControl());
- }
- setupListeners(wndParent);
-
- PlatformUI.getWorkbench().getHelpSystem().setHelp(wndParent, TerminalViewPlugin.HELPPREFIX + "terminal_page"); //$NON-NLS-1$
-
- legacyLoadState();
- legacySetTitle();
- // make sure we take the values defined in the preferences
- updatePreferences();
-
- refresh();
- onTerminalFontChanged();
-
- }
-
- public void dispose() {
- Logger.log("entered."); //$NON-NLS-1$
-
- TerminalViewPlugin.getDefault().getPreferenceStore().removePropertyChangeListener(fPreferenceListener);
-
- JFaceResources.getFontRegistry().removeListener(fPropertyChangeHandler);
-
- // dispose all connections
- ITerminalViewConnection[] conn=fMultiConnectionManager.getConnections();
- for (int i = 0; i < conn.length; i++) {
- conn[i].getCtlTerminal().disposeTerminal();
- }
- super.dispose();
- }
- /**
- * Passing the focus request to the viewer's control.
- */
- 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());
- // make sure we take the values defined in the preferences
- updatePreferences();
- }
-
- private ITerminalViewConnection makeViewConnection() {
- ITerminalConnector[] connectors = makeConnectors();
- TerminalListener listener=new TerminalListener();
- ITerminalViewControl ctrl = TerminalViewControlFactory.makeControl(listener, fPageBook, connectors);
- 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);
-
- TerminalViewPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(fPreferenceListener);
-
- 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 (int i = 0; i < connectors.length; i++) {
- connectors[i].load(getStore(store,connectors[i]));
- if(connectors[i].getId().equals(connectionType))
- connector=connectors[i];
- }
- 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());
- }
-
- }
- public void init(IViewSite site, IMemento memento) throws PartInitException {
- super.init(site, memento);
- fStore=new SettingsStore(memento);
- }
- 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(fActionTerminalScrollLock);
- toolBarMgr.add(fActionTerminalConnect);
- toolBarMgr.add(fActionTerminalDisconnect);
- toolBarMgr.add(fActionTerminalSettings);
- toolBarMgr.add(fActionToggleCommandInputField);
- 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 {
- public void menuHidden(MenuEvent event) {
- fMenuAboutToShow = false;
- fActionEditCopy.updateAction(fMenuAboutToShow);
- }
-
- public void menuShown(MenuEvent e) {
- //
- }
- 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 {
- public void propertyChange(PropertyChangeEvent event) {
- if (event.getProperty().equals(FONT_DEFINITION)) {
- onTerminalFontChanged();
- }
- }
- }
-
- public boolean hasCommandInputField() {
- return getActiveConnection().hasCommandInputField();
- }
-
- public void setCommandInputField(boolean on) {
- getActiveConnection().setCommandInputField(on);
- }
-
- public boolean isScrollLock() {
- return fCtlTerminal.isScrollLock();
- }
-
- 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);
- }
- 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/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalViewConnection.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalViewConnection.java
deleted file mode 100644
index f919cf1fa..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalViewConnection.java
+++ /dev/null
@@ -1,203 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-/**
- *
- */
-package org.eclipse.tm.internal.terminal.view;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-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.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$
-
- final private ITerminalViewControl fCtlTerminal;
- private String fTitle;
- private String fSummary;
- private String fHistory;
- private CommandInputFieldWithHistory fCommandInputField;
- private String fPartName;
-
- public TerminalViewConnection(ITerminalViewControl ctl) {
- fCtlTerminal = ctl;
- fCtlTerminal.getControl().addMouseListener(new MouseAdapter(){
- public void mouseUp(MouseEvent e) {
- // paste when the middle button is clicked
- if(e.button==2) // middle button
- fCtlTerminal.paste();
- }});
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.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.tm.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);
-
- // 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);
- 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();
- //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$
- }
- strTitle = name + "("+ summary + strConnected + ")"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- 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;
-
- }
-
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalViewConnectionManager.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalViewConnectionManager.java
deleted file mode 100644
index 88af3056b..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalViewConnectionManager.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Michael Scharf (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.view;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-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();
-
- public ITerminalViewConnection[] getConnections() {
- return (ITerminalViewConnection[]) fConnections.toArray(new ITerminalViewConnection[fConnections.size()]);
- }
-
- public int size() { // TODO Auto-generated method stub
- return fConnections.size();
- }
-
- public ITerminalViewConnection getActiveConnection() {
- return fActiveConnection;
- }
- 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();
- }
-
- 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 (Iterator iterator = fConnectionHistory.iterator(); iterator.hasNext();) {
- ITerminalViewConnection conn = (ITerminalViewConnection) iterator.next();
- if(conn!=fActiveConnection) {
- return conn;
- }
- }
- return null;
- }
-
- public void addConnection(ITerminalViewConnection conn) {
- fConnections.add(conn);
- fireListeners();
- }
- public void removeConnection(ITerminalViewConnection conn) {
- fConnections.remove(conn);
- fConnectionHistory.remove(conn);
- fireListeners();
- }
-
- public void addListener(ITerminalViewConnectionListener listener) {
- fListeners.add(listener);
- }
-
- public void removeListener(ITerminalViewConnectionListener listener) {
- fListeners.remove(listener);
- }
- protected void fireListeners() {
- ITerminalViewConnectionListener[] listeners=(ITerminalViewConnectionListener[]) fListeners.toArray(new ITerminalViewConnectionListener[fListeners.size()]);
- for (int i = 0; i < listeners.length; i++) {
- listeners[i].connectionsChanged();
- }
- }
-
- public void saveState(ISettingsStore store) {
- store.put(STORE_SIZE,""+fConnections.size()); //$NON-NLS-1$
- // save all connections
- int n=0;
- for (Iterator iterator = fConnections.iterator(); iterator.hasNext();) {
- ITerminalViewConnection connection = (ITerminalViewConnection) iterator.next();
- // 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));
- }
- }
-
- 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
- ));
- }
- }
- }
- }
-
- 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=(ITerminalViewConnection) fConnections.get(0);
-
- fireListeners();
- }
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalViewControlDecorator.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalViewControlDecorator.java
deleted file mode 100644
index dff2b367c..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalViewControlDecorator.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Michael Scharf (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.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 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/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalViewPlugin.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalViewPlugin.java
deleted file mode 100644
index 64938276d..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/TerminalViewPlugin.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * 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.tm.internal.terminal.view;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.tm.internal.terminal.provisional.api.Logger;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-
-public class TerminalViewPlugin extends AbstractUIPlugin {
- protected static TerminalViewPlugin fDefault;
-
- public static final String HELPPREFIX = "org.eclipse.tm.terminal.view."; //$NON-NLS-1$
-
- /**
- * The constructor.
- */
- public TerminalViewPlugin() {
- fDefault = this;
- }
- protected void initializeImageRegistry(ImageRegistry imageRegistry) {
- HashMap map;
-
- 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;
- }
-
- public static boolean isLogInfoEnabled() {
- return isOptionEnabled(Logger.TRACE_DEBUG_LOG_INFO);
- }
- public static boolean isLogErrorEnabled() {
- return isOptionEnabled(Logger.TRACE_DEBUG_LOG_ERROR);
- }
- public static boolean isLogEnabled() {
- return isOptionEnabled(Logger.TRACE_DEBUG_LOG);
- }
-
- public static boolean isOptionEnabled(String strOption) {
- String strEnabled;
- Boolean boolEnabled;
- boolean bEnabled;
-
- strEnabled = Platform.getDebugOption(strOption);
- if (strEnabled == null)
- return false;
-
- boolEnabled = new Boolean(strEnabled);
- bEnabled = boolEnabled.booleanValue();
-
- return bEnabled;
- }
- protected void loadImageRegistry(ImageRegistry imageRegistry,
- String strDir, HashMap map) throws MalformedURLException {
- URL url;
- ImageDescriptor imageDescriptor;
- Iterator keys;
- String strKey;
- String strFile;
-
- keys = map.keySet().iterator();
-
- while (keys.hasNext()) {
- strKey = (String) keys.next();
- strFile = (String) map.get(strKey);
-
- if (strFile != null) {
- url = TerminalViewPlugin.getDefault().getBundle().getEntry(
- ImageConsts.IMAGE_DIR_ROOT + strDir + strFile);
- imageDescriptor = ImageDescriptor.createFromURL(url);
- imageRegistry.put(strKey, imageDescriptor);
- }
- }
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ViewMessages.java b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ViewMessages.java
deleted file mode 100644
index 2e1beb1e5..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ViewMessages.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2009 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
- *******************************************************************************/
-package org.eclipse.tm.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 INVERT_COLORS;
- public static String BUFFERLINES;
- public static String SERIALTIMEOUT;
- public static String NETWORKTIMEOUT;
-
- 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;
-
-}
diff --git a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ViewMessages.properties b/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ViewMessages.properties
deleted file mode 100644
index e7a350c16..000000000
--- a/terminal/org.eclipse.tm.terminal.view/src/org/eclipse/tm/internal/terminal/view/ViewMessages.properties
+++ /dev/null
@@ -1,42 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2009 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
-###############################################################################
-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.
-
-INVERT_COLORS = Invert terminal colors
-BUFFERLINES = Terminal buffer lines:
-SERIALTIMEOUT = Serial timeout (seconds):
-NETWORKTIMEOUT = Network timeout (seconds):
-
-STATE_CONNECTED = CONNECTED
-STATE_CONNECTING = CONNECTING...
-STATE_CLOSED = CLOSED
-
-CANNOT_INITIALIZE = Cannot initialize {0}:\n{1}
-CONNECTOR_NOT_AVAILABLE = Connector {0} not available!
diff --git a/terminal/org.eclipse.tm.terminal.view/toc.xml b/terminal/org.eclipse.tm.terminal.view/toc.xml
deleted file mode 100644
index 4409655e2..000000000
--- a/terminal/org.eclipse.tm.terminal.view/toc.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<?NLS TYPE="org.eclipse.help.toc"?>
-<!--
-Copyright (c) 2006, 2008 Wind River Systems, Inc.
-All rights reserved. This program and the accompanying materials
-are made available under the terms of the Eclipse Public License v1.0
-which accompanies this distribution, and is available at
-http://www.eclipse.org/legal/epl-v10.html
-
-Contributors:
-Martin Oberhuber (Wind River) - initial API and implementation
--->
-<toc link_to="../org.eclipse.rse.doc.user/toc.xml#rse_user_extensions"
- label="Terminal View">
- <topic label="Terminal View" href="doc/html/01_terminalview.html">
- <topic label="Terminal View Quick Reference" href="doc/html/02_terminal_page.html" />
- <topic label="Terminal Settings Page" href="doc/html/03_terminal_settings.html" />
- <topic label="Terminal Emulation" href="doc/html/04_terminal_emulation.html" />
- <topic label="Legal Notice" href="doc/html/notice.html" />
- </topic>
-</toc> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal/.classpath b/terminal/org.eclipse.tm.terminal/.classpath
deleted file mode 100644
index 73022aacf..000000000
--- a/terminal/org.eclipse.tm.terminal/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src/"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/CDC-1.1%Foundation-1.1"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/terminal/org.eclipse.tm.terminal/.cvsignore b/terminal/org.eclipse.tm.terminal/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/terminal/org.eclipse.tm.terminal/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/terminal/org.eclipse.tm.terminal/.options b/terminal/org.eclipse.tm.terminal/.options
deleted file mode 100644
index 7e0cf7ac0..000000000
--- a/terminal/org.eclipse.tm.terminal/.options
+++ /dev/null
@@ -1,8 +0,0 @@
-org.eclipse.tm.terminal/debug/log/directory = /tmp/
-org.eclipse.tm.terminal/debug/log = true
-org.eclipse.tm.terminal/debug/log/error = true
-org.eclipse.tm.terminal/debug/log/info = false
-org.eclipse.tm.terminal/debug/log/char = false
-org.eclipse.tm.terminal/debug/log/buffer/size = false
-org.eclipse.tm.terminal/debug/log/VT100Backend = false
-org.eclipse.tm.terminal/debug/use_old_implementation = false \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal/.project b/terminal/org.eclipse.tm.terminal/.project
deleted file mode 100644
index 79c78f782..000000000
--- a/terminal/org.eclipse.tm.terminal/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.tm.terminal</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/terminal/org.eclipse.tm.terminal/.settings/org.eclipse.jdt.core.prefs b/terminal/org.eclipse.tm.terminal/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 64e23de57..000000000
--- a/terminal/org.eclipse.tm.terminal/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,75 +0,0 @@
-#Fri Apr 11 02:37:35 CEST 2008
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-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=warning
-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.4
diff --git a/terminal/org.eclipse.tm.terminal/HelpContexts.xml b/terminal/org.eclipse.tm.terminal/HelpContexts.xml
deleted file mode 100644
index 761da6726..000000000
--- a/terminal/org.eclipse.tm.terminal/HelpContexts.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.contexts"?>
-<!--
-Copyright (c) 2008 Wind River Systems, Inc.
-All rights reserved. This program and the accompanying materials
-are made available under the terms of the Eclipse Public License v1.0
-which accompanies this distribution, and is available at
-http://www.eclipse.org/legal/epl-v10.html
-
-Contributors:
-Martin Oberhuber (Wind River) - initial API and implementation
--->
-<contexts>
- <context id="terminal_view">
- <description>The Terminal View supports direct connections to remote systems via serial or network connections.
- </description>
- </context>
-</contexts> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal/META-INF/MANIFEST.MF b/terminal/org.eclipse.tm.terminal/META-INF/MANIFEST.MF
deleted file mode 100644
index 432fbcec8..000000000
--- a/terminal/org.eclipse.tm.terminal/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,34 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tm.terminal; singleton:=true
-Bundle-Version: 3.0.1.qualifier
-Bundle-Activator: org.eclipse.tm.internal.terminal.control.impl.TerminalPlugin
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.ui
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
-Bundle-ClassPath: .
-Export-Package: org.eclipse.tm.internal.terminal.connector;x-friends:="org.eclipse.tm.terminal.test",
- org.eclipse.tm.internal.terminal.control;x-friends:="org.eclipse.tm.terminal.view",
- org.eclipse.tm.internal.terminal.control.actions;x-friends:="org.eclipse.tm.terminal.view",
- org.eclipse.tm.internal.terminal.control.impl;x-friends:="org.eclipse.tm.terminal.test",
- org.eclipse.tm.internal.terminal.emulator;x-friends:="org.eclipse.tm.terminal.test",
- org.eclipse.tm.internal.terminal.model;x-friends:="org.eclipse.tm.terminal.test",
- org.eclipse.tm.internal.terminal.provisional.api;
- x-friends:="org.eclipse.tm.terminal.serial,
- org.eclipse.tm.terminal.ssh,
- org.eclipse.tm.terminal.telnet,
- org.eclipse.tm.terminal.view,
- org.eclipse.tm.terminal.test",
- org.eclipse.tm.internal.terminal.provisional.api.provider;
- x-friends:="org.eclipse.tm.terminal.serial,
- org.eclipse.tm.terminal.ssh,
- org.eclipse.tm.terminal.telnet,
- org.eclipse.tm.terminal.test",
- org.eclipse.tm.internal.terminal.textcanvas;x-friends:="org.eclipse.tm.terminal.test",
- org.eclipse.tm.terminal.model
diff --git a/terminal/org.eclipse.tm.terminal/README.txt b/terminal/org.eclipse.tm.terminal/README.txt
deleted file mode 100644
index dc1cc117b..000000000
--- a/terminal/org.eclipse.tm.terminal/README.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-Terminal README
-===============
-
-The Terminal is a UI-less model of a grid of characters,
-plus an SWT widget that's updated asynchronously for
-maximum performance. The widget can be hooked up to various
-ITerminalConnectors providing an InputStream, OutputStream,
-and a method for setting the Terminal Size.
-
-The widget processes ANSI control characters, including NUL,
-backspace, carriage return, linefeed, and a subset of ANSI
-escape sequences sufficient to allow use of screen-oriented
-applications, such as vi, Emacs, and any GNU readline-enabled
-application (Bash, bc, ncftp, etc.).
-
-This is not yet a fully compliant vt100 / vt102 terminal
-emulator!
diff --git a/terminal/org.eclipse.tm.terminal/about.html b/terminal/org.eclipse.tm.terminal/about.html
deleted file mode 100644
index d4cc693f9..000000000
--- a/terminal/org.eclipse.tm.terminal/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2007</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal/about.ini b/terminal/org.eclipse.tm.terminal/about.ini
deleted file mode 100644
index fbbb9f83d..000000000
--- a/terminal/org.eclipse.tm.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=dsdp32.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/terminal/org.eclipse.tm.terminal/about.mappings b/terminal/org.eclipse.tm.terminal/about.mappings
deleted file mode 100644
index bddaab431..000000000
--- a/terminal/org.eclipse.tm.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/terminal/org.eclipse.tm.terminal/about.properties b/terminal/org.eclipse.tm.terminal/about.properties
deleted file mode 100644
index 43011de8e..000000000
--- a/terminal/org.eclipse.tm.terminal/about.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2009 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 Widget\n\
-\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-(c) Copyright Wind River Systems, Inc. and others 2003, 2009. All rights reserved.\n\
-Visit http://www.eclipse.org/dsdp/tm
diff --git a/terminal/org.eclipse.tm.terminal/build.properties b/terminal/org.eclipse.tm.terminal/build.properties
deleted file mode 100644
index d0e503c72..000000000
--- a/terminal/org.eclipse.tm.terminal/build.properties
+++ /dev/null
@@ -1,40 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2009 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) - added icons
-###############################################################################
-bin.includes = .,\
- META-INF/,\
- plugin.xml,\
- plugin.properties,\
- .options,\
- README.txt,\
- about.html,\
- about.ini,\
- about.mappings,\
- about.properties,\
- dsdp32.png,\
- icons/,\
- HelpContexts.xml
-
-source.. = src/
-output.. = bin/
-src.includes = schema/,\
- about.html,\
- .settings/,\
- build.properties
-javacSource=1.4
-javacTarget=1.4
-
diff --git a/terminal/org.eclipse.tm.terminal/dsdp32.png b/terminal/org.eclipse.tm.terminal/dsdp32.png
deleted file mode 100644
index 3077b1220..000000000
--- a/terminal/org.eclipse.tm.terminal/dsdp32.png
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal/icons/clcl16/clear_co.gif b/terminal/org.eclipse.tm.terminal/icons/clcl16/clear_co.gif
deleted file mode 100644
index af30a42f8..000000000
--- a/terminal/org.eclipse.tm.terminal/icons/clcl16/clear_co.gif
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal/icons/dlcl16/clear_co.gif b/terminal/org.eclipse.tm.terminal/icons/dlcl16/clear_co.gif
deleted file mode 100644
index 6775edfab..000000000
--- a/terminal/org.eclipse.tm.terminal/icons/dlcl16/clear_co.gif
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal/icons/elcl16/clear_co.gif b/terminal/org.eclipse.tm.terminal/icons/elcl16/clear_co.gif
deleted file mode 100644
index af30a42f8..000000000
--- a/terminal/org.eclipse.tm.terminal/icons/elcl16/clear_co.gif
+++ /dev/null
Binary files differ
diff --git a/terminal/org.eclipse.tm.terminal/plugin.properties b/terminal/org.eclipse.tm.terminal/plugin.properties
deleted file mode 100644
index e92da5781..000000000
--- a/terminal/org.eclipse.tm.terminal/plugin.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2009 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
-###############################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-
-pluginName = Target Management Terminal Widget
-providerName = Eclipse.org - DSDP
-
-terminal.context.name=Terminal widget context
-terminal.context.description=Override ALT+x menu access keys
-
-terminal.insertion.description=Terminal view insertion
-terminal.insertion.name=Terminal view insert
-terminal.insertion.category.name=Terminal view commands
diff --git a/terminal/org.eclipse.tm.terminal/plugin.xml b/terminal/org.eclipse.tm.terminal/plugin.xml
deleted file mode 100644
index 1a1a59ced..000000000
--- a/terminal/org.eclipse.tm.terminal/plugin.xml
+++ /dev/null
@@ -1,109 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<!--
-# Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Michael Scharf (Wind River) - initial API and implementation
-# Martin Oberhuber (Wind River) - fixed copyright headers and beautified
-# Michael Scharf (Wind River) - [237425] undefined tm.terminal command
--->
-<plugin>
- <extension-point id="terminalConnectors" name="Terminal Connectors" schema="schema/terminalConnectors.exsd"/>
- <extension point="org.eclipse.ui.contexts">
- <context
- name="%terminal.context.name"
- description="%terminal.context.description"
- id="org.eclipse.tm.terminal.TerminalContext"
- />
- </extension>
- <extension point="org.eclipse.help.contexts">
- <contexts file="HelpContexts.xml"/>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <!-- Dummy commands for bindings, see below -->
- <command
- categoryId="org.eclipse.tm.terminal.category1"
- id="org.eclipse.tm.terminal.command1"
- name="%terminal.insertion.name"/>
- <category
- description="%terminal.view.insertion.description"
- id="org.eclipse.tm.terminal.category1"
- name="%terminal.insertion.category.name"/>
- </extension>
- <extension
- point="org.eclipse.ui.bindings">
- <!--
- These keybindings are needed to disable the menu-activation keys (e.g.,
- Alt-F for the File menu, etc.). The code in method
- TerminalControl.TerminalFocusListener.focusGained() disables the Eclipse key
- binding service, but it doesn't disable the global menu-activation
- keys.
- -->
- <key
- commandId="org.eclipse.tm.terminal.command1"
- contextId="org.eclipse.tm.terminal.TerminalContext"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="Alt+A"/> <!-- Search -->
- <key
- commandId="org.eclipse.tm.terminal.command1"
- contextId="org.eclipse.tm.terminal.TerminalContext"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="Alt+E"/> <!-- Edit -->
- <key
- commandId="org.eclipse.tm.terminal.command1"
- contextId="org.eclipse.tm.terminal.TerminalContext"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="Alt+F"/> <!-- File -->
- <key
- commandId="org.eclipse.tm.terminal.command1"
- contextId="org.eclipse.tm.terminal.TerminalContext"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="Alt+G"/>
- <key
- commandId="org.eclipse.tm.terminal.command1"
- contextId="org.eclipse.tm.terminal.TerminalContext"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="Alt+H"/> <!-- Help -->
- <key
- commandId="org.eclipse.tm.terminal.command1"
- contextId="org.eclipse.tm.terminal.TerminalContext"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="Alt+N"/> <!-- Navigate -->
- <key
- commandId="org.eclipse.tm.terminal.command1"
- contextId="org.eclipse.tm.terminal.TerminalContext"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="Alt+P"/> <!-- Project -->
- <key
- commandId="org.eclipse.tm.terminal.command1"
- contextId="org.eclipse.tm.terminal.TerminalContext"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="Alt+R"/> <!-- Run -->
- <key
- commandId="org.eclipse.tm.terminal.command1"
- contextId="org.eclipse.tm.terminal.TerminalContext"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="Alt+S"/> <!-- Source -->
- <key
- commandId="org.eclipse.tm.terminal.command1"
- contextId="org.eclipse.tm.terminal.TerminalContext"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="Alt+T"/> <!-- Refactor -->
- <key
- commandId="org.eclipse.tm.terminal.command1"
- contextId="org.eclipse.tm.terminal.TerminalContext"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="Alt+V"/> <!-- CVS -->
- <key
- commandId="org.eclipse.tm.terminal.command1"
- contextId="org.eclipse.tm.terminal.TerminalContext"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="Alt+W"/> <!-- Window -->
- </extension>
-</plugin>
diff --git a/terminal/org.eclipse.tm.terminal/schema/terminalConnectors.exsd b/terminal/org.eclipse.tm.terminal/schema/terminalConnectors.exsd
deleted file mode 100644
index b503ea544..000000000
--- a/terminal/org.eclipse.tm.terminal/schema/terminalConnectors.exsd
+++ /dev/null
@@ -1,111 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.tm.terminal" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.tm.terminal" id="terminalConnectors" name="Terminal Connectors"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appInfo>
- <meta.element />
- </appInfo>
- </annotation>
- <complexType>
- <sequence minOccurs="1" maxOccurs="unbounded">
- <element ref="connector"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="connector">
- <complexType>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- A class extending TerminalConnectorImpl
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl:"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- Uniquely identify this connector for programmatic access. Clients will use this ID in order to find and instantiate it.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- The name of the connection (used in the UI)
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="hidden" type="boolean" use="default" value="false">
- <annotation>
- <documentation>
- When set to &quot;true&quot;, the terminal connector will not be visible to the user in connector selections.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
-
-
-
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2006, 2009 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) - fixed copyright headers and beautified
-Uwe Stieber (Wind River) - [282996] [terminal][api] Add &quot;hidden&quot; attribute to terminal connector extension point
- </documentation>
- </annotation>
-
-</schema>
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/connector/TerminalConnector.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/connector/TerminalConnector.java
deleted file mode 100644
index 86ebca265..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/connector/TerminalConnector.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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) - [200541] Extract from TerminalConnectorExtension.TerminalConnectorProxy
- * Martin Oberhuber (Wind River) - [225853][api] Provide more default functionality in TerminalConnectorImpl
- * Uwe Stieber (Wind River) - [282996] [terminal][api] Add "hidden" attribute to terminal connector extension point
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.connector;
-
-import java.io.OutputStream;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.tm.internal.terminal.control.impl.TerminalMessages;
-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.ITerminalConnector;
-import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl;
-import org.eclipse.tm.internal.terminal.provisional.api.Logger;
-import org.eclipse.tm.internal.terminal.provisional.api.TerminalConnectorExtension;
-import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
-import org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl;
-
-/**
- * An {@link ITerminalConnector} instance, also known as terminal connection
- * type, for maintaining a single terminal connection.
- *
- * It provides all terminal connector functions that can be provided by static
- * markup without loading the actual implementation class. The actual
- * {@link TerminalConnectorImpl} implementation class is lazily loaded by the
- * provided {@link TerminalConnector.Factory} interface when needed. class, and
- * delegates to the actual implementation when needed. The following methods can
- * be called without initializing the contributed implementation class:
- * {@link #getId()}, {@link #getName()}, {@link #getSettingsSummary()},{@link #load(ISettingsStore)},
- * {@link #setTerminalSize(int, int)}, {@link #save(ISettingsStore)},
- * {@link #getAdapter(Class)}
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- * Clients can get terminal connector instances through the
- * {@link TerminalConnectorExtension} class.
- * @since org.eclipse.tm.terminal 2.0
- */
-public class TerminalConnector implements ITerminalConnector {
- /**
- * Creates an instance of TerminalConnectorImpl. This is used to lazily load
- * classed defined in extensions.
- *
- * @since org.eclipse.tm.terminal 2.0
- */
- public interface Factory {
- /**
- * Factory method to create the actual terminal connector implementation
- * when needed.
- *
- * @return a Connector
- * @throws Exception
- */
- TerminalConnectorImpl makeConnector() throws Exception;
- }
- /**
- * The factory for creating impl instances.
- */
- private final TerminalConnector.Factory fTerminalConnectorFactory;
- /**
- * The (display) name of the TerminalConnector
- */
- private final String fName;
- /**
- * The unique id the connector
- */
- private final String fId;
- /**
- * Flag to mark the connector as hidden.
- */
- private final boolean fHidden;
- /**
- * The connector
- */
- private TerminalConnectorImpl fConnector;
- /**
- * If the initialization of the class specified in the extension fails,
- * this variable contains the error
- */
- private Exception fException;
- /**
- * The store might be set before the real connector is initialized.
- * This keeps the value until the connector is created.
- */
- private ISettingsStore fStore;
- /**
- * Constructor for the terminal connector.
- *
- * @param terminalConnectorFactory Factory for lazily instantiating the
- * TerminalConnectorImpl when needed.
- * @param id terminal connector ID. The connector is publicly known under
- * this ID.
- * @param name translatable name to display the connector in the UI.
- */
- public TerminalConnector(TerminalConnector.Factory terminalConnectorFactory, String id, String name, boolean hidden) {
- fTerminalConnectorFactory = terminalConnectorFactory;
- fId = id;
- fName = name;
- fHidden = hidden;
- }
- public String getInitializationErrorMessage() {
- getConnectorImpl();
- if(fException!=null)
- return fException.getLocalizedMessage();
- return null;
- }
- public String getId() {
- return fId;
- }
- public String getName() {
- return fName;
- }
- public boolean isHidden() {
- return fHidden;
- }
- private TerminalConnectorImpl getConnectorImpl() {
- if(!isInitialized()) {
- try {
- fConnector=fTerminalConnectorFactory.makeConnector();
- fConnector.initialize();
- } catch (Exception e) {
- fException=e;
- fConnector=new TerminalConnectorImpl(){
- public void connect(ITerminalControl control) {
- // super.connect(control);
- control.setState(TerminalState.CLOSED);
- control.setMsg(getInitializationErrorMessage());
- }
- public OutputStream getTerminalToRemoteStream() {
- return null;
- }
- public String getSettingsSummary() {
- return null;
- }};
- // that's the place where we log the exception
- Logger.logException(e);
- }
- if(fConnector!=null && fStore!=null)
- fConnector.load(fStore);
- }
- return fConnector;
- }
-
- public boolean isInitialized() {
- return fConnector!=null || fException!=null;
- }
- public void connect(ITerminalControl control) {
- getConnectorImpl().connect(control);
- }
- public void disconnect() {
- getConnectorImpl().disconnect();
- }
- public OutputStream getTerminalToRemoteStream() {
- return getConnectorImpl().getTerminalToRemoteStream();
- }
- public String getSettingsSummary() {
- if(fConnector!=null)
- return getConnectorImpl().getSettingsSummary();
- else
- return TerminalMessages.NotInitialized;
- }
- public boolean isLocalEcho() {
- return getConnectorImpl().isLocalEcho();
- }
- public void load(ISettingsStore store) {
- if(fConnector==null) {
- fStore=store;
- } else {
- getConnectorImpl().load(store);
- }
- }
- public ISettingsPage makeSettingsPage() {
- return getConnectorImpl().makeSettingsPage();
- }
- public void save(ISettingsStore store) {
- // no need to save the settings: it cannot have changed
- // because we are not initialized....
- if(fConnector!=null)
- getConnectorImpl().save(store);
- }
- public void setTerminalSize(int newWidth, int newHeight) {
- // we assume that setTerminalSize is called also after
- // the terminal has been initialized. Else we would have to cache
- // the values....
- if(fConnector!=null) {
- fConnector.setTerminalSize(newWidth, newHeight);
- }
- }
- public Object getAdapter(Class adapter) {
- TerminalConnectorImpl connector=null;
- if(isInitialized())
- connector=getConnectorImpl();
- // if we cannot create the connector then we cannot adapt...
- if(connector!=null) {
- // maybe the connector is adaptable
- if(connector instanceof IAdaptable) {
- Object result =((IAdaptable)connector).getAdapter(adapter);
- // Not sure if the next block is needed....
- if(result==null)
- //defer to the platform
- result= Platform.getAdapterManager().getAdapter(connector, adapter);
- if(result!=null)
- return result;
- }
- // maybe the real adapter is what we need....
- if(adapter.isInstance(connector))
- return connector;
- }
- // maybe we have to be adapted....
- return Platform.getAdapterManager().getAdapter(this, adapter);
- }
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/connector/TerminalToRemoteInjectionOutputStream.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/connector/TerminalToRemoteInjectionOutputStream.java
deleted file mode 100644
index bcca31875..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/connector/TerminalToRemoteInjectionOutputStream.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Michael Scharf (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.connector;
-
-import java.io.ByteArrayOutputStream;
-import java.io.FilterOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-
-class TerminalToRemoteInjectionOutputStream extends FilterOutputStream {
- /**
- * This class handles bytes written to the {@link TerminalToRemoteInjectionOutputStream}.
- */
- static abstract public class Interceptor {
- protected OutputStream fOriginal;
- /**
- * @param original the injection into the original stream begins
- * @throws IOException
- */
- public void begin(OutputStream original) throws IOException {
- fOriginal=original;
- }
- /**
- * @param b a byte was written to the {@link TerminalToRemoteInjectionOutputStream}.
- * @throws IOException
- */
- public void write(int b) throws IOException {
- }
- /**
- * @param b bytes written to the {@link TerminalToRemoteInjectionOutputStream}.
- * @param off the start offset in the data.
- * @param len the number of bytes to write.
- * @throws IOException
- */
- public void write(byte[] b, int off, int len) throws IOException {
- }
- /**
- * The injection into the normal stream ends.
- * @throws IOException
- */
- public void close() throws IOException {
- }
- public void flush() {
- }
- }
- static public class BufferInterceptor extends Interceptor {
- private final ByteArrayOutputStream fBuffer=new ByteArrayOutputStream();
- public void close() throws IOException {
- fOriginal.write(fBuffer.toByteArray());
- }
- public void write(byte[] b, int off, int len) throws IOException {
- fBuffer.write(b, off, len);
- }
- public void write(int b) throws IOException {
- fBuffer.write(b);
- }
- }
- private class TerminalFilterOutputStream extends OutputStream {
- final private Object fLock=TerminalToRemoteInjectionOutputStream.this;
- public void close() throws IOException {
- synchronized(fLock) {
- if(fInjection==this) {
- flush();
- ungrabOutput();
- }
- }
- }
- public void write(byte[] b, int off, int len) throws IOException {
- synchronized(fLock) {
- checkStream();
- out.write(b, off, len);
- }
- }
- public void write(byte[] b) throws IOException {
- synchronized(fLock) {
- checkStream();
- out.write(b);
- }
- }
- public void flush() throws IOException {
- synchronized(fLock) {
- checkStream();
- out.flush();
- }
- }
- public void write(int b) throws IOException {
- synchronized(fLock) {
- checkStream();
- out.write(b);
- }
- }
- private void checkStream() throws IOException {
- if(fInjection!=this)
- throw new IOException("Stream is closed"); //$NON-NLS-1$
- }
- }
- private Interceptor fInterceptor;
- private TerminalFilterOutputStream fInjection;
- public TerminalToRemoteInjectionOutputStream(OutputStream out) {
- super(out);
- }
- synchronized protected void ungrabOutput() throws IOException {
- if(fInterceptor!=null) {
- fInterceptor.close();
- fInterceptor=null;
- fInjection=null;
- }
- }
- /**
- * There can only be one injection stream active at a time. You must call close on the
- * returned output stream to end the injection.
- * @param interceptor This is used handle bytes sent while the injection stream is active.
- * @return a output stream that can be used to write to the decorated stream.
- * @throws IOException
- */
- public synchronized OutputStream grabOutput(Interceptor interceptor) throws IOException {
- if(fInjection!=null) {
- throw new IOException("Buffer in use"); //$NON-NLS-1$
- }
- fInterceptor=interceptor;
- fInterceptor.begin(out);
- fInjection=new TerminalFilterOutputStream();
- return fInjection;
- }
- /** See {@link #grabOutput(TerminalToRemoteInjectionOutputStream.Interceptor)}.
- * @return injection output stream
- * @throws IOException
- */
- public synchronized OutputStream grabOutput() throws IOException {
- return grabOutput(new BufferInterceptor());
- }
- synchronized public void close() throws IOException {
- if(fInjection!=null) {
- fInjection.close();
- }
- super.close();
- }
- synchronized public void flush() throws IOException {
- if(fInterceptor!=null)
- fInterceptor.flush();
- out.flush();
- }
- synchronized public void write(byte[] b, int off, int len) throws IOException {
- if(fInterceptor!=null)
- fInterceptor.write(b, off, len);
- else
- out.write(b, off, len);
- }
- synchronized public void write(int b) throws IOException {
- if(fInterceptor!=null)
- fInterceptor.write(b);
- else
- out.write(b);
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/CommandInputFieldWithHistory.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/CommandInputFieldWithHistory.java
deleted file mode 100644
index f6bb5c67d..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/CommandInputFieldWithHistory.java
+++ /dev/null
@@ -1,308 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Michael Scharf (Wind River) - initial implementation
- * Michael Scharf (Wing River) - [211659] Add field assist to terminal input field
- * Michael Scharf (Wing River) - [196447] The optional terminal input line should be resizeable
- * Martin Oberhuber (Wind River) - [168197] Fix Terminal for CDC-1.1/Foundation-1.1
- * Michael Scharf (Wing River) - [236458] Fix 168197 lost the last entry
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.control;
- import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-import java.util.StringTokenizer;
-
-import org.eclipse.jface.fieldassist.IContentProposal;
-import org.eclipse.jface.fieldassist.IContentProposalProvider;
-import org.eclipse.jface.fieldassist.TextContentAdapter;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.KeyListener;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Sash;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.fieldassist.ContentAssistCommandAdapter;
-
-
-
-/**
- * Manages the Command History for the command line input
- * of the terminal control.
- * <li>
- * <ul>Navigate with ARROW_UP,ARROW_DOWN,PAGE_UP,PAGE_DOWN
- * <ul>ESC to cancel history editing
- * <ul>History can be edited (by moving up and edit) but changes are
- * not persistent (like in bash).
- * <ul>If the same command is entered multiple times in a row,
- * only one entry is kept in the history.
- * </li>
- *
- */
-public class CommandInputFieldWithHistory implements ICommandInputField {
- private class FieldAssist implements IContentProposalProvider {
-
- public IContentProposal[] getProposals(String contents, int position) {
- String prefix=contents.substring(0, position);
- List result=new ArrayList();
- // show an entry only once
- Set seen=new HashSet();
- for (Iterator iterator = fHistory.iterator(); iterator.hasNext();) {
- String history = (String) iterator.next();
- if(history.startsWith(prefix) && !seen.contains(history)) {
- // the content is the rest of the history item
- String content=history.substring(prefix.length());
- result.add(new Proposal(content,history));
- // don't add this proposal again
- seen.add(history);
- }
- }
- return (IContentProposal[]) result.toArray(new IContentProposal[result.size()]);
- }
-
- }
- private static class Proposal implements IContentProposal {
-
- private final String fContent;
- private final String fLabel;
- Proposal(String content, String label) {
- fContent= content;
- fLabel= label;
- }
- public String getContent() {
- return fContent;
- }
-
- public String getLabel() {
- return fLabel;
- }
-
- public String getDescription() {
- return null;
- }
-
- public int getCursorPosition() {
- return fContent.length();
- }
- }
-
- final List fHistory=new ArrayList();
- /**
- * Keeps a modifiable history while in history editing mode
- */
- List fEditedHistory;
- /**
- * The current position in the edit history
- */
- private int fEditHistoryPos=0;
- /**
- * The limit of the history.
- */
- private final int fMaxSize;
- /**
- * The input text field.
- */
- private Text fInputField;
- private Sash fSash;
- public CommandInputFieldWithHistory(int maxHistorySize) {
- fMaxSize=maxHistorySize;
- }
- /**
- * Add a line to the history.
- * @param line The line to be added to the history.
- */
- protected void pushLine(String line) {
- endHistoryMode();
- // anything to remember?
- if(line==null || line.trim().length()==0)
- return;
- fHistory.add(0,line);
- // ignore if the same as last
- if(fHistory.size()>1 && line.equals(fHistory.get(1)))
- fHistory.remove(0);
- // limit the history size.
- if(fHistory.size()>=fMaxSize)
- fHistory.remove(fHistory.size()-1);
- }
- /**
- * Sets the history
- * @param history or null
- */
- public void setHistory(String history) {
- endHistoryMode();
- fHistory.clear();
- if(history==null)
- return;
- // add history entries separated by '\n'
- // fHistory.addAll(Arrays.asList(history.split("\n"))); //$NON-NLS-1$
- //<J2ME CDC-1.1 Foundation-1.1 variant>
- StringTokenizer tok=new StringTokenizer(history,"\n"); //$NON-NLS-1$
- while(tok.hasMoreElements())
- fHistory.add(tok.nextElement());
- //</J2ME CDC-1.1 Foundation-1.1 variant>
- }
- /**
- * @return the current content of the history buffer and new line separated list
- */
- public String getHistory() {
- StringBuffer buff=new StringBuffer();
- boolean sep=false;
- for (Iterator iterator = fHistory.iterator(); iterator.hasNext();) {
- String line=(String) iterator.next();
- if(line.length()>0) {
- if(sep)
- buff.append("\n"); //$NON-NLS-1$
- else
- sep=true;
- buff.append(line);
- }
- }
- return buff.toString();
- }
- /**
- * @param currLine Line of text to be moved in history
- * @param count (+1 or -1) for forward and backward movement. -1 goes back
- * @return the new string to be displayed in the command line or null,
- * if the limit is reached.
- */
- public String move(String currLine, int count) {
- if(!inHistoryMode()) {
- fEditedHistory=new ArrayList(fHistory.size()+1);
- fEditedHistory.add(currLine);
- fEditedHistory.addAll(fHistory);
- fEditHistoryPos=0;
- }
- fEditedHistory.set(fEditHistoryPos,currLine);
- if(fEditHistoryPos+count>=fEditedHistory.size())
- return null;
- if(fEditHistoryPos+count<0)
- return null;
- fEditHistoryPos+=count;
- return (String) fEditedHistory.get(fEditHistoryPos);
- }
- private boolean inHistoryMode() {
- return fEditedHistory!=null;
- }
-
- /**
- * Exit the history movements and go to position 0;
- * @return the string to be shown in the command line
- */
- protected String escape() {
- if(!inHistoryMode())
- return null;
- String line= (String) fEditedHistory.get(0);
- endHistoryMode();
- return line;
- }
- /**
- * End history editing
- */
- private void endHistoryMode() {
- fEditedHistory=null;
- fEditHistoryPos=0;
- }
- public void createControl(final Composite parent,final ITerminalViewControl terminal) {
-// fSash = new Sash(parent,SWT.HORIZONTAL|SWT.SMOOTH);
- fSash = new Sash(parent,SWT.HORIZONTAL);
- final GridData gd_sash = new GridData(SWT.FILL, SWT.CENTER, true, false);
- gd_sash.heightHint=5;
- fSash.setLayoutData(gd_sash);
- fSash.addListener (SWT.Selection, new Listener () {
- public void handleEvent (Event e) {
- // no idea why this is needed
- GridData gdata = (GridData) fInputField.getLayoutData();
- Rectangle sashRect = fSash.getBounds ();
- Rectangle containerRect = parent.getClientArea ();
-
- int h=fInputField.getLineHeight();
- // make sure the input filed hight is a multiple of the line height
- gdata.heightHint = Math.max(((containerRect.height-e.y-sashRect.height)/h)*h,h);
- // do not show less then one line
- e.y=Math.min(e.y,containerRect.height-h);
- fInputField.setLayoutData(gdata);
- parent.layout();
- // else the content assist icon will be replicated
- parent.redraw();
- }
- });
- fInputField=new Text(parent, SWT.MULTI|SWT.BORDER|SWT.WRAP|SWT.V_SCROLL);
- GridData data=new GridData(SWT.FILL, SWT.FILL, true, false);
- boolean installDecoration=true;
- if(installDecoration) {
- // The ContentAssistCommandAdapter says: "The client is responsible for
- // ensuring that adequate space is reserved for the decoration."
- // TODO: what is the "adequate space"???
- data.horizontalIndent=6;
- }
- fInputField.setLayoutData(data);
- fInputField.setFont(terminal.getFont());
- // Register field assist *before* the key listener.
- // Else the ENTER key is sent *first* to the input field
- // and then to the field assist popup.
- // (https://bugs.eclipse.org/bugs/show_bug.cgi?id=211659)
- new ContentAssistCommandAdapter(
- fInputField,
- new TextContentAdapter(),
- new FieldAssist(),
- null,
- null,
- installDecoration);
- fInputField.addKeyListener(new KeyListener(){
- public void keyPressed(KeyEvent e) {
- // if the field assist has handled the key already then
- // ignore it (https://bugs.eclipse.org/bugs/show_bug.cgi?id=211659)
- if(!e.doit)
- return;
- if(e.keyCode=='\n' || e.keyCode=='\r') {
- e.doit=false;
- String line=fInputField.getText();
- if(!terminal.pasteString(line+"\n")) //$NON-NLS-1$
- return;
- pushLine(line);
- setCommand("");//$NON-NLS-1$
- } else if(e.keyCode==SWT.ARROW_UP || e.keyCode==SWT.PAGE_UP) {
- e.doit=false;
- setCommand(move(fInputField.getText(),1));
- } else if(e.keyCode==SWT.ARROW_DOWN || e.keyCode==SWT.PAGE_DOWN) {
- e.doit=false;
- setCommand(move(fInputField.getText(),-1));
- } else if(e.keyCode==SWT.ESC) {
- e.doit=false;
- setCommand(escape());
- }
- }
- private void setCommand(String line) {
- if(line==null)
- return;
- fInputField.setText(line);
- fInputField.setSelection(fInputField.getCharCount());
- }
- public void keyReleased(KeyEvent e) {
- }
- });
- }
- public void setFont(Font font) {
- fInputField.setFont(font);
- fInputField.getParent().layout(true);
- }
- public void dispose() {
- fSash.dispose();
- fSash=null;
- fInputField.dispose();
- fInputField=null;
-
- }
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/ICommandInputField.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/ICommandInputField.java
deleted file mode 100644
index 4938a9f4f..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/ICommandInputField.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tm.internal.terminal.control;
-
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * Interface to create a command input control.
- *
- */
-public interface ICommandInputField {
- /**
- * @param parent
- * @param terminal
- */
- void createControl(Composite parent, ITerminalViewControl terminal);
-
- void dispose();
- /**
- * Sets the font of a control created with {@link #createControl(Composite, ITerminalViewControl)}
- * @param control
- * @param font the new text font
- */
- void setFont(Font font);
-
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/ITerminalListener.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/ITerminalListener.java
deleted file mode 100644
index 23adbff04..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/ITerminalListener.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.control;
-
-import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
-
-/**
- * Provided by a view implementation.
- * @author Michael Scharf
- *
- */
-public interface ITerminalListener {
- /**
- * Called when the state of the connection has changed.
- * @param state
- */
- void setState(TerminalState state);
-
- /**
- * Set the title of the terminal.
- * @param title
- */
- void setTerminalTitle(String title);
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/ITerminalViewControl.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/ITerminalViewControl.java
deleted file mode 100644
index 578772dc5..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/ITerminalViewControl.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Michael Scharf (Wind River) - initial API and implementation
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- * Martin Oberhuber (Wind River) - [204796] Terminal should allow setting the encoding to use
- ******************************************************************************/
-package org.eclipse.tm.internal.terminal.control;
-
-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.provisional.api.ITerminalConnector;
-import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl;
-import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
-
-/**
- * @author Michael Scharf
- *
- */
-public interface ITerminalViewControl {
- /**
- * Set the encoding that the Terminal uses to decode byte streams into
- * characters.
- *
- * @see ITerminalControl#setEncoding(String)
- * @since org.eclipse.tm.terminal 2.0
- */
- void setEncoding(String encoding) throws UnsupportedEncodingException;
-
- /**
- * Get the Terminal's current encoding.
- *
- * @return the current Encoding of the Terminal.
- * @see ITerminalControl#getEncoding()
- * @since org.eclipse.tm.terminal 2.0
- */
- String getEncoding();
-
- boolean isEmpty();
- void setFont(Font font);
- void setInvertedColors(boolean invert);
- Font getFont();
- /**
- * @return the text control
- */
- Control getControl();
- /**
- * @return the root of all controls
- */
- Control getRootControl();
- boolean isDisposed();
- void selectAll();
- void clearTerminal();
- void copy();
- void paste();
- String getSelection();
- TerminalState getState();
- Clipboard getClipboard();
- void disconnectTerminal();
- void disposeTerminal();
- String getSettingsSummary();
- ITerminalConnector[] getConnectors();
- void setFocus();
- ITerminalConnector getTerminalConnector();
- void setConnector(ITerminalConnector connector);
- void connectTerminal();
- /**
- * @param write a single character to terminal
- */
- void sendKey(char arg0);
- /**
- * @param string write string to terminal
- */
- public boolean pasteString(String string);
-
- boolean isConnected();
-
- /**
- * @param inputField null means no input field is shown
- */
- void setCommandInputField(ICommandInputField inputField);
- /**
- * @return null or the current input field
- */
- ICommandInputField getCommandInputField();
-
- /**
- * @return the maximum number of lines to display
- * in the terminal view. -1 means unlimited.
- */
- public int getBufferLineLimit();
-
- /**
- * @param bufferLineLimit the maximum number of lines to show
- * in the terminal view. -1 means unlimited.
- */
- public void setBufferLineLimit(int bufferLineLimit);
- boolean isScrollLock();
- void setScrollLock(boolean on);
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/TerminalViewControlFactory.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/TerminalViewControlFactory.java
deleted file mode 100644
index 69e119521..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/TerminalViewControlFactory.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Michael Scharf (Wind River) - initial API and implementation
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.control;
-
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.tm.internal.terminal.emulator.VT100TerminalControl;
-import org.eclipse.tm.internal.terminal.provisional.api.ITerminalConnector;
-
-public class TerminalViewControlFactory {
- public static ITerminalViewControl makeControl(ITerminalListener target, Composite wndParent, ITerminalConnector[] connectors) {
- return new VT100TerminalControl(target, wndParent, connectors);
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/AbstractTerminalAction.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/AbstractTerminalAction.java
deleted file mode 100644
index 42ca60e7d..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/AbstractTerminalAction.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * 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) - Adapted from TerminalAction
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.control.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.tm.internal.terminal.control.ITerminalViewControl;
-import org.eclipse.tm.internal.terminal.control.impl.TerminalPlugin;
-
-public abstract class AbstractTerminalAction extends Action {
- private final ITerminalViewControl fTarget;
-
- public AbstractTerminalAction(String strId) {
- this(null, strId, 0);
- }
-
- public AbstractTerminalAction(ITerminalViewControl target,
- String strId) {
- this(target, strId, 0);
- }
-
- public AbstractTerminalAction(ITerminalViewControl 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) {
- setupAction(strText, strToolTip, strImage, strEnabledImage,
- strDisabledImage, bEnabled, TerminalPlugin.getDefault()
- .getImageRegistry());
- }
-
- 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);
- }
- }
-
- /**
- * Return the terminal instance on which the action should operate.
- *
- * @return the terminal instance on which the action should operate.
- */
- protected ITerminalViewControl getTarget() {
- return fTarget;
- }
-
- /**
- * Subclasses can update their action
- *
- * @param aboutToShow true before the menu is shown -- false when the menu
- * gets hidden
- */
- public void updateAction(boolean aboutToShow) {
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/ActionMessages.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/ActionMessages.java
deleted file mode 100644
index 30a3091f0..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/ActionMessages.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * 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
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.control.actions;
-
-import org.eclipse.osgi.util.NLS;
-
-public class ActionMessages extends NLS {
- static {
- NLS.initializeMessages(ActionMessages.class.getName(),
- ActionMessages.class);
- }
-
- public static String COPY;
- public static String CUT;
- public static String PASTE;
- public static String SELECTALL;
- public static String CLEARALL;
-
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/ActionMessages.properties b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/ActionMessages.properties
deleted file mode 100644
index 931a87286..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/ActionMessages.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2009 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
-###############################################################################
-
-# NLS_MESSAGEFORMAT_NONE
-
-COPY = Copy
-CUT = Cut
-PASTE = Paste
-SELECTALL = Select All
-CLEARALL = Clear Terminal
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/ImageConsts.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/ImageConsts.java
deleted file mode 100644
index b69b669ea..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/ImageConsts.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * 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
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.control.actions;
-
-public interface ImageConsts {
- public final static String IMAGE_DIR_ROOT = "icons/"; //$NON-NLS-1$
- public final static String IMAGE_DIR_LOCALTOOL = IMAGE_DIR_ROOT + "clcl16/"; // basic colors - size 16x16 //$NON-NLS-1$
- public final static String IMAGE_DIR_DLCL = IMAGE_DIR_ROOT + "dlcl16/"; // disabled - size 16x16 //$NON-NLS-1$
- public final static String IMAGE_DIR_ELCL = IMAGE_DIR_ROOT+ "elcl16/"; // enabled - size 16x16 //$NON-NLS-1$
-
- public static final String IMAGE_CLCL_CLEAR_ALL = "ImageClclClearAll"; //$NON-NLS-1$
-
- public static final String IMAGE_DLCL_CLEAR_ALL = "ImageDlclClearAll"; //$NON-NLS-1$
-
- public static final String IMAGE_ELCL_CLEAR_ALL = "ImageElclClearAll"; //$NON-NLS-1$
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/TerminalActionClearAll.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/TerminalActionClearAll.java
deleted file mode 100644
index 65a4a3b38..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/TerminalActionClearAll.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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
- * Uwe Stieber (Wind River) - [260372] [terminal] Certain terminal actions are enabled if no target terminal control is available
- ********************************************************************************/
-package org.eclipse.tm.internal.terminal.control.actions;
-
-import org.eclipse.tm.internal.terminal.control.ITerminalViewControl;
-
-public class TerminalActionClearAll extends AbstractTerminalAction {
- public TerminalActionClearAll() {
- super(TerminalActionClearAll.class.getName());
-
- setupAction(ActionMessages.CLEARALL, ActionMessages.CLEARALL,
- ImageConsts.IMAGE_CLCL_CLEAR_ALL,
- ImageConsts.IMAGE_ELCL_CLEAR_ALL,
- ImageConsts.IMAGE_DLCL_CLEAR_ALL, false);
- }
-
- public TerminalActionClearAll(ITerminalViewControl target) {
- super(target, TerminalActionClearAll.class.getName());
-
- setupAction(ActionMessages.CLEARALL, ActionMessages.CLEARALL,
- ImageConsts.IMAGE_CLCL_CLEAR_ALL,
- ImageConsts.IMAGE_ELCL_CLEAR_ALL,
- ImageConsts.IMAGE_DLCL_CLEAR_ALL, false);
- }
-
- public void run() {
- ITerminalViewControl target = getTarget();
- if (target != null) {
- target.clearTerminal();
- }
- }
-
- public void updateAction(boolean aboutToShow) {
- ITerminalViewControl target = getTarget();
- setEnabled(target != null && !target.isEmpty());
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/TerminalActionCopy.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/TerminalActionCopy.java
deleted file mode 100644
index dabf91dfc..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/TerminalActionCopy.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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
- * Uwe Stieber (Wind River) - [260372] [terminal] Certain terminal actions are enabled if no target terminal control is available
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.control.actions;
-
-import org.eclipse.tm.internal.terminal.control.ITerminalViewControl;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-
-public class TerminalActionCopy extends AbstractTerminalAction {
- public TerminalActionCopy() {
- super(TerminalActionCopy.class.getName());
- ISharedImages si = PlatformUI.getWorkbench().getSharedImages();
- setupAction(ActionMessages.COPY, ActionMessages.COPY, si
- .getImageDescriptor(ISharedImages.IMG_TOOL_COPY), si
- .getImageDescriptor(ISharedImages.IMG_TOOL_COPY), si
- .getImageDescriptor(ISharedImages.IMG_TOOL_COPY_DISABLED), true);
- }
-
- public TerminalActionCopy(ITerminalViewControl target) {
- super(target, TerminalActionCopy.class.getName());
- ISharedImages si = PlatformUI.getWorkbench().getSharedImages();
- setupAction(ActionMessages.COPY, ActionMessages.COPY, si
- .getImageDescriptor(ISharedImages.IMG_TOOL_COPY), si
- .getImageDescriptor(ISharedImages.IMG_TOOL_COPY), si
- .getImageDescriptor(ISharedImages.IMG_TOOL_COPY_DISABLED), true);
- }
-
- public void run() {
- ITerminalViewControl target = getTarget();
- if (target != null) {
- String selection = target.getSelection();
-
- if (!selection.equals("")) {//$NON-NLS-1$
- target.copy();
- } else {
- target.sendKey('\u0003');
- }
- }
- }
-
- public void updateAction(boolean aboutToShow) {
- ITerminalViewControl target = getTarget();
- boolean bEnabled = target != null;
- if (aboutToShow && bEnabled) {
- bEnabled = target.getSelection().length() > 0;
- }
- setEnabled(bEnabled);
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/TerminalActionCut.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/TerminalActionCut.java
deleted file mode 100644
index b33d6553f..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/TerminalActionCut.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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
- * Uwe Stieber (Wind River) - [260372] [terminal] Certain terminal actions are enabled if no target terminal control is available
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.control.actions;
-
-import org.eclipse.tm.internal.terminal.control.ITerminalViewControl;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-
-public class TerminalActionCut extends AbstractTerminalAction {
- public TerminalActionCut() {
- super(TerminalActionCut.class.getName());
- ISharedImages si = PlatformUI.getWorkbench().getSharedImages();
- setupAction(ActionMessages.CUT, ActionMessages.CUT, si
- .getImageDescriptor(ISharedImages.IMG_TOOL_CUT), si
- .getImageDescriptor(ISharedImages.IMG_TOOL_CUT), si
- .getImageDescriptor(ISharedImages.IMG_TOOL_CUT_DISABLED), true);
- }
-
- public TerminalActionCut(ITerminalViewControl target) {
- super(target, TerminalActionCut.class.getName());
- ISharedImages si = PlatformUI.getWorkbench().getSharedImages();
- setupAction(ActionMessages.CUT, ActionMessages.CUT, si
- .getImageDescriptor(ISharedImages.IMG_TOOL_CUT), si
- .getImageDescriptor(ISharedImages.IMG_TOOL_CUT), si
- .getImageDescriptor(ISharedImages.IMG_TOOL_CUT_DISABLED), true);
- }
-
- public void run() {
- ITerminalViewControl target = getTarget();
- if (target != null) {
- target.sendKey('\u0018');
- }
- }
-
- public void updateAction(boolean aboutToShow) {
- // Cut is always disabled
- setEnabled(false);
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/TerminalActionPaste.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/TerminalActionPaste.java
deleted file mode 100644
index 9f13b82dd..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/TerminalActionPaste.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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
- * Uwe Stieber (Wind River) - [260372] [terminal] Certain terminal actions are enabled if no target terminal control is available
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.control.actions;
-
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.tm.internal.terminal.control.ITerminalViewControl;
-import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-
-public class TerminalActionPaste extends AbstractTerminalAction {
- public TerminalActionPaste() {
- super(TerminalActionPaste.class.getName());
- ISharedImages si = PlatformUI.getWorkbench().getSharedImages();
- setupAction(ActionMessages.PASTE, ActionMessages.PASTE, si
- .getImageDescriptor(ISharedImages.IMG_TOOL_PASTE), si
- .getImageDescriptor(ISharedImages.IMG_TOOL_PASTE_DISABLED), si
- .getImageDescriptor(ISharedImages.IMG_TOOL_PASTE), false);
- }
-
- public TerminalActionPaste(ITerminalViewControl target) {
- super(target, TerminalActionPaste.class.getName());
- ISharedImages si = PlatformUI.getWorkbench().getSharedImages();
- setupAction(ActionMessages.PASTE, ActionMessages.PASTE, si
- .getImageDescriptor(ISharedImages.IMG_TOOL_PASTE), si
- .getImageDescriptor(ISharedImages.IMG_TOOL_PASTE_DISABLED), si
- .getImageDescriptor(ISharedImages.IMG_TOOL_PASTE), false);
- }
-
- public void run() {
- ITerminalViewControl target = getTarget();
- if (target != null) {
- target.paste();
- }
- }
-
- public void updateAction(boolean aboutToShow) {
- ITerminalViewControl target = getTarget();
- boolean bEnabled = target != null;
- if (bEnabled) {
- String strText = (String) target.getClipboard().getContents(
- TextTransfer.getInstance());
- bEnabled = ((strText != null) && (!strText.equals("")) && (target.getState() == TerminalState.CONNECTED));//$NON-NLS-1$
- }
- setEnabled(bEnabled);
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/TerminalActionSelectAll.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/TerminalActionSelectAll.java
deleted file mode 100644
index 08526a80b..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/actions/TerminalActionSelectAll.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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
- * Uwe Stieber (Wind River) - [260372] [terminal] Certain terminal actions are enabled if no target terminal control is available
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.control.actions;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.tm.internal.terminal.control.ITerminalViewControl;
-
-public class TerminalActionSelectAll extends AbstractTerminalAction {
- public TerminalActionSelectAll() {
- super(TerminalActionSelectAll.class.getName());
-
- setupAction(ActionMessages.SELECTALL, ActionMessages.SELECTALL,
- (ImageDescriptor) null, null, null, false);
- }
-
- public TerminalActionSelectAll(ITerminalViewControl target) {
- super(target, TerminalActionSelectAll.class.getName());
-
- setupAction(ActionMessages.SELECTALL, ActionMessages.SELECTALL,
- (ImageDescriptor) null, null, null, false);
- }
-
- public void run() {
- ITerminalViewControl target = getTarget();
- if (target != null) {
- target.selectAll();
- }
- }
-
- public void updateAction(boolean aboutToShow) {
- ITerminalViewControl target = getTarget();
- setEnabled(target != null && !target.isEmpty());
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/impl/ITerminalControlForText.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/impl/ITerminalControlForText.java
deleted file mode 100644
index 52e65c506..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/impl/ITerminalControlForText.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Michael Scharf (Wind River) - initial API and implementation
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.control.impl;
-
-import java.io.OutputStream;
-
-import org.eclipse.tm.internal.terminal.provisional.api.ITerminalConnector;
-import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
-
-/**
- * need a better name!
- * @author Michael Scharf
- *
- */
-public interface ITerminalControlForText {
-
- TerminalState getState();
- void setState(TerminalState state);
- void setTerminalTitle(String title);
-
- ITerminalConnector getTerminalConnector();
-
- OutputStream getOutputStream();
-
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/impl/TerminalInputStream.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/impl/TerminalInputStream.java
deleted file mode 100644
index 8bcdf44cf..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/impl/TerminalInputStream.java
+++ /dev/null
@@ -1,334 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1996, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Michael Scharf (Wind River) - initial API and implementation
- * Douglas Lea (Addison Wesley) - [cq:1552] BoundedBufferWithStateTracking adapted to BoundedByteBuffer
- *******************************************************************************/
-
-package org.eclipse.tm.internal.terminal.control.impl;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.Timer;
-import java.util.TimerTask;
-
-import org.eclipse.swt.widgets.Display;
-
-/**
- * The main purpose of this class is to start a runnable in the
- * display thread when data is available and to pretend no data
- * is available after a given amount of time the runnable is running.
- *
- */
-public class TerminalInputStream extends InputStream {
- /**
- * The maximum time in milliseconds the {@link #fNotifyChange} runs until
- * {@link #ready()} returns false.
- */
- private final int fUITimeout;
- /**
- * The output stream used by the terminal backend to write to the terminal
- */
- protected final OutputStream fOutputStream;
- /**
- * This runnable is called every time some characters are available from...
- */
- private final Runnable fNotifyChange;
- /**
- * A shared timer for all terminals. This times is used to limit the
- * time used in the display thread....
- */
- static Timer fgTimer=new Timer(false);
- /**
- * A blocking byte queue.
- */
- private final BoundedByteBuffer fQueue;
-
- /**
- * The maximum amount of data read and written in one shot.
- * The timer cannot interrupt reading this amount of data.
- * {@link #available()} and {@link #read(byte[], int, int)}
- * This is used as optimization, because reading single characters
- * can be very inefficient, because each call is synchronized.
- */
- // block size must be smaller than the Queue capacity!
- final int BLOCK_SIZE=64;
-
-
- /**
- * The runnable that is scheduled in the display tread. Takes care of the
- * timeout management. It calls the {@link #fNotifyChange}
- */
- // synchronized with fQueue!
- private Runnable fRunnable;
-
- /**
- * Used as flag to indicate that the current runnable
- * has used enough time in the display thread.
- * This variable is set by a timer thread after the
- * Runnable starts to run in the Display thread after
- * {@link #fUITimeout}.
- */
- // synchronized with fQueue!
- private boolean fEnoughDisplayTime;
-
- /**
- * A byte bounded buffer used to synchronize the input and the output stream.
- * <p>
- * Adapted from BoundedBufferWithStateTracking
- * http://gee.cs.oswego.edu/dl/cpj/allcode.java
- * http://gee.cs.oswego.edu/dl/cpj/
- * <p>
- * BoundedBufferWithStateTracking is part of the examples for the book
- * Concurrent Programming in Java: Design Principles and Patterns by
- * Doug Lea (ISBN 0-201-31009-0). Second edition published by
- * Addison-Wesley, November 1999. The code is
- * Copyright(c) Douglas Lea 1996, 1999 and released to the public domain
- * and may be used for any purposes whatsoever.
- * <p>
- * For some reasons a solution based on
- * PipedOutputStream/PipedIntputStream
- * does work *very* slowly:
- * http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4404700
- * <p>
- *
- */
- class BoundedByteBuffer {
- protected final byte[] fBuffer; // the elements
- protected int fPutPos = 0; // circular indices
- protected int fTakePos = 0;
- protected int fUsedSlots = 0; // the count
- public BoundedByteBuffer(int capacity) throws IllegalArgumentException {
- // make sure we don't deadlock on too small capacity
- if(capacity<BLOCK_SIZE)
- capacity=2*BLOCK_SIZE;
- if (capacity <= 0)
- throw new IllegalArgumentException();
- fBuffer = new byte[capacity];
- }
- /**
- * @return the bytes available for {@link #read()}
- */
- public synchronized int size() {
- return fUsedSlots;
- }
- /**
- * Writes a single byte to the buffer. Blocks if the buffer is full.
- *
- * @param b the byte to write
- * @throws InterruptedException when the Thread is interrupted while
- * waiting for the buffer to become available because it was
- * full
- */
- public synchronized void write(byte b) throws InterruptedException {
- while (fUsedSlots == fBuffer.length)
- // wait until not full
- wait();
-
- fBuffer[fPutPos] = b;
- fPutPos = (fPutPos + 1) % fBuffer.length; // cyclically increment
-
- if (fUsedSlots++ == 0) // signal if was empty
- notifyAll();
- }
- /**
- * Read a single byte. Blocks until a byte is available.
- *
- * @return a byte from the buffer
- * @throws InterruptedException when the Thread is interrupted while
- * waiting for the buffer to be filled with a readable byte
- */
- public synchronized byte read() throws InterruptedException {
- while (fUsedSlots == 0)
- // wait until not empty
- wait();
- byte b = fBuffer[fTakePos];
- fTakePos = (fTakePos + 1) % fBuffer.length;
-
- if (fUsedSlots-- == fBuffer.length) // signal if was full
- notifyAll();
- return b;
- }
- }
-
- /**
- * An output stream that calls {@link TerminalInputStream#textAvailable}
- * every time data is written to the stream. The data is written to
- * {@link TerminalInputStream#fQueue}.
- *
- */
- class TerminalOutputStream extends OutputStream {
- public void write(byte[] b, int off, int len) throws IOException {
- try {
- // optimization to avoid many synchronized
- // sections: put the data in junks into the
- // queue.
- int noff=off;
- int end=off+len;
- while(noff<end) {
- int n=noff+BLOCK_SIZE;
- if(n>end)
- n=end;
- // now block the queue for the time we need to
- // add some characters
- synchronized(fQueue) {
- for(int i=noff;i<n;i++) {
- fQueue.write(b[i]);
- }
- bytesAreAvailable();
- }
- noff+=BLOCK_SIZE;
- }
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- }
- }
-
- public void write(int b) throws IOException {
- try {
- // a kind of optimization, because
- // both calls use the fQueue lock...
- synchronized(fQueue) {
- fQueue.write((byte)b);
- bytesAreAvailable();
- }
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- }
- }
- }
- /**
- * @param bufferSize the size of the buffer of the output stream
- * @param uiTimeout the maximum time the notifyChange runnable runs. It will be
- * rescheduled after uiTimeout if input data is still available.
- * @param notifyChange a Runnable that is posted to the Display thread
- * via {@link Display#asyncExec}. The runnable is posted several times!
- */
- public TerminalInputStream(int bufferSize,int uiTimeout,Runnable notifyChange) {
- //if(true) {notifyChange=new Runnable() {public void run() {byte buff[]=new byte[1024];while((available())>0)try {read(buff);} catch (IOException e) {break;}}};}
- fOutputStream =new TerminalOutputStream();
- fNotifyChange=notifyChange;
- fQueue=new BoundedByteBuffer(bufferSize);
- fUITimeout=uiTimeout;
- }
- /**
- * Posts the runnable {@link #fNotifyChange} to the display Thread,
- * unless the runnable is already scheduled.
- * It will make {@link #ready} return false after
- * {@link #fUITimeout} milli seconds.
- */
- void bytesAreAvailable() {
- // synchronize on the Queue to reduce the locks
- synchronized(fQueue) {
- if(fRunnable==null) {
- fRunnable=new Runnable(){
- public void run() {
- // protect the access to fRunnable
- synchronized(fQueue){
- fRunnable=null;
- }
- // end the reading after some time
- startTimer(fUITimeout);
- // and start the real runnable
- fNotifyChange.run();
- }
-
- };
- // TODO: make sure we don't create a display if the display is disposed...
- Display.getDefault().asyncExec(fRunnable);
- }
- }
-
- }
- /**
- * Starts a timer that sets {@link #fEnoughDisplayTime} to
- * true after milliSec.
- * @param milliSec The time after which fEnoughDisplayTime is set to true.
- */
- void startTimer(int milliSec) {
- synchronized(fQueue) {
- fEnoughDisplayTime=false;
- }
- fgTimer.schedule(new TimerTask(){
- public void run() {
- synchronized(fQueue) {
- fEnoughDisplayTime=true;
- // there is some data available
- if(fQueue.size()>0) {
- // schedule a new runnable to do the work
- bytesAreAvailable();
- }
- }
- }}, milliSec);
- }
- /**
- * @return the output stream used by the backend to write to the terminal.
- */
- public OutputStream getOutputStream() {
- return fOutputStream;
- }
- /**
- * Must be called in the Display Thread!
- * @return true if a character is available for the terminal to show.
- */
- public int available() {
- int available;
- synchronized(fQueue) {
- if(fEnoughDisplayTime)
- return 0;
- available=fQueue.size();
- }
- // Limit the available amount of data.
- // else our trick of limiting the time spend
- // reading might not work.
- if(available>BLOCK_SIZE)
- available=BLOCK_SIZE;
- return available;
- }
- /**
- * @return the next available byte. Check with {@link #available}
- * if characters are available.
- */
- public int read() throws IOException {
- try {
- return fQueue.read();
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- return -1;
- }
- }
- /**
- * Closing a <tt>ByteArrayInputStream</tt> has no effect. The methods in
- * this class can be called after the stream has been closed without
- * generating an <tt>IOException</tt>.
- * <p>
- */
- public void close() throws IOException {
- }
-
- public int read(byte[] cbuf, int off, int len) throws IOException {
- int n=0;
- // read as much as we can using a single synchronized statement
- synchronized (fQueue) {
- try {
- // The assumption is that the caller has used available to
- // check if bytes are available! That's why we don't check
- // for fEnoughDisplayTime!
- // Make sure that not more than BLOCK_SIZE is read in one call
- while(fQueue.size()>0 && n<len && n<BLOCK_SIZE) {
- cbuf[off+n]=fQueue.read();
- n++;
- }
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- }
- }
- return n;
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/impl/TerminalMessages.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/impl/TerminalMessages.java
deleted file mode 100644
index a54f02e6d..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/impl/TerminalMessages.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Michael Scharf (Wind River) - initial API and implementation
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.control.impl;
-
-import org.eclipse.osgi.util.NLS;
-
-public class TerminalMessages extends NLS {
- static {
- NLS.initializeMessages(TerminalMessages.class.getName(), TerminalMessages.class);
- }
-
- public static String TerminalError;
- public static String SocketError;
- public static String IOError;
- public static String CannotConnectTo;
- public static String NotInitialized;
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/impl/TerminalMessages.properties b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/impl/TerminalMessages.properties
deleted file mode 100644
index c77d4ee2d..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/impl/TerminalMessages.properties
+++ /dev/null
@@ -1,24 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2009 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
-###############################################################################
-
-# NLS_MESSAGEFORMAT_VAR
-
-TerminalError = Terminal Error
-SocketError = Socket Error
-IOError = IO Error
-CannotConnectTo = Cannot initialize {0}:\n{1}
-NotInitialized = Not Initialized
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/impl/TerminalPlugin.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/impl/TerminalPlugin.java
deleted file mode 100644
index d76858230..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/impl/TerminalPlugin.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * 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
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.control.impl;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.tm.internal.terminal.control.actions.ImageConsts;
-import org.eclipse.tm.internal.terminal.provisional.api.Logger;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-
-public class TerminalPlugin extends AbstractUIPlugin {
- protected static TerminalPlugin fDefault;
- public static final String PLUGIN_ID = "org.eclipse.tm.terminal"; //$NON-NLS-1$
- public static final String HELP_VIEW = PLUGIN_ID + ".terminal_view"; //$NON-NLS-1$
-
- /**
- * The constructor.
- */
- public TerminalPlugin() {
- fDefault = this;
- }
- /**
- * Returns the shared instance.
- */
- public static TerminalPlugin getDefault() {
- return fDefault;
- }
-
- public static boolean isLogInfoEnabled() {
- return isOptionEnabled(Logger.TRACE_DEBUG_LOG_INFO);
- }
- public static boolean isLogErrorEnabled() {
- return isOptionEnabled(Logger.TRACE_DEBUG_LOG_ERROR);
- }
- public static boolean isLogEnabled() {
- return isOptionEnabled(Logger.TRACE_DEBUG_LOG);
- }
-
- public static boolean isOptionEnabled(String strOption) {
- String strEnabled = Platform.getDebugOption(strOption);
- if (strEnabled == null)
- return false;
-
- return new Boolean(strEnabled).booleanValue();
- }
-
- protected void initializeImageRegistry(ImageRegistry imageRegistry) {
- try {
- // Local toolbars
- putImageInRegistry(imageRegistry, ImageConsts.IMAGE_CLCL_CLEAR_ALL, ImageConsts.IMAGE_DIR_LOCALTOOL + "clear_co.gif"); //$NON-NLS-1$
- // Enabled local toolbars
- putImageInRegistry(imageRegistry, ImageConsts.IMAGE_ELCL_CLEAR_ALL, ImageConsts.IMAGE_DIR_ELCL + "clear_co.gif"); //$NON-NLS-1$
- // Disabled local toolbars
- putImageInRegistry(imageRegistry, ImageConsts.IMAGE_DLCL_CLEAR_ALL, ImageConsts.IMAGE_DIR_DLCL + "clear_co.gif"); //$NON-NLS-1$
- } catch (MalformedURLException malformedURLException) {
- malformedURLException.printStackTrace();
- }
- }
-
- protected void putImageInRegistry(ImageRegistry imageRegistry, String strKey, String relativePath) throws MalformedURLException {
- URL url = TerminalPlugin.getDefault().getBundle().getEntry(relativePath);
- ImageDescriptor imageDescriptor = ImageDescriptor.createFromURL(url);
- imageRegistry.put(strKey, imageDescriptor);
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/IVT100EmulatorBackend.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/IVT100EmulatorBackend.java
deleted file mode 100644
index 362aa26d2..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/IVT100EmulatorBackend.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tm.internal.terminal.emulator;
-
-import org.eclipse.tm.terminal.model.Style;
-
-public interface IVT100EmulatorBackend {
-
- /**
- * This method erases all text from the Terminal view. Including the history
- */
- void clearAll();
-
- /**
- * Sets the Dimensions of the addressable scroll space of the screen....
- * Keeps the cursor position relative to the bottom of the screen!
- * @param lines
- * @param cols
- */
- void setDimensions(int lines, int cols);
-
- /**
- * This method makes room for N characters on the current line at the cursor
- * position. Text under the cursor moves right without wrapping at the end
- * of the line.
- * 01234
- * 0 123
- */
- void insertCharacters(int charactersToInsert);
-
- /**
- * Erases from cursor to end of screen, including cursor position. Cursor does not move.
- */
- void eraseToEndOfScreen();
-
- /**
- * Erases from beginning of screen to cursor, including cursor position. Cursor does not move.
- */
- void eraseToCursor();
-
- /**
- * Erases complete display. All lines are erased and changed to single-width. Cursor does not move.
- */
- void eraseAll();
-
- /**
- * Erases complete line.
- */
- void eraseLine();
-
- /**
- * Erases from cursor to end of line, including cursor position.
- */
- void eraseLineToEnd();
-
- /**
- * Erases from beginning of line to cursor, including cursor position.
- */
- void eraseLineToCursor();
-
- /**
- * Inserts n lines at line with cursor. Lines displayed below cursor move down.
- * Lines moved past the bottom margin are lost. This sequence is ignored when
- * cursor is outside scrolling region.
- * @param n the number of lines to insert
- */
- void insertLines(int n);
-
- /**
- * Deletes n characters, starting with the character at cursor position.
- * When a character is deleted, all characters to the right of cursor move
- * left. This creates a space character at right margin. This character
- * has same character attribute as the last character moved left.
- * @param n
- * 012345
- * 0145xx
- */
- void deleteCharacters(int n);
-
- /**
- * Deletes n lines, starting at line with cursor. As lines are deleted,
- * lines displayed below cursor move up. Lines added to bottom of screen
- * have spaces with same character attributes as last line moved up. This
- * sequence is ignored when cursor is outside scrolling region.
- * @param n the number of lines to delete
- */
- void deleteLines(int n);
-
- Style getDefaultStyle();
-
- void setDefaultStyle(Style defaultStyle);
-
- Style getStyle();
-
- /**
- * Sets the style to be used from now on
- * @param style
- */
- void setStyle(Style style);
-
- /**
- * This method displays a subset of the newly-received text in the Terminal
- * view, wrapping text at the right edge of the screen and overwriting text
- * when the cursor is not at the very end of the screen's text.
- * <p>
- *
- * There are never any ANSI control characters or escape sequences in the
- * text being displayed by this method (this includes newlines, carriage
- * returns, and tabs).
- * <p>
- */
- void appendString(String buffer);
-
- /**
- * Process a newline (Control-J) character. A newline (NL) character just
- * moves the cursor to the same column on the next line, creating new lines
- * when the cursor reaches the bottom edge of the terminal. This is
- * counter-intuitive, especially to UNIX programmers who are taught that
- * writing a single NL to a terminal is sufficient to move the cursor to the
- * first column of the next line, as if a carriage return (CR) and a NL were
- * written.
- * <p>
- *
- * UNIX terminals typically display a NL character as a CR followed by a NL
- * because the terminal device typically has the ONLCR attribute bit set
- * (see the termios(4) man page for details), which causes the terminal
- * device driver to translate NL to CR + NL on output. The terminal itself
- * (i.e., a hardware terminal or a terminal emulator, like xterm or this
- * code) _always_ interprets a CR to mean "move the cursor to the beginning
- * of the current line" and a NL to mean "move the cursor to the same column
- * on the next line".
- * <p>
- */
- void processNewline();
-
- /**
- * This method returns the relative line number of the line containing the
- * cursor. The returned line number is relative to the topmost visible line,
- * which has relative line number 0.
- *
- * @return The relative line number of the line containing the cursor.
- */
- int getCursorLine();
-
- int getCursorColumn();
-
- /**
- * This method moves the cursor to the specified line and column. Parameter
- * <i>targetLine</i> is the line number of a screen line, so it has a
- * minimum value of 0 (the topmost screen line) and a maximum value of
- * heightInLines - 1 (the bottommost screen line). A line does not have to
- * contain any text to move the cursor to any column in that line.
- */
- void setCursor(int targetLine, int targetColumn);
-
- void setCursorColumn(int targetColumn);
-
- void setCursorLine(int targetLine);
-
- int getLines();
-
- int getColumns();
-
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/LoggingOutputStream.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/LoggingOutputStream.java
deleted file mode 100644
index b71c90744..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/LoggingOutputStream.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tm.internal.terminal.emulator;
-
-import java.io.FilterOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-
-import org.eclipse.tm.internal.terminal.provisional.api.Logger;
-
-public class LoggingOutputStream extends FilterOutputStream {
-
- public LoggingOutputStream(OutputStream out) {
- super(out);
- }
-
- public void write(byte[] b, int off, int len) throws IOException {
- if(Logger.isLogEnabled())
- Logger.log("Received " + len + " bytes: '" + //$NON-NLS-1$ //$NON-NLS-2$
- Logger.encode(new String(b, 0, len)) + "'"); //$NON-NLS-1$
-
- // we cannot call super.write, because this would call our write
- // which logs character by character.....
- //super.write(b, off, len);
- if ((off | len | (b.length - (len + off)) | (off + len)) < 0)
- throw new IndexOutOfBoundsException();
-
- for (int i = 0 ; i < len ; i++) {
- super.write(b[off + i]);
- }
- }
-
- public void write(int b) throws IOException {
- if(Logger.isLogEnabled())
- Logger.log("Received " + 1 + " bytes: '" + //$NON-NLS-1$ //$NON-NLS-2$
- Logger.encode(new String(new byte[]{(byte)b}, 0, 1)) + "'"); //$NON-NLS-1$
- super.write(b);
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/VT100BackendTraceDecorator.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/VT100BackendTraceDecorator.java
deleted file mode 100644
index c4d57ab98..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/VT100BackendTraceDecorator.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tm.internal.terminal.emulator;
-
-import java.io.PrintStream;
-
-import org.eclipse.tm.terminal.model.Style;
-
-public class VT100BackendTraceDecorator implements IVT100EmulatorBackend {
- final IVT100EmulatorBackend fBackend;
- final PrintStream fWriter;
- public VT100BackendTraceDecorator(IVT100EmulatorBackend backend, PrintStream out) {
- fBackend = backend;
- fWriter=out;
- }
-
- public void appendString(String buffer) {
- fWriter.println("appendString(\""+buffer+"\")"); //$NON-NLS-1$ //$NON-NLS-2$
- fBackend.appendString(buffer);
- }
-
- public void clearAll() {
- fWriter.println("clearAll()"); //$NON-NLS-1$
- fBackend.clearAll();
- }
-
- public void deleteCharacters(int n) {
- fWriter.println("deleteCharacters("+n+")"); //$NON-NLS-1$ //$NON-NLS-2$
- fBackend.deleteCharacters(n);
- }
-
- public void deleteLines(int n) {
- fWriter.println("deleteLines("+n+")"); //$NON-NLS-1$ //$NON-NLS-2$
- fBackend.deleteLines(n);
- }
-
- public void eraseAll() {
- fWriter.println("eraseAll()"); //$NON-NLS-1$
- fBackend.eraseAll();
- }
-
- public void eraseLine() {
- fWriter.println("eraseLine()"); //$NON-NLS-1$
- fBackend.eraseLine();
- }
-
- public void eraseLineToCursor() {
- fWriter.println("eraseLineToCursor()"); //$NON-NLS-1$
- fBackend.eraseLineToCursor();
- }
-
- public void eraseLineToEnd() {
- fWriter.println("eraseLineToEnd()"); //$NON-NLS-1$
- fBackend.eraseLineToEnd();
- }
-
- public void eraseToCursor() {
- fWriter.println("eraseToCursor()"); //$NON-NLS-1$
- fBackend.eraseToCursor();
- }
-
- public void eraseToEndOfScreen() {
- fWriter.println("eraseToEndOfScreen()"); //$NON-NLS-1$
- fBackend.eraseToEndOfScreen();
- }
-
- public int getColumns() {
- return fBackend.getColumns();
- }
-
- public int getCursorColumn() {
- return fBackend.getCursorColumn();
- }
-
- public int getCursorLine() {
- return fBackend.getCursorLine();
- }
-
- public Style getDefaultStyle() {
- return fBackend.getDefaultStyle();
- }
-
- public int getLines() {
- return fBackend.getLines();
- }
-
- public Style getStyle() {
- return fBackend.getStyle();
- }
-
- public void insertCharacters(int charactersToInsert) {
- fWriter.println("insertCharacters("+charactersToInsert+")"); //$NON-NLS-1$ //$NON-NLS-2$
- fBackend.insertCharacters(charactersToInsert);
- }
-
- public void insertLines(int n) {
- fWriter.println("insertLines("+n+")"); //$NON-NLS-1$ //$NON-NLS-2$
- fBackend.insertLines(n);
- }
-
- public void processNewline() {
- fWriter.println("processNewline()"); //$NON-NLS-1$
- fBackend.processNewline();
- }
-
- public void setCursor(int targetLine, int targetColumn) {
- fWriter.println("setCursor("+targetLine+", "+targetColumn+")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- fBackend.setCursor(targetLine, targetColumn);
- }
-
- public void setCursorColumn(int targetColumn) {
- fWriter.println("setCursorColumn("+targetColumn+")"); //$NON-NLS-1$ //$NON-NLS-2$
- fBackend.setCursorColumn(targetColumn);
- }
-
- public void setCursorLine(int targetLine) {
- fWriter.println("setCursorLine("+targetLine+")"); //$NON-NLS-1$ //$NON-NLS-2$
- fBackend.setCursorLine(targetLine);
- }
-
- public void setDefaultStyle(Style defaultStyle) {
- fWriter.println("setDefaultStyle("+defaultStyle+")"); //$NON-NLS-1$ //$NON-NLS-2$
- fBackend.setDefaultStyle(defaultStyle);
- }
-
- public void setDimensions(int lines, int cols) {
- fWriter.println("setDimensions("+lines+","+cols+")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- fBackend.setDimensions(lines, cols);
- }
-
- public void setStyle(Style style) {
- fWriter.println("setStyle("+style+")"); //$NON-NLS-1$ //$NON-NLS-2$
- fBackend.setStyle(style);
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/VT100Emulator.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/VT100Emulator.java
deleted file mode 100644
index 0ed683b3c..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/VT100Emulator.java
+++ /dev/null
@@ -1,1167 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2009 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) - [209746] There are cases where some colors not displayed correctly
- * Martin Oberhuber (Wind River) - [168197] Fix Terminal for CDC-1.1/Foundation-1.1
- * Michael Scharf (Wind River) - [262996] get rid of TerminalState.OPENED
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.emulator;
-
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.io.Reader;
-
-import org.eclipse.swt.events.ControlEvent;
-import org.eclipse.swt.events.ControlListener;
-import org.eclipse.tm.internal.terminal.control.impl.ITerminalControlForText;
-import org.eclipse.tm.internal.terminal.control.impl.TerminalPlugin;
-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;
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-import org.eclipse.tm.terminal.model.Style;
-
-/**
- * This class processes character data received from the remote host and
- * displays it to the user using the Terminal view's StyledText widget. This
- * class processes ANSI control characters, including NUL, backspace, carriage
- * return, linefeed, and a subset of ANSI escape sequences sufficient to allow
- * use of screen-oriented applications, such as vi, Emacs, and any GNU
- * readline-enabled application (Bash, bc, ncftp, etc.).
- * <p>
- *
- * @author Fran Litterio <francis.litterio@windriver.com>
- * @author Chris Thew <chris.thew@windriver.com>
- */
-public class VT100Emulator implements ControlListener {
- /** This is a character processing state: Initial state. */
- private static final int ANSISTATE_INITIAL = 0;
-
- /** This is a character processing state: We've seen an escape character. */
- private static final int ANSISTATE_ESCAPE = 1;
-
- /**
- * This is a character processing state: We've seen a '[' after an escape
- * character. Expecting a parameter character or a command character next.
- */
- private static final int ANSISTATE_EXPECTING_PARAMETER_OR_COMMAND = 2;
-
- /**
- * This is a character processing state: We've seen a ']' after an escape
- * character. We are now expecting an operating system command that
- * reprograms an intelligent terminal.
- */
- private static final int ANSISTATE_EXPECTING_OS_COMMAND = 3;
-
- /**
- * This field holds the current state of the Finite TerminalState Automaton (FSA)
- * that recognizes ANSI escape sequences.
- *
- * @see #processNewText()
- */
- private int ansiState = ANSISTATE_INITIAL;
-
- /**
- * This field holds a reference to the {@link TerminalControl} object that
- * instantiates this class.
- */
- private final ITerminalControlForText terminal;
-
- /**
- * This field holds a reference to the StyledText widget that is used to
- * display text to the user.
- */
- final private IVT100EmulatorBackend text;
- /**
- * This field hold the saved absolute line number of the cursor when
- * processing the "ESC 7" and "ESC 8" command sequences.
- */
- private int savedCursorLine = 0;
-
- /**
- * This field hold the saved column number of the cursor when processing the
- * "ESC 7" and "ESC 8" command sequences.
- */
- private int savedCursorColumn = 0;
-
- /**
- * This field holds an array of StringBuffer objects, each of which is one
- * parameter from the current ANSI escape sequence. For example, when
- * parsing the escape sequence "\e[20;10H", this array holds the strings
- * "20" and "10".
- */
- private final StringBuffer[] ansiParameters = new StringBuffer[16];
-
- /**
- * This field holds the OS-specific command found in an escape sequence of
- * the form "\e]...\u0007".
- */
- private final StringBuffer ansiOsCommand = new StringBuffer(128);
-
- /**
- * This field holds the index of the next unused element of the array stored
- * in field {@link #ansiParameters}.
- */
- private int nextAnsiParameter = 0;
-
- Reader fReader;
-
- boolean fCrAfterNewLine;
- /**
- * The constructor.
- */
- public VT100Emulator(ITerminalTextData data, ITerminalControlForText terminal, Reader reader) {
- super();
-
- Logger.log("entered"); //$NON-NLS-1$
-
- this.terminal = terminal;
-
- for (int i = 0; i < ansiParameters.length; ++i) {
- ansiParameters[i] = new StringBuffer();
- }
- setInputStreamReader(reader);
- if(TerminalPlugin.isOptionEnabled("org.eclipse.tm.terminal/debug/log/VT100Backend")) //$NON-NLS-1$
- text=new VT100BackendTraceDecorator(new VT100EmulatorBackend(data),System.out);
- else
- text=new VT100EmulatorBackend(data);
-
-// text.setDimensions(24, 80);
- Style style=Style.getStyle("BLACK", "WHITE"); //$NON-NLS-1$ //$NON-NLS-2$
- text.setDefaultStyle(style);
- text.setStyle(style);
- }
-
- /**
- * Set the reader that this Terminal gets its input from.
- *
- * The reader can be changed while the Terminal is running, but a change of
- * the reader likely loses some characters which have not yet been fully
- * read. Changing the reader can be done in order to change the selected
- * Encoding, though. This is typically done when the Terminal is
- * constructed, i.e. before it really starts operation; or, when the user
- * manually selects a different encoding and thus doesn't care about losing
- * old characters.
- *
- * @param reader the new Reader
- */
- public void setInputStreamReader(Reader reader) {
- fReader = reader;
- }
-
- public void setDimensions(int lines,int cols) {
- text.setDimensions(lines, cols);
- ITerminalConnector telnetConnection = getConnector();
- if (telnetConnection != null) {
- telnetConnection.setTerminalSize(text.getColumns(), text.getLines());
- }
-
- }
-
- /**
- * This method performs clean up when this VT100Emulator object is no longer
- * needed. After calling this method, no other method on this object should
- * be called.
- */
- public void dispose() {
- }
-
- /**
- * This method is required by interface ControlListener. It allows us to
- * know when the StyledText widget is moved.
- */
- public void controlMoved(ControlEvent event) {
- Logger.log("entered"); //$NON-NLS-1$
- // Empty.
- }
-
- /**
- * This method is required by interface ControlListener. It allows us to
- * know when the StyledText widget is resized.
- */
- public void controlResized(ControlEvent event) {
- Logger.log("entered"); //$NON-NLS-1$
- adjustTerminalDimensions();
- }
-
- /**
- * This method erases all text from the Terminal view.
- */
- public void clearTerminal() {
- Logger.log("entered"); //$NON-NLS-1$
- text.clearAll();
- }
-
- /**
- * This method is called when the user changes the Terminal view's font. We
- * attempt to recompute the pixel width of the new font's characters and fix
- * the terminal's dimensions.
- */
- public void fontChanged() {
- Logger.log("entered"); //$NON-NLS-1$
-
- if (text != null)
- adjustTerminalDimensions();
- }
-// /**
-// * This method executes in the Display thread to process data received from
-// * the remote host by class {@link org.eclipse.tm.internal.terminal.telnet.TelnetConnection} and
-// * other implementors of {@link ITerminalConnector}, like the
-// * SerialPortHandler.
-// * <p>
-// * These connectors write text to the terminal's buffer through
-// * {@link TerminalControl#writeToTerminal(String)} and then have
-// * this run method executed in the display thread. This method
-// * must not execute at the same time as methods
-// * {@link #setNewText(StringBuffer)} and {@link #clearTerminal()}.
-// * <p>
-// * IMPORTANT: This method must be called in strict alternation with method
-// * {@link #setNewText(StringBuffer)}.
-// * <p>
-// */
- public void processText() {
- try {
- // Find the width and height of the terminal, and resize it to display an
- // integral number of lines and columns.
-
- adjustTerminalDimensions();
-
- // Restore the caret offset, process and display the new text, then save
- // the caret offset. See the documentation for field caretOffset for
- // details.
-
- // ISSUE: Is this causing the scroll-to-bottom-on-output behavior?
-
- try {
- processNewText();
- } catch (IOException e) {
- Logger.logException(e);
- }
-
- } catch (Exception ex) {
- Logger.logException(ex);
- }
- }
- /**
- * This method scans the newly received text, processing ANSI control
- * characters and escape sequences and displaying normal text.
- * @throws IOException
- */
- private void processNewText() throws IOException {
- Logger.log("entered"); //$NON-NLS-1$
-
-
- // Scan the newly received text.
-
- while (hasNextChar()) {
- char character = getNextChar();
-
- switch (ansiState) {
- case ANSISTATE_INITIAL:
- switch (character) {
- case '\u0000':
- break; // NUL character. Ignore it.
-
- case '\u0007':
- processBEL(); // BEL (Control-G)
- break;
-
- case '\b':
- processBackspace(); // Backspace
- break;
-
- case '\t':
- processTab(); // Tab.
- break;
-
- case '\n':
- processNewline(); // Newline (Control-J)
- if(fCrAfterNewLine)
- processCarriageReturn(); // Carriage Return (Control-M)
- break;
-
- case '\r':
- processCarriageReturn(); // Carriage Return (Control-M)
- break;
-
- case '\u001b':
- ansiState = ANSISTATE_ESCAPE; // Escape.
- break;
-
- default:
- processNonControlCharacters(character);
- break;
- }
- break;
-
- case ANSISTATE_ESCAPE:
- // We've seen an escape character. Here, we process the character
- // immediately following the escape.
-
- switch (character) {
- case '[':
- ansiState = ANSISTATE_EXPECTING_PARAMETER_OR_COMMAND;
- nextAnsiParameter = 0;
-
- // Erase the parameter strings in preparation for optional
- // parameter characters.
-
- for (int i = 0; i < ansiParameters.length; ++i) {
- ansiParameters[i].delete(0, ansiParameters[i].length());
- }
- break;
-
- case ']':
- ansiState = ANSISTATE_EXPECTING_OS_COMMAND;
- ansiOsCommand.delete(0, ansiOsCommand.length());
- break;
-
- case '7':
- // Save cursor position and character attributes
-
- ansiState = ANSISTATE_INITIAL;
- savedCursorLine = relativeCursorLine();
- savedCursorColumn = getCursorColumn();
- break;
-
- case '8':
- // Restore cursor and attributes to previously saved
- // position
-
- ansiState = ANSISTATE_INITIAL;
- moveCursor(savedCursorLine, savedCursorColumn);
- break;
-
- case 'c':
- // Reset the terminal
- ansiState = ANSISTATE_INITIAL;
- resetTerminal();
- break;
-
- default:
- Logger
- .log("Unsupported escape sequence: escape '" + character + "'"); //$NON-NLS-1$ //$NON-NLS-2$
- ansiState = ANSISTATE_INITIAL;
- break;
- }
- break;
-
- case ANSISTATE_EXPECTING_PARAMETER_OR_COMMAND:
- // Parameters can appear after the '[' in an escape sequence, but they
- // are optional.
-
- if (character == '@' || (character >= 'A' && character <= 'Z')
- || (character >= 'a' && character <= 'z')) {
- ansiState = ANSISTATE_INITIAL;
- processAnsiCommandCharacter(character);
- } else {
- processAnsiParameterCharacter(character);
- }
- break;
-
- case ANSISTATE_EXPECTING_OS_COMMAND:
- // A BEL (\u0007) character marks the end of the OSC sequence.
-
- if (character == '\u0007') {
- ansiState = ANSISTATE_INITIAL;
- processAnsiOsCommand();
- } else {
- ansiOsCommand.append(character);
- }
- break;
-
- default:
- // This should never happen! If it does happen, it means there is a
- // bug in the FSA. For robustness, we return to the initial
- // state.
-
- Logger.log("INVALID ANSI FSA STATE: " + ansiState); //$NON-NLS-1$
- ansiState = ANSISTATE_INITIAL;
- break;
- }
- }
- }
- private void resetTerminal() {
- text.eraseAll();
- text.setCursor(0, 0);
- text.setStyle(text.getDefaultStyle());
- }
- /**
- * This method is called when we have parsed an OS Command escape sequence.
- * The only one we support is "\e]0;...\u0007", which sets the terminal
- * title.
- */
- private void processAnsiOsCommand() {
- if (ansiOsCommand.charAt(0) != '0' || ansiOsCommand.charAt(1) != ';') {
- Logger
- .log("Ignoring unsupported ANSI OSC sequence: '" + ansiOsCommand + "'"); //$NON-NLS-1$ //$NON-NLS-2$
- return;
- }
- terminal.setTerminalTitle(ansiOsCommand.substring(2));
- }
-
- /**
- * This method dispatches control to various processing methods based on the
- * command character found in the most recently received ANSI escape
- * sequence. This method only handles command characters that follow the
- * ANSI standard Control Sequence Introducer (CSI), which is "\e[...", where
- * "..." is an optional ';'-separated sequence of numeric parameters.
- * <p>
- */
- private void processAnsiCommandCharacter(char ansiCommandCharacter) {
- // If the width or height of the terminal is ridiculously small (one line or
- // column or less), don't even try to process the escape sequence. This avoids
- // throwing an exception (SPR 107450). The display will be messed up, but what
- // did you user expect by making the terminal so small?
-
- switch (ansiCommandCharacter) {
- case '@':
- // Insert character(s).
- processAnsiCommand_atsign();
- break;
-
- case 'A':
- // Move cursor up N lines (default 1).
- processAnsiCommand_A();
- break;
-
- case 'B':
- // Move cursor down N lines (default 1).
- processAnsiCommand_B();
- break;
-
- case 'C':
- // Move cursor forward N columns (default 1).
- processAnsiCommand_C();
- break;
-
- case 'D':
- // Move cursor backward N columns (default 1).
- processAnsiCommand_D();
- break;
-
- case 'E':
- // Move cursor to first column of Nth next line (default 1).
- processAnsiCommand_E();
- break;
-
- case 'F':
- // Move cursor to first column of Nth previous line (default 1).
- processAnsiCommand_F();
- break;
-
- case 'G':
- // Move to column N of current line (default 1).
- processAnsiCommand_G();
- break;
-
- case 'H':
- // Set cursor Position.
- processAnsiCommand_H();
- break;
-
- case 'J':
- // Erase part or all of display. Cursor does not move.
- processAnsiCommand_J();
- break;
-
- case 'K':
- // Erase in line (cursor does not move).
- processAnsiCommand_K();
- break;
-
- case 'L':
- // Insert line(s) (current line moves down).
- processAnsiCommand_L();
- break;
-
- case 'M':
- // Delete line(s).
- processAnsiCommand_M();
- break;
-
- case 'm':
- // Set Graphics Rendition (SGR).
- processAnsiCommand_m();
- break;
-
- case 'n':
- // Device Status Report (DSR).
- processAnsiCommand_n();
- break;
-
- case 'P':
- // Delete character(s).
- processAnsiCommand_P();
- break;
-
- case 'S':
- // Scroll up.
- // Emacs, vi, and GNU readline don't seem to use this command, so we ignore
- // it for now.
- break;
-
- case 'T':
- // Scroll down.
- // Emacs, vi, and GNU readline don't seem to use this command, so we ignore
- // it for now.
- break;
-
- case 'X':
- // Erase character.
- // Emacs, vi, and GNU readline don't seem to use this command, so we ignore
- // it for now.
- break;
-
- case 'Z':
- // Cursor back tab.
- // Emacs, vi, and GNU readline don't seem to use this command, so we ignore
- // it for now.
- break;
-
- default:
- Logger.log("Ignoring unsupported ANSI command character: '" + //$NON-NLS-1$
- ansiCommandCharacter + "'"); //$NON-NLS-1$
- break;
- }
- }
-
- /**
- * This method makes room for N characters on the current line at the cursor
- * position. Text under the cursor moves right without wrapping at the end
- * of the line.
- */
- private void processAnsiCommand_atsign() {
- int charactersToInsert = getAnsiParameter(0);
- text.insertCharacters(charactersToInsert);
- }
-
- /**
- * This method moves the cursor up by the number of lines specified by the
- * escape sequence parameter (default 1).
- */
- private void processAnsiCommand_A() {
- moveCursorUp(getAnsiParameter(0));
- }
-
- /**
- * This method moves the cursor down by the number of lines specified by the
- * escape sequence parameter (default 1).
- */
- private void processAnsiCommand_B() {
- moveCursorDown(getAnsiParameter(0));
- }
-
- /**
- * This method moves the cursor forward by the number of columns specified
- * by the escape sequence parameter (default 1).
- */
- private void processAnsiCommand_C() {
- moveCursorForward(getAnsiParameter(0));
- }
-
- /**
- * This method moves the cursor backward by the number of columns specified
- * by the escape sequence parameter (default 1).
- */
- private void processAnsiCommand_D() {
- moveCursorBackward(getAnsiParameter(0));
- }
-
- /**
- * This method moves the cursor to the first column of the Nth next line,
- * where N is specified by the ANSI parameter (default 1).
- */
- private void processAnsiCommand_E() {
- int linesToMove = getAnsiParameter(0);
-
- moveCursor(relativeCursorLine() + linesToMove, 0);
- }
-
- /**
- * This method moves the cursor to the first column of the Nth previous
- * line, where N is specified by the ANSI parameter (default 1).
- */
- private void processAnsiCommand_F() {
- int linesToMove = getAnsiParameter(0);
-
- moveCursor(relativeCursorLine() - linesToMove, 0);
- }
-
- /**
- * This method moves the cursor within the current line to the column
- * specified by the ANSI parameter (default is column 1).
- */
- private void processAnsiCommand_G() {
- int targetColumn = 1;
-
- if (ansiParameters[0].length() > 0)
- targetColumn = getAnsiParameter(0) - 1;
-
- moveCursor(relativeCursorLine(), targetColumn);
- }
-
- /**
- * This method sets the cursor to a position specified by the escape
- * sequence parameters (default is the upper left corner of the screen).
- */
- private void processAnsiCommand_H() {
- moveCursor(getAnsiParameter(0) - 1, getAnsiParameter(1) - 1);
- }
-
- /**
- * This method deletes some (or all) of the text on the screen without
- * moving the cursor.
- */
- private void processAnsiCommand_J() {
- int ansiParameter;
-
- if (ansiParameters[0].length() == 0)
- ansiParameter = 0;
- else
- ansiParameter = getAnsiParameter(0);
-
- switch (ansiParameter) {
- case 0:
- text.eraseToEndOfScreen();
- break;
-
- case 1:
- // Erase from beginning to current position (inclusive).
- text.eraseToCursor();
- break;
-
- case 2:
- // Erase entire display.
-
- text.eraseAll();
- break;
-
- default:
- Logger.log("Unexpected J-command parameter: " + ansiParameter); //$NON-NLS-1$
- break;
- }
- }
-
- /**
- * This method deletes some (or all) of the text in the current line without
- * moving the cursor.
- */
- private void processAnsiCommand_K() {
- int ansiParameter = getAnsiParameter(0);
-
- switch (ansiParameter) {
- case 0:
- // Erase from beginning to current position (inclusive).
- text.eraseLineToCursor();
- break;
-
- case 1:
- // Erase from current position to end (inclusive).
- text.eraseLineToEnd();
- break;
-
- case 2:
- // Erase entire line.
- text.eraseLine();
- break;
-
- default:
- Logger.log("Unexpected K-command parameter: " + ansiParameter); //$NON-NLS-1$
- break;
- }
- }
-
- /**
- * Insert one or more blank lines. The current line of text moves down. Text
- * that falls off the bottom of the screen is deleted.
- */
- private void processAnsiCommand_L() {
- text.insertLines(getAnsiParameter(0));
- }
-
- /**
- * Delete one or more lines of text. Any lines below the deleted lines move
- * up, which we implement by appending newlines to the end of the text.
- */
- private void processAnsiCommand_M() {
- text.deleteLines(getAnsiParameter(0));
- }
-
- /**
- * This method sets a new graphics rendition mode, such as
- * foreground/background color, bold/normal text, and reverse video.
- */
- private void processAnsiCommand_m() {
- if (ansiParameters[0].length() == 0) {
- // This a special case: when no ANSI parameter is specified, act like a
- // single parameter equal to 0 was specified.
-
- ansiParameters[0].append('0');
- }
- Style style=text.getStyle();
- // There are a non-zero number of ANSI parameters. Process each one in
- // order.
-
- int totalParameters = ansiParameters.length;
- int parameterIndex = 0;
-
- while (parameterIndex < totalParameters
- && ansiParameters[parameterIndex].length() > 0) {
- int ansiParameter = getAnsiParameter(parameterIndex);
-
- switch (ansiParameter) {
- case 0:
- // Reset all graphics modes.
- text.setStyle(text.getDefaultStyle());
- break;
-
- case 1:
- text.setStyle(style.setBold(true));
- break;
-
- case 7:
- text.setStyle(style.setReverse(true));
- break;
-
- case 10: // Set primary font. Ignored.
- break;
-
-// case 22:
-// // TODO
-// //currentFontStyle = SWT.NORMAL; // Cancel bold or dim attributes
-// // only.
-// break;
-
- case 27:
- text.setStyle(style.setReverse(false));
- break;
-
- case 30:
- text.setStyle(style.setForground("BLACK")); //$NON-NLS-1$
- break;
-
- case 31:
- text.setStyle(style.setForground("RED")); //$NON-NLS-1$
- break;
-
- case 32:
- text.setStyle(style.setForground("GREEN")); //$NON-NLS-1$
- break;
-
- case 33:
- text.setStyle(style.setForground("YELLOW")); //$NON-NLS-1$
- break;
-
- case 34:
- text.setStyle(style.setForground("BLUE")); //$NON-NLS-1$
- break;
-
- case 35:
- text.setStyle(style.setForground("MAGENTA")); //$NON-NLS-1$
- break;
-
- case 36:
- text.setStyle(style.setForground("CYAN")); //$NON-NLS-1$
- break;
-
- case 37:
- text.setStyle(style.setForground("WHITE_FOREGROUND")); //$NON-NLS-1$
- break;
-
- case 40:
- text.setStyle(style.setBackground("BLACK")); //$NON-NLS-1$
- break;
-
- case 41:
- text.setStyle(style.setBackground("RED")); //$NON-NLS-1$
- break;
-
- case 42:
- text.setStyle(style.setBackground("GREEN")); //$NON-NLS-1$
- break;
-
- case 43:
- text.setStyle(style.setBackground("YELLOW")); //$NON-NLS-1$
- break;
-
- case 44:
- text.setStyle(style.setBackground("BLUE")); //$NON-NLS-1$
- break;
-
- case 45:
- text.setStyle(style.setBackground("MAGENTA")); //$NON-NLS-1$
- break;
-
- case 46:
- text.setStyle(style.setBackground("CYAN")); //$NON-NLS-1$
- break;
-
- case 47:
- text.setStyle(style.setBackground("WHITE")); //$NON-NLS-1$
- break;
-
- default:
- Logger
- .log("Unsupported graphics rendition parameter: " + ansiParameter); //$NON-NLS-1$
- break;
- }
-
- ++parameterIndex;
- }
- }
-
- /**
- * This method responds to an ANSI Device Status Report (DSR) command from
- * the remote endpoint requesting the cursor position. Requests for other
- * kinds of status are ignored.
- */
- private void processAnsiCommand_n() {
- // Do nothing if the numeric parameter was not 6 (which means report cursor
- // position).
-
- if (getAnsiParameter(0) != 6)
- return;
-
- // Send the ANSI cursor position (which is 1-based) to the remote endpoint.
-
- String positionReport = "\u001b[" + (relativeCursorLine() + 1) + ";" + //$NON-NLS-1$ //$NON-NLS-2$
- (getCursorColumn() + 1) + "R"; //$NON-NLS-1$
-
- try {
- OutputStreamWriter streamWriter = new OutputStreamWriter(terminal.getOutputStream(), "ISO-8859-1"); //$NON-NLS-1$
- streamWriter.write(positionReport, 0, positionReport.length());
- streamWriter.flush();
- } catch (IOException ex) {
- Logger.log("Caught IOException!"); //$NON-NLS-1$
- }
- }
-
- /**
- * Deletes one or more characters starting at the current cursor position.
- * Characters on the same line and to the right of the deleted characters
- * move left. If there are no characters on the current line at or to the
- * right of the cursor column, no text is deleted.
- */
- private void processAnsiCommand_P() {
- text.deleteCharacters(getAnsiParameter(0));
- }
-
- /**
- * This method returns one of the numeric ANSI parameters received in the
- * most recent escape sequence.
- *
- * @return The <i>parameterIndex</i>th numeric ANSI parameter or -1 if the
- * index is out of range.
- */
- private int getAnsiParameter(int parameterIndex) {
- if (parameterIndex < 0 || parameterIndex >= ansiParameters.length) {
- // This should never happen.
- return -1;
- }
-
- String parameter = ansiParameters[parameterIndex].toString();
-
- if (parameter.length() == 0)
- return 1;
-
- int parameterValue = 1;
-
- // Don't trust the remote endpoint to send well formed numeric
- // parameters.
-
- try {
- parameterValue = Integer.parseInt(parameter);
- } catch (NumberFormatException ex) {
- parameterValue = 1;
- }
-
- return parameterValue;
- }
-
- /**
- * This method processes a single parameter character in an ANSI escape
- * sequence. Parameters are the (optional) characters between the leading
- * "\e[" and the command character in an escape sequence (e.g., in the
- * escape sequence "\e[20;10H", the parameter characters are "20;10").
- * Parameters are integers separated by one or more ';'s.
- */
- private void processAnsiParameterCharacter(char ch) {
- if (ch == ';') {
- ++nextAnsiParameter;
- } else {
- if (nextAnsiParameter < ansiParameters.length)
- ansiParameters[nextAnsiParameter].append(ch);
- }
- }
- /**
- * This method processes a contiguous sequence of non-control characters.
- * This is a performance optimization, so that we don't have to insert or
- * append each non-control character individually to the StyledText widget.
- * A non-control character is any character that passes the condition in the
- * below while loop.
- * @throws IOException
- */
- private void processNonControlCharacters(char character) throws IOException {
- StringBuffer buffer=new StringBuffer();
- buffer.append(character);
- // Identify a contiguous sequence of non-control characters, starting at
- // firstNonControlCharacterIndex in newText.
- while(hasNextChar()) {
- character=getNextChar();
- if(character == '\u0000' || character == '\b' || character == '\t'
- || character == '\u0007' || character == '\n'
- || character == '\r' || character == '\u001b') {
- pushBackChar(character);
- break;
- }
- buffer.append(character);
- }
-
- // Now insert the sequence of non-control characters in the StyledText widget
- // at the location of the cursor.
-
- displayNewText(buffer.toString());
- }
-
- /**
- * This method displays a subset of the newly-received text in the Terminal
- * view, wrapping text at the right edge of the screen and overwriting text
- * when the cursor is not at the very end of the screen's text.
- * <p>
- *
- * There are never any ANSI control characters or escape sequences in the
- * text being displayed by this method (this includes newlines, carriage
- * returns, and tabs).
- * <p>
- */
- private void displayNewText(String buffer) {
- text.appendString(buffer);
- }
-
-
- /**
- * Process a BEL (Control-G) character.
- */
- private void processBEL() {
- // TODO
- //Display.getDefault().beep();
- }
-
- /**
- * Process a backspace (Control-H) character.
- */
- private void processBackspace() {
- moveCursorBackward(1);
- }
-
- /**
- * Process a tab (Control-I) character. We don't insert a tab character into
- * the StyledText widget. Instead, we move the cursor forward to the next
- * tab stop, without altering any of the text. Tab stops are every 8
- * columns. The cursor will never move past the rightmost column.
- */
- private void processTab() {
- moveCursorForward(8 - (getCursorColumn() % 8));
- }
-
- /**
- * Process a newline (Control-J) character. A newline (NL) character just
- * moves the cursor to the same column on the next line, creating new lines
- * when the cursor reaches the bottom edge of the terminal. This is
- * counter-intuitive, especially to UNIX programmers who are taught that
- * writing a single NL to a terminal is sufficient to move the cursor to the
- * first column of the next line, as if a carriage return (CR) and a NL were
- * written.
- * <p>
- *
- * UNIX terminals typically display a NL character as a CR followed by a NL
- * because the terminal device typically has the ONLCR attribute bit set
- * (see the termios(4) man page for details), which causes the terminal
- * device driver to translate NL to CR + NL on output. The terminal itself
- * (i.e., a hardware terminal or a terminal emulator, like xterm or this
- * code) _always_ interprets a CR to mean "move the cursor to the beginning
- * of the current line" and a NL to mean "move the cursor to the same column
- * on the next line".
- * <p>
- */
- private void processNewline() {
- text.processNewline();
- }
-
- /**
- * Process a Carriage Return (Control-M).
- */
- private void processCarriageReturn() {
- text.setCursorColumn(0);
- }
-
- /**
- * This method computes the width of the terminal in columns and its height
- * in lines, then adjusts the width and height of the view's StyledText
- * widget so that it displays an integral number of lines and columns of
- * text. The adjustment is always to shrink the widget vertically or
- * horizontally, because if the control were to grow, it would be clipped by
- * the edges of the view window (i.e., the view window does not become
- * larger to accommodate its contents becoming larger).
- * <p>
- *
- * This method must be called immediately before each time text is written
- * to the terminal so that we can properly line wrap text. Because it is
- * called so frequently, it must be fast when there is no resizing to be
- * done.
- * <p>
- */
- private void adjustTerminalDimensions() {
- // Compute how many pixels we need to shrink the StyledText control vertically
- // to make it display an integral number of lines of text.
-
- // TODO
-// if(text.getColumns()!=80 && text.getLines()!=80)
-// text.setDimensions(24, 80);
- // If we are in a TELNET connection and we know the dimensions of the terminal,
- // we give the size information to the TELNET connection object so it can
- // communicate it to the TELNET server. If we are in a serial connection,
- // there is nothing we can do to tell the remote host about the size of the
- // terminal.
- ITerminalConnector telnetConnection = getConnector();
- // TODO MSA: send only if dimensions have really changed!
- if (telnetConnection != null) {
- telnetConnection.setTerminalSize(text.getColumns(), text.getLines());
- }
-
- }
-
- private ITerminalConnector getConnector() {
- if(terminal.getTerminalConnector()!=null)
- return terminal.getTerminalConnector();
- return null;
- }
-
- /**
- * This method returns the relative line number of the line containing the
- * cursor. The returned line number is relative to the topmost visible line,
- * which has relative line number 0.
- *
- * @return The relative line number of the line containing the cursor.
- */
- private int relativeCursorLine() {
- return text.getCursorLine();
- }
-
- /**
- * This method moves the cursor to the specified line and column. Parameter
- * <i>targetLine</i> is the line number of a screen line, so it has a
- * minimum value of 0 (the topmost screen line) and a maximum value of
- * heightInLines - 1 (the bottommost screen line). A line does not have to
- * contain any text to move the cursor to any column in that line.
- */
- private void moveCursor(int targetLine, int targetColumn) {
- text.setCursor(targetLine,targetColumn);
- }
-
- /**
- * This method moves the cursor down <i>lines</i> lines, but won't move the
- * cursor past the bottom of the screen. This method does not cause any
- * scrolling.
- */
- private void moveCursorDown(int lines) {
- moveCursor(relativeCursorLine() + lines, getCursorColumn());
- }
-
- /**
- * This method moves the cursor up <i>lines</i> lines, but won't move the
- * cursor past the top of the screen. This method does not cause any
- * scrolling.
- */
- private void moveCursorUp(int lines) {
- moveCursor(relativeCursorLine() - lines, getCursorColumn());
- }
-
- /**
- * This method moves the cursor forward <i>columns</i> columns, but won't
- * move the cursor past the right edge of the screen, nor will it move the
- * cursor onto the next line. This method does not cause any scrolling.
- */
- private void moveCursorForward(int columnsToMove) {
- moveCursor(relativeCursorLine(), getCursorColumn() + columnsToMove);
- }
-
- /**
- * This method moves the cursor backward <i>columnsToMove</i> columns, but
- * won't move the cursor past the left edge of the screen, nor will it move
- * the cursor onto the previous line. This method does not cause any
- * scrolling.
- */
- private void moveCursorBackward(int columnsToMove) {
- moveCursor(relativeCursorLine(), getCursorColumn() - columnsToMove);
- }
- /**
- * Resets the state of the terminal text (foreground color, background color,
- * font style and other internal state). It essentially makes it ready for new input.
- */
- public void resetState() {
- ansiState=ANSISTATE_INITIAL;
- text.setStyle(text.getDefaultStyle());
- }
-
-// public OutputStream getOutputStream() {
-// return fTerminalInputStream.getOutputStream();
-// }
-
- /**
- * Buffer for {@link #pushBackChar(char)}.
- */
- private int fNextChar=-1;
- private char getNextChar() throws IOException {
- int c=-1;
- if(fNextChar!=-1) {
- c= fNextChar;
- fNextChar=-1;
- } else {
- c = fReader.read();
- }
- // TODO: better end of file handling
- if(c==-1)
- c=0;
- return (char)c;
- }
-
- private boolean hasNextChar() throws IOException {
- if(fNextChar>=0)
- return true;
- return fReader.ready();
- }
-
- /**
- * Put back one character to the stream. This method can push
- * back exactly one character. The character is the next character
- * returned by {@link #getNextChar}
- * @param c the character to be pushed back.
- */
- void pushBackChar(char c) {
- //assert fNextChar!=-1: "Already a character waiting:"+fNextChar; //$NON-NLS-1$
- fNextChar=c;
- }
- private int getCursorColumn() {
- return text.getCursorColumn();
- }
- public boolean isCrAfterNewLine() {
- return fCrAfterNewLine;
- }
- public void setCrAfterNewLine(boolean crAfterNewLine) {
- fCrAfterNewLine = crAfterNewLine;
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/VT100EmulatorBackend.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/VT100EmulatorBackend.java
deleted file mode 100644
index 144582c27..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/VT100EmulatorBackend.java
+++ /dev/null
@@ -1,407 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tm.internal.terminal.emulator;
-
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-import org.eclipse.tm.terminal.model.Style;
-
-/**
- *
- */
-public class VT100EmulatorBackend implements IVT100EmulatorBackend {
-
- /**
- * This field holds the number of the column in which the cursor is
- * logically positioned. The leftmost column on the screen is column 0, and
- * column numbers increase to the right. The maximum value of this field is
- * {@link #widthInColumns} - 1. We track the cursor column using this field
- * to avoid having to recompute it repeatly using StyledText method calls.
- * <p>
- *
- * The StyledText widget that displays text has a vertical bar (called the
- * "caret") that appears _between_ character cells, but ANSI terminals have
- * the concept of a cursor that appears _in_ a character cell, so we need a
- * convention for which character cell the cursor logically occupies when
- * the caret is physically between two cells. The convention used in this
- * class is that the cursor is logically in column N when the caret is
- * physically positioned immediately to the _left_ of column N.
- * <p>
- *
- * When fCursorColumn is N, the next character output to the terminal appears
- * in column N. When a character is output to the rightmost column on a
- * given line (column widthInColumns - 1), the cursor moves to column 0 on
- * the next line after the character is drawn (this is how line wrapping is
- * implemented). If the cursor is in the bottommost line when line wrapping
- * occurs, the topmost visible line is scrolled off the top edge of the
- * screen.
- * <p>
- */
- private int fCursorColumn;
- private int fCursorLine;
- private Style fDefaultStyle;
- private Style fStyle;
- int fLines;
- int fColumns;
- final private ITerminalTextData fTerminal;
- public VT100EmulatorBackend(ITerminalTextData terminal) {
- fTerminal=terminal;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.emulator.IVT100EmulatorBackend#clearAll()
- */
- public void clearAll() {
- synchronized (fTerminal) {
- // clear the history
- int n=fTerminal.getHeight();
- for (int line = 0; line < n; line++) {
- fTerminal.cleanLine(line);
- }
- fTerminal.setDimensions(fLines, fTerminal.getWidth());
- setStyle(getDefaultStyle());
- setCursor(0, 0);
- }
- }
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.emulator.IVT100EmulatorBackend#setDimensions(int, int)
- */
- public void setDimensions(int lines, int cols) {
- synchronized (fTerminal) {
- if(lines==fLines && cols==fColumns)
- return; // nothing to do
- // cursor line from the bottom
- int cl=lines-(fLines-getCursorLine());
- int cc=getCursorColumn();
- int newLines=Math.max(lines,fTerminal.getHeight());
- // if the terminal has no history, then resize by
- // setting the size to the new size
- if(fTerminal.getHeight()==fLines) {
- if(lines<fLines) {
- cl+=fLines-lines;
- newLines=lines;
- // shrink by cutting empty lines at the bottom
-// int firstNoneEmptyLine;
-// for (firstNoneEmptyLine = fTerminal.getHeight(); firstNoneEmptyLine <= 0; firstNoneEmptyLine--) {
-// LineSegment[] segments = fTerminal.getLineSegments(firstNoneEmptyLine, 0, fTerminal.getWidth());
-// if(segments.length>1)
-// break;
-// // is the line empty?
-// if(segments[0].getText().replaceAll("[\000 ]+", "").length()==0)
-// break;
-// }
- } else {
- cl+=fLines-lines;
- }
- }
- fLines=lines;
- fColumns=cols;
- // make the terminal at least as high as we need lines
- fTerminal.setDimensions(newLines, fColumns);
- setCursor(cl, cc);
- }
- }
-
- int toAbsoluteLine(int line) {
- synchronized (fTerminal) {
- return fTerminal.getHeight()-fLines+line;
- }
- }
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.emulator.IVT100EmulatorBackend#insertCharacters(int)
- */
- public void insertCharacters(int charactersToInsert) {
- synchronized (fTerminal) {
- int line=toAbsoluteLine(fCursorLine);
- int n=charactersToInsert;
- for (int col = fColumns-1; col >=fCursorColumn+n; col--) {
- char c=fTerminal.getChar(line, col-n);
- Style style=fTerminal.getStyle(line, col-n);
- fTerminal.setChar(line, col,c, style);
- }
- int last=Math.min(fCursorColumn+n, fColumns);
- for (int col = fCursorColumn; col <last; col++) {
- fTerminal.setChar(line, col,'\000', null);
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.emulator.IVT100EmulatorBackend#eraseToEndOfScreen()
- */
- public void eraseToEndOfScreen() {
- synchronized (fTerminal) {
- eraseLineToEnd();
- for (int line = toAbsoluteLine(fCursorLine+1); line < toAbsoluteLine(fLines); line++) {
- fTerminal.cleanLine(line);
- }
- }
-
- }
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.emulator.IVT100EmulatorBackend#eraseToCursor()
- */
- public void eraseToCursor() {
- synchronized (fTerminal) {
- for (int line = toAbsoluteLine(0); line < toAbsoluteLine(fCursorLine); line++) {
- fTerminal.cleanLine(line);
- }
- eraseLineToCursor();
- }
- }
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.emulator.IVT100EmulatorBackend#eraseAll()
- */
- public void eraseAll() {
- synchronized (fTerminal) {
- for (int line = toAbsoluteLine(0); line < toAbsoluteLine(fLines); line++) {
- fTerminal.cleanLine(line);
- }
- }
- }
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.emulator.IVT100EmulatorBackend#eraseLine()
- */
- public void eraseLine() {
- synchronized (fTerminal) {
- fTerminal.cleanLine(toAbsoluteLine(fCursorLine));
- }
- }
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.emulator.IVT100EmulatorBackend#eraseLineToEnd()
- */
- public void eraseLineToEnd() {
- synchronized (fTerminal) {
- int line=toAbsoluteLine(fCursorLine);
- for (int col = fCursorColumn; col < fColumns; col++) {
- fTerminal.setChar(line, col, '\000', null);
- }
- }
- }
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.emulator.IVT100EmulatorBackend#eraseLineToCursor()
- */
- public void eraseLineToCursor() {
- synchronized (fTerminal) {
- int line=toAbsoluteLine(fCursorLine);
- for (int col = 0; col <= fCursorColumn; col++) {
- fTerminal.setChar(line, col, '\000', null);
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.emulator.IVT100EmulatorBackend#insertLines(int)
- */
- public void insertLines(int n) {
- synchronized (fTerminal) {
- if(!isCusorInScrollingRegion())
- return;
- assert n>0;
- int line=toAbsoluteLine(fCursorLine);
- int nLines=fTerminal.getHeight()-line;
- fTerminal.scroll(line, nLines, n);
- }
- }
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.emulator.IVT100EmulatorBackend#deleteCharacters(int)
- */
- public void deleteCharacters(int n) {
- synchronized (fTerminal) {
- int line=toAbsoluteLine(fCursorLine);
- for (int col = fCursorColumn+n; col < fColumns; col++) {
- char c=fTerminal.getChar(line, col);
- Style style=fTerminal.getStyle(line, col);
- fTerminal.setChar(line, col-n,c, style);
- }
- int first=Math.max(fCursorColumn, fColumns-n);
- for (int col = first; col <fColumns; col++) {
- fTerminal.setChar(line, col,'\000', null);
- }
- }
- }
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.emulator.IVT100EmulatorBackend#deleteLines(int)
- */
- public void deleteLines(int n) {
- synchronized (fTerminal) {
- if(!isCusorInScrollingRegion())
- return;
- assert n>0;
- int line=toAbsoluteLine(fCursorLine);
- int nLines=fTerminal.getHeight()-line;
- fTerminal.scroll(line, nLines, -n);
- }
- }
- private boolean isCusorInScrollingRegion() {
- // TODO Auto-generated method stub
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.emulator.IVT100EmulatorBackend#getDefaultStyle()
- */
- public Style getDefaultStyle() {
- synchronized (fTerminal) {
- return fDefaultStyle;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.emulator.IVT100EmulatorBackend#setDefaultStyle(org.eclipse.tm.terminal.model.Style)
- */
- public void setDefaultStyle(Style defaultStyle) {
- synchronized (fTerminal) {
- fDefaultStyle = defaultStyle;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.emulator.IVT100EmulatorBackend#getStyle()
- */
- public Style getStyle() {
- synchronized (fTerminal) {
- if(fStyle==null)
- return fDefaultStyle;
- return fStyle;
- }
- }
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.emulator.IVT100EmulatorBackend#setStyle(org.eclipse.tm.terminal.model.Style)
- */
- public void setStyle(Style style) {
- synchronized (fTerminal) {
- fStyle=style;
- }
- }
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.emulator.IVT100EmulatorBackend#appendString(java.lang.String)
- */
- public void appendString(String buffer) {
- synchronized (fTerminal) {
- char[] chars=buffer.toCharArray();
- int line=toAbsoluteLine(fCursorLine);
- int i=0;
- while (i < chars.length) {
- int n=Math.min(fColumns-fCursorColumn,chars.length-i);
- fTerminal.setChars(line, fCursorColumn, chars, i, n, fStyle);
- int col=fCursorColumn+n;
- i+=n;
- // wrap needed?
- if(col>=fColumns) {
- doNewline();
- line=toAbsoluteLine(fCursorLine);
- setCursorColumn(0);
- } else {
- setCursorColumn(col);
- }
- }
- }
- }
-
- /**
- * MUST be called from a synchronized block!
- */
- private void doNewline() {
- if(fCursorLine+1>=fLines) {
- int h=fTerminal.getHeight();
- fTerminal.addLine();
- if(h!=fTerminal.getHeight())
- setCursorLine(fCursorLine+1);
- } else {
- setCursorLine(fCursorLine+1);
- }
- }
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.emulator.IVT100EmulatorBackend#processNewline()
- */
- public void processNewline() {
- synchronized (fTerminal) {
- doNewline();
- }
- }
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.emulator.IVT100EmulatorBackend#getCursorLine()
- */
- public int getCursorLine() {
- synchronized (fTerminal) {
- return fCursorLine;
- }
- }
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.emulator.IVT100EmulatorBackend#getCursorColumn()
- */
- public int getCursorColumn() {
- synchronized (fTerminal) {
- return fCursorColumn;
- }
- }
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.emulator.IVT100EmulatorBackend#setCursor(int, int)
- */
- public void setCursor(int targetLine, int targetColumn) {
- synchronized (fTerminal) {
- setCursorLine(targetLine);
- setCursorColumn(targetColumn);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.emulator.IVT100EmulatorBackend#setCursorColumn(int)
- */
- public void setCursorColumn(int targetColumn) {
- synchronized (fTerminal) {
- if(targetColumn<0)
- targetColumn=0;
- else if(targetColumn>=fColumns)
- targetColumn=fColumns-1;
- fCursorColumn=targetColumn;
- // We make the assumption that nobody is changing the
- // terminal cursor except this class!
- // This assumption gives a huge performance improvement
- fTerminal.setCursorColumn(targetColumn);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.emulator.IVT100EmulatorBackend#setCursorLine(int)
- */
- public void setCursorLine(int targetLine) {
- synchronized (fTerminal) {
- if(targetLine<0)
- targetLine=0;
- else if(targetLine>=fLines)
- targetLine=fLines-1;
- fCursorLine=targetLine;
- // We make the assumption that nobody is changing the
- // terminal cursor except this class!
- // This assumption gives a huge performance improvement
- fTerminal.setCursorLine(toAbsoluteLine(targetLine));
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.emulator.IVT100EmulatorBackend#getLines()
- */
- public int getLines() {
- synchronized (fTerminal) {
- return fLines;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.emulator.IVT100EmulatorBackend#getColumns()
- */
- public int getColumns() {
- synchronized (fTerminal) {
- return fColumns;
- }
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/VT100TerminalControl.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/VT100TerminalControl.java
deleted file mode 100644
index 0b397de58..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/VT100TerminalControl.java
+++ /dev/null
@@ -1,1022 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * 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
- * Martin Oberhuber (Wind River) - [206883] Serial Terminal leaks Jobs
- * Martin Oberhuber (Wind River) - [208145] Terminal prints garbage after quick disconnect/reconnect
- * Martin Oberhuber (Wind River) - [207785] NPE when trying to send char while no longer connected
- * Michael Scharf (Wind River) - [209665] Add ability to log byte streams from terminal
- * Ruslan Sychev (Xored Software) - [217675] NPE or SWTException when closing Terminal View while connection establishing
- * Michael Scharf (Wing River) - [196447] The optional terminal input line should be resizeable
- * Martin Oberhuber (Wind River) - [168197] Replace JFace MessagDialog by SWT MessageBox
- * Martin Oberhuber (Wind River) - [204796] Terminal should allow setting the encoding to use
- * Michael Scharf (Wind River) - [237398] Terminal get Invalid Thread Access when the title is set
- * Martin Oberhuber (Wind River) - [240745] Pressing Ctrl+F1 in the Terminal should bring up context help
- * Michael Scharf (Wind River) - [240098] The cursor should not blink when the terminal is disconnected
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.emulator;
-
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.UnsupportedEncodingException;
-import java.net.SocketException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.swt.events.FocusListener;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.KeyListener;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.MessageBox;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tm.internal.terminal.control.ICommandInputField;
-import org.eclipse.tm.internal.terminal.control.ITerminalListener;
-import org.eclipse.tm.internal.terminal.control.ITerminalViewControl;
-import org.eclipse.tm.internal.terminal.control.impl.ITerminalControlForText;
-import org.eclipse.tm.internal.terminal.control.impl.TerminalMessages;
-import org.eclipse.tm.internal.terminal.control.impl.TerminalPlugin;
-import org.eclipse.tm.internal.terminal.provisional.api.ITerminalConnector;
-import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl;
-import org.eclipse.tm.internal.terminal.provisional.api.Logger;
-import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
-import org.eclipse.tm.internal.terminal.textcanvas.ITextCanvasModel;
-import org.eclipse.tm.internal.terminal.textcanvas.PipedInputStream;
-import org.eclipse.tm.internal.terminal.textcanvas.PollingTextCanvasModel;
-import org.eclipse.tm.internal.terminal.textcanvas.TextCanvas;
-import org.eclipse.tm.internal.terminal.textcanvas.TextLineRenderer;
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-import org.eclipse.tm.terminal.model.ITerminalTextDataSnapshot;
-import org.eclipse.tm.terminal.model.TerminalTextDataFactory;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.contexts.IContextActivation;
-import org.eclipse.ui.contexts.IContextService;
-import org.eclipse.ui.keys.IBindingService;
-
-/**
- *
- * This class was originally written to use nested classes, which unfortunately makes
- * this source file larger and more complex than it needs to be. In particular, the
- * methods in the nested classes directly access the fields of the enclosing class.
- * One day we should pull the nested classes out into their own source files (but still
- * in this package).
- *
- * @author Chris Thew <chris.thew@windriver.com>
- */
-public class VT100TerminalControl implements ITerminalControlForText, ITerminalControl, ITerminalViewControl
-{
- protected final static String[] LINE_DELIMITERS = { "\n" }; //$NON-NLS-1$
-
- /**
- * This field holds a reference to a TerminalText object that performs all ANSI
- * text processing on data received from the remote host and controls how text is
- * displayed using the view's StyledText widget.
- */
- private final VT100Emulator fTerminalText;
- private Display fDisplay;
- private TextCanvas fCtlText;
- private Composite fWndParent;
- private Clipboard fClipboard;
- private KeyListener fKeyHandler;
- private final ITerminalListener fTerminalListener;
- private String fMsg = ""; //$NON-NLS-1$
- private FocusListener fFocusListener;
- private ITerminalConnector fConnector;
- private final ITerminalConnector[] fConnectors;
- PipedInputStream fInputStream;
- private static final String defaultEncoding = new java.io.InputStreamReader(new java.io.ByteArrayInputStream(new byte[0])).getEncoding();
- private String fEncoding = defaultEncoding;
- private InputStreamReader fInputStreamReader;
-
- private ICommandInputField fCommandInputField;
-
- private volatile TerminalState fState;
-
- private final ITerminalTextData fTerminalModel;
-
- /**
- * Is protected by synchronize on this
- */
- volatile private Job fJob;
-
- public VT100TerminalControl(ITerminalListener target, Composite wndParent, ITerminalConnector[] connectors) {
- fConnectors=connectors;
- fTerminalListener=target;
- fTerminalModel=TerminalTextDataFactory.makeTerminalTextData();
- fTerminalModel.setMaxHeight(1000);
- fInputStream=new PipedInputStream(8*1024);
- fTerminalText = new VT100Emulator(fTerminalModel, this, null);
- try {
- // Use Default Encoding as start, until setEncoding() is called
- setEncoding(null);
- } catch (UnsupportedEncodingException e) {
- // Should never happen
- e.printStackTrace();
- // Fall back to local Platform Default Encoding
- fEncoding = defaultEncoding;
- fInputStreamReader = new InputStreamReader(fInputStream);
- fTerminalText.setInputStreamReader(fInputStreamReader);
- }
-
- setupTerminal(wndParent);
- }
-
- public void setEncoding(String encoding) throws UnsupportedEncodingException {
- if (encoding == null) {
- // TODO better use a standard remote-to-local encoding?
- encoding = "ISO-8859-1"; //$NON-NLS-1$
- // TODO or better use the local default encoding?
- // encoding = defaultEncoding;
- }
- fInputStreamReader = new InputStreamReader(fInputStream, encoding);
- // remember encoding if above didn't throw an exception
- fEncoding = encoding;
- fTerminalText.setInputStreamReader(fInputStreamReader);
- }
-
- public String getEncoding() {
- return fEncoding;
- }
-
- public ITerminalConnector[] getConnectors() {
- return fConnectors;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl#copy()
- */
- public void copy() {
- getCtlText().copy();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl#paste()
- */
- public void paste() {
- TextTransfer textTransfer = TextTransfer.getInstance();
- String strText = (String) fClipboard.getContents(textTransfer);
- pasteString(strText);
-// TODO paste in another thread.... to avoid blocking
-// new Thread() {
-// public void run() {
-// for (int i = 0; i < strText.length(); i++) {
-// sendChar(strText.charAt(i), false);
-// }
-//
-// }
-// }.start();
- }
-
- /**
- * @param strText the text to paste
- */
- public boolean pasteString(String strText) {
- if(!isConnected())
- return false;
- if (strText == null)
- return false;
- if (!fEncoding.equals(defaultEncoding)) {
- sendString(strText);
- } else {
- // TODO I do not understand why pasteString would do this here...
- for (int i = 0; i < strText.length(); i++) {
- sendChar(strText.charAt(i), false);
- }
- }
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl#selectAll()
- */
- public void selectAll() {
- getCtlText().selectAll();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl#sendKey(char)
- */
- public void sendKey(char character) {
- Event event;
- KeyEvent keyEvent;
-
- event = new Event();
- event.widget = getCtlText();
- event.character = character;
- event.keyCode = 0;
- event.stateMask = 0;
- event.doit = true;
- keyEvent = new KeyEvent(event);
-
- fKeyHandler.keyPressed(keyEvent);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl#clearTerminal()
- */
- public void clearTerminal() {
- // The TerminalText object does all text manipulation.
-
- getTerminalText().clearTerminal();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl#getClipboard()
- */
- public Clipboard getClipboard() {
- return fClipboard;
- }
-
- /**
- * @return non null selection
- */
- public String getSelection() {
- String txt= fCtlText.getSelectionText();
- if(txt==null)
- txt=""; //$NON-NLS-1$
- return txt;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl#setFocus()
- */
- public void setFocus() {
- getCtlText().setFocus();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl#isEmpty()
- */
- public boolean isEmpty() {
- return getCtlText().isEmpty();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl#isDisposed()
- */
- public boolean isDisposed() {
- return getCtlText().isDisposed();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl#isConnected()
- */
- public boolean isConnected() {
- return fState==TerminalState.CONNECTED;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl#disposeTerminal()
- */
- public void disposeTerminal() {
- Logger.log("entered."); //$NON-NLS-1$
- disconnectTerminal();
- fClipboard.dispose();
- getTerminalText().dispose();
- }
-
- public void connectTerminal() {
- Logger.log("entered."); //$NON-NLS-1$
- if(getTerminalConnector()==null)
- return;
- fTerminalText.resetState();
- if(fConnector.getInitializationErrorMessage()!=null) {
- showErrorMessage(NLS.bind(
- TerminalMessages.CannotConnectTo,
- fConnector.getName(),
- fConnector.getInitializationErrorMessage()));
- // we cannot connect because the connector was not initialized
- return;
- }
- getTerminalConnector().connect(this);
- // clean the error message
- setMsg(""); //$NON-NLS-1$
- waitForConnect();
- }
-
- public ITerminalConnector getTerminalConnector() {
- return fConnector;
- }
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl#disconnectTerminal()
- */
- public void disconnectTerminal() {
- Logger.log("entered."); //$NON-NLS-1$
-
- if (getState()==TerminalState.CLOSED) {
- return;
- }
- if(getTerminalConnector()!=null) {
- getTerminalConnector().disconnect();
- }
- //Ensure that a new Job can be started; then clean up old Job.
- //TODO not sure whether the fInputStream needs to be cleaned too,
- //or whether the Job could actually cancel in case the fInputStream is closed.
- Job job;
- synchronized(this) {
- job = fJob;
- fJob = null;
- }
- if (job!=null) {
- job.cancel();
- //There's not really a need to interrupt, since the job will
- //check its cancel status after 500 msec latest anyways...
- //Thread t = job.getThread();
- //if(t!=null) t.interrupt();
- }
- }
-
- // TODO
- private void waitForConnect() {
- Logger.log("entered."); //$NON-NLS-1$
- // TODO
- // Eliminate this code
- while (getState()==TerminalState.CONNECTING) {
- if (fDisplay.readAndDispatch())
- continue;
-
- fDisplay.sleep();
- }
- if(getCtlText().isDisposed()) {
- disconnectTerminal();
- return;
- }
- if (!getMsg().equals("")) //$NON-NLS-1$
- {
- showErrorMessage(getMsg());
-
- disconnectTerminal();
- return;
- }
- getCtlText().setFocus();
- startReaderJob();
-
- }
-
- private synchronized void startReaderJob() {
- if(fJob==null) {
- fJob=new Job("Terminal data reader") { //$NON-NLS-1$
- protected IStatus run(IProgressMonitor monitor) {
- IStatus status=Status.OK_STATUS;
- try {
- while(true) {
- while(fInputStream.available()==0 && !monitor.isCanceled()) {
- try {
- fInputStream.waitForAvailable(500);
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- }
- }
- if(monitor.isCanceled()) {
- //Do not disconnect terminal here because another reader job may already be running
- status=Status.CANCEL_STATUS;
- break;
- }
- try {
- // TODO: should block when no text is available!
- fTerminalText.processText();
- } catch (Exception e) {
- disconnectTerminal();
- status=new Status(IStatus.ERROR,TerminalPlugin.PLUGIN_ID,e.getLocalizedMessage(),e);
- break;
- }
- }
- } finally {
- // clean the job: start a new one when the connection gets restarted
- // Bug 208145: make sure we do not clean an other job that's already started (since it would become a Zombie)
- synchronized (VT100TerminalControl.this) {
- if (fJob==this) {
- fJob=null;
- }
- }
- }
- return status;
- }
-
- };
- fJob.setSystem(true);
- fJob.schedule();
- }
- }
-
- private void showErrorMessage(String message) {
- String strTitle = TerminalMessages.TerminalError;
- // [168197] Replace JFace MessagDialog by SWT MessageBox
- //MessageDialog.openError( getShell(), strTitle, message);
- MessageBox mb = new MessageBox(getShell(), SWT.ICON_ERROR | SWT.OK);
- mb.setText(strTitle);
- mb.setMessage(message);
- mb.open();
- }
-
- protected void sendString(String string) {
- try {
- // Send the string after converting it to an array of bytes using the
- // platform's default character encoding.
- //
- // TODO: Find a way to force this to use the ISO Latin-1 encoding.
- // TODO: handle Encoding Errors in a better way
-
- getOutputStream().write(string.getBytes(fEncoding));
- getOutputStream().flush();
- } catch (SocketException socketException) {
- displayTextInTerminal(socketException.getMessage());
-
- String strMsg = TerminalMessages.SocketError
- + "!\n" + socketException.getMessage(); //$NON-NLS-1$
- showErrorMessage(strMsg);
-
- Logger.logException(socketException);
-
- disconnectTerminal();
- } catch (IOException ioException) {
- showErrorMessage(TerminalMessages.IOError + "!\n" + ioException.getMessage());//$NON-NLS-1$
-
- Logger.logException(ioException);
-
- disconnectTerminal();
- }
- }
-
- public Shell getShell() {
- return getCtlText().getShell();
- }
-
- protected void sendChar(char chKey, boolean altKeyPressed) {
- try {
- int byteToSend = chKey;
- OutputStream os = getOutputStream();
- if (os==null) {
- // Bug 207785: NPE when trying to send char while no longer connected
- Logger.log("NOT sending '" + byteToSend + "' because no longer connected"); //$NON-NLS-1$ //$NON-NLS-2$
- } else {
- if (altKeyPressed) {
- // When the ALT key is pressed at the same time that a character is
- // typed, translate it into an ESCAPE followed by the character. The
- // alternative in this case is to set the high bit of the character
- // being transmitted, but that will cause input such as ALT-f to be
- // seen as the ISO Latin-1 character '�', which can be confusing to
- // European users running Emacs, for whom Alt-f should move forward a
- // word instead of inserting the '�' character.
- //
- // TODO: Make the ESCAPE-vs-highbit behavior user configurable.
-
- Logger.log("sending ESC + '" + byteToSend + "'"); //$NON-NLS-1$ //$NON-NLS-2$
- getOutputStream().write('\u001b');
- getOutputStream().write(byteToSend);
- } else {
- Logger.log("sending '" + byteToSend + "'"); //$NON-NLS-1$ //$NON-NLS-2$
- getOutputStream().write(byteToSend);
- }
- getOutputStream().flush();
- }
- } catch (SocketException socketException) {
- Logger.logException(socketException);
-
- displayTextInTerminal(socketException.getMessage());
-
- String strMsg = TerminalMessages.SocketError
- + "!\n" + socketException.getMessage(); //$NON-NLS-1$
-
- showErrorMessage(strMsg);
- Logger.logException(socketException);
-
- disconnectTerminal();
- } catch (IOException ioException) {
- Logger.logException(ioException);
-
- displayTextInTerminal(ioException.getMessage());
-
- String strMsg = TerminalMessages.IOError + "!\n" + ioException.getMessage(); //$NON-NLS-1$
-
- showErrorMessage(strMsg);
- Logger.logException(ioException);
-
- disconnectTerminal();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl#setupTerminal()
- */
- public void setupTerminal(Composite parent) {
- fState=TerminalState.CLOSED;
- setupControls(parent);
- setupListeners();
- setupHelp(fWndParent, TerminalPlugin.HELP_VIEW);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl#onFontChanged()
- */
- public void setFont(Font font) {
- getCtlText().setFont(font);
- if(fCommandInputField!=null) {
- fCommandInputField.setFont(font);
- }
-
- // Tell the TerminalControl singleton that the font has changed.
- fCtlText.onFontChange();
- getTerminalText().fontChanged();
- }
- public Font getFont() {
- return getCtlText().getFont();
- }
- public Control getControl() {
- return fCtlText;
- }
- public Control getRootControl() {
- return fWndParent;
- }
- protected void setupControls(Composite parent) {
- // The Terminal view now aims to be an ANSI-conforming terminal emulator, so it
- // can't have a horizontal scroll bar (but a vertical one is ok). Also, do
- // _not_ make the TextViewer read-only, because that prevents it from seeing a
- // TAB character when the user presses TAB (instead, the TAB causes focus to
- // switch to another Workbench control). We prevent local keyboard input from
- // modifying the text in method TerminalVerifyKeyListener.verifyKey().
-
- fWndParent=new Composite(parent,SWT.NONE);
- GridLayout layout=new GridLayout();
- layout.marginWidth=0;
- layout.marginHeight=0;
- layout.verticalSpacing=0;
- fWndParent.setLayout(layout);
-
- ITerminalTextDataSnapshot snapshot=fTerminalModel.makeSnapshot();
- // TODO how to get the initial size correctly!
- snapshot.updateSnapshot(false);
- ITextCanvasModel canvasModel=new PollingTextCanvasModel(snapshot);
- fCtlText=new TextCanvas(fWndParent,canvasModel,SWT.NONE,new TextLineRenderer(fCtlText,canvasModel));
-
-
- fCtlText.setLayoutData(new GridData(GridData.FILL_BOTH));
- fCtlText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- fCtlText.addResizeHandler(new TextCanvas.ResizeListener() {
- public void sizeChanged(int lines, int columns) {
- fTerminalText.setDimensions(lines, columns);
- }
- });
-
-
- fDisplay = getCtlText().getDisplay();
- fClipboard = new Clipboard(fDisplay);
-// fViewer.setDocument(new TerminalDocument());
- setFont(JFaceResources.getTextFont());
- }
-
- protected void setupListeners() {
- fKeyHandler = new TerminalKeyHandler();
- fFocusListener = new TerminalFocusListener();
-
- getCtlText().addKeyListener(fKeyHandler);
- getCtlText().addFocusListener(fFocusListener);
-
- }
-
- /**
- * Setup all the help contexts for the controls.
- */
- protected void setupHelp(Composite parent, String id) {
- Control[] children = parent.getChildren();
-
- for (int nIndex = 0; nIndex < children.length; nIndex++) {
- if (children[nIndex] instanceof Composite) {
- setupHelp((Composite) children[nIndex], id);
- }
- }
-
- PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, id);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl#displayTextInTerminal(java.lang.String)
- */
- public void displayTextInTerminal(String text) {
- writeToTerminal("\r\n"+text+"\r\n"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- private void writeToTerminal(String text) {
- try {
- getRemoteToTerminalOutputStream().write(text.getBytes(fEncoding));
- } catch (UnsupportedEncodingException e) {
- // should never happen!
- e.printStackTrace();
- } catch (IOException e) {
- // should never happen!
- e.printStackTrace();
- }
-
- }
-
- public OutputStream getRemoteToTerminalOutputStream() {
- if(Logger.isLogEnabled()) {
- return new LoggingOutputStream(fInputStream.getOutputStream());
- } else {
- return fInputStream.getOutputStream();
- }
- }
- protected boolean isLogCharEnabled() {
- return TerminalPlugin.isOptionEnabled(Logger.TRACE_DEBUG_LOG_CHAR);
- }
- protected boolean isLogBufferSizeEnabled() {
- return TerminalPlugin
- .isOptionEnabled(Logger.TRACE_DEBUG_LOG_BUFFER_SIZE);
- }
-
-
- public OutputStream getOutputStream() {
- if(getTerminalConnector()!=null)
- return getTerminalConnector().getTerminalToRemoteStream();
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl#setMsg(java.lang.String)
- */
- public void setMsg(String msg) {
- fMsg = msg;
- }
-
- public String getMsg() {
- return fMsg;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl#getCtlText()
- */
- protected TextCanvas getCtlText() {
- return fCtlText;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl#getTerminalText()
- */
- public VT100Emulator getTerminalText() {
- return fTerminalText;
- }
- protected class TerminalFocusListener implements FocusListener {
- private IContextActivation contextActivation = null;
-
- protected TerminalFocusListener() {
- super();
- }
-
- public void focusGained(FocusEvent event) {
- // Disable all keyboard accelerators (e.g., Control-B) so the Terminal view
- // can see every keystroke. Without this, Emacs, vi, and Bash are unusable
- // in the Terminal view.
-
- IBindingService bindingService = (IBindingService) PlatformUI
- .getWorkbench().getAdapter(IBindingService.class);
- bindingService.setKeyFilterEnabled(false);
-
- // The above code fails to cause Eclipse to disable menu-activation
- // accelerators (e.g., Alt-F for the File menu), so we set the command
- // context to be the Terminal view's command context. This enables us to
- // override menu-activation accelerators with no-op commands in our
- // plugin.xml file, which enables the Terminal view to see absolutly _all_
- // key-presses.
-
- IContextService contextService = (IContextService) PlatformUI
- .getWorkbench().getAdapter(IContextService.class);
- contextActivation = contextService
- .activateContext("org.eclipse.tm.terminal.TerminalContext"); //$NON-NLS-1$
- }
-
- public void focusLost(FocusEvent event) {
- // Enable all keybindings.
-
- IBindingService bindingService = (IBindingService) PlatformUI
- .getWorkbench().getAdapter(IBindingService.class);
- bindingService.setKeyFilterEnabled(true);
-
- // Restore the command context to its previous value.
-
- IContextService contextService = (IContextService) PlatformUI
- .getWorkbench().getAdapter(IContextService.class);
- contextService.deactivateContext(contextActivation);
- }
- }
-
- protected class TerminalKeyHandler extends KeyAdapter {
- public void keyPressed(KeyEvent event) {
- if (getState()==TerminalState.CONNECTING)
- return;
-
- // We set the event.doit to false to prevent any further processing of this
- // key event. The only reason this is here is because I was seeing the F10
- // key both send an escape sequence (due to this method) and switch focus
- // to the Workbench File menu (forcing the user to click in the Terminal
- // view again to continue entering text). This fixes that.
-
- event.doit = false;
-
- char character = event.character;
-
- //if (!isConnected()) {
- if (fState==TerminalState.CLOSED) {
- // Pressing ENTER while not connected causes us to connect.
- if (character == '\r') {
- connectTerminal();
- return;
- }
-
- // Ignore all other keyboard input when not connected.
- // Allow other key handlers (such as Ctrl+F1) do their work
- event.doit = true;
- return;
- }
-
- // If the event character is NUL ('\u0000'), then a special key was pressed
- // (e.g., PageUp, PageDown, an arrow key, a function key, Shift, Alt,
- // Control, etc.). The one exception is when the user presses Control-@,
- // which sends a NUL character, in which case we must send the NUL to the
- // remote endpoint. This is necessary so that Emacs will work correctly,
- // because Control-@ (i.e., NUL) invokes Emacs' set-mark-command when Emacs
- // is running on a terminal. When the user presses Control-@, the keyCode
- // is 50.
-
- if (character == '\u0000' && event.keyCode != 50) {
- // A special key was pressed. Figure out which one it was and send the
- // appropriate ANSI escape sequence.
- //
- // IMPORTANT: Control will not enter this method for these special keys
- // unless certain <keybinding> tags are present in the plugin.xml file
- // for the Terminal view. Do not delete those tags.
-
- switch (event.keyCode) {
- case 0x1000001: // Up arrow.
- sendString("\u001b[A"); //$NON-NLS-1$
- break;
-
- case 0x1000002: // Down arrow.
- sendString("\u001b[B"); //$NON-NLS-1$
- break;
-
- case 0x1000003: // Left arrow.
- sendString("\u001b[D"); //$NON-NLS-1$
- break;
-
- case 0x1000004: // Right arrow.
- sendString("\u001b[C"); //$NON-NLS-1$
- break;
-
- case 0x1000005: // PgUp key.
- sendString("\u001b[I"); //$NON-NLS-1$
- break;
-
- case 0x1000006: // PgDn key.
- sendString("\u001b[G"); //$NON-NLS-1$
- break;
-
- case 0x1000007: // Home key.
- sendString("\u001b[H"); //$NON-NLS-1$
- break;
-
- case 0x1000008: // End key.
- sendString("\u001b[F"); //$NON-NLS-1$
- break;
-
- case 0x100000a: // F1 key.
- if ( (event.stateMask & SWT.CTRL)!=0 ) {
- //Allow Ctrl+F1 to act locally as well as on the remote, because it is
- //typically non-intrusive
- event.doit=true;
- }
- sendString("\u001b[M"); //$NON-NLS-1$
- break;
-
- case 0x100000b: // F2 key.
- sendString("\u001b[N"); //$NON-NLS-1$
- break;
-
- case 0x100000c: // F3 key.
- sendString("\u001b[O"); //$NON-NLS-1$
- break;
-
- case 0x100000d: // F4 key.
- sendString("\u001b[P"); //$NON-NLS-1$
- break;
-
- case 0x100000e: // F5 key.
- sendString("\u001b[Q"); //$NON-NLS-1$
- break;
-
- case 0x100000f: // F6 key.
- sendString("\u001b[R"); //$NON-NLS-1$
- break;
-
- case 0x1000010: // F7 key.
- sendString("\u001b[S"); //$NON-NLS-1$
- break;
-
- case 0x1000011: // F8 key.
- sendString("\u001b[T"); //$NON-NLS-1$
- break;
-
- case 0x1000012: // F9 key.
- sendString("\u001b[U"); //$NON-NLS-1$
- break;
-
- case 0x1000013: // F10 key.
- sendString("\u001b[V"); //$NON-NLS-1$
- break;
-
- case 0x1000014: // F11 key.
- sendString("\u001b[W"); //$NON-NLS-1$
- break;
-
- case 0x1000015: // F12 key.
- sendString("\u001b[X"); //$NON-NLS-1$
- break;
-
- default:
- // Ignore other special keys. Control flows through this case when
- // the user presses SHIFT, CONTROL, ALT, and any other key not
- // handled by the above cases.
- break;
- }
-
- // It's ok to return here, because we never locally echo special keys.
-
- return;
- }
-
- // To fix SPR 110341, we consider the Alt key to be pressed only when the
- // Control key is _not_ also pressed. This works around a bug in SWT where,
- // on European keyboards, the AltGr key being pressed appears to us as Control
- // + Alt being pressed simultaneously.
-
- Logger.log("stateMask = " + event.stateMask); //$NON-NLS-1$
-
- boolean altKeyPressed = (((event.stateMask & SWT.ALT) != 0) && ((event.stateMask & SWT.CTRL) == 0));
-
- if (!altKeyPressed && (event.stateMask & SWT.CTRL) != 0
- && character == ' ') {
- // Send a NUL character -- many terminal emulators send NUL when
- // Control-Space is pressed. This is used to set the mark in Emacs.
-
- character = '\u0000';
- }
-
- sendChar(character, altKeyPressed);
-
- // Special case: When we are in a TCP connection and echoing characters
- // locally, send a LF after sending a CR.
- // ISSUE: Is this absolutely required?
-
- if (character == '\r' && getTerminalConnector() != null
- && isConnected()
- && getTerminalConnector().isLocalEcho()) {
- sendChar('\n', false);
- }
-
- // Now decide if we should locally echo the character we just sent. We do
- // _not_ locally echo the character if any of these conditions are true:
- //
- // o This is a serial connection.
- //
- // o This is a TCP connection (i.e., m_telnetConnection is not null) and
- // the remote endpoint is not a TELNET server.
- //
- // o The ALT (or META) key is pressed.
- //
- // o The character is any of the first 32 ISO Latin-1 characters except
- // Control-I or Control-M.
- //
- // o The character is the DELETE character.
-
- if (getTerminalConnector() == null
- || getTerminalConnector().isLocalEcho() == false || altKeyPressed
- || (character >= '\u0001' && character < '\t')
- || (character > '\t' && character < '\r')
- || (character > '\r' && character <= '\u001f')
- || character == '\u007f') {
- // No local echoing.
- return;
- }
-
- // Locally echo the character.
-
- StringBuffer charBuffer = new StringBuffer();
- charBuffer.append(character);
-
- // If the character is a carriage return, we locally echo it as a CR + LF
- // combination.
-
- if (character == '\r')
- charBuffer.append('\n');
-
- writeToTerminal(charBuffer.toString());
- }
-
- }
-
- public void setTerminalTitle(String title) {
- fTerminalListener.setTerminalTitle(title);
- }
-
-
- public TerminalState getState() {
- return fState;
- }
-
-
- public void setState(TerminalState state) {
- fState=state;
- fTerminalListener.setState(state);
- // enable the (blinking) cursor if the terminal is connected
- runAsyncInDisplayThread(new Runnable() {
- public void run() {
- if(fCtlText!=null && !fCtlText.isDisposed())
- fCtlText.setCursorEnabled(isConnected());
- }});
- }
- /**
- * @param runnable run in display thread
- */
- private void runAsyncInDisplayThread(Runnable runnable) {
- if(Display.findDisplay(Thread.currentThread())!=null)
- runnable.run();
- else if(PlatformUI.isWorkbenchRunning())
- PlatformUI.getWorkbench().getDisplay().asyncExec(runnable);
- // else should not happen and we ignore it...
- }
-
- public String getSettingsSummary() {
- if(getTerminalConnector()!=null)
- return getTerminalConnector().getSettingsSummary();
- return ""; //$NON-NLS-1$
- }
-
- public void setConnector(ITerminalConnector connector) {
- fConnector=connector;
-
- }
- public ICommandInputField getCommandInputField() {
- return fCommandInputField;
- }
-
- public void setCommandInputField(ICommandInputField inputField) {
- if(fCommandInputField!=null)
- fCommandInputField.dispose();
- fCommandInputField=inputField;
- if(fCommandInputField!=null)
- fCommandInputField.createControl(fWndParent, this);
- if(fWndParent.isVisible())
- fWndParent.layout(true);
- }
-
- public int getBufferLineLimit() {
- return fTerminalModel.getMaxHeight();
- }
-
- public void setBufferLineLimit(int bufferLineLimit) {
- if(bufferLineLimit<=0)
- return;
- synchronized (fTerminalModel) {
- if(fTerminalModel.getHeight()>bufferLineLimit)
- fTerminalModel.setDimensions(bufferLineLimit, fTerminalModel.getWidth());
- fTerminalModel.setMaxHeight(bufferLineLimit);
- }
- }
-
- public boolean isScrollLock() {
- return fCtlText.isScrollLock();
- }
-
- public void setScrollLock(boolean on) {
- fCtlText.setScrollLock(on);
- }
-
- public void setInvertedColors(boolean invert) {
- fCtlText.setInvertedColors(invert);
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/ISnapshotChanges.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/ISnapshotChanges.java
deleted file mode 100644
index b81fef70c..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/ISnapshotChanges.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Michael Scharf (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.model;
-
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-
-public interface ISnapshotChanges {
-
- /**
- * @param line might bigger than the number of lines....
- */
- void markLineChanged(int line);
-
- /**
- * Marks all lines in the range as changed
- * @param line >=0
- * @param n might be out of range
- */
- void markLinesChanged(int line, int n);
-
- /**
- * Marks all lines within the scrolling region
- * changed and resets the scrolling information
- */
- void convertScrollingIntoChanges();
-
- /**
- * @return true if something has changed
- */
- boolean hasChanged();
-
- /**
- * @param startLine
- * @param size
- * @param shift
- */
- void scroll(int startLine, int size, int shift);
-
- /**
- * Mark all lines changed
- * @param height if no window is set this is the number of
- * lines that are marked as changed
- */
- void setAllChanged(int height);
-
- int getFirstChangedLine();
-
- int getLastChangedLine();
-
- int getScrollWindowStartLine();
-
- int getScrollWindowSize();
-
- int getScrollWindowShift();
-
- boolean hasLineChanged(int line);
-
- void markDimensionsChanged();
- boolean hasDimensionsChanged();
- void markCursorChanged();
-
- /**
- * @return true if the terminal data has changed
- */
- boolean hasTerminalChanged();
- /**
- * mark the terminal as changed
- */
- void setTerminalChanged();
-
-
- void copyChangedLines(ITerminalTextData dest, ITerminalTextData source);
-
- /**
- * @param startLine -1 means follow the end of the data
- * @param size number of lines to follow
- */
- void setInterestWindow(int startLine, int size);
- int getInterestWindowStartLine();
- int getInterestWindowSize();
-
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/SnapshotChanges.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/SnapshotChanges.java
deleted file mode 100644
index 4bebcb669..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/SnapshotChanges.java
+++ /dev/null
@@ -1,391 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Michael Scharf (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.model;
-
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-
-
-/**
- * Collects the changes of the {@link ITerminalTextData}
- *
- */
-public class SnapshotChanges implements ISnapshotChanges {
- /**
- * The first line changed
- */
- private int fFirstChangedLine;
- /**
- * The last line changed
- */
- private int fLastChangedLine;
- private int fScrollWindowStartLine;
- private int fScrollWindowSize;
- private int fScrollWindowShift;
- /**
- * true, if scrolling should not tracked anymore
- */
- private boolean fScrollDontTrack;
- /**
- * The lines that need to be copied
- * into the snapshot (lines that have
- * not changed don't have to be copied)
- */
- private boolean[] fChangedLines;
-
- private int fInterestWindowSize;
- private int fInterestWindowStartLine;
- private boolean fDimensionsChanged;
- private boolean fTerminalHasChanged;
- private boolean fCursorHasChanged;
-
- public SnapshotChanges(int nLines) {
- setChangedLinesLength(nLines);
- fFirstChangedLine=Integer.MAX_VALUE;
- fLastChangedLine=-1;
- }
- public SnapshotChanges(int windowStart, int windowSize) {
- setChangedLinesLength(windowStart+windowSize);
- fFirstChangedLine=Integer.MAX_VALUE;
- fLastChangedLine=-1;
- fInterestWindowStartLine=windowStart;
- fInterestWindowSize=windowSize;
-
- }
- /**
- * This is used in asserts to throw an {@link RuntimeException}.
- * This is useful for tests.
- * @return never -- throws an exception
- */
- private boolean throwRuntimeException() {
- throw new RuntimeException();
- }
- /**
- * @param line
- * @param size
- * @return true if the range overlaps with the interest window
- */
- boolean isInInterestWindow(int line, int size) {
- if(fInterestWindowSize<=0)
- return true;
- if(line+size<=fInterestWindowStartLine || line>=fInterestWindowStartLine+fInterestWindowSize)
- return false;
- return true;
- }
- /**
- * @param line
- * @return true if the line is within the interest window
- */
- boolean isInInterestWindow(int line) {
- if(fInterestWindowSize<=0)
- return true;
- if(line<fInterestWindowStartLine || line>=fInterestWindowStartLine+fInterestWindowSize)
- return false;
- return true;
- }
- /**
- * @param line
- * @return the line within the window
- */
- int fitLineToWindow(int line) {
- if(fInterestWindowSize<=0)
- return line;
- if(line<fInterestWindowStartLine)
- return fInterestWindowStartLine;
- return line;
- }
- /**
- * The result is only defined if {@link #isInInterestWindow(int, int)} returns true!
- * @param line the line <b>before</b> {@link #fitLineToWindow(int)} has been called!
- * @param size
- * @return the adjusted size.
- * <p>Note:</p> {@link #fitLineToWindow(int)} has to be called on the line to
- * move the window correctly!
- */
- int fitSizeToWindow(int line, int size) {
- if(fInterestWindowSize<=0)
- return size;
- if(line<fInterestWindowStartLine) {
- size-=fInterestWindowStartLine-line;
- line=fInterestWindowStartLine;
- }
- if(line+size>fInterestWindowStartLine+fInterestWindowSize)
- size=fInterestWindowStartLine+fInterestWindowSize-line;
- return size;
- }
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.model.ISnapshotChanges#markLineChanged(int)
- */
- public void markLineChanged(int line) {
- if(!isInInterestWindow(line))
- return;
- line=fitLineToWindow(line);
- if(line<fFirstChangedLine)
- fFirstChangedLine=line;
- if(line>fLastChangedLine)
- fLastChangedLine=line;
- // in case the terminal got resized we expand
- // don't remember the changed line because
- // there is nothing to copy
- if(line<getChangedLineLength()) {
- setChangedLine(line,true);
- }
- }
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.model.ISnapshotChanges#markLinesChanged(int, int)
- */
- public void markLinesChanged(int line, int n) {
- if(n<=0 || !isInInterestWindow(line,n))
- return;
- // do not exceed the bounds of fChangedLines
- // the terminal might have been resized and
- // we can only keep changes for the size of the
- // previous terminal
- n=fitSizeToWindow(line, n);
- line=fitLineToWindow(line);
- int m=Math.min(line+n, getChangedLineLength());
- for (int i = line; i < m; i++) {
- setChangedLine(i,true);
- }
- // this sets fFirstChangedLine as well
- markLineChanged(line);
- // this sets fLastChangedLine as well
- markLineChanged(line+n-1);
- }
- public void markCursorChanged() {
- fCursorHasChanged=true;
- }
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.model.ISnapshotChanges#convertScrollingIntoChanges()
- */
- public void convertScrollingIntoChanges() {
- markLinesChanged(fScrollWindowStartLine,fScrollWindowSize);
- fScrollWindowStartLine=0;
- fScrollWindowSize=0;
- fScrollWindowShift=0;
- }
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.model.ISnapshotChanges#hasChanged()
- */
- public boolean hasChanged() {
- if(fFirstChangedLine!=Integer.MAX_VALUE || fLastChangedLine>0 || fScrollWindowShift!=0 ||fDimensionsChanged || fCursorHasChanged)
- return true;
- return false;
- }
- public void markDimensionsChanged() {
- fDimensionsChanged=true;
- }
- public boolean hasDimensionsChanged() {
- return fDimensionsChanged;
- }
- public boolean hasTerminalChanged() {
- return fTerminalHasChanged;
- }
- public void setTerminalChanged() {
- fTerminalHasChanged=true;
- }
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.model.ISnapshotChanges#scroll(int, int, int)
- */
- public void scroll(int startLine, int size, int shift) {
- size=fitSizeToWindow(startLine, size);
- startLine=fitLineToWindow(startLine);
- // let's track only negative shifts
- if(fScrollDontTrack) {
- // we are in a state where we cannot track scrolling
- // so let's simply mark the scrolled lines as changed
- markLinesChanged(startLine, size);
- } else if(shift>=0) {
- // we cannot handle positive scroll
- // forget about clever caching of scroll events
- doNotTrackScrollingAnymore();
- // mark all lines inside the scroll region as changed
- markLinesChanged(startLine, size);
- } else {
- // we have already scrolled
- if(fScrollWindowShift<0) {
- // we have already scrolled
- if(fScrollWindowStartLine==startLine && fScrollWindowSize==size) {
- // we are scrolling the same region again?
- fScrollWindowShift+=shift;
- scrollChangesLinesWithNegativeShift(startLine,size,shift);
- } else {
- // mark all lines in the old scroll region as changed
- doNotTrackScrollingAnymore();
- // mark all lines changed, because
- markLinesChanged(startLine, size);
- }
- } else {
- // first scroll in this change -- we just notify it
- fScrollWindowStartLine=startLine;
- fScrollWindowSize=size;
- fScrollWindowShift=shift;
- scrollChangesLinesWithNegativeShift(startLine,size,shift);
- }
- }
- }
- /**
- * Some incompatible scrolling occurred. We cannot do the
- * scroll optimization anymore...
- */
- private void doNotTrackScrollingAnymore() {
- if(fScrollWindowSize>0) {
- // convert the current scrolling into changes
- markLinesChanged(fScrollWindowStartLine, fScrollWindowSize);
- fScrollWindowStartLine=0;
- fScrollWindowSize=0;
- fScrollWindowShift=0;
- }
- // don't be clever on scrolling anymore
- fScrollDontTrack=true;
- }
- /**
- * Scrolls the changed lines data
- *
- * @param line
- * @param n
- * @param shift must be negative!
- */
- private void scrollChangesLinesWithNegativeShift(int line, int n, int shift) {
- assert shift <0 || throwRuntimeException();
- // scroll the region
- // don't run out of bounds!
- int m=Math.min(line+n+shift,getChangedLineLength()+shift);
- for (int i = line; i < m; i++) {
- setChangedLine(i, hasLineChanged(i-shift));
- // move the first changed line up.
- // We don't have to move the maximum down,
- // because with a shift scroll, the max is moved
- // my the next loop in this method
- if(i<fFirstChangedLine && hasLineChanged(i)) {
- fFirstChangedLine=i;
- }
- }
- // mark the "opened" lines as changed
- for (int i = Math.max(0,line+n+shift); i < line+n; i++) {
- markLineChanged(i);
- }
- }
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.model.ISnapshotChanges#setAllChanged(int)
- */
- public void setAllChanged(int height) {
- fScrollWindowStartLine=0;
- fScrollWindowSize=0;
- fScrollWindowShift=0;
- fFirstChangedLine=fitLineToWindow(0);
- fLastChangedLine=fFirstChangedLine+fitSizeToWindow(0, height)-1;
- // no need to keep an array of changes anymore
- setChangedLinesLength(0);
- }
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.model.ISnapshotChanges#getFirstChangedLine()
- */
- public int getFirstChangedLine() {
- return fFirstChangedLine;
- }
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.model.ISnapshotChanges#getLastChangedLine()
- */
- public int getLastChangedLine() {
- return fLastChangedLine;
- }
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.model.ISnapshotChanges#getScrollWindowStartLine()
- */
- public int getScrollWindowStartLine() {
- return fScrollWindowStartLine;
- }
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.model.ISnapshotChanges#getScrollWindowSize()
- */
- public int getScrollWindowSize() {
- return fScrollWindowSize;
- }
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.model.ISnapshotChanges#getScrollWindowShift()
- */
- public int getScrollWindowShift() {
- return fScrollWindowShift;
- }
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.model.ISnapshotChanges#copyChangedLines(org.eclipse.tm.terminal.model.ITerminalTextData, org.eclipse.tm.terminal.model.ITerminalTextData)
- */
- public void copyChangedLines(ITerminalTextData dest, ITerminalTextData source) {
- int n=Math.min(fLastChangedLine+1,source.getHeight());
- for (int i = fFirstChangedLine; i < n ; i++) {
- if(hasLineChanged(i))
- dest.copyLine(source,i,i);
- }
- }
-
- public int getInterestWindowSize() {
- return fInterestWindowSize;
- }
-
- public int getInterestWindowStartLine() {
- return fInterestWindowStartLine;
- }
-
- public void setInterestWindow(int startLine, int size) {
- int oldStartLine=fInterestWindowStartLine;
- int oldSize=fInterestWindowSize;
- fInterestWindowStartLine=startLine;
- fInterestWindowSize=size;
- if(oldSize>0) {
- int shift=oldStartLine-startLine;
- if(shift==0) {
- if(size>oldSize) {
- // add lines to the end
- markLinesChanged(oldStartLine+oldSize, size-oldSize);
- }
- // else no lines within the window have changed
-
- } else if(Math.abs(shift)<size) {
- if(shift<0) {
- // we can scroll
- scroll(startLine, oldSize, shift);
- // mark the lines at the end as new
- for (int i = oldStartLine+oldSize; i < startLine+size; i++) {
- markLineChanged(i);
- }
- } else {
- // we cannot shift positive -- mark all changed
- markLinesChanged(startLine, size);
- }
- } else {
- // no scrolling possible
- markLinesChanged(startLine, size);
- }
-
- }
- }
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.model.ISnapshotChanges#hasLineChanged(int)
- */
- public boolean hasLineChanged(int line) {
- if(line<fChangedLines.length)
- return fChangedLines[line];
- // since the height of the terminal could
- // have changed but we have tracked only changes
- // of the previous terminal height, any line outside
- // the the range of the previous height has changed
- return isInInterestWindow(line);
- }
- int getChangedLineLength() {
- return fChangedLines.length;
- }
- void setChangedLine(int line,boolean changed){
- fChangedLines[line]=changed;
- }
- void setChangedLinesLength(int length) {
- fChangedLines=new boolean[length];
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/SynchronizedTerminalTextData.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/SynchronizedTerminalTextData.java
deleted file mode 100644
index 0bbf8d257..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/SynchronizedTerminalTextData.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse synchronized 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.tm.internal.terminal.model;
-
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-import org.eclipse.tm.terminal.model.ITerminalTextDataSnapshot;
-import org.eclipse.tm.terminal.model.LineSegment;
-import org.eclipse.tm.terminal.model.Style;
-
-/**
- * This is a decorator to make all access to
- * ITerminalTextData synchronized
- *
- */
-public class SynchronizedTerminalTextData implements ITerminalTextData {
- final ITerminalTextData fData;
- public SynchronizedTerminalTextData(ITerminalTextData data) {
- fData=data;
- }
- synchronized public void addLine() {
- fData.addLine();
- }
- synchronized public void cleanLine(int line) {
- fData.cleanLine(line);
- }
- synchronized public void copy(ITerminalTextData source) {
- fData.copy(source);
- }
- synchronized public void copyLine(ITerminalTextData source, int sourceLine, int destLine) {
- fData.copyLine(source, sourceLine, destLine);
- }
- synchronized public void copyRange(ITerminalTextData source, int sourceStartLine, int destStartLine, int length) {
- fData.copyRange(source, sourceStartLine, destStartLine, length);
- }
- synchronized public char getChar(int line, int column) {
- return fData.getChar(line, column);
- }
- synchronized public char[] getChars(int line) {
- return fData.getChars(line);
- }
- synchronized public int getCursorColumn() {
- return fData.getCursorColumn();
- }
- synchronized public int getCursorLine() {
- return fData.getCursorLine();
- }
- synchronized public int getHeight() {
- return fData.getHeight();
- }
- synchronized public LineSegment[] getLineSegments(int line, int startCol, int numberOfCols) {
- return fData.getLineSegments(line, startCol, numberOfCols);
- }
- synchronized public int getMaxHeight() {
- return fData.getMaxHeight();
- }
- synchronized public Style getStyle(int line, int column) {
- return fData.getStyle(line, column);
- }
- synchronized public Style[] getStyles(int line) {
- return fData.getStyles(line);
- }
- synchronized public int getWidth() {
- return fData.getWidth();
- }
- synchronized public ITerminalTextDataSnapshot makeSnapshot() {
- return fData.makeSnapshot();
- }
- synchronized public void scroll(int startLine, int size, int shift) {
- fData.scroll(startLine, size, shift);
- }
- synchronized public void setChar(int line, int column, char c, Style style) {
- fData.setChar(line, column, c, style);
- }
- synchronized public void setChars(int line, int column, char[] chars, int start, int len, Style style) {
- fData.setChars(line, column, chars, start, len, style);
- }
- synchronized public void setChars(int line, int column, char[] chars, Style style) {
- fData.setChars(line, column, chars, style);
- }
- synchronized public void setCursorColumn(int column) {
- fData.setCursorColumn(column);
- }
- synchronized public void setCursorLine(int line) {
- fData.setCursorLine(line);
- }
- synchronized public void setDimensions(int height, int width) {
- fData.setDimensions(height, width);
- }
- synchronized public void setMaxHeight(int height) {
- fData.setMaxHeight(height);
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/TerminalTextData.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/TerminalTextData.java
deleted file mode 100644
index 9ec0d1c78..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/TerminalTextData.java
+++ /dev/null
@@ -1,265 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Michael Scharf (Wind River) - initial API and implementation
- * Martin Oberhuber (Wind River) - [168197] Fix Terminal for CDC-1.1/Foundation-1.1
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.model;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-import org.eclipse.tm.terminal.model.ITerminalTextDataReadOnly;
-import org.eclipse.tm.terminal.model.ITerminalTextDataSnapshot;
-import org.eclipse.tm.terminal.model.LineSegment;
-import org.eclipse.tm.terminal.model.Style;
-
-/**
- * This class is thread safe.
- *
- */
-public class TerminalTextData implements ITerminalTextData {
- final ITerminalTextData fData;
- /**
- * A list of active snapshots
- */
- public TerminalTextDataSnapshot[] fSnapshots=new TerminalTextDataSnapshot[0];
- private int fCursorColumn;
- private int fCursorLine;
- /**
- * Debug helper method -- use as "New Detail Formatter.." in the
- * debugger variables view:
- * <pre>TerminalTextData.toMultiLineText(this,0,200))</pre>
- * @param term the terminal
- * @param start start line to show
- * @param len number of lines to show -- negative numbers means show all
- * @return a string representation of the content
- */
- static public String toMultiLineText(ITerminalTextDataReadOnly term, int start, int len) {
- if(len<0)
- len=term.getHeight();
- StringBuffer buff=new StringBuffer();
- int width=term.getWidth();
- int n=Math.min(len,term.getHeight()-start);
- for (int line = start; line < n; line++) {
- if(line>0)
- buff.append("\n"); //$NON-NLS-1$
- for (int column = 0; column < width; column++) {
- buff.append(term.getChar(line, column));
- }
- }
- // get rid of the empty space at the end of the lines
- //return buff.toString().replaceAll("\000+", ""); //$NON-NLS-1$//$NON-NLS-2$
- //<J2ME CDC-1.1 Foundation-1.1 variant>
- int i = buff.length() - 1;
- while (i >= 0 && buff.charAt(i) == '\000') {
- i--;
- }
- buff.setLength(i + 1);
- return buff.toString();
- //</J2ME CDC-1.1 Foundation-1.1 variant>
- }
-
- /**
- * Show the first 100 lines
- * see {@link #toMultiLineText(ITerminalTextDataReadOnly, int, int)}
- * @param term A read-only terminal model
- * @return a string representation of the terminal
- */
- static public String toMultiLineText(ITerminalTextDataReadOnly term) {
- return toMultiLineText(term, 0, 100);
- }
-
- public TerminalTextData() {
- this(new TerminalTextDataFastScroll());
-
-// this(new TerminalTextDataStore());
- }
- public TerminalTextData(ITerminalTextData data) {
- fData=data;
- }
- public int getWidth() {
- return fData.getWidth();
- }
- public int getHeight() {
- // no need for an extra variable
- return fData.getHeight();
- }
- public void setDimensions(int height, int width) {
- int h=getHeight();
- int w=getWidth();
- if(w==width && h==height)
- return;
- fData.setDimensions(height, width);
- sendDimensionsChanged(h, w, height, width);
- }
- private void sendDimensionsChanged(int oldHeight, int oldWidth, int newHeight, int newWidth) {
- // determine what has changed
- if(oldWidth==newWidth) {
- if(oldHeight<newHeight)
- sendLinesChangedToSnapshot(oldHeight, newHeight-oldHeight);
- else
- sendLinesChangedToSnapshot(newHeight,oldHeight-newHeight);
- } else {
- sendLinesChangedToSnapshot(0, oldHeight);
- }
- sendDimensionsChanged();
- }
- public LineSegment[] getLineSegments(int line, int column, int len) {
- return fData.getLineSegments(line, column, len);
- }
- public char getChar(int line, int column) {
- return fData.getChar(line, column);
- }
- public Style getStyle(int line, int column) {
- return fData.getStyle(line, column);
- }
- public void setChar(int line, int column, char c, Style style) {
- fData.setChar(line, column, c, style);
- sendLineChangedToSnapshots(line);
- }
- public void setChars(int line, int column, char[] chars, Style style) {
- fData.setChars(line, column, chars, style);
- sendLineChangedToSnapshots(line);
- }
- public void setChars(int line, int column, char[] chars, int start, int len, Style style) {
- fData.setChars(line, column, chars, start, len, style);
- sendLineChangedToSnapshots(line);
- }
- public void scroll(int startLine, int size, int shift) {
- fData.scroll(startLine, size, shift);
- sendScrolledToSnapshots(startLine, size, shift);
- }
- public String toString() {
- return fData.toString();
- }
- private void sendDimensionsChanged() {
- for (int i = 0; i < fSnapshots.length; i++) {
- fSnapshots[i].markDimensionsChanged();
- }
- }
- /**
- * @param line notifies snapshots that line line has changed
- */
- protected void sendLineChangedToSnapshots(int line) {
- for (int i = 0; i < fSnapshots.length; i++) {
- fSnapshots[i].markLineChanged(line);
- }
- }
- /**
- * Notify snapshots that multiple lines have changed
- * @param line changed line
- * @param n number of changed lines
- */
- protected void sendLinesChangedToSnapshot(int line,int n) {
- for (int i = 0; i < fSnapshots.length; i++) {
- fSnapshots[i].markLinesChanged(line, n);
- }
- }
-
- /**
- * Notify snapshot that a region was scrolled
- * @param startLine first line of scrolled region
- * @param size size of scrolled region (number of lines)
- * @param shift delta by which the region is scrolled
- */
- protected void sendScrolledToSnapshots(int startLine,int size, int shift) {
- for (int i = 0; i < fSnapshots.length; i++) {
- fSnapshots[i].scroll(startLine, size, shift);
- }
- }
- protected void sendCursorChanged() {
- for (int i = 0; i < fSnapshots.length; i++) {
- fSnapshots[i].markCursorChanged();
- }
- }
- /**
- * Removes the snapshot from the @observer@ list
- * @param snapshot A snapshot of a terminal model
- */
- protected void removeSnapshot(TerminalTextDataSnapshot snapshot) {
- // poor mans approach to modify the array
- List list=new ArrayList();
- list.addAll(Arrays.asList(fSnapshots));
- list.remove(snapshot);
- fSnapshots=(TerminalTextDataSnapshot[]) list.toArray(new TerminalTextDataSnapshot[list.size()]);
- }
-
- public ITerminalTextDataSnapshot makeSnapshot() {
- // poor mans approach to modify the array
- TerminalTextDataSnapshot snapshot=new TerminalTextDataSnapshot(this);
- snapshot.markDimensionsChanged();
- List list=new ArrayList();
- list.addAll(Arrays.asList(fSnapshots));
- list.add(snapshot);
- fSnapshots=(TerminalTextDataSnapshot[]) list.toArray(new TerminalTextDataSnapshot[list.size()]);
- return snapshot;
- }
- public void addLine() {
- int oldHeight=getHeight();
- fData.addLine();
- // was is an append or a scroll?
- int newHeight=getHeight();
- if(newHeight>oldHeight) {
- //the line was appended
- sendLinesChangedToSnapshot(oldHeight, 1);
- int width=getWidth();
- sendDimensionsChanged(oldHeight, width, newHeight, width);
-
- } else {
- // the line was scrolled
- sendScrolledToSnapshots(0, oldHeight, -1);
- }
-
- }
-
- public void copy(ITerminalTextData source) {
- fData.copy(source);
- fCursorLine=source.getCursorLine();
- fCursorColumn=source.getCursorColumn();
- }
-
- public void copyLine(ITerminalTextData source, int sourceLine, int destLine) {
- fData.copyLine(source, sourceLine, destLine);
- }
- public void copyRange(ITerminalTextData source, int sourceStartLine, int destStartLine, int length) {
- fData.copyRange(source, sourceStartLine, destStartLine, length);
- }
- public char[] getChars(int line) {
- return fData.getChars(line);
- }
- public Style[] getStyles(int line) {
- return fData.getStyles(line);
- }
- public int getMaxHeight() {
- return fData.getMaxHeight();
- }
- public void setMaxHeight(int height) {
- fData.setMaxHeight(height);
- }
- public void cleanLine(int line) {
- fData.cleanLine(line);
- sendLineChangedToSnapshots(line);
- }
- public int getCursorColumn() {
- return fCursorColumn;
- }
- public int getCursorLine() {
- return fCursorLine;
- }
- public void setCursorColumn(int column) {
- fCursorColumn=column;
- sendCursorChanged();
- }
- public void setCursorLine(int line) {
- fCursorLine=line;
- sendCursorChanged();
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataFastScroll.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataFastScroll.java
deleted file mode 100644
index 6038241ca..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataFastScroll.java
+++ /dev/null
@@ -1,250 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tm.internal.terminal.model;
-
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-import org.eclipse.tm.terminal.model.ITerminalTextDataSnapshot;
-import org.eclipse.tm.terminal.model.LineSegment;
-import org.eclipse.tm.terminal.model.Style;
-
-/**
- * This class is optimized for scrolling the entire {@link #getHeight()}.
- * The scrolling is done by moving an offset into the data and using
- * the modulo operator.
- *
- */
-public class TerminalTextDataFastScroll implements ITerminalTextData {
-
- final ITerminalTextData fData;
- private int fHeight;
- private int fMaxHeight;
- /**
- * The offset into the array.
- */
- int fOffset;
- public TerminalTextDataFastScroll(ITerminalTextData data,int maxHeight) {
- fMaxHeight=maxHeight;
- fData=data;
- fData.setDimensions(maxHeight, fData.getWidth());
- if(maxHeight>2)
- assert shiftOffset(-2) || throwRuntimeException();
- }
- public TerminalTextDataFastScroll(int maxHeight) {
- this(new TerminalTextDataStore(),maxHeight);
- }
- public TerminalTextDataFastScroll() {
- this(new TerminalTextDataStore(),1);
- }
- /**
- * This is used in asserts to throw an {@link RuntimeException}.
- * This is useful for tests.
- * @return never -- throws an exception
- */
- private boolean throwRuntimeException() {
- throw new RuntimeException();
- }
- /**
- *
- * @param line
- * @return the actual line number in {@link #fData}
- */
- int getPositionOfLine(int line) {
- return (line+fOffset)%fMaxHeight;
- }
- /**
- * Moves offset by delta. This does <b>not</b> move the data!
- * @param delta
- */
- void moveOffset(int delta) {
- assert Math.abs(delta)<fMaxHeight || throwRuntimeException();
- fOffset=(fMaxHeight+fOffset+delta)%fMaxHeight;
-
- }
- /**
- * Test method to shift the offset for testing (if assert ==true)
- * @param shift TODO
- * @return true
- */
- private boolean shiftOffset(int shift) {
- moveOffset(shift);
- return true;
- }
- public void addLine() {
- if(getHeight()<fMaxHeight) {
- setDimensions(getHeight()+1, getWidth());
- } else {
- scroll(0,getHeight(),-1);
- }
- }
- public void cleanLine(int line) {
- fData.cleanLine(getPositionOfLine(line));
- }
-
- public void copy(ITerminalTextData source) {
- int n=source.getHeight();
- setDimensions(source.getHeight(),source.getWidth());
- for (int i = 0; i < n; i++) {
- fData.copyLine(source, i, getPositionOfLine(i));
- }
- }
-
- public void copyLine(ITerminalTextData source, int sourceLine, int destLine) {
- fData.copyLine(source, sourceLine, getPositionOfLine(destLine));
- }
-
- public void copyRange(ITerminalTextData source, int sourceStartLine, int destStartLine, int length) {
- assert (destStartLine>=0 && destStartLine+length<=fHeight) || throwRuntimeException();
- for (int i = 0; i < length; i++) {
- fData.copyLine(source, i+sourceStartLine, getPositionOfLine(i+destStartLine));
- }
- }
-
- public char getChar(int line, int column) {
- assert (line>=0 && line<fHeight) || throwRuntimeException();
- return fData.getChar(getPositionOfLine(line), column);
- }
-
- public char[] getChars(int line) {
- assert (line>=0 && line<fHeight) || throwRuntimeException();
- return fData.getChars(getPositionOfLine(line));
- }
-
- public int getHeight() {
- return fHeight;
- }
-
- public LineSegment[] getLineSegments(int line, int startCol, int numberOfCols) {
- assert (line>=0 && line<fHeight) || throwRuntimeException();
- return fData.getLineSegments(getPositionOfLine(line), startCol, numberOfCols);
- }
-
- public int getMaxHeight() {
- return fMaxHeight;
- }
-
- public Style getStyle(int line, int column) {
- assert (line>=0 && line<fHeight) || throwRuntimeException();
- return fData.getStyle(getPositionOfLine(line), column);
- }
-
- public Style[] getStyles(int line) {
- assert (line>=0 && line<fHeight) || throwRuntimeException();
- return fData.getStyles(getPositionOfLine(line));
- }
-
- public int getWidth() {
- return fData.getWidth();
- }
-
- public ITerminalTextDataSnapshot makeSnapshot() {
- return fData.makeSnapshot();
- }
- private void cleanLines(int line, int len) {
- for (int i = line; i < line+len; i++) {
- fData.cleanLine(getPositionOfLine(i));
- }
- }
- public void scroll(int startLine, int size, int shift) {
- assert (startLine>=0 && startLine+size<=fHeight) || throwRuntimeException();
- if(shift>=fMaxHeight || -shift>=fMaxHeight) {
- cleanLines(startLine, fMaxHeight-startLine);
- return;
- }
- if(size==fHeight) {
- // This is the case this class is optimized for!
- moveOffset(-shift);
- // we only have to clean the lines that appear by the move
- if(shift<0) {
- cleanLines(Math.max(startLine, startLine+size+shift),Math.min(-shift, getHeight()-startLine));
- } else {
- cleanLines(startLine, Math.min(shift, getHeight()-startLine));
- }
- } else {
- // we have to copy the lines.
- if(shift<0) {
- // move the region up
- // shift is negative!!
- for (int i = startLine; i < startLine+size+shift; i++) {
- fData.copyLine(fData, getPositionOfLine(i-shift), getPositionOfLine(i));
- }
- // then clean the opened lines
- cleanLines(Math.max(0, startLine+size+shift),Math.min(-shift, getHeight()-startLine));
- } else {
- for (int i = startLine+size-1; i >=startLine && i-shift>=0; i--) {
- fData.copyLine(fData, getPositionOfLine(i-shift), getPositionOfLine(i));
- }
- cleanLines(startLine, Math.min(shift, getHeight()-startLine));
- }
- }
- }
-
- public void setChar(int line, int column, char c, Style style) {
- assert (line>=0 && line<fHeight) || throwRuntimeException();
- fData.setChar(getPositionOfLine(line), column, c, style);
- }
-
- public void setChars(int line, int column, char[] chars, int start, int len, Style style) {
- assert (line>=0 && line<fHeight) || throwRuntimeException();
- fData.setChars(getPositionOfLine(line), column, chars, start, len, style);
- }
-
- public void setChars(int line, int column, char[] chars, Style style) {
- assert (line>=0 && line<fHeight) || throwRuntimeException();
- fData.setChars(getPositionOfLine(line), column, chars, style);
- }
-
- public void setDimensions(int height, int width) {
- assert height>=0 || throwRuntimeException();
- assert width>=0 || throwRuntimeException();
- if(height > fMaxHeight)
- setMaxHeight(height);
- fHeight=height;
- if(width!=fData.getWidth())
- fData.setDimensions(fMaxHeight, width);
- }
-
- public void setMaxHeight(int maxHeight) {
- assert maxHeight>=fHeight || throwRuntimeException();
- // move everything to offset0
- int start=getPositionOfLine(0);
- if(start!=0) {
- // invent a more efficient algorithm....
- ITerminalTextData buffer=new TerminalTextDataStore();
- // create a buffer with the expected height
- buffer.setDimensions(maxHeight, getWidth());
- int n=Math.min(fMaxHeight-start,maxHeight);
- // copy the first part
- buffer.copyRange(fData, start, 0, n);
- // copy the second part
- if(n<maxHeight)
- buffer.copyRange(fData, 0, n, Math.min(fMaxHeight-n,maxHeight-n));
- // copy the buffer back to our data
- fData.copy(buffer);
- shiftOffset(-start);
- } else {
- fData.setDimensions(maxHeight, fData.getWidth());
- }
- fMaxHeight=maxHeight;
- }
- public int getCursorColumn() {
- throw new UnsupportedOperationException();
- }
- public int getCursorLine() {
- throw new UnsupportedOperationException();
- }
- public void setCursorColumn(int column) {
- throw new UnsupportedOperationException();
- }
- public void setCursorLine(int line) {
- throw new UnsupportedOperationException();
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataSnapshot.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataSnapshot.java
deleted file mode 100644
index b24c48b45..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataSnapshot.java
+++ /dev/null
@@ -1,299 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tm.internal.terminal.model;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-import org.eclipse.tm.terminal.model.ITerminalTextDataSnapshot;
-import org.eclipse.tm.terminal.model.LineSegment;
-import org.eclipse.tm.terminal.model.Style;
-
-/**
- * The public methods of this class have to be called from one thread!
- *
- * Threading considerations:
- * This class is <b>not threadsafe</b>!
- */
-class TerminalTextDataSnapshot implements ITerminalTextDataSnapshot {
- /**
- * The changes of the current snapshot relative to the
- * previous snapshot
- */
- volatile ISnapshotChanges fCurrentChanges;
- /**
- * Keeps track of changes that happened since the current
- * snapshot has been made.
- */
- ISnapshotChanges fFutureChanges;
- /**
- * Is used as lock and is the reference to the terminal we take snapshots from.
- */
- final TerminalTextData fTerminal;
- /**
- * A snapshot copy of of fTerminal
- */
- // snapshot does not need internal synchronisation
- final TerminalTextDataWindow fSnapshot;
- // this variable is synchronized on fTerminal!
- private SnapshotOutOfDateListener[] fListener=new SnapshotOutOfDateListener[0];
- // this variable is synchronized on fTerminal!
- private boolean fListenersNeedNotify;
- private int fInterestWindowSize;
- private int fInterestWindowStartLine;
-
- TerminalTextDataSnapshot(TerminalTextData terminal) {
- fSnapshot = new TerminalTextDataWindow();
- fTerminal = terminal;
- fCurrentChanges = new SnapshotChanges(fTerminal.getHeight());
- fCurrentChanges.setTerminalChanged();
- fFutureChanges = new SnapshotChanges(fTerminal.getHeight());
- fFutureChanges.markLinesChanged(0, fTerminal.getHeight());
- fListenersNeedNotify=true;
- fInterestWindowSize=-1;
- }
- /**
- * This is used in asserts to throw an {@link RuntimeException}.
- * This is useful for tests.
- * @return never -- throws an exception
- */
- private boolean throwRuntimeException() {
- throw new RuntimeException();
- }
-
- public void detach() {
- fTerminal.removeSnapshot(this);
- }
-
- public boolean isOutOfDate() {
- // this is called from fTerminal, therefore we lock on fTerminal
- synchronized (fTerminal) {
- return fFutureChanges.hasChanged();
- }
- }
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.model.ITerminalTextDataSnapshot#snapshot()
- */
- public void updateSnapshot(boolean detectScrolling) {
- // make sure terminal does not change while we make the snapshot
- synchronized (fTerminal) {
- // let's make the future changes current
- fCurrentChanges=fFutureChanges;
- fFutureChanges=new SnapshotChanges(fTerminal.getHeight());
- fFutureChanges.setInterestWindow(fInterestWindowStartLine, fInterestWindowSize);
- // and update the snapshot
- if(fSnapshot.getHeight()!=fTerminal.getHeight()||fSnapshot.getWidth()!=fTerminal.getWidth()) {
- if(fInterestWindowSize==-1)
- fSnapshot.setWindow(0, fTerminal.getHeight());
- // if the dimensions have changed, we need a full copy
- fSnapshot.copy(fTerminal);
- // and we mark all lines as changed
- fCurrentChanges.setAllChanged(fTerminal.getHeight());
- } else {
- // first we do the scroll on the copy
- int start=fCurrentChanges.getScrollWindowStartLine();
- int lines=Math.min(fCurrentChanges.getScrollWindowSize(), fSnapshot.getHeight()-start);
- fSnapshot.scroll(start, lines, fCurrentChanges.getScrollWindowShift());
- // and then create the snapshot of the changed lines
- fCurrentChanges.copyChangedLines(fSnapshot, fTerminal);
- }
- fListenersNeedNotify=true;
- fSnapshot.setCursorLine(fTerminal.getCursorLine());
- fSnapshot.setCursorColumn(fTerminal.getCursorColumn());
- }
- if(!detectScrolling) {
- // let's pretend there was no scrolling and
- // convert the scrolling into line changes
- fCurrentChanges.convertScrollingIntoChanges();
- }
- }
-
- public char getChar(int line, int column) {
- return fSnapshot.getChar(line, column);
- }
-
- public int getHeight() {
- return fSnapshot.getHeight();
- }
-
- public LineSegment[] getLineSegments(int line, int column, int len) {
- return fSnapshot.getLineSegments(line, column, len);
- }
-
- public Style getStyle(int line, int column) {
- return fSnapshot.getStyle(line, column);
- }
-
- public int getWidth() {
- return fSnapshot.getWidth();
- }
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.model.ITerminalTextDataSnapshot#getFirstChangedLine()
- */
- public int getFirstChangedLine() {
- return fCurrentChanges.getFirstChangedLine();
- }
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.model.ITerminalTextDataSnapshot#getLastChangedLine()
- */
- public int getLastChangedLine() {
- return fCurrentChanges.getLastChangedLine();
- }
-
- public boolean hasLineChanged(int line) {
- return fCurrentChanges.hasLineChanged(line);
- }
- public boolean hasDimensionsChanged() {
- return fCurrentChanges.hasDimensionsChanged();
- }
- public boolean hasTerminalChanged() {
- return fCurrentChanges.hasTerminalChanged();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.model.ITerminalTextDataSnapshot#getScrollChangeY()
- */
- public int getScrollWindowStartLine() {
- return fCurrentChanges.getScrollWindowStartLine();
- }
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.model.ITerminalTextDataSnapshot#getScrollChangeN()
- */
- public int getScrollWindowSize() {
- return fCurrentChanges.getScrollWindowSize();
- }
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.model.ITerminalTextDataSnapshot#getScrollChangeShift()
- */
- public int getScrollWindowShift() {
- return fCurrentChanges.getScrollWindowShift();
- }
-
- /**
- * Announces a change in line line
- * @param line
- */
- void markLineChanged(int line) {
- // threading
- fFutureChanges.markLineChanged(line);
- fFutureChanges.setTerminalChanged();
- notifyListers();
- }
- /**
- * Announces a change of n lines beginning with line line
- * @param line
- * @param n
- */
- void markLinesChanged(int line,int n) {
- fFutureChanges.markLinesChanged(line,n);
- fFutureChanges.setTerminalChanged();
- notifyListers();
- }
-
- void markDimensionsChanged() {
- fFutureChanges.markDimensionsChanged();
- fFutureChanges.setTerminalChanged();
- notifyListers();
- }
- void markCursorChanged() {
- fFutureChanges.markCursorChanged();
- fFutureChanges.setTerminalChanged();
- notifyListers();
- }
-
- /**
- * @param startLine
- * @param size
- * @param shift
- */
- void scroll(int startLine, int size, int shift) {
- fFutureChanges.scroll(startLine,size,shift);
- fFutureChanges.setTerminalChanged();
- notifyListers();
- }
- /**
- * Notifies listeners about the change
- */
- private void notifyListers() {
- // this code has to be called from a block synchronized on fTerminal
- synchronized (fTerminal) {
- if(fListenersNeedNotify) {
- for (int i = 0; i < fListener.length; i++) {
- fListener[i].snapshotOutOfDate(this);
- }
- fListenersNeedNotify=false;
- }
- }
- }
- public ITerminalTextDataSnapshot makeSnapshot() {
- return fSnapshot.makeSnapshot();
- }
-
- synchronized public void addListener(SnapshotOutOfDateListener listener) {
- List list=new ArrayList();
- list.addAll(Arrays.asList(fListener));
- list.add(listener);
- fListener=(SnapshotOutOfDateListener[]) list.toArray(new SnapshotOutOfDateListener[list.size()]);
- }
-
- synchronized public void removeListener(SnapshotOutOfDateListener listener) {
- List list=new ArrayList();
- list.addAll(Arrays.asList(fListener));
- list.remove(listener);
- fListener=(SnapshotOutOfDateListener[]) list.toArray(new SnapshotOutOfDateListener[list.size()]);
- }
- public String toString() {
- return fSnapshot.toString();
- }
-
-
- public int getInterestWindowSize() {
- return fInterestWindowSize;
- }
-
-
- public int getInterestWindowStartLine() {
- return fInterestWindowStartLine;
- }
-
- public void setInterestWindow(int startLine, int size) {
- assert startLine>=0 || throwRuntimeException();
- assert size>=0 || throwRuntimeException();
- fInterestWindowStartLine=startLine;
- fInterestWindowSize=size;
- fSnapshot.setWindow(startLine, size);
- fFutureChanges.setInterestWindow(startLine, size);
- notifyListers();
- }
-
-
- public char[] getChars(int line) {
- return fSnapshot.getChars(line);
- }
-
-
- public Style[] getStyles(int line) {
- return fSnapshot.getStyles(line);
- }
- public int getCursorColumn() {
- return fSnapshot.getCursorColumn();
- }
- public int getCursorLine() {
- return fSnapshot.getCursorLine();
- }
- public ITerminalTextData getTerminalTextData() {
- return fTerminal;
- }
-}
-
-
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataStore.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataStore.java
deleted file mode 100644
index fd85cc35e..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataStore.java
+++ /dev/null
@@ -1,333 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tm.internal.terminal.model;
-
-import java.lang.reflect.Array;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-import org.eclipse.tm.terminal.model.ITerminalTextDataSnapshot;
-import org.eclipse.tm.terminal.model.LineSegment;
-import org.eclipse.tm.terminal.model.Style;
-
-/**
- * This class is thread safe.
- *
- */
-public class TerminalTextDataStore implements ITerminalTextData {
- private char[][] fChars;
- private Style[][] fStyle;
- private int fWidth;
- private int fHeight;
- private int fMaxHeight;
- private int fCursorColumn;
- private int fCursorLine;
- public TerminalTextDataStore() {
- fChars=new char[0][];
- fStyle=new Style[0][];
- fWidth=0;
- }
- /**
- * This is used in asserts to throw an {@link RuntimeException}.
- * This is useful for tests.
- * @return never -- throws an exception
- */
- private boolean throwRuntimeException() {
- throw new RuntimeException();
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.text.ITerminalTextData#getWidth()
- */
- public int getWidth() {
- return fWidth;
- }
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.text.ITerminalTextData#getHeight()
- */
- public int getHeight() {
- return fHeight;
- }
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.text.ITerminalTextData#setDimensions(int, int)
- */
- public void setDimensions(int height, int width) {
- assert height>=0 || throwRuntimeException();
- assert width>=0 || throwRuntimeException();
- // just extend the region
- if(height>fChars.length) {
- int h=4*height/3;
- if(fMaxHeight>0 && h>fMaxHeight)
- h=fMaxHeight;
- fStyle=(Style[][]) resizeArray(fStyle, height);
- fChars=(char[][]) resizeArray(fChars, height);
- }
- // clean the new lines
- if(height>fHeight) {
- for (int i = fHeight; i < height; i++) {
- fStyle[i]=null;
- fChars[i]=null;
- }
- }
- // set dimensions after successful resize!
- fWidth=width;
- fHeight=height;
- }
- /**
- * Reallocates an array with a new size, and copies the contents of the old
- * array to the new array.
- *
- * @param origArray the old array, to be reallocated.
- * @param newSize the new array size.
- * @return A new array with the same contents (chopped off if needed or filled with 0 or null).
- */
- private Object resizeArray(Object origArray, int newSize) {
- int oldSize = Array.getLength(origArray);
- if(oldSize==newSize)
- return origArray;
- Class elementType = origArray.getClass().getComponentType();
- Object newArray = Array.newInstance(elementType, newSize);
- int preserveLength = Math.min(oldSize, newSize);
- if (preserveLength > 0)
- System.arraycopy(origArray, 0, newArray, 0, preserveLength);
- return newArray;
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.text.ITerminalTextData#getLineSegments(int, int, int)
- */
- public LineSegment[] getLineSegments(int line, int column, int len) {
- // get the styles and chars for this line
- Style[] styles=fStyle[line];
- char[] chars=fChars[line];
- int col=column;
- int n=column+len;
-
- // expand the line if needed....
- if(styles==null)
- styles=new Style[n];
- else if(styles.length<n)
- styles=(Style[]) resizeArray(styles, n);
-
- if(chars==null)
- chars=new char[n];
- else if(chars.length<n)
- chars=(char[]) resizeArray(chars, n);
-
- // and create the line segments
- Style style=styles[column];
- List segments=new ArrayList();
- for (int i = column; i < n; i++) {
- if(styles[i]!=style) {
- segments.add(new LineSegment(col,new String(chars,col,i-col),style));
- style=styles[i];
- col=i;
- }
- }
- if(col < n) {
- segments.add(new LineSegment(col,new String(chars,col,n-col),style));
- }
- return (LineSegment[]) segments.toArray(new LineSegment[segments.size()]);
- }
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.text.ITerminalTextData#getChar(int, int)
- */
- public char getChar(int line, int column) {
- assert column<fWidth || throwRuntimeException();
- if(fChars[line]==null||column>=fChars[line].length)
- return 0;
- return fChars[line][column];
- }
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.text.ITerminalTextData#getStyle(int, int)
- */
- public Style getStyle(int line, int column) {
- assert column<fWidth || throwRuntimeException();
- if(fStyle[line]==null || column>=fStyle[line].length)
- return null;
- return fStyle[line][column];
- }
-
- void ensureLineLength(int iLine, int length) {
- if(length>fWidth)
- throw new RuntimeException();
- if(fChars[iLine]==null) {
- fChars[iLine]=new char[length];
- } else if(fChars[iLine].length<length) {
- fChars[iLine]=(char[]) resizeArray(fChars[iLine],length);
- }
- if(fStyle[iLine]==null) {
- fStyle[iLine]=new Style[length];
- } else if(fStyle[iLine].length<length) {
- fStyle[iLine]=(Style[]) resizeArray(fStyle[iLine],length);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.text.ITerminalTextData#setChar(int, int, char, org.eclipse.tm.internal.terminal.text.Style)
- */
- public void setChar(int line, int column, char c, Style style) {
- ensureLineLength(line,column+1);
- fChars[line][column]=c;
- fStyle[line][column]=style;
- }
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.text.ITerminalTextData#setChars(int, int, char[], org.eclipse.tm.internal.terminal.text.Style)
- */
- public void setChars(int line, int column, char[] chars, Style style) {
- setChars(line,column,chars,0,chars.length,style);
- }
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.text.ITerminalTextData#setChars(int, int, char[], int, int, org.eclipse.tm.internal.terminal.text.Style)
- */
- public void setChars(int line, int column, char[] chars, int start, int len, Style style) {
- ensureLineLength(line,column+len);
- for (int i = 0; i < len; i++) {
- fChars[line][column+i]=chars[i+start];
- fStyle[line][column+i]=style;
- }
- }
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.text.ITerminalTextData#scroll(int, int, int)
- */
- public void scroll(int startLine, int size, int shift) {
- assert startLine+size <= getHeight() || throwRuntimeException();
- if(shift<0) {
- // move the region up
- // shift is negative!!
- for (int i = startLine; i < startLine+size+shift; i++) {
- fChars[i]=fChars[i-shift];
- fStyle[i]=fStyle[i-shift];
- }
- // then clean the opened lines
- cleanLines(Math.max(startLine, startLine+size+shift),Math.min(-shift, getHeight()-startLine));
-// cleanLines(Math.max(0, startLine+size+shift),Math.min(-shift, getHeight()-startLine));
- } else {
- for (int i = startLine+size-1; i >=startLine && i-shift>=0; i--) {
- fChars[i]=fChars[i-shift];
- fStyle[i]=fStyle[i-shift];
- }
- cleanLines(startLine, Math.min(shift, getHeight()-startLine));
- }
- }
- /**
- * Replaces the lines with new empty data
- * @param line
- * @param len
- */
- private void cleanLines(int line, int len) {
- for (int i = line; i < line+len; i++) {
- fChars[i]=null;
- fStyle[i]=null;
- }
- }
-
- /*
- * @return a text representation of the object.
- * Lines are separated by '\n'. No style information is returned.
- */
- public String toString() {
- StringBuffer buff=new StringBuffer();
- for (int line = 0; line < getHeight(); line++) {
- if(line>0)
- buff.append("\n"); //$NON-NLS-1$
- for (int column = 0; column < fWidth; column++) {
- buff.append(getChar(line, column));
- }
- }
- return buff.toString();
- }
-
-
- public ITerminalTextDataSnapshot makeSnapshot() {
- throw new UnsupportedOperationException();
- }
-
- public void addLine() {
- if(fMaxHeight>0 && getHeight()<fMaxHeight) {
- setDimensions(getHeight()+1, getWidth());
- } else {
- scroll(0,getHeight(),-1);
- }
- }
-
- public void copy(ITerminalTextData source) {
- fWidth=source.getWidth();
- int n=source.getHeight();
- if(getHeight()!=n) {
- fChars=new char[n][];
- fStyle=new Style[n][];
- }
- for (int i = 0; i < n; i++) {
- fChars[i]=source.getChars(i);
- fStyle[i]=source.getStyles(i);
- }
- fHeight=n;
- fCursorLine=source.getCursorLine();
- fCursorColumn=source.getCursorColumn();
- }
- public void copyRange(ITerminalTextData source, int sourceStartLine, int destStartLine,int length) {
- for (int i = 0; i < length; i++) {
- fChars[i+destStartLine]=source.getChars(i+sourceStartLine);
- fStyle[i+destStartLine]=source.getStyles(i+sourceStartLine);
- }
- }
-
- public void copyLine(ITerminalTextData source, int sourceLine, int destLine) {
- fChars[destLine]=source.getChars(sourceLine);
- fStyle[destLine]=source.getStyles(sourceLine);
- }
-
- public char[] getChars(int line) {
- if(fChars[line]==null)
- return null;
- return (char[]) fChars[line].clone();
- }
-
- public Style[] getStyles(int line) {
- if(fStyle[line]==null)
- return null;
- return (Style[]) fStyle[line].clone();
- }
-
- public void setLine(int line, char[] chars, Style[] styles) {
- fChars[line]=(char[]) chars.clone();
- fStyle[line]=(Style[]) styles.clone();
- }
-
- public void setMaxHeight(int height) {
- fMaxHeight=height;
- }
-
- public int getMaxHeight() {
- return fMaxHeight;
- }
-
- public void cleanLine(int line) {
- fChars[line]=null;
- fStyle[line]=null;
- }
- public int getCursorColumn() {
- return fCursorColumn;
- }
- public int getCursorLine() {
- return fCursorLine;
- }
- public void setCursorColumn(int column) {
- fCursorColumn=column;
- }
- public void setCursorLine(int line) {
- fCursorLine=line;
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataWindow.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataWindow.java
deleted file mode 100644
index 0c4072cc5..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/model/TerminalTextDataWindow.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tm.internal.terminal.model;
-
-import org.eclipse.tm.terminal.model.ITerminalTextData;
-import org.eclipse.tm.terminal.model.ITerminalTextDataSnapshot;
-import org.eclipse.tm.terminal.model.LineSegment;
-import org.eclipse.tm.terminal.model.Style;
-
-/**
- * This class stores the data only within a window {@link #setWindow(int, int)} and
- * {@link #getWindowStartLine()} and {@link #getWindowSize()}. Everything outside
- * the is <code>char=='\000'</code> and <code>style=null</code>.
- *
- */
-public class TerminalTextDataWindow implements ITerminalTextData {
- final ITerminalTextData fData;
- int fWindowStartLine;
- int fWindowSize;
- int fHeight;
- int fMaxHeight;
- public TerminalTextDataWindow(ITerminalTextData data) {
- fData=data;
- }
- public TerminalTextDataWindow() {
- this(new TerminalTextDataStore());
- }
- /**
- * This is used in asserts to throw an {@link RuntimeException}.
- * This is useful for tests.
- * @return never -- throws an exception
- */
- private boolean throwRuntimeException() {
- throw new RuntimeException();
- }
- /**
- * @param line
- * @return true if the line is within the window
- */
- boolean isInWindow(int line) {
- return line>=fWindowStartLine && line<fWindowStartLine+fWindowSize;
- }
- public char getChar(int line, int column) {
- if(!isInWindow(line))
- return 0;
- return fData.getChar(line-fWindowStartLine, column);
- }
-
- public char[] getChars(int line) {
- if(!isInWindow(line))
- return null;
- return fData.getChars(line-fWindowStartLine);
- }
-
- public int getHeight() {
- return fHeight;
- }
-
- public LineSegment[] getLineSegments(int line, int startCol, int numberOfCols) {
- if(!isInWindow(line))
- return new LineSegment[]{new LineSegment(startCol,new String(new char[numberOfCols]),null)};
- return fData.getLineSegments(line-fWindowStartLine, startCol, numberOfCols);
- }
-
- public int getMaxHeight() {
- return fMaxHeight;
- }
-
- public Style getStyle(int line, int column) {
- if(!isInWindow(line))
- return null;
- return fData.getStyle(line-fWindowStartLine, column);
- }
-
- public Style[] getStyles(int line) {
- if(!isInWindow(line))
- return null;
- return fData.getStyles(line-fWindowStartLine);
- }
-
- public int getWidth() {
- return fData.getWidth();
- }
-
- public ITerminalTextDataSnapshot makeSnapshot() {
- throw new UnsupportedOperationException();
- }
- public void addLine() {
- if(fMaxHeight>0 && getHeight()<fMaxHeight) {
- setDimensions(getHeight()+1, getWidth());
- } else {
- scroll(0,getHeight(),-1);
- }
- }
- public void copy(ITerminalTextData source) {
- // we inherit the dimensions of the source
- setDimensions(source.getHeight(), source.getWidth());
- int n=Math.min(fWindowSize, source.getHeight()-fWindowStartLine);
- if(n>0)
- fData.copyRange(source, fWindowStartLine, 0, n);
- }
- public void copyRange(ITerminalTextData source, int sourceStartLine, int destStartLine, int length) {
- int n=length;
- int dStart=destStartLine-fWindowStartLine;
- int sStart=sourceStartLine;
- // if start outside our range, cut the length to copy
- if(dStart<0) {
- n+=dStart;
- sStart-=dStart;
- dStart=0;
- }
- // do not exceed the window size
- n=Math.min(n,fWindowSize);
- if(n>0)
- fData.copyRange(source, sStart, dStart, n);
-
- }
- public void copyLine(ITerminalTextData source, int sourceLine, int destLine) {
- if(isInWindow(destLine))
- fData.copyLine(source, sourceLine, destLine-fWindowStartLine);
- }
- public void scroll(int startLine, int size, int shift) {
- assert (startLine>=0 && startLine+size<=fHeight) || throwRuntimeException();
- int n=size;
- int start=startLine-fWindowStartLine;
- // if start outside our range, cut the length to copy
- if(start<0) {
- n+=start;
- start=0;
- }
- n=Math.min(n,fWindowSize-start);
- // do not exceed the window size
- if(n>0)
- fData.scroll(start, n, shift);
- }
- public void setChar(int line, int column, char c, Style style) {
- if(!isInWindow(line))
- return;
- fData.setChar(line-fWindowStartLine, column, c, style);
- }
- public void setChars(int line, int column, char[] chars, int start, int len, Style style) {
- if(!isInWindow(line))
- return;
- fData.setChars(line-fWindowStartLine, column, chars, start, len, style);
- }
- public void setChars(int line, int column, char[] chars, Style style) {
- if(!isInWindow(line))
- return;
- fData.setChars(line-fWindowStartLine, column, chars, style);
- }
- public void setDimensions(int height, int width) {
- assert height>=0 || throwRuntimeException();
- fData.setDimensions(fWindowSize, width);
- fHeight=height;
- }
- public void setMaxHeight(int height) {
- fMaxHeight=height;
- }
- public void setWindow(int startLine, int size) {
-// assert startLine+size<=getHeight()||throwRuntimeException();
- fWindowStartLine=startLine;
- fWindowSize=size;
- fData.setDimensions(fWindowSize, getWidth());
- }
- public int getWindowStartLine() {
- return fWindowStartLine;
- }
- public int getWindowSize() {
- return fWindowSize;
- }
- public void setHeight(int height) {
- fHeight = height;
- }
- public void cleanLine(int line) {
- if(isInWindow(line))
- fData.cleanLine(line-fWindowStartLine);
- }
- public int getCursorColumn() {
- return fData.getCursorColumn();
- }
- public int getCursorLine() {
- return fData.getCursorLine();
- }
- public void setCursorColumn(int column) {
- fData.setCursorColumn(column);
- }
- public void setCursorLine(int line) {
- fData.setCursorLine(line);
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/ISettingsPage.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/ISettingsPage.java
deleted file mode 100644
index 0abc5b046..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/ISettingsPage.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.provisional.api;
-
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * @author Michael Scharf
- *
- * TODO: Michael Scharf: provide a mechanism to set an error string
- * TODO: Michael Scharf: provide a long description of a wizard
- * TODO: Michael Scharf: allow multiple pages to be generated
- * <p>
- * <strong>EXPERIMENTAL</strong>. This class or interface has been added as
- * part of a work in progress. There is no guarantee that this API will
- * work or that it will remain the same. Please do not use this API without
- * consulting with the <a href="http://www.eclipse.org/dsdp/tm/">Target Management</a> team.
- * </p>
- */
-public interface ISettingsPage {
- /**
- * Create a page to be shown in a dialog or wizard to setup the connection.
- * @param parent
- */
- void createControl(Composite parent);
-
- /**
- * Called before the page is shown. Loads the state from the {@link ITerminalConnector}.
- */
- void loadSettings();
-
- /**
- * Called when the OK button is pressed.
- */
- void saveSettings();
-
- /**
- * @return true if the
- */
- boolean validateSettings();
-
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/ISettingsStore.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/ISettingsStore.java
deleted file mode 100644
index 8bdd06ac1..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/ISettingsStore.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.provisional.api;
-
-/**
- * A simple interface to a store to persist the state of a connection.
- *
- * @author Michael Scharf
- * <p>
- * <strong>EXPERIMENTAL</strong>. This class or interface has been added as
- * part of a work in progress. There is no guarantee that this API will
- * work or that it will remain the same. Please do not use this API without
- * consulting with the <a href="http://www.eclipse.org/dsdp/tm/">Target Management</a> team.
- * </p>
- */
-public interface ISettingsStore {
- /**
- * @param key alpha numeric key, may contain dots (.)
- * @return value
- */
- String get(String key);
-
- /**
- * @param key alpha numeric key, may contain dots (.)
- * @param defaultValue
- * @return the value or the default
- */
- String get(String key, String defaultValue);
-
- /**
- * Save a string value
- * @param key alpha numeric key, may contain dots (.)
- * @param value
- */
- void put(String key, String value);
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/ITerminalConnector.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/ITerminalConnector.java
deleted file mode 100644
index ef1b76a52..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/ITerminalConnector.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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) - fixed copyright headers and beautified
- * Martin Oberhuber (Wind River) - [261486][api][cleanup] Mark @noimplement interfaces as @noextend
- * Uwe Stieber (Wind River) - [282996] [terminal][api] Add "hidden" attribute to terminal connector extension point
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.provisional.api;
-
-import java.io.OutputStream;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.tm.internal.terminal.control.ITerminalViewControl;
-import org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl;
-
-/**
- * A contributed connection type to manage a single connection.
- *
- * Implementations of this class are contributed through the
- * <code>org.eclipse.tm.terminal.terminalConnectors</code> extension point. This
- * class gives access to the static markup of a terminal connector extension as
- * well as providing the lifecycle management for the dynamically loaded
- * {@link TerminalConnectorImpl} instance, which performs the actual
- * communications. This pattern allows for lazy initialization, bundle
- * activation and class loading of the actual {@link TerminalConnectorImpl}
- * instance.
- *
- * Clients can get terminal connector instances from the
- * {@link TerminalConnectorExtension} class, or from
- * {@link ITerminalViewControl#getTerminalConnector()} when running inside an
- * active terminal widget.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- *
- * @author Michael Scharf
- * <p>
- * <strong>EXPERIMENTAL</strong>. This class or interface has been added
- * as part of a work in progress. There is no guarantee that this API
- * will work or that it will remain the same. Please do not use this API
- * without consulting with the <a
- * href="http://www.eclipse.org/dsdp/tm/">Target Management</a> team.
- * </p>
- */
-public interface ITerminalConnector extends IAdaptable {
- /**
- * @return an ID of this connector. The id from the plugin.xml.
- * @since org.eclipse.tm.terminal 2.0
- */
- String getId();
-
- /**
- * @return <code>null</code> the name (as specified in the plugin.xml)
- * @since org.eclipse.tm.terminal 2.0
- */
- String getName();
-
- /**
- * @return <code>True</code> if the connector is not visible in user
- * selections.
- * @since org.eclipse.tm.terminal 3.0.1
- */
- boolean isHidden();
-
- /**
- * @return true if the {@link TerminalConnectorImpl} has been initialized.
- * If there was an initialization error, {@link #getInitializationErrorMessage()}
- * returns the error message.
- * @since org.eclipse.tm.terminal 2.0
- */
- boolean isInitialized();
-
- /**
- * This method initializes the connector if it is not initialized!
- * If the connector was initialized successfully, <code>null</code> is
- * returned. Otherwise an error message describing the problem is returned.
- * @return <code>null</code> or a localized error message.
- * @since org.eclipse.tm.terminal 2.0
- */
- String getInitializationErrorMessage();
-
- /**
- * Connect using the current state of the settings.
- * @param control Used to inform the UI about state changes and messages from the connection.
- */
- void connect(ITerminalControl control);
-
- /**
- * Disconnect if connected. Else do nothing.
- */
- void disconnect();
-
- /**
- * @return true if a local echo is needed.
- * TODO:Michael Scharf: this should be handed within the connection....
- */
- boolean isLocalEcho();
-
- /**
- * Notify the remote site that the size of the terminal has changed.
- * @param newWidth
- * @param newHeight
- */
- void setTerminalSize(int newWidth, int newHeight);
-
- /**
- * @return the terminal to remote stream (bytes written to this stream will
- * be sent to the remote site). For the stream in the other direction (remote to
- * terminal see {@link ITerminalControl#getRemoteToTerminalOutputStream()}
- * @since org.eclipse.tm.terminal 2.0
- */
- OutputStream getTerminalToRemoteStream();
-
- /**
- * Load the state of this connection. Is typically called before
- * {@link #connect(ITerminalControl)}.
- *
- * @param store a string based data store. Short keys like "foo" can be used to
- * store the state of the connection.
- */
- void load(ISettingsStore store);
-
- /**
- * When the view or dialog containing the terminal is closed,
- * the state of the connection is saved into the settings store <code>store</code>
- * @param store
- */
- void save(ISettingsStore store);
-
- /**
- * FIXME should not have UI related stuff in ITerminalConnector, since
- * connectors may be totally programmatic and UI-less. Better make the
- * connector adapt to an interface that controls the UI aspect.
- *
- * @return a new page that can be used in a dialog to setup this connection.
- * The dialog should persist its settings with the
- * {@link #load(ISettingsStore)} and {@link #save(ISettingsStore)}
- * methods.
- */
- ISettingsPage makeSettingsPage();
-
- /**
- * @return A string that represents the settings of the connection. This representation
- * may be shown in the status line of the terminal view.
- */
- String getSettingsSummary();
-
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/ITerminalControl.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/ITerminalControl.java
deleted file mode 100644
index ea9046b7a..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/ITerminalControl.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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) - fixed copyright headers and beautified
- * Martin Oberhuber (Wind River) - [204796] Terminal should allow setting the encoding to use
- * Martin Oberhuber (Wind River) - [261486][api][cleanup] Mark @noimplement interfaces as @noextend
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.provisional.api;
-
-import java.io.OutputStream;
-import java.io.UnsupportedEncodingException;
-
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Represents the terminal view as seen by a terminal connection.
- * <p>
- * <strong>EXPERIMENTAL</strong>. This class or interface has been added as part
- * of a work in progress. There is no guarantee that this API will work or that
- * it will remain the same. Please do not use this API without consulting with
- * the <a href="http://www.eclipse.org/dsdp/tm/">Target Management</a> team.
- * </p>
- *
- * @author Michael Scharf
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface ITerminalControl {
-
- /**
- * @return the current state of the connection
- */
- TerminalState getState();
-
- /**
- * @param state
- */
- void setState(TerminalState state);
-
- /**
- * A shell to show dialogs.
- * @return the shell in which the terminal is shown.
- */
- Shell getShell();
-
- /**
- * Set the encoding that the Terminal uses to decode bytes from the
- * Terminal-to-remote-Stream into Unicode Characters used in Java; or, to
- * encode Characters typed by the user into bytes sent over the wire to the
- * remote.
- *
- * By default, the local Platform Default Encoding is used. Also note that
- * the encoding must not be applied in case the terminal stream is processed
- * by some data transfer protocol which requires binary data.
- *
- * Validity of the encoding set here is not checked. Since some encodings do
- * not cover the entire range of Unicode characters, it can happen that a
- * particular Unicode String typed in by the user can not be encoded into a
- * byte Stream with the encoding specified. and UnsupportedEncodingException
- * will be thrown in this case at the time the String is about to be
- * processed.
- *
- * The concrete encoding to use can either be specified manually by a user,
- * by means of a dialog, or a connector can try to obtain it automatically
- * from the remote side e.g. by evaluating an environment variable such as
- * LANG on UNIX systems.
- *
- * @since org.eclipse.tm.terminal 2.0
- */
- void setEncoding(String encoding) throws UnsupportedEncodingException;
-
- /**
- * Return the current encoding. That's interesting when the previous
- * setEncoding() call failed and the fallback default encoding should be
- * queried, such that e.g. a combobox with encodings to choose can be
- * properly initialized.
- *
- * @return the current Encoding of the Terminal.
- * @since org.eclipse.tm.terminal 2.0
- */
- String getEncoding();
-
- /**
- * Show a text in the terminal. If puts newlines at the beginning and the
- * end.
- *
- * @param text TODO: Michael Scharf: Is this really needed?
- */
- void displayTextInTerminal(String text);
-
- /**
- * @return a stream used to write to the terminal. Any bytes written to this
- * stream appear in the terminal or are interpreted by the emulator as
- * control sequences. The stream in the opposite direction, terminal
- * to remote is in {@link ITerminalConnector#getTerminalToRemoteStream()}.
- */
- OutputStream getRemoteToTerminalOutputStream();
-
- /**
- * Set the title of the terminal view.
- * @param title
- */
- void setTerminalTitle(String title);
-
- /**
- * Show an error message during connect.
- * @param msg
- * TODO: Michael Scharf: Should be replaced by a better error notification mechanism!
- */
- void setMsg(String msg);
-
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/LayeredSettingsStore.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/LayeredSettingsStore.java
deleted file mode 100644
index 193d19d86..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/LayeredSettingsStore.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Michael Scharf (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.provisional.api;
-
-/**
- * Uses an array of {@link ISettingsStore} to find a value.
- * <p>
- * <strong>EXPERIMENTAL</strong>. This class or interface has been added as part
- * of a work in progress. There is no guarantee that this API will work or that
- * it will remain the same. Please do not use this API without consulting with
- * the <a href="http://www.eclipse.org/dsdp/tm/">Target Management</a> team.
- * </p>
- */
-public class LayeredSettingsStore implements ISettingsStore {
-
- private final ISettingsStore[] fStores;
-
- /**
- * @param stores the stores used to search the values.
- * {@link #put(String, String)} will put the value in the
- * first store in the list.
- */
- public LayeredSettingsStore(ISettingsStore[] stores) {
- fStores=stores;
- }
- /**
- * Convince constructor for two stores
- * @param s1 first store
- * @param s2 second store
- */
- public LayeredSettingsStore(ISettingsStore s1, ISettingsStore s2) {
- this(new ISettingsStore[]{s1,s2});
- }
- public String get(String key) {
- for (int i = 0; i < fStores.length; i++) {
- String value=fStores[i].get(key);
- if(value!=null)
- return value;
- }
- return null;
- }
-
- public String get(String key, String defaultValue) {
- String value=get(key);
- if ((value == null) || (value.equals(""))) //$NON-NLS-1$
- return defaultValue;
- return value;
- }
-
- public void put(String key, String value) {
- fStores[0].put(key,value);
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/Logger.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/Logger.java
deleted file mode 100644
index fffd00166..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/Logger.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 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:
- * Fran Litterio (Wind River) - initial API and implementation
- * Ted Williams (Wind River) - refactored into org.eclipse namespace
- * Michael Scharf (Wind River) - split into core, view and connector plugins
- * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.provisional.api;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.PrintStream;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.tm.internal.terminal.control.impl.TerminalPlugin;
-
-/**
- * A simple logger class. Every method in this class is static, so they can be
- * called from both class and instance methods. To use this class, write code
- * like this:
- * <p>
- *
- * <pre>
- * Logger.log(&quot;something has happened&quot;);
- * Logger.log(&quot;counter is &quot; + counter);
- * </pre>
- *
- * @author Fran Litterio <francis.litterio@windriver.com>
- * <p>
- * <strong>EXPERIMENTAL</strong>. This class or interface has been added as
- * part of a work in progress. There is no guarantee that this API will
- * work or that it will remain the same. Please do not use this API without
- * consulting with the <a href="http://www.eclipse.org/dsdp/tm/">Target Management</a> team.
- * </p>
- */
-public final class Logger {
- public static final String TRACE_DEBUG_LOG = "org.eclipse.tm.terminal/debug/log"; //$NON-NLS-1$
- public static final String TRACE_DEBUG_LOG_ERROR = "org.eclipse.tm.terminal/debug/log/error"; //$NON-NLS-1$
- public static final String TRACE_DEBUG_LOG_INFO = "org.eclipse.tm.terminal/debug/log/info"; //$NON-NLS-1$
- public static final String TRACE_DEBUG_LOG_CHAR = "org.eclipse.tm.terminal/debug/log/char"; //$NON-NLS-1$
- public static final String TRACE_DEBUG_LOG_BUFFER_SIZE = "org.eclipse.tm.terminal/debug/log/buffer/size"; //$NON-NLS-1$
-
- private static PrintStream logStream;
-
- static {
- String logFile = null;
- //TODO I think this should go into the workspace metadata instead.
- File logDirWindows = new File("C:\\eclipselogs"); //$NON-NLS-1$
- File logDirUNIX = new File("/tmp/eclipselogs"); //$NON-NLS-1$
-
- if (logDirWindows.isDirectory()) {
- logFile = logDirWindows + "\\tmterminal.log"; //$NON-NLS-1$
- } else if (logDirUNIX.isDirectory()) {
- logFile = logDirUNIX + "/tmterminal.log"; //$NON-NLS-1$
- }
-
- if (logFile != null) {
- try {
- logStream = new PrintStream(new FileOutputStream(logFile, true));
- } catch (Exception ex) {
- logStream = System.err;
- logStream
- .println("Exception when opening log file -- logging to stderr!"); //$NON-NLS-1$
- ex.printStackTrace(logStream);
- }
- }
- }
-
- /**
- * Encodes a String such that non-printable control characters are
- * converted into user-readable escape sequences for logging.
- * @param message String to encode
- * @return encoded String
- */
- public static final String encode(String message) {
- boolean encoded = false;
- StringBuffer buf = new StringBuffer(message.length()+32);
- for (int i=0; i<message.length(); i++) {
- char c=message.charAt(i);
- switch(c) {
- case '\\':
- case '\'':
- buf.append('\\'); buf.append(c); encoded=true;
- break;
- case '\r':
- buf.append('\\'); buf.append('r'); encoded=true;
- break;
- case '\n':
- buf.append('\\'); buf.append('n'); encoded=true;
- break;
- case '\t':
- buf.append('\\'); buf.append('t'); encoded=true;
- break;
- case '\f':
- buf.append('\\'); buf.append('f'); encoded=true;
- break;
- case '\b':
- buf.append('\\'); buf.append('b'); encoded=true;
- break;
- default:
- if (c <= '\u000f') {
- buf.append('\\'); buf.append('x'); buf.append('0');
- buf.append(Integer.toHexString(c));
- encoded=true;
- } else if (c>=' ' && c<'\u007f') {
- buf.append(c);
- } else if (c <= '\u00ff') {
- buf.append('\\'); buf.append('x');
- buf.append(Integer.toHexString(c));
- encoded=true;
- } else {
- buf.append('\\'); buf.append('u');
- if (c<='\u0fff') {
- buf.append('0');
- }
- buf.append(Integer.toHexString(c));
- encoded=true;
- }
- }
- }
- if (encoded) {
- return buf.toString();
- }
- return message;
- }
-
- /**
- * Checks if logging is enabled.
- * @return true if logging is enabled.
- */
- public static final boolean isLogEnabled() {
- return (logStream!=null);
- }
-
- /**
- * Logs the specified message. Do not append a newline to parameter
- * <i>message</i>. This method does that for you.
- *
- * @param message A String containing the message to log.
- */
- public static final void log(String message) {
- if (logStream != null) {
- // Read my own stack to get the class name, method name, and line
- // number of
- // where this method was called.
-
- StackTraceElement caller = new Throwable().getStackTrace()[1];
- int lineNumber = caller.getLineNumber();
- String className = caller.getClassName();
- String methodName = caller.getMethodName();
- className = className.substring(className.lastIndexOf('.') + 1);
-
- logStream.println(className + "." + methodName + ":" + lineNumber + ": " + message); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
- logStream.flush();
- }
- }
-
- /**
- * Writes a stack trace for an exception to both Standard Error and to the
- * log file.
- */
- public static final void logException(Exception ex) {
- // log in eclipse error log
- if (TerminalPlugin.getDefault() != null) {
- TerminalPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, TerminalPlugin.PLUGIN_ID, IStatus.OK, ex.getMessage(), ex));
- } else {
- ex.printStackTrace();
- }
- // Additional Tracing for debug purposes:
- // Read my own stack to get the class name, method name, and line number
- // of where this method was called
- if(logStream!=null) {
- StackTraceElement caller = new Throwable().getStackTrace()[1];
- int lineNumber = caller.getLineNumber();
- String className = caller.getClassName();
- String methodName = caller.getMethodName();
- className = className.substring(className.lastIndexOf('.') + 1);
-
- PrintStream tmpStream = System.err;
-
- if (logStream != null) {
- tmpStream = logStream;
- }
-
- tmpStream.println(className
- + "." + methodName + ":" + lineNumber + ": " + //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
- "Caught exception: " + ex); //$NON-NLS-1$
- ex.printStackTrace(tmpStream);
- }
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/PreferenceSettingStore.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/PreferenceSettingStore.java
deleted file mode 100644
index c0697ae0e..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/PreferenceSettingStore.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Michael Scharf (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.provisional.api;
-
-import org.eclipse.core.runtime.Preferences;
-
-/**
- * A preference based settings store.
- * <p>
- * <strong>EXPERIMENTAL</strong>. This class or interface has been added as part
- * of a work in progress. There is no guarantee that this API will work or that
- * it will remain the same. Please do not use this API without consulting with
- * the <a href="http://www.eclipse.org/dsdp/tm/">Target Management</a> team.
- * </p>
- */
-public class PreferenceSettingStore implements ISettingsStore {
- private final String fPrefix;
- private final Preferences fPreferences;
-
- /**
- * Creates a ISettingStore that uses the preferences as backend.
- *
- * @param preferences the backed.
- * @param prefix a string that is prepended to the key
- */
- public PreferenceSettingStore(Preferences preferences, String prefix) {
- fPreferences=preferences;
- fPrefix=prefix;
- }
- public String get(String key) {
- return fPreferences.getString(makeKey(key));
- }
- public String get(String key, String defaultValue) {
- String value=get(key);
- if ((value == null) || (value.equals(""))) //$NON-NLS-1$
- return defaultValue;
-
- return value;
- }
-
- public void put(String key, String value) {
- fPreferences.setValue(makeKey(key), value);
- }
- /**
- * @param key
- * @return the full path in the preferences
- */
- private String makeKey(String key) {
- return fPrefix+key;
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/TerminalConnectorExtension.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/TerminalConnectorExtension.java
deleted file mode 100644
index 941e7c333..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/TerminalConnectorExtension.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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) - fixed copyright headers and beautified
- * Uwe Stieber (Wind River) - [282996] [terminal][api] Add "hidden" attribute to terminal connector extension point
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.provisional.api;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.RegistryFactory;
-import org.eclipse.tm.internal.terminal.connector.TerminalConnector;
-import org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl;
-
-/**
- * A factory to get {@link ITerminalConnector} instances.
- *
- * @author Michael Scharf
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- *
- * <p>
- * <strong>EXPERIMENTAL</strong>. This class or interface has been added as
- * part of a work in progress. There is no guarantee that this API will work or
- * that it will remain the same. Please do not use this API without consulting
- * with the <a href="http://www.eclipse.org/dsdp/tm/">Target Management</a>
- * team.
- * </p>
- */
-public class TerminalConnectorExtension {
- static private ITerminalConnector makeConnector(final IConfigurationElement config) {
- String id = config.getAttribute("id"); //$NON-NLS-1$
- if(id==null || id.length()==0)
- id=config.getAttribute("class"); //$NON-NLS-1$
- String name= config.getAttribute("name"); //$NON-NLS-1$
- if(name==null || name.length()==0) {
- name=id;
- }
- String hidden = config.getAttribute("hidden"); //$NON-NLS-1$
- boolean isHidden = hidden != null ? new Boolean(hidden).booleanValue() : false;
- TerminalConnector.Factory factory=new TerminalConnector.Factory(){
- public TerminalConnectorImpl makeConnector() throws Exception {
- return (TerminalConnectorImpl)config.createExecutableExtension("class"); //$NON-NLS-1$
- }};
- return new TerminalConnector(factory,id,name, isHidden);
- }
-
- /**
- * Return a specific terminal connector for a given connector id. The
- * terminal connector is not yet instantiated to any real connection.
- *
- * @param id the id of the terminal connector in the
- * <code>org.eclipse.tm.terminal.terminalConnectors</code>
- * extension point
- * @return a new ITerminalConnector with id or <code>null</code> if there
- * is no extension with that id.
- * @since org.eclipse.tm.terminal 2.0
- */
- public static ITerminalConnector makeTerminalConnector(String id) {
- IConfigurationElement[] config = RegistryFactory.getRegistry().getConfigurationElementsFor("org.eclipse.tm.terminal.terminalConnectors"); //$NON-NLS-1$
- for (int i = 0; i < config.length; i++) {
- if(id.equals(config[i].getAttribute("id"))) { //$NON-NLS-1$
- return makeConnector(config[i]);
- }
- }
- return null;
- }
- /**
- * Return a list of available terminal connectors (connection types).
- *
- * The terminal connectors returned are not yet instantiated to any real
- * connection. Each terminal connector can connect to one remote system at a
- * time.
- *
- * @return a new list of {@link ITerminalConnector} instances defined in the
- * <code>org.eclipse.tm.terminal.terminalConnectors</code>
- * extension point
- * @since org.eclipse.tm.terminal 2.0 return value is ITerminalConnector[]
- */
- public static ITerminalConnector[] makeTerminalConnectors() {
- IConfigurationElement[] config = RegistryFactory.getRegistry().getConfigurationElementsFor("org.eclipse.tm.terminal.terminalConnectors"); //$NON-NLS-1$
- List result=new ArrayList();
- for (int i = 0; i < config.length; i++) {
- result.add(makeConnector(config[i]));
- }
- return (ITerminalConnector[]) result.toArray(new ITerminalConnector[result.size()]);
- }
-
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/TerminalState.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/TerminalState.java
deleted file mode 100644
index 56375bc58..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/TerminalState.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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) - fixed copyright headers and beautified
- * Michael Scharf (Wind River) - [262996] get rid of TerminalState.OPENED
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.provisional.api;
-
-/**
- * Represent the sate of a terminal connection.
- * In java 1.5 this would be an enum.
- * @author Michael Scharf
- *
- * <p>
- * <strong>EXPERIMENTAL</strong>. This class or interface has been added as
- * part of a work in progress. There is no guarantee that this API will
- * work or that it will remain the same. Please do not use this API without
- * consulting with the <a href="http://www.eclipse.org/dsdp/tm/">Target Management</a> team.
- * </p>
- */
-public class TerminalState {
- /**
- * The terminal is not connected.
- */
- public final static TerminalState CLOSED=new TerminalState("CLOSED"); //$NON-NLS-1$
-
- /**
- * The terminal is about to connect.
- */
- public final static TerminalState CONNECTING=new TerminalState("CONNECTING..."); //$NON-NLS-1$
-
- /**
- * The terminal is connected.
- */
- public final static TerminalState CONNECTED=new TerminalState("CONNECTED"); //$NON-NLS-1$
-
- private final String fState;
-
- public TerminalState(String state) {
- fState = state;
- }
-
- public String toString() {
- return fState;
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/provider/TerminalConnectorImpl.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/provider/TerminalConnectorImpl.java
deleted file mode 100644
index 27e555733..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/provider/TerminalConnectorImpl.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Michael Scharf (Wind River) - initial API and implementation
- * Martin Oberhuber (Wind River) - [225853][api] Provide more default functionality in TerminalConnectorImpl
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.provisional.api.provider;
-
-import java.io.OutputStream;
-
-import org.eclipse.tm.internal.terminal.provisional.api.ISettingsPage;
-import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
-import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl;
-import org.eclipse.tm.internal.terminal.provisional.api.Logger;
-import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
-
-/**
- * Abstract base class for all terminal connector implementations to be
- * registered via the <code>org.eclipse.tm.terminal.terminalConnectors</code>
- * extension point.
- *
- * @since org.eclipse.tm.terminal 2.0
- */
-public abstract class TerminalConnectorImpl {
-
- /**
- * The TerminalControl associated with this connector.
- * Required for advertising state changes when needed.
- */
- protected ITerminalControl fControl;
-
- /**
- * Initialize this connector. This is called once after the constructor, in
- * order to perform any required initializations such as loading required
- * native libraries. Any work that may lead to runtime exceptions should be
- * done in this method rather than in the constructor.
- *
- * @throws Exception when the connector fails to initialize (due to missing
- * required libraries, for instance).
- */
- public void initialize() throws Exception {
- }
-
- /**
- * Connect using the current state of the settings.
- *
- * This method is designed to be overridden by actual implementations, in
- * order to open the streams required for communicating with the remote
- * side. Extenders must call <code>super.connect(control)</code> as the
- * first thing they are doing.
- *
- * @param control Used to inform the UI about state changes and messages
- * from the connection.
- */
- public void connect(ITerminalControl control) {
- Logger.log("entered."); //$NON-NLS-1$
- fControl = control;
- }
-
- /**
- * Disconnect if connected. Else do nothing. Has to set the state of the
- * {@link ITerminalControl} when finished disconnecting.
- */
- public final void disconnect() {
- Logger.log("entered."); //$NON-NLS-1$
- doDisconnect();
- fControl.setState(TerminalState.CLOSED);
- }
-
- /**
- * Disconnect if connected. Else do nothing. Clients should override to
- * perform any extra work needed for disconnecting.
- */
- protected void doDisconnect() {
- // Do nothing by default
- }
-
- /**
- * @return the terminal to remote stream (bytes written to this stream will
- * be sent to the remote site). For the stream in the other direction (remote to
- * terminal see {@link ITerminalControl#getRemoteToTerminalOutputStream()}
- */
- abstract public OutputStream getTerminalToRemoteStream();
-
- /**
- * @return A string that represents the settings of the connection. This representation
- * may be shown in the status line of the terminal view.
- */
- abstract public String getSettingsSummary();
-
- /**
- * Test if local echo is needed. The default implementation returns
- * <code>false</code>. Override to modify this behavior.
- *
- * @return true if a local echo is needed. TODO:Michael Scharf: this should
- * be handed within the connection....
- */
- public boolean isLocalEcho() {
- return false;
- }
-
- /**
- * Return a settings page for configuring this connector, or
- * <code>null</code> if it cannot be configured.
- *
- * The dialog should persist its settings with the
- * {@link #load(ISettingsStore)} and {@link #save(ISettingsStore)} methods.
- *
- * @return a new page that can be used in a dialog to setup this connection,
- * or <code>null</code>.
- */
- public ISettingsPage makeSettingsPage() {
- return null;
- }
-
- /**
- * Load the state or settings of this connection. Is typically called before
- * {@link #connect(ITerminalControl)}.
- *
- * Connectors that have nothing to configure do not need to implement this.
- * Those terminals that do have configuration (which they expose via
- * {@link #makeSettingsPage()} need to override this method to load
- * settings.
- *
- * @param store a string based data store. Short keys like "foo" can be used
- * to store the state of the connection.
- */
- public void load(ISettingsStore store) {
- // do nothing by default
- }
-
- /**
- * When the view or dialog containing the terminal is closed, the state of
- * the connection is saved into the settings store <code>store</code>.
- *
- * Connectors that have no state or settings to persist do not need to
- * override this. Others should override to persist their settings.
- *
- * @param store the store for persisting settings.
- */
- public void save(ISettingsStore store) {
- // do nothing by default
- }
-
- /**
- * Notify the remote site that the size of the terminal has changed.
- *
- * Concrete connectors should override this if they have the possibility to
- * inform the remote about changed terminal size.
- *
- * @param newWidth the new width in characters.
- * @param newHeight the new height in characters.
- */
- public void setTerminalSize(int newWidth, int newHeight) {
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/AbstractTextCanvasModel.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/AbstractTextCanvasModel.java
deleted file mode 100644
index 5decdabf3..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/AbstractTextCanvasModel.java
+++ /dev/null
@@ -1,347 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Michael Scharf (Wind River) - initial API and implementation
- * Martin Oberhuber (Wind River) - [168197] Fix Terminal for CDC-1.1/Foundation-1.1
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.textcanvas;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.tm.terminal.model.ITerminalTextDataReadOnly;
-import org.eclipse.tm.terminal.model.ITerminalTextDataSnapshot;
-
-abstract public class AbstractTextCanvasModel implements ITextCanvasModel {
- protected List fListeners = new ArrayList();
- private int fCursorLine;
- private int fCursorColumn;
- private boolean fShowCursor;
- private long fCursorTime;
- private boolean fCursorIsEnabled;
- private final ITerminalTextDataSnapshot fSnapshot;
- private int fLines;
-
- private int fSelectionStartLine=-1;
- private int fSeletionEndLine;
- private int fSelectionStartCoumn;
- private int fSelectionEndColumn;
- private ITerminalTextDataSnapshot fSelectionSnapshot;
- private String fCurrentSelection=""; //$NON-NLS-1$
- private final Point fSelectionAnchor=new Point(0,0);
- /**
- * do not update while update is running
- */
- boolean fInUpdate;
- private int fCols;
-
- public AbstractTextCanvasModel(ITerminalTextDataSnapshot snapshot) {
- fSnapshot=snapshot;
- fLines=fSnapshot.getHeight();
- }
- public void addCellCanvasModelListener(ITextCanvasModelListener listener) {
- fListeners.add(listener);
- }
-
- public void removeCellCanvasModelListener(ITextCanvasModelListener listener) {
- fListeners.remove(listener);
- }
-
- protected void fireCellRangeChanged(int x, int y, int width, int height) {
- for (Iterator iter = fListeners.iterator(); iter.hasNext();) {
- ITextCanvasModelListener listener = (ITextCanvasModelListener) iter.next();
- listener.rangeChanged(x, y, width, height);
- }
- }
- protected void fireDimensionsChanged( int width,int height) {
- for (Iterator iter = fListeners.iterator(); iter.hasNext();) {
- ITextCanvasModelListener listener = (ITextCanvasModelListener) iter.next();
- listener.dimensionsChanged(width,height);
- }
-
- }
- protected void fireTerminalDataChanged() {
- for (Iterator iter = fListeners.iterator(); iter.hasNext();) {
- ITextCanvasModelListener listener = (ITextCanvasModelListener) iter.next();
- listener.terminalDataChanged();
- }
-
- }
-
- public ITerminalTextDataReadOnly getTerminalText() {
- return fSnapshot;
- }
- protected ITerminalTextDataSnapshot getSnapshot() {
- return fSnapshot;
- }
- protected void updateSnapshot() {
- if(!fInUpdate && fSnapshot.isOutOfDate()) {
- fInUpdate=true;
- try {
- fSnapshot.updateSnapshot(false);
- if(fSnapshot.hasTerminalChanged())
- fireTerminalDataChanged();
- // TODO why does hasDimensionsChanged not work??????
- // if(fSnapshot.hasDimensionsChanged())
- // fireDimensionsChanged();
- if(fLines!=fSnapshot.getHeight() || fCols!=fSnapshot.getWidth()) {
- fireDimensionsChanged(fSnapshot.getWidth(),fSnapshot.getHeight());
- fLines=fSnapshot.getHeight();
- fCols=fSnapshot.getWidth();
- }
- int y=fSnapshot.getFirstChangedLine();
- // has any line changed?
- if(y<Integer.MAX_VALUE) {
- int height=fSnapshot.getLastChangedLine()-y+1;
- fireCellRangeChanged(0, y, fSnapshot.getWidth(), height);
- }
-
- } finally {
- fInUpdate=false;
- }
- }
- }
- /**
- * must be called from the UI thread
- */
- public void update() {
- // do the poll....
- updateSnapshot();
- updateSelection();
- updateCursor();
- }
-
-
- public int getCursorColumn() {
- return fCursorColumn;
- }
-
- public int getCursorLine() {
- return fCursorLine;
- }
-
- public boolean isCursorOn() {
- return fShowCursor && fCursorIsEnabled;
- }
- /**
- * should be called regularly to draw an update of the
- * blinking cursor
- */
- protected void updateCursor() {
- if(!fCursorIsEnabled)
- return;
- int cursorLine=getSnapshot().getCursorLine();
- int cursorColumn=getSnapshot().getCursorColumn();
- // if cursor at the end put it to the end of the
- // last line...
- if(cursorLine>=getSnapshot().getHeight()) {
- cursorLine=getSnapshot().getHeight()-1;
- cursorColumn=getSnapshot().getWidth()-1;
- }
- // has the cursor moved?
- if(fCursorLine!=cursorLine || fCursorColumn!=cursorColumn) {
- // hide the old cursor!
- fShowCursor=false;
- // clean the previous cursor
- // bug 206363: paint also the char to the left and right of the cursor - see also below
- int col=fCursorColumn;
- int width=2;
- if(col>0) {
- col--;
- width++;
- }
- fireCellRangeChanged(col, fCursorLine, width, 1);
- // the cursor is shown when it moves!
- fShowCursor=true;
- fCursorTime=System.currentTimeMillis();
- fCursorLine=cursorLine;
- fCursorColumn=cursorColumn;
- // and draw the new cursor
- fireCellRangeChanged(fCursorColumn, fCursorLine, 1, 1);
- } else {
- long t=System.currentTimeMillis();
- // TODO make the cursor blink time customisable
- if(t-fCursorTime>500) {
- fShowCursor=!fShowCursor;
- fCursorTime=t;
- // on some windows machines, there is some left
- // over when updating the cursor .
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=206363
- int col=fCursorColumn;
- int width=2;
- if(col>0) {
- col--;
- width++;
- }
- fireCellRangeChanged(col, fCursorLine, width, 1);
- }
- }
- }
- public void setVisibleRectangle(int startLine, int startCol, int height, int width) {
- fSnapshot.setInterestWindow(Math.max(0,startLine), Math.max(1,height));
- update();
- }
- protected void showCursor(boolean show) {
- fShowCursor=true;
- }
- public void setCursorEnabled(boolean visible) {
- fCursorTime=System.currentTimeMillis();
- fShowCursor=visible;
- fCursorIsEnabled=visible;
- fireCellRangeChanged(fCursorColumn, fCursorLine, 1, 1);
- }
- public boolean isCursorEnabled() {
- return fCursorIsEnabled;
- }
-
- public Point getSelectionEnd() {
- if(fSelectionStartLine<0)
- return null;
- else
- return new Point(fSelectionEndColumn, fSeletionEndLine);
- }
-
- public Point getSelectionStart() {
- if (fSelectionStartLine < 0)
- return null;
- else
- return new Point(fSelectionStartCoumn,fSelectionStartLine);
- }
- public Point getSelectionAnchor() {
- if(fSelectionStartLine<0)
- return null;
- return new Point(fSelectionAnchor.x,fSelectionAnchor.y);
- }
- public void setSelectionAnchor(Point anchor) {
- fSelectionAnchor.x=anchor.x;
- fSelectionAnchor.y=anchor.y;
- }
-
- public void setSelection(int startLine, int endLine, int startColumn, int endColumn) {
-// System.err.println(startLine+","+endLine+","+startColumn+","+endColumn);
- doSetSelection(startLine, endLine, startColumn, endColumn);
- fCurrentSelection=extractSelectedText();
- }
- private void doSetSelection(int startLine, int endLine, int startColumn, int endColumn) {
- assert(startLine<0 || startLine<=endLine);
- if(startLine>=0) {
- if(fSelectionSnapshot==null) {
- fSelectionSnapshot=fSnapshot.getTerminalTextData().makeSnapshot();
- fSelectionSnapshot.updateSnapshot(true);
- }
- } else if(fSelectionSnapshot!=null) {
- fSelectionSnapshot.detach();
- fSelectionSnapshot=null;
- }
- int oldStart=fSelectionStartLine;
- int oldEnd=fSeletionEndLine;
- fSelectionStartLine = startLine;
- fSeletionEndLine = endLine;
- fSelectionStartCoumn = startColumn;
- fSelectionEndColumn = endColumn;
- if(fSelectionSnapshot!=null) {
- fSelectionSnapshot.setInterestWindow(0, fSelectionSnapshot.getHeight());
- }
- int changedStart;
- int changedEnd;
- if(oldStart<0) {
- changedStart=fSelectionStartLine;
- changedEnd=fSeletionEndLine;
- } else if(fSelectionStartLine<0) {
- changedStart=oldStart;
- changedEnd=oldEnd;
- } else {
- changedStart=Math.min(oldStart, fSelectionStartLine);
- changedEnd=Math.max(oldEnd, fSeletionEndLine);
- }
- if(changedStart>=0) {
- fireCellRangeChanged(0, changedStart, fSnapshot.getWidth(), changedEnd-changedStart+1);
- }
- }
-
- public boolean hasLineSelection(int line) {
- if (fSelectionStartLine < 0)
- return false;
- else
- return line >= fSelectionStartLine && line <= fSeletionEndLine;
- }
-
- public String getSelectedText() {
- return fCurrentSelection;
- }
- /**
- * Calculates the currently selected text
- * @return the currently selected text
- */
- private String extractSelectedText() {
- if(fSelectionStartLine<0 || fSelectionStartCoumn<0 || fSelectionEndColumn<0 || fSelectionSnapshot==null)
- return ""; //$NON-NLS-1$
- StringBuffer buffer=new StringBuffer();
- for (int line = fSelectionStartLine; line <= fSeletionEndLine; line++) {
- String text;
- char[] chars=fSelectionSnapshot.getChars(line);
- if(chars!=null) {
- text=new String(chars);
- if(line==fSeletionEndLine)
- text=text.substring(0, Math.min(fSelectionEndColumn+1,text.length()));
- if(line==fSelectionStartLine)
- text=text.substring(Math.min(fSelectionStartCoumn,text.length()));
- // get rid of the empty space at the end of the lines
- // text=text.replaceAll("\000+$",""); //$NON-NLS-1$//$NON-NLS-2$
- // <J2ME-CDC-1.1 version>
- int i = text.length() - 1;
- while (i >= 0 && text.charAt(i) == '\000') {
- i--;
- }
- text = text.substring(0, i + 1);
- // </J2ME-CDC-1.1 version>
- // null means space
- text=text.replace('\000', ' ');
- } else {
- text=""; //$NON-NLS-1$
- }
- buffer.append(text);
- if(line < fSeletionEndLine)
- buffer.append('\n');
- }
- return buffer.toString();
- }
- private void updateSelection() {
- if (fSelectionSnapshot != null && fSelectionSnapshot.isOutOfDate()) {
- fSelectionSnapshot.updateSnapshot(true);
- // has the selection moved?
- if (fSelectionSnapshot != null && fSelectionStartLine >= 0 && fSelectionSnapshot.getScrollWindowSize() > 0) {
- int start = fSelectionStartLine + fSelectionSnapshot.getScrollWindowShift();
- int end = fSeletionEndLine + fSelectionSnapshot.getScrollWindowShift();
- if (start < 0)
- if (end >= 0)
- start = 0;
- else
- start = -1;
- doSetSelection(start, end, fSelectionStartCoumn, fSelectionEndColumn);
- }
- // check if the content of the selection has changed. If the content has
- // changed, clear the selection
- if (fCurrentSelection.length()>0 && fSelectionSnapshot != null
- && fSelectionSnapshot.getFirstChangedLine() <= fSeletionEndLine
- && fSelectionSnapshot.getLastChangedLine() >= fSelectionStartLine) {
- // has the selected text changed?
- if (!fCurrentSelection.equals(extractSelectedText())) {
- setSelection(-1, -1, -1, -1);
- }
- }
- // update the observed window...
- if (fSelectionSnapshot != null)
- // todo make -1 to work!
- fSelectionSnapshot.setInterestWindow(0, fSelectionSnapshot.getHeight());
- }
- }
-
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/GridCanvas.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/GridCanvas.java
deleted file mode 100644
index 491406f1e..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/GridCanvas.java
+++ /dev/null
@@ -1,197 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Michael Scharf (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.textcanvas;
-
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-
-/**
- * A Grid based Canvas. The canvas has rows and columns.
- * CellPainting is done with the abstract method drawCell
- */
-abstract public class GridCanvas extends VirtualCanvas {
- /** width of a cell */
- private int fCellWidth;
- /** height of a cell */
- private int fCellHeight;
-
- public GridCanvas(Composite parent, int style) {
- super(parent, style);
- addListener(SWT.MouseWheel, new Listener() {
- public void handleEvent(Event event) {
- if(getVerticalBar().isVisible()) {
- int delta=-fCellHeight;
- if(event.count<0)
- delta=-delta;
- scrollYDelta(delta);
- }
- event.doit=false;
- }
- });
-
- }
-
- public void setBounds(int x, int y, int width, int height) {
- // adjust the height so that there are no characters cut
- // Maybe it would be better to use a custom Layout...
- int shiftH=0;
- if(getCellHeight()!=0)
- shiftH=height % getCellHeight();
- super.setBounds(x, y+shiftH, width, height-shiftH);
- }
-
- public void setBounds(Rectangle rect) {
- // just to be sure our set bounds is called!
- setBounds(rect.x,rect.y,rect.width,rect.height);
- }
-
- /** template method paint.
- * iterates over all cells in the clipping rectangle and paints them.
- */
- protected void paint(GC gc) {
- Rectangle clipping=gc.getClipping();
- if(clipping.width==0 || clipping.height==0)
- return;
- Rectangle clientArea= getScreenRectInVirtualSpace();
- // Beginning coordinates
- int xOffset=clientArea.x;
- int yOffset=clientArea.y;
- int colFirst=virtualXToCell(xOffset+clipping.x);
- if(colFirst>getCols())
- colFirst=getCols();
- int rowFirst=virtualYToCell(yOffset+clipping.y);
- // End coordinates
- int colLast=virtualXToCell(xOffset+clipping.x+clipping.width+fCellWidth);
- if(colLast>getCols())
- colLast=getCols();
- int rowLast=virtualYToCell(yOffset+clipping.y+clipping.height+fCellHeight);
- if(rowLast>getRows())
- rowLast=getRows();
- // System.out.println(rowFirst+"->"+rowLast+" "+System.currentTimeMillis());
- // draw the cells
- for(int row=rowFirst;row<=rowLast;row++) {
- int cx=colFirst*fCellWidth-xOffset;
- int cy=row*fCellHeight-yOffset;
- drawLine(gc,row,cx,cy,colFirst,colLast);
- }
- paintUnoccupiedSpace(gc,clipping);
- }
- /**
- * @param gc
- * @param row the line to draw
- * @param x coordinate on screen
- * @param y coordinate on screen
- * @param colFirst first column to draw
- * @param colLast last column to draw
- */
- abstract void drawLine(GC gc, int row, int x, int y, int colFirst, int colLast);
-
- abstract protected int getRows();
- abstract protected int getCols();
-
- protected void setCellWidth(int cellWidth) {
- fCellWidth = cellWidth;
- getHorizontalBar().setIncrement(fCellWidth);
- }
-
- public int getCellWidth() {
- return fCellWidth;
- }
-
- protected void setCellHeight(int cellHeight) {
- fCellHeight = cellHeight;
- getVerticalBar().setIncrement(fCellHeight);
- }
-
- public int getCellHeight() {
- return fCellHeight;
- }
-
- int virtualXToCell(int x) {
- return x/fCellWidth;
- }
-
- int virtualYToCell(int y) {
- return y/fCellHeight;
- }
-
- protected Point screenPointToCell(int x, int y) {
- x=screenXtoVirtual(x)/fCellWidth;
- y=screenYtoVirtual(y)/fCellHeight;
- return new Point(x,y);
- }
-
- Point screenPointToCell(Point point) {
- return screenPointToCell(point.x,point.y);
- }
-
- protected Point cellToOriginOnScreen(int x, int y) {
- x=virtualXtoScreen(fCellWidth*x);
- y=virtualYtoScreen(fCellHeight*y);
- return new Point(x,y);
- }
-
- Point cellToOriginOnScreen(Point cell) {
- return cellToOriginOnScreen(cell.x,cell.y);
- }
-
- Rectangle getCellScreenRect(Point cell) {
- return getCellScreenRect(cell.x,cell.y);
- }
-
- Rectangle getCellScreenRect(int x, int y) {
- x=fCellWidth*virtualXtoScreen(x);
- y=fCellHeight*virtualYtoScreen(y);
- return new Rectangle(x,y,fCellWidth,fCellHeight);
- }
-
- protected Rectangle getCellVirtualRect(Point cell) {
- return getCellVirtualRect(cell.x,cell.y);
- }
-
- Rectangle getCellVirtualRect(int x, int y) {
- x=fCellWidth*x;
- y=fCellHeight*y;
- return new Rectangle(x,y,fCellWidth,fCellHeight);
- }
- protected void viewRectangleChanged(int x, int y, int width, int height) {
- int cellX=virtualXToCell(x);
- int cellY=virtualYToCell(y);
- // End coordinates
- int xE=virtualXToCell(x+fCellWidth+width-1);
-// if(xE>getCols())
-// xE=getCols();
- int yE=virtualYToCell(y+fCellHeight+height-1);
-// if(yE>getRows())
-// yE=getRows();
- visibleCellRectangleChanged(cellX,cellY,xE-cellX,yE-cellY);
- }
-
- /**
- * Called when the viewed part has changed.
- * Override when you need this information....
- * Is only called if the values change (well, almost)
- * @param x origin of visible cells
- * @param y origin of visible cells
- * @param width number of cells visible in x direction
- * @param height number of cells visible in y direction
- */
- protected void visibleCellRectangleChanged(int x, int y, int width, int height) {
- }
-
-}
-
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/ILinelRenderer.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/ILinelRenderer.java
deleted file mode 100644
index c957d98a1..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/ILinelRenderer.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tm.internal.terminal.textcanvas;
-
-import org.eclipse.swt.graphics.GC;
-
-/**
- *
- */
-public interface ILinelRenderer {
- int getCellWidth();
- int getCellHeight();
- void drawLine(ITextCanvasModel model, GC gc, int line, int x, int y, int colFirst, int colLast);
- void onFontChange();
- void setInvertedColors(boolean invert);
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/ITextCanvasModel.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/ITextCanvasModel.java
deleted file mode 100644
index 75d9ef3a4..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/ITextCanvasModel.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tm.internal.terminal.textcanvas;
-
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.tm.terminal.model.ITerminalTextDataReadOnly;
-
-public interface ITextCanvasModel {
- void addCellCanvasModelListener(ITextCanvasModelListener listener);
- void removeCellCanvasModelListener(ITextCanvasModelListener listener);
-
- ITerminalTextDataReadOnly getTerminalText();
- /**
- * This is is
- * @param startLine
- * @param startCol
- * @param height
- * @param width
- */
- void setVisibleRectangle(int startLine, int startCol, int height, int width);
-
- /**
- * @return true when the cursor is shown (used for blinking cursors)
- */
- boolean isCursorOn();
- /**
- * Show/Hide the cursor.
- * @param visible
- */
- void setCursorEnabled(boolean visible);
-
- /**
- * @return true if the cursor is shown.
- */
- boolean isCursorEnabled();
-
- /**
- * @return the line of the cursor
- */
- int getCursorLine();
- /**
- * @return the column of the cursor
- */
- int getCursorColumn();
-
- /**
- * @return the start of the selection or null if nothing is selected
- * {@link Point#x} is the column and {@link Point#y} is the line.
- */
- Point getSelectionStart();
- /**
- * @return the end of the selection or null if nothing is selected
- * {@link Point#x} is the column and {@link Point#y} is the line.
- */
- Point getSelectionEnd();
-
- Point getSelectionAnchor();
-
- void setSelectionAnchor(Point anchor);
- /**
- * Sets the selection. A negative startLine clears the selection.
- * @param startLine
- * @param endLine
- * @param startColumn
- * @param endColumn
- */
- void setSelection(int startLine, int endLine, int startColumn, int endColumn);
-
- /**
- * @param line
- * @return true if line is part of the selection
- */
- boolean hasLineSelection(int line);
-
- String getSelectedText();
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/ITextCanvasModelListener.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/ITextCanvasModelListener.java
deleted file mode 100644
index 5a96bc73e..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/ITextCanvasModelListener.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tm.internal.terminal.textcanvas;
-
-/**
- */
-public interface ITextCanvasModelListener {
- void rangeChanged(int col, int line, int width, int height);
- void dimensionsChanged(int cols, int rows);
- /**
- * Called when any text change happened. Used to scroll to the
- * end of text in auto scroll mode. This does not get fired
- * when the window of interest has changed!
- */
- void terminalDataChanged();
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/PipedInputStream.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/PipedInputStream.java
deleted file mode 100644
index 6a589632f..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/PipedInputStream.java
+++ /dev/null
@@ -1,309 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1996, 2007 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
- * Douglas Lea (Addison Wesley) - [cq:1552] BoundedBufferWithStateTracking adapted to BoundedByteBuffer
- * Martin Oberhuber (Wind River) - the waitForAvailable method
- * Martin Oberhuber (Wind River) - [208166] Avoid unnecessary arraycopy in BoundedByteBuffer
- *******************************************************************************/
-
-package org.eclipse.tm.internal.terminal.textcanvas;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-/**
- * The main purpose of this class is to start a runnable in the
- * display thread when data is available and to pretend no data
- * is available after a given amount of time the runnable is running.
- *
- */
-public class PipedInputStream extends InputStream {
- /**
- * The output stream used by the terminal backend to write to the terminal
- */
- protected final OutputStream fOutputStream;
- /**
- * A blocking byte queue.
- */
- private final BoundedByteBuffer fQueue;
-
- /**
- * A byte bounded buffer used to synchronize the input and the output stream.
- * <p>
- * Adapted from BoundedBufferWithStateTracking
- * http://gee.cs.oswego.edu/dl/cpj/allcode.java
- * http://gee.cs.oswego.edu/dl/cpj/
- * <p>
- * BoundedBufferWithStateTracking is part of the examples for the book
- * Concurrent Programming in Java: Design Principles and Patterns by
- * Doug Lea (ISBN 0-201-31009-0). Second edition published by
- * Addison-Wesley, November 1999. The code is
- * Copyright(c) Douglas Lea 1996, 1999 and released to the public domain
- * and may be used for any purposes whatsoever.
- * <p>
- * For some reasons a solution based on
- * PipedOutputStream/PipedIntputStream
- * does work *very* slowly:
- * http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4404700
- * <p>
- *
- */
- private class BoundedByteBuffer {
- protected final byte[] fBuffer; // the elements
- protected int fPutPos = 0; // circular indices
- protected int fTakePos = 0;
- protected int fUsedSlots = 0; // the count
- private boolean fClosed;
- public BoundedByteBuffer(int capacity) throws IllegalArgumentException {
- // make sure we don't deadlock on too small capacity
- if (capacity <= 0)
- throw new IllegalArgumentException();
- fBuffer = new byte[capacity];
- }
- /**
- * @return the bytes available for {@link #read()}
- * Must be called with a lock on this!
- */
- public int available() {
- return fUsedSlots;
- }
- /**
- * Writes a single byte to the buffer. Blocks if the buffer is full.
- * @param b byte to write to the buffer
- * @throws InterruptedException when the thread is interrupted while waiting
- * for the buffer to become ready
- * Must be called with a lock on this!
- */
- public void write(byte b) throws InterruptedException {
- while (fUsedSlots == fBuffer.length)
- // wait until not full
- wait();
-
- fBuffer[fPutPos] = b;
- fPutPos = (fPutPos + 1) % fBuffer.length; // cyclically increment
-
- if (fUsedSlots++ == 0) // signal if was empty
- notifyAll();
- }
- public int getFreeSlots() {
- return fBuffer.length - fUsedSlots;
- }
- public void write(byte[] b, int off, int len) throws InterruptedException {
- assert len<=getFreeSlots();
- while (fUsedSlots == fBuffer.length)
- // wait until not full
- wait();
- int n = Math.min(len, fBuffer.length - fPutPos);
- System.arraycopy(b, off, fBuffer, fPutPos, n);
- if (fPutPos + len > fBuffer.length)
- System.arraycopy(b, off + n, fBuffer, 0, len - n);
- fPutPos = (fPutPos + len) % fBuffer.length; // cyclically increment
- boolean wasEmpty = fUsedSlots == 0;
- fUsedSlots += len;
- if (wasEmpty) // signal if was empty
- notifyAll();
- }
- /**
- * Read a single byte. Blocks until a byte is available.
- * @return a byte from the buffer
- * @throws InterruptedException when the thread is interrupted while waiting
- * for the buffer to become ready
- * Must be called with a lock on this!
- */
- public int read() throws InterruptedException {
- while (fUsedSlots == 0) {
- if(fClosed)
- return -1;
- // wait until not empty
- wait();
- }
- byte b = fBuffer[fTakePos];
- fTakePos = (fTakePos + 1) % fBuffer.length;
-
- if (fUsedSlots-- == fBuffer.length) // signal if was full
- notifyAll();
- return b;
- }
- public int read(byte[] cbuf, int off, int len) throws InterruptedException {
- assert len<=available();
- while (fUsedSlots == 0) {
- if(fClosed)
- return 0;
- // wait until not empty
- wait();
- }
- int n = Math.min(len, fBuffer.length - fTakePos);
- System.arraycopy(fBuffer, fTakePos, cbuf, off, n);
- if (fTakePos + len > n)
- System.arraycopy(fBuffer, 0, cbuf, off + n, len - n);
- fTakePos = (fTakePos + len) % fBuffer.length;
- boolean wasFull = fUsedSlots == fBuffer.length;
- fUsedSlots -= len;
- if(wasFull)
- notifyAll();
-
- return len;
- }
- public void close() {
- fClosed=true;
- notifyAll();
- }
- public boolean isClosed() {
- return fClosed;
- }
- }
-
- /**
- * An output stream that calls {@link PipedInputStream#textAvailable}
- * every time data is written to the stream. The data is written to
- * {@link PipedInputStream#fQueue}.
- *
- */
- class PipedOutputStream extends OutputStream {
- public void write(byte[] b, int off, int len) throws IOException {
- try {
- synchronized (fQueue) {
- if(fQueue.isClosed())
- throw new IOException("Stream is closed!"); //$NON-NLS-1$
- int written=0;
- while(written<len) {
- if(fQueue.getFreeSlots()==0) {
- // if no slots available, write one byte and block
- // until free slots are available
- fQueue.write(b[off + written]);
- written++;
- } else {
- // if slots are available, write as much as
- // we can in one junk
- int n=Math.min(fQueue.getFreeSlots(), len-written);
- fQueue.write(b, off + written, n);
- written+=n;
- }
- }
- }
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- }
- }
-
- public void write(int b) throws IOException {
- try {
- synchronized(fQueue) {
- if(fQueue.isClosed())
- throw new IOException("Stream is closed!"); //$NON-NLS-1$
- fQueue.write((byte)b);
- }
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- }
- }
- public void close() throws IOException {
- synchronized(fQueue) {
- fQueue.close();
- }
- }
- }
- /**
- * @param bufferSize the size of the buffer of the output stream
- */
- public PipedInputStream(int bufferSize) {
- fOutputStream =new PipedOutputStream();
- fQueue=new BoundedByteBuffer(bufferSize);
- }
- /**
- * @return the output stream used by the backend to write to the terminal.
- */
- public OutputStream getOutputStream() {
- return fOutputStream;
- }
- /**
- * Waits until data is available for reading.
- * @param millis see {@link Object#wait(long)}
- * @throws InterruptedException when the thread is interrupted while waiting
- * for the buffer to become ready
- */
- public void waitForAvailable(long millis) throws InterruptedException {
- synchronized(fQueue) {
- if(fQueue.available()==0)
- fQueue.wait(millis);
- }
- }
- /**
- * Must be called in the Display Thread!
- * @return true if a character is available for the terminal to show.
- */
- public int available() {
- synchronized(fQueue) {
- return fQueue.available();
- }
- }
- /**
- * @return the next available byte. Check with {@link #available}
- * if characters are available.
- */
- public int read() throws IOException {
- try {
- synchronized (fQueue) {
- return fQueue.read();
- }
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- return -1;
- }
- }
- /**
- * Closing a <tt>PipedInputStream</tt> has no effect. The methods in
- * this class can be called after the stream has been closed without
- * generating an <tt>IOException</tt>.
- * <p>
- */
- public void close() throws IOException {
- }
-
- public int read(byte[] cbuf, int off, int len) throws IOException {
- int n=0;
- if(len==0)
- return 0;
- // read as much as we can using a single synchronized statement
- try {
- synchronized (fQueue) {
- // if nothing available, block and read one byte
- if (fQueue.available() == 0) {
- // block now until at least one byte is available
- int c = fQueue.read();
- // are we at the end of stream
- if (c == -1)
- return -1;
- cbuf[off] = (byte) c;
- n++;
- }
- // is there more data available?
- if (n < len && fQueue.available() > 0) {
- // read at most available()
- int nn = Math.min(fQueue.available(), len - n);
- // are we at the end of the stream?
- if (nn == 0 && fQueue.isClosed()) {
- // if no byte was read, return -1 to indicate end of stream
- // else return the bytes we read up to now
- if (n == 0)
- n = -1;
- return n;
- }
- fQueue.read(cbuf, off + n, nn);
- n += nn;
- }
-
- }
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- }
- return n;
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/PollingTextCanvasModel.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/PollingTextCanvasModel.java
deleted file mode 100644
index 9ca030403..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/PollingTextCanvasModel.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tm.internal.terminal.textcanvas;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.tm.terminal.model.ITerminalTextDataSnapshot;
-
-/**
- * @author Michael.Scharf@scharf-software.com
- *
- */
-public class PollingTextCanvasModel extends AbstractTextCanvasModel {
- int fPollInterval=50;
- /**
- *
- */
- public PollingTextCanvasModel(ITerminalTextDataSnapshot snapshot) {
- super(snapshot);
- Display.getDefault().timerExec(fPollInterval,new Runnable(){
- public void run() {
- update();
- Display.getDefault().timerExec(fPollInterval,this);
- }});
- }
- public void setUpdateInterval(int t) {
- fPollInterval=t;
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/StyleMap.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/StyleMap.java
deleted file mode 100644
index 376f206e7..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/StyleMap.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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) - [205260] Terminal does not take the font from the preferences
- * Michael Scharf (Wind River) - [209746] There are cases where some colors not displayed correctly
- * Michael Scharf (Wind River) - [206328] Terminal does not draw correctly with proportional fonts
- * Martin Oberhuber (Wind River) - [247700] Terminal uses ugly fonts in JEE package
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.textcanvas;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.tm.terminal.model.Style;
-import org.eclipse.tm.terminal.model.StyleColor;
-
-public class StyleMap {
- private static final String BLACK = "black"; //$NON-NLS-1$
- private static final String WHITE = "white"; //$NON-NLS-1$
- private static final String WHITE_FOREGROUND = "white_foreground"; //$NON-NLS-1$
- private static final String GRAY = "gray"; //$NON-NLS-1$
- private static final String MAGENTA = "magenta"; //$NON-NLS-1$
- private static final String CYAN = "cyan"; //$NON-NLS-1$
- private static final String YELLOW = "yellow"; //$NON-NLS-1$
- private static final String BLUE = "blue"; //$NON-NLS-1$
- private static final String GREEN = "green"; //$NON-NLS-1$
- private static final String RED = "red"; //$NON-NLS-1$
-
- private static final String PREFIX = "org.eclipse.tm.internal."; //$NON-NLS-1$
- // TODO propagate the name of the font in the FontRegistry
- private static final String fDefaultFontName="terminal.views.view.font.definition"; //$NON-NLS-1$
- String fFontName=fDefaultFontName;
- Map fColorMapForeground=new HashMap();
- Map fColorMapBackground=new HashMap();
- Map fFontMap=new HashMap();
- private Point fCharSize;
- private final Style fDefaultStyle;
- private boolean fInvertColors;
- private boolean fProportional;
- private final int[] fOffsets=new int[256];
- StyleMap() {
- initColors();
- fDefaultStyle=Style.getStyle(StyleColor.getStyleColor(BLACK),StyleColor.getStyleColor(WHITE));
- updateFont();
- }
- private void initColors() {
- initForegroundColors();
- initBackgroundColors();
- }
- private void initForegroundColors() {
- if(fInvertColors) {
- setColor(fColorMapForeground, WHITE, 0, 0, 0);
- setColor(fColorMapForeground, WHITE_FOREGROUND, 50, 50, 50);
- setColor(fColorMapForeground, BLACK, 255, 255, 255);
- } else {
- setColor(fColorMapForeground, WHITE, 255, 255, 255);
- setColor(fColorMapForeground, WHITE_FOREGROUND, 229, 229, 229);
- setColor(fColorMapForeground, BLACK, 0, 0, 0);
- }
- setColor(fColorMapForeground, RED, 255, 128, 128);
- setColor(fColorMapForeground, GREEN, 128, 255, 128);
- setColor(fColorMapForeground, BLUE, 128, 128, 255);
- setColor(fColorMapForeground, YELLOW, 255, 255, 0);
- setColor(fColorMapForeground, CYAN, 0, 255, 255);
- setColor(fColorMapForeground, MAGENTA, 255, 255, 0);
- setColor(fColorMapForeground, GRAY, 128, 128, 128);
- }
-
- private void initBackgroundColors() {
- if(fInvertColors) {
- setColor(fColorMapBackground, WHITE, 0, 0, 0);
- setColor(fColorMapBackground, WHITE_FOREGROUND, 50, 50, 50); // only used when colors are inverse
- setColor(fColorMapBackground, BLACK, 255, 255, 255);
- } else {
- setColor(fColorMapBackground, WHITE, 255, 255, 255);
- setColor(fColorMapBackground, WHITE_FOREGROUND, 229, 229, 229);
- setColor(fColorMapBackground, BLACK, 0, 0, 0);
- }
- setColor(fColorMapBackground, RED, 255, 128, 128);
- setColor(fColorMapBackground, GREEN, 128, 255, 128);
- setColor(fColorMapBackground, BLUE, 128, 128, 255);
- setColor(fColorMapBackground, YELLOW, 255, 255, 0);
- setColor(fColorMapBackground, CYAN, 0, 255, 255);
- setColor(fColorMapBackground, MAGENTA, 255, 255, 0);
- setColor(fColorMapBackground, GRAY, 128, 128, 128);
- }
- private void setColor(Map colorMap, String name, int r, int g, int b) {
- String colorName=PREFIX+r+"-"+g+"-"+b; //$NON-NLS-1$//$NON-NLS-2$
- Color color=JFaceResources.getColorRegistry().get(colorName);
- if(color==null) {
- JFaceResources.getColorRegistry().put(colorName, new RGB(r,g,b));
- color=JFaceResources.getColorRegistry().get(colorName);
- }
- colorMap.put(StyleColor.getStyleColor(name), color);
- colorMap.put(StyleColor.getStyleColor(name.toUpperCase()), color);
- }
-
- public Color getForegrondColor(Style style) {
- style = defaultIfNull(style);
- if(style.isReverse())
- return getColor(fColorMapForeground,style.getBackground());
- else
- return getColor(fColorMapForeground,style.getForground());
- }
- public Color getBackgroundColor(Style style) {
- style = defaultIfNull(style);
- if(style.isReverse())
- return getColor(fColorMapBackground,style.getForground());
- else
- return getColor(fColorMapBackground,style.getBackground());
- }
- Color getColor(Map map,StyleColor color) {
- Color c=(Color) map.get(color);
- if(c==null) {
- c=Display.getCurrent().getSystemColor(SWT.COLOR_GRAY);
- }
- return c;
- }
- private Style defaultIfNull(Style style) {
- if(style==null)
- style=fDefaultStyle;
- return style;
- }
- public void setInvertedColors(boolean invert) {
- if(invert==fInvertColors)
- return;
- fInvertColors=invert;
- initColors();
- }
-// static Font getBoldFont(Font font) {
-// FontData fontDatas[] = font.getFontData();
-// FontData data = fontDatas[0];
-// return new Font(Display.getCurrent(), data.getName(), data.getHeight(), data.getStyle()|SWT.BOLD);
-// }
-
- public Font getFont(Style style) {
- style = defaultIfNull(style);
- if(style.isBold()) {
- return JFaceResources.getFontRegistry().getBold(fFontName);
- } else if(style.isUnderline()) {
- return JFaceResources.getFontRegistry().getItalic(fFontName);
-
- }
- return JFaceResources.getFontRegistry().get(fFontName);
- }
-
- public Font getFont() {
- return JFaceResources.getFontRegistry().get(fFontName);
-
- }
- public int getFontWidth() {
- return fCharSize.x;
- }
- public int getFontHeight() {
- return fCharSize.y;
- }
- public void updateFont() {
- Display display=Display.getCurrent();
- GC gc = new GC (display);
- if (JFaceResources.getFontRegistry().hasValueFor(fDefaultFontName)) {
- fFontName = fDefaultFontName;
- } else if (JFaceResources.getFontRegistry().hasValueFor("REMOTE_COMMANDS_VIEW_FONT")) { //$NON-NLS-1$
- //try RSE Shell View Font
- fFontName = "REMOTE_COMMANDS_VIEW_FONT"; //$NON-NLS-1$
- } else {
- //fall back to "basic jface text font"
- fFontName = "org.eclipse.jface.textfont"; //$NON-NLS-1$
- }
- gc.setFont(getFont());
- fCharSize = gc.textExtent ("W"); //$NON-NLS-1$
- fProportional=false;
-
- for (char c = ' '; c <= '~'; c++) {
- // consider only the first 128 chars for deciding if a font
- // is proportional
- if(measureChar(gc, c, true))
- fProportional=true;
- }
- // TODO should we also consider the upper 128 chars??
- for (char c = ' '+128; c <= '~'+128; c++) {
- measureChar(gc, c,false);
- }
- if(fProportional) {
- fCharSize.x-=2; //works better on small fonts
- }
- for (int i = 0; i < fOffsets.length; i++) {
- fOffsets[i]=(fCharSize.x-fOffsets[i])/2;
- }
- if(!fProportional) {
- //measure font in boldface, too, and if wider then treat like proportional
- gc.setFont(getFont(fDefaultStyle.setBold(true)));
- Point charSizeBold = gc.textExtent("W"); //$NON-NLS-1$
- if (fCharSize.x != charSizeBold.x) {
- fProportional=true;
- }
- }
- gc.dispose ();
- }
- /**
- * @param gc
- * @param c
- * @param updateMax
- * @return true if the the font is proportional
- */
- private boolean measureChar(GC gc, char c, boolean updateMax) {
- boolean proportional=false;
- Point ext=gc.textExtent(String.valueOf(c));
- if(ext.x>0 && ext.y>0 && (fCharSize.x!=ext.x || fCharSize.y!=ext.y)) {
- proportional=true;
- if(updateMax) {
- fCharSize.x=Math.max(fCharSize.x, ext.x);
- fCharSize.y=Math.max(fCharSize.y, ext.y);
- }
- }
- fOffsets[c]=ext.x;
- return proportional;
- }
- public boolean isFontProportional() {
- return fProportional;
- }
- /**
- * Return the offset in pixels required to center a given character
- * @param c the character to measure
- * @return the offset in x direction to center this character
- */
- public int getCharOffset(char c) {
- if(c>=fOffsets.length)
- return 0;
- return fOffsets[c];
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/TextCanvas.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/TextCanvas.java
deleted file mode 100644
index d42eb2a3a..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/TextCanvas.java
+++ /dev/null
@@ -1,343 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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) - [240098] The cursor should not blink when the terminal is disconnected
- * Uwe Stieber (Wind River) - [281238] The very first few characters might be missing in the terminal control if opened and connected programmatically
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.textcanvas;
-
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.swt.events.FocusListener;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.MouseListener;
-import org.eclipse.swt.events.MouseMoveListener;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * A cell oriented Canvas. Maintains a list of "cells".
- * It can either be vertically or horizontally scrolled.
- * The CellRenderer is responsible for painting the cell.
- */
-public class TextCanvas extends GridCanvas {
- protected final ITextCanvasModel fCellCanvasModel;
- /** Renders the cells */
- private final ILinelRenderer fCellRenderer;
- private boolean fScrollLock;
- private Point fDraggingStart;
- private Point fDraggingEnd;
- private boolean fHasSelection;
- private ResizeListener fResizeListener;
- private int fMinColumns=20;
- private int fMinLines=4;
- private boolean fCursorEnabled;
- /**
- * Create a new CellCanvas with the given SWT style bits.
- * (SWT.H_SCROLL and SWT.V_SCROLL are automatically added).
- */
- public TextCanvas(Composite parent, ITextCanvasModel model, int style,ILinelRenderer cellRenderer) {
- super(parent, style | SWT.H_SCROLL | SWT.V_SCROLL);
- fCellRenderer=cellRenderer;
- setCellWidth(fCellRenderer.getCellWidth());
- setCellHeight(fCellRenderer.getCellHeight());
- fCellCanvasModel=model;
- fCellCanvasModel.addCellCanvasModelListener(new ITextCanvasModelListener(){
- public void rangeChanged(int col, int line, int width, int height) {
- repaintRange(col,line,width,height);
- }
- public void dimensionsChanged(int cols, int rows) {
- setVirtualExtend(cols+getCellWidth(), rows+getCellHeight());
- calculateGrid();
- }
- public void terminalDataChanged() {
- if(isDisposed())
- return;
- scrollToEnd();
- }
- });
- // let the cursor blink if the text canvas gets the focus...
- addFocusListener(new FocusListener(){
- public void focusGained(FocusEvent e) {
- fCellCanvasModel.setCursorEnabled(fCursorEnabled);
- }
- public void focusLost(FocusEvent e) {
- fCellCanvasModel.setCursorEnabled(false);
- }});
- addMouseListener(new MouseListener(){
- public void mouseDoubleClick(MouseEvent e) {
- }
- public void mouseDown(MouseEvent e) {
- if(e.button==1) { // left button
- fDraggingStart=screenPointToCell(e.x, e.y);
- fHasSelection=false;
- if((e.stateMask&SWT.SHIFT)!=0) {
- Point anchor=fCellCanvasModel.getSelectionAnchor();
- if(anchor!=null)
- fDraggingStart=anchor;
- } else {
- fCellCanvasModel.setSelectionAnchor(fDraggingStart);
- }
- fDraggingEnd=null;
- }
- }
- public void mouseUp(MouseEvent e) {
- if(e.button==1) { // left button
- updateHasSelection(e);
- if(fHasSelection)
- setSelection(screenPointToCell(e.x, e.y));
- else
- fCellCanvasModel.setSelection(-1,-1,-1,-1);
- fDraggingStart=null;
- }
- }
- });
- addMouseMoveListener(new MouseMoveListener() {
-
- public void mouseMove(MouseEvent e) {
- if (fDraggingStart != null) {
- updateHasSelection(e);
- setSelection(screenPointToCell(e.x, e.y));
- }
- }
- });
- serVerticalBarVisible(true);
- setHorizontalBarVisible(false);
- }
-
- /**
- * The user has to drag the mouse to at least one character to make a selection.
- * Once this is done, even a one char selection is OK.
- *
- * @param e
- */
- private void updateHasSelection(MouseEvent e) {
- if(fDraggingStart!=null) {
- Point p=screenPointToCell(e.x, e.y);
- if(fDraggingStart.x!=p.x||fDraggingStart.y!=p.y)
- fHasSelection=true;
- }
- }
-
- void setSelection(Point p) {
- if (fDraggingStart !=null && !p.equals(fDraggingEnd)) {
- fDraggingEnd = p;
- if (compare(p, fDraggingStart) < 0) {
- fCellCanvasModel.setSelection(p.y, fDraggingStart.y, p.x, fDraggingStart.x);
- } else {
- fCellCanvasModel.setSelection(fDraggingStart.y, p.y, fDraggingStart.x, p.x);
-
- }
- }
- }
-
- int compare(Point p1, Point p2) {
- if (p1.equals(p2))
- return 0;
- if (p1.y == p2.y) {
- if (p1.x > p2.x)
- return 1;
- else
- return -1;
- }
- if (p1.y > p2.y) {
- return 1;
- } else {
- return -1;
- }
- }
- public ILinelRenderer getCellRenderer() {
- return fCellRenderer;
- }
-
- public int getMinColumns() {
- return fMinColumns;
- }
-
- public void setMinColumns(int minColumns) {
- fMinColumns = minColumns;
- }
-
- public int getMinLines() {
- return fMinLines;
- }
-
- public void setMinLines(int minLines) {
- fMinLines = minLines;
- }
-
- protected void onResize(boolean init) {
- if(fResizeListener!=null) {
- Rectangle bonds=getClientArea();
- int lines=bonds.height/getCellHeight();
- int columns=bonds.width/getCellWidth();
- // when the view is minimised, its size is set to 0
- // we don't sent this to the terminal!
- if(lines>0 && columns>0 || init) {
- if(columns<fMinColumns) {
- if(!isHorizontalBarVisble()) {
- setHorizontalBarVisible(true);
- bonds=getClientArea();
- lines=bonds.height/getCellHeight();
- }
- columns=fMinColumns;
- } else if(columns>=fMinColumns && isHorizontalBarVisble()) {
- setHorizontalBarVisible(false);
- bonds=getClientArea();
- lines=bonds.height/getCellHeight();
- columns=bonds.width/getCellWidth();
-
- }
- if(lines<fMinLines)
- lines=fMinLines;
- fResizeListener.sizeChanged(lines, columns);
- }
- }
- super.onResize();
- calculateGrid();
- }
-
- protected void onResize() {
- onResize(false);
- }
-
- private void calculateGrid() {
- setVirtualExtend(getCols()*getCellWidth(),getRows()*getCellHeight());
- // scroll to end
- scrollToEnd();
- // make sure the scroll area is correct:
- scrollY(getVerticalBar());
- scrollX(getHorizontalBar());
-
- getParent().layout();
- redraw();
- }
- void scrollToEnd() {
- if(!fScrollLock) {
- int y=-(getRows()*getCellHeight()-getClientArea().height);
- Rectangle v=getViewRectangle();
- if(v.y!=y) {
- setVirtualOrigin(v.x,y);
- }
- }
- }
- /**
- *
- * @return true if the cursor should be shown on output....
- */
- public boolean isScrollLock() {
- return fScrollLock;
- }
- /**
- * If set then if the size changes
- * @param scrollLock
- */
- public void setScrollLock(boolean scrollLock) {
- fScrollLock=scrollLock;
- }
- protected void repaintRange(int col, int line, int width, int height) {
- Point origin=cellToOriginOnScreen(col,line);
- Rectangle r=new Rectangle(origin.x,origin.y,width*getCellWidth(),height*getCellHeight());
- repaint(r);
- }
- protected void drawLine(GC gc, int line, int x, int y, int colFirst, int colLast) {
- fCellRenderer.drawLine(fCellCanvasModel, gc,line,x,y,colFirst, colLast);
-
- }
- protected void visibleCellRectangleChanged(int x, int y, int width, int height) {
- fCellCanvasModel.setVisibleRectangle(y,x,height,width);
- update();
- }
- protected int getCols() {
- return fCellCanvasModel.getTerminalText().getWidth();
- }
- protected int getRows() {
- return fCellCanvasModel.getTerminalText().getHeight();
- }
- public String getSelectionText() {
- // TODO -- create a hasSelectionMethod!
- return fCellCanvasModel.getSelectedText();
- }
- public void copy() {
- Clipboard clipboard = new Clipboard(getDisplay());
- clipboard.setContents(new Object[] { getSelectionText() }, new Transfer[] { TextTransfer.getInstance() });
- clipboard.dispose();
- }
- public void selectAll() {
- fCellCanvasModel.setSelection(0, fCellCanvasModel.getTerminalText().getHeight(), 0, fCellCanvasModel.getTerminalText().getWidth());
- fCellCanvasModel.setSelectionAnchor(new Point(0,0));
- }
- public boolean isEmpty() {
- return false;
- }
- /**
- * Gets notified when the visible size of the terminal changes.
- * This should update the model!
- *
- */
- public interface ResizeListener {
- void sizeChanged(int lines, int columns);
- }
- /**
- * @param listener this listener gets notified, when the size of
- * the widget changed. It should change the dimensions of the underlying
- * terminaldata
- */
- public void addResizeHandler(ResizeListener listener) {
- if(fResizeListener!=null)
- throw new IllegalArgumentException("There can be at most one listener at the moment!"); //$NON-NLS-1$
- fResizeListener=listener;
-
- // Bug 281238: [terminal] The very first few characters might be missing in
- // the terminal control if opened and connected programmatically
- //
- // In case the terminal had not been visible yet or is to small (less than one
- // line visible), the terminal should have a minimum size to avoid RuntimeExceptions.
- setMinColumns(80); setMinLines(24);
- onResize(true);
- }
-
- public void onFontChange() {
- fCellRenderer.onFontChange();
- setCellWidth(fCellRenderer.getCellWidth());
- setCellHeight(fCellRenderer.getCellHeight());
- calculateGrid();
- }
-
- public void setInvertedColors(boolean invert) {
- fCellRenderer.setInvertedColors(invert);
- redraw();
- }
-
- /**
- * @return true if the cursor is enabled (blinking). By default the cursor is not enabled.
- */
- public boolean isCursorEnabled() {
- return fCursorEnabled;
- }
-
- /**
- * @param enabled enabling means that the cursor blinks
- */
- public void setCursorEnabled(boolean enabled) {
- if(enabled!=fCursorEnabled) {
- fCursorEnabled=enabled;
- fCellCanvasModel.setCursorEnabled(fCursorEnabled);
- }
-
- }
-
-}
-
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/TextLineRenderer.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/TextLineRenderer.java
deleted file mode 100644
index 9aa6ddc12..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/TextLineRenderer.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Michael Scharf (Wind River) - initial API and implementation
- * Michael Scharf (Wind River) - [205260] Terminal does not take the font from the preferences
- * Michael Scharf (Wind River) - [206328] Terminal does not draw correctly with proportional fonts
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.textcanvas;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.tm.terminal.model.ITerminalTextDataReadOnly;
-import org.eclipse.tm.terminal.model.LineSegment;
-import org.eclipse.tm.terminal.model.Style;
-
-/**
- *
- */
-public class TextLineRenderer implements ILinelRenderer {
- private final ITextCanvasModel fModel;
- StyleMap fStyleMap=new StyleMap();
- Color fBackgroundColor;
- public TextLineRenderer(TextCanvas c, ITextCanvasModel model) {
- fModel=model;
- fBackgroundColor=Display.getCurrent().getSystemColor(SWT.COLOR_LIST_BACKGROUND);
- }
- /* (non-Javadoc)
- * @see com.imagicus.thumbs.view.ICellRenderer#getCellWidth()
- */
- public int getCellWidth() {
- return fStyleMap.getFontWidth();
- }
- /* (non-Javadoc)
- * @see com.imagicus.thumbs.view.ICellRenderer#getCellHeight()
- */
- public int getCellHeight() {
- return fStyleMap.getFontHeight();
- }
- public void drawLine(ITextCanvasModel model, GC gc, int line, int x, int y, int colFirst, int colLast) {
- if(line<0 || line>=getTerminalText().getHeight() || colFirst>=getTerminalText().getWidth() || colFirst-colLast==0) {
- fillBackground(gc, x, y, getCellWidth()*(colFirst-colLast), getCellHeight());
- } else {
- colLast=Math.min(colLast, getTerminalText().getWidth());
- LineSegment[] segments=getTerminalText().getLineSegments(line, colFirst, colLast-colFirst);
- for (int i = 0; i < segments.length; i++) {
- LineSegment segment=segments[i];
- Style style=segment.getStyle();
- setupGC(gc, style);
- String text=segment.getText();
- drawText(gc, x, y, colFirst, segment.getColumn(), text);
- drawCursor(model, gc, line, x, y, colFirst);
- }
- if(fModel.hasLineSelection(line)) {
- gc.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_LIST_SELECTION_TEXT));
- gc.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_LIST_SELECTION));
- Point start=model.getSelectionStart();
- Point end=model.getSelectionEnd();
- char[] chars=model.getTerminalText().getChars(line);
- if(chars==null)
- return;
- int offset=0;
- if(start.y==line)
- offset=start.x;
- offset=Math.max(offset, colFirst);
- int len;
- if(end.y==line)
- len=end.x-offset+1;
- else
- len=chars.length-offset+1;
- len=Math.min(len,chars.length-offset);
- if(len>0) {
- String text=new String(chars,offset,len);
- drawText(gc, x, y, colFirst, offset, text);
- }
- }
- }
- }
-
- private void fillBackground(GC gc, int x, int y, int width, int height) {
- Color bg=gc.getBackground();
- gc.setBackground(getBackgroundColor());
- gc.fillRectangle (x,y,width,height);
- gc.setBackground(bg);
-
- }
-
- private Color getBackgroundColor() {
- return fBackgroundColor;
- }
- private void drawCursor(ITextCanvasModel model, GC gc, int row, int x, int y, int colFirst) {
- if(!model.isCursorOn())
- return;
- int cursorLine=model.getCursorLine();
-
- if(row==cursorLine) {
- int cursorColumn=model.getCursorColumn();
- if(cursorColumn<getTerminalText().getWidth()) {
- Style style=getTerminalText().getStyle(row, cursorColumn);
- if(style==null) {
- // TODO make the cursor color customizable
- style=Style.getStyle("BLACK", "WHITE"); //$NON-NLS-1$//$NON-NLS-2$
- }
- style=style.setReverse(!style.isReverse());
- setupGC(gc,style);
- String text=String.valueOf(getTerminalText().getChar(row, cursorColumn));
- drawText(gc, x, y, colFirst, cursorColumn, text);
- }
- }
- }
- private void drawText(GC gc, int x, int y, int colFirst, int col, String text) {
- int offset=(col-colFirst)*getCellWidth();
- if(fStyleMap.isFontProportional()) {
- // draw the background
- // TODO why does this not work???????
-// gc.fillRectangle(x,y,fStyleMap.getFontWidth()*text.length(),fStyleMap.getFontHeight());
- for (int i = 0; i < text.length(); i++) {
- char c=text.charAt(i);
- int xx=x+offset+i*fStyleMap.getFontWidth();
- // TODO why do I have to draw the background character by character??????
- gc.fillRectangle(xx,y,fStyleMap.getFontWidth(),fStyleMap.getFontHeight());
- if(c!=' ' && c!='\000') {
- gc.drawString(String.valueOf(c),fStyleMap.getCharOffset(c)+xx,y,true);
- }
- }
- } else {
- text=text.replace('\000', ' ');
- gc.drawString(text,x+offset,y,false);
- }
- }
- private void setupGC(GC gc, Style style) {
- Color c=fStyleMap.getForegrondColor(style);
- if(c!=gc.getForeground()) {
- gc.setForeground(c);
- }
- c=fStyleMap.getBackgroundColor(style);
- if(c!=gc.getBackground()) {
- gc.setBackground(c);
- }
- Font f=fStyleMap.getFont(style);
- if(f!=gc.getFont()) {
- gc.setFont(f);
- }
- }
- ITerminalTextDataReadOnly getTerminalText() {
- return fModel.getTerminalText();
- }
- public void onFontChange() {
- fStyleMap.updateFont();
- }
- public void setInvertedColors(boolean invert) {
- fStyleMap.setInvertedColors(invert);
-
- }
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/VirtualCanvas.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/VirtualCanvas.java
deleted file mode 100644
index f89e988d8..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/VirtualCanvas.java
+++ /dev/null
@@ -1,345 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Michael Scharf (Wind River) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tm.internal.terminal.textcanvas;
-
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.widgets.Canvas;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.ScrollBar;
-import org.eclipse.tm.internal.terminal.control.impl.TerminalPlugin;
-
-/**
- * A <code>Canvas</code> showing a virtual object.
- * Virtual: the extent of the total canvas.
- * Screen: the visible client area in the screen.
- */
-public abstract class VirtualCanvas extends Canvas {
-
- private final Rectangle fVirtualBounds = new Rectangle(0,0,0,0);
- private Rectangle fClientArea;
- /**
- * prevent infinite loop in {@link #updateScrollbars()}
- */
- private boolean fInUpdateScrollbars;
- private static boolean fInUpdateScrollbarsLogged;
-
- public VirtualCanvas(Composite parent, int style) {
- super(parent, style|SWT.NO_BACKGROUND|SWT.NO_REDRAW_RESIZE);
- fClientArea=getClientArea();
- addListener(SWT.Paint, new Listener() {
- public void handleEvent(Event event) {
- paint(event.gc);
- }
- });
- addListener(SWT.Resize, new Listener() {
- public void handleEvent(Event event) {
- fClientArea=getClientArea();
- onResize();
- }
- });
- getVerticalBar().addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- scrollY((ScrollBar)e.widget);
-
- }
-
- });
- getHorizontalBar().addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- scrollX((ScrollBar)e.widget);
-
- }
- });
- }
- protected void onResize() {
- updateViewRectangle();
- }
- protected void scrollX(ScrollBar hBar) {
- int hSelection = hBar.getSelection ();
- int destX = -hSelection - fVirtualBounds.x;
- fVirtualBounds.x = -hSelection;
- scrollSmart(destX, 0);
- updateViewRectangle();
- }
- protected void scrollXDelta(int delta) {
- getHorizontalBar().setSelection(-fVirtualBounds.x+delta);
- scrollX(getHorizontalBar());
- }
-
- protected void scrollY(ScrollBar vBar) {
- int vSelection = vBar.getSelection ();
- int destY = -vSelection - fVirtualBounds.y;
- if(destY!=0) {
- fVirtualBounds.y = -vSelection;
- scrollSmart(0,destY);
- updateViewRectangle();
- }
-
- }
- protected void scrollYDelta(int delta) {
- getVerticalBar().setSelection(-fVirtualBounds.y+delta);
- scrollY(getVerticalBar());
- }
-
-
- private void scrollSmart(int deltaX, int deltaY) {
- Rectangle rect = getBounds();
- scroll (deltaX, deltaY, 0, 0, rect.width, rect.height, false);
- }
-
- /**
- * @param rect in virtual space
- */
- protected void revealRect(Rectangle rect) {
- Rectangle visibleRect=getScreenRectInVirtualSpace();
- // scroll the X part
- int deltaX=0;
- if(rect.x<visibleRect.x) {
- deltaX=rect.x-visibleRect.x;
- } else if(visibleRect.x+visibleRect.width<rect.x+rect.width){
- deltaX=(rect.x+rect.width)-(visibleRect.x+visibleRect.width);
- }
- if(deltaX!=0) {
- getHorizontalBar().setSelection(-fVirtualBounds.x+deltaX);
- scrollX(getHorizontalBar());
- }
-
- // scroll the Y part
- int deltaY=0;
- if(rect.y<visibleRect.y){
- deltaY=rect.y-visibleRect.y;
- } else if(visibleRect.y+visibleRect.height<rect.y+rect.height){
- deltaY=(rect.y+rect.height)-(visibleRect.y+visibleRect.height);
-
- }
- if(deltaY!=0) {
- getVerticalBar().setSelection(-fVirtualBounds.y+deltaY);
- scrollY(getVerticalBar());
- }
- }
-
- protected void repaint(Rectangle r) {
- if(isDisposed())
- return;
- if(inClipping(r,fClientArea)) {
- redraw(r.x, r.y, r.width, r.height, true);
- update();
- }
- }
-
- /**
- * Paint the virtual canvas.
- * Override to implement actual paint method.
- * @param gc graphics context to paint in
- */
- abstract protected void paint(GC gc);
- protected Color getTerminalBackgroundColor() {
-// return getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND);
- return getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND);
- }
- protected void paintUnoccupiedSpace(GC gc, Rectangle clipping) {
- int width=fVirtualBounds.width;
- int height=fVirtualBounds.height;
- int marginWidth = (clipping.x+clipping.width) - width;
- int marginHeight = (clipping.y+clipping.height) - height;
- if(marginWidth>0||marginHeight>0){
- Color bg=getBackground();
- gc.setBackground(getTerminalBackgroundColor());
- if (marginWidth > 0) {
- gc.fillRectangle (width, clipping.y, marginWidth, clipping.height);
- }
- if (marginHeight > 0) {
- gc.fillRectangle (clipping.x, height, clipping.width, marginHeight);
- }
- gc.setBackground(bg);
- }
- }
- /**
- * @private
- */
- protected boolean inClipping(Rectangle clipping, Rectangle r) {
- // TODO check if this is OK in all cases (the <=!)
- //
- if(r.x+r.width<=clipping.x)
- return false;
- if(clipping.x+clipping.width<=r.x)
- return false;
- if(r.y+r.height<=clipping.y)
- return false;
- if(clipping.y+clipping.height<=r.y)
- return false;
-
- return true;
- }
- /**
- * @return the screen rect in virtual space (starting with (0,0))
- * of the visible screen. (x,y>=0)
- */
- protected Rectangle getScreenRectInVirtualSpace() {
- Rectangle r= new Rectangle(fClientArea.x-fVirtualBounds.x,fClientArea.y-fVirtualBounds.y,fClientArea.width,fClientArea.height);
- return r;
- }
- /**
- * @return the rect in virtual space (starting with (0,0))
- * of the visible screen. (x,y>=0)
- */
- protected Rectangle getRectInVirtualSpace(Rectangle r) {
- return new Rectangle(r.x-fVirtualBounds.x,r.y-fVirtualBounds.y,r.width,r.height);
- }
-
- /**
- * Sets the extent of the virtual display area
- * @param width width of the display area
- * @param height height of the display area
- */
- protected void setVirtualExtend(int width, int height) {
- fVirtualBounds.width=width;
- fVirtualBounds.height=height;
- updateScrollbars();
- updateViewRectangle();
- }
- /**
- * sets the scrolling origin. Also sets the scrollbars.
- * Does NOT redraw!
- * Use negative values (move the virtual origin to the top left
- * to see something in the screen (which is located at (0,0))
- * @param x
- * @param y
- */
- protected void setVirtualOrigin(int x, int y) {
- fVirtualBounds.x=x;
- fVirtualBounds.y=y;
- getHorizontalBar().setSelection(-x);
- getVerticalBar().setSelection(-y);
- updateViewRectangle();
- }
- protected Rectangle getVirtualBounds() {
- return cloneRectangle(fVirtualBounds);
- }
- /**
- * @param x
- * @return the virtual coordinate in screen space
- */
- protected int virtualXtoScreen(int x) {
- return x+fVirtualBounds.x;
- }
- protected int virtualYtoScreen(int y) {
- return y+fVirtualBounds.y;
- }
- protected int screenXtoVirtual(int x) {
- return x-fVirtualBounds.x;
- }
- protected int screenYtoVirtual(int y) {
- return y-fVirtualBounds.y;
- }
- /** called when the viewed part is changing */
- private final Rectangle fViewRectangle=new Rectangle(0,0,0,0);
- protected void updateViewRectangle() {
- if(
- fViewRectangle.x==-fVirtualBounds.x
- && fViewRectangle.y==-fVirtualBounds.y
- && fViewRectangle.width==fClientArea.width
- && fViewRectangle.height==fClientArea.height
- )
- return;
- fViewRectangle.x=-fVirtualBounds.x;
- fViewRectangle.y=-fVirtualBounds.y;
- fViewRectangle.width=fClientArea.width;
- fViewRectangle.height=fClientArea.height;
- viewRectangleChanged(fViewRectangle.x,fViewRectangle.y,fViewRectangle.width,fViewRectangle.height);
- }
- protected Rectangle getViewRectangle() {
- return cloneRectangle(fViewRectangle);
- }
- private Rectangle cloneRectangle(Rectangle r) {
- return new Rectangle(r.x,r.y,r.width,r.height);
- }
- /**
- * Called when the viewed part has changed.
- * Override when you need this information....
- * Is only called if the values change!
- * @param x visible in virtual space
- * @param y visible in virtual space
- * @param width
- * @param height
- */
- protected void viewRectangleChanged(int x, int y, int width, int height) {
- }
- /**
- * @private
- */
- private void updateScrollbars() {
- // don't get into infinite loops....
- if(!fInUpdateScrollbars) {
- fInUpdateScrollbars=true;
- try {
- doUpdateScrollbar();
- } finally {
- fInUpdateScrollbars=false;
- }
- } else {
- if(!fInUpdateScrollbarsLogged) {
- fInUpdateScrollbarsLogged=true;
- TerminalPlugin.getDefault().getLog().log(new Status(IStatus.WARNING,
- TerminalPlugin.PLUGIN_ID, IStatus.OK, "Unexpected Recursion in terminal", //$NON-NLS-1$
- new RuntimeException()));
- }
- }
- }
- private void doUpdateScrollbar() {
- Point size= getSize();
- Rectangle clientArea= getClientArea();
- ScrollBar horizontal= getHorizontalBar();
- // even if setVisible was called on the scrollbar, isVisible
- // returns false if its parent is not visible.
- if(!isVisible() || horizontal.isVisible()) {
- horizontal.setPageIncrement(clientArea.width - horizontal.getIncrement());
- int max= fVirtualBounds.width + (size.x - clientArea.width);
- horizontal.setMaximum(max);
- horizontal.setThumb(size.x > max ? max : size.x);
- }
- ScrollBar vertical= getVerticalBar();
- // even if setVisible was called on the scrollbar, isVisible
- // returns false if its parent is not visible.
- if(!isVisible() || vertical.isVisible()) {
- vertical.setPageIncrement(clientArea.height - vertical.getIncrement());
- int max= fVirtualBounds.height + (size.y - clientArea.height);
- vertical.setMaximum(max);
- vertical.setThumb(size.y > max ? max : size.y);
- }
- }
- protected boolean isVertialBarVisible() {
- return getVerticalBar().isVisible();
- }
- protected void serVerticalBarVisible(boolean showVScrollBar) {
- ScrollBar vertical= getVerticalBar();
- vertical.setVisible(showVScrollBar);
- vertical.setSelection(0);
- }
- protected boolean isHorizontalBarVisble() {
- return getHorizontalBar().isVisible();
- }
- protected void setHorizontalBarVisible(boolean showHScrollBar) {
- ScrollBar horizontal= getHorizontalBar();
- horizontal.setVisible(showHScrollBar);
- horizontal.setSelection(0);
- }
-}
-
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/model/ITerminalTextData.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/model/ITerminalTextData.java
deleted file mode 100644
index 3ca18158a..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/model/ITerminalTextData.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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) - [261486][api][cleanup] Mark @noimplement interfaces as @noextend
- *******************************************************************************/
-package org.eclipse.tm.terminal.model;
-
-/**
- * A writable matrix of characters and {@link Style}. This is intended to be the
- * low level representation of the text of a Terminal. Higher layers are
- * responsible to fill the text and styles into this representation.
- * <p>
- * <b>Note: </b> Implementations of this interface has to be thread safe.
- * </p>
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface ITerminalTextData extends ITerminalTextDataReadOnly {
-
- /**
- * Sets the dimensions of the data. If the dimensions are smaller than the current
- * dimensions, the lines will be chopped. If the dimensions are bigger, then
- * the new elements will be filled with 0 chars and null Style.
- * @param height
- * @param width
- */
- void setDimensions(int height, int width);
-
- void setMaxHeight(int height);
- int getMaxHeight();
-
- /**
- * Set a single character and the associated {@link Style}.
- * @param line line must be >=0 and < height
- * @param column column must be >=0 and < width
- * @param c the new character at this position
- * @param style the style or null
- */
- void setChar(int line, int column, char c, Style style);
-
- /**
- * Set an array of characters showing in the same {@link Style}.
- * @param line line must be >=0 and < height
- * @param column column must be >=0 and < width
- * @param chars the new characters at this position
- * @param style the style or null
- */
- void setChars(int line, int column, char[] chars, Style style);
-
- /**
- * Set a subrange of an array of characters showing in the same {@link Style}.
- * @param line line must be >=0 and < height
- * @param column column must be >=0 and < width
- * @param chars the new characters at this position
- * @param start the start index in the chars array
- * @param len the number of characters to insert. Characters beyond width are not inserted.
- * @param style the style or null
- */
- void setChars(int line, int column, char[] chars, int start, int len, Style style);
-
-
- /**
- * Cleans the entire line.
- * @param line
- */
- void cleanLine(int line);
- // /**
- // * @param line
- // * @return true if this line belongs to the previous line but is simply
- // * wrapped.
- // */
- // boolean isWrappedLine(int line);
- //
- // /**
- // * Makes this line an extension to the previous line. Wrapped lines get folded back
- // * when the width of the terminal changes
- // * @param line
- // * @param extendsPreviousLine
- // */
- // void setWrappedLine(int line, boolean extendsPreviousLine);
-
- /**
- * Shifts some lines up or down. The "empty" space is filled with <code>'\000'</code> chars
- * and <code>null</code> {@link Style}
- * <p>To illustrate shift, here is some sample data:
- * <pre>
- * 0 aaaa
- * 1 bbbb
- * 2 cccc
- * 3 dddd
- * 4 eeee
- * </pre>
- *
- * Shift a region of 3 lines <b>up</b> by one line <code>shift(1,3,-1)</code>
- * <pre>
- * 0 aaaa
- * 1 cccc
- * 2 dddd
- * 3
- * 4 eeee
- * </pre>
- *
- *
- * Shift a region of 3 lines <b>down</b> by one line <code>shift(1,3,1)</code>
- * <pre>
- * 0 aaaa
- * 1
- * 2 bbbb
- * 3 cccc
- * 4 eeee
- * </pre>
- * @param startLine the start line of the shift
- * @param size the number of lines to shift
- * @param shift how much scrolling is done. New scrolled area is filled with <code>'\000</code>'.
- * Negative number means scroll down, positive scroll up (see example above).
- */
- void scroll(int startLine, int size, int shift);
-
- /**Adds a new line to the terminal. If maxHeigth is reached, the entire terminal
- * will be scrolled. Else a line will be added.
- */
- void addLine();
- /**
- * Copies the entire source into this and changes the size accordingly
- * @param source
- */
- void copy(ITerminalTextData source);
- /**
- * Copy a sourceLine from source to this at destLine.
- * @param source
- * @param sourceLine
- * @param destLine
- */
- void copyLine(ITerminalTextData source,int sourceLine, int destLine);
- /**
- * Copy <code>length</code> lines from source starting at sourceLine into this starting at
- * destLine.
- * @param source
- * @param sourceStartLine
- * @param destStartLine
- * @param length
- */
- void copyRange(ITerminalTextData source, int sourceStartLine, int destStartLine,int length);
-
- void setCursorLine(int line);
- void setCursorColumn(int column);
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/model/ITerminalTextDataReadOnly.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/model/ITerminalTextDataReadOnly.java
deleted file mode 100644
index 0503b4c1d..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/model/ITerminalTextDataReadOnly.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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) - [261486][api][cleanup] Mark @noimplement interfaces as @noextend
- *******************************************************************************/
-package org.eclipse.tm.terminal.model;
-
-/**
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface ITerminalTextDataReadOnly {
-
- /**
- * @return the width of the terminal
- */
- int getWidth();
-
- /**
- * @return the height of the terminal
- */
- int getHeight();
-
- /**
- * @param line be >=0 and < height
- * @param startCol must be >=0 and < width
- * @param numberOfCols must be > 0
- * @return a the line segments of the specified range
- */
- LineSegment[] getLineSegments(int line, int startCol, int numberOfCols);
-
- /**
- * @param line must be >=0 and < height
- * @param column must be >=0 and < width
- * @return the character at column,line
- */
- char getChar(int line, int column);
-
- /**
- * @param line must be >=0 and < height
- * @param column must be >=0 and < width
- * @return style at column,line or null
- */
- Style getStyle(int line, int column);
-
- /**
- * Creates a new instance of {@link ITerminalTextDataSnapshot} that
- * can be used to track changes. Make sure to call {@link ITerminalTextDataSnapshot#detach()}
- * if you don't need the snapshots anymore.
- * <p><b>Note: </b>A new snapshot is empty and needs a call to {@link ITerminalTextDataSnapshot#updateSnapshot(boolean)} to
- * get its initial values. You might want to setup the snapshot to your needs by calling
- * {@link ITerminalTextDataSnapshot#setInterestWindow(int, int)}.
- * </p>
- * @return a new instance of {@link ITerminalTextDataSnapshot} that "listens" to changes of
- * <code>this</code>.
- */
- public ITerminalTextDataSnapshot makeSnapshot();
-
- char[] getChars(int line);
- Style[] getStyles(int line);
-
- /**
- * @return the line in which the cursor is at the moment
- */
- int getCursorLine();
- /**
- * @return the column at which the cursor is at the moment
- */
- int getCursorColumn();
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/model/ITerminalTextDataSnapshot.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/model/ITerminalTextDataSnapshot.java
deleted file mode 100644
index 198f5edba..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/model/ITerminalTextDataSnapshot.java
+++ /dev/null
@@ -1,226 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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) - [261486][api][cleanup] Mark @noimplement interfaces as @noextend
- *******************************************************************************/
-package org.eclipse.tm.terminal.model;
-
-/**
- * This class maintains a snapshot of an instance of {@link ITerminalTextData}.
- * While the {@link ITerminalTextData} continues changing, the snapshot remains
- * unchanged until the next snapshot is taken by calling
- * {@link #updateSnapshot(boolean)}. This is important, because the
- * {@link ITerminalTextData} might get modified by another thread. Suppose you
- * would want to draw the content of the {@link ITerminalTextData} using the
- * following loop:
- *
- * <pre>
- * for (int line = 0; line &lt; term.getHeight(); line++)
- * for (int column = 0; column &lt; term.getWidth(); column++)
- * drawCharacter(column, line, term.getChar(column, line), term.getStyle(column, line));
- * </pre>
- *
- * This might fail because the background thread could change the dimensions of
- * the {@link ITerminalTextData} while you iterate the loop. One solution would
- * be to put a <code>synchronized(term){}</code> statement around the code. This
- * has two problems: 1. you would have to know about the internals of the
- * synchronisation of {@link ITerminalTextData}. 2. The other thread that
- * changes {@link ITerminalTextData} is blocked while the potentially slow
- * drawing is done.
- * <p>
- * <b>Solution:</b> Take a snapshot of the terminal and use the snapshot to draw
- * the content. There is no danger that the data structure get changed while you
- * draw. There are also methods to find out what has changed to minimize the
- * number of lines that get redrawn.
- * </p>
- *
- * <p>
- * <b>Drawing optimization</b>: To optimize redrawing of changed lines, this
- * class keeps track of lines that have changed since the previous snapshot.
- * </p>
- *
- * <pre>
- * // iterate over the potentially changed lines
- * for (int line = snap.getFirstChangedLine(); line &lt;= snap.getLastChangedLine(); line++)
- * // redraw only if the line has changed
- * if (snap.hasLineChanged(line))
- * for (int column = 0; column &lt; snap.getWidth(); column++)
- * drawCharacter(column, line, snap.getChar(column, line), snap.getStyle(column, line));
- * </pre>
- *
- * <p>
- * <b>Scroll optimization:</b> Often new lines are appended at the bottom of the
- * terminal and the rest of the lines are scrolled up. In this case all lines
- * would be marked as changed. To optimize for this case,
- * {@link #updateSnapshot(boolean)} can be called with <code>true</code> for the
- * <code>detectScrolling</code> parameter. The object will keep track of
- * scrolling. The UI must <b>first</b> handle the scrolling and then use the
- * {@link #hasLineChanged(int)} method to determine scrolling:
- *
- * <pre>
- * // scroll the visible region of the UI &lt;b&gt;before&lt;/b&gt; drawing the changed lines.
- * doUIScrolling(snap.getScrollChangeY(), snap.getScrollChangeN(), snap.getScrollChangeShift());
- * // iterate over the potentially changed lines
- * for (int line = snap.getFirstChangedLine(); line &lt;= snap.getFirstChangedLine(); line++)
- * // redraw only if the line has changed
- * if (snap.hasLineChanged(line))
- * for (int column = 0; column &lt; snap.getWidth(); column++)
- * drawCharacter(column, line, snap.getChar(column, line), snap.getStyle(column, line));
- * </pre>
- *
- * </p>
- * <p>
- * <b>Threading Note</b>: This class is not thread safe! All methods have to be
- * called by the a same thread, that created the instance by calling
- * {@link ITerminalTextDataReadOnly#makeSnapshot()}.
- * </p>
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface ITerminalTextDataSnapshot extends ITerminalTextDataReadOnly {
- /**
- * This listener gets called when the current snapshot
- * is out of date. Calling {@link ITerminalTextDataSnapshot#updateSnapshot(boolean)}
- * will have an effect. Once the {@link #snapshotOutOfDate(ITerminalTextDataSnapshot)} method is called,
- * it will not be called until {@link ITerminalTextDataSnapshot#updateSnapshot(boolean)}
- * is called and a new snapshot needs to be updated again.
- * <p>
- * A typical terminal view would not update the snapshot immediately
- * after the {@link #snapshotOutOfDate(ITerminalTextDataSnapshot)} has been called. It would introduce a
- * delay to update the UI (and the snapshot} 10 or 20 times per second.
- *
- * <p>Make sure you don't spend too much time in this method.
- */
- interface SnapshotOutOfDateListener {
- /**
- * Gets called when the snapshot is out of date. To get the snapshot up to date,
- * call {@link ITerminalTextDataSnapshot#updateSnapshot(boolean)}.
- * @param snapshot The snapshot that is out of date
- */
- void snapshotOutOfDate(ITerminalTextDataSnapshot snapshot);
- }
- void addListener(SnapshotOutOfDateListener listener);
- void removeListener(SnapshotOutOfDateListener listener);
-
- /**
- * Ends the listening to the {@link ITerminalTextData}. After this
- * has been called no new snapshot data is collected.
- */
- void detach();
- /**
- * @return true if the data has changed since the previous snapshot.
- */
- boolean isOutOfDate();
-
- /**
- * The window of interest is the region the snapshot should track.
- * Changes outside this region are ignored. The change takes effect after
- * an update!
- * @param startLine -1 means track the end of the data
- * @param size number of lines to track. A size of -1 means track all.
- */
- void setInterestWindow(int startLine, int size);
- int getInterestWindowStartLine();
- int getInterestWindowSize();
-
- /**
- * Create a new snapshot of the {@link ITerminalTextData}. It will efficiently
- * copy the data of the {@link ITerminalTextData} into an internal representation.
- * The snapshot also keeps track of the changes since the previous snapshot.
- * <p>With the methods {@link #getFirstChangedLine()}, {@link #getLastChangedLine()} and
- * {@link #hasLineChanged(int)}
- * you can find out what has changed in the current snapshot since the previous snapshot.
- * @param detectScrolling if <code>true</code> the snapshot tries to identify scroll
- * changes since the last snapshot. In this case the information about scrolling
- * can be retrieved using the following methods:
- * {@link #getScrollWindowStartLine()}, {@link #getScrollWindowSize()} and {@link #getScrollWindowShift()}
- * <br><b>Note:</b> The method {@link #hasLineChanged(int)} returns changes <b>after</b> the
- * scrolling has been applied.
- */
- void updateSnapshot(boolean detectScrolling);
-
- /**
- * @return The first line changed in this snapshot compared
- * to the previous snapshot.
- *
- * <p><b>Note:</b> If no line has changed, this
- * returns {@link Integer#MAX_VALUE}
- *
- * <p><b>Note:</b> if {@link #updateSnapshot(boolean)} has been called with <code>true</code>,
- * then this does not include lines that only have been scrolled. This is the
- * first line that has changed <b>after</b> the scroll has been applied.
- */
- int getFirstChangedLine();
-
- /**
- * @return The last line changed in this snapshot compared
- * to the previous snapshot. If the height has changed since the
- * last update of the snapshot, then the returned value is within
- * the new dimensions.
- *
- * <p><b>Note:</b> If no line has changed, this returns <code>-1</code>
- *
- * <p><b>Note:</b> if {@link #updateSnapshot(boolean)} has been called with <code>true</code>,
- * then this does not include lines that only have been scrolled. This is the
- * last line that has changed <b>after</b> the scroll has been applied.
- *
- * <p>A typical for loop using this method would look like this (note the <code>&lt;=</code> in the for loop):
- * <pre>
- * for(int line=snap.{@link #getFirstChangedLine()}; line <b>&lt;=</b> snap.getLastChangedLine(); line++)
- * if(snap.{@link #hasLineChanged(int) hasLineChanged(line)})
- * doSomething(line);
- * </pre>
- */
- int getLastChangedLine();
-
- /**
- * @param line
- * @return true if the line has changed since the previous snapshot
- */
- boolean hasLineChanged(int line);
-
- boolean hasDimensionsChanged();
-
- /**
- * @return true if the terminal has changed (and not just the
- * window of interest)
- */
- boolean hasTerminalChanged();
- /**
- * If {@link #updateSnapshot(boolean)} was called with <code>true</code>, then this method
- * returns the top of the scroll region.
- * @return The first line scrolled in this snapshot compared
- * to the previous snapshot. See also {@link ITerminalTextData#scroll(int, int, int)}.
- */
- int getScrollWindowStartLine();
-
- /**
- * If {@link #updateSnapshot(boolean)} was called with <code>true</code>, then this method
- * returns the size of the scroll region.
- * @return The number of lines scrolled in this snapshot compared
- * to the previous snapshot. See also {@link ITerminalTextData#scroll(int, int, int)}
- * If nothing has changed, 0 is returned.
- */
- int getScrollWindowSize();
-
- /**
- * If {@link #updateSnapshot(boolean)} was called with <code>true</code>, then this method
- * returns number of lines moved by the scroll region.
- * @return The the scroll shift of this snapshot compared
- * to the previous snapshot. See also {@link ITerminalTextData#scroll(int, int, int)}
- */
- int getScrollWindowShift();
-
- /**
- * @return The {@link ITerminalTextData} on that this instance is observing.
- */
- ITerminalTextData getTerminalTextData();
-
-}
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/model/LineSegment.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/model/LineSegment.java
deleted file mode 100644
index 9c8c38935..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/model/LineSegment.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tm.terminal.model;
-
-
-public class LineSegment {
- private final String fText;
- private final int fCol;
- private final Style fStyle;
- public LineSegment(int col, String text, Style style) {
- fCol = col;
- fText = text;
- fStyle = style;
- }
- public Style getStyle() {
- return fStyle;
- }
- public String getText() {
- return fText;
- }
- public int getColumn() {
- return fCol;
- }
- public String toString() {
- return "LineSegment("+fCol+", \""+fText+"\","+fStyle+")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- }
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/model/Style.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/model/Style.java
deleted file mode 100644
index 9e755143a..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/model/Style.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tm.terminal.model;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * @author scharf
- * Flyweight
- * Threadsafe.
- *
- */
-// TODO add an Object for user data, use weak map to keep track of styles with associated
-// user data
-public class Style {
- private final StyleColor fForground;
- private final StyleColor fBackground;
- private final boolean fBold;
- private final boolean fBlink;
- private final boolean fUnderline;
- private final boolean fReverse;
- private final static Map fgStyles=new HashMap();
- private Style(StyleColor forground, StyleColor background, boolean bold, boolean blink, boolean underline, boolean reverse) {
- fForground = forground;
- fBackground = background;
- fBold = bold;
- fBlink = blink;
- fUnderline = underline;
- fReverse = reverse;
- }
- public static Style getStyle(StyleColor forground, StyleColor background, boolean bold, boolean blink, boolean underline, boolean reverse) {
- Style style = new Style(forground,background, bold, blink,underline,reverse);
- Style cached;
- synchronized (fgStyles) {
- cached=(Style) fgStyles.get(style);
- if(cached==null) {
- cached=style;
- fgStyles.put(cached, cached);
- }
- }
- return cached;
- }
- public static Style getStyle(String forground, String background) {
- return getStyle(StyleColor.getStyleColor(forground), StyleColor.getStyleColor(background),false,false,false,false);
- }
- public static Style getStyle(StyleColor forground, StyleColor background) {
- return getStyle(forground, background,false,false,false,false);
- }
- public Style setForground(StyleColor forground) {
- return getStyle(forground,fBackground,fBold,fBlink,fUnderline,fReverse);
- }
- public Style setBackground(StyleColor background) {
- return getStyle(fForground,background,fBold,fBlink,fUnderline,fReverse);
- }
- public Style setForground(String colorName) {
- return getStyle(StyleColor.getStyleColor(colorName),fBackground,fBold,fBlink,fUnderline,fReverse);
- }
- public Style setBackground(String colorName) {
- return getStyle(fForground,StyleColor.getStyleColor(colorName),fBold,fBlink,fUnderline,fReverse);
- }
- public Style setBold(boolean bold) {
- return getStyle(fForground,fBackground,bold,fBlink,fUnderline,fReverse);
- }
- public Style setBlink(boolean blink) {
- return getStyle(fForground,fBackground,fBold,blink,fUnderline,fReverse);
- }
- public Style setUnderline(boolean underline) {
- return getStyle(fForground,fBackground,fBold,fBlink,underline,fReverse);
- }
- public Style setReverse(boolean reverse) {
- return getStyle(fForground,fBackground,fBold,fBlink,fUnderline,reverse);
- }
- public StyleColor getBackground() {
- return fBackground;
- }
- public boolean isBlink() {
- return fBlink;
- }
- public boolean isBold() {
- return fBold;
- }
- public StyleColor getForground() {
- return fForground;
- }
- public boolean isReverse() {
- return fReverse;
- }
- public boolean isUnderline() {
- return fUnderline;
- }
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((fBackground == null) ? 0 : fBackground.hashCode());
- result = prime * result + (fBlink ? 1231 : 1237);
- result = prime * result + (fBold ? 1231 : 1237);
- result = prime * result + ((fForground == null) ? 0 : fForground.hashCode());
- result = prime * result + (fReverse ? 1231 : 1237);
- result = prime * result + (fUnderline ? 1231 : 1237);
- return result;
- }
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- final Style other = (Style) obj;
- // background == is the same as equals
- if (fBackground != other.fBackground)
- return false;
- if (fBlink != other.fBlink)
- return false;
- if (fBold != other.fBold)
- return false;
- if (fForground != other.fForground)
- return false;
- if (fReverse != other.fReverse)
- return false;
- if (fUnderline != other.fUnderline)
- return false;
- return true;
- }
- public String toString() {
- StringBuffer result=new StringBuffer();
- result.append("Style(foreground="); //$NON-NLS-1$
- result.append(fForground);
- result.append(", background="); //$NON-NLS-1$
- result.append(fBackground);
- if(fBlink)
- result.append(", blink"); //$NON-NLS-1$
- if(fBold)
- result.append(", bold"); //$NON-NLS-1$
- if(fBlink)
- result.append(", blink"); //$NON-NLS-1$
- if(fReverse)
- result.append(", reverse"); //$NON-NLS-1$
- if(fUnderline)
- result.append(", underline"); //$NON-NLS-1$
- result.append(")"); //$NON-NLS-1$
- return result.toString();
- }
-
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/model/StyleColor.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/model/StyleColor.java
deleted file mode 100644
index 39dbb6629..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/model/StyleColor.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tm.terminal.model;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- *
- * Flyweight
- * Threadsafe.
- */
-public class StyleColor {
- private final static Map fgStyleColors=new HashMap();
- final String fName;
-
- /**
- * @param name the name of the color. It is up to the UI to associate a
- * named color with a visual representation
- * @return a StyleColor
- */
- public static StyleColor getStyleColor(String name) {
- StyleColor result;
- synchronized (fgStyleColors) {
- result=(StyleColor) fgStyleColors.get(name);
- if(result==null) {
- result=new StyleColor(name);
- fgStyleColors.put(name, result);
- }
- }
- return result;
- }
- // nobody except the factory method is allowed to instantiate this class!
- private StyleColor(String name) {
- fName = name;
- }
-
- public String getName() {
- return fName;
- }
-
- public String toString() {
- return fName;
- }
- // no need to override equals and hashCode, because Object uses object identity
-} \ No newline at end of file
diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/model/TerminalTextDataFactory.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/model/TerminalTextDataFactory.java
deleted file mode 100644
index bb7545ded..000000000
--- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/model/TerminalTextDataFactory.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.tm.terminal.model;
-
-import org.eclipse.tm.internal.terminal.model.SynchronizedTerminalTextData;
-import org.eclipse.tm.internal.terminal.model.TerminalTextData;
-
-public class TerminalTextDataFactory {
- static public ITerminalTextData makeTerminalTextData() {
- return new SynchronizedTerminalTextData(new TerminalTextData());
- }
-}
diff --git a/terminal/readme.txt b/terminal/readme.txt
deleted file mode 100644
index 3a5490cd7..000000000
--- a/terminal/readme.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-The "terminal" folder holds the DSDP-TM Terminal Component.
-Its core depends on Eclipse RCP only and can be adapted to eRCP.
-All these CVS modules should be named "org.eclipse.tm.terminal.*".
-See http://www.eclipse.org/dsdp/tm

Back to the top