Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 94317 Details for
Bug 200541
[terminal][api][breaking] TerminalConnectorProxy class should be removed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
A patch to make the Proxy adaptable
clipboard.txt (text/plain), 2.31 KB, created by
Michael Scharf
on 2008-03-31 23:43:19 EDT
(
hide
)
Description:
A patch to make the Proxy adaptable
Filename:
MIME Type:
Creator:
Michael Scharf
Created:
2008-03-31 23:43:19 EDT
Size:
2.31 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.tm.terminal >Index: src/org/eclipse/tm/internal/terminal/provisional/api/TerminalConnectorExtension.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.core/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/TerminalConnectorExtension.java,v >retrieving revision 1.7 >diff -u -r1.7 TerminalConnectorExtension.java >--- src/org/eclipse/tm/internal/terminal/provisional/api/TerminalConnectorExtension.java 6 Jun 2007 17:37:04 -0000 1.7 >+++ src/org/eclipse/tm/internal/terminal/provisional/api/TerminalConnectorExtension.java 1 Apr 2008 03:39:31 -0000 >@@ -15,7 +15,9 @@ > import java.util.ArrayList; > import java.util.List; > >+import org.eclipse.core.runtime.IAdaptable; > import org.eclipse.core.runtime.IConfigurationElement; >+import org.eclipse.core.runtime.Platform; > import org.eclipse.core.runtime.RegistryFactory; > > /** >@@ -62,7 +64,7 @@ > * {@link #setTerminalSize(int, int)}, {@link #save(ISettingsStore)} > * > */ >- static private class TerminalConnectorProxy implements ITerminalConnector { >+ static private class TerminalConnectorProxy implements ITerminalConnector, IAdaptable { > /** > * The connector > */ >@@ -170,6 +172,28 @@ > public void initialize() throws Exception { > throw new IllegalStateException("Connector already initialized!"); //$NON-NLS-1$ > } >+ public Object getAdapter(Class adapter) { >+ ITerminalConnector connector=getConnector(); >+ // if we cannot create the connector then we cannot adapt... >+ if(connector==null) >+ return 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; >+ else >+ // maybe we have to be adapted.... >+ return Platform.getAdapterManager().getAdapter(this, adapter); >+ } > } > /** > * @return null or a new connector created from the extension
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 200541
:
94252
|
94317
|
94807
|
94858