1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-26 02:15:31 +02:00

[fix] Bug 282996 - [terminal][api] Add "hidden" attribute to terminal connector extension point

This commit is contained in:
Uwe Stieber 2009-07-09 11:00:22 +00:00
parent fee9bcda5c
commit ec15514aa5
25 changed files with 124 additions and 66 deletions

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<component id="org.eclipse.rse.terminals.ui" version="2">
<resource path="src/org/eclipse/rse/internal/terminals/ui/views/RSETerminalConnector.java" type="org.eclipse.rse.internal.terminals.ui.views.RSETerminalConnector">
<filter id="574619656">
<message_arguments>
<message_argument value="ITerminalConnector"/>
<message_argument value="RSETerminalConnector"/>
</message_arguments>
</filter>
</resource>
</component>

View file

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.rse.terminals.ui;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Version: 1.1.0.qualifier
Bundle-Activator: org.eclipse.rse.internal.terminals.ui.Activator
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.core.expressions,
@ -12,7 +12,7 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.rse.core;bundle-version="[3.0.0,4.0.0)",
org.eclipse.rse.ui;bundle-version="[3.1.0,4.0.0)",
org.eclipse.rse.subsystems.terminals.core;bundle-version="[1.0.0,2.0.0)",
org.eclipse.tm.terminal;bundle-version="[3.0.0,3.1.0)"
org.eclipse.tm.terminal;bundle-version="[3.1.0,3.2.0)"
Bundle-ActivationPolicy: lazy
Eclipse-LazyStart: true
Bundle-Vendor: %providerName

View file

@ -20,6 +20,7 @@ Anna Dushistova (MontaVista) - [235934] Launch Shell/Terminal commands enabled
Anna Dushistova (MontaVista) - [251492] Launch Shell Action is enabled in Offline mode
Kevin Doyle (IBM) - [249320] Launch Shell action not available in Remote System Details/Monitor views
Anna Dushistova (MontaVista) - [257638] [rseterminal] Terminal subsystem doesn't have service properties
Uwe Stieber (Wind River) - [282996] [terminal][api] Add "hidden" attribute to terminal connector extension point
-->
<?eclipse version="3.2"?>
<plugin>

View file

@ -1,11 +1,12 @@
/********************************************************************************
* Copyright (c) 2008 MontaVista Software, Inc.
* Copyright (c) 2008, 2009 MontaVista Software, Inc and others
* This program and the accompanying materials are made available under the 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:
* Anna Dushistova (MontaVista) - initial API and implementation
* Uwe Stieber (Wind River) - [282996] [terminal][api] Add "hidden" attribute to terminal connector extension point
********************************************************************************/
package org.eclipse.rse.internal.terminals.ui.views;
@ -30,6 +31,10 @@ public class RSETerminalConnector extends RSETerminalConnectorImpl implements IT
public String getName() {
return "rse_internal_connector";
}
public boolean isHidden() {
return true;
}
public boolean isInitialized() {
return true;

View file

@ -1,8 +1,8 @@
<?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 -->
<?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.0.qualifier"
version="3.1.0.qualifier"
provider-name="%providerName">
<description>

View file

@ -1,8 +1,8 @@
<?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 -->
<?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.0.qualifier"
version="3.1.0.qualifier"
provider-name="%providerName"
image="eclipse_update_120.jpg">

View file

@ -1,8 +1,8 @@
<?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 -->
<?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.serial"
label="%featureName"
version="2.0.100.qualifier"
version="2.1.0.qualifier"
provider-name="%providerName">
<description>
@ -25,7 +25,7 @@
<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.tm.terminal" version="3.1.0" match="equivalent"/>
</requires>
<plugin

View file

@ -2,12 +2,12 @@ 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-Version: 2.1.0.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)"
org.eclipse.tm.terminal;bundle-version="[3.1.0,3.2.0)"
Bundle-ActivationPolicy: lazy
Eclipse-LazyStart: true
Eclipse-BuddyPolicy: ext

View file

@ -7,12 +7,12 @@
Contributors:
IBM Corporation - 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.ssh"
label="%featureName"
version="2.0.100.qualifier"
version="2.1.0.qualifier"
provider-name="%providerName">
<description>
@ -35,7 +35,7 @@
<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.tm.terminal" version="3.1.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>

View file

@ -2,12 +2,12 @@ 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-Version: 2.1.0.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)",
org.eclipse.tm.terminal;bundle-version="[3.1.0,3.2.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

View file

@ -1,7 +1,7 @@
<?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
<?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 Uwe Stieber (Wind River) - [282996] [terminal][api] Add "hidden" attribute to terminal connector extension point --> <feature
id="org.eclipse.tm.terminal.telnet"
label="%featureName"
version="2.0.100.qualifier"
version="2.1.0.qualifier"
provider-name="%providerName">
<description>
@ -24,7 +24,7 @@
<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.tm.terminal" version="3.1.0" match="equivalent"/>
</requires>
<plugin

View file

@ -2,12 +2,12 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.tm.terminal.telnet;singleton:=true
Bundle-Version: 2.0.100.qualifier
Bundle-Version: 2.1.0.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)"
org.eclipse.tm.terminal;bundle-version="[3.1.0,3.2.0)"
Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
J2SE-1.4
Export-Package: org.eclipse.tm.internal.terminal.telnet;x-internal:=true

View file

@ -2,11 +2,11 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.tm.terminal.test;singleton:=true
Bundle-Version: 2.0.100.qualifier
Bundle-Version: 2.1.0.qualifier
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Require-Bundle: org.junit,
org.eclipse.tm.terminal;bundle-version="[3.0.0,3.1.0)",
org.eclipse.tm.terminal;bundle-version="[3.1.0,3.2.0)",
org.eclipse.core.runtime,
org.eclipse.ui
Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,

View file

@ -10,12 +10,14 @@
# 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 name="Speed Test"
id="org.eclipse.tm.internal.terminal.speedtest.SpeedTestConnector"
class="org.eclipse.tm.internal.terminal.speedtest.SpeedTestConnector"/>
<connector
class="org.eclipse.tm.internal.terminal.speedtest.SpeedTestConnector"
id="org.eclipse.tm.internal.terminal.speedtest.SpeedTestConnector"
name="Speed Test"/>
</extension>
</plugin>

View file

@ -9,6 +9,7 @@
* 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;
@ -137,7 +138,7 @@ public class TerminalConnectorFactoryTest extends TestCase {
public TerminalConnectorImpl makeConnector() throws Exception {
return mock;
}
},"xID","xName");
},"xID","xName", false);
return c;
}

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008 Wind River Systems, Inc. and others.
* 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
@ -7,6 +7,7 @@
*
* 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;
@ -26,12 +27,14 @@ public class TerminalConnectorPluginTest extends TestCase {
public void testIsInitialized() {
if (!Platform.isRunning())
return;
TerminalConnector c = new TerminalConnector(new SimpleFactory(new ConnectorMock()), "xID", "xName");
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);
@ -48,7 +51,7 @@ public class TerminalConnectorPluginTest extends TestCase {
if (!Platform.isRunning())
return;
ConnectorMock mock = new ConnectorMock();
TerminalConnector c = new TerminalConnector(new SimpleFactory(mock), "xID", "xName");
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());

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
* 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
@ -9,6 +9,7 @@
* 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;
@ -139,27 +140,27 @@ public class TerminalConnectorTest extends TestCase {
}
}
public void testGetInitializationErrorMessage() {
TerminalConnector c=new TerminalConnector(new SimpleFactory(new ConnectorMock()),"xID","xName");
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");
}}),"xID","xName", false);
c.connect(new TerminalControlMock());
assertEquals("FAILED",c.getInitializationErrorMessage());
}
public void testGetIdAndName() {
TerminalConnector c=new TerminalConnector(new SimpleFactory(new ConnectorMock()),"xID","xName");
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");
TerminalConnector c=new TerminalConnector(new SimpleFactory(new ConnectorMock()),"xID","xName", false);
assertFalse(c.isInitialized());
c.connect(new TerminalControlMock());
assertTrue(c.isInitialized());
@ -168,7 +169,7 @@ public class TerminalConnectorTest extends TestCase {
public void testDisconnect() {
ConnectorMock mock=new ConnectorMock();
TerminalConnector c=new TerminalConnector(new SimpleFactory(mock),"xID","xName");
TerminalConnector c=new TerminalConnector(new SimpleFactory(mock),"xID","xName", false);
TerminalControlMock control=new TerminalControlMock();
c.connect(control);
c.disconnect();
@ -177,14 +178,14 @@ public class TerminalConnectorTest extends TestCase {
public void testGetTerminalToRemoteStream() {
ConnectorMock mock=new ConnectorMock();
TerminalConnector c=new TerminalConnector(new SimpleFactory(mock),"xID","xName");
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");
TerminalConnector c=new TerminalConnector(new SimpleFactory(new ConnectorMock()),"xID","xName", false);
assertEquals("Not Initialized", c.getSettingsSummary());
c.connect(new TerminalControlMock());
assertEquals("Summary", c.getSettingsSummary());
@ -192,7 +193,7 @@ public class TerminalConnectorTest extends TestCase {
public void testIsLocalEcho() {
ConnectorMock mock=new ConnectorMock();
TerminalConnector c=new TerminalConnector(new SimpleFactory(mock),"xID","xName");
TerminalConnector c=new TerminalConnector(new SimpleFactory(mock),"xID","xName", false);
assertFalse(c.isLocalEcho());
mock.fEcho=true;
assertTrue(c.isLocalEcho());
@ -200,7 +201,7 @@ public class TerminalConnectorTest extends TestCase {
public void testLoad() {
ConnectorMock mock=new ConnectorMock();
TerminalConnector c=new TerminalConnector(new SimpleFactory(mock),"xID","xName");
TerminalConnector c=new TerminalConnector(new SimpleFactory(mock),"xID","xName", false);
ISettingsStore s=new SettingsMock();
c.load(s);
// the load is called after the connect...
@ -211,7 +212,7 @@ public class TerminalConnectorTest extends TestCase {
public void testSave() {
ConnectorMock mock=new ConnectorMock();
TerminalConnector c=new TerminalConnector(new SimpleFactory(mock),"xID","xName");
TerminalConnector c=new TerminalConnector(new SimpleFactory(mock),"xID","xName", false);
ISettingsStore s=new SettingsMock();
c.save(s);
assertNull(mock.fSaveStore);
@ -222,13 +223,13 @@ public class TerminalConnectorTest extends TestCase {
public void testMakeSettingsPage() {
ConnectorMock mock=new ConnectorMock();
TerminalConnector c=new TerminalConnector(new SimpleFactory(mock),"xID","xName");
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");
TerminalConnector c=new TerminalConnector(new SimpleFactory(mock),"xID","xName", false);
c.setTerminalSize(100, 200);
}

View file

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <!--
<?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
@ -7,12 +8,12 @@
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.100.qualifier"
version="2.1.0.qualifier"
provider-name="%providerName">
<description>
@ -35,7 +36,7 @@
<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.tm.terminal" version="3.1.0" match="equivalent"/>
</requires>
<plugin

View file

@ -2,12 +2,12 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.tm.terminal.view;singleton:=true
Bundle-Version: 2.0.100.qualifier
Bundle-Version: 2.1.0.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.0,3.1.0)"
org.eclipse.tm.terminal;bundle-version="[3.1.0,3.2.0)"
Bundle-ActivationPolicy: lazy
Eclipse-LazyStart: true
Bundle-RequiredExecutionEnvironment: J2SE-1.4

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2003, 2008 Wind River Systems, Inc. and others.
* 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
@ -18,6 +18,7 @@
* 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;
@ -87,7 +88,7 @@ class TerminalSettingsDlg extends Dialog {
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)
if(info.isInitialized() && info.getInitializationErrorMessage()!=null || info.isHidden())
iterator.remove();
}
connectors=(ITerminalConnector[]) list.toArray(new ITerminalConnector[list.size()]);

View file

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.tm.terminal; singleton:=true
Bundle-Version: 3.0.0.qualifier
Bundle-Version: 3.1.0.qualifier
Bundle-Activator: org.eclipse.tm.internal.terminal.control.impl.TerminalPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin

View file

@ -2,15 +2,20 @@
<!-- Schema file written by PDE -->
<schema targetNamespace="org.eclipse.tm.terminal" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appinfo>
<appInfo>
<meta.schema plugin="org.eclipse.tm.terminal" id="terminalConnectors" name="Terminal Connectors"/>
</appinfo>
</appInfo>
<documentation>
</documentation>
</annotation>
<element name="extension">
<annotation>
<appInfo>
<meta.element />
</appInfo>
</annotation>
<complexType>
<sequence minOccurs="1" maxOccurs="unbounded">
<element ref="connector"/>
@ -34,9 +39,9 @@
<documentation>
</documentation>
<appinfo>
<appInfo>
<meta.attribute translatable="true"/>
</appinfo>
</appInfo>
</annotation>
</attribute>
</complexType>
@ -49,9 +54,9 @@
<documentation>
A class extending TerminalConnectorImpl
</documentation>
<appinfo>
<appInfo>
<meta.attribute kind="java" basedOn="org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnectorImpl:"/>
</appinfo>
</appInfo>
</annotation>
</attribute>
<attribute name="id" type="string" use="required">
@ -66,9 +71,16 @@
<documentation>
The name of the connection (used in the UI)
</documentation>
<appinfo>
<appInfo>
<meta.attribute translatable="true"/>
</appinfo>
</appInfo>
</annotation>
</attribute>
<attribute name="hidden" type="boolean">
<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>
@ -79,9 +91,9 @@
<annotation>
<appinfo>
<appInfo>
<meta.section type="copyright"/>
</appinfo>
</appInfo>
<documentation>
Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
All rights reserved. This program and the accompanying materials
@ -92,6 +104,7 @@ 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
</documentation>
</annotation>

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
* 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
@ -9,6 +9,7 @@
* 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;
@ -75,6 +76,10 @@ public class TerminalConnector implements ITerminalConnector {
* The unique id the connector
*/
private final String fId;
/**
* Flag to mark the connector as hidden.
*/
private final boolean fHidden;
/**
* The connector
*/
@ -98,10 +103,11 @@ public class TerminalConnector implements ITerminalConnector {
* this ID.
* @param name translatable name to display the connector in the UI.
*/
public TerminalConnector(TerminalConnector.Factory terminalConnectorFactory, String id, String name) {
public TerminalConnector(TerminalConnector.Factory terminalConnectorFactory, String id, String name, boolean hidden) {
fTerminalConnectorFactory = terminalConnectorFactory;
fId = id;
fName = name;
fHidden = hidden;
}
public String getInitializationErrorMessage() {
getConnectorImpl();
@ -115,6 +121,9 @@ public class TerminalConnector implements ITerminalConnector {
public String getName() {
return fName;
}
public boolean isHidden() {
return fHidden;
}
private TerminalConnectorImpl getConnectorImpl() {
if(!isInitialized()) {
try {

View file

@ -9,6 +9,7 @@
* 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;
@ -59,6 +60,12 @@ public interface ITerminalConnector extends IAdaptable {
* @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.1
*/
boolean isHidden();
/**
* @return true if the {@link TerminalConnectorImpl} has been initialized.

View file

@ -8,6 +8,7 @@
* 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;
@ -44,11 +45,13 @@ public class TerminalConnectorExtension {
if(name==null || name.length()==0) {
name=id;
}
String hidden = config.getAttribute("hidden"); //$NON-NLS-1$
boolean isHidden = hidden != null ? Boolean.parseBoolean(hidden) : 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);
return new TerminalConnector(factory,id,name, isHidden);
}
/**